@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,273 @@
|
|
|
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 { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type AccountingBankAccountsOneGlobals = {
|
|
13
|
+
/**
|
|
14
|
+
* ID of the consumer which you want to get or push data from
|
|
15
|
+
*/
|
|
16
|
+
consumerId?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The ID of your Unify application
|
|
19
|
+
*/
|
|
20
|
+
appId?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type AccountingBankAccountsOneRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* ID of the record you are acting upon.
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* ID of the consumer which you want to get or push data from
|
|
30
|
+
*/
|
|
31
|
+
consumerId?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The ID of your Unify application
|
|
34
|
+
*/
|
|
35
|
+
appId?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.
|
|
38
|
+
*/
|
|
39
|
+
serviceId?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Include raw response. Mostly used for debugging purposes
|
|
42
|
+
*/
|
|
43
|
+
raw?: boolean | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. <br /><br />Example: `fields=name,email,addresses.city`<br /><br />In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
|
|
46
|
+
*/
|
|
47
|
+
fields?: string | null | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type AccountingBankAccountsOneResponse = {
|
|
51
|
+
httpMeta: components.HTTPMetadata;
|
|
52
|
+
/**
|
|
53
|
+
* Bank Account
|
|
54
|
+
*/
|
|
55
|
+
getBankAccountResponse?: components.GetBankAccountResponse | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Unexpected error
|
|
58
|
+
*/
|
|
59
|
+
unexpectedErrorResponse?: components.UnexpectedErrorResponse | undefined;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export const AccountingBankAccountsOneGlobals$inboundSchema: z.ZodType<
|
|
64
|
+
AccountingBankAccountsOneGlobals,
|
|
65
|
+
z.ZodTypeDef,
|
|
66
|
+
unknown
|
|
67
|
+
> = z.object({
|
|
68
|
+
consumerId: z.string().optional(),
|
|
69
|
+
appId: z.string().optional(),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export type AccountingBankAccountsOneGlobals$Outbound = {
|
|
74
|
+
consumerId?: string | undefined;
|
|
75
|
+
appId?: string | undefined;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const AccountingBankAccountsOneGlobals$outboundSchema: z.ZodType<
|
|
80
|
+
AccountingBankAccountsOneGlobals$Outbound,
|
|
81
|
+
z.ZodTypeDef,
|
|
82
|
+
AccountingBankAccountsOneGlobals
|
|
83
|
+
> = z.object({
|
|
84
|
+
consumerId: z.string().optional(),
|
|
85
|
+
appId: z.string().optional(),
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
91
|
+
*/
|
|
92
|
+
export namespace AccountingBankAccountsOneGlobals$ {
|
|
93
|
+
/** @deprecated use `AccountingBankAccountsOneGlobals$inboundSchema` instead. */
|
|
94
|
+
export const inboundSchema = AccountingBankAccountsOneGlobals$inboundSchema;
|
|
95
|
+
/** @deprecated use `AccountingBankAccountsOneGlobals$outboundSchema` instead. */
|
|
96
|
+
export const outboundSchema = AccountingBankAccountsOneGlobals$outboundSchema;
|
|
97
|
+
/** @deprecated use `AccountingBankAccountsOneGlobals$Outbound` instead. */
|
|
98
|
+
export type Outbound = AccountingBankAccountsOneGlobals$Outbound;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function accountingBankAccountsOneGlobalsToJSON(
|
|
102
|
+
accountingBankAccountsOneGlobals: AccountingBankAccountsOneGlobals,
|
|
103
|
+
): string {
|
|
104
|
+
return JSON.stringify(
|
|
105
|
+
AccountingBankAccountsOneGlobals$outboundSchema.parse(
|
|
106
|
+
accountingBankAccountsOneGlobals,
|
|
107
|
+
),
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function accountingBankAccountsOneGlobalsFromJSON(
|
|
112
|
+
jsonString: string,
|
|
113
|
+
): SafeParseResult<AccountingBankAccountsOneGlobals, SDKValidationError> {
|
|
114
|
+
return safeParse(
|
|
115
|
+
jsonString,
|
|
116
|
+
(x) => AccountingBankAccountsOneGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
117
|
+
`Failed to parse 'AccountingBankAccountsOneGlobals' from JSON`,
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export const AccountingBankAccountsOneRequest$inboundSchema: z.ZodType<
|
|
123
|
+
AccountingBankAccountsOneRequest,
|
|
124
|
+
z.ZodTypeDef,
|
|
125
|
+
unknown
|
|
126
|
+
> = z.object({
|
|
127
|
+
id: z.string(),
|
|
128
|
+
consumerId: z.string().optional(),
|
|
129
|
+
appId: z.string().optional(),
|
|
130
|
+
serviceId: z.string().optional(),
|
|
131
|
+
raw: z.boolean().default(false),
|
|
132
|
+
fields: z.nullable(z.string()).optional(),
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
/** @internal */
|
|
136
|
+
export type AccountingBankAccountsOneRequest$Outbound = {
|
|
137
|
+
id: string;
|
|
138
|
+
consumerId?: string | undefined;
|
|
139
|
+
appId?: string | undefined;
|
|
140
|
+
serviceId?: string | undefined;
|
|
141
|
+
raw: boolean;
|
|
142
|
+
fields?: string | null | undefined;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const AccountingBankAccountsOneRequest$outboundSchema: z.ZodType<
|
|
147
|
+
AccountingBankAccountsOneRequest$Outbound,
|
|
148
|
+
z.ZodTypeDef,
|
|
149
|
+
AccountingBankAccountsOneRequest
|
|
150
|
+
> = z.object({
|
|
151
|
+
id: z.string(),
|
|
152
|
+
consumerId: z.string().optional(),
|
|
153
|
+
appId: z.string().optional(),
|
|
154
|
+
serviceId: z.string().optional(),
|
|
155
|
+
raw: z.boolean().default(false),
|
|
156
|
+
fields: z.nullable(z.string()).optional(),
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @internal
|
|
161
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
162
|
+
*/
|
|
163
|
+
export namespace AccountingBankAccountsOneRequest$ {
|
|
164
|
+
/** @deprecated use `AccountingBankAccountsOneRequest$inboundSchema` instead. */
|
|
165
|
+
export const inboundSchema = AccountingBankAccountsOneRequest$inboundSchema;
|
|
166
|
+
/** @deprecated use `AccountingBankAccountsOneRequest$outboundSchema` instead. */
|
|
167
|
+
export const outboundSchema = AccountingBankAccountsOneRequest$outboundSchema;
|
|
168
|
+
/** @deprecated use `AccountingBankAccountsOneRequest$Outbound` instead. */
|
|
169
|
+
export type Outbound = AccountingBankAccountsOneRequest$Outbound;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function accountingBankAccountsOneRequestToJSON(
|
|
173
|
+
accountingBankAccountsOneRequest: AccountingBankAccountsOneRequest,
|
|
174
|
+
): string {
|
|
175
|
+
return JSON.stringify(
|
|
176
|
+
AccountingBankAccountsOneRequest$outboundSchema.parse(
|
|
177
|
+
accountingBankAccountsOneRequest,
|
|
178
|
+
),
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function accountingBankAccountsOneRequestFromJSON(
|
|
183
|
+
jsonString: string,
|
|
184
|
+
): SafeParseResult<AccountingBankAccountsOneRequest, SDKValidationError> {
|
|
185
|
+
return safeParse(
|
|
186
|
+
jsonString,
|
|
187
|
+
(x) => AccountingBankAccountsOneRequest$inboundSchema.parse(JSON.parse(x)),
|
|
188
|
+
`Failed to parse 'AccountingBankAccountsOneRequest' from JSON`,
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** @internal */
|
|
193
|
+
export const AccountingBankAccountsOneResponse$inboundSchema: z.ZodType<
|
|
194
|
+
AccountingBankAccountsOneResponse,
|
|
195
|
+
z.ZodTypeDef,
|
|
196
|
+
unknown
|
|
197
|
+
> = z.object({
|
|
198
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
199
|
+
GetBankAccountResponse: components.GetBankAccountResponse$inboundSchema
|
|
200
|
+
.optional(),
|
|
201
|
+
UnexpectedErrorResponse: components.UnexpectedErrorResponse$inboundSchema
|
|
202
|
+
.optional(),
|
|
203
|
+
}).transform((v) => {
|
|
204
|
+
return remap$(v, {
|
|
205
|
+
"HttpMeta": "httpMeta",
|
|
206
|
+
"GetBankAccountResponse": "getBankAccountResponse",
|
|
207
|
+
"UnexpectedErrorResponse": "unexpectedErrorResponse",
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
/** @internal */
|
|
212
|
+
export type AccountingBankAccountsOneResponse$Outbound = {
|
|
213
|
+
HttpMeta: components.HTTPMetadata$Outbound;
|
|
214
|
+
GetBankAccountResponse?:
|
|
215
|
+
| components.GetBankAccountResponse$Outbound
|
|
216
|
+
| undefined;
|
|
217
|
+
UnexpectedErrorResponse?:
|
|
218
|
+
| components.UnexpectedErrorResponse$Outbound
|
|
219
|
+
| undefined;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
/** @internal */
|
|
223
|
+
export const AccountingBankAccountsOneResponse$outboundSchema: z.ZodType<
|
|
224
|
+
AccountingBankAccountsOneResponse$Outbound,
|
|
225
|
+
z.ZodTypeDef,
|
|
226
|
+
AccountingBankAccountsOneResponse
|
|
227
|
+
> = z.object({
|
|
228
|
+
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
229
|
+
getBankAccountResponse: components.GetBankAccountResponse$outboundSchema
|
|
230
|
+
.optional(),
|
|
231
|
+
unexpectedErrorResponse: components.UnexpectedErrorResponse$outboundSchema
|
|
232
|
+
.optional(),
|
|
233
|
+
}).transform((v) => {
|
|
234
|
+
return remap$(v, {
|
|
235
|
+
httpMeta: "HttpMeta",
|
|
236
|
+
getBankAccountResponse: "GetBankAccountResponse",
|
|
237
|
+
unexpectedErrorResponse: "UnexpectedErrorResponse",
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @internal
|
|
243
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
244
|
+
*/
|
|
245
|
+
export namespace AccountingBankAccountsOneResponse$ {
|
|
246
|
+
/** @deprecated use `AccountingBankAccountsOneResponse$inboundSchema` instead. */
|
|
247
|
+
export const inboundSchema = AccountingBankAccountsOneResponse$inboundSchema;
|
|
248
|
+
/** @deprecated use `AccountingBankAccountsOneResponse$outboundSchema` instead. */
|
|
249
|
+
export const outboundSchema =
|
|
250
|
+
AccountingBankAccountsOneResponse$outboundSchema;
|
|
251
|
+
/** @deprecated use `AccountingBankAccountsOneResponse$Outbound` instead. */
|
|
252
|
+
export type Outbound = AccountingBankAccountsOneResponse$Outbound;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export function accountingBankAccountsOneResponseToJSON(
|
|
256
|
+
accountingBankAccountsOneResponse: AccountingBankAccountsOneResponse,
|
|
257
|
+
): string {
|
|
258
|
+
return JSON.stringify(
|
|
259
|
+
AccountingBankAccountsOneResponse$outboundSchema.parse(
|
|
260
|
+
accountingBankAccountsOneResponse,
|
|
261
|
+
),
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export function accountingBankAccountsOneResponseFromJSON(
|
|
266
|
+
jsonString: string,
|
|
267
|
+
): SafeParseResult<AccountingBankAccountsOneResponse, SDKValidationError> {
|
|
268
|
+
return safeParse(
|
|
269
|
+
jsonString,
|
|
270
|
+
(x) => AccountingBankAccountsOneResponse$inboundSchema.parse(JSON.parse(x)),
|
|
271
|
+
`Failed to parse 'AccountingBankAccountsOneResponse' from JSON`,
|
|
272
|
+
);
|
|
273
|
+
}
|
|
@@ -0,0 +1,286 @@
|
|
|
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 { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type AccountingBankAccountsUpdateGlobals = {
|
|
13
|
+
/**
|
|
14
|
+
* ID of the consumer which you want to get or push data from
|
|
15
|
+
*/
|
|
16
|
+
consumerId?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The ID of your Unify application
|
|
19
|
+
*/
|
|
20
|
+
appId?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type AccountingBankAccountsUpdateRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* ID of the record you are acting upon.
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* ID of the consumer which you want to get or push data from
|
|
30
|
+
*/
|
|
31
|
+
consumerId?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The ID of your Unify application
|
|
34
|
+
*/
|
|
35
|
+
appId?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.
|
|
38
|
+
*/
|
|
39
|
+
serviceId?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Include raw response. Mostly used for debugging purposes
|
|
42
|
+
*/
|
|
43
|
+
raw?: boolean | undefined;
|
|
44
|
+
accountingBankAccount: components.AccountingBankAccountInput;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export type AccountingBankAccountsUpdateResponse = {
|
|
48
|
+
httpMeta: components.HTTPMetadata;
|
|
49
|
+
/**
|
|
50
|
+
* Bank Account updated
|
|
51
|
+
*/
|
|
52
|
+
updateBankAccountResponse?: components.UpdateBankAccountResponse | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Unexpected error
|
|
55
|
+
*/
|
|
56
|
+
unexpectedErrorResponse?: components.UnexpectedErrorResponse | undefined;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const AccountingBankAccountsUpdateGlobals$inboundSchema: z.ZodType<
|
|
61
|
+
AccountingBankAccountsUpdateGlobals,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
unknown
|
|
64
|
+
> = z.object({
|
|
65
|
+
consumerId: z.string().optional(),
|
|
66
|
+
appId: z.string().optional(),
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export type AccountingBankAccountsUpdateGlobals$Outbound = {
|
|
71
|
+
consumerId?: string | undefined;
|
|
72
|
+
appId?: string | undefined;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const AccountingBankAccountsUpdateGlobals$outboundSchema: z.ZodType<
|
|
77
|
+
AccountingBankAccountsUpdateGlobals$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
AccountingBankAccountsUpdateGlobals
|
|
80
|
+
> = z.object({
|
|
81
|
+
consumerId: z.string().optional(),
|
|
82
|
+
appId: z.string().optional(),
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
88
|
+
*/
|
|
89
|
+
export namespace AccountingBankAccountsUpdateGlobals$ {
|
|
90
|
+
/** @deprecated use `AccountingBankAccountsUpdateGlobals$inboundSchema` instead. */
|
|
91
|
+
export const inboundSchema =
|
|
92
|
+
AccountingBankAccountsUpdateGlobals$inboundSchema;
|
|
93
|
+
/** @deprecated use `AccountingBankAccountsUpdateGlobals$outboundSchema` instead. */
|
|
94
|
+
export const outboundSchema =
|
|
95
|
+
AccountingBankAccountsUpdateGlobals$outboundSchema;
|
|
96
|
+
/** @deprecated use `AccountingBankAccountsUpdateGlobals$Outbound` instead. */
|
|
97
|
+
export type Outbound = AccountingBankAccountsUpdateGlobals$Outbound;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function accountingBankAccountsUpdateGlobalsToJSON(
|
|
101
|
+
accountingBankAccountsUpdateGlobals: AccountingBankAccountsUpdateGlobals,
|
|
102
|
+
): string {
|
|
103
|
+
return JSON.stringify(
|
|
104
|
+
AccountingBankAccountsUpdateGlobals$outboundSchema.parse(
|
|
105
|
+
accountingBankAccountsUpdateGlobals,
|
|
106
|
+
),
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function accountingBankAccountsUpdateGlobalsFromJSON(
|
|
111
|
+
jsonString: string,
|
|
112
|
+
): SafeParseResult<AccountingBankAccountsUpdateGlobals, SDKValidationError> {
|
|
113
|
+
return safeParse(
|
|
114
|
+
jsonString,
|
|
115
|
+
(x) =>
|
|
116
|
+
AccountingBankAccountsUpdateGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
117
|
+
`Failed to parse 'AccountingBankAccountsUpdateGlobals' from JSON`,
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export const AccountingBankAccountsUpdateRequest$inboundSchema: z.ZodType<
|
|
123
|
+
AccountingBankAccountsUpdateRequest,
|
|
124
|
+
z.ZodTypeDef,
|
|
125
|
+
unknown
|
|
126
|
+
> = z.object({
|
|
127
|
+
id: z.string(),
|
|
128
|
+
consumerId: z.string().optional(),
|
|
129
|
+
appId: z.string().optional(),
|
|
130
|
+
serviceId: z.string().optional(),
|
|
131
|
+
raw: z.boolean().default(false),
|
|
132
|
+
AccountingBankAccount: components.AccountingBankAccountInput$inboundSchema,
|
|
133
|
+
}).transform((v) => {
|
|
134
|
+
return remap$(v, {
|
|
135
|
+
"AccountingBankAccount": "accountingBankAccount",
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
/** @internal */
|
|
140
|
+
export type AccountingBankAccountsUpdateRequest$Outbound = {
|
|
141
|
+
id: string;
|
|
142
|
+
consumerId?: string | undefined;
|
|
143
|
+
appId?: string | undefined;
|
|
144
|
+
serviceId?: string | undefined;
|
|
145
|
+
raw: boolean;
|
|
146
|
+
AccountingBankAccount: components.AccountingBankAccountInput$Outbound;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
/** @internal */
|
|
150
|
+
export const AccountingBankAccountsUpdateRequest$outboundSchema: z.ZodType<
|
|
151
|
+
AccountingBankAccountsUpdateRequest$Outbound,
|
|
152
|
+
z.ZodTypeDef,
|
|
153
|
+
AccountingBankAccountsUpdateRequest
|
|
154
|
+
> = z.object({
|
|
155
|
+
id: z.string(),
|
|
156
|
+
consumerId: z.string().optional(),
|
|
157
|
+
appId: z.string().optional(),
|
|
158
|
+
serviceId: z.string().optional(),
|
|
159
|
+
raw: z.boolean().default(false),
|
|
160
|
+
accountingBankAccount: components.AccountingBankAccountInput$outboundSchema,
|
|
161
|
+
}).transform((v) => {
|
|
162
|
+
return remap$(v, {
|
|
163
|
+
accountingBankAccount: "AccountingBankAccount",
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @internal
|
|
169
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
170
|
+
*/
|
|
171
|
+
export namespace AccountingBankAccountsUpdateRequest$ {
|
|
172
|
+
/** @deprecated use `AccountingBankAccountsUpdateRequest$inboundSchema` instead. */
|
|
173
|
+
export const inboundSchema =
|
|
174
|
+
AccountingBankAccountsUpdateRequest$inboundSchema;
|
|
175
|
+
/** @deprecated use `AccountingBankAccountsUpdateRequest$outboundSchema` instead. */
|
|
176
|
+
export const outboundSchema =
|
|
177
|
+
AccountingBankAccountsUpdateRequest$outboundSchema;
|
|
178
|
+
/** @deprecated use `AccountingBankAccountsUpdateRequest$Outbound` instead. */
|
|
179
|
+
export type Outbound = AccountingBankAccountsUpdateRequest$Outbound;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function accountingBankAccountsUpdateRequestToJSON(
|
|
183
|
+
accountingBankAccountsUpdateRequest: AccountingBankAccountsUpdateRequest,
|
|
184
|
+
): string {
|
|
185
|
+
return JSON.stringify(
|
|
186
|
+
AccountingBankAccountsUpdateRequest$outboundSchema.parse(
|
|
187
|
+
accountingBankAccountsUpdateRequest,
|
|
188
|
+
),
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export function accountingBankAccountsUpdateRequestFromJSON(
|
|
193
|
+
jsonString: string,
|
|
194
|
+
): SafeParseResult<AccountingBankAccountsUpdateRequest, SDKValidationError> {
|
|
195
|
+
return safeParse(
|
|
196
|
+
jsonString,
|
|
197
|
+
(x) =>
|
|
198
|
+
AccountingBankAccountsUpdateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
199
|
+
`Failed to parse 'AccountingBankAccountsUpdateRequest' from JSON`,
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** @internal */
|
|
204
|
+
export const AccountingBankAccountsUpdateResponse$inboundSchema: z.ZodType<
|
|
205
|
+
AccountingBankAccountsUpdateResponse,
|
|
206
|
+
z.ZodTypeDef,
|
|
207
|
+
unknown
|
|
208
|
+
> = z.object({
|
|
209
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
210
|
+
UpdateBankAccountResponse: components.UpdateBankAccountResponse$inboundSchema
|
|
211
|
+
.optional(),
|
|
212
|
+
UnexpectedErrorResponse: components.UnexpectedErrorResponse$inboundSchema
|
|
213
|
+
.optional(),
|
|
214
|
+
}).transform((v) => {
|
|
215
|
+
return remap$(v, {
|
|
216
|
+
"HttpMeta": "httpMeta",
|
|
217
|
+
"UpdateBankAccountResponse": "updateBankAccountResponse",
|
|
218
|
+
"UnexpectedErrorResponse": "unexpectedErrorResponse",
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
/** @internal */
|
|
223
|
+
export type AccountingBankAccountsUpdateResponse$Outbound = {
|
|
224
|
+
HttpMeta: components.HTTPMetadata$Outbound;
|
|
225
|
+
UpdateBankAccountResponse?:
|
|
226
|
+
| components.UpdateBankAccountResponse$Outbound
|
|
227
|
+
| undefined;
|
|
228
|
+
UnexpectedErrorResponse?:
|
|
229
|
+
| components.UnexpectedErrorResponse$Outbound
|
|
230
|
+
| undefined;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
/** @internal */
|
|
234
|
+
export const AccountingBankAccountsUpdateResponse$outboundSchema: z.ZodType<
|
|
235
|
+
AccountingBankAccountsUpdateResponse$Outbound,
|
|
236
|
+
z.ZodTypeDef,
|
|
237
|
+
AccountingBankAccountsUpdateResponse
|
|
238
|
+
> = z.object({
|
|
239
|
+
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
240
|
+
updateBankAccountResponse: components.UpdateBankAccountResponse$outboundSchema
|
|
241
|
+
.optional(),
|
|
242
|
+
unexpectedErrorResponse: components.UnexpectedErrorResponse$outboundSchema
|
|
243
|
+
.optional(),
|
|
244
|
+
}).transform((v) => {
|
|
245
|
+
return remap$(v, {
|
|
246
|
+
httpMeta: "HttpMeta",
|
|
247
|
+
updateBankAccountResponse: "UpdateBankAccountResponse",
|
|
248
|
+
unexpectedErrorResponse: "UnexpectedErrorResponse",
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @internal
|
|
254
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
255
|
+
*/
|
|
256
|
+
export namespace AccountingBankAccountsUpdateResponse$ {
|
|
257
|
+
/** @deprecated use `AccountingBankAccountsUpdateResponse$inboundSchema` instead. */
|
|
258
|
+
export const inboundSchema =
|
|
259
|
+
AccountingBankAccountsUpdateResponse$inboundSchema;
|
|
260
|
+
/** @deprecated use `AccountingBankAccountsUpdateResponse$outboundSchema` instead. */
|
|
261
|
+
export const outboundSchema =
|
|
262
|
+
AccountingBankAccountsUpdateResponse$outboundSchema;
|
|
263
|
+
/** @deprecated use `AccountingBankAccountsUpdateResponse$Outbound` instead. */
|
|
264
|
+
export type Outbound = AccountingBankAccountsUpdateResponse$Outbound;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export function accountingBankAccountsUpdateResponseToJSON(
|
|
268
|
+
accountingBankAccountsUpdateResponse: AccountingBankAccountsUpdateResponse,
|
|
269
|
+
): string {
|
|
270
|
+
return JSON.stringify(
|
|
271
|
+
AccountingBankAccountsUpdateResponse$outboundSchema.parse(
|
|
272
|
+
accountingBankAccountsUpdateResponse,
|
|
273
|
+
),
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export function accountingBankAccountsUpdateResponseFromJSON(
|
|
278
|
+
jsonString: string,
|
|
279
|
+
): SafeParseResult<AccountingBankAccountsUpdateResponse, SDKValidationError> {
|
|
280
|
+
return safeParse(
|
|
281
|
+
jsonString,
|
|
282
|
+
(x) =>
|
|
283
|
+
AccountingBankAccountsUpdateResponse$inboundSchema.parse(JSON.parse(x)),
|
|
284
|
+
`Failed to parse 'AccountingBankAccountsUpdateResponse' from JSON`,
|
|
285
|
+
);
|
|
286
|
+
}
|
|
@@ -10,6 +10,11 @@ export * from "./accountingattachmentsdownload.js";
|
|
|
10
10
|
export * from "./accountingattachmentsone.js";
|
|
11
11
|
export * from "./accountingattachmentsupload.js";
|
|
12
12
|
export * from "./accountingbalancesheetone.js";
|
|
13
|
+
export * from "./accountingbankaccountsadd.js";
|
|
14
|
+
export * from "./accountingbankaccountsall.js";
|
|
15
|
+
export * from "./accountingbankaccountsdelete.js";
|
|
16
|
+
export * from "./accountingbankaccountsone.js";
|
|
17
|
+
export * from "./accountingbankaccountsupdate.js";
|
|
13
18
|
export * from "./accountingbankfeedaccountsadd.js";
|
|
14
19
|
export * from "./accountingbankfeedaccountsall.js";
|
|
15
20
|
export * from "./accountingbankfeedaccountsdelete.js";
|
package/src/sdk/accounting.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { AgedCreditors } from "./agedcreditors.js";
|
|
|
7
7
|
import { AgedDebtors } from "./ageddebtors.js";
|
|
8
8
|
import { Attachments } from "./attachments.js";
|
|
9
9
|
import { BalanceSheet } from "./balancesheet.js";
|
|
10
|
+
import { BankAccounts } from "./bankaccounts.js";
|
|
10
11
|
import { BankFeedAccounts } from "./bankfeedaccounts.js";
|
|
11
12
|
import { BankFeedStatements } from "./bankfeedstatements.js";
|
|
12
13
|
import { BillPayments } from "./billpayments.js";
|
|
@@ -122,6 +123,11 @@ export class Accounting extends ClientSDK {
|
|
|
122
123
|
return (this._attachments ??= new Attachments(this._options));
|
|
123
124
|
}
|
|
124
125
|
|
|
126
|
+
private _bankAccounts?: BankAccounts;
|
|
127
|
+
get bankAccounts(): BankAccounts {
|
|
128
|
+
return (this._bankAccounts ??= new BankAccounts(this._options));
|
|
129
|
+
}
|
|
130
|
+
|
|
125
131
|
private _trackingCategories?: TrackingCategories;
|
|
126
132
|
get trackingCategories(): TrackingCategories {
|
|
127
133
|
return (this._trackingCategories ??= new TrackingCategories(this._options));
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { accountingBankAccountsCreate } from "../funcs/accountingBankAccountsCreate.js";
|
|
6
|
+
import { accountingBankAccountsDelete } from "../funcs/accountingBankAccountsDelete.js";
|
|
7
|
+
import { accountingBankAccountsGet } from "../funcs/accountingBankAccountsGet.js";
|
|
8
|
+
import { accountingBankAccountsList } from "../funcs/accountingBankAccountsList.js";
|
|
9
|
+
import { accountingBankAccountsUpdate } from "../funcs/accountingBankAccountsUpdate.js";
|
|
10
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import * as operations from "../models/operations/index.js";
|
|
12
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
13
|
+
import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
14
|
+
|
|
15
|
+
export class BankAccounts extends ClientSDK {
|
|
16
|
+
/**
|
|
17
|
+
* List Bank Accounts
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* List Bank Accounts
|
|
21
|
+
*/
|
|
22
|
+
async list(
|
|
23
|
+
request: operations.AccountingBankAccountsAllRequest,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): Promise<
|
|
26
|
+
PageIterator<
|
|
27
|
+
operations.AccountingBankAccountsAllResponse,
|
|
28
|
+
{ cursor: string }
|
|
29
|
+
>
|
|
30
|
+
> {
|
|
31
|
+
return unwrapResultIterator(accountingBankAccountsList(
|
|
32
|
+
this,
|
|
33
|
+
request,
|
|
34
|
+
options,
|
|
35
|
+
));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Create Bank Account
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Create Bank Account
|
|
43
|
+
*/
|
|
44
|
+
async create(
|
|
45
|
+
request: operations.AccountingBankAccountsAddRequest,
|
|
46
|
+
options?: RequestOptions,
|
|
47
|
+
): Promise<operations.AccountingBankAccountsAddResponse> {
|
|
48
|
+
return unwrapAsync(accountingBankAccountsCreate(
|
|
49
|
+
this,
|
|
50
|
+
request,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get Bank Account
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* Get Bank Account
|
|
60
|
+
*/
|
|
61
|
+
async get(
|
|
62
|
+
request: operations.AccountingBankAccountsOneRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<operations.AccountingBankAccountsOneResponse> {
|
|
65
|
+
return unwrapAsync(accountingBankAccountsGet(
|
|
66
|
+
this,
|
|
67
|
+
request,
|
|
68
|
+
options,
|
|
69
|
+
));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Update Bank Account
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
* Update Bank Account
|
|
77
|
+
*/
|
|
78
|
+
async update(
|
|
79
|
+
request: operations.AccountingBankAccountsUpdateRequest,
|
|
80
|
+
options?: RequestOptions,
|
|
81
|
+
): Promise<operations.AccountingBankAccountsUpdateResponse> {
|
|
82
|
+
return unwrapAsync(accountingBankAccountsUpdate(
|
|
83
|
+
this,
|
|
84
|
+
request,
|
|
85
|
+
options,
|
|
86
|
+
));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Delete Bank Account
|
|
91
|
+
*
|
|
92
|
+
* @remarks
|
|
93
|
+
* Delete Bank Account
|
|
94
|
+
*/
|
|
95
|
+
async delete(
|
|
96
|
+
request: operations.AccountingBankAccountsDeleteRequest,
|
|
97
|
+
options?: RequestOptions,
|
|
98
|
+
): Promise<operations.AccountingBankAccountsDeleteResponse> {
|
|
99
|
+
return unwrapAsync(accountingBankAccountsDelete(
|
|
100
|
+
this,
|
|
101
|
+
request,
|
|
102
|
+
options,
|
|
103
|
+
));
|
|
104
|
+
}
|
|
105
|
+
}
|