@unified-api/typescript-sdk 2.82.2 → 2.82.3

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 (44) hide show
  1. package/dist/commonjs/lib/config.d.ts +2 -2
  2. package/dist/commonjs/lib/config.js +2 -2
  3. package/dist/commonjs/sdk/models/shared/hrisemployee.d.ts +6 -0
  4. package/dist/commonjs/sdk/models/shared/hrisemployee.d.ts.map +1 -1
  5. package/dist/commonjs/sdk/models/shared/hrisemployee.js +3 -0
  6. package/dist/commonjs/sdk/models/shared/hrisemployee.js.map +1 -1
  7. package/dist/commonjs/sdk/models/shared/hrisemployeerelationship.d.ts +55 -0
  8. package/dist/commonjs/sdk/models/shared/hrisemployeerelationship.d.ts.map +1 -0
  9. package/dist/commonjs/sdk/models/shared/hrisemployeerelationship.js +116 -0
  10. package/dist/commonjs/sdk/models/shared/hrisemployeerelationship.js.map +1 -0
  11. package/dist/commonjs/sdk/models/shared/index.d.ts +2 -0
  12. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  13. package/dist/commonjs/sdk/models/shared/index.js +2 -0
  14. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  15. package/dist/commonjs/sdk/models/shared/propertyhrisemployeerelationshipaddress.d.ts +31 -0
  16. package/dist/commonjs/sdk/models/shared/propertyhrisemployeerelationshipaddress.d.ts.map +1 -0
  17. package/dist/commonjs/sdk/models/shared/propertyhrisemployeerelationshipaddress.js +85 -0
  18. package/dist/commonjs/sdk/models/shared/propertyhrisemployeerelationshipaddress.js.map +1 -0
  19. package/dist/esm/lib/config.d.ts +2 -2
  20. package/dist/esm/lib/config.js +2 -2
  21. package/dist/esm/sdk/models/shared/hrisemployee.d.ts +6 -0
  22. package/dist/esm/sdk/models/shared/hrisemployee.d.ts.map +1 -1
  23. package/dist/esm/sdk/models/shared/hrisemployee.js +3 -0
  24. package/dist/esm/sdk/models/shared/hrisemployee.js.map +1 -1
  25. package/dist/esm/sdk/models/shared/hrisemployeerelationship.d.ts +55 -0
  26. package/dist/esm/sdk/models/shared/hrisemployeerelationship.d.ts.map +1 -0
  27. package/dist/esm/sdk/models/shared/hrisemployeerelationship.js +78 -0
  28. package/dist/esm/sdk/models/shared/hrisemployeerelationship.js.map +1 -0
  29. package/dist/esm/sdk/models/shared/index.d.ts +2 -0
  30. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  31. package/dist/esm/sdk/models/shared/index.js +2 -0
  32. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  33. package/dist/esm/sdk/models/shared/propertyhrisemployeerelationshipaddress.d.ts +31 -0
  34. package/dist/esm/sdk/models/shared/propertyhrisemployeerelationshipaddress.d.ts.map +1 -0
  35. package/dist/esm/sdk/models/shared/propertyhrisemployeerelationshipaddress.js +47 -0
  36. package/dist/esm/sdk/models/shared/propertyhrisemployeerelationshipaddress.js.map +1 -0
  37. package/examples/package-lock.json +1 -1
  38. package/jsr.json +1 -1
  39. package/package.json +1 -1
  40. package/src/lib/config.ts +2 -2
  41. package/src/sdk/models/shared/hrisemployee.ts +13 -0
  42. package/src/sdk/models/shared/hrisemployeerelationship.ts +158 -0
  43. package/src/sdk/models/shared/index.ts +2 -0
  44. package/src/sdk/models/shared/propertyhrisemployeerelationshipaddress.ts +101 -0
@@ -0,0 +1,158 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import * as openEnums from "../../types/enums.js";
9
+ import { OpenEnum } from "../../types/enums.js";
10
+ import { Result as SafeParseResult } from "../../types/fp.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+ import {
13
+ HrisEmail,
14
+ HrisEmail$inboundSchema,
15
+ HrisEmail$Outbound,
16
+ HrisEmail$outboundSchema,
17
+ } from "./hrisemail.js";
18
+ import {
19
+ HrisTelephone,
20
+ HrisTelephone$inboundSchema,
21
+ HrisTelephone$Outbound,
22
+ HrisTelephone$outboundSchema,
23
+ } from "./hristelephone.js";
24
+ import {
25
+ PropertyHrisEmployeerelationshipAddress,
26
+ PropertyHrisEmployeerelationshipAddress$inboundSchema,
27
+ PropertyHrisEmployeerelationshipAddress$Outbound,
28
+ PropertyHrisEmployeerelationshipAddress$outboundSchema,
29
+ } from "./propertyhrisemployeerelationshipaddress.js";
30
+
31
+ export const HrisEmployeerelationshipType = {
32
+ Emergency: "EMERGENCY",
33
+ Spouse: "SPOUSE",
34
+ Child: "CHILD",
35
+ Parent: "PARENT",
36
+ Sibling: "SIBLING",
37
+ Friend: "FRIEND",
38
+ Other: "OTHER",
39
+ } as const;
40
+ export type HrisEmployeerelationshipType = OpenEnum<
41
+ typeof HrisEmployeerelationshipType
42
+ >;
43
+
44
+ export type HrisEmployeerelationship = {
45
+ address?: PropertyHrisEmployeerelationshipAddress | undefined;
46
+ emails?: Array<HrisEmail> | undefined;
47
+ endAt?: Date | undefined;
48
+ firstName?: string | undefined;
49
+ isBeneficiary?: boolean | undefined;
50
+ isDependent?: boolean | undefined;
51
+ lastName?: string | undefined;
52
+ name?: string | undefined;
53
+ startAt?: Date | undefined;
54
+ telephones?: Array<HrisTelephone> | undefined;
55
+ type?: HrisEmployeerelationshipType | undefined;
56
+ };
57
+
58
+ /** @internal */
59
+ export const HrisEmployeerelationshipType$inboundSchema: z.ZodType<
60
+ HrisEmployeerelationshipType,
61
+ z.ZodTypeDef,
62
+ unknown
63
+ > = openEnums.inboundSchema(HrisEmployeerelationshipType);
64
+ /** @internal */
65
+ export const HrisEmployeerelationshipType$outboundSchema: z.ZodType<
66
+ string,
67
+ z.ZodTypeDef,
68
+ HrisEmployeerelationshipType
69
+ > = openEnums.outboundSchema(HrisEmployeerelationshipType);
70
+
71
+ /** @internal */
72
+ export const HrisEmployeerelationship$inboundSchema: z.ZodType<
73
+ HrisEmployeerelationship,
74
+ z.ZodTypeDef,
75
+ unknown
76
+ > = z.object({
77
+ address: PropertyHrisEmployeerelationshipAddress$inboundSchema.optional(),
78
+ emails: z.array(HrisEmail$inboundSchema).optional(),
79
+ end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
80
+ .optional(),
81
+ first_name: z.string().optional(),
82
+ is_beneficiary: z.boolean().optional(),
83
+ is_dependent: z.boolean().optional(),
84
+ last_name: z.string().optional(),
85
+ name: z.string().optional(),
86
+ start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
87
+ .optional(),
88
+ telephones: z.array(HrisTelephone$inboundSchema).optional(),
89
+ type: HrisEmployeerelationshipType$inboundSchema.optional(),
90
+ }).transform((v) => {
91
+ return remap$(v, {
92
+ "end_at": "endAt",
93
+ "first_name": "firstName",
94
+ "is_beneficiary": "isBeneficiary",
95
+ "is_dependent": "isDependent",
96
+ "last_name": "lastName",
97
+ "start_at": "startAt",
98
+ });
99
+ });
100
+ /** @internal */
101
+ export type HrisEmployeerelationship$Outbound = {
102
+ address?: PropertyHrisEmployeerelationshipAddress$Outbound | undefined;
103
+ emails?: Array<HrisEmail$Outbound> | undefined;
104
+ end_at?: string | undefined;
105
+ first_name?: string | undefined;
106
+ is_beneficiary?: boolean | undefined;
107
+ is_dependent?: boolean | undefined;
108
+ last_name?: string | undefined;
109
+ name?: string | undefined;
110
+ start_at?: string | undefined;
111
+ telephones?: Array<HrisTelephone$Outbound> | undefined;
112
+ type?: string | undefined;
113
+ };
114
+
115
+ /** @internal */
116
+ export const HrisEmployeerelationship$outboundSchema: z.ZodType<
117
+ HrisEmployeerelationship$Outbound,
118
+ z.ZodTypeDef,
119
+ HrisEmployeerelationship
120
+ > = z.object({
121
+ address: PropertyHrisEmployeerelationshipAddress$outboundSchema.optional(),
122
+ emails: z.array(HrisEmail$outboundSchema).optional(),
123
+ endAt: z.date().transform(v => v.toISOString()).optional(),
124
+ firstName: z.string().optional(),
125
+ isBeneficiary: z.boolean().optional(),
126
+ isDependent: z.boolean().optional(),
127
+ lastName: z.string().optional(),
128
+ name: z.string().optional(),
129
+ startAt: z.date().transform(v => v.toISOString()).optional(),
130
+ telephones: z.array(HrisTelephone$outboundSchema).optional(),
131
+ type: HrisEmployeerelationshipType$outboundSchema.optional(),
132
+ }).transform((v) => {
133
+ return remap$(v, {
134
+ endAt: "end_at",
135
+ firstName: "first_name",
136
+ isBeneficiary: "is_beneficiary",
137
+ isDependent: "is_dependent",
138
+ lastName: "last_name",
139
+ startAt: "start_at",
140
+ });
141
+ });
142
+
143
+ export function hrisEmployeerelationshipToJSON(
144
+ hrisEmployeerelationship: HrisEmployeerelationship,
145
+ ): string {
146
+ return JSON.stringify(
147
+ HrisEmployeerelationship$outboundSchema.parse(hrisEmployeerelationship),
148
+ );
149
+ }
150
+ export function hrisEmployeerelationshipFromJSON(
151
+ jsonString: string,
152
+ ): SafeParseResult<HrisEmployeerelationship, SDKValidationError> {
153
+ return safeParse(
154
+ jsonString,
155
+ (x) => HrisEmployeerelationship$inboundSchema.parse(JSON.parse(x)),
156
+ `Failed to parse 'HrisEmployeerelationship' from JSON`,
157
+ );
158
+ }
@@ -117,6 +117,7 @@ export * from "./hrisdeduction.js";
117
117
  export * from "./hrisdevice.js";
118
118
  export * from "./hrisemail.js";
119
119
  export * from "./hrisemployee.js";
120
+ export * from "./hrisemployeerelationship.js";
120
121
  export * from "./hrisgroup.js";
121
122
  export * from "./hrislocation.js";
122
123
  export * from "./hrismetadata.js";
@@ -194,6 +195,7 @@ export * from "./propertyenrichpersonaddress.js";
194
195
  export * from "./propertyhriscompanyaddress.js";
195
196
  export * from "./propertyhrisemployeeaddress.js";
196
197
  export * from "./propertyhrisemployeeemployeeroles.js";
198
+ export * from "./propertyhrisemployeerelationshipaddress.js";
197
199
  export * from "./propertyhrislocationaddress.js";
198
200
  export * from "./propertyhrispayslipdeduction.js";
199
201
  export * from "./propertyintegrationcategories.js";
@@ -0,0 +1,101 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type PropertyHrisEmployeerelationshipAddress = {
12
+ address1?: string | undefined;
13
+ address2?: string | undefined;
14
+ city?: string | undefined;
15
+ country?: string | undefined;
16
+ countryCode?: string | undefined;
17
+ postalCode?: string | undefined;
18
+ region?: string | undefined;
19
+ regionCode?: string | undefined;
20
+ };
21
+
22
+ /** @internal */
23
+ export const PropertyHrisEmployeerelationshipAddress$inboundSchema: z.ZodType<
24
+ PropertyHrisEmployeerelationshipAddress,
25
+ z.ZodTypeDef,
26
+ unknown
27
+ > = z.object({
28
+ address1: z.string().optional(),
29
+ address2: z.string().optional(),
30
+ city: z.string().optional(),
31
+ country: z.string().optional(),
32
+ country_code: z.string().optional(),
33
+ postal_code: z.string().optional(),
34
+ region: z.string().optional(),
35
+ region_code: z.string().optional(),
36
+ }).transform((v) => {
37
+ return remap$(v, {
38
+ "country_code": "countryCode",
39
+ "postal_code": "postalCode",
40
+ "region_code": "regionCode",
41
+ });
42
+ });
43
+ /** @internal */
44
+ export type PropertyHrisEmployeerelationshipAddress$Outbound = {
45
+ address1?: string | undefined;
46
+ address2?: string | undefined;
47
+ city?: string | undefined;
48
+ country?: string | undefined;
49
+ country_code?: string | undefined;
50
+ postal_code?: string | undefined;
51
+ region?: string | undefined;
52
+ region_code?: string | undefined;
53
+ };
54
+
55
+ /** @internal */
56
+ export const PropertyHrisEmployeerelationshipAddress$outboundSchema: z.ZodType<
57
+ PropertyHrisEmployeerelationshipAddress$Outbound,
58
+ z.ZodTypeDef,
59
+ PropertyHrisEmployeerelationshipAddress
60
+ > = z.object({
61
+ address1: z.string().optional(),
62
+ address2: z.string().optional(),
63
+ city: z.string().optional(),
64
+ country: z.string().optional(),
65
+ countryCode: z.string().optional(),
66
+ postalCode: z.string().optional(),
67
+ region: z.string().optional(),
68
+ regionCode: z.string().optional(),
69
+ }).transform((v) => {
70
+ return remap$(v, {
71
+ countryCode: "country_code",
72
+ postalCode: "postal_code",
73
+ regionCode: "region_code",
74
+ });
75
+ });
76
+
77
+ export function propertyHrisEmployeerelationshipAddressToJSON(
78
+ propertyHrisEmployeerelationshipAddress:
79
+ PropertyHrisEmployeerelationshipAddress,
80
+ ): string {
81
+ return JSON.stringify(
82
+ PropertyHrisEmployeerelationshipAddress$outboundSchema.parse(
83
+ propertyHrisEmployeerelationshipAddress,
84
+ ),
85
+ );
86
+ }
87
+ export function propertyHrisEmployeerelationshipAddressFromJSON(
88
+ jsonString: string,
89
+ ): SafeParseResult<
90
+ PropertyHrisEmployeerelationshipAddress,
91
+ SDKValidationError
92
+ > {
93
+ return safeParse(
94
+ jsonString,
95
+ (x) =>
96
+ PropertyHrisEmployeerelationshipAddress$inboundSchema.parse(
97
+ JSON.parse(x),
98
+ ),
99
+ `Failed to parse 'PropertyHrisEmployeerelationshipAddress' from JSON`,
100
+ );
101
+ }