@unified-api/typescript-sdk 2.80.6 → 2.80.8

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 (235) hide show
  1. package/README.md +24 -0
  2. package/examples/package-lock.json +1 -1
  3. package/funcs/hrisCreateHrisBenefit.d.ts +15 -0
  4. package/funcs/hrisCreateHrisBenefit.d.ts.map +1 -0
  5. package/funcs/hrisCreateHrisBenefit.js +122 -0
  6. package/funcs/hrisCreateHrisBenefit.js.map +1 -0
  7. package/funcs/hrisCreateHrisDeduction.d.ts +15 -0
  8. package/funcs/hrisCreateHrisDeduction.d.ts.map +1 -0
  9. package/funcs/hrisCreateHrisDeduction.js +122 -0
  10. package/funcs/hrisCreateHrisDeduction.js.map +1 -0
  11. package/funcs/hrisGetHrisBenefit.d.ts +15 -0
  12. package/funcs/hrisGetHrisBenefit.d.ts.map +1 -0
  13. package/funcs/hrisGetHrisBenefit.js +125 -0
  14. package/funcs/hrisGetHrisBenefit.js.map +1 -0
  15. package/funcs/hrisGetHrisDeduction.d.ts +15 -0
  16. package/funcs/hrisGetHrisDeduction.d.ts.map +1 -0
  17. package/funcs/hrisGetHrisDeduction.js +125 -0
  18. package/funcs/hrisGetHrisDeduction.js.map +1 -0
  19. package/funcs/hrisListHrisBenefits.d.ts +15 -0
  20. package/funcs/hrisListHrisBenefits.d.ts.map +1 -0
  21. package/funcs/hrisListHrisBenefits.js +129 -0
  22. package/funcs/hrisListHrisBenefits.js.map +1 -0
  23. package/funcs/hrisListHrisDeductions.d.ts +15 -0
  24. package/funcs/hrisListHrisDeductions.d.ts.map +1 -0
  25. package/funcs/hrisListHrisDeductions.js +132 -0
  26. package/funcs/hrisListHrisDeductions.js.map +1 -0
  27. package/funcs/hrisPatchHrisBenefit.d.ts +15 -0
  28. package/funcs/hrisPatchHrisBenefit.d.ts.map +1 -0
  29. package/funcs/hrisPatchHrisBenefit.js +126 -0
  30. package/funcs/hrisPatchHrisBenefit.js.map +1 -0
  31. package/funcs/hrisPatchHrisDeduction.d.ts +15 -0
  32. package/funcs/hrisPatchHrisDeduction.d.ts.map +1 -0
  33. package/funcs/hrisPatchHrisDeduction.js +126 -0
  34. package/funcs/hrisPatchHrisDeduction.js.map +1 -0
  35. package/funcs/hrisRemoveHrisBenefit.d.ts +14 -0
  36. package/funcs/hrisRemoveHrisBenefit.d.ts.map +1 -0
  37. package/funcs/hrisRemoveHrisBenefit.js +122 -0
  38. package/funcs/hrisRemoveHrisBenefit.js.map +1 -0
  39. package/funcs/hrisRemoveHrisDeduction.d.ts +14 -0
  40. package/funcs/hrisRemoveHrisDeduction.d.ts.map +1 -0
  41. package/funcs/hrisRemoveHrisDeduction.js +122 -0
  42. package/funcs/hrisRemoveHrisDeduction.js.map +1 -0
  43. package/funcs/hrisUpdateHrisBenefit.d.ts +15 -0
  44. package/funcs/hrisUpdateHrisBenefit.d.ts.map +1 -0
  45. package/funcs/hrisUpdateHrisBenefit.js +126 -0
  46. package/funcs/hrisUpdateHrisBenefit.js.map +1 -0
  47. package/funcs/hrisUpdateHrisDeduction.d.ts +15 -0
  48. package/funcs/hrisUpdateHrisDeduction.d.ts.map +1 -0
  49. package/funcs/hrisUpdateHrisDeduction.js +126 -0
  50. package/funcs/hrisUpdateHrisDeduction.js.map +1 -0
  51. package/funcs/messagingListMessagingMessages.js +1 -0
  52. package/funcs/messagingListMessagingMessages.js.map +1 -1
  53. package/jsr.json +1 -1
  54. package/lib/config.d.ts +3 -3
  55. package/lib/config.js +3 -3
  56. package/package.json +1 -1
  57. package/sdk/benefit.d.ts +30 -0
  58. package/sdk/benefit.d.ts.map +1 -0
  59. package/sdk/benefit.js +54 -0
  60. package/sdk/benefit.js.map +1 -0
  61. package/sdk/deduction.d.ts +30 -0
  62. package/sdk/deduction.d.ts.map +1 -0
  63. package/sdk/deduction.js +54 -0
  64. package/sdk/deduction.js.map +1 -0
  65. package/sdk/hris.d.ts +48 -0
  66. package/sdk/hris.d.ts.map +1 -1
  67. package/sdk/hris.js +84 -0
  68. package/sdk/hris.js.map +1 -1
  69. package/sdk/models/operations/createhrisbenefit.d.ts +31 -0
  70. package/sdk/models/operations/createhrisbenefit.d.ts.map +1 -0
  71. package/sdk/models/operations/createhrisbenefit.js +59 -0
  72. package/sdk/models/operations/createhrisbenefit.js.map +1 -0
  73. package/sdk/models/operations/createhrisdeduction.d.ts +31 -0
  74. package/sdk/models/operations/createhrisdeduction.d.ts.map +1 -0
  75. package/sdk/models/operations/createhrisdeduction.js +59 -0
  76. package/sdk/models/operations/createhrisdeduction.js.map +1 -0
  77. package/sdk/models/operations/gethrisbenefit.d.ts +30 -0
  78. package/sdk/models/operations/gethrisbenefit.d.ts.map +1 -0
  79. package/sdk/models/operations/gethrisbenefit.js +57 -0
  80. package/sdk/models/operations/gethrisbenefit.js.map +1 -0
  81. package/sdk/models/operations/gethrisdeduction.d.ts +30 -0
  82. package/sdk/models/operations/gethrisdeduction.d.ts.map +1 -0
  83. package/sdk/models/operations/gethrisdeduction.js +57 -0
  84. package/sdk/models/operations/gethrisdeduction.js.map +1 -0
  85. package/sdk/models/operations/index.d.ts +12 -0
  86. package/sdk/models/operations/index.d.ts.map +1 -1
  87. package/sdk/models/operations/index.js +12 -0
  88. package/sdk/models/operations/index.js.map +1 -1
  89. package/sdk/models/operations/listhrisbenefits.d.ts +48 -0
  90. package/sdk/models/operations/listhrisbenefits.d.ts.map +1 -0
  91. package/sdk/models/operations/listhrisbenefits.js +65 -0
  92. package/sdk/models/operations/listhrisbenefits.js.map +1 -0
  93. package/sdk/models/operations/listhrisdeductions.d.ts +63 -0
  94. package/sdk/models/operations/listhrisdeductions.d.ts.map +1 -0
  95. package/sdk/models/operations/listhrisdeductions.js +71 -0
  96. package/sdk/models/operations/listhrisdeductions.js.map +1 -0
  97. package/sdk/models/operations/listmessagingmessages.d.ts +6 -1
  98. package/sdk/models/operations/listmessagingmessages.d.ts.map +1 -1
  99. package/sdk/models/operations/listmessagingmessages.js +2 -0
  100. package/sdk/models/operations/listmessagingmessages.js.map +1 -1
  101. package/sdk/models/operations/patchhrisbenefit.d.ts +36 -0
  102. package/sdk/models/operations/patchhrisbenefit.d.ts.map +1 -0
  103. package/sdk/models/operations/patchhrisbenefit.js +60 -0
  104. package/sdk/models/operations/patchhrisbenefit.js.map +1 -0
  105. package/sdk/models/operations/patchhrisdeduction.d.ts +36 -0
  106. package/sdk/models/operations/patchhrisdeduction.d.ts.map +1 -0
  107. package/sdk/models/operations/patchhrisdeduction.js +60 -0
  108. package/sdk/models/operations/patchhrisdeduction.js.map +1 -0
  109. package/sdk/models/operations/removehrisbenefit.d.ts +30 -0
  110. package/sdk/models/operations/removehrisbenefit.d.ts.map +1 -0
  111. package/sdk/models/operations/removehrisbenefit.js +68 -0
  112. package/sdk/models/operations/removehrisbenefit.js.map +1 -0
  113. package/sdk/models/operations/removehrisdeduction.d.ts +30 -0
  114. package/sdk/models/operations/removehrisdeduction.d.ts.map +1 -0
  115. package/sdk/models/operations/removehrisdeduction.js +68 -0
  116. package/sdk/models/operations/removehrisdeduction.js.map +1 -0
  117. package/sdk/models/operations/updatehrisbenefit.d.ts +36 -0
  118. package/sdk/models/operations/updatehrisbenefit.d.ts.map +1 -0
  119. package/sdk/models/operations/updatehrisbenefit.js +60 -0
  120. package/sdk/models/operations/updatehrisbenefit.js.map +1 -0
  121. package/sdk/models/operations/updatehrisdeduction.d.ts +36 -0
  122. package/sdk/models/operations/updatehrisdeduction.d.ts.map +1 -0
  123. package/sdk/models/operations/updatehrisdeduction.js +60 -0
  124. package/sdk/models/operations/updatehrisdeduction.js.map +1 -0
  125. package/sdk/models/shared/accountinglineitem.d.ts +5 -0
  126. package/sdk/models/shared/accountinglineitem.d.ts.map +1 -1
  127. package/sdk/models/shared/accountinglineitem.js +7 -0
  128. package/sdk/models/shared/accountinglineitem.js.map +1 -1
  129. package/sdk/models/shared/accountingreference.d.ts +19 -0
  130. package/sdk/models/shared/accountingreference.d.ts.map +1 -0
  131. package/sdk/models/shared/accountingreference.js +60 -0
  132. package/sdk/models/shared/accountingreference.js.map +1 -0
  133. package/sdk/models/shared/hrisbenefit.d.ts +127 -0
  134. package/sdk/models/shared/hrisbenefit.d.ts.map +1 -0
  135. package/sdk/models/shared/hrisbenefit.js +181 -0
  136. package/sdk/models/shared/hrisbenefit.js.map +1 -0
  137. package/sdk/models/shared/hrisdeduction.d.ts +88 -0
  138. package/sdk/models/shared/hrisdeduction.d.ts.map +1 -0
  139. package/sdk/models/shared/hrisdeduction.js +148 -0
  140. package/sdk/models/shared/hrisdeduction.js.map +1 -0
  141. package/sdk/models/shared/hrispayslip.d.ts +5 -0
  142. package/sdk/models/shared/hrispayslip.d.ts.map +1 -1
  143. package/sdk/models/shared/hrispayslip.js +2 -0
  144. package/sdk/models/shared/hrispayslip.js.map +1 -1
  145. package/sdk/models/shared/index.d.ts +4 -0
  146. package/sdk/models/shared/index.d.ts.map +1 -1
  147. package/sdk/models/shared/index.js +4 -0
  148. package/sdk/models/shared/index.js.map +1 -1
  149. package/sdk/models/shared/integrationsupport.d.ts +27 -0
  150. package/sdk/models/shared/integrationsupport.d.ts.map +1 -1
  151. package/sdk/models/shared/integrationsupport.js +33 -5
  152. package/sdk/models/shared/integrationsupport.js.map +1 -1
  153. package/sdk/models/shared/messagingmessage.d.ts +2 -0
  154. package/sdk/models/shared/messagingmessage.d.ts.map +1 -1
  155. package/sdk/models/shared/messagingmessage.js +4 -0
  156. package/sdk/models/shared/messagingmessage.js.map +1 -1
  157. package/sdk/models/shared/propertyconnectionpermissions.d.ts +4 -0
  158. package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  159. package/sdk/models/shared/propertyconnectionpermissions.js +4 -0
  160. package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  161. package/sdk/models/shared/propertyhrispayslipdeduction.d.ts +60 -0
  162. package/sdk/models/shared/propertyhrispayslipdeduction.d.ts.map +1 -0
  163. package/sdk/models/shared/propertyhrispayslipdeduction.js +110 -0
  164. package/sdk/models/shared/propertyhrispayslipdeduction.js.map +1 -0
  165. package/sdk/models/shared/uccall.d.ts +3 -0
  166. package/sdk/models/shared/uccall.d.ts.map +1 -1
  167. package/sdk/models/shared/uccall.js +4 -0
  168. package/sdk/models/shared/uccall.js.map +1 -1
  169. package/sdk/models/shared/webhook.d.ts +2 -0
  170. package/sdk/models/shared/webhook.d.ts.map +1 -1
  171. package/sdk/models/shared/webhook.js +2 -0
  172. package/sdk/models/shared/webhook.js.map +1 -1
  173. package/sdk/sdk.d.ts +6 -0
  174. package/sdk/sdk.d.ts.map +1 -1
  175. package/sdk/sdk.js +8 -0
  176. package/sdk/sdk.js.map +1 -1
  177. package/sdk/types/enums.d.ts +1 -8
  178. package/sdk/types/enums.d.ts.map +1 -1
  179. package/sdk/types/enums.js +3 -21
  180. package/sdk/types/enums.js.map +1 -1
  181. package/sdk/types/index.d.ts +2 -1
  182. package/sdk/types/index.d.ts.map +1 -1
  183. package/sdk/types/index.js +15 -0
  184. package/sdk/types/index.js.map +1 -1
  185. package/sdk/types/unrecognized.d.ts +10 -0
  186. package/sdk/types/unrecognized.d.ts.map +1 -0
  187. package/sdk/types/unrecognized.js +26 -0
  188. package/sdk/types/unrecognized.js.map +1 -0
  189. package/src/funcs/hrisCreateHrisBenefit.ts +170 -0
  190. package/src/funcs/hrisCreateHrisDeduction.ts +171 -0
  191. package/src/funcs/hrisGetHrisBenefit.ts +173 -0
  192. package/src/funcs/hrisGetHrisDeduction.ts +173 -0
  193. package/src/funcs/hrisListHrisBenefits.ts +177 -0
  194. package/src/funcs/hrisListHrisDeductions.ts +180 -0
  195. package/src/funcs/hrisPatchHrisBenefit.ts +174 -0
  196. package/src/funcs/hrisPatchHrisDeduction.ts +174 -0
  197. package/src/funcs/hrisRemoveHrisBenefit.ts +175 -0
  198. package/src/funcs/hrisRemoveHrisDeduction.ts +176 -0
  199. package/src/funcs/hrisUpdateHrisBenefit.ts +174 -0
  200. package/src/funcs/hrisUpdateHrisDeduction.ts +175 -0
  201. package/src/funcs/messagingListMessagingMessages.ts +1 -0
  202. package/src/lib/config.ts +3 -3
  203. package/src/sdk/benefit.ts +100 -0
  204. package/src/sdk/deduction.ts +100 -0
  205. package/src/sdk/hris.ts +180 -0
  206. package/src/sdk/models/operations/createhrisbenefit.ts +59 -0
  207. package/src/sdk/models/operations/createhrisdeduction.ts +59 -0
  208. package/src/sdk/models/operations/gethrisbenefit.ts +57 -0
  209. package/src/sdk/models/operations/gethrisdeduction.ts +57 -0
  210. package/src/sdk/models/operations/index.ts +12 -0
  211. package/src/sdk/models/operations/listhrisbenefits.ts +83 -0
  212. package/src/sdk/models/operations/listhrisdeductions.ts +104 -0
  213. package/src/sdk/models/operations/listmessagingmessages.ts +8 -1
  214. package/src/sdk/models/operations/patchhrisbenefit.ts +65 -0
  215. package/src/sdk/models/operations/patchhrisdeduction.ts +65 -0
  216. package/src/sdk/models/operations/removehrisbenefit.ts +75 -0
  217. package/src/sdk/models/operations/removehrisdeduction.ts +75 -0
  218. package/src/sdk/models/operations/updatehrisbenefit.ts +65 -0
  219. package/src/sdk/models/operations/updatehrisdeduction.ts +65 -0
  220. package/src/sdk/models/shared/accountinglineitem.ts +16 -0
  221. package/src/sdk/models/shared/accountingreference.ts +55 -0
  222. package/src/sdk/models/shared/hrisbenefit.ts +255 -0
  223. package/src/sdk/models/shared/hrisdeduction.ts +202 -0
  224. package/src/sdk/models/shared/hrispayslip.ts +9 -0
  225. package/src/sdk/models/shared/index.ts +4 -0
  226. package/src/sdk/models/shared/integrationsupport.ts +54 -0
  227. package/src/sdk/models/shared/messagingmessage.ts +6 -0
  228. package/src/sdk/models/shared/propertyconnectionpermissions.ts +4 -0
  229. package/src/sdk/models/shared/propertyhrispayslipdeduction.ts +135 -0
  230. package/src/sdk/models/shared/uccall.ts +6 -0
  231. package/src/sdk/models/shared/webhook.ts +2 -0
  232. package/src/sdk/sdk.ts +12 -0
  233. package/src/sdk/types/enums.ts +1 -21
  234. package/src/sdk/types/index.ts +2 -1
  235. package/src/sdk/types/unrecognized.ts +27 -0
@@ -0,0 +1,65 @@
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 * as shared from "../shared/index.js";
8
+
9
+ export type UpdateHrisDeductionRequest = {
10
+ /**
11
+ * Employee-specific deduction/benefit enrolment.
12
+ */
13
+ hrisDeduction: shared.HrisDeduction;
14
+ /**
15
+ * ID of the connection
16
+ */
17
+ connectionId: string;
18
+ /**
19
+ * Comma-delimited fields to return
20
+ */
21
+ fields?: Array<string> | undefined;
22
+ /**
23
+ * ID of the Deduction
24
+ */
25
+ id: string;
26
+ /**
27
+ * Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
28
+ */
29
+ raw?: string | undefined;
30
+ };
31
+
32
+ /** @internal */
33
+ export type UpdateHrisDeductionRequest$Outbound = {
34
+ HrisDeduction: shared.HrisDeduction$Outbound;
35
+ connection_id: string;
36
+ fields?: Array<string> | undefined;
37
+ id: string;
38
+ raw?: string | undefined;
39
+ };
40
+
41
+ /** @internal */
42
+ export const UpdateHrisDeductionRequest$outboundSchema: z.ZodType<
43
+ UpdateHrisDeductionRequest$Outbound,
44
+ z.ZodTypeDef,
45
+ UpdateHrisDeductionRequest
46
+ > = z.object({
47
+ hrisDeduction: shared.HrisDeduction$outboundSchema,
48
+ connectionId: z.string(),
49
+ fields: z.array(z.string()).optional(),
50
+ id: z.string(),
51
+ raw: z.string().optional(),
52
+ }).transform((v) => {
53
+ return remap$(v, {
54
+ hrisDeduction: "HrisDeduction",
55
+ connectionId: "connection_id",
56
+ });
57
+ });
58
+
59
+ export function updateHrisDeductionRequestToJSON(
60
+ updateHrisDeductionRequest: UpdateHrisDeductionRequest,
61
+ ): string {
62
+ return JSON.stringify(
63
+ UpdateHrisDeductionRequest$outboundSchema.parse(updateHrisDeductionRequest),
64
+ );
65
+ }
@@ -7,6 +7,12 @@ import { remap as remap$ } from "../../../lib/primitives.js";
7
7
  import { safeParse } from "../../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ AccountingReference,
12
+ AccountingReference$inboundSchema,
13
+ AccountingReference$Outbound,
14
+ AccountingReference$outboundSchema,
15
+ } from "./accountingreference.js";
10
16
 
11
17
  export type AccountingLineitem = {
12
18
  accountId?: string | undefined;
@@ -18,6 +24,8 @@ export type AccountingLineitem = {
18
24
  itemId?: string | undefined;
19
25
  itemName?: string | undefined;
20
26
  itemSku?: string | undefined;
27
+ itemVariants?: Array<AccountingReference> | undefined;
28
+ locations?: Array<AccountingReference> | undefined;
21
29
  notes?: string | undefined;
22
30
  refundAmount?: number | undefined;
23
31
  refundedAt?: Date | undefined;
@@ -45,6 +53,8 @@ export const AccountingLineitem$inboundSchema: z.ZodType<
45
53
  item_id: z.string().optional(),
46
54
  item_name: z.string().optional(),
47
55
  item_sku: z.string().optional(),
56
+ item_variants: z.array(AccountingReference$inboundSchema).optional(),
57
+ locations: z.array(AccountingReference$inboundSchema).optional(),
48
58
  notes: z.string().optional(),
49
59
  refund_amount: z.number().optional(),
50
60
  refunded_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
@@ -66,6 +76,7 @@ export const AccountingLineitem$inboundSchema: z.ZodType<
66
76
  "item_id": "itemId",
67
77
  "item_name": "itemName",
68
78
  "item_sku": "itemSku",
79
+ "item_variants": "itemVariants",
69
80
  "refund_amount": "refundAmount",
70
81
  "refunded_at": "refundedAt",
71
82
  "tax_amount": "taxAmount",
@@ -87,6 +98,8 @@ export type AccountingLineitem$Outbound = {
87
98
  item_id?: string | undefined;
88
99
  item_name?: string | undefined;
89
100
  item_sku?: string | undefined;
101
+ item_variants?: Array<AccountingReference$Outbound> | undefined;
102
+ locations?: Array<AccountingReference$Outbound> | undefined;
90
103
  notes?: string | undefined;
91
104
  refund_amount?: number | undefined;
92
105
  refunded_at?: string | undefined;
@@ -113,6 +126,8 @@ export const AccountingLineitem$outboundSchema: z.ZodType<
113
126
  itemId: z.string().optional(),
114
127
  itemName: z.string().optional(),
115
128
  itemSku: z.string().optional(),
129
+ itemVariants: z.array(AccountingReference$outboundSchema).optional(),
130
+ locations: z.array(AccountingReference$outboundSchema).optional(),
116
131
  notes: z.string().optional(),
117
132
  refundAmount: z.number().optional(),
118
133
  refundedAt: z.date().transform(v => v.toISOString()).optional(),
@@ -132,6 +147,7 @@ export const AccountingLineitem$outboundSchema: z.ZodType<
132
147
  itemId: "item_id",
133
148
  itemName: "item_name",
134
149
  itemSku: "item_sku",
150
+ itemVariants: "item_variants",
135
151
  refundAmount: "refund_amount",
136
152
  refundedAt: "refunded_at",
137
153
  taxAmount: "tax_amount",
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type AccountingReference = {
11
+ id?: string | undefined;
12
+ name?: string | undefined;
13
+ };
14
+
15
+ /** @internal */
16
+ export const AccountingReference$inboundSchema: z.ZodType<
17
+ AccountingReference,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ id: z.string().optional(),
22
+ name: z.string().optional(),
23
+ });
24
+ /** @internal */
25
+ export type AccountingReference$Outbound = {
26
+ id?: string | undefined;
27
+ name?: string | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export const AccountingReference$outboundSchema: z.ZodType<
32
+ AccountingReference$Outbound,
33
+ z.ZodTypeDef,
34
+ AccountingReference
35
+ > = z.object({
36
+ id: z.string().optional(),
37
+ name: z.string().optional(),
38
+ });
39
+
40
+ export function accountingReferenceToJSON(
41
+ accountingReference: AccountingReference,
42
+ ): string {
43
+ return JSON.stringify(
44
+ AccountingReference$outboundSchema.parse(accountingReference),
45
+ );
46
+ }
47
+ export function accountingReferenceFromJSON(
48
+ jsonString: string,
49
+ ): SafeParseResult<AccountingReference, SDKValidationError> {
50
+ return safeParse(
51
+ jsonString,
52
+ (x) => AccountingReference$inboundSchema.parse(JSON.parse(x)),
53
+ `Failed to parse 'AccountingReference' from JSON`,
54
+ );
55
+ }
@@ -0,0 +1,255 @@
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
+
13
+ export const CoverageLevel = {
14
+ EmployeeOnly: "EMPLOYEE_ONLY",
15
+ EmployeeSpouse: "EMPLOYEE_SPOUSE",
16
+ EmployeeChild: "EMPLOYEE_CHILD",
17
+ EmployeeChildren: "EMPLOYEE_CHILDREN",
18
+ EmployeeFamily: "EMPLOYEE_FAMILY",
19
+ Family: "FAMILY",
20
+ Other: "OTHER",
21
+ } as const;
22
+ export type CoverageLevel = OpenEnum<typeof CoverageLevel>;
23
+
24
+ export const EmployerContributionType = {
25
+ Percentage: "PERCENTAGE",
26
+ Fixed: "FIXED",
27
+ } as const;
28
+ export type EmployerContributionType = OpenEnum<
29
+ typeof EmployerContributionType
30
+ >;
31
+
32
+ export const HrisBenefitFrequency = {
33
+ OneTime: "ONE_TIME",
34
+ Day: "DAY",
35
+ Quarter: "QUARTER",
36
+ Year: "YEAR",
37
+ Hour: "HOUR",
38
+ Month: "MONTH",
39
+ Week: "WEEK",
40
+ } as const;
41
+ export type HrisBenefitFrequency = OpenEnum<typeof HrisBenefitFrequency>;
42
+
43
+ export const Tax = {
44
+ PreTax: "PRE_TAX",
45
+ PostTax: "POST_TAX",
46
+ Taxable: "TAXABLE",
47
+ NonTaxable: "NON_TAXABLE",
48
+ Tax: "TAX",
49
+ } as const;
50
+ export type Tax = OpenEnum<typeof Tax>;
51
+
52
+ export const HrisBenefitType = {
53
+ Retirement: "RETIREMENT",
54
+ Health: "HEALTH",
55
+ Dental: "DENTAL",
56
+ Vision: "VISION",
57
+ Life: "LIFE",
58
+ Hsa: "HSA",
59
+ Fsa: "FSA",
60
+ ShortTermDisability: "SHORT_TERM_DISABILITY",
61
+ LongTermDisability: "LONG_TERM_DISABILITY",
62
+ WorkersComp: "WORKERS_COMP",
63
+ HousingStipend: "HOUSING_STIPEND",
64
+ EmployerTaxContribution: "EMPLOYER_TAX_CONTRIBUTION",
65
+ Garnishment: "GARNISHMENT",
66
+ LoanRepayment: "LOAN_REPAYMENT",
67
+ CharitableContribution: "CHARITABLE_CONTRIBUTION",
68
+ Other: "OTHER",
69
+ } as const;
70
+ export type HrisBenefitType = OpenEnum<typeof HrisBenefitType>;
71
+
72
+ /**
73
+ * Company-wide benefit plans available to employees.
74
+ */
75
+ export type HrisBenefit = {
76
+ companyId?: string | undefined;
77
+ coverageLevel?: CoverageLevel | undefined;
78
+ createdAt?: Date | undefined;
79
+ currency?: string | undefined;
80
+ description?: string | undefined;
81
+ employerContributionAmount?: number | undefined;
82
+ employerContributionMaxAmount?: number | undefined;
83
+ employerContributionType?: EmployerContributionType | undefined;
84
+ frequency?: HrisBenefitFrequency | undefined;
85
+ id?: string | undefined;
86
+ isActive?: boolean | undefined;
87
+ name?: string | undefined;
88
+ raw?: { [k: string]: any } | undefined;
89
+ tax?: Tax | undefined;
90
+ type?: HrisBenefitType | undefined;
91
+ updatedAt?: Date | undefined;
92
+ };
93
+
94
+ /** @internal */
95
+ export const CoverageLevel$inboundSchema: z.ZodType<
96
+ CoverageLevel,
97
+ z.ZodTypeDef,
98
+ unknown
99
+ > = openEnums.inboundSchema(CoverageLevel);
100
+ /** @internal */
101
+ export const CoverageLevel$outboundSchema: z.ZodType<
102
+ string,
103
+ z.ZodTypeDef,
104
+ CoverageLevel
105
+ > = openEnums.outboundSchema(CoverageLevel);
106
+
107
+ /** @internal */
108
+ export const EmployerContributionType$inboundSchema: z.ZodType<
109
+ EmployerContributionType,
110
+ z.ZodTypeDef,
111
+ unknown
112
+ > = openEnums.inboundSchema(EmployerContributionType);
113
+ /** @internal */
114
+ export const EmployerContributionType$outboundSchema: z.ZodType<
115
+ string,
116
+ z.ZodTypeDef,
117
+ EmployerContributionType
118
+ > = openEnums.outboundSchema(EmployerContributionType);
119
+
120
+ /** @internal */
121
+ export const HrisBenefitFrequency$inboundSchema: z.ZodType<
122
+ HrisBenefitFrequency,
123
+ z.ZodTypeDef,
124
+ unknown
125
+ > = openEnums.inboundSchema(HrisBenefitFrequency);
126
+ /** @internal */
127
+ export const HrisBenefitFrequency$outboundSchema: z.ZodType<
128
+ string,
129
+ z.ZodTypeDef,
130
+ HrisBenefitFrequency
131
+ > = openEnums.outboundSchema(HrisBenefitFrequency);
132
+
133
+ /** @internal */
134
+ export const Tax$inboundSchema: z.ZodType<Tax, z.ZodTypeDef, unknown> =
135
+ openEnums.inboundSchema(Tax);
136
+ /** @internal */
137
+ export const Tax$outboundSchema: z.ZodType<string, z.ZodTypeDef, Tax> =
138
+ openEnums.outboundSchema(Tax);
139
+
140
+ /** @internal */
141
+ export const HrisBenefitType$inboundSchema: z.ZodType<
142
+ HrisBenefitType,
143
+ z.ZodTypeDef,
144
+ unknown
145
+ > = openEnums.inboundSchema(HrisBenefitType);
146
+ /** @internal */
147
+ export const HrisBenefitType$outboundSchema: z.ZodType<
148
+ string,
149
+ z.ZodTypeDef,
150
+ HrisBenefitType
151
+ > = openEnums.outboundSchema(HrisBenefitType);
152
+
153
+ /** @internal */
154
+ export const HrisBenefit$inboundSchema: z.ZodType<
155
+ HrisBenefit,
156
+ z.ZodTypeDef,
157
+ unknown
158
+ > = z.object({
159
+ company_id: z.string().optional(),
160
+ coverage_level: CoverageLevel$inboundSchema.optional(),
161
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
162
+ .optional(),
163
+ currency: z.string().optional(),
164
+ description: z.string().optional(),
165
+ employer_contribution_amount: z.number().optional(),
166
+ employer_contribution_max_amount: z.number().optional(),
167
+ employer_contribution_type: EmployerContributionType$inboundSchema.optional(),
168
+ frequency: HrisBenefitFrequency$inboundSchema.optional(),
169
+ id: z.string().optional(),
170
+ is_active: z.boolean().optional(),
171
+ name: z.string().optional(),
172
+ raw: z.record(z.any()).optional(),
173
+ tax: Tax$inboundSchema.optional(),
174
+ type: HrisBenefitType$inboundSchema.optional(),
175
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
176
+ .optional(),
177
+ }).transform((v) => {
178
+ return remap$(v, {
179
+ "company_id": "companyId",
180
+ "coverage_level": "coverageLevel",
181
+ "created_at": "createdAt",
182
+ "employer_contribution_amount": "employerContributionAmount",
183
+ "employer_contribution_max_amount": "employerContributionMaxAmount",
184
+ "employer_contribution_type": "employerContributionType",
185
+ "is_active": "isActive",
186
+ "updated_at": "updatedAt",
187
+ });
188
+ });
189
+ /** @internal */
190
+ export type HrisBenefit$Outbound = {
191
+ company_id?: string | undefined;
192
+ coverage_level?: string | undefined;
193
+ created_at?: string | undefined;
194
+ currency?: string | undefined;
195
+ description?: string | undefined;
196
+ employer_contribution_amount?: number | undefined;
197
+ employer_contribution_max_amount?: number | undefined;
198
+ employer_contribution_type?: string | undefined;
199
+ frequency?: string | undefined;
200
+ id?: string | undefined;
201
+ is_active?: boolean | undefined;
202
+ name?: string | undefined;
203
+ raw?: { [k: string]: any } | undefined;
204
+ tax?: string | undefined;
205
+ type?: string | undefined;
206
+ updated_at?: string | undefined;
207
+ };
208
+
209
+ /** @internal */
210
+ export const HrisBenefit$outboundSchema: z.ZodType<
211
+ HrisBenefit$Outbound,
212
+ z.ZodTypeDef,
213
+ HrisBenefit
214
+ > = z.object({
215
+ companyId: z.string().optional(),
216
+ coverageLevel: CoverageLevel$outboundSchema.optional(),
217
+ createdAt: z.date().transform(v => v.toISOString()).optional(),
218
+ currency: z.string().optional(),
219
+ description: z.string().optional(),
220
+ employerContributionAmount: z.number().optional(),
221
+ employerContributionMaxAmount: z.number().optional(),
222
+ employerContributionType: EmployerContributionType$outboundSchema.optional(),
223
+ frequency: HrisBenefitFrequency$outboundSchema.optional(),
224
+ id: z.string().optional(),
225
+ isActive: z.boolean().optional(),
226
+ name: z.string().optional(),
227
+ raw: z.record(z.any()).optional(),
228
+ tax: Tax$outboundSchema.optional(),
229
+ type: HrisBenefitType$outboundSchema.optional(),
230
+ updatedAt: z.date().transform(v => v.toISOString()).optional(),
231
+ }).transform((v) => {
232
+ return remap$(v, {
233
+ companyId: "company_id",
234
+ coverageLevel: "coverage_level",
235
+ createdAt: "created_at",
236
+ employerContributionAmount: "employer_contribution_amount",
237
+ employerContributionMaxAmount: "employer_contribution_max_amount",
238
+ employerContributionType: "employer_contribution_type",
239
+ isActive: "is_active",
240
+ updatedAt: "updated_at",
241
+ });
242
+ });
243
+
244
+ export function hrisBenefitToJSON(hrisBenefit: HrisBenefit): string {
245
+ return JSON.stringify(HrisBenefit$outboundSchema.parse(hrisBenefit));
246
+ }
247
+ export function hrisBenefitFromJSON(
248
+ jsonString: string,
249
+ ): SafeParseResult<HrisBenefit, SDKValidationError> {
250
+ return safeParse(
251
+ jsonString,
252
+ (x) => HrisBenefit$inboundSchema.parse(JSON.parse(x)),
253
+ `Failed to parse 'HrisBenefit' from JSON`,
254
+ );
255
+ }
@@ -0,0 +1,202 @@
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
+
13
+ export const HrisDeductionCoverageLevel = {
14
+ EmployeeOnly: "EMPLOYEE_ONLY",
15
+ EmployeeSpouse: "EMPLOYEE_SPOUSE",
16
+ EmployeeChild: "EMPLOYEE_CHILD",
17
+ EmployeeChildren: "EMPLOYEE_CHILDREN",
18
+ EmployeeFamily: "EMPLOYEE_FAMILY",
19
+ Family: "FAMILY",
20
+ Other: "OTHER",
21
+ } as const;
22
+ export type HrisDeductionCoverageLevel = OpenEnum<
23
+ typeof HrisDeductionCoverageLevel
24
+ >;
25
+
26
+ export const HrisDeductionFrequency = {
27
+ OneTime: "ONE_TIME",
28
+ Day: "DAY",
29
+ Quarter: "QUARTER",
30
+ Year: "YEAR",
31
+ Hour: "HOUR",
32
+ Month: "MONTH",
33
+ Week: "WEEK",
34
+ } as const;
35
+ export type HrisDeductionFrequency = OpenEnum<typeof HrisDeductionFrequency>;
36
+
37
+ export const HrisDeductionType = {
38
+ Fixed: "FIXED",
39
+ Percentage: "PERCENTAGE",
40
+ } as const;
41
+ export type HrisDeductionType = OpenEnum<typeof HrisDeductionType>;
42
+
43
+ /**
44
+ * Employee-specific deduction/benefit enrolment.
45
+ */
46
+ export type HrisDeduction = {
47
+ amount?: number | undefined;
48
+ benefitId?: string | undefined;
49
+ companyId?: string | undefined;
50
+ coverageLevel?: HrisDeductionCoverageLevel | undefined;
51
+ createdAt?: Date | undefined;
52
+ endAt?: Date | undefined;
53
+ frequency?: HrisDeductionFrequency | undefined;
54
+ id?: string | undefined;
55
+ isActive?: boolean | undefined;
56
+ raw?: { [k: string]: any } | undefined;
57
+ startAt?: Date | undefined;
58
+ type?: HrisDeductionType | undefined;
59
+ updatedAt?: Date | undefined;
60
+ userId?: string | undefined;
61
+ };
62
+
63
+ /** @internal */
64
+ export const HrisDeductionCoverageLevel$inboundSchema: z.ZodType<
65
+ HrisDeductionCoverageLevel,
66
+ z.ZodTypeDef,
67
+ unknown
68
+ > = openEnums.inboundSchema(HrisDeductionCoverageLevel);
69
+ /** @internal */
70
+ export const HrisDeductionCoverageLevel$outboundSchema: z.ZodType<
71
+ string,
72
+ z.ZodTypeDef,
73
+ HrisDeductionCoverageLevel
74
+ > = openEnums.outboundSchema(HrisDeductionCoverageLevel);
75
+
76
+ /** @internal */
77
+ export const HrisDeductionFrequency$inboundSchema: z.ZodType<
78
+ HrisDeductionFrequency,
79
+ z.ZodTypeDef,
80
+ unknown
81
+ > = openEnums.inboundSchema(HrisDeductionFrequency);
82
+ /** @internal */
83
+ export const HrisDeductionFrequency$outboundSchema: z.ZodType<
84
+ string,
85
+ z.ZodTypeDef,
86
+ HrisDeductionFrequency
87
+ > = openEnums.outboundSchema(HrisDeductionFrequency);
88
+
89
+ /** @internal */
90
+ export const HrisDeductionType$inboundSchema: z.ZodType<
91
+ HrisDeductionType,
92
+ z.ZodTypeDef,
93
+ unknown
94
+ > = openEnums.inboundSchema(HrisDeductionType);
95
+ /** @internal */
96
+ export const HrisDeductionType$outboundSchema: z.ZodType<
97
+ string,
98
+ z.ZodTypeDef,
99
+ HrisDeductionType
100
+ > = openEnums.outboundSchema(HrisDeductionType);
101
+
102
+ /** @internal */
103
+ export const HrisDeduction$inboundSchema: z.ZodType<
104
+ HrisDeduction,
105
+ z.ZodTypeDef,
106
+ unknown
107
+ > = z.object({
108
+ amount: z.number().optional(),
109
+ benefit_id: z.string().optional(),
110
+ company_id: z.string().optional(),
111
+ coverage_level: HrisDeductionCoverageLevel$inboundSchema.optional(),
112
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
113
+ .optional(),
114
+ end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
115
+ .optional(),
116
+ frequency: HrisDeductionFrequency$inboundSchema.optional(),
117
+ id: z.string().optional(),
118
+ is_active: z.boolean().optional(),
119
+ raw: z.record(z.any()).optional(),
120
+ start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
121
+ .optional(),
122
+ type: HrisDeductionType$inboundSchema.optional(),
123
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
124
+ .optional(),
125
+ user_id: z.string().optional(),
126
+ }).transform((v) => {
127
+ return remap$(v, {
128
+ "benefit_id": "benefitId",
129
+ "company_id": "companyId",
130
+ "coverage_level": "coverageLevel",
131
+ "created_at": "createdAt",
132
+ "end_at": "endAt",
133
+ "is_active": "isActive",
134
+ "start_at": "startAt",
135
+ "updated_at": "updatedAt",
136
+ "user_id": "userId",
137
+ });
138
+ });
139
+ /** @internal */
140
+ export type HrisDeduction$Outbound = {
141
+ amount?: number | undefined;
142
+ benefit_id?: string | undefined;
143
+ company_id?: string | undefined;
144
+ coverage_level?: string | undefined;
145
+ created_at?: string | undefined;
146
+ end_at?: string | undefined;
147
+ frequency?: string | undefined;
148
+ id?: string | undefined;
149
+ is_active?: boolean | undefined;
150
+ raw?: { [k: string]: any } | undefined;
151
+ start_at?: string | undefined;
152
+ type?: string | undefined;
153
+ updated_at?: string | undefined;
154
+ user_id?: string | undefined;
155
+ };
156
+
157
+ /** @internal */
158
+ export const HrisDeduction$outboundSchema: z.ZodType<
159
+ HrisDeduction$Outbound,
160
+ z.ZodTypeDef,
161
+ HrisDeduction
162
+ > = z.object({
163
+ amount: z.number().optional(),
164
+ benefitId: z.string().optional(),
165
+ companyId: z.string().optional(),
166
+ coverageLevel: HrisDeductionCoverageLevel$outboundSchema.optional(),
167
+ createdAt: z.date().transform(v => v.toISOString()).optional(),
168
+ endAt: z.date().transform(v => v.toISOString()).optional(),
169
+ frequency: HrisDeductionFrequency$outboundSchema.optional(),
170
+ id: z.string().optional(),
171
+ isActive: z.boolean().optional(),
172
+ raw: z.record(z.any()).optional(),
173
+ startAt: z.date().transform(v => v.toISOString()).optional(),
174
+ type: HrisDeductionType$outboundSchema.optional(),
175
+ updatedAt: z.date().transform(v => v.toISOString()).optional(),
176
+ userId: z.string().optional(),
177
+ }).transform((v) => {
178
+ return remap$(v, {
179
+ benefitId: "benefit_id",
180
+ companyId: "company_id",
181
+ coverageLevel: "coverage_level",
182
+ createdAt: "created_at",
183
+ endAt: "end_at",
184
+ isActive: "is_active",
185
+ startAt: "start_at",
186
+ updatedAt: "updated_at",
187
+ userId: "user_id",
188
+ });
189
+ });
190
+
191
+ export function hrisDeductionToJSON(hrisDeduction: HrisDeduction): string {
192
+ return JSON.stringify(HrisDeduction$outboundSchema.parse(hrisDeduction));
193
+ }
194
+ export function hrisDeductionFromJSON(
195
+ jsonString: string,
196
+ ): SafeParseResult<HrisDeduction, SDKValidationError> {
197
+ return safeParse(
198
+ jsonString,
199
+ (x) => HrisDeduction$inboundSchema.parse(JSON.parse(x)),
200
+ `Failed to parse 'HrisDeduction' from JSON`,
201
+ );
202
+ }
@@ -13,6 +13,10 @@ import {
13
13
  HrisPayslipDetail,
14
14
  HrisPayslipDetail$inboundSchema,
15
15
  } from "./hrispayslipdetail.js";
16
+ import {
17
+ PropertyHrisPayslipDeduction,
18
+ PropertyHrisPayslipDeduction$inboundSchema,
19
+ } from "./propertyhrispayslipdeduction.js";
16
20
 
17
21
  export const PaymentType = {
18
22
  Direct: "DIRECT",
@@ -25,6 +29,10 @@ export type HrisPayslip = {
25
29
  companyId?: string | undefined;
26
30
  createdAt?: Date | undefined;
27
31
  currency?: string | undefined;
32
+ /**
33
+ * // The ID (and optionally name) of the employee deduction (if this detail represents a deduction)
34
+ */
35
+ deduction?: PropertyHrisPayslipDeduction | undefined;
28
36
  details?: Array<HrisPayslipDetail> | undefined;
29
37
  endAt?: Date | undefined;
30
38
  grossAmount?: number | undefined;
@@ -55,6 +63,7 @@ export const HrisPayslip$inboundSchema: z.ZodType<
55
63
  created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
56
64
  .optional(),
57
65
  currency: z.string().optional(),
66
+ deduction: PropertyHrisPayslipDeduction$inboundSchema.optional(),
58
67
  details: z.array(HrisPayslipDetail$inboundSchema).optional(),
59
68
  end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
60
69
  .optional(),
@@ -29,6 +29,7 @@ export * from "./accountingprofitlosscategory.js";
29
29
  export * from "./accountingprofitlosssection.js";
30
30
  export * from "./accountingprofitlosssubcategory.js";
31
31
  export * from "./accountingpurchaseorder.js";
32
+ export * from "./accountingreference.js";
32
33
  export * from "./accountingreport.js";
33
34
  export * from "./accountingsalesorder.js";
34
35
  export * from "./accountingtaxrate.js";
@@ -107,8 +108,10 @@ export * from "./genaiembedding.js";
107
108
  export * from "./genaiembeddingcontent.js";
108
109
  export * from "./genaimodel.js";
109
110
  export * from "./genaiprompt.js";
111
+ export * from "./hrisbenefit.js";
110
112
  export * from "./hriscompany.js";
111
113
  export * from "./hriscompensation.js";
114
+ export * from "./hrisdeduction.js";
112
115
  export * from "./hrisdevice.js";
113
116
  export * from "./hrisemail.js";
114
117
  export * from "./hrisemployee.js";
@@ -192,6 +195,7 @@ export * from "./propertyhriscompanyaddress.js";
192
195
  export * from "./propertyhrisemployeeaddress.js";
193
196
  export * from "./propertyhrisemployeeemployeeroles.js";
194
197
  export * from "./propertyhrislocationaddress.js";
198
+ export * from "./propertyhrispayslipdeduction.js";
195
199
  export * from "./propertyintegrationcategories.js";
196
200
  export * from "./propertyintegrationsupportwebhookevents.js";
197
201
  export * from "./propertyintegrationsupportwebhookeventscreated.js";