@greensecurity/javascript-sdk 0.35.33 → 0.35.37

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 (152) hide show
  1. package/README.md +6 -0
  2. package/bin/mcp-server.js +1299 -700
  3. package/bin/mcp-server.js.map +14 -8
  4. package/dist/commonjs/__tests__/invoices.test.js +15 -0
  5. package/dist/commonjs/__tests__/invoices.test.js.map +1 -1
  6. package/dist/commonjs/__tests__/vendors.test.js +15 -0
  7. package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
  8. package/dist/commonjs/__tests__/zones.test.js +27 -13
  9. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  10. package/dist/commonjs/funcs/invoicesCreateInvoice.d.ts +26 -0
  11. package/dist/commonjs/funcs/invoicesCreateInvoice.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/invoicesCreateInvoice.js +126 -0
  13. package/dist/commonjs/funcs/invoicesCreateInvoice.js.map +1 -0
  14. package/dist/commonjs/funcs/vendorsAcceptVendorCredential.d.ts +17 -0
  15. package/dist/commonjs/funcs/vendorsAcceptVendorCredential.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/vendorsAcceptVendorCredential.js +120 -0
  17. package/dist/commonjs/funcs/vendorsAcceptVendorCredential.js.map +1 -0
  18. package/dist/commonjs/lib/config.d.ts +2 -2
  19. package/dist/commonjs/lib/config.js +2 -2
  20. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  21. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  22. package/dist/commonjs/mcp-server/server.js +5 -1
  23. package/dist/commonjs/mcp-server/server.js.map +1 -1
  24. package/dist/commonjs/mcp-server/tools/invoicesCreateInvoice.d.ts +8 -0
  25. package/dist/commonjs/mcp-server/tools/invoicesCreateInvoice.d.ts.map +1 -0
  26. package/dist/commonjs/mcp-server/tools/invoicesCreateInvoice.js +73 -0
  27. package/dist/commonjs/mcp-server/tools/invoicesCreateInvoice.js.map +1 -0
  28. package/dist/commonjs/mcp-server/tools/vendorsAcceptVendorCredential.d.ts +8 -0
  29. package/dist/commonjs/mcp-server/tools/vendorsAcceptVendorCredential.d.ts.map +1 -0
  30. package/dist/commonjs/mcp-server/tools/vendorsAcceptVendorCredential.js +64 -0
  31. package/dist/commonjs/mcp-server/tools/vendorsAcceptVendorCredential.js.map +1 -0
  32. package/dist/commonjs/models/operations/acceptvendorcredential.d.ts +32 -0
  33. package/dist/commonjs/models/operations/acceptvendorcredential.d.ts.map +1 -0
  34. package/dist/commonjs/models/operations/acceptvendorcredential.js +78 -0
  35. package/dist/commonjs/models/operations/acceptvendorcredential.js.map +1 -0
  36. package/dist/commonjs/models/operations/createinvoice.d.ts +441 -0
  37. package/dist/commonjs/models/operations/createinvoice.d.ts.map +1 -0
  38. package/dist/commonjs/models/operations/createinvoice.js +604 -0
  39. package/dist/commonjs/models/operations/createinvoice.js.map +1 -0
  40. package/dist/commonjs/models/operations/index.d.ts +2 -0
  41. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  42. package/dist/commonjs/models/operations/index.js +2 -0
  43. package/dist/commonjs/models/operations/index.js.map +1 -1
  44. package/dist/commonjs/models/operations/updateinvoice.d.ts +148 -148
  45. package/dist/commonjs/models/operations/updateinvoice.d.ts.map +1 -1
  46. package/dist/commonjs/models/operations/updateinvoice.js +196 -195
  47. package/dist/commonjs/models/operations/updateinvoice.js.map +1 -1
  48. package/dist/commonjs/react-query/index.d.ts +2 -0
  49. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  50. package/dist/commonjs/react-query/index.js +2 -0
  51. package/dist/commonjs/react-query/index.js.map +1 -1
  52. package/dist/commonjs/react-query/invoicesCreateInvoice.d.ts +32 -0
  53. package/dist/commonjs/react-query/invoicesCreateInvoice.d.ts.map +1 -0
  54. package/dist/commonjs/react-query/invoicesCreateInvoice.js +56 -0
  55. package/dist/commonjs/react-query/invoicesCreateInvoice.js.map +1 -0
  56. package/dist/commonjs/react-query/vendorsAcceptVendorCredential.d.ts +23 -0
  57. package/dist/commonjs/react-query/vendorsAcceptVendorCredential.d.ts.map +1 -0
  58. package/dist/commonjs/react-query/vendorsAcceptVendorCredential.js +47 -0
  59. package/dist/commonjs/react-query/vendorsAcceptVendorCredential.js.map +1 -0
  60. package/dist/commonjs/sdk/invoices.d.ts +16 -0
  61. package/dist/commonjs/sdk/invoices.d.ts.map +1 -1
  62. package/dist/commonjs/sdk/invoices.js +19 -0
  63. package/dist/commonjs/sdk/invoices.js.map +1 -1
  64. package/dist/commonjs/sdk/vendors.d.ts +7 -0
  65. package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
  66. package/dist/commonjs/sdk/vendors.js +10 -0
  67. package/dist/commonjs/sdk/vendors.js.map +1 -1
  68. package/dist/esm/__tests__/invoices.test.js +15 -0
  69. package/dist/esm/__tests__/invoices.test.js.map +1 -1
  70. package/dist/esm/__tests__/vendors.test.js +15 -0
  71. package/dist/esm/__tests__/vendors.test.js.map +1 -1
  72. package/dist/esm/__tests__/zones.test.js +27 -13
  73. package/dist/esm/__tests__/zones.test.js.map +1 -1
  74. package/dist/esm/funcs/invoicesCreateInvoice.d.ts +26 -0
  75. package/dist/esm/funcs/invoicesCreateInvoice.d.ts.map +1 -0
  76. package/dist/esm/funcs/invoicesCreateInvoice.js +90 -0
  77. package/dist/esm/funcs/invoicesCreateInvoice.js.map +1 -0
  78. package/dist/esm/funcs/vendorsAcceptVendorCredential.d.ts +17 -0
  79. package/dist/esm/funcs/vendorsAcceptVendorCredential.d.ts.map +1 -0
  80. package/dist/esm/funcs/vendorsAcceptVendorCredential.js +84 -0
  81. package/dist/esm/funcs/vendorsAcceptVendorCredential.js.map +1 -0
  82. package/dist/esm/lib/config.d.ts +2 -2
  83. package/dist/esm/lib/config.js +2 -2
  84. package/dist/esm/mcp-server/mcp-server.js +1 -1
  85. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  86. package/dist/esm/mcp-server/server.js +5 -1
  87. package/dist/esm/mcp-server/server.js.map +1 -1
  88. package/dist/esm/mcp-server/tools/invoicesCreateInvoice.d.ts +8 -0
  89. package/dist/esm/mcp-server/tools/invoicesCreateInvoice.d.ts.map +1 -0
  90. package/dist/esm/mcp-server/tools/invoicesCreateInvoice.js +37 -0
  91. package/dist/esm/mcp-server/tools/invoicesCreateInvoice.js.map +1 -0
  92. package/dist/esm/mcp-server/tools/vendorsAcceptVendorCredential.d.ts +8 -0
  93. package/dist/esm/mcp-server/tools/vendorsAcceptVendorCredential.d.ts.map +1 -0
  94. package/dist/esm/mcp-server/tools/vendorsAcceptVendorCredential.js +28 -0
  95. package/dist/esm/mcp-server/tools/vendorsAcceptVendorCredential.js.map +1 -0
  96. package/dist/esm/models/operations/acceptvendorcredential.d.ts +32 -0
  97. package/dist/esm/models/operations/acceptvendorcredential.d.ts.map +1 -0
  98. package/dist/esm/models/operations/acceptvendorcredential.js +40 -0
  99. package/dist/esm/models/operations/acceptvendorcredential.js.map +1 -0
  100. package/dist/esm/models/operations/createinvoice.d.ts +441 -0
  101. package/dist/esm/models/operations/createinvoice.d.ts.map +1 -0
  102. package/dist/esm/models/operations/createinvoice.js +548 -0
  103. package/dist/esm/models/operations/createinvoice.js.map +1 -0
  104. package/dist/esm/models/operations/index.d.ts +2 -0
  105. package/dist/esm/models/operations/index.d.ts.map +1 -1
  106. package/dist/esm/models/operations/index.js +2 -0
  107. package/dist/esm/models/operations/index.js.map +1 -1
  108. package/dist/esm/models/operations/updateinvoice.d.ts +148 -148
  109. package/dist/esm/models/operations/updateinvoice.d.ts.map +1 -1
  110. package/dist/esm/models/operations/updateinvoice.js +183 -182
  111. package/dist/esm/models/operations/updateinvoice.js.map +1 -1
  112. package/dist/esm/react-query/index.d.ts +2 -0
  113. package/dist/esm/react-query/index.d.ts.map +1 -1
  114. package/dist/esm/react-query/index.js +2 -0
  115. package/dist/esm/react-query/index.js.map +1 -1
  116. package/dist/esm/react-query/invoicesCreateInvoice.d.ts +32 -0
  117. package/dist/esm/react-query/invoicesCreateInvoice.d.ts.map +1 -0
  118. package/dist/esm/react-query/invoicesCreateInvoice.js +51 -0
  119. package/dist/esm/react-query/invoicesCreateInvoice.js.map +1 -0
  120. package/dist/esm/react-query/vendorsAcceptVendorCredential.d.ts +23 -0
  121. package/dist/esm/react-query/vendorsAcceptVendorCredential.d.ts.map +1 -0
  122. package/dist/esm/react-query/vendorsAcceptVendorCredential.js +42 -0
  123. package/dist/esm/react-query/vendorsAcceptVendorCredential.js.map +1 -0
  124. package/dist/esm/sdk/invoices.d.ts +16 -0
  125. package/dist/esm/sdk/invoices.d.ts.map +1 -1
  126. package/dist/esm/sdk/invoices.js +19 -0
  127. package/dist/esm/sdk/invoices.js.map +1 -1
  128. package/dist/esm/sdk/vendors.d.ts +7 -0
  129. package/dist/esm/sdk/vendors.d.ts.map +1 -1
  130. package/dist/esm/sdk/vendors.js +10 -0
  131. package/dist/esm/sdk/vendors.js.map +1 -1
  132. package/jsr.json +1 -1
  133. package/package.json +1 -1
  134. package/src/__tests__/invoices.test.ts +18 -0
  135. package/src/__tests__/vendors.test.ts +18 -0
  136. package/src/__tests__/zones.test.ts +27 -13
  137. package/src/funcs/invoicesCreateInvoice.ts +174 -0
  138. package/src/funcs/vendorsAcceptVendorCredential.ts +176 -0
  139. package/src/lib/config.ts +2 -2
  140. package/src/mcp-server/mcp-server.ts +1 -1
  141. package/src/mcp-server/server.ts +5 -1
  142. package/src/mcp-server/tools/invoicesCreateInvoice.ts +46 -0
  143. package/src/mcp-server/tools/vendorsAcceptVendorCredential.ts +37 -0
  144. package/src/models/operations/acceptvendorcredential.ts +80 -0
  145. package/src/models/operations/createinvoice.ts +980 -0
  146. package/src/models/operations/index.ts +2 -0
  147. package/src/models/operations/updateinvoice.ts +491 -403
  148. package/src/react-query/index.ts +2 -0
  149. package/src/react-query/invoicesCreateInvoice.ts +98 -0
  150. package/src/react-query/vendorsAcceptVendorCredential.ts +88 -0
  151. package/src/sdk/invoices.ts +27 -0
  152. package/src/sdk/vendors.ts +18 -0
@@ -10,174 +10,188 @@ import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { RFCDate } from "../../types/rfcdate.js";
11
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
12
 
13
- export const UpdateInvoiceRequestBodyInvoicesPaymentHandler = {
13
+ export const UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler = {
14
14
  VendorCredential: "vendor credential",
15
15
  CredentialingSubscription: "credentialing subscription",
16
16
  ExpeditedCredential: "expedited credential",
17
17
  } as const;
18
- export type UpdateInvoiceRequestBodyInvoicesPaymentHandler = ClosedEnum<
19
- typeof UpdateInvoiceRequestBodyInvoicesPaymentHandler
18
+ export type UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler = ClosedEnum<
19
+ typeof UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler
20
20
  >;
21
21
 
22
- export type UpdateInvoiceRequestBodyInvoicesLines = {
22
+ export type UpdateInvoiceRequestBodyInvoicesRequest4Lines = {
23
23
  variantId: number;
24
24
  unitPrice?: number | undefined;
25
25
  quantity?: number | undefined;
26
26
  subscriptionId?: number | undefined;
27
27
  dateStarts?: RFCDate | undefined;
28
28
  dateEnds?: RFCDate | undefined;
29
- paymentHandler?: UpdateInvoiceRequestBodyInvoicesPaymentHandler | undefined;
29
+ paymentHandler?:
30
+ | UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler
31
+ | undefined;
30
32
  paymentHandlerData?: string | undefined;
31
33
  };
32
34
 
33
- export type Four = {
35
+ export type RequestBody4 = {
34
36
  systemId: number;
35
- lines?: Array<UpdateInvoiceRequestBodyInvoicesLines> | undefined;
37
+ lines?: Array<UpdateInvoiceRequestBodyInvoicesRequest4Lines> | undefined;
36
38
  vendorCredentialId?: number | undefined;
37
39
  };
38
40
 
39
- export const UpdateInvoiceRequestBodyPaymentHandler = {
41
+ export const UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler = {
40
42
  VendorCredential: "vendor credential",
41
43
  CredentialingSubscription: "credentialing subscription",
42
44
  ExpeditedCredential: "expedited credential",
43
45
  } as const;
44
- export type UpdateInvoiceRequestBodyPaymentHandler = ClosedEnum<
45
- typeof UpdateInvoiceRequestBodyPaymentHandler
46
+ export type UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler = ClosedEnum<
47
+ typeof UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler
46
48
  >;
47
49
 
48
- export type UpdateInvoiceRequestBodyLines = {
50
+ export type UpdateInvoiceRequestBodyInvoicesRequestLines = {
49
51
  variantId: number;
50
52
  unitPrice?: number | undefined;
51
53
  quantity?: number | undefined;
52
54
  subscriptionId?: number | undefined;
53
55
  dateStarts?: RFCDate | undefined;
54
56
  dateEnds?: RFCDate | undefined;
55
- paymentHandler?: UpdateInvoiceRequestBodyPaymentHandler | undefined;
57
+ paymentHandler?:
58
+ | UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler
59
+ | undefined;
56
60
  paymentHandlerData?: string | undefined;
57
61
  };
58
62
 
59
- export type Three = {
63
+ export type RequestBody3 = {
60
64
  facilityId: number;
61
- lines?: Array<UpdateInvoiceRequestBodyLines> | undefined;
65
+ lines?: Array<UpdateInvoiceRequestBodyInvoicesRequestLines> | undefined;
62
66
  vendorCredentialId?: number | undefined;
63
67
  };
64
68
 
65
- export const RequestBodyPaymentHandler = {
69
+ export const UpdateInvoiceRequestBodyInvoicesPaymentHandler = {
66
70
  VendorCredential: "vendor credential",
67
71
  CredentialingSubscription: "credentialing subscription",
68
72
  ExpeditedCredential: "expedited credential",
69
73
  } as const;
70
- export type RequestBodyPaymentHandler = ClosedEnum<
71
- typeof RequestBodyPaymentHandler
74
+ export type UpdateInvoiceRequestBodyInvoicesPaymentHandler = ClosedEnum<
75
+ typeof UpdateInvoiceRequestBodyInvoicesPaymentHandler
72
76
  >;
73
77
 
74
- export type RequestBodyLines = {
78
+ export type UpdateInvoiceRequestBodyInvoicesLines = {
75
79
  variantId: number;
76
80
  unitPrice?: number | undefined;
77
81
  quantity?: number | undefined;
78
82
  subscriptionId?: number | undefined;
79
83
  dateStarts?: RFCDate | undefined;
80
84
  dateEnds?: RFCDate | undefined;
81
- paymentHandler?: RequestBodyPaymentHandler | undefined;
85
+ paymentHandler?: UpdateInvoiceRequestBodyInvoicesPaymentHandler | undefined;
82
86
  paymentHandlerData?: string | undefined;
83
87
  };
84
88
 
85
- export type RequestBody2 = {
89
+ export type UpdateInvoiceRequestBody2 = {
86
90
  companyId: number;
87
- lines?: Array<RequestBodyLines> | undefined;
91
+ lines?: Array<UpdateInvoiceRequestBodyInvoicesLines> | undefined;
88
92
  vendorCredentialId?: number | undefined;
89
93
  };
90
94
 
91
- export const PaymentHandler = {
95
+ export const UpdateInvoiceRequestBodyPaymentHandler = {
92
96
  VendorCredential: "vendor credential",
93
97
  CredentialingSubscription: "credentialing subscription",
94
98
  ExpeditedCredential: "expedited credential",
95
99
  } as const;
96
- export type PaymentHandler = ClosedEnum<typeof PaymentHandler>;
100
+ export type UpdateInvoiceRequestBodyPaymentHandler = ClosedEnum<
101
+ typeof UpdateInvoiceRequestBodyPaymentHandler
102
+ >;
97
103
 
98
- export type Lines = {
104
+ export type UpdateInvoiceRequestBodyLines = {
99
105
  variantId: number;
100
106
  unitPrice?: number | undefined;
101
107
  quantity?: number | undefined;
102
108
  subscriptionId?: number | undefined;
103
109
  dateStarts?: RFCDate | undefined;
104
110
  dateEnds?: RFCDate | undefined;
105
- paymentHandler?: PaymentHandler | undefined;
111
+ paymentHandler?: UpdateInvoiceRequestBodyPaymentHandler | undefined;
106
112
  paymentHandlerData?: string | undefined;
107
113
  };
108
114
 
109
- export type RequestBody1 = {
115
+ export type UpdateInvoiceRequestBody1 = {
110
116
  vendorId: number;
111
- lines?: Array<Lines> | undefined;
117
+ lines?: Array<UpdateInvoiceRequestBodyLines> | undefined;
112
118
  vendorCredentialId?: number | undefined;
113
119
  };
114
120
 
115
121
  export type UpdateInvoiceRequestBody =
116
- | RequestBody1
117
- | RequestBody2
118
- | Three
119
- | Four;
122
+ | UpdateInvoiceRequestBody1
123
+ | UpdateInvoiceRequestBody2
124
+ | RequestBody3
125
+ | RequestBody4;
120
126
 
121
127
  export type UpdateInvoiceRequest = {
122
128
  /**
123
129
  * The identifier of the object
124
130
  */
125
131
  id: number;
126
- requestBody: RequestBody1 | RequestBody2 | Three | Four;
132
+ requestBody:
133
+ | UpdateInvoiceRequestBody1
134
+ | UpdateInvoiceRequestBody2
135
+ | RequestBody3
136
+ | RequestBody4;
127
137
  };
128
138
 
129
139
  /** @internal */
130
- export const UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema:
131
- z.ZodNativeEnum<typeof UpdateInvoiceRequestBodyInvoicesPaymentHandler> = z
132
- .nativeEnum(UpdateInvoiceRequestBodyInvoicesPaymentHandler);
140
+ export const UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$inboundSchema:
141
+ z.ZodNativeEnum<
142
+ typeof UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler
143
+ > = z.nativeEnum(UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler);
133
144
 
134
145
  /** @internal */
135
- export const UpdateInvoiceRequestBodyInvoicesPaymentHandler$outboundSchema:
136
- z.ZodNativeEnum<typeof UpdateInvoiceRequestBodyInvoicesPaymentHandler> =
137
- UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema;
146
+ export const UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$outboundSchema:
147
+ z.ZodNativeEnum<
148
+ typeof UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler
149
+ > = UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$inboundSchema;
138
150
 
139
151
  /**
140
152
  * @internal
141
153
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
142
154
  */
143
- export namespace UpdateInvoiceRequestBodyInvoicesPaymentHandler$ {
144
- /** @deprecated use `UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema` instead. */
155
+ export namespace UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$ {
156
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$inboundSchema` instead. */
145
157
  export const inboundSchema =
146
- UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema;
147
- /** @deprecated use `UpdateInvoiceRequestBodyInvoicesPaymentHandler$outboundSchema` instead. */
158
+ UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$inboundSchema;
159
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$outboundSchema` instead. */
148
160
  export const outboundSchema =
149
- UpdateInvoiceRequestBodyInvoicesPaymentHandler$outboundSchema;
161
+ UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$outboundSchema;
150
162
  }
151
163
 
152
164
  /** @internal */
153
- export const UpdateInvoiceRequestBodyInvoicesLines$inboundSchema: z.ZodType<
154
- UpdateInvoiceRequestBodyInvoicesLines,
155
- z.ZodTypeDef,
156
- unknown
157
- > = z.object({
158
- variant_id: z.number().int(),
159
- unit_price: z.number().optional(),
160
- quantity: z.number().int().optional(),
161
- subscription_id: z.number().int().optional(),
162
- date_starts: z.string().transform(v => new RFCDate(v)).optional(),
163
- date_ends: z.string().transform(v => new RFCDate(v)).optional(),
164
- payment_handler: UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema
165
- .optional(),
166
- payment_handler_data: z.string().optional(),
167
- }).transform((v) => {
168
- return remap$(v, {
169
- "variant_id": "variantId",
170
- "unit_price": "unitPrice",
171
- "subscription_id": "subscriptionId",
172
- "date_starts": "dateStarts",
173
- "date_ends": "dateEnds",
174
- "payment_handler": "paymentHandler",
175
- "payment_handler_data": "paymentHandlerData",
165
+ export const UpdateInvoiceRequestBodyInvoicesRequest4Lines$inboundSchema:
166
+ z.ZodType<
167
+ UpdateInvoiceRequestBodyInvoicesRequest4Lines,
168
+ z.ZodTypeDef,
169
+ unknown
170
+ > = z.object({
171
+ variant_id: z.number().int(),
172
+ unit_price: z.number().optional(),
173
+ quantity: z.number().int().optional(),
174
+ subscription_id: z.number().int().optional(),
175
+ date_starts: z.string().transform(v => new RFCDate(v)).optional(),
176
+ date_ends: z.string().transform(v => new RFCDate(v)).optional(),
177
+ payment_handler:
178
+ UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$inboundSchema
179
+ .optional(),
180
+ payment_handler_data: z.string().optional(),
181
+ }).transform((v) => {
182
+ return remap$(v, {
183
+ "variant_id": "variantId",
184
+ "unit_price": "unitPrice",
185
+ "subscription_id": "subscriptionId",
186
+ "date_starts": "dateStarts",
187
+ "date_ends": "dateEnds",
188
+ "payment_handler": "paymentHandler",
189
+ "payment_handler_data": "paymentHandlerData",
190
+ });
176
191
  });
177
- });
178
192
 
179
193
  /** @internal */
180
- export type UpdateInvoiceRequestBodyInvoicesLines$Outbound = {
194
+ export type UpdateInvoiceRequestBodyInvoicesRequest4Lines$Outbound = {
181
195
  variant_id: number;
182
196
  unit_price?: number | undefined;
183
197
  quantity?: number | undefined;
@@ -189,185 +203,204 @@ export type UpdateInvoiceRequestBodyInvoicesLines$Outbound = {
189
203
  };
190
204
 
191
205
  /** @internal */
192
- export const UpdateInvoiceRequestBodyInvoicesLines$outboundSchema: z.ZodType<
193
- UpdateInvoiceRequestBodyInvoicesLines$Outbound,
194
- z.ZodTypeDef,
195
- UpdateInvoiceRequestBodyInvoicesLines
196
- > = z.object({
197
- variantId: z.number().int(),
198
- unitPrice: z.number().optional(),
199
- quantity: z.number().int().optional(),
200
- subscriptionId: z.number().int().optional(),
201
- dateStarts: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
202
- dateEnds: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
203
- paymentHandler: UpdateInvoiceRequestBodyInvoicesPaymentHandler$outboundSchema
204
- .optional(),
205
- paymentHandlerData: z.string().optional(),
206
- }).transform((v) => {
207
- return remap$(v, {
208
- variantId: "variant_id",
209
- unitPrice: "unit_price",
210
- subscriptionId: "subscription_id",
211
- dateStarts: "date_starts",
212
- dateEnds: "date_ends",
213
- paymentHandler: "payment_handler",
214
- paymentHandlerData: "payment_handler_data",
206
+ export const UpdateInvoiceRequestBodyInvoicesRequest4Lines$outboundSchema:
207
+ z.ZodType<
208
+ UpdateInvoiceRequestBodyInvoicesRequest4Lines$Outbound,
209
+ z.ZodTypeDef,
210
+ UpdateInvoiceRequestBodyInvoicesRequest4Lines
211
+ > = z.object({
212
+ variantId: z.number().int(),
213
+ unitPrice: z.number().optional(),
214
+ quantity: z.number().int().optional(),
215
+ subscriptionId: z.number().int().optional(),
216
+ dateStarts: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
217
+ dateEnds: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
218
+ paymentHandler:
219
+ UpdateInvoiceRequestBodyInvoicesRequest4PaymentHandler$outboundSchema
220
+ .optional(),
221
+ paymentHandlerData: z.string().optional(),
222
+ }).transform((v) => {
223
+ return remap$(v, {
224
+ variantId: "variant_id",
225
+ unitPrice: "unit_price",
226
+ subscriptionId: "subscription_id",
227
+ dateStarts: "date_starts",
228
+ dateEnds: "date_ends",
229
+ paymentHandler: "payment_handler",
230
+ paymentHandlerData: "payment_handler_data",
231
+ });
215
232
  });
216
- });
217
233
 
218
234
  /**
219
235
  * @internal
220
236
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
221
237
  */
222
- export namespace UpdateInvoiceRequestBodyInvoicesLines$ {
223
- /** @deprecated use `UpdateInvoiceRequestBodyInvoicesLines$inboundSchema` instead. */
238
+ export namespace UpdateInvoiceRequestBodyInvoicesRequest4Lines$ {
239
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequest4Lines$inboundSchema` instead. */
224
240
  export const inboundSchema =
225
- UpdateInvoiceRequestBodyInvoicesLines$inboundSchema;
226
- /** @deprecated use `UpdateInvoiceRequestBodyInvoicesLines$outboundSchema` instead. */
241
+ UpdateInvoiceRequestBodyInvoicesRequest4Lines$inboundSchema;
242
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequest4Lines$outboundSchema` instead. */
227
243
  export const outboundSchema =
228
- UpdateInvoiceRequestBodyInvoicesLines$outboundSchema;
229
- /** @deprecated use `UpdateInvoiceRequestBodyInvoicesLines$Outbound` instead. */
230
- export type Outbound = UpdateInvoiceRequestBodyInvoicesLines$Outbound;
244
+ UpdateInvoiceRequestBodyInvoicesRequest4Lines$outboundSchema;
245
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequest4Lines$Outbound` instead. */
246
+ export type Outbound = UpdateInvoiceRequestBodyInvoicesRequest4Lines$Outbound;
231
247
  }
232
248
 
233
- export function updateInvoiceRequestBodyInvoicesLinesToJSON(
234
- updateInvoiceRequestBodyInvoicesLines: UpdateInvoiceRequestBodyInvoicesLines,
249
+ export function updateInvoiceRequestBodyInvoicesRequest4LinesToJSON(
250
+ updateInvoiceRequestBodyInvoicesRequest4Lines:
251
+ UpdateInvoiceRequestBodyInvoicesRequest4Lines,
235
252
  ): string {
236
253
  return JSON.stringify(
237
- UpdateInvoiceRequestBodyInvoicesLines$outboundSchema.parse(
238
- updateInvoiceRequestBodyInvoicesLines,
254
+ UpdateInvoiceRequestBodyInvoicesRequest4Lines$outboundSchema.parse(
255
+ updateInvoiceRequestBodyInvoicesRequest4Lines,
239
256
  ),
240
257
  );
241
258
  }
242
259
 
243
- export function updateInvoiceRequestBodyInvoicesLinesFromJSON(
260
+ export function updateInvoiceRequestBodyInvoicesRequest4LinesFromJSON(
244
261
  jsonString: string,
245
- ): SafeParseResult<UpdateInvoiceRequestBodyInvoicesLines, SDKValidationError> {
262
+ ): SafeParseResult<
263
+ UpdateInvoiceRequestBodyInvoicesRequest4Lines,
264
+ SDKValidationError
265
+ > {
246
266
  return safeParse(
247
267
  jsonString,
248
268
  (x) =>
249
- UpdateInvoiceRequestBodyInvoicesLines$inboundSchema.parse(JSON.parse(x)),
250
- `Failed to parse 'UpdateInvoiceRequestBodyInvoicesLines' from JSON`,
269
+ UpdateInvoiceRequestBodyInvoicesRequest4Lines$inboundSchema.parse(
270
+ JSON.parse(x),
271
+ ),
272
+ `Failed to parse 'UpdateInvoiceRequestBodyInvoicesRequest4Lines' from JSON`,
251
273
  );
252
274
  }
253
275
 
254
276
  /** @internal */
255
- export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
256
- .object({
257
- system_id: z.number().int(),
258
- lines: z.array(
259
- z.lazy(() => UpdateInvoiceRequestBodyInvoicesLines$inboundSchema),
260
- ).optional(),
261
- vendor_credential_id: z.number().int().optional(),
262
- }).transform((v) => {
263
- return remap$(v, {
264
- "system_id": "systemId",
265
- "vendor_credential_id": "vendorCredentialId",
266
- });
277
+ export const RequestBody4$inboundSchema: z.ZodType<
278
+ RequestBody4,
279
+ z.ZodTypeDef,
280
+ unknown
281
+ > = z.object({
282
+ system_id: z.number().int(),
283
+ lines: z.array(
284
+ z.lazy(() => UpdateInvoiceRequestBodyInvoicesRequest4Lines$inboundSchema),
285
+ ).optional(),
286
+ vendor_credential_id: z.number().int().optional(),
287
+ }).transform((v) => {
288
+ return remap$(v, {
289
+ "system_id": "systemId",
290
+ "vendor_credential_id": "vendorCredentialId",
267
291
  });
292
+ });
268
293
 
269
294
  /** @internal */
270
- export type Four$Outbound = {
295
+ export type RequestBody4$Outbound = {
271
296
  system_id: number;
272
- lines?: Array<UpdateInvoiceRequestBodyInvoicesLines$Outbound> | undefined;
297
+ lines?:
298
+ | Array<UpdateInvoiceRequestBodyInvoicesRequest4Lines$Outbound>
299
+ | undefined;
273
300
  vendor_credential_id?: number | undefined;
274
301
  };
275
302
 
276
303
  /** @internal */
277
- export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
278
- z.object({
279
- systemId: z.number().int(),
280
- lines: z.array(
281
- z.lazy(() => UpdateInvoiceRequestBodyInvoicesLines$outboundSchema),
282
- ).optional(),
283
- vendorCredentialId: z.number().int().optional(),
284
- }).transform((v) => {
285
- return remap$(v, {
286
- systemId: "system_id",
287
- vendorCredentialId: "vendor_credential_id",
288
- });
304
+ export const RequestBody4$outboundSchema: z.ZodType<
305
+ RequestBody4$Outbound,
306
+ z.ZodTypeDef,
307
+ RequestBody4
308
+ > = z.object({
309
+ systemId: z.number().int(),
310
+ lines: z.array(
311
+ z.lazy(() => UpdateInvoiceRequestBodyInvoicesRequest4Lines$outboundSchema),
312
+ ).optional(),
313
+ vendorCredentialId: z.number().int().optional(),
314
+ }).transform((v) => {
315
+ return remap$(v, {
316
+ systemId: "system_id",
317
+ vendorCredentialId: "vendor_credential_id",
289
318
  });
319
+ });
290
320
 
291
321
  /**
292
322
  * @internal
293
323
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
294
324
  */
295
- export namespace Four$ {
296
- /** @deprecated use `Four$inboundSchema` instead. */
297
- export const inboundSchema = Four$inboundSchema;
298
- /** @deprecated use `Four$outboundSchema` instead. */
299
- export const outboundSchema = Four$outboundSchema;
300
- /** @deprecated use `Four$Outbound` instead. */
301
- export type Outbound = Four$Outbound;
325
+ export namespace RequestBody4$ {
326
+ /** @deprecated use `RequestBody4$inboundSchema` instead. */
327
+ export const inboundSchema = RequestBody4$inboundSchema;
328
+ /** @deprecated use `RequestBody4$outboundSchema` instead. */
329
+ export const outboundSchema = RequestBody4$outboundSchema;
330
+ /** @deprecated use `RequestBody4$Outbound` instead. */
331
+ export type Outbound = RequestBody4$Outbound;
302
332
  }
303
333
 
304
- export function fourToJSON(four: Four): string {
305
- return JSON.stringify(Four$outboundSchema.parse(four));
334
+ export function requestBody4ToJSON(requestBody4: RequestBody4): string {
335
+ return JSON.stringify(RequestBody4$outboundSchema.parse(requestBody4));
306
336
  }
307
337
 
308
- export function fourFromJSON(
338
+ export function requestBody4FromJSON(
309
339
  jsonString: string,
310
- ): SafeParseResult<Four, SDKValidationError> {
340
+ ): SafeParseResult<RequestBody4, SDKValidationError> {
311
341
  return safeParse(
312
342
  jsonString,
313
- (x) => Four$inboundSchema.parse(JSON.parse(x)),
314
- `Failed to parse 'Four' from JSON`,
343
+ (x) => RequestBody4$inboundSchema.parse(JSON.parse(x)),
344
+ `Failed to parse 'RequestBody4' from JSON`,
315
345
  );
316
346
  }
317
347
 
318
348
  /** @internal */
319
- export const UpdateInvoiceRequestBodyPaymentHandler$inboundSchema:
320
- z.ZodNativeEnum<typeof UpdateInvoiceRequestBodyPaymentHandler> = z.nativeEnum(
321
- UpdateInvoiceRequestBodyPaymentHandler,
322
- );
349
+ export const UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$inboundSchema:
350
+ z.ZodNativeEnum<
351
+ typeof UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler
352
+ > = z.nativeEnum(UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler);
323
353
 
324
354
  /** @internal */
325
- export const UpdateInvoiceRequestBodyPaymentHandler$outboundSchema:
326
- z.ZodNativeEnum<typeof UpdateInvoiceRequestBodyPaymentHandler> =
327
- UpdateInvoiceRequestBodyPaymentHandler$inboundSchema;
355
+ export const UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$outboundSchema:
356
+ z.ZodNativeEnum<
357
+ typeof UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler
358
+ > = UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$inboundSchema;
328
359
 
329
360
  /**
330
361
  * @internal
331
362
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
332
363
  */
333
- export namespace UpdateInvoiceRequestBodyPaymentHandler$ {
334
- /** @deprecated use `UpdateInvoiceRequestBodyPaymentHandler$inboundSchema` instead. */
364
+ export namespace UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$ {
365
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$inboundSchema` instead. */
335
366
  export const inboundSchema =
336
- UpdateInvoiceRequestBodyPaymentHandler$inboundSchema;
337
- /** @deprecated use `UpdateInvoiceRequestBodyPaymentHandler$outboundSchema` instead. */
367
+ UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$inboundSchema;
368
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$outboundSchema` instead. */
338
369
  export const outboundSchema =
339
- UpdateInvoiceRequestBodyPaymentHandler$outboundSchema;
370
+ UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$outboundSchema;
340
371
  }
341
372
 
342
373
  /** @internal */
343
- export const UpdateInvoiceRequestBodyLines$inboundSchema: z.ZodType<
344
- UpdateInvoiceRequestBodyLines,
345
- z.ZodTypeDef,
346
- unknown
347
- > = z.object({
348
- variant_id: z.number().int(),
349
- unit_price: z.number().optional(),
350
- quantity: z.number().int().optional(),
351
- subscription_id: z.number().int().optional(),
352
- date_starts: z.string().transform(v => new RFCDate(v)).optional(),
353
- date_ends: z.string().transform(v => new RFCDate(v)).optional(),
354
- payment_handler: UpdateInvoiceRequestBodyPaymentHandler$inboundSchema
355
- .optional(),
356
- payment_handler_data: z.string().optional(),
357
- }).transform((v) => {
358
- return remap$(v, {
359
- "variant_id": "variantId",
360
- "unit_price": "unitPrice",
361
- "subscription_id": "subscriptionId",
362
- "date_starts": "dateStarts",
363
- "date_ends": "dateEnds",
364
- "payment_handler": "paymentHandler",
365
- "payment_handler_data": "paymentHandlerData",
374
+ export const UpdateInvoiceRequestBodyInvoicesRequestLines$inboundSchema:
375
+ z.ZodType<
376
+ UpdateInvoiceRequestBodyInvoicesRequestLines,
377
+ z.ZodTypeDef,
378
+ unknown
379
+ > = z.object({
380
+ variant_id: z.number().int(),
381
+ unit_price: z.number().optional(),
382
+ quantity: z.number().int().optional(),
383
+ subscription_id: z.number().int().optional(),
384
+ date_starts: z.string().transform(v => new RFCDate(v)).optional(),
385
+ date_ends: z.string().transform(v => new RFCDate(v)).optional(),
386
+ payment_handler:
387
+ UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$inboundSchema
388
+ .optional(),
389
+ payment_handler_data: z.string().optional(),
390
+ }).transform((v) => {
391
+ return remap$(v, {
392
+ "variant_id": "variantId",
393
+ "unit_price": "unitPrice",
394
+ "subscription_id": "subscriptionId",
395
+ "date_starts": "dateStarts",
396
+ "date_ends": "dateEnds",
397
+ "payment_handler": "paymentHandler",
398
+ "payment_handler_data": "paymentHandlerData",
399
+ });
366
400
  });
367
- });
368
401
 
369
402
  /** @internal */
370
- export type UpdateInvoiceRequestBodyLines$Outbound = {
403
+ export type UpdateInvoiceRequestBodyInvoicesRequestLines$Outbound = {
371
404
  variant_id: number;
372
405
  unit_price?: number | undefined;
373
406
  quantity?: number | undefined;
@@ -379,95 +412,113 @@ export type UpdateInvoiceRequestBodyLines$Outbound = {
379
412
  };
380
413
 
381
414
  /** @internal */
382
- export const UpdateInvoiceRequestBodyLines$outboundSchema: z.ZodType<
383
- UpdateInvoiceRequestBodyLines$Outbound,
384
- z.ZodTypeDef,
385
- UpdateInvoiceRequestBodyLines
386
- > = z.object({
387
- variantId: z.number().int(),
388
- unitPrice: z.number().optional(),
389
- quantity: z.number().int().optional(),
390
- subscriptionId: z.number().int().optional(),
391
- dateStarts: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
392
- dateEnds: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
393
- paymentHandler: UpdateInvoiceRequestBodyPaymentHandler$outboundSchema
394
- .optional(),
395
- paymentHandlerData: z.string().optional(),
396
- }).transform((v) => {
397
- return remap$(v, {
398
- variantId: "variant_id",
399
- unitPrice: "unit_price",
400
- subscriptionId: "subscription_id",
401
- dateStarts: "date_starts",
402
- dateEnds: "date_ends",
403
- paymentHandler: "payment_handler",
404
- paymentHandlerData: "payment_handler_data",
415
+ export const UpdateInvoiceRequestBodyInvoicesRequestLines$outboundSchema:
416
+ z.ZodType<
417
+ UpdateInvoiceRequestBodyInvoicesRequestLines$Outbound,
418
+ z.ZodTypeDef,
419
+ UpdateInvoiceRequestBodyInvoicesRequestLines
420
+ > = z.object({
421
+ variantId: z.number().int(),
422
+ unitPrice: z.number().optional(),
423
+ quantity: z.number().int().optional(),
424
+ subscriptionId: z.number().int().optional(),
425
+ dateStarts: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
426
+ dateEnds: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
427
+ paymentHandler:
428
+ UpdateInvoiceRequestBodyInvoicesRequestPaymentHandler$outboundSchema
429
+ .optional(),
430
+ paymentHandlerData: z.string().optional(),
431
+ }).transform((v) => {
432
+ return remap$(v, {
433
+ variantId: "variant_id",
434
+ unitPrice: "unit_price",
435
+ subscriptionId: "subscription_id",
436
+ dateStarts: "date_starts",
437
+ dateEnds: "date_ends",
438
+ paymentHandler: "payment_handler",
439
+ paymentHandlerData: "payment_handler_data",
440
+ });
405
441
  });
406
- });
407
442
 
408
443
  /**
409
444
  * @internal
410
445
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
411
446
  */
412
- export namespace UpdateInvoiceRequestBodyLines$ {
413
- /** @deprecated use `UpdateInvoiceRequestBodyLines$inboundSchema` instead. */
414
- export const inboundSchema = UpdateInvoiceRequestBodyLines$inboundSchema;
415
- /** @deprecated use `UpdateInvoiceRequestBodyLines$outboundSchema` instead. */
416
- export const outboundSchema = UpdateInvoiceRequestBodyLines$outboundSchema;
417
- /** @deprecated use `UpdateInvoiceRequestBodyLines$Outbound` instead. */
418
- export type Outbound = UpdateInvoiceRequestBodyLines$Outbound;
447
+ export namespace UpdateInvoiceRequestBodyInvoicesRequestLines$ {
448
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequestLines$inboundSchema` instead. */
449
+ export const inboundSchema =
450
+ UpdateInvoiceRequestBodyInvoicesRequestLines$inboundSchema;
451
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequestLines$outboundSchema` instead. */
452
+ export const outboundSchema =
453
+ UpdateInvoiceRequestBodyInvoicesRequestLines$outboundSchema;
454
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesRequestLines$Outbound` instead. */
455
+ export type Outbound = UpdateInvoiceRequestBodyInvoicesRequestLines$Outbound;
419
456
  }
420
457
 
421
- export function updateInvoiceRequestBodyLinesToJSON(
422
- updateInvoiceRequestBodyLines: UpdateInvoiceRequestBodyLines,
458
+ export function updateInvoiceRequestBodyInvoicesRequestLinesToJSON(
459
+ updateInvoiceRequestBodyInvoicesRequestLines:
460
+ UpdateInvoiceRequestBodyInvoicesRequestLines,
423
461
  ): string {
424
462
  return JSON.stringify(
425
- UpdateInvoiceRequestBodyLines$outboundSchema.parse(
426
- updateInvoiceRequestBodyLines,
463
+ UpdateInvoiceRequestBodyInvoicesRequestLines$outboundSchema.parse(
464
+ updateInvoiceRequestBodyInvoicesRequestLines,
427
465
  ),
428
466
  );
429
467
  }
430
468
 
431
- export function updateInvoiceRequestBodyLinesFromJSON(
469
+ export function updateInvoiceRequestBodyInvoicesRequestLinesFromJSON(
432
470
  jsonString: string,
433
- ): SafeParseResult<UpdateInvoiceRequestBodyLines, SDKValidationError> {
471
+ ): SafeParseResult<
472
+ UpdateInvoiceRequestBodyInvoicesRequestLines,
473
+ SDKValidationError
474
+ > {
434
475
  return safeParse(
435
476
  jsonString,
436
- (x) => UpdateInvoiceRequestBodyLines$inboundSchema.parse(JSON.parse(x)),
437
- `Failed to parse 'UpdateInvoiceRequestBodyLines' from JSON`,
477
+ (x) =>
478
+ UpdateInvoiceRequestBodyInvoicesRequestLines$inboundSchema.parse(
479
+ JSON.parse(x),
480
+ ),
481
+ `Failed to parse 'UpdateInvoiceRequestBodyInvoicesRequestLines' from JSON`,
438
482
  );
439
483
  }
440
484
 
441
485
  /** @internal */
442
- export const Three$inboundSchema: z.ZodType<Three, z.ZodTypeDef, unknown> = z
443
- .object({
444
- facility_id: z.number().int(),
445
- lines: z.array(z.lazy(() => UpdateInvoiceRequestBodyLines$inboundSchema))
446
- .optional(),
447
- vendor_credential_id: z.number().int().optional(),
448
- }).transform((v) => {
449
- return remap$(v, {
450
- "facility_id": "facilityId",
451
- "vendor_credential_id": "vendorCredentialId",
452
- });
486
+ export const RequestBody3$inboundSchema: z.ZodType<
487
+ RequestBody3,
488
+ z.ZodTypeDef,
489
+ unknown
490
+ > = z.object({
491
+ facility_id: z.number().int(),
492
+ lines: z.array(
493
+ z.lazy(() => UpdateInvoiceRequestBodyInvoicesRequestLines$inboundSchema),
494
+ ).optional(),
495
+ vendor_credential_id: z.number().int().optional(),
496
+ }).transform((v) => {
497
+ return remap$(v, {
498
+ "facility_id": "facilityId",
499
+ "vendor_credential_id": "vendorCredentialId",
453
500
  });
501
+ });
454
502
 
455
503
  /** @internal */
456
- export type Three$Outbound = {
504
+ export type RequestBody3$Outbound = {
457
505
  facility_id: number;
458
- lines?: Array<UpdateInvoiceRequestBodyLines$Outbound> | undefined;
506
+ lines?:
507
+ | Array<UpdateInvoiceRequestBodyInvoicesRequestLines$Outbound>
508
+ | undefined;
459
509
  vendor_credential_id?: number | undefined;
460
510
  };
461
511
 
462
512
  /** @internal */
463
- export const Three$outboundSchema: z.ZodType<
464
- Three$Outbound,
513
+ export const RequestBody3$outboundSchema: z.ZodType<
514
+ RequestBody3$Outbound,
465
515
  z.ZodTypeDef,
466
- Three
516
+ RequestBody3
467
517
  > = z.object({
468
518
  facilityId: z.number().int(),
469
- lines: z.array(z.lazy(() => UpdateInvoiceRequestBodyLines$outboundSchema))
470
- .optional(),
519
+ lines: z.array(
520
+ z.lazy(() => UpdateInvoiceRequestBodyInvoicesRequestLines$outboundSchema),
521
+ ).optional(),
471
522
  vendorCredentialId: z.number().int().optional(),
472
523
  }).transform((v) => {
473
524
  return remap$(v, {
@@ -480,53 +531,55 @@ export const Three$outboundSchema: z.ZodType<
480
531
  * @internal
481
532
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
482
533
  */
483
- export namespace Three$ {
484
- /** @deprecated use `Three$inboundSchema` instead. */
485
- export const inboundSchema = Three$inboundSchema;
486
- /** @deprecated use `Three$outboundSchema` instead. */
487
- export const outboundSchema = Three$outboundSchema;
488
- /** @deprecated use `Three$Outbound` instead. */
489
- export type Outbound = Three$Outbound;
534
+ export namespace RequestBody3$ {
535
+ /** @deprecated use `RequestBody3$inboundSchema` instead. */
536
+ export const inboundSchema = RequestBody3$inboundSchema;
537
+ /** @deprecated use `RequestBody3$outboundSchema` instead. */
538
+ export const outboundSchema = RequestBody3$outboundSchema;
539
+ /** @deprecated use `RequestBody3$Outbound` instead. */
540
+ export type Outbound = RequestBody3$Outbound;
490
541
  }
491
542
 
492
- export function threeToJSON(three: Three): string {
493
- return JSON.stringify(Three$outboundSchema.parse(three));
543
+ export function requestBody3ToJSON(requestBody3: RequestBody3): string {
544
+ return JSON.stringify(RequestBody3$outboundSchema.parse(requestBody3));
494
545
  }
495
546
 
496
- export function threeFromJSON(
547
+ export function requestBody3FromJSON(
497
548
  jsonString: string,
498
- ): SafeParseResult<Three, SDKValidationError> {
549
+ ): SafeParseResult<RequestBody3, SDKValidationError> {
499
550
  return safeParse(
500
551
  jsonString,
501
- (x) => Three$inboundSchema.parse(JSON.parse(x)),
502
- `Failed to parse 'Three' from JSON`,
552
+ (x) => RequestBody3$inboundSchema.parse(JSON.parse(x)),
553
+ `Failed to parse 'RequestBody3' from JSON`,
503
554
  );
504
555
  }
505
556
 
506
557
  /** @internal */
507
- export const RequestBodyPaymentHandler$inboundSchema: z.ZodNativeEnum<
508
- typeof RequestBodyPaymentHandler
509
- > = z.nativeEnum(RequestBodyPaymentHandler);
558
+ export const UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema:
559
+ z.ZodNativeEnum<typeof UpdateInvoiceRequestBodyInvoicesPaymentHandler> = z
560
+ .nativeEnum(UpdateInvoiceRequestBodyInvoicesPaymentHandler);
510
561
 
511
562
  /** @internal */
512
- export const RequestBodyPaymentHandler$outboundSchema: z.ZodNativeEnum<
513
- typeof RequestBodyPaymentHandler
514
- > = RequestBodyPaymentHandler$inboundSchema;
563
+ export const UpdateInvoiceRequestBodyInvoicesPaymentHandler$outboundSchema:
564
+ z.ZodNativeEnum<typeof UpdateInvoiceRequestBodyInvoicesPaymentHandler> =
565
+ UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema;
515
566
 
516
567
  /**
517
568
  * @internal
518
569
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
519
570
  */
520
- export namespace RequestBodyPaymentHandler$ {
521
- /** @deprecated use `RequestBodyPaymentHandler$inboundSchema` instead. */
522
- export const inboundSchema = RequestBodyPaymentHandler$inboundSchema;
523
- /** @deprecated use `RequestBodyPaymentHandler$outboundSchema` instead. */
524
- export const outboundSchema = RequestBodyPaymentHandler$outboundSchema;
571
+ export namespace UpdateInvoiceRequestBodyInvoicesPaymentHandler$ {
572
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema` instead. */
573
+ export const inboundSchema =
574
+ UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema;
575
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesPaymentHandler$outboundSchema` instead. */
576
+ export const outboundSchema =
577
+ UpdateInvoiceRequestBodyInvoicesPaymentHandler$outboundSchema;
525
578
  }
526
579
 
527
580
  /** @internal */
528
- export const RequestBodyLines$inboundSchema: z.ZodType<
529
- RequestBodyLines,
581
+ export const UpdateInvoiceRequestBodyInvoicesLines$inboundSchema: z.ZodType<
582
+ UpdateInvoiceRequestBodyInvoicesLines,
530
583
  z.ZodTypeDef,
531
584
  unknown
532
585
  > = z.object({
@@ -536,7 +589,8 @@ export const RequestBodyLines$inboundSchema: z.ZodType<
536
589
  subscription_id: z.number().int().optional(),
537
590
  date_starts: z.string().transform(v => new RFCDate(v)).optional(),
538
591
  date_ends: z.string().transform(v => new RFCDate(v)).optional(),
539
- payment_handler: RequestBodyPaymentHandler$inboundSchema.optional(),
592
+ payment_handler: UpdateInvoiceRequestBodyInvoicesPaymentHandler$inboundSchema
593
+ .optional(),
540
594
  payment_handler_data: z.string().optional(),
541
595
  }).transform((v) => {
542
596
  return remap$(v, {
@@ -551,7 +605,7 @@ export const RequestBodyLines$inboundSchema: z.ZodType<
551
605
  });
552
606
 
553
607
  /** @internal */
554
- export type RequestBodyLines$Outbound = {
608
+ export type UpdateInvoiceRequestBodyInvoicesLines$Outbound = {
555
609
  variant_id: number;
556
610
  unit_price?: number | undefined;
557
611
  quantity?: number | undefined;
@@ -563,10 +617,10 @@ export type RequestBodyLines$Outbound = {
563
617
  };
564
618
 
565
619
  /** @internal */
566
- export const RequestBodyLines$outboundSchema: z.ZodType<
567
- RequestBodyLines$Outbound,
620
+ export const UpdateInvoiceRequestBodyInvoicesLines$outboundSchema: z.ZodType<
621
+ UpdateInvoiceRequestBodyInvoicesLines$Outbound,
568
622
  z.ZodTypeDef,
569
- RequestBodyLines
623
+ UpdateInvoiceRequestBodyInvoicesLines
570
624
  > = z.object({
571
625
  variantId: z.number().int(),
572
626
  unitPrice: z.number().optional(),
@@ -574,7 +628,8 @@ export const RequestBodyLines$outboundSchema: z.ZodType<
574
628
  subscriptionId: z.number().int().optional(),
575
629
  dateStarts: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
576
630
  dateEnds: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
577
- paymentHandler: RequestBodyPaymentHandler$outboundSchema.optional(),
631
+ paymentHandler: UpdateInvoiceRequestBodyInvoicesPaymentHandler$outboundSchema
632
+ .optional(),
578
633
  paymentHandlerData: z.string().optional(),
579
634
  }).transform((v) => {
580
635
  return remap$(v, {
@@ -592,41 +647,48 @@ export const RequestBodyLines$outboundSchema: z.ZodType<
592
647
  * @internal
593
648
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
594
649
  */
595
- export namespace RequestBodyLines$ {
596
- /** @deprecated use `RequestBodyLines$inboundSchema` instead. */
597
- export const inboundSchema = RequestBodyLines$inboundSchema;
598
- /** @deprecated use `RequestBodyLines$outboundSchema` instead. */
599
- export const outboundSchema = RequestBodyLines$outboundSchema;
600
- /** @deprecated use `RequestBodyLines$Outbound` instead. */
601
- export type Outbound = RequestBodyLines$Outbound;
650
+ export namespace UpdateInvoiceRequestBodyInvoicesLines$ {
651
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesLines$inboundSchema` instead. */
652
+ export const inboundSchema =
653
+ UpdateInvoiceRequestBodyInvoicesLines$inboundSchema;
654
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesLines$outboundSchema` instead. */
655
+ export const outboundSchema =
656
+ UpdateInvoiceRequestBodyInvoicesLines$outboundSchema;
657
+ /** @deprecated use `UpdateInvoiceRequestBodyInvoicesLines$Outbound` instead. */
658
+ export type Outbound = UpdateInvoiceRequestBodyInvoicesLines$Outbound;
602
659
  }
603
660
 
604
- export function requestBodyLinesToJSON(
605
- requestBodyLines: RequestBodyLines,
661
+ export function updateInvoiceRequestBodyInvoicesLinesToJSON(
662
+ updateInvoiceRequestBodyInvoicesLines: UpdateInvoiceRequestBodyInvoicesLines,
606
663
  ): string {
607
664
  return JSON.stringify(
608
- RequestBodyLines$outboundSchema.parse(requestBodyLines),
665
+ UpdateInvoiceRequestBodyInvoicesLines$outboundSchema.parse(
666
+ updateInvoiceRequestBodyInvoicesLines,
667
+ ),
609
668
  );
610
669
  }
611
670
 
612
- export function requestBodyLinesFromJSON(
671
+ export function updateInvoiceRequestBodyInvoicesLinesFromJSON(
613
672
  jsonString: string,
614
- ): SafeParseResult<RequestBodyLines, SDKValidationError> {
673
+ ): SafeParseResult<UpdateInvoiceRequestBodyInvoicesLines, SDKValidationError> {
615
674
  return safeParse(
616
675
  jsonString,
617
- (x) => RequestBodyLines$inboundSchema.parse(JSON.parse(x)),
618
- `Failed to parse 'RequestBodyLines' from JSON`,
676
+ (x) =>
677
+ UpdateInvoiceRequestBodyInvoicesLines$inboundSchema.parse(JSON.parse(x)),
678
+ `Failed to parse 'UpdateInvoiceRequestBodyInvoicesLines' from JSON`,
619
679
  );
620
680
  }
621
681
 
622
682
  /** @internal */
623
- export const RequestBody2$inboundSchema: z.ZodType<
624
- RequestBody2,
683
+ export const UpdateInvoiceRequestBody2$inboundSchema: z.ZodType<
684
+ UpdateInvoiceRequestBody2,
625
685
  z.ZodTypeDef,
626
686
  unknown
627
687
  > = z.object({
628
688
  company_id: z.number().int(),
629
- lines: z.array(z.lazy(() => RequestBodyLines$inboundSchema)).optional(),
689
+ lines: z.array(
690
+ z.lazy(() => UpdateInvoiceRequestBodyInvoicesLines$inboundSchema),
691
+ ).optional(),
630
692
  vendor_credential_id: z.number().int().optional(),
631
693
  }).transform((v) => {
632
694
  return remap$(v, {
@@ -636,20 +698,22 @@ export const RequestBody2$inboundSchema: z.ZodType<
636
698
  });
637
699
 
638
700
  /** @internal */
639
- export type RequestBody2$Outbound = {
701
+ export type UpdateInvoiceRequestBody2$Outbound = {
640
702
  company_id: number;
641
- lines?: Array<RequestBodyLines$Outbound> | undefined;
703
+ lines?: Array<UpdateInvoiceRequestBodyInvoicesLines$Outbound> | undefined;
642
704
  vendor_credential_id?: number | undefined;
643
705
  };
644
706
 
645
707
  /** @internal */
646
- export const RequestBody2$outboundSchema: z.ZodType<
647
- RequestBody2$Outbound,
708
+ export const UpdateInvoiceRequestBody2$outboundSchema: z.ZodType<
709
+ UpdateInvoiceRequestBody2$Outbound,
648
710
  z.ZodTypeDef,
649
- RequestBody2
711
+ UpdateInvoiceRequestBody2
650
712
  > = z.object({
651
713
  companyId: z.number().int(),
652
- lines: z.array(z.lazy(() => RequestBodyLines$outboundSchema)).optional(),
714
+ lines: z.array(
715
+ z.lazy(() => UpdateInvoiceRequestBodyInvoicesLines$outboundSchema),
716
+ ).optional(),
653
717
  vendorCredentialId: z.number().int().optional(),
654
718
  }).transform((v) => {
655
719
  return remap$(v, {
@@ -662,75 +726,86 @@ export const RequestBody2$outboundSchema: z.ZodType<
662
726
  * @internal
663
727
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
664
728
  */
665
- export namespace RequestBody2$ {
666
- /** @deprecated use `RequestBody2$inboundSchema` instead. */
667
- export const inboundSchema = RequestBody2$inboundSchema;
668
- /** @deprecated use `RequestBody2$outboundSchema` instead. */
669
- export const outboundSchema = RequestBody2$outboundSchema;
670
- /** @deprecated use `RequestBody2$Outbound` instead. */
671
- export type Outbound = RequestBody2$Outbound;
729
+ export namespace UpdateInvoiceRequestBody2$ {
730
+ /** @deprecated use `UpdateInvoiceRequestBody2$inboundSchema` instead. */
731
+ export const inboundSchema = UpdateInvoiceRequestBody2$inboundSchema;
732
+ /** @deprecated use `UpdateInvoiceRequestBody2$outboundSchema` instead. */
733
+ export const outboundSchema = UpdateInvoiceRequestBody2$outboundSchema;
734
+ /** @deprecated use `UpdateInvoiceRequestBody2$Outbound` instead. */
735
+ export type Outbound = UpdateInvoiceRequestBody2$Outbound;
672
736
  }
673
737
 
674
- export function requestBody2ToJSON(requestBody2: RequestBody2): string {
675
- return JSON.stringify(RequestBody2$outboundSchema.parse(requestBody2));
738
+ export function updateInvoiceRequestBody2ToJSON(
739
+ updateInvoiceRequestBody2: UpdateInvoiceRequestBody2,
740
+ ): string {
741
+ return JSON.stringify(
742
+ UpdateInvoiceRequestBody2$outboundSchema.parse(updateInvoiceRequestBody2),
743
+ );
676
744
  }
677
745
 
678
- export function requestBody2FromJSON(
746
+ export function updateInvoiceRequestBody2FromJSON(
679
747
  jsonString: string,
680
- ): SafeParseResult<RequestBody2, SDKValidationError> {
748
+ ): SafeParseResult<UpdateInvoiceRequestBody2, SDKValidationError> {
681
749
  return safeParse(
682
750
  jsonString,
683
- (x) => RequestBody2$inboundSchema.parse(JSON.parse(x)),
684
- `Failed to parse 'RequestBody2' from JSON`,
751
+ (x) => UpdateInvoiceRequestBody2$inboundSchema.parse(JSON.parse(x)),
752
+ `Failed to parse 'UpdateInvoiceRequestBody2' from JSON`,
685
753
  );
686
754
  }
687
755
 
688
756
  /** @internal */
689
- export const PaymentHandler$inboundSchema: z.ZodNativeEnum<
690
- typeof PaymentHandler
691
- > = z.nativeEnum(PaymentHandler);
757
+ export const UpdateInvoiceRequestBodyPaymentHandler$inboundSchema:
758
+ z.ZodNativeEnum<typeof UpdateInvoiceRequestBodyPaymentHandler> = z.nativeEnum(
759
+ UpdateInvoiceRequestBodyPaymentHandler,
760
+ );
692
761
 
693
762
  /** @internal */
694
- export const PaymentHandler$outboundSchema: z.ZodNativeEnum<
695
- typeof PaymentHandler
696
- > = PaymentHandler$inboundSchema;
763
+ export const UpdateInvoiceRequestBodyPaymentHandler$outboundSchema:
764
+ z.ZodNativeEnum<typeof UpdateInvoiceRequestBodyPaymentHandler> =
765
+ UpdateInvoiceRequestBodyPaymentHandler$inboundSchema;
697
766
 
698
767
  /**
699
768
  * @internal
700
769
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
701
770
  */
702
- export namespace PaymentHandler$ {
703
- /** @deprecated use `PaymentHandler$inboundSchema` instead. */
704
- export const inboundSchema = PaymentHandler$inboundSchema;
705
- /** @deprecated use `PaymentHandler$outboundSchema` instead. */
706
- export const outboundSchema = PaymentHandler$outboundSchema;
771
+ export namespace UpdateInvoiceRequestBodyPaymentHandler$ {
772
+ /** @deprecated use `UpdateInvoiceRequestBodyPaymentHandler$inboundSchema` instead. */
773
+ export const inboundSchema =
774
+ UpdateInvoiceRequestBodyPaymentHandler$inboundSchema;
775
+ /** @deprecated use `UpdateInvoiceRequestBodyPaymentHandler$outboundSchema` instead. */
776
+ export const outboundSchema =
777
+ UpdateInvoiceRequestBodyPaymentHandler$outboundSchema;
707
778
  }
708
779
 
709
780
  /** @internal */
710
- export const Lines$inboundSchema: z.ZodType<Lines, z.ZodTypeDef, unknown> = z
711
- .object({
712
- variant_id: z.number().int(),
713
- unit_price: z.number().optional(),
714
- quantity: z.number().int().optional(),
715
- subscription_id: z.number().int().optional(),
716
- date_starts: z.string().transform(v => new RFCDate(v)).optional(),
717
- date_ends: z.string().transform(v => new RFCDate(v)).optional(),
718
- payment_handler: PaymentHandler$inboundSchema.optional(),
719
- payment_handler_data: z.string().optional(),
720
- }).transform((v) => {
721
- return remap$(v, {
722
- "variant_id": "variantId",
723
- "unit_price": "unitPrice",
724
- "subscription_id": "subscriptionId",
725
- "date_starts": "dateStarts",
726
- "date_ends": "dateEnds",
727
- "payment_handler": "paymentHandler",
728
- "payment_handler_data": "paymentHandlerData",
729
- });
781
+ export const UpdateInvoiceRequestBodyLines$inboundSchema: z.ZodType<
782
+ UpdateInvoiceRequestBodyLines,
783
+ z.ZodTypeDef,
784
+ unknown
785
+ > = z.object({
786
+ variant_id: z.number().int(),
787
+ unit_price: z.number().optional(),
788
+ quantity: z.number().int().optional(),
789
+ subscription_id: z.number().int().optional(),
790
+ date_starts: z.string().transform(v => new RFCDate(v)).optional(),
791
+ date_ends: z.string().transform(v => new RFCDate(v)).optional(),
792
+ payment_handler: UpdateInvoiceRequestBodyPaymentHandler$inboundSchema
793
+ .optional(),
794
+ payment_handler_data: z.string().optional(),
795
+ }).transform((v) => {
796
+ return remap$(v, {
797
+ "variant_id": "variantId",
798
+ "unit_price": "unitPrice",
799
+ "subscription_id": "subscriptionId",
800
+ "date_starts": "dateStarts",
801
+ "date_ends": "dateEnds",
802
+ "payment_handler": "paymentHandler",
803
+ "payment_handler_data": "paymentHandlerData",
730
804
  });
805
+ });
731
806
 
732
807
  /** @internal */
733
- export type Lines$Outbound = {
808
+ export type UpdateInvoiceRequestBodyLines$Outbound = {
734
809
  variant_id: number;
735
810
  unit_price?: number | undefined;
736
811
  quantity?: number | undefined;
@@ -742,10 +817,10 @@ export type Lines$Outbound = {
742
817
  };
743
818
 
744
819
  /** @internal */
745
- export const Lines$outboundSchema: z.ZodType<
746
- Lines$Outbound,
820
+ export const UpdateInvoiceRequestBodyLines$outboundSchema: z.ZodType<
821
+ UpdateInvoiceRequestBodyLines$Outbound,
747
822
  z.ZodTypeDef,
748
- Lines
823
+ UpdateInvoiceRequestBodyLines
749
824
  > = z.object({
750
825
  variantId: z.number().int(),
751
826
  unitPrice: z.number().optional(),
@@ -753,7 +828,8 @@ export const Lines$outboundSchema: z.ZodType<
753
828
  subscriptionId: z.number().int().optional(),
754
829
  dateStarts: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
755
830
  dateEnds: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
756
- paymentHandler: PaymentHandler$outboundSchema.optional(),
831
+ paymentHandler: UpdateInvoiceRequestBodyPaymentHandler$outboundSchema
832
+ .optional(),
757
833
  paymentHandlerData: z.string().optional(),
758
834
  }).transform((v) => {
759
835
  return remap$(v, {
@@ -771,37 +847,44 @@ export const Lines$outboundSchema: z.ZodType<
771
847
  * @internal
772
848
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
773
849
  */
774
- export namespace Lines$ {
775
- /** @deprecated use `Lines$inboundSchema` instead. */
776
- export const inboundSchema = Lines$inboundSchema;
777
- /** @deprecated use `Lines$outboundSchema` instead. */
778
- export const outboundSchema = Lines$outboundSchema;
779
- /** @deprecated use `Lines$Outbound` instead. */
780
- export type Outbound = Lines$Outbound;
850
+ export namespace UpdateInvoiceRequestBodyLines$ {
851
+ /** @deprecated use `UpdateInvoiceRequestBodyLines$inboundSchema` instead. */
852
+ export const inboundSchema = UpdateInvoiceRequestBodyLines$inboundSchema;
853
+ /** @deprecated use `UpdateInvoiceRequestBodyLines$outboundSchema` instead. */
854
+ export const outboundSchema = UpdateInvoiceRequestBodyLines$outboundSchema;
855
+ /** @deprecated use `UpdateInvoiceRequestBodyLines$Outbound` instead. */
856
+ export type Outbound = UpdateInvoiceRequestBodyLines$Outbound;
781
857
  }
782
858
 
783
- export function linesToJSON(lines: Lines): string {
784
- return JSON.stringify(Lines$outboundSchema.parse(lines));
859
+ export function updateInvoiceRequestBodyLinesToJSON(
860
+ updateInvoiceRequestBodyLines: UpdateInvoiceRequestBodyLines,
861
+ ): string {
862
+ return JSON.stringify(
863
+ UpdateInvoiceRequestBodyLines$outboundSchema.parse(
864
+ updateInvoiceRequestBodyLines,
865
+ ),
866
+ );
785
867
  }
786
868
 
787
- export function linesFromJSON(
869
+ export function updateInvoiceRequestBodyLinesFromJSON(
788
870
  jsonString: string,
789
- ): SafeParseResult<Lines, SDKValidationError> {
871
+ ): SafeParseResult<UpdateInvoiceRequestBodyLines, SDKValidationError> {
790
872
  return safeParse(
791
873
  jsonString,
792
- (x) => Lines$inboundSchema.parse(JSON.parse(x)),
793
- `Failed to parse 'Lines' from JSON`,
874
+ (x) => UpdateInvoiceRequestBodyLines$inboundSchema.parse(JSON.parse(x)),
875
+ `Failed to parse 'UpdateInvoiceRequestBodyLines' from JSON`,
794
876
  );
795
877
  }
796
878
 
797
879
  /** @internal */
798
- export const RequestBody1$inboundSchema: z.ZodType<
799
- RequestBody1,
880
+ export const UpdateInvoiceRequestBody1$inboundSchema: z.ZodType<
881
+ UpdateInvoiceRequestBody1,
800
882
  z.ZodTypeDef,
801
883
  unknown
802
884
  > = z.object({
803
885
  vendor_id: z.number().int(),
804
- lines: z.array(z.lazy(() => Lines$inboundSchema)).optional(),
886
+ lines: z.array(z.lazy(() => UpdateInvoiceRequestBodyLines$inboundSchema))
887
+ .optional(),
805
888
  vendor_credential_id: z.number().int().optional(),
806
889
  }).transform((v) => {
807
890
  return remap$(v, {
@@ -811,20 +894,21 @@ export const RequestBody1$inboundSchema: z.ZodType<
811
894
  });
812
895
 
813
896
  /** @internal */
814
- export type RequestBody1$Outbound = {
897
+ export type UpdateInvoiceRequestBody1$Outbound = {
815
898
  vendor_id: number;
816
- lines?: Array<Lines$Outbound> | undefined;
899
+ lines?: Array<UpdateInvoiceRequestBodyLines$Outbound> | undefined;
817
900
  vendor_credential_id?: number | undefined;
818
901
  };
819
902
 
820
903
  /** @internal */
821
- export const RequestBody1$outboundSchema: z.ZodType<
822
- RequestBody1$Outbound,
904
+ export const UpdateInvoiceRequestBody1$outboundSchema: z.ZodType<
905
+ UpdateInvoiceRequestBody1$Outbound,
823
906
  z.ZodTypeDef,
824
- RequestBody1
907
+ UpdateInvoiceRequestBody1
825
908
  > = z.object({
826
909
  vendorId: z.number().int(),
827
- lines: z.array(z.lazy(() => Lines$outboundSchema)).optional(),
910
+ lines: z.array(z.lazy(() => UpdateInvoiceRequestBodyLines$outboundSchema))
911
+ .optional(),
828
912
  vendorCredentialId: z.number().int().optional(),
829
913
  }).transform((v) => {
830
914
  return remap$(v, {
@@ -837,26 +921,30 @@ export const RequestBody1$outboundSchema: z.ZodType<
837
921
  * @internal
838
922
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
839
923
  */
840
- export namespace RequestBody1$ {
841
- /** @deprecated use `RequestBody1$inboundSchema` instead. */
842
- export const inboundSchema = RequestBody1$inboundSchema;
843
- /** @deprecated use `RequestBody1$outboundSchema` instead. */
844
- export const outboundSchema = RequestBody1$outboundSchema;
845
- /** @deprecated use `RequestBody1$Outbound` instead. */
846
- export type Outbound = RequestBody1$Outbound;
924
+ export namespace UpdateInvoiceRequestBody1$ {
925
+ /** @deprecated use `UpdateInvoiceRequestBody1$inboundSchema` instead. */
926
+ export const inboundSchema = UpdateInvoiceRequestBody1$inboundSchema;
927
+ /** @deprecated use `UpdateInvoiceRequestBody1$outboundSchema` instead. */
928
+ export const outboundSchema = UpdateInvoiceRequestBody1$outboundSchema;
929
+ /** @deprecated use `UpdateInvoiceRequestBody1$Outbound` instead. */
930
+ export type Outbound = UpdateInvoiceRequestBody1$Outbound;
847
931
  }
848
932
 
849
- export function requestBody1ToJSON(requestBody1: RequestBody1): string {
850
- return JSON.stringify(RequestBody1$outboundSchema.parse(requestBody1));
933
+ export function updateInvoiceRequestBody1ToJSON(
934
+ updateInvoiceRequestBody1: UpdateInvoiceRequestBody1,
935
+ ): string {
936
+ return JSON.stringify(
937
+ UpdateInvoiceRequestBody1$outboundSchema.parse(updateInvoiceRequestBody1),
938
+ );
851
939
  }
852
940
 
853
- export function requestBody1FromJSON(
941
+ export function updateInvoiceRequestBody1FromJSON(
854
942
  jsonString: string,
855
- ): SafeParseResult<RequestBody1, SDKValidationError> {
943
+ ): SafeParseResult<UpdateInvoiceRequestBody1, SDKValidationError> {
856
944
  return safeParse(
857
945
  jsonString,
858
- (x) => RequestBody1$inboundSchema.parse(JSON.parse(x)),
859
- `Failed to parse 'RequestBody1' from JSON`,
946
+ (x) => UpdateInvoiceRequestBody1$inboundSchema.parse(JSON.parse(x)),
947
+ `Failed to parse 'UpdateInvoiceRequestBody1' from JSON`,
860
948
  );
861
949
  }
862
950
 
@@ -866,18 +954,18 @@ export const UpdateInvoiceRequestBody$inboundSchema: z.ZodType<
866
954
  z.ZodTypeDef,
867
955
  unknown
868
956
  > = z.union([
869
- z.lazy(() => RequestBody1$inboundSchema),
870
- z.lazy(() => RequestBody2$inboundSchema),
871
- z.lazy(() => Three$inboundSchema),
872
- z.lazy(() => Four$inboundSchema),
957
+ z.lazy(() => UpdateInvoiceRequestBody1$inboundSchema),
958
+ z.lazy(() => UpdateInvoiceRequestBody2$inboundSchema),
959
+ z.lazy(() => RequestBody3$inboundSchema),
960
+ z.lazy(() => RequestBody4$inboundSchema),
873
961
  ]);
874
962
 
875
963
  /** @internal */
876
964
  export type UpdateInvoiceRequestBody$Outbound =
877
- | RequestBody1$Outbound
878
- | RequestBody2$Outbound
879
- | Three$Outbound
880
- | Four$Outbound;
965
+ | UpdateInvoiceRequestBody1$Outbound
966
+ | UpdateInvoiceRequestBody2$Outbound
967
+ | RequestBody3$Outbound
968
+ | RequestBody4$Outbound;
881
969
 
882
970
  /** @internal */
883
971
  export const UpdateInvoiceRequestBody$outboundSchema: z.ZodType<
@@ -885,10 +973,10 @@ export const UpdateInvoiceRequestBody$outboundSchema: z.ZodType<
885
973
  z.ZodTypeDef,
886
974
  UpdateInvoiceRequestBody
887
975
  > = z.union([
888
- z.lazy(() => RequestBody1$outboundSchema),
889
- z.lazy(() => RequestBody2$outboundSchema),
890
- z.lazy(() => Three$outboundSchema),
891
- z.lazy(() => Four$outboundSchema),
976
+ z.lazy(() => UpdateInvoiceRequestBody1$outboundSchema),
977
+ z.lazy(() => UpdateInvoiceRequestBody2$outboundSchema),
978
+ z.lazy(() => RequestBody3$outboundSchema),
979
+ z.lazy(() => RequestBody4$outboundSchema),
892
980
  ]);
893
981
 
894
982
  /**
@@ -930,10 +1018,10 @@ export const UpdateInvoiceRequest$inboundSchema: z.ZodType<
930
1018
  > = z.object({
931
1019
  id: z.number().int(),
932
1020
  RequestBody: z.union([
933
- z.lazy(() => RequestBody1$inboundSchema),
934
- z.lazy(() => RequestBody2$inboundSchema),
935
- z.lazy(() => Three$inboundSchema),
936
- z.lazy(() => Four$inboundSchema),
1021
+ z.lazy(() => UpdateInvoiceRequestBody1$inboundSchema),
1022
+ z.lazy(() => UpdateInvoiceRequestBody2$inboundSchema),
1023
+ z.lazy(() => RequestBody3$inboundSchema),
1024
+ z.lazy(() => RequestBody4$inboundSchema),
937
1025
  ]),
938
1026
  }).transform((v) => {
939
1027
  return remap$(v, {
@@ -945,10 +1033,10 @@ export const UpdateInvoiceRequest$inboundSchema: z.ZodType<
945
1033
  export type UpdateInvoiceRequest$Outbound = {
946
1034
  id: number;
947
1035
  RequestBody:
948
- | RequestBody1$Outbound
949
- | RequestBody2$Outbound
950
- | Three$Outbound
951
- | Four$Outbound;
1036
+ | UpdateInvoiceRequestBody1$Outbound
1037
+ | UpdateInvoiceRequestBody2$Outbound
1038
+ | RequestBody3$Outbound
1039
+ | RequestBody4$Outbound;
952
1040
  };
953
1041
 
954
1042
  /** @internal */
@@ -959,10 +1047,10 @@ export const UpdateInvoiceRequest$outboundSchema: z.ZodType<
959
1047
  > = z.object({
960
1048
  id: z.number().int(),
961
1049
  requestBody: z.union([
962
- z.lazy(() => RequestBody1$outboundSchema),
963
- z.lazy(() => RequestBody2$outboundSchema),
964
- z.lazy(() => Three$outboundSchema),
965
- z.lazy(() => Four$outboundSchema),
1050
+ z.lazy(() => UpdateInvoiceRequestBody1$outboundSchema),
1051
+ z.lazy(() => UpdateInvoiceRequestBody2$outboundSchema),
1052
+ z.lazy(() => RequestBody3$outboundSchema),
1053
+ z.lazy(() => RequestBody4$outboundSchema),
966
1054
  ]),
967
1055
  }).transform((v) => {
968
1056
  return remap$(v, {