@unified-api/typescript-sdk 2.80.5 → 2.80.7

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 (240) hide show
  1. package/README.md +26 -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/funcs/ucGetUcCall.d.ts +15 -0
  54. package/funcs/ucGetUcCall.d.ts.map +1 -0
  55. package/funcs/ucGetUcCall.js +125 -0
  56. package/funcs/ucGetUcCall.js.map +1 -0
  57. package/jsr.json +1 -1
  58. package/lib/config.d.ts +2 -2
  59. package/lib/config.js +2 -2
  60. package/package.json +1 -1
  61. package/sdk/benefit.d.ts +30 -0
  62. package/sdk/benefit.d.ts.map +1 -0
  63. package/sdk/benefit.js +54 -0
  64. package/sdk/benefit.js.map +1 -0
  65. package/sdk/call.d.ts +4 -0
  66. package/sdk/call.d.ts.map +1 -1
  67. package/sdk/call.js +7 -0
  68. package/sdk/call.js.map +1 -1
  69. package/sdk/deduction.d.ts +30 -0
  70. package/sdk/deduction.d.ts.map +1 -0
  71. package/sdk/deduction.js +54 -0
  72. package/sdk/deduction.js.map +1 -0
  73. package/sdk/hris.d.ts +48 -0
  74. package/sdk/hris.d.ts.map +1 -1
  75. package/sdk/hris.js +84 -0
  76. package/sdk/hris.js.map +1 -1
  77. package/sdk/models/operations/createhrisbenefit.d.ts +31 -0
  78. package/sdk/models/operations/createhrisbenefit.d.ts.map +1 -0
  79. package/sdk/models/operations/createhrisbenefit.js +59 -0
  80. package/sdk/models/operations/createhrisbenefit.js.map +1 -0
  81. package/sdk/models/operations/createhrisdeduction.d.ts +31 -0
  82. package/sdk/models/operations/createhrisdeduction.d.ts.map +1 -0
  83. package/sdk/models/operations/createhrisdeduction.js +59 -0
  84. package/sdk/models/operations/createhrisdeduction.js.map +1 -0
  85. package/sdk/models/operations/gethrisbenefit.d.ts +30 -0
  86. package/sdk/models/operations/gethrisbenefit.d.ts.map +1 -0
  87. package/sdk/models/operations/gethrisbenefit.js +57 -0
  88. package/sdk/models/operations/gethrisbenefit.js.map +1 -0
  89. package/sdk/models/operations/gethrisdeduction.d.ts +30 -0
  90. package/sdk/models/operations/gethrisdeduction.d.ts.map +1 -0
  91. package/sdk/models/operations/gethrisdeduction.js +57 -0
  92. package/sdk/models/operations/gethrisdeduction.js.map +1 -0
  93. package/sdk/models/operations/getuccall.d.ts +30 -0
  94. package/sdk/models/operations/getuccall.d.ts.map +1 -0
  95. package/sdk/models/operations/getuccall.js +57 -0
  96. package/sdk/models/operations/getuccall.js.map +1 -0
  97. package/sdk/models/operations/index.d.ts +13 -0
  98. package/sdk/models/operations/index.d.ts.map +1 -1
  99. package/sdk/models/operations/index.js +13 -0
  100. package/sdk/models/operations/index.js.map +1 -1
  101. package/sdk/models/operations/listhrisbenefits.d.ts +48 -0
  102. package/sdk/models/operations/listhrisbenefits.d.ts.map +1 -0
  103. package/sdk/models/operations/listhrisbenefits.js +65 -0
  104. package/sdk/models/operations/listhrisbenefits.js.map +1 -0
  105. package/sdk/models/operations/listhrisdeductions.d.ts +63 -0
  106. package/sdk/models/operations/listhrisdeductions.d.ts.map +1 -0
  107. package/sdk/models/operations/listhrisdeductions.js +71 -0
  108. package/sdk/models/operations/listhrisdeductions.js.map +1 -0
  109. package/sdk/models/operations/listmessagingmessages.d.ts +6 -1
  110. package/sdk/models/operations/listmessagingmessages.d.ts.map +1 -1
  111. package/sdk/models/operations/listmessagingmessages.js +2 -0
  112. package/sdk/models/operations/listmessagingmessages.js.map +1 -1
  113. package/sdk/models/operations/patchhrisbenefit.d.ts +36 -0
  114. package/sdk/models/operations/patchhrisbenefit.d.ts.map +1 -0
  115. package/sdk/models/operations/patchhrisbenefit.js +60 -0
  116. package/sdk/models/operations/patchhrisbenefit.js.map +1 -0
  117. package/sdk/models/operations/patchhrisdeduction.d.ts +36 -0
  118. package/sdk/models/operations/patchhrisdeduction.d.ts.map +1 -0
  119. package/sdk/models/operations/patchhrisdeduction.js +60 -0
  120. package/sdk/models/operations/patchhrisdeduction.js.map +1 -0
  121. package/sdk/models/operations/removehrisbenefit.d.ts +30 -0
  122. package/sdk/models/operations/removehrisbenefit.d.ts.map +1 -0
  123. package/sdk/models/operations/removehrisbenefit.js +68 -0
  124. package/sdk/models/operations/removehrisbenefit.js.map +1 -0
  125. package/sdk/models/operations/removehrisdeduction.d.ts +30 -0
  126. package/sdk/models/operations/removehrisdeduction.d.ts.map +1 -0
  127. package/sdk/models/operations/removehrisdeduction.js +68 -0
  128. package/sdk/models/operations/removehrisdeduction.js.map +1 -0
  129. package/sdk/models/operations/updatehrisbenefit.d.ts +36 -0
  130. package/sdk/models/operations/updatehrisbenefit.d.ts.map +1 -0
  131. package/sdk/models/operations/updatehrisbenefit.js +60 -0
  132. package/sdk/models/operations/updatehrisbenefit.js.map +1 -0
  133. package/sdk/models/operations/updatehrisdeduction.d.ts +36 -0
  134. package/sdk/models/operations/updatehrisdeduction.d.ts.map +1 -0
  135. package/sdk/models/operations/updatehrisdeduction.js +60 -0
  136. package/sdk/models/operations/updatehrisdeduction.js.map +1 -0
  137. package/sdk/models/shared/accountinglineitem.d.ts +3 -0
  138. package/sdk/models/shared/accountinglineitem.d.ts.map +1 -1
  139. package/sdk/models/shared/accountinglineitem.js +3 -0
  140. package/sdk/models/shared/accountinglineitem.js.map +1 -1
  141. package/sdk/models/shared/accountingreference.d.ts +19 -0
  142. package/sdk/models/shared/accountingreference.d.ts.map +1 -0
  143. package/sdk/models/shared/accountingreference.js +60 -0
  144. package/sdk/models/shared/accountingreference.js.map +1 -0
  145. package/sdk/models/shared/hrisbenefit.d.ts +127 -0
  146. package/sdk/models/shared/hrisbenefit.d.ts.map +1 -0
  147. package/sdk/models/shared/hrisbenefit.js +181 -0
  148. package/sdk/models/shared/hrisbenefit.js.map +1 -0
  149. package/sdk/models/shared/hrisdeduction.d.ts +88 -0
  150. package/sdk/models/shared/hrisdeduction.d.ts.map +1 -0
  151. package/sdk/models/shared/hrisdeduction.js +148 -0
  152. package/sdk/models/shared/hrisdeduction.js.map +1 -0
  153. package/sdk/models/shared/hrispayslip.d.ts +5 -0
  154. package/sdk/models/shared/hrispayslip.d.ts.map +1 -1
  155. package/sdk/models/shared/hrispayslip.js +2 -0
  156. package/sdk/models/shared/hrispayslip.js.map +1 -1
  157. package/sdk/models/shared/index.d.ts +4 -0
  158. package/sdk/models/shared/index.d.ts.map +1 -1
  159. package/sdk/models/shared/index.js +4 -0
  160. package/sdk/models/shared/index.js.map +1 -1
  161. package/sdk/models/shared/integrationsupport.d.ts +27 -0
  162. package/sdk/models/shared/integrationsupport.d.ts.map +1 -1
  163. package/sdk/models/shared/integrationsupport.js +33 -5
  164. package/sdk/models/shared/integrationsupport.js.map +1 -1
  165. package/sdk/models/shared/messagingmessage.d.ts +2 -0
  166. package/sdk/models/shared/messagingmessage.d.ts.map +1 -1
  167. package/sdk/models/shared/messagingmessage.js +4 -0
  168. package/sdk/models/shared/messagingmessage.js.map +1 -1
  169. package/sdk/models/shared/propertyconnectionpermissions.d.ts +4 -0
  170. package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  171. package/sdk/models/shared/propertyconnectionpermissions.js +4 -0
  172. package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  173. package/sdk/models/shared/propertyhrispayslipdeduction.d.ts +60 -0
  174. package/sdk/models/shared/propertyhrispayslipdeduction.d.ts.map +1 -0
  175. package/sdk/models/shared/propertyhrispayslipdeduction.js +110 -0
  176. package/sdk/models/shared/propertyhrispayslipdeduction.js.map +1 -0
  177. package/sdk/models/shared/uccall.d.ts +3 -0
  178. package/sdk/models/shared/uccall.d.ts.map +1 -1
  179. package/sdk/models/shared/uccall.js +4 -0
  180. package/sdk/models/shared/uccall.js.map +1 -1
  181. package/sdk/models/shared/webhook.d.ts +2 -0
  182. package/sdk/models/shared/webhook.d.ts.map +1 -1
  183. package/sdk/models/shared/webhook.js +2 -0
  184. package/sdk/models/shared/webhook.js.map +1 -1
  185. package/sdk/sdk.d.ts +6 -0
  186. package/sdk/sdk.d.ts.map +1 -1
  187. package/sdk/sdk.js +8 -0
  188. package/sdk/sdk.js.map +1 -1
  189. package/sdk/uc.d.ts +4 -0
  190. package/sdk/uc.d.ts.map +1 -1
  191. package/sdk/uc.js +7 -0
  192. package/sdk/uc.js.map +1 -1
  193. package/src/funcs/hrisCreateHrisBenefit.ts +170 -0
  194. package/src/funcs/hrisCreateHrisDeduction.ts +171 -0
  195. package/src/funcs/hrisGetHrisBenefit.ts +173 -0
  196. package/src/funcs/hrisGetHrisDeduction.ts +173 -0
  197. package/src/funcs/hrisListHrisBenefits.ts +177 -0
  198. package/src/funcs/hrisListHrisDeductions.ts +180 -0
  199. package/src/funcs/hrisPatchHrisBenefit.ts +174 -0
  200. package/src/funcs/hrisPatchHrisDeduction.ts +174 -0
  201. package/src/funcs/hrisRemoveHrisBenefit.ts +175 -0
  202. package/src/funcs/hrisRemoveHrisDeduction.ts +176 -0
  203. package/src/funcs/hrisUpdateHrisBenefit.ts +174 -0
  204. package/src/funcs/hrisUpdateHrisDeduction.ts +175 -0
  205. package/src/funcs/messagingListMessagingMessages.ts +1 -0
  206. package/src/funcs/ucGetUcCall.ts +173 -0
  207. package/src/lib/config.ts +2 -2
  208. package/src/sdk/benefit.ts +100 -0
  209. package/src/sdk/call.ts +15 -0
  210. package/src/sdk/deduction.ts +100 -0
  211. package/src/sdk/hris.ts +180 -0
  212. package/src/sdk/models/operations/createhrisbenefit.ts +59 -0
  213. package/src/sdk/models/operations/createhrisdeduction.ts +59 -0
  214. package/src/sdk/models/operations/gethrisbenefit.ts +57 -0
  215. package/src/sdk/models/operations/gethrisdeduction.ts +57 -0
  216. package/src/sdk/models/operations/getuccall.ts +57 -0
  217. package/src/sdk/models/operations/index.ts +13 -0
  218. package/src/sdk/models/operations/listhrisbenefits.ts +83 -0
  219. package/src/sdk/models/operations/listhrisdeductions.ts +104 -0
  220. package/src/sdk/models/operations/listmessagingmessages.ts +8 -1
  221. package/src/sdk/models/operations/patchhrisbenefit.ts +65 -0
  222. package/src/sdk/models/operations/patchhrisdeduction.ts +65 -0
  223. package/src/sdk/models/operations/removehrisbenefit.ts +75 -0
  224. package/src/sdk/models/operations/removehrisdeduction.ts +75 -0
  225. package/src/sdk/models/operations/updatehrisbenefit.ts +65 -0
  226. package/src/sdk/models/operations/updatehrisdeduction.ts +65 -0
  227. package/src/sdk/models/shared/accountinglineitem.ts +10 -0
  228. package/src/sdk/models/shared/accountingreference.ts +55 -0
  229. package/src/sdk/models/shared/hrisbenefit.ts +255 -0
  230. package/src/sdk/models/shared/hrisdeduction.ts +202 -0
  231. package/src/sdk/models/shared/hrispayslip.ts +9 -0
  232. package/src/sdk/models/shared/index.ts +4 -0
  233. package/src/sdk/models/shared/integrationsupport.ts +54 -0
  234. package/src/sdk/models/shared/messagingmessage.ts +6 -0
  235. package/src/sdk/models/shared/propertyconnectionpermissions.ts +4 -0
  236. package/src/sdk/models/shared/propertyhrispayslipdeduction.ts +135 -0
  237. package/src/sdk/models/shared/uccall.ts +6 -0
  238. package/src/sdk/models/shared/webhook.ts +2 -0
  239. package/src/sdk/sdk.ts +12 -0
  240. package/src/sdk/uc.ts +15 -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 PatchHrisDeductionRequest = {
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 PatchHrisDeductionRequest$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 PatchHrisDeductionRequest$outboundSchema: z.ZodType<
43
+ PatchHrisDeductionRequest$Outbound,
44
+ z.ZodTypeDef,
45
+ PatchHrisDeductionRequest
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 patchHrisDeductionRequestToJSON(
60
+ patchHrisDeductionRequest: PatchHrisDeductionRequest,
61
+ ): string {
62
+ return JSON.stringify(
63
+ PatchHrisDeductionRequest$outboundSchema.parse(patchHrisDeductionRequest),
64
+ );
65
+ }
@@ -0,0 +1,75 @@
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 RemoveHrisBenefitRequest = {
12
+ /**
13
+ * ID of the connection
14
+ */
15
+ connectionId: string;
16
+ /**
17
+ * ID of the Benefit
18
+ */
19
+ id: string;
20
+ };
21
+
22
+ export type RemoveHrisBenefitResponse = {
23
+ headers: { [k: string]: Array<string> };
24
+ };
25
+
26
+ /** @internal */
27
+ export type RemoveHrisBenefitRequest$Outbound = {
28
+ connection_id: string;
29
+ id: string;
30
+ };
31
+
32
+ /** @internal */
33
+ export const RemoveHrisBenefitRequest$outboundSchema: z.ZodType<
34
+ RemoveHrisBenefitRequest$Outbound,
35
+ z.ZodTypeDef,
36
+ RemoveHrisBenefitRequest
37
+ > = z.object({
38
+ connectionId: z.string(),
39
+ id: z.string(),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ connectionId: "connection_id",
43
+ });
44
+ });
45
+
46
+ export function removeHrisBenefitRequestToJSON(
47
+ removeHrisBenefitRequest: RemoveHrisBenefitRequest,
48
+ ): string {
49
+ return JSON.stringify(
50
+ RemoveHrisBenefitRequest$outboundSchema.parse(removeHrisBenefitRequest),
51
+ );
52
+ }
53
+
54
+ /** @internal */
55
+ export const RemoveHrisBenefitResponse$inboundSchema: z.ZodType<
56
+ RemoveHrisBenefitResponse,
57
+ z.ZodTypeDef,
58
+ unknown
59
+ > = z.object({
60
+ Headers: z.record(z.array(z.string())).default({}),
61
+ }).transform((v) => {
62
+ return remap$(v, {
63
+ "Headers": "headers",
64
+ });
65
+ });
66
+
67
+ export function removeHrisBenefitResponseFromJSON(
68
+ jsonString: string,
69
+ ): SafeParseResult<RemoveHrisBenefitResponse, SDKValidationError> {
70
+ return safeParse(
71
+ jsonString,
72
+ (x) => RemoveHrisBenefitResponse$inboundSchema.parse(JSON.parse(x)),
73
+ `Failed to parse 'RemoveHrisBenefitResponse' from JSON`,
74
+ );
75
+ }
@@ -0,0 +1,75 @@
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 RemoveHrisDeductionRequest = {
12
+ /**
13
+ * ID of the connection
14
+ */
15
+ connectionId: string;
16
+ /**
17
+ * ID of the Deduction
18
+ */
19
+ id: string;
20
+ };
21
+
22
+ export type RemoveHrisDeductionResponse = {
23
+ headers: { [k: string]: Array<string> };
24
+ };
25
+
26
+ /** @internal */
27
+ export type RemoveHrisDeductionRequest$Outbound = {
28
+ connection_id: string;
29
+ id: string;
30
+ };
31
+
32
+ /** @internal */
33
+ export const RemoveHrisDeductionRequest$outboundSchema: z.ZodType<
34
+ RemoveHrisDeductionRequest$Outbound,
35
+ z.ZodTypeDef,
36
+ RemoveHrisDeductionRequest
37
+ > = z.object({
38
+ connectionId: z.string(),
39
+ id: z.string(),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ connectionId: "connection_id",
43
+ });
44
+ });
45
+
46
+ export function removeHrisDeductionRequestToJSON(
47
+ removeHrisDeductionRequest: RemoveHrisDeductionRequest,
48
+ ): string {
49
+ return JSON.stringify(
50
+ RemoveHrisDeductionRequest$outboundSchema.parse(removeHrisDeductionRequest),
51
+ );
52
+ }
53
+
54
+ /** @internal */
55
+ export const RemoveHrisDeductionResponse$inboundSchema: z.ZodType<
56
+ RemoveHrisDeductionResponse,
57
+ z.ZodTypeDef,
58
+ unknown
59
+ > = z.object({
60
+ Headers: z.record(z.array(z.string())).default({}),
61
+ }).transform((v) => {
62
+ return remap$(v, {
63
+ "Headers": "headers",
64
+ });
65
+ });
66
+
67
+ export function removeHrisDeductionResponseFromJSON(
68
+ jsonString: string,
69
+ ): SafeParseResult<RemoveHrisDeductionResponse, SDKValidationError> {
70
+ return safeParse(
71
+ jsonString,
72
+ (x) => RemoveHrisDeductionResponse$inboundSchema.parse(JSON.parse(x)),
73
+ `Failed to parse 'RemoveHrisDeductionResponse' from JSON`,
74
+ );
75
+ }
@@ -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 UpdateHrisBenefitRequest = {
10
+ /**
11
+ * Company-wide benefit plans available to employees.
12
+ */
13
+ hrisBenefit: shared.HrisBenefit;
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 Benefit
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 UpdateHrisBenefitRequest$Outbound = {
34
+ HrisBenefit: shared.HrisBenefit$Outbound;
35
+ connection_id: string;
36
+ fields?: Array<string> | undefined;
37
+ id: string;
38
+ raw?: string | undefined;
39
+ };
40
+
41
+ /** @internal */
42
+ export const UpdateHrisBenefitRequest$outboundSchema: z.ZodType<
43
+ UpdateHrisBenefitRequest$Outbound,
44
+ z.ZodTypeDef,
45
+ UpdateHrisBenefitRequest
46
+ > = z.object({
47
+ hrisBenefit: shared.HrisBenefit$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
+ hrisBenefit: "HrisBenefit",
55
+ connectionId: "connection_id",
56
+ });
57
+ });
58
+
59
+ export function updateHrisBenefitRequestToJSON(
60
+ updateHrisBenefitRequest: UpdateHrisBenefitRequest,
61
+ ): string {
62
+ return JSON.stringify(
63
+ UpdateHrisBenefitRequest$outboundSchema.parse(updateHrisBenefitRequest),
64
+ );
65
+ }
@@ -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,7 @@ export type AccountingLineitem = {
18
24
  itemId?: string | undefined;
19
25
  itemName?: string | undefined;
20
26
  itemSku?: string | undefined;
27
+ locations?: Array<AccountingReference> | undefined;
21
28
  notes?: string | undefined;
22
29
  refundAmount?: number | undefined;
23
30
  refundedAt?: Date | undefined;
@@ -45,6 +52,7 @@ export const AccountingLineitem$inboundSchema: z.ZodType<
45
52
  item_id: z.string().optional(),
46
53
  item_name: z.string().optional(),
47
54
  item_sku: z.string().optional(),
55
+ locations: z.array(AccountingReference$inboundSchema).optional(),
48
56
  notes: z.string().optional(),
49
57
  refund_amount: z.number().optional(),
50
58
  refunded_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
@@ -87,6 +95,7 @@ export type AccountingLineitem$Outbound = {
87
95
  item_id?: string | undefined;
88
96
  item_name?: string | undefined;
89
97
  item_sku?: string | undefined;
98
+ locations?: Array<AccountingReference$Outbound> | undefined;
90
99
  notes?: string | undefined;
91
100
  refund_amount?: number | undefined;
92
101
  refunded_at?: string | undefined;
@@ -113,6 +122,7 @@ export const AccountingLineitem$outboundSchema: z.ZodType<
113
122
  itemId: z.string().optional(),
114
123
  itemName: z.string().optional(),
115
124
  itemSku: z.string().optional(),
125
+ locations: z.array(AccountingReference$outboundSchema).optional(),
116
126
  notes: z.string().optional(),
117
127
  refundAmount: z.number().optional(),
118
128
  refundedAt: z.date().transform(v => v.toISOString()).optional(),
@@ -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
+ }