@apideck/unify 0.29.8 → 0.29.9
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.
- package/README.md +14 -1
- package/docs/sdks/bankaccounts/README.md +564 -0
- package/examples/accountingTaxRatesList.example.ts +1 -1
- package/examples/package-lock.json +1 -1
- package/funcs/accountingBankAccountsCreate.d.ts +18 -0
- package/funcs/accountingBankAccountsCreate.d.ts.map +1 -0
- package/funcs/accountingBankAccountsCreate.js +139 -0
- package/funcs/accountingBankAccountsCreate.js.map +1 -0
- package/funcs/accountingBankAccountsDelete.d.ts +18 -0
- package/funcs/accountingBankAccountsDelete.d.ts.map +1 -0
- package/funcs/accountingBankAccountsDelete.js +142 -0
- package/funcs/accountingBankAccountsDelete.js.map +1 -0
- package/funcs/accountingBankAccountsGet.d.ts +18 -0
- package/funcs/accountingBankAccountsGet.d.ts.map +1 -0
- package/funcs/accountingBankAccountsGet.js +143 -0
- package/funcs/accountingBankAccountsGet.js.map +1 -0
- package/funcs/accountingBankAccountsList.d.ts +21 -0
- package/funcs/accountingBankAccountsList.d.ts.map +1 -0
- package/funcs/accountingBankAccountsList.js +168 -0
- package/funcs/accountingBankAccountsList.js.map +1 -0
- package/funcs/accountingBankAccountsUpdate.d.ts +18 -0
- package/funcs/accountingBankAccountsUpdate.d.ts.map +1 -0
- package/funcs/accountingBankAccountsUpdate.js +145 -0
- package/funcs/accountingBankAccountsUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/models/components/accountingbankaccount.d.ts +348 -0
- package/models/components/accountingbankaccount.d.ts.map +1 -0
- package/models/components/accountingbankaccount.js +298 -0
- package/models/components/accountingbankaccount.js.map +1 -0
- package/models/components/bankaccountsfilter.d.ts +72 -0
- package/models/components/bankaccountsfilter.d.ts.map +1 -0
- package/models/components/bankaccountsfilter.js +94 -0
- package/models/components/bankaccountsfilter.js.map +1 -0
- package/models/components/bankaccountssort.d.ts +70 -0
- package/models/components/bankaccountssort.d.ts.map +1 -0
- package/models/components/bankaccountssort.js +95 -0
- package/models/components/bankaccountssort.js.map +1 -0
- package/models/components/createbankaccountresponse.d.ts +61 -0
- package/models/components/createbankaccountresponse.d.ts.map +1 -0
- package/models/components/createbankaccountresponse.js +89 -0
- package/models/components/createbankaccountresponse.js.map +1 -0
- package/models/components/deletebankaccountresponse.d.ts +61 -0
- package/models/components/deletebankaccountresponse.d.ts.map +1 -0
- package/models/components/deletebankaccountresponse.js +89 -0
- package/models/components/deletebankaccountresponse.js.map +1 -0
- package/models/components/getbankaccountresponse.d.ts +58 -0
- package/models/components/getbankaccountresponse.d.ts.map +1 -0
- package/models/components/getbankaccountresponse.js +89 -0
- package/models/components/getbankaccountresponse.js.map +1 -0
- package/models/components/getbankaccountsresponse.d.ts +70 -0
- package/models/components/getbankaccountsresponse.d.ts.map +1 -0
- package/models/components/getbankaccountsresponse.js +95 -0
- package/models/components/getbankaccountsresponse.js.map +1 -0
- package/models/components/index.d.ts +8 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -0
- package/models/components/index.js.map +1 -1
- package/models/components/logsfilter.d.ts +8 -0
- package/models/components/logsfilter.d.ts.map +1 -1
- package/models/components/logsfilter.js +4 -0
- package/models/components/logsfilter.js.map +1 -1
- package/models/components/updatebankaccountresponse.d.ts +61 -0
- package/models/components/updatebankaccountresponse.d.ts.map +1 -0
- package/models/components/updatebankaccountresponse.js +89 -0
- package/models/components/updatebankaccountresponse.js.map +1 -0
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/operations/accountingbankaccountsadd.d.ts +118 -0
- package/models/operations/accountingbankaccountsadd.d.ts.map +1 -0
- package/models/operations/accountingbankaccountsadd.js +163 -0
- package/models/operations/accountingbankaccountsadd.js.map +1 -0
- package/models/operations/accountingbankaccountsall.d.ts +150 -0
- package/models/operations/accountingbankaccountsall.d.ts.map +1 -0
- package/models/operations/accountingbankaccountsall.js +173 -0
- package/models/operations/accountingbankaccountsall.js.map +1 -0
- package/models/operations/accountingbankaccountsdelete.d.ts +121 -0
- package/models/operations/accountingbankaccountsdelete.d.ts.map +1 -0
- package/models/operations/accountingbankaccountsdelete.js +155 -0
- package/models/operations/accountingbankaccountsdelete.js.map +1 -0
- package/models/operations/accountingbankaccountsone.d.ts +126 -0
- package/models/operations/accountingbankaccountsone.d.ts.map +1 -0
- package/models/operations/accountingbankaccountsone.js +157 -0
- package/models/operations/accountingbankaccountsone.js.map +1 -0
- package/models/operations/accountingbankaccountsupdate.d.ts +123 -0
- package/models/operations/accountingbankaccountsupdate.d.ts.map +1 -0
- package/models/operations/accountingbankaccountsupdate.js +165 -0
- package/models/operations/accountingbankaccountsupdate.js.map +1 -0
- package/models/operations/index.d.ts +5 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/accounting.d.ts +3 -0
- package/sdk/accounting.d.ts.map +1 -1
- package/sdk/accounting.js +4 -0
- package/sdk/accounting.js.map +1 -1
- package/sdk/bankaccounts.d.ts +43 -0
- package/sdk/bankaccounts.d.ts.map +1 -0
- package/sdk/bankaccounts.js +63 -0
- package/sdk/bankaccounts.js.map +1 -0
- package/src/__tests__/bankaccounts.test.ts +293 -0
- package/src/funcs/accountingBankAccountsCreate.ts +225 -0
- package/src/funcs/accountingBankAccountsDelete.ts +231 -0
- package/src/funcs/accountingBankAccountsGet.ts +230 -0
- package/src/funcs/accountingBankAccountsList.ts +303 -0
- package/src/funcs/accountingBankAccountsUpdate.ts +234 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/accountingbankaccount.ts +576 -0
- package/src/models/components/bankaccountsfilter.ts +113 -0
- package/src/models/components/bankaccountssort.ts +113 -0
- package/src/models/components/createbankaccountresponse.ts +122 -0
- package/src/models/components/deletebankaccountresponse.ts +122 -0
- package/src/models/components/getbankaccountresponse.ts +119 -0
- package/src/models/components/getbankaccountsresponse.ts +145 -0
- package/src/models/components/index.ts +8 -0
- package/src/models/components/logsfilter.ts +12 -0
- package/src/models/components/updatebankaccountresponse.ts +122 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/accountingbankaccountsadd.ts +271 -0
- package/src/models/operations/accountingbankaccountsall.ts +309 -0
- package/src/models/operations/accountingbankaccountsdelete.ts +274 -0
- package/src/models/operations/accountingbankaccountsone.ts +273 -0
- package/src/models/operations/accountingbankaccountsupdate.ts +286 -0
- package/src/models/operations/index.ts +5 -0
- package/src/sdk/accounting.ts +6 -0
- package/src/sdk/bankaccounts.ts +105 -0
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import {
|
|
12
|
+
Currency,
|
|
13
|
+
Currency$inboundSchema,
|
|
14
|
+
Currency$outboundSchema,
|
|
15
|
+
} from "./currency.js";
|
|
16
|
+
import {
|
|
17
|
+
CustomField,
|
|
18
|
+
CustomField$inboundSchema,
|
|
19
|
+
CustomField$Outbound,
|
|
20
|
+
CustomField$outboundSchema,
|
|
21
|
+
} from "./customfield.js";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The type of bank account
|
|
25
|
+
*/
|
|
26
|
+
export const AccountingBankAccountAccountType = {
|
|
27
|
+
Checking: "checking",
|
|
28
|
+
Savings: "savings",
|
|
29
|
+
CreditCard: "credit_card",
|
|
30
|
+
MoneyMarket: "money_market",
|
|
31
|
+
LineOfCredit: "line_of_credit",
|
|
32
|
+
Other: "other",
|
|
33
|
+
} as const;
|
|
34
|
+
/**
|
|
35
|
+
* The type of bank account
|
|
36
|
+
*/
|
|
37
|
+
export type AccountingBankAccountAccountType = ClosedEnum<
|
|
38
|
+
typeof AccountingBankAccountAccountType
|
|
39
|
+
>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The status of the bank account
|
|
43
|
+
*/
|
|
44
|
+
export const AccountingBankAccountStatus = {
|
|
45
|
+
Active: "active",
|
|
46
|
+
Inactive: "inactive",
|
|
47
|
+
Closed: "closed",
|
|
48
|
+
} as const;
|
|
49
|
+
/**
|
|
50
|
+
* The status of the bank account
|
|
51
|
+
*/
|
|
52
|
+
export type AccountingBankAccountStatus = ClosedEnum<
|
|
53
|
+
typeof AccountingBankAccountStatus
|
|
54
|
+
>;
|
|
55
|
+
|
|
56
|
+
export type AccountingBankAccount = {
|
|
57
|
+
/**
|
|
58
|
+
* A unique identifier for an object.
|
|
59
|
+
*/
|
|
60
|
+
id: string;
|
|
61
|
+
/**
|
|
62
|
+
* Display ID for the bank account
|
|
63
|
+
*/
|
|
64
|
+
displayId?: string | null | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* The name of the bank account as it appears in the accounting system
|
|
67
|
+
*/
|
|
68
|
+
name?: string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* The bank account number
|
|
71
|
+
*/
|
|
72
|
+
accountNumber?: string | null | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* The type of bank account
|
|
75
|
+
*/
|
|
76
|
+
accountType?: AccountingBankAccountAccountType | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* The name of the bank or financial institution
|
|
79
|
+
*/
|
|
80
|
+
bankName?: string | null | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
|
|
83
|
+
*/
|
|
84
|
+
currency?: Currency | null | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* The current balance of the bank account
|
|
87
|
+
*/
|
|
88
|
+
balance?: number | null | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* The available balance (considering pending transactions and overdraft)
|
|
91
|
+
*/
|
|
92
|
+
availableBalance?: number | null | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* The overdraft limit for the account
|
|
95
|
+
*/
|
|
96
|
+
overdraftLimit?: number | null | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Bank routing number (US)
|
|
99
|
+
*/
|
|
100
|
+
routingNumber?: string | null | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* International Bank Account Number
|
|
103
|
+
*/
|
|
104
|
+
iban?: string | null | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Bank Identifier Code / SWIFT Code
|
|
107
|
+
*/
|
|
108
|
+
bic?: string | null | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* Bank State Branch number (Australia/New Zealand)
|
|
111
|
+
*/
|
|
112
|
+
bsbNumber?: string | null | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* Bank branch identifier
|
|
115
|
+
*/
|
|
116
|
+
branchIdentifier?: string | null | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* Bank code assigned by central bank
|
|
119
|
+
*/
|
|
120
|
+
bankCode?: string | null | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* Country code according to ISO 3166-1 alpha-2.
|
|
123
|
+
*/
|
|
124
|
+
country?: string | null | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* The status of the bank account
|
|
127
|
+
*/
|
|
128
|
+
status?: AccountingBankAccountStatus | null | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* Description or notes about the bank account
|
|
131
|
+
*/
|
|
132
|
+
description?: string | null | undefined;
|
|
133
|
+
customFields?: Array<CustomField> | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* When custom mappings are configured on the resource, the result is included here.
|
|
136
|
+
*/
|
|
137
|
+
customMappings?: { [k: string]: any } | null | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* The date and time when the object was created.
|
|
140
|
+
*/
|
|
141
|
+
createdAt?: Date | null | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* The date and time when the object was last updated.
|
|
144
|
+
*/
|
|
145
|
+
updatedAt?: Date | null | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* The user who created the object.
|
|
148
|
+
*/
|
|
149
|
+
createdBy?: string | null | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* The user who last updated the object.
|
|
152
|
+
*/
|
|
153
|
+
updatedBy?: string | null | undefined;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export type AccountingBankAccountInput = {
|
|
157
|
+
/**
|
|
158
|
+
* Display ID for the bank account
|
|
159
|
+
*/
|
|
160
|
+
displayId?: string | null | undefined;
|
|
161
|
+
/**
|
|
162
|
+
* The name of the bank account as it appears in the accounting system
|
|
163
|
+
*/
|
|
164
|
+
name?: string | undefined;
|
|
165
|
+
/**
|
|
166
|
+
* The bank account number
|
|
167
|
+
*/
|
|
168
|
+
accountNumber?: string | null | undefined;
|
|
169
|
+
/**
|
|
170
|
+
* The type of bank account
|
|
171
|
+
*/
|
|
172
|
+
accountType?: AccountingBankAccountAccountType | undefined;
|
|
173
|
+
/**
|
|
174
|
+
* The name of the bank or financial institution
|
|
175
|
+
*/
|
|
176
|
+
bankName?: string | null | undefined;
|
|
177
|
+
/**
|
|
178
|
+
* Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
|
|
179
|
+
*/
|
|
180
|
+
currency?: Currency | null | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* The current balance of the bank account
|
|
183
|
+
*/
|
|
184
|
+
balance?: number | null | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* The available balance (considering pending transactions and overdraft)
|
|
187
|
+
*/
|
|
188
|
+
availableBalance?: number | null | undefined;
|
|
189
|
+
/**
|
|
190
|
+
* The overdraft limit for the account
|
|
191
|
+
*/
|
|
192
|
+
overdraftLimit?: number | null | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* Bank routing number (US)
|
|
195
|
+
*/
|
|
196
|
+
routingNumber?: string | null | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* International Bank Account Number
|
|
199
|
+
*/
|
|
200
|
+
iban?: string | null | undefined;
|
|
201
|
+
/**
|
|
202
|
+
* Bank Identifier Code / SWIFT Code
|
|
203
|
+
*/
|
|
204
|
+
bic?: string | null | undefined;
|
|
205
|
+
/**
|
|
206
|
+
* Bank State Branch number (Australia/New Zealand)
|
|
207
|
+
*/
|
|
208
|
+
bsbNumber?: string | null | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* Bank branch identifier
|
|
211
|
+
*/
|
|
212
|
+
branchIdentifier?: string | null | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* Bank code assigned by central bank
|
|
215
|
+
*/
|
|
216
|
+
bankCode?: string | null | undefined;
|
|
217
|
+
/**
|
|
218
|
+
* Country code according to ISO 3166-1 alpha-2.
|
|
219
|
+
*/
|
|
220
|
+
country?: string | null | undefined;
|
|
221
|
+
/**
|
|
222
|
+
* The status of the bank account
|
|
223
|
+
*/
|
|
224
|
+
status?: AccountingBankAccountStatus | null | undefined;
|
|
225
|
+
/**
|
|
226
|
+
* Description or notes about the bank account
|
|
227
|
+
*/
|
|
228
|
+
description?: string | null | undefined;
|
|
229
|
+
customFields?: Array<CustomField> | undefined;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
/** @internal */
|
|
233
|
+
export const AccountingBankAccountAccountType$inboundSchema: z.ZodNativeEnum<
|
|
234
|
+
typeof AccountingBankAccountAccountType
|
|
235
|
+
> = z.nativeEnum(AccountingBankAccountAccountType);
|
|
236
|
+
|
|
237
|
+
/** @internal */
|
|
238
|
+
export const AccountingBankAccountAccountType$outboundSchema: z.ZodNativeEnum<
|
|
239
|
+
typeof AccountingBankAccountAccountType
|
|
240
|
+
> = AccountingBankAccountAccountType$inboundSchema;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* @internal
|
|
244
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
245
|
+
*/
|
|
246
|
+
export namespace AccountingBankAccountAccountType$ {
|
|
247
|
+
/** @deprecated use `AccountingBankAccountAccountType$inboundSchema` instead. */
|
|
248
|
+
export const inboundSchema = AccountingBankAccountAccountType$inboundSchema;
|
|
249
|
+
/** @deprecated use `AccountingBankAccountAccountType$outboundSchema` instead. */
|
|
250
|
+
export const outboundSchema = AccountingBankAccountAccountType$outboundSchema;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/** @internal */
|
|
254
|
+
export const AccountingBankAccountStatus$inboundSchema: z.ZodNativeEnum<
|
|
255
|
+
typeof AccountingBankAccountStatus
|
|
256
|
+
> = z.nativeEnum(AccountingBankAccountStatus);
|
|
257
|
+
|
|
258
|
+
/** @internal */
|
|
259
|
+
export const AccountingBankAccountStatus$outboundSchema: z.ZodNativeEnum<
|
|
260
|
+
typeof AccountingBankAccountStatus
|
|
261
|
+
> = AccountingBankAccountStatus$inboundSchema;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* @internal
|
|
265
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
266
|
+
*/
|
|
267
|
+
export namespace AccountingBankAccountStatus$ {
|
|
268
|
+
/** @deprecated use `AccountingBankAccountStatus$inboundSchema` instead. */
|
|
269
|
+
export const inboundSchema = AccountingBankAccountStatus$inboundSchema;
|
|
270
|
+
/** @deprecated use `AccountingBankAccountStatus$outboundSchema` instead. */
|
|
271
|
+
export const outboundSchema = AccountingBankAccountStatus$outboundSchema;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/** @internal */
|
|
275
|
+
export const AccountingBankAccount$inboundSchema: z.ZodType<
|
|
276
|
+
AccountingBankAccount,
|
|
277
|
+
z.ZodTypeDef,
|
|
278
|
+
unknown
|
|
279
|
+
> = z.object({
|
|
280
|
+
id: z.string(),
|
|
281
|
+
display_id: z.nullable(z.string()).optional(),
|
|
282
|
+
name: z.string().optional(),
|
|
283
|
+
account_number: z.nullable(z.string()).optional(),
|
|
284
|
+
account_type: AccountingBankAccountAccountType$inboundSchema.optional(),
|
|
285
|
+
bank_name: z.nullable(z.string()).optional(),
|
|
286
|
+
currency: z.nullable(Currency$inboundSchema).optional(),
|
|
287
|
+
balance: z.nullable(z.number()).optional(),
|
|
288
|
+
available_balance: z.nullable(z.number()).optional(),
|
|
289
|
+
overdraft_limit: z.nullable(z.number()).optional(),
|
|
290
|
+
routing_number: z.nullable(z.string()).optional(),
|
|
291
|
+
iban: z.nullable(z.string()).optional(),
|
|
292
|
+
bic: z.nullable(z.string()).optional(),
|
|
293
|
+
bsb_number: z.nullable(z.string()).optional(),
|
|
294
|
+
branch_identifier: z.nullable(z.string()).optional(),
|
|
295
|
+
bank_code: z.nullable(z.string()).optional(),
|
|
296
|
+
country: z.nullable(z.string()).optional(),
|
|
297
|
+
status: z.nullable(AccountingBankAccountStatus$inboundSchema).optional(),
|
|
298
|
+
description: z.nullable(z.string()).optional(),
|
|
299
|
+
custom_fields: z.array(CustomField$inboundSchema).optional(),
|
|
300
|
+
custom_mappings: z.nullable(z.record(z.any())).optional(),
|
|
301
|
+
created_at: z.nullable(
|
|
302
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
303
|
+
).optional(),
|
|
304
|
+
updated_at: z.nullable(
|
|
305
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
306
|
+
).optional(),
|
|
307
|
+
created_by: z.nullable(z.string()).optional(),
|
|
308
|
+
updated_by: z.nullable(z.string()).optional(),
|
|
309
|
+
}).transform((v) => {
|
|
310
|
+
return remap$(v, {
|
|
311
|
+
"display_id": "displayId",
|
|
312
|
+
"account_number": "accountNumber",
|
|
313
|
+
"account_type": "accountType",
|
|
314
|
+
"bank_name": "bankName",
|
|
315
|
+
"available_balance": "availableBalance",
|
|
316
|
+
"overdraft_limit": "overdraftLimit",
|
|
317
|
+
"routing_number": "routingNumber",
|
|
318
|
+
"bsb_number": "bsbNumber",
|
|
319
|
+
"branch_identifier": "branchIdentifier",
|
|
320
|
+
"bank_code": "bankCode",
|
|
321
|
+
"custom_fields": "customFields",
|
|
322
|
+
"custom_mappings": "customMappings",
|
|
323
|
+
"created_at": "createdAt",
|
|
324
|
+
"updated_at": "updatedAt",
|
|
325
|
+
"created_by": "createdBy",
|
|
326
|
+
"updated_by": "updatedBy",
|
|
327
|
+
});
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
/** @internal */
|
|
331
|
+
export type AccountingBankAccount$Outbound = {
|
|
332
|
+
id: string;
|
|
333
|
+
display_id?: string | null | undefined;
|
|
334
|
+
name?: string | undefined;
|
|
335
|
+
account_number?: string | null | undefined;
|
|
336
|
+
account_type?: string | undefined;
|
|
337
|
+
bank_name?: string | null | undefined;
|
|
338
|
+
currency?: string | null | undefined;
|
|
339
|
+
balance?: number | null | undefined;
|
|
340
|
+
available_balance?: number | null | undefined;
|
|
341
|
+
overdraft_limit?: number | null | undefined;
|
|
342
|
+
routing_number?: string | null | undefined;
|
|
343
|
+
iban?: string | null | undefined;
|
|
344
|
+
bic?: string | null | undefined;
|
|
345
|
+
bsb_number?: string | null | undefined;
|
|
346
|
+
branch_identifier?: string | null | undefined;
|
|
347
|
+
bank_code?: string | null | undefined;
|
|
348
|
+
country?: string | null | undefined;
|
|
349
|
+
status?: string | null | undefined;
|
|
350
|
+
description?: string | null | undefined;
|
|
351
|
+
custom_fields?: Array<CustomField$Outbound> | undefined;
|
|
352
|
+
custom_mappings?: { [k: string]: any } | null | undefined;
|
|
353
|
+
created_at?: string | null | undefined;
|
|
354
|
+
updated_at?: string | null | undefined;
|
|
355
|
+
created_by?: string | null | undefined;
|
|
356
|
+
updated_by?: string | null | undefined;
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
/** @internal */
|
|
360
|
+
export const AccountingBankAccount$outboundSchema: z.ZodType<
|
|
361
|
+
AccountingBankAccount$Outbound,
|
|
362
|
+
z.ZodTypeDef,
|
|
363
|
+
AccountingBankAccount
|
|
364
|
+
> = z.object({
|
|
365
|
+
id: z.string(),
|
|
366
|
+
displayId: z.nullable(z.string()).optional(),
|
|
367
|
+
name: z.string().optional(),
|
|
368
|
+
accountNumber: z.nullable(z.string()).optional(),
|
|
369
|
+
accountType: AccountingBankAccountAccountType$outboundSchema.optional(),
|
|
370
|
+
bankName: z.nullable(z.string()).optional(),
|
|
371
|
+
currency: z.nullable(Currency$outboundSchema).optional(),
|
|
372
|
+
balance: z.nullable(z.number()).optional(),
|
|
373
|
+
availableBalance: z.nullable(z.number()).optional(),
|
|
374
|
+
overdraftLimit: z.nullable(z.number()).optional(),
|
|
375
|
+
routingNumber: z.nullable(z.string()).optional(),
|
|
376
|
+
iban: z.nullable(z.string()).optional(),
|
|
377
|
+
bic: z.nullable(z.string()).optional(),
|
|
378
|
+
bsbNumber: z.nullable(z.string()).optional(),
|
|
379
|
+
branchIdentifier: z.nullable(z.string()).optional(),
|
|
380
|
+
bankCode: z.nullable(z.string()).optional(),
|
|
381
|
+
country: z.nullable(z.string()).optional(),
|
|
382
|
+
status: z.nullable(AccountingBankAccountStatus$outboundSchema).optional(),
|
|
383
|
+
description: z.nullable(z.string()).optional(),
|
|
384
|
+
customFields: z.array(CustomField$outboundSchema).optional(),
|
|
385
|
+
customMappings: z.nullable(z.record(z.any())).optional(),
|
|
386
|
+
createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
387
|
+
updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
388
|
+
createdBy: z.nullable(z.string()).optional(),
|
|
389
|
+
updatedBy: z.nullable(z.string()).optional(),
|
|
390
|
+
}).transform((v) => {
|
|
391
|
+
return remap$(v, {
|
|
392
|
+
displayId: "display_id",
|
|
393
|
+
accountNumber: "account_number",
|
|
394
|
+
accountType: "account_type",
|
|
395
|
+
bankName: "bank_name",
|
|
396
|
+
availableBalance: "available_balance",
|
|
397
|
+
overdraftLimit: "overdraft_limit",
|
|
398
|
+
routingNumber: "routing_number",
|
|
399
|
+
bsbNumber: "bsb_number",
|
|
400
|
+
branchIdentifier: "branch_identifier",
|
|
401
|
+
bankCode: "bank_code",
|
|
402
|
+
customFields: "custom_fields",
|
|
403
|
+
customMappings: "custom_mappings",
|
|
404
|
+
createdAt: "created_at",
|
|
405
|
+
updatedAt: "updated_at",
|
|
406
|
+
createdBy: "created_by",
|
|
407
|
+
updatedBy: "updated_by",
|
|
408
|
+
});
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* @internal
|
|
413
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
414
|
+
*/
|
|
415
|
+
export namespace AccountingBankAccount$ {
|
|
416
|
+
/** @deprecated use `AccountingBankAccount$inboundSchema` instead. */
|
|
417
|
+
export const inboundSchema = AccountingBankAccount$inboundSchema;
|
|
418
|
+
/** @deprecated use `AccountingBankAccount$outboundSchema` instead. */
|
|
419
|
+
export const outboundSchema = AccountingBankAccount$outboundSchema;
|
|
420
|
+
/** @deprecated use `AccountingBankAccount$Outbound` instead. */
|
|
421
|
+
export type Outbound = AccountingBankAccount$Outbound;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export function accountingBankAccountToJSON(
|
|
425
|
+
accountingBankAccount: AccountingBankAccount,
|
|
426
|
+
): string {
|
|
427
|
+
return JSON.stringify(
|
|
428
|
+
AccountingBankAccount$outboundSchema.parse(accountingBankAccount),
|
|
429
|
+
);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export function accountingBankAccountFromJSON(
|
|
433
|
+
jsonString: string,
|
|
434
|
+
): SafeParseResult<AccountingBankAccount, SDKValidationError> {
|
|
435
|
+
return safeParse(
|
|
436
|
+
jsonString,
|
|
437
|
+
(x) => AccountingBankAccount$inboundSchema.parse(JSON.parse(x)),
|
|
438
|
+
`Failed to parse 'AccountingBankAccount' from JSON`,
|
|
439
|
+
);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/** @internal */
|
|
443
|
+
export const AccountingBankAccountInput$inboundSchema: z.ZodType<
|
|
444
|
+
AccountingBankAccountInput,
|
|
445
|
+
z.ZodTypeDef,
|
|
446
|
+
unknown
|
|
447
|
+
> = z.object({
|
|
448
|
+
display_id: z.nullable(z.string()).optional(),
|
|
449
|
+
name: z.string().optional(),
|
|
450
|
+
account_number: z.nullable(z.string()).optional(),
|
|
451
|
+
account_type: AccountingBankAccountAccountType$inboundSchema.optional(),
|
|
452
|
+
bank_name: z.nullable(z.string()).optional(),
|
|
453
|
+
currency: z.nullable(Currency$inboundSchema).optional(),
|
|
454
|
+
balance: z.nullable(z.number()).optional(),
|
|
455
|
+
available_balance: z.nullable(z.number()).optional(),
|
|
456
|
+
overdraft_limit: z.nullable(z.number()).optional(),
|
|
457
|
+
routing_number: z.nullable(z.string()).optional(),
|
|
458
|
+
iban: z.nullable(z.string()).optional(),
|
|
459
|
+
bic: z.nullable(z.string()).optional(),
|
|
460
|
+
bsb_number: z.nullable(z.string()).optional(),
|
|
461
|
+
branch_identifier: z.nullable(z.string()).optional(),
|
|
462
|
+
bank_code: z.nullable(z.string()).optional(),
|
|
463
|
+
country: z.nullable(z.string()).optional(),
|
|
464
|
+
status: z.nullable(AccountingBankAccountStatus$inboundSchema).optional(),
|
|
465
|
+
description: z.nullable(z.string()).optional(),
|
|
466
|
+
custom_fields: z.array(CustomField$inboundSchema).optional(),
|
|
467
|
+
}).transform((v) => {
|
|
468
|
+
return remap$(v, {
|
|
469
|
+
"display_id": "displayId",
|
|
470
|
+
"account_number": "accountNumber",
|
|
471
|
+
"account_type": "accountType",
|
|
472
|
+
"bank_name": "bankName",
|
|
473
|
+
"available_balance": "availableBalance",
|
|
474
|
+
"overdraft_limit": "overdraftLimit",
|
|
475
|
+
"routing_number": "routingNumber",
|
|
476
|
+
"bsb_number": "bsbNumber",
|
|
477
|
+
"branch_identifier": "branchIdentifier",
|
|
478
|
+
"bank_code": "bankCode",
|
|
479
|
+
"custom_fields": "customFields",
|
|
480
|
+
});
|
|
481
|
+
});
|
|
482
|
+
|
|
483
|
+
/** @internal */
|
|
484
|
+
export type AccountingBankAccountInput$Outbound = {
|
|
485
|
+
display_id?: string | null | undefined;
|
|
486
|
+
name?: string | undefined;
|
|
487
|
+
account_number?: string | null | undefined;
|
|
488
|
+
account_type?: string | undefined;
|
|
489
|
+
bank_name?: string | null | undefined;
|
|
490
|
+
currency?: string | null | undefined;
|
|
491
|
+
balance?: number | null | undefined;
|
|
492
|
+
available_balance?: number | null | undefined;
|
|
493
|
+
overdraft_limit?: number | null | undefined;
|
|
494
|
+
routing_number?: string | null | undefined;
|
|
495
|
+
iban?: string | null | undefined;
|
|
496
|
+
bic?: string | null | undefined;
|
|
497
|
+
bsb_number?: string | null | undefined;
|
|
498
|
+
branch_identifier?: string | null | undefined;
|
|
499
|
+
bank_code?: string | null | undefined;
|
|
500
|
+
country?: string | null | undefined;
|
|
501
|
+
status?: string | null | undefined;
|
|
502
|
+
description?: string | null | undefined;
|
|
503
|
+
custom_fields?: Array<CustomField$Outbound> | undefined;
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
/** @internal */
|
|
507
|
+
export const AccountingBankAccountInput$outboundSchema: z.ZodType<
|
|
508
|
+
AccountingBankAccountInput$Outbound,
|
|
509
|
+
z.ZodTypeDef,
|
|
510
|
+
AccountingBankAccountInput
|
|
511
|
+
> = z.object({
|
|
512
|
+
displayId: z.nullable(z.string()).optional(),
|
|
513
|
+
name: z.string().optional(),
|
|
514
|
+
accountNumber: z.nullable(z.string()).optional(),
|
|
515
|
+
accountType: AccountingBankAccountAccountType$outboundSchema.optional(),
|
|
516
|
+
bankName: z.nullable(z.string()).optional(),
|
|
517
|
+
currency: z.nullable(Currency$outboundSchema).optional(),
|
|
518
|
+
balance: z.nullable(z.number()).optional(),
|
|
519
|
+
availableBalance: z.nullable(z.number()).optional(),
|
|
520
|
+
overdraftLimit: z.nullable(z.number()).optional(),
|
|
521
|
+
routingNumber: z.nullable(z.string()).optional(),
|
|
522
|
+
iban: z.nullable(z.string()).optional(),
|
|
523
|
+
bic: z.nullable(z.string()).optional(),
|
|
524
|
+
bsbNumber: z.nullable(z.string()).optional(),
|
|
525
|
+
branchIdentifier: z.nullable(z.string()).optional(),
|
|
526
|
+
bankCode: z.nullable(z.string()).optional(),
|
|
527
|
+
country: z.nullable(z.string()).optional(),
|
|
528
|
+
status: z.nullable(AccountingBankAccountStatus$outboundSchema).optional(),
|
|
529
|
+
description: z.nullable(z.string()).optional(),
|
|
530
|
+
customFields: z.array(CustomField$outboundSchema).optional(),
|
|
531
|
+
}).transform((v) => {
|
|
532
|
+
return remap$(v, {
|
|
533
|
+
displayId: "display_id",
|
|
534
|
+
accountNumber: "account_number",
|
|
535
|
+
accountType: "account_type",
|
|
536
|
+
bankName: "bank_name",
|
|
537
|
+
availableBalance: "available_balance",
|
|
538
|
+
overdraftLimit: "overdraft_limit",
|
|
539
|
+
routingNumber: "routing_number",
|
|
540
|
+
bsbNumber: "bsb_number",
|
|
541
|
+
branchIdentifier: "branch_identifier",
|
|
542
|
+
bankCode: "bank_code",
|
|
543
|
+
customFields: "custom_fields",
|
|
544
|
+
});
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* @internal
|
|
549
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
550
|
+
*/
|
|
551
|
+
export namespace AccountingBankAccountInput$ {
|
|
552
|
+
/** @deprecated use `AccountingBankAccountInput$inboundSchema` instead. */
|
|
553
|
+
export const inboundSchema = AccountingBankAccountInput$inboundSchema;
|
|
554
|
+
/** @deprecated use `AccountingBankAccountInput$outboundSchema` instead. */
|
|
555
|
+
export const outboundSchema = AccountingBankAccountInput$outboundSchema;
|
|
556
|
+
/** @deprecated use `AccountingBankAccountInput$Outbound` instead. */
|
|
557
|
+
export type Outbound = AccountingBankAccountInput$Outbound;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
export function accountingBankAccountInputToJSON(
|
|
561
|
+
accountingBankAccountInput: AccountingBankAccountInput,
|
|
562
|
+
): string {
|
|
563
|
+
return JSON.stringify(
|
|
564
|
+
AccountingBankAccountInput$outboundSchema.parse(accountingBankAccountInput),
|
|
565
|
+
);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
export function accountingBankAccountInputFromJSON(
|
|
569
|
+
jsonString: string,
|
|
570
|
+
): SafeParseResult<AccountingBankAccountInput, SDKValidationError> {
|
|
571
|
+
return safeParse(
|
|
572
|
+
jsonString,
|
|
573
|
+
(x) => AccountingBankAccountInput$inboundSchema.parse(JSON.parse(x)),
|
|
574
|
+
`Failed to parse 'AccountingBankAccountInput' from JSON`,
|
|
575
|
+
);
|
|
576
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Filter by account status
|
|
13
|
+
*/
|
|
14
|
+
export const BankAccountsFilterStatus = {
|
|
15
|
+
Active: "active",
|
|
16
|
+
Inactive: "inactive",
|
|
17
|
+
Closed: "closed",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* Filter by account status
|
|
21
|
+
*/
|
|
22
|
+
export type BankAccountsFilterStatus = ClosedEnum<
|
|
23
|
+
typeof BankAccountsFilterStatus
|
|
24
|
+
>;
|
|
25
|
+
|
|
26
|
+
export type BankAccountsFilter = {
|
|
27
|
+
/**
|
|
28
|
+
* Filter by bank account name
|
|
29
|
+
*/
|
|
30
|
+
name?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Filter by account status
|
|
33
|
+
*/
|
|
34
|
+
status?: BankAccountsFilterStatus | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const BankAccountsFilterStatus$inboundSchema: z.ZodNativeEnum<
|
|
39
|
+
typeof BankAccountsFilterStatus
|
|
40
|
+
> = z.nativeEnum(BankAccountsFilterStatus);
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const BankAccountsFilterStatus$outboundSchema: z.ZodNativeEnum<
|
|
44
|
+
typeof BankAccountsFilterStatus
|
|
45
|
+
> = BankAccountsFilterStatus$inboundSchema;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
|
+
*/
|
|
51
|
+
export namespace BankAccountsFilterStatus$ {
|
|
52
|
+
/** @deprecated use `BankAccountsFilterStatus$inboundSchema` instead. */
|
|
53
|
+
export const inboundSchema = BankAccountsFilterStatus$inboundSchema;
|
|
54
|
+
/** @deprecated use `BankAccountsFilterStatus$outboundSchema` instead. */
|
|
55
|
+
export const outboundSchema = BankAccountsFilterStatus$outboundSchema;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const BankAccountsFilter$inboundSchema: z.ZodType<
|
|
60
|
+
BankAccountsFilter,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
unknown
|
|
63
|
+
> = z.object({
|
|
64
|
+
name: z.string().optional(),
|
|
65
|
+
status: BankAccountsFilterStatus$inboundSchema.optional(),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export type BankAccountsFilter$Outbound = {
|
|
70
|
+
name?: string | undefined;
|
|
71
|
+
status?: string | undefined;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const BankAccountsFilter$outboundSchema: z.ZodType<
|
|
76
|
+
BankAccountsFilter$Outbound,
|
|
77
|
+
z.ZodTypeDef,
|
|
78
|
+
BankAccountsFilter
|
|
79
|
+
> = z.object({
|
|
80
|
+
name: z.string().optional(),
|
|
81
|
+
status: BankAccountsFilterStatus$outboundSchema.optional(),
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
87
|
+
*/
|
|
88
|
+
export namespace BankAccountsFilter$ {
|
|
89
|
+
/** @deprecated use `BankAccountsFilter$inboundSchema` instead. */
|
|
90
|
+
export const inboundSchema = BankAccountsFilter$inboundSchema;
|
|
91
|
+
/** @deprecated use `BankAccountsFilter$outboundSchema` instead. */
|
|
92
|
+
export const outboundSchema = BankAccountsFilter$outboundSchema;
|
|
93
|
+
/** @deprecated use `BankAccountsFilter$Outbound` instead. */
|
|
94
|
+
export type Outbound = BankAccountsFilter$Outbound;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function bankAccountsFilterToJSON(
|
|
98
|
+
bankAccountsFilter: BankAccountsFilter,
|
|
99
|
+
): string {
|
|
100
|
+
return JSON.stringify(
|
|
101
|
+
BankAccountsFilter$outboundSchema.parse(bankAccountsFilter),
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function bankAccountsFilterFromJSON(
|
|
106
|
+
jsonString: string,
|
|
107
|
+
): SafeParseResult<BankAccountsFilter, SDKValidationError> {
|
|
108
|
+
return safeParse(
|
|
109
|
+
jsonString,
|
|
110
|
+
(x) => BankAccountsFilter$inboundSchema.parse(JSON.parse(x)),
|
|
111
|
+
`Failed to parse 'BankAccountsFilter' from JSON`,
|
|
112
|
+
);
|
|
113
|
+
}
|