@kombo-api/sdk 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/esm/funcs/generalSendPassthroughRequest.d.ts +3 -0
  2. package/esm/funcs/generalSendPassthroughRequest.d.ts.map +1 -1
  3. package/esm/funcs/generalSendPassthroughRequest.js +3 -0
  4. package/esm/funcs/generalSendPassthroughRequest.js.map +1 -1
  5. package/esm/lib/config.d.ts +3 -3
  6. package/esm/lib/config.js +3 -3
  7. package/esm/models/deletehrisabsencesabsenceidpositiveresponse.d.ts.map +1 -1
  8. package/esm/models/deletehrisabsencesabsenceidpositiveresponse.js +2 -6
  9. package/esm/models/deletehrisabsencesabsenceidpositiveresponse.js.map +1 -1
  10. package/esm/models/getatsjobspositiveresponse.d.ts.map +1 -1
  11. package/esm/models/getatsjobspositiveresponse.js +6 -26
  12. package/esm/models/getatsjobspositiveresponse.js.map +1 -1
  13. package/esm/models/gethrisabsencespositiveresponse.d.ts.map +1 -1
  14. package/esm/models/gethrisabsencespositiveresponse.js +2 -6
  15. package/esm/models/gethrisabsencespositiveresponse.js.map +1 -1
  16. package/esm/models/gethrisemployeespositiveresponse.d.ts +4 -0
  17. package/esm/models/gethrisemployeespositiveresponse.d.ts.map +1 -1
  18. package/esm/models/gethrisemployeespositiveresponse.js +11 -46
  19. package/esm/models/gethrisemployeespositiveresponse.js.map +1 -1
  20. package/esm/models/gethrisemploymentspositiveresponse.d.ts.map +1 -1
  21. package/esm/models/gethrisemploymentspositiveresponse.js +4 -16
  22. package/esm/models/gethrisemploymentspositiveresponse.js.map +1 -1
  23. package/esm/models/postconnectcreatelinkrequestbody.d.ts +2 -0
  24. package/esm/models/postconnectcreatelinkrequestbody.d.ts.map +1 -1
  25. package/esm/models/postconnectcreatelinkrequestbody.js +2 -0
  26. package/esm/models/postconnectcreatelinkrequestbody.js.map +1 -1
  27. package/esm/models/posthrisabsencespositiveresponse.d.ts.map +1 -1
  28. package/esm/models/posthrisabsencespositiveresponse.js +2 -6
  29. package/esm/models/posthrisabsencespositiveresponse.js.map +1 -1
  30. package/esm/models/posthrisemployeesformpositiveresponse.d.ts +8 -0
  31. package/esm/models/posthrisemployeesformpositiveresponse.d.ts.map +1 -1
  32. package/esm/models/posthrisemployeesformpositiveresponse.js +2 -0
  33. package/esm/models/posthrisemployeesformpositiveresponse.js.map +1 -1
  34. package/esm/sdk/general.d.ts +3 -0
  35. package/esm/sdk/general.d.ts.map +1 -1
  36. package/esm/sdk/general.js +3 -0
  37. package/esm/sdk/general.js.map +1 -1
  38. package/esm/types/enums.d.ts +10 -6
  39. package/esm/types/enums.d.ts.map +1 -1
  40. package/esm/types/enums.js +38 -1
  41. package/esm/types/enums.js.map +1 -1
  42. package/esm/types/index.d.ts +0 -1
  43. package/esm/types/index.d.ts.map +1 -1
  44. package/esm/types/index.js +0 -1
  45. package/esm/types/index.js.map +1 -1
  46. package/examples/package-lock.json +4 -2
  47. package/jsr.json +1 -1
  48. package/package.json +6 -3
  49. package/src/funcs/generalSendPassthroughRequest.ts +3 -0
  50. package/src/lib/config.ts +3 -3
  51. package/src/models/deletehrisabsencesabsenceidpositiveresponse.ts +5 -6
  52. package/src/models/getatsjobspositiveresponse.ts +7 -26
  53. package/src/models/gethrisabsencespositiveresponse.ts +3 -6
  54. package/src/models/gethrisemployeespositiveresponse.ts +16 -46
  55. package/src/models/gethrisemploymentspositiveresponse.ts +5 -16
  56. package/src/models/postconnectcreatelinkrequestbody.ts +2 -0
  57. package/src/models/posthrisabsencespositiveresponse.ts +3 -6
  58. package/src/models/posthrisemployeesformpositiveresponse.ts +10 -0
  59. package/src/sdk/general.ts +3 -0
  60. package/src/types/enums.ts +55 -6
  61. package/src/types/index.ts +0 -1
  62. package/tests/basic-behavior.spec.ts +162 -0
  63. package/tests/error-handling.spec.ts +604 -0
  64. package/tests/helpers/test-context.ts +147 -0
  65. package/tests/job-board.spec.ts +32 -0
  66. package/vitest.config.ts +8 -0
@@ -69,6 +69,7 @@ import { Result } from "../types/fp.js";
69
69
  * |UKG Pro|`ukgpro/recruting`|[UKG Pro's Recruiting API](https://developer.ukg.com/hcm/reference/retrieveapplications). We automatically authenticate all requests and use `https://\{hostname\}/talent/recruiting/v2/\{tenantalias\}/api` as the base URL.|
70
70
  * |UKG Pro|`ukgpro/default`|[UKG Pro's HRIS API](https://developer.ukg.com/hcm/reference/get_personnel-v1-person-details). We automatically authenticate all requests and use `https://\{hostname\}` as the base URL.|
71
71
  * |UKG Ready|`ukgready/api`|UKG Ready [API](https://secure.saashr.com/ta/docs/rest/public/). We automatically authenticate all requests using the provided credentials and use `https://\{api_domain\}` as the base URL.|
72
+ * |UKG Ready|`ukgready/api`|UKG Ready [API](https://secure.saashr.com/ta/docs/rest/public/). We automatically authenticate all requests using the provided credentials and use `https://\{api_domain\}` as the base URL.|
72
73
  * |ADP Workforce Now|`adpworkforcenow/default`|[ADP Workforce Now API v2](https://developers.adp.com/build/api-explorer/hcm-offrg-wfn). We automatically authenticate all requests and use the correct subdomain.|
73
74
  * |Taleo|`taleo/soap`|[Taleo's API](https://docs.oracle.com/en/cloud/saas/taleo-enterprise/23b/otwsu/c-taleoapi.html). We automatically authenticate all requests and use 'https://\{your-subdomain\}.taleo.net/enterprise/soap' as base URL.|
74
75
  * |rexx systems|`rexx/default`|Rexx's HRIS export API. There is only one endpoint: `Get /`|
@@ -93,6 +94,7 @@ import { Result } from "../types/fp.js";
93
94
  * |Microsoft Azure AD|`azuread/v1`|[AzureAD's API](https://learn.microsoft.com/en-us/graph/api/resources/identity-network-access-overview?view=graph-rest-1.0). We automatically authenticate all requests.|
94
95
  * |Google Workspace|`googleworkspace/people`|[Googles's API](https://developers.google.com/people/api/rest). We automatically authenticate all requests and use 'https://people.googleapis.com' as the base URL.|
95
96
  * |Google Workspace|`googleworkspace/admin`|[Googles's API](https://developers.google.com/admin-sdk/directory/reference/rest). We automatically authenticate all requests and use 'https://admin.googleapis.com' as the base URL.|
97
+ * |Nmbrs|`nmbrs/soap`|[Nmbrs SOAP API](https://api.nmbrs.nl/soap/v3/). We automatically authenticate all requests and use `https://api.nmbrs.nl/soap/v3/` as the base URL. Set `data` to your raw XML string (the content that will be placed inside the `\<soap:Body\>` tag). Use `/` as your `path`, as we will always send requests to `https://api.nmbrs.nl/soap/v3/\{service_name\}.asmx`. Set your `method` to `POST`. You need to specify the `api_options` object and set `service_name` to the name of the service you want to call. Available services include `EmployeeService` and `CompanyService`.|
96
98
  * |Pinpoint|`pinpoint/v1`|Pinpoint's [JSON:API](https://developers.pinpointhq.com/docs). We automatically authenticate all requests using the `X-API-KEY` header and use `https://\{subdomain\}.pinpointhq.com/api/v1` as the base URL.|
97
99
  * |d.vinci|`dvinci/rest-api`|The [DVinci REST API](https://static.dvinci-easy.com/files/d.vinci%20rest-api.html). All requests are authenticated by Kombo and use `https://\{dvinci_domain\}/restApi/` as the base URL.|
98
100
  * |d.vinci|`dvinci/apply-api`|The [DVinci Apply API](https://static.dvinci-easy.com/files/d.vinci%20application-apply-api.html). All requests are authenticated by Kombo and use `https://\{dvinci_domain\}/p/\{portal_path\}/` as the base URL.|
@@ -170,6 +172,7 @@ import { Result } from "../types/fp.js";
170
172
  * |Manatal|`manatal/open-api-v3`|[Manatal's Open API v3](https://developers.manatal.com/reference/getting-started). We automatically authenticate all requests and use `https://api.manatal.com/open/v3` as the base URL.|
171
173
  * |Manatal|`manatal/career-page`|Manatal's Career Page API. We use `https://api.manatal.com/open/v3/career-page/\{client_slug\}` as the base URL.|
172
174
  * |Avionté|`avionte/front-office-v1`|Avionte's API. We automatically authenticate all requests and use `https://api.avionte.com/front-office/v1` as the base URL. Documentation for the BOLD Front Office API: https://developer.avionte.com/reference/get-all-talent-tags|
175
+ * |a3innuva Nómina|`a3innuvanomina/laboral`|a3innuva Nómina API [docs](https://a3developers.wolterskluwer.es/). Requests are automatically authenticated using OAuth access tokens (refreshed when needed). Base URL: `https://a3api.wolterskluwer.es/Laboral/api`.|
173
176
  * |DATEV|`datevhr/hr-exports`|DATEV's [hr-exports](https://developer.datev.de/en/product-detail/hr-exports/1.0.0/overview). We automatically authenticate all requests and use `https://hr-exports.api.datev.de/\{platform|platform-sandbox\}/v1/clients/\{client-id\}` as the base URL.|
174
177
  * |DATEV|`datevhr/hr:payrollreports`|DATEV's [hr:payrollreports](https://developer.datev.de/en/product-detail/hr-payrollreports/2.0.0/overview) API. We automatically authenticate all requests and use `https://hr-payrollreports.api.datev.de/\{platform|platform-sandbox\}/v1/clients/\{client-id\}/` as the base URL.|
175
178
  * |DATEV|`datevhr/eau`|DATEV's [eau](https://developer.datev.de/en/product-detail/eau-api/1.0.0/overview) API. We automatically authenticate all requests and use `https://eau.api.datev.de/\{platform|platform-sandbox\}/v1/clients/\{client-id\}/` as the base URL.|
package/src/lib/config.ts CHANGED
@@ -69,7 +69,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
69
69
  export const SDK_METADATA = {
70
70
  language: "typescript",
71
71
  openapiDocVersion: "1.0.0",
72
- sdkVersion: "0.2.0",
73
- genVersion: "2.745.2",
74
- userAgent: "speakeasy-sdk/typescript 0.2.0 2.745.2 1.0.0 @kombo-api/sdk",
72
+ sdkVersion: "0.2.2",
73
+ genVersion: "2.755.9",
74
+ userAgent: "speakeasy-sdk/typescript 0.2.2 2.755.9 1.0.0 @kombo-api/sdk",
75
75
  } as const;
@@ -4,7 +4,8 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { catchUnrecognizedEnum, ClosedEnum, OpenEnum } from "../types/enums.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../types/fp.js";
9
10
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
11
 
@@ -124,11 +125,9 @@ export const DeleteHrisAbsencesAbsenceIdPositiveResponseStatus$inboundSchema:
124
125
  DeleteHrisAbsencesAbsenceIdPositiveResponseStatus,
125
126
  z.ZodTypeDef,
126
127
  unknown
127
- > = z
128
- .union([
129
- z.nativeEnum(DeleteHrisAbsencesAbsenceIdPositiveResponseStatus),
130
- z.string().transform(catchUnrecognizedEnum),
131
- ]);
128
+ > = openEnums.inboundSchema(
129
+ DeleteHrisAbsencesAbsenceIdPositiveResponseStatus,
130
+ );
132
131
 
133
132
  /** @internal */
134
133
  export const DeleteHrisAbsencesAbsenceIdPositiveResponseData$inboundSchema:
@@ -4,7 +4,8 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { catchUnrecognizedEnum, ClosedEnum, OpenEnum } from "../types/enums.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../types/fp.js";
9
10
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
11
 
@@ -542,55 +543,35 @@ export const GetAtsJobsPositiveResponseEmploymentType$inboundSchema: z.ZodType<
542
543
  GetAtsJobsPositiveResponseEmploymentType,
543
544
  z.ZodTypeDef,
544
545
  unknown
545
- > = z
546
- .union([
547
- z.nativeEnum(GetAtsJobsPositiveResponseEmploymentType),
548
- z.string().transform(catchUnrecognizedEnum),
549
- ]);
546
+ > = openEnums.inboundSchema(GetAtsJobsPositiveResponseEmploymentType);
550
547
 
551
548
  /** @internal */
552
549
  export const GetAtsJobsPositiveResponseStatus$inboundSchema: z.ZodType<
553
550
  GetAtsJobsPositiveResponseStatus,
554
551
  z.ZodTypeDef,
555
552
  unknown
556
- > = z
557
- .union([
558
- z.nativeEnum(GetAtsJobsPositiveResponseStatus),
559
- z.string().transform(catchUnrecognizedEnum),
560
- ]);
553
+ > = openEnums.inboundSchema(GetAtsJobsPositiveResponseStatus);
561
554
 
562
555
  /** @internal */
563
556
  export const Visibility$inboundSchema: z.ZodType<
564
557
  Visibility,
565
558
  z.ZodTypeDef,
566
559
  unknown
567
- > = z
568
- .union([
569
- z.nativeEnum(Visibility),
570
- z.string().transform(catchUnrecognizedEnum),
571
- ]);
560
+ > = openEnums.inboundSchema(Visibility);
572
561
 
573
562
  /** @internal */
574
563
  export const RemoteWorkStatus$inboundSchema: z.ZodType<
575
564
  RemoteWorkStatus,
576
565
  z.ZodTypeDef,
577
566
  unknown
578
- > = z
579
- .union([
580
- z.nativeEnum(RemoteWorkStatus),
581
- z.string().transform(catchUnrecognizedEnum),
582
- ]);
567
+ > = openEnums.inboundSchema(RemoteWorkStatus);
583
568
 
584
569
  /** @internal */
585
570
  export const SalaryPeriod$inboundSchema: z.ZodType<
586
571
  SalaryPeriod,
587
572
  z.ZodTypeDef,
588
573
  unknown
589
- > = z
590
- .union([
591
- z.nativeEnum(SalaryPeriod),
592
- z.string().transform(catchUnrecognizedEnum),
593
- ]);
574
+ > = openEnums.inboundSchema(SalaryPeriod);
594
575
 
595
576
  /** @internal */
596
577
  export const GetAtsJobsPositiveResponseLocation$inboundSchema: z.ZodType<
@@ -4,7 +4,8 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { catchUnrecognizedEnum, ClosedEnum, OpenEnum } from "../types/enums.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../types/fp.js";
9
10
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
11
 
@@ -173,11 +174,7 @@ export const GetHrisAbsencesPositiveResponseStatus$inboundSchema: z.ZodType<
173
174
  GetHrisAbsencesPositiveResponseStatus,
174
175
  z.ZodTypeDef,
175
176
  unknown
176
- > = z
177
- .union([
178
- z.nativeEnum(GetHrisAbsencesPositiveResponseStatus),
179
- z.string().transform(catchUnrecognizedEnum),
180
- ]);
177
+ > = openEnums.inboundSchema(GetHrisAbsencesPositiveResponseStatus);
181
178
 
182
179
  /** @internal */
183
180
  export const GetHrisAbsencesPositiveResponseTypeUnit$inboundSchema:
@@ -4,7 +4,8 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { catchUnrecognizedEnum, ClosedEnum, OpenEnum } from "../types/enums.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../types/fp.js";
9
10
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
11
 
@@ -355,6 +356,10 @@ export type Manager = {
355
356
  * The globally unique ID of this object generated by Kombo. We recommend using this as a stable primary key for syncing.
356
357
  */
357
358
  id: string;
359
+ /**
360
+ * The employee’s organization-internal employee number.
361
+ */
362
+ employee_number: string | null;
358
363
  /**
359
364
  * The employee’s work email address. If the email address is invalid, we will set this to `null`.
360
365
  */
@@ -688,44 +693,28 @@ export const GetHrisEmployeesPositiveResponseGender$inboundSchema: z.ZodType<
688
693
  GetHrisEmployeesPositiveResponseGender,
689
694
  z.ZodTypeDef,
690
695
  unknown
691
- > = z
692
- .union([
693
- z.nativeEnum(GetHrisEmployeesPositiveResponseGender),
694
- z.string().transform(catchUnrecognizedEnum),
695
- ]);
696
+ > = openEnums.inboundSchema(GetHrisEmployeesPositiveResponseGender);
696
697
 
697
698
  /** @internal */
698
699
  export const Ethnicity$inboundSchema: z.ZodType<
699
700
  Ethnicity,
700
701
  z.ZodTypeDef,
701
702
  unknown
702
- > = z
703
- .union([
704
- z.nativeEnum(Ethnicity),
705
- z.string().transform(catchUnrecognizedEnum),
706
- ]);
703
+ > = openEnums.inboundSchema(Ethnicity);
707
704
 
708
705
  /** @internal */
709
706
  export const MaritalStatus$inboundSchema: z.ZodType<
710
707
  MaritalStatus,
711
708
  z.ZodTypeDef,
712
709
  unknown
713
- > = z
714
- .union([
715
- z.nativeEnum(MaritalStatus),
716
- z.string().transform(catchUnrecognizedEnum),
717
- ]);
710
+ > = openEnums.inboundSchema(MaritalStatus);
718
711
 
719
712
  /** @internal */
720
713
  export const EmploymentStatus$inboundSchema: z.ZodType<
721
714
  EmploymentStatus,
722
715
  z.ZodTypeDef,
723
716
  unknown
724
- > = z
725
- .union([
726
- z.nativeEnum(EmploymentStatus),
727
- z.string().transform(catchUnrecognizedEnum),
728
- ]);
717
+ > = openEnums.inboundSchema(EmploymentStatus);
729
718
 
730
719
  /** @internal */
731
720
  export const GetHrisEmployeesPositiveResponseEmploymentType$inboundSchema:
@@ -733,11 +722,7 @@ export const GetHrisEmployeesPositiveResponseEmploymentType$inboundSchema:
733
722
  GetHrisEmployeesPositiveResponseEmploymentType,
734
723
  z.ZodTypeDef,
735
724
  unknown
736
- > = z
737
- .union([
738
- z.nativeEnum(GetHrisEmployeesPositiveResponseEmploymentType),
739
- z.string().transform(catchUnrecognizedEnum),
740
- ]);
725
+ > = openEnums.inboundSchema(GetHrisEmployeesPositiveResponseEmploymentType);
741
726
 
742
727
  /** @internal */
743
728
  export const HomeAddress$inboundSchema: z.ZodType<
@@ -820,11 +805,7 @@ export const GetHrisEmployeesPositiveResponsePayPeriod$inboundSchema: z.ZodType<
820
805
  GetHrisEmployeesPositiveResponsePayPeriod,
821
806
  z.ZodTypeDef,
822
807
  unknown
823
- > = z
824
- .union([
825
- z.nativeEnum(GetHrisEmployeesPositiveResponsePayPeriod),
826
- z.string().transform(catchUnrecognizedEnum),
827
- ]);
808
+ > = openEnums.inboundSchema(GetHrisEmployeesPositiveResponsePayPeriod);
828
809
 
829
810
  /** @internal */
830
811
  export const GetHrisEmployeesPositiveResponsePayFrequency$inboundSchema:
@@ -832,22 +813,14 @@ export const GetHrisEmployeesPositiveResponsePayFrequency$inboundSchema:
832
813
  GetHrisEmployeesPositiveResponsePayFrequency,
833
814
  z.ZodTypeDef,
834
815
  unknown
835
- > = z
836
- .union([
837
- z.nativeEnum(GetHrisEmployeesPositiveResponsePayFrequency),
838
- z.string().transform(catchUnrecognizedEnum),
839
- ]);
816
+ > = openEnums.inboundSchema(GetHrisEmployeesPositiveResponsePayFrequency);
840
817
 
841
818
  /** @internal */
842
819
  export const EmploymentEmploymentType$inboundSchema: z.ZodType<
843
820
  EmploymentEmploymentType,
844
821
  z.ZodTypeDef,
845
822
  unknown
846
- > = z
847
- .union([
848
- z.nativeEnum(EmploymentEmploymentType),
849
- z.string().transform(catchUnrecognizedEnum),
850
- ]);
823
+ > = openEnums.inboundSchema(EmploymentEmploymentType);
851
824
 
852
825
  /** @internal */
853
826
  export const Employment$inboundSchema: z.ZodType<
@@ -936,11 +909,7 @@ export const ManagerEmploymentStatus$inboundSchema: z.ZodType<
936
909
  ManagerEmploymentStatus,
937
910
  z.ZodTypeDef,
938
911
  unknown
939
- > = z
940
- .union([
941
- z.nativeEnum(ManagerEmploymentStatus),
942
- z.string().transform(catchUnrecognizedEnum),
943
- ]);
912
+ > = openEnums.inboundSchema(ManagerEmploymentStatus);
944
913
 
945
914
  /** @internal */
946
915
  export const Manager$inboundSchema: z.ZodType<Manager, z.ZodTypeDef, unknown> =
@@ -949,6 +918,7 @@ export const Manager$inboundSchema: z.ZodType<Manager, z.ZodTypeDef, unknown> =
949
918
  last_name: z.nullable(z.string()),
950
919
  display_full_name: z.nullable(z.string()),
951
920
  id: z.string(),
921
+ employee_number: z.nullable(z.string()),
952
922
  work_email: z.nullable(z.string()).optional(),
953
923
  remote_id: z.string(),
954
924
  employment_status: z.nullable(ManagerEmploymentStatus$inboundSchema)
@@ -4,7 +4,8 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { OpenEnum } from "../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../types/fp.js";
9
10
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
11
 
@@ -154,11 +155,7 @@ export const GetHrisEmploymentsPositiveResponsePayPeriod$inboundSchema:
154
155
  GetHrisEmploymentsPositiveResponsePayPeriod,
155
156
  z.ZodTypeDef,
156
157
  unknown
157
- > = z
158
- .union([
159
- z.nativeEnum(GetHrisEmploymentsPositiveResponsePayPeriod),
160
- z.string().transform(catchUnrecognizedEnum),
161
- ]);
158
+ > = openEnums.inboundSchema(GetHrisEmploymentsPositiveResponsePayPeriod);
162
159
 
163
160
  /** @internal */
164
161
  export const GetHrisEmploymentsPositiveResponsePayFrequency$inboundSchema:
@@ -166,11 +163,7 @@ export const GetHrisEmploymentsPositiveResponsePayFrequency$inboundSchema:
166
163
  GetHrisEmploymentsPositiveResponsePayFrequency,
167
164
  z.ZodTypeDef,
168
165
  unknown
169
- > = z
170
- .union([
171
- z.nativeEnum(GetHrisEmploymentsPositiveResponsePayFrequency),
172
- z.string().transform(catchUnrecognizedEnum),
173
- ]);
166
+ > = openEnums.inboundSchema(GetHrisEmploymentsPositiveResponsePayFrequency);
174
167
 
175
168
  /** @internal */
176
169
  export const GetHrisEmploymentsPositiveResponseEmploymentType$inboundSchema:
@@ -178,11 +171,7 @@ export const GetHrisEmploymentsPositiveResponseEmploymentType$inboundSchema:
178
171
  GetHrisEmploymentsPositiveResponseEmploymentType,
179
172
  z.ZodTypeDef,
180
173
  unknown
181
- > = z
182
- .union([
183
- z.nativeEnum(GetHrisEmploymentsPositiveResponseEmploymentType),
184
- z.string().transform(catchUnrecognizedEnum),
185
- ]);
174
+ > = openEnums.inboundSchema(GetHrisEmploymentsPositiveResponseEmploymentType);
186
175
 
187
176
  /** @internal */
188
177
  export const GetHrisEmploymentsPositiveResponseResult$inboundSchema: z.ZodType<
@@ -172,6 +172,8 @@ export const IntegrationTool = {
172
172
  Absenceio: "absenceio",
173
173
  Manatal: "manatal",
174
174
  Avionte: "avionte",
175
+ A3innuvanomina: "a3innuvanomina",
176
+ Mhmhr: "mhmhr",
175
177
  Scim: "scim",
176
178
  Softgardenpartner: "softgardenpartner",
177
179
  Datevhr: "datevhr",
@@ -4,7 +4,8 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { catchUnrecognizedEnum, ClosedEnum, OpenEnum } from "../types/enums.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../types/fp.js";
9
10
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
11
 
@@ -124,11 +125,7 @@ export const PostHrisAbsencesPositiveResponseStatus$inboundSchema: z.ZodType<
124
125
  PostHrisAbsencesPositiveResponseStatus,
125
126
  z.ZodTypeDef,
126
127
  unknown
127
- > = z
128
- .union([
129
- z.nativeEnum(PostHrisAbsencesPositiveResponseStatus),
130
- z.string().transform(catchUnrecognizedEnum),
131
- ]);
128
+ > = openEnums.inboundSchema(PostHrisAbsencesPositiveResponseStatus);
132
129
 
133
130
  /** @internal */
134
131
  export const PostHrisAbsencesPositiveResponseData$inboundSchema: z.ZodType<
@@ -12,6 +12,14 @@ export type PostHrisEmployeesFormPositiveResponseData = {
12
12
  * The Kombo id of the created employee. If null, we only created a pre-hire which shows up in the next sync after a successful onboarding.
13
13
  */
14
14
  id: string | null;
15
+ /**
16
+ * The raw ID of the created employee in the remote system. This is only populated when `id` is set (i.e., when a full employee was created). For pre-hires, use `prehire_id` instead.
17
+ */
18
+ remote_id: string | null;
19
+ /**
20
+ * The temporary ID returned by the remote system when creating a pre-hire. This ID may change or become invalid when the pre-hire becomes a full employee. Only populated when `id` is null.
21
+ */
22
+ prehire_id: string | null;
15
23
  };
16
24
 
17
25
  export type PostHrisEmployeesFormPositiveResponseWarning = {
@@ -34,6 +42,8 @@ export const PostHrisEmployeesFormPositiveResponseData$inboundSchema: z.ZodType<
34
42
  unknown
35
43
  > = z.object({
36
44
  id: z.nullable(z.string()),
45
+ remote_id: z.nullable(z.string()),
46
+ prehire_id: z.nullable(z.string()),
37
47
  });
38
48
 
39
49
  export function postHrisEmployeesFormPositiveResponseDataFromJSON(
@@ -97,6 +97,7 @@ export class General extends ClientSDK {
97
97
  * |UKG Pro|`ukgpro/recruting`|[UKG Pro's Recruiting API](https://developer.ukg.com/hcm/reference/retrieveapplications). We automatically authenticate all requests and use `https://\{hostname\}/talent/recruiting/v2/\{tenantalias\}/api` as the base URL.|
98
98
  * |UKG Pro|`ukgpro/default`|[UKG Pro's HRIS API](https://developer.ukg.com/hcm/reference/get_personnel-v1-person-details). We automatically authenticate all requests and use `https://\{hostname\}` as the base URL.|
99
99
  * |UKG Ready|`ukgready/api`|UKG Ready [API](https://secure.saashr.com/ta/docs/rest/public/). We automatically authenticate all requests using the provided credentials and use `https://\{api_domain\}` as the base URL.|
100
+ * |UKG Ready|`ukgready/api`|UKG Ready [API](https://secure.saashr.com/ta/docs/rest/public/). We automatically authenticate all requests using the provided credentials and use `https://\{api_domain\}` as the base URL.|
100
101
  * |ADP Workforce Now|`adpworkforcenow/default`|[ADP Workforce Now API v2](https://developers.adp.com/build/api-explorer/hcm-offrg-wfn). We automatically authenticate all requests and use the correct subdomain.|
101
102
  * |Taleo|`taleo/soap`|[Taleo's API](https://docs.oracle.com/en/cloud/saas/taleo-enterprise/23b/otwsu/c-taleoapi.html). We automatically authenticate all requests and use 'https://\{your-subdomain\}.taleo.net/enterprise/soap' as base URL.|
102
103
  * |rexx systems|`rexx/default`|Rexx's HRIS export API. There is only one endpoint: `Get /`|
@@ -121,6 +122,7 @@ export class General extends ClientSDK {
121
122
  * |Microsoft Azure AD|`azuread/v1`|[AzureAD's API](https://learn.microsoft.com/en-us/graph/api/resources/identity-network-access-overview?view=graph-rest-1.0). We automatically authenticate all requests.|
122
123
  * |Google Workspace|`googleworkspace/people`|[Googles's API](https://developers.google.com/people/api/rest). We automatically authenticate all requests and use 'https://people.googleapis.com' as the base URL.|
123
124
  * |Google Workspace|`googleworkspace/admin`|[Googles's API](https://developers.google.com/admin-sdk/directory/reference/rest). We automatically authenticate all requests and use 'https://admin.googleapis.com' as the base URL.|
125
+ * |Nmbrs|`nmbrs/soap`|[Nmbrs SOAP API](https://api.nmbrs.nl/soap/v3/). We automatically authenticate all requests and use `https://api.nmbrs.nl/soap/v3/` as the base URL. Set `data` to your raw XML string (the content that will be placed inside the `\<soap:Body\>` tag). Use `/` as your `path`, as we will always send requests to `https://api.nmbrs.nl/soap/v3/\{service_name\}.asmx`. Set your `method` to `POST`. You need to specify the `api_options` object and set `service_name` to the name of the service you want to call. Available services include `EmployeeService` and `CompanyService`.|
124
126
  * |Pinpoint|`pinpoint/v1`|Pinpoint's [JSON:API](https://developers.pinpointhq.com/docs). We automatically authenticate all requests using the `X-API-KEY` header and use `https://\{subdomain\}.pinpointhq.com/api/v1` as the base URL.|
125
127
  * |d.vinci|`dvinci/rest-api`|The [DVinci REST API](https://static.dvinci-easy.com/files/d.vinci%20rest-api.html). All requests are authenticated by Kombo and use `https://\{dvinci_domain\}/restApi/` as the base URL.|
126
128
  * |d.vinci|`dvinci/apply-api`|The [DVinci Apply API](https://static.dvinci-easy.com/files/d.vinci%20application-apply-api.html). All requests are authenticated by Kombo and use `https://\{dvinci_domain\}/p/\{portal_path\}/` as the base URL.|
@@ -198,6 +200,7 @@ export class General extends ClientSDK {
198
200
  * |Manatal|`manatal/open-api-v3`|[Manatal's Open API v3](https://developers.manatal.com/reference/getting-started). We automatically authenticate all requests and use `https://api.manatal.com/open/v3` as the base URL.|
199
201
  * |Manatal|`manatal/career-page`|Manatal's Career Page API. We use `https://api.manatal.com/open/v3/career-page/\{client_slug\}` as the base URL.|
200
202
  * |Avionté|`avionte/front-office-v1`|Avionte's API. We automatically authenticate all requests and use `https://api.avionte.com/front-office/v1` as the base URL. Documentation for the BOLD Front Office API: https://developer.avionte.com/reference/get-all-talent-tags|
203
+ * |a3innuva Nómina|`a3innuvanomina/laboral`|a3innuva Nómina API [docs](https://a3developers.wolterskluwer.es/). Requests are automatically authenticated using OAuth access tokens (refreshed when needed). Base URL: `https://a3api.wolterskluwer.es/Laboral/api`.|
201
204
  * |DATEV|`datevhr/hr-exports`|DATEV's [hr-exports](https://developer.datev.de/en/product-detail/hr-exports/1.0.0/overview). We automatically authenticate all requests and use `https://hr-exports.api.datev.de/\{platform|platform-sandbox\}/v1/clients/\{client-id\}` as the base URL.|
202
205
  * |DATEV|`datevhr/hr:payrollreports`|DATEV's [hr:payrollreports](https://developer.datev.de/en/product-detail/hr-payrollreports/2.0.0/overview) API. We automatically authenticate all requests and use `https://hr-payrollreports.api.datev.de/\{platform|platform-sandbox\}/v1/clients/\{client-id\}/` as the base URL.|
203
206
  * |DATEV|`datevhr/eau`|DATEV's [eau](https://developer.datev.de/en/product-detail/eau-api/1.0.0/overview) API. We automatically authenticate all requests and use `https://eau.api.datev.de/\{platform|platform-sandbox\}/v1/clients/\{client-id\}/` as the base URL.|
@@ -2,15 +2,64 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import * as z from "zod/v3";
6
+
5
7
  declare const __brand: unique symbol;
6
8
  export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
9
+ export type ClosedEnum<T extends Readonly<Record<string, string | number>>> =
10
+ T[keyof T];
11
+ export type OpenEnum<T extends Readonly<Record<string, string | number>>> =
12
+ | T[keyof T]
13
+ | Unrecognized<T[keyof T] extends number ? number : string>;
7
14
 
8
- export function catchUnrecognizedEnum<T>(value: T): Unrecognized<T> {
15
+ function unrecognized<T>(value: T): Unrecognized<T> {
16
+ unrecognizedCount++;
9
17
  return value as Unrecognized<T>;
10
18
  }
11
19
 
12
- type Prettify<T> = { [K in keyof T]: T[K] } & {};
13
- export type ClosedEnum<T> = T[keyof T];
14
- export type OpenEnum<T> =
15
- | Prettify<T[keyof T]>
16
- | Unrecognized<T[keyof T] extends number ? number : string>;
20
+ let unrecognizedCount = 0;
21
+ let refCount = 0;
22
+ export function unrecognizedCounter() {
23
+ refCount++;
24
+ const start = unrecognizedCount;
25
+ return {
26
+ count: () => {
27
+ const count = unrecognizedCount - start;
28
+ if (--refCount === 0) unrecognizedCount = 0;
29
+ return count;
30
+ },
31
+ };
32
+ }
33
+
34
+ export function inboundSchema<T extends Record<string, string>>(
35
+ enumObj: T,
36
+ ): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown> {
37
+ const options = Object.values(enumObj);
38
+ return z.union([
39
+ ...options.map(x => z.literal(x)),
40
+ z.string().transform(x => unrecognized(x)),
41
+ ] as any);
42
+ }
43
+
44
+ export function inboundSchemaInt<T extends Record<string, number | string>>(
45
+ enumObj: T,
46
+ ): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown> {
47
+ // For numeric enums, Object.values returns both numbers and string keys
48
+ const options = Object.values(enumObj).filter(v => typeof v === "number");
49
+ return z.union([
50
+ ...options.map(x => z.literal(x)),
51
+ z.number().int().transform(x => unrecognized(x)),
52
+ ] as any);
53
+ }
54
+
55
+ export function outboundSchema<T extends Record<string, string>>(
56
+ _: T,
57
+ ): z.ZodType<string, z.ZodTypeDef, OpenEnum<T>> {
58
+ return z.string() as any;
59
+ }
60
+
61
+ export function outboundSchemaInt<T extends Record<string, number | string>>(
62
+ _: T,
63
+ ): z.ZodType<number, z.ZodTypeDef, OpenEnum<T>> {
64
+ return z.number().int() as any;
65
+ }
@@ -3,7 +3,6 @@
3
3
  */
4
4
 
5
5
  export { blobLikeSchema, isBlobLike } from "./blobs.js";
6
- export { catchUnrecognizedEnum } from "./enums.js";
7
6
  export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js";
8
7
  export type { Result } from "./fp.js";
9
8
  export type { PageIterator, Paginator } from "./operations.js";