Skip to content

Latest commit

 

History

History
88 lines (83 loc) · 3.8 KB

hrisdepartmentsallresponse.md

File metadata and controls

88 lines (83 loc) · 3.8 KB

HrisDepartmentsAllResponse

Example Usage

import { HrisDepartmentsAllResponse } from "@apideck/unify/models/operations";

let value: HrisDepartmentsAllResponse = {
  httpMeta: {
    response: new Response("{\"message\": \"hello world\"}", {
      headers: { "Content-Type": "application/json" },
    }),
    request: new Request("https://example.com"),
  },
  getDepartmentsResponse: {
    statusCode: 200,
    status: "OK",
    service: "workday",
    resource: "Departments",
    operation: "all",
    data: [
      {
        id: "12345",
        parentId: "22345",
        name: "R&D",
        code: "2",
        description: "R&D",
        updatedBy: "12345",
        createdBy: "12345",
        updatedAt: new Date("2020-09-30T07:43:32.000Z"),
        createdAt: new Date("2020-09-30T07:43:32.000Z"),
        passThrough: [
          {
            serviceId: "<id>",
            extendPaths: [
              {
                path: "$.nested.property",
                value: {
                  "TaxClassificationRef": {
                    "value": "EUC-99990201-V1-00020000",
                  },
                },
              },
            ],
          },
        ],
      },
    ],
    meta: {
      itemsOnPage: 50,
      cursors: {
        previous: "em9oby1jcm06OnBhZ2U6OjE=",
        current: "em9oby1jcm06OnBhZ2U6OjI=",
        next: "em9oby1jcm06OnBhZ2U6OjM=",
      },
    },
    links: {
      previous:
        "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
      current: "https://unify.apideck.com/crm/companies",
      next:
        "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    },
  },
  unexpectedErrorResponse: {
    statusCode: 400,
    error: "Bad Request",
    typeName: "RequestHeadersValidationError",
    message: "Invalid Params",
    detail: {
      "missing": [
        {
          "x-apideck-consumer-id": "required",
        },
      ],
    },
    ref: "https://developers.apideck.com/errors#unauthorizederror",
  },
};

Fields

Field Type Required Description
httpMeta components.HTTPMetadata ✔️ N/A
getDepartmentsResponse components.GetDepartmentsResponse Departments
unexpectedErrorResponse components.UnexpectedErrorResponse Unexpected error