@apideck/unify 0.35.0 → 0.36.0
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/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/bankaccounts.test.ts +3 -0
- package/src/funcs/accountingBankAccountsGet.ts +15 -5
- package/src/lib/config.ts +3 -3
- package/src/models/components/bankaccountfilter.ts +64 -0
- package/src/models/components/connection.ts +13 -20
- package/src/models/components/customfield.ts +301 -45
- package/src/models/components/ecommerceorderlineitem.ts +2 -2
- package/src/models/components/filessort.ts +1 -0
- package/src/models/components/folder.ts +11 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/invoiceitem.ts +13 -0
- package/src/models/components/lead.ts +6 -0
- package/src/models/components/leadinput.ts +7 -0
- package/src/models/components/paymentsfilter.ts +21 -0
- package/src/models/components/pipeline.ts +21 -0
- package/src/models/components/pipelineinput.ts +6 -0
- package/src/models/components/simpleformfieldoption.ts +30 -40
- package/src/models/operations/accountingbankaccountsone.ts +6 -0
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -166,6 +166,9 @@ test("Bankaccounts Accounting Bank Accounts One", async () => {
|
|
|
166
166
|
|
|
167
167
|
const result = await apideck.accounting.bankAccounts.get({
|
|
168
168
|
id: "<id>",
|
|
169
|
+
filter: {
|
|
170
|
+
accountType: "checking",
|
|
171
|
+
},
|
|
169
172
|
consumerId: "test-consumer",
|
|
170
173
|
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
|
|
171
174
|
serviceId: "salesforce",
|
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { ApideckCore } from "../core.js";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
encodeDeepObjectQuery,
|
|
8
|
+
encodeFormQuery,
|
|
9
|
+
encodeSimple,
|
|
10
|
+
queryJoin,
|
|
11
|
+
} from "../lib/encodings.js";
|
|
7
12
|
import * as M from "../lib/matchers.js";
|
|
8
13
|
import { compactMap } from "../lib/primitives.js";
|
|
9
14
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -106,10 +111,15 @@ async function $do(
|
|
|
106
111
|
|
|
107
112
|
const path = pathToFunc("/accounting/bank-accounts/{id}")(pathParams);
|
|
108
113
|
|
|
109
|
-
const query =
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
const query = queryJoin(
|
|
115
|
+
encodeDeepObjectQuery({
|
|
116
|
+
"filter": payload.filter,
|
|
117
|
+
}),
|
|
118
|
+
encodeFormQuery({
|
|
119
|
+
"fields": payload.fields,
|
|
120
|
+
"raw": payload.raw,
|
|
121
|
+
}),
|
|
122
|
+
);
|
|
113
123
|
|
|
114
124
|
const headers = new Headers(compactMap({
|
|
115
125
|
Accept: "application/json",
|
package/src/lib/config.ts
CHANGED
|
@@ -67,8 +67,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
67
67
|
|
|
68
68
|
export const SDK_METADATA = {
|
|
69
69
|
language: "typescript",
|
|
70
|
-
openapiDocVersion: "10.
|
|
71
|
-
sdkVersion: "0.
|
|
70
|
+
openapiDocVersion: "10.23.1",
|
|
71
|
+
sdkVersion: "0.36.0",
|
|
72
72
|
genVersion: "2.767.2",
|
|
73
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
73
|
+
userAgent: "speakeasy-sdk/typescript 0.36.0 2.767.2 10.23.1 @apideck/unify",
|
|
74
74
|
} as const;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Filter by account type
|
|
11
|
+
*/
|
|
12
|
+
export const BankAccountFilterAccountType = {
|
|
13
|
+
Checking: "checking",
|
|
14
|
+
Savings: "savings",
|
|
15
|
+
CreditCard: "credit_card",
|
|
16
|
+
MoneyMarket: "money_market",
|
|
17
|
+
LineOfCredit: "line_of_credit",
|
|
18
|
+
Other: "other",
|
|
19
|
+
Cash: "cash",
|
|
20
|
+
} as const;
|
|
21
|
+
/**
|
|
22
|
+
* Filter by account type
|
|
23
|
+
*/
|
|
24
|
+
export type BankAccountFilterAccountType = ClosedEnum<
|
|
25
|
+
typeof BankAccountFilterAccountType
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
export type BankAccountFilter = {
|
|
29
|
+
/**
|
|
30
|
+
* Filter by account type
|
|
31
|
+
*/
|
|
32
|
+
accountType?: BankAccountFilterAccountType | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const BankAccountFilterAccountType$outboundSchema: z.ZodNativeEnum<
|
|
37
|
+
typeof BankAccountFilterAccountType
|
|
38
|
+
> = z.nativeEnum(BankAccountFilterAccountType);
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type BankAccountFilter$Outbound = {
|
|
42
|
+
account_type?: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const BankAccountFilter$outboundSchema: z.ZodType<
|
|
47
|
+
BankAccountFilter$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
BankAccountFilter
|
|
50
|
+
> = z.object({
|
|
51
|
+
accountType: BankAccountFilterAccountType$outboundSchema.optional(),
|
|
52
|
+
}).transform((v) => {
|
|
53
|
+
return remap$(v, {
|
|
54
|
+
accountType: "account_type",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export function bankAccountFilterToJSON(
|
|
59
|
+
bankAccountFilter: BankAccountFilter,
|
|
60
|
+
): string {
|
|
61
|
+
return JSON.stringify(
|
|
62
|
+
BankAccountFilter$outboundSchema.parse(bankAccountFilter),
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -75,7 +75,7 @@ export const Target = {
|
|
|
75
75
|
} as const;
|
|
76
76
|
export type Target = ClosedEnum<typeof Target>;
|
|
77
77
|
|
|
78
|
-
export type
|
|
78
|
+
export type Value5 = string | number | number;
|
|
79
79
|
|
|
80
80
|
export type ConnectionValue =
|
|
81
81
|
| string
|
|
@@ -290,35 +290,28 @@ export const Target$inboundSchema: z.ZodNativeEnum<typeof Target> = z
|
|
|
290
290
|
.nativeEnum(Target);
|
|
291
291
|
|
|
292
292
|
/** @internal */
|
|
293
|
-
export const
|
|
294
|
-
|
|
295
|
-
z.ZodTypeDef,
|
|
296
|
-
unknown
|
|
297
|
-
> = z.union([z.string(), z.number().int(), z.number()]);
|
|
293
|
+
export const Value5$inboundSchema: z.ZodType<Value5, z.ZodTypeDef, unknown> = z
|
|
294
|
+
.union([z.string(), z.number().int(), z.number()]);
|
|
298
295
|
/** @internal */
|
|
299
|
-
export type
|
|
296
|
+
export type Value5$Outbound = string | number | number;
|
|
300
297
|
|
|
301
298
|
/** @internal */
|
|
302
|
-
export const
|
|
303
|
-
|
|
299
|
+
export const Value5$outboundSchema: z.ZodType<
|
|
300
|
+
Value5$Outbound,
|
|
304
301
|
z.ZodTypeDef,
|
|
305
|
-
|
|
302
|
+
Value5
|
|
306
303
|
> = z.union([z.string(), z.number().int(), z.number()]);
|
|
307
304
|
|
|
308
|
-
export function
|
|
309
|
-
|
|
310
|
-
): string {
|
|
311
|
-
return JSON.stringify(
|
|
312
|
-
ConnectionValue5$outboundSchema.parse(connectionValue5),
|
|
313
|
-
);
|
|
305
|
+
export function value5ToJSON(value5: Value5): string {
|
|
306
|
+
return JSON.stringify(Value5$outboundSchema.parse(value5));
|
|
314
307
|
}
|
|
315
|
-
export function
|
|
308
|
+
export function value5FromJSON(
|
|
316
309
|
jsonString: string,
|
|
317
|
-
): SafeParseResult<
|
|
310
|
+
): SafeParseResult<Value5, SDKValidationError> {
|
|
318
311
|
return safeParse(
|
|
319
312
|
jsonString,
|
|
320
|
-
(x) =>
|
|
321
|
-
`Failed to parse '
|
|
313
|
+
(x) => Value5$inboundSchema.parse(JSON.parse(x)),
|
|
314
|
+
`Failed to parse 'Value5' from JSON`,
|
|
322
315
|
);
|
|
323
316
|
}
|
|
324
317
|
|
|
@@ -7,16 +7,52 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type CustomFieldValue25 = string | number | boolean | {
|
|
11
|
+
[k: string]: any;
|
|
12
|
+
};
|
|
11
13
|
|
|
12
|
-
export type
|
|
14
|
+
export type CustomFieldValue =
|
|
13
15
|
| string
|
|
14
16
|
| number
|
|
15
17
|
| boolean
|
|
16
18
|
| { [k: string]: any }
|
|
17
19
|
| Array<string | number | boolean | { [k: string]: any } | null>;
|
|
18
20
|
|
|
19
|
-
export type
|
|
21
|
+
export type CustomField2 = {
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier for the custom field.
|
|
24
|
+
*/
|
|
25
|
+
id?: string | null | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Name of the custom field.
|
|
28
|
+
*/
|
|
29
|
+
name: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* More information about the custom field
|
|
32
|
+
*/
|
|
33
|
+
description?: string | null | undefined;
|
|
34
|
+
value?:
|
|
35
|
+
| string
|
|
36
|
+
| number
|
|
37
|
+
| boolean
|
|
38
|
+
| { [k: string]: any }
|
|
39
|
+
| Array<string | number | boolean | { [k: string]: any } | null>
|
|
40
|
+
| null
|
|
41
|
+
| undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type CustomFieldValue5 = string | number | boolean | {
|
|
45
|
+
[k: string]: any;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export type CustomField1Value =
|
|
49
|
+
| string
|
|
50
|
+
| number
|
|
51
|
+
| boolean
|
|
52
|
+
| { [k: string]: any }
|
|
53
|
+
| Array<string | number | boolean | { [k: string]: any } | null>;
|
|
54
|
+
|
|
55
|
+
export type CustomField1 = {
|
|
20
56
|
/**
|
|
21
57
|
* Unique identifier for the custom field.
|
|
22
58
|
*/
|
|
@@ -39,55 +75,234 @@ export type CustomField = {
|
|
|
39
75
|
| undefined;
|
|
40
76
|
};
|
|
41
77
|
|
|
78
|
+
export type CustomField = CustomField1 | CustomField2;
|
|
79
|
+
|
|
42
80
|
/** @internal */
|
|
43
|
-
export const
|
|
44
|
-
|
|
81
|
+
export const CustomFieldValue25$inboundSchema: z.ZodType<
|
|
82
|
+
CustomFieldValue25,
|
|
83
|
+
z.ZodTypeDef,
|
|
84
|
+
unknown
|
|
85
|
+
> = z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]);
|
|
45
86
|
/** @internal */
|
|
46
|
-
export type
|
|
87
|
+
export type CustomFieldValue25$Outbound = string | number | boolean | {
|
|
88
|
+
[k: string]: any;
|
|
89
|
+
};
|
|
47
90
|
|
|
48
91
|
/** @internal */
|
|
49
|
-
export const
|
|
50
|
-
|
|
92
|
+
export const CustomFieldValue25$outboundSchema: z.ZodType<
|
|
93
|
+
CustomFieldValue25$Outbound,
|
|
94
|
+
z.ZodTypeDef,
|
|
95
|
+
CustomFieldValue25
|
|
96
|
+
> = z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]);
|
|
51
97
|
|
|
52
|
-
export function
|
|
53
|
-
|
|
98
|
+
export function customFieldValue25ToJSON(
|
|
99
|
+
customFieldValue25: CustomFieldValue25,
|
|
100
|
+
): string {
|
|
101
|
+
return JSON.stringify(
|
|
102
|
+
CustomFieldValue25$outboundSchema.parse(customFieldValue25),
|
|
103
|
+
);
|
|
54
104
|
}
|
|
55
|
-
export function
|
|
105
|
+
export function customFieldValue25FromJSON(
|
|
56
106
|
jsonString: string,
|
|
57
|
-
): SafeParseResult<
|
|
107
|
+
): SafeParseResult<CustomFieldValue25, SDKValidationError> {
|
|
58
108
|
return safeParse(
|
|
59
109
|
jsonString,
|
|
60
|
-
(x) =>
|
|
61
|
-
`Failed to parse '
|
|
110
|
+
(x) => CustomFieldValue25$inboundSchema.parse(JSON.parse(x)),
|
|
111
|
+
`Failed to parse 'CustomFieldValue25' from JSON`,
|
|
62
112
|
);
|
|
63
113
|
}
|
|
64
114
|
|
|
65
115
|
/** @internal */
|
|
66
|
-
export const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
116
|
+
export const CustomFieldValue$inboundSchema: z.ZodType<
|
|
117
|
+
CustomFieldValue,
|
|
118
|
+
z.ZodTypeDef,
|
|
119
|
+
unknown
|
|
120
|
+
> = z.union([
|
|
121
|
+
z.string(),
|
|
122
|
+
z.number(),
|
|
123
|
+
z.boolean(),
|
|
124
|
+
z.record(z.any()),
|
|
125
|
+
z.array(
|
|
126
|
+
z.nullable(
|
|
127
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
128
|
+
),
|
|
129
|
+
),
|
|
130
|
+
]);
|
|
131
|
+
/** @internal */
|
|
132
|
+
export type CustomFieldValue$Outbound = string | number | boolean | {
|
|
133
|
+
[k: string]: any;
|
|
134
|
+
} | Array<string | number | boolean | { [k: string]: any } | null>;
|
|
135
|
+
|
|
136
|
+
/** @internal */
|
|
137
|
+
export const CustomFieldValue$outboundSchema: z.ZodType<
|
|
138
|
+
CustomFieldValue$Outbound,
|
|
139
|
+
z.ZodTypeDef,
|
|
140
|
+
CustomFieldValue
|
|
141
|
+
> = z.union([
|
|
142
|
+
z.string(),
|
|
143
|
+
z.number(),
|
|
144
|
+
z.boolean(),
|
|
145
|
+
z.record(z.any()),
|
|
146
|
+
z.array(
|
|
147
|
+
z.nullable(
|
|
148
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
149
|
+
),
|
|
150
|
+
),
|
|
151
|
+
]);
|
|
152
|
+
|
|
153
|
+
export function customFieldValueToJSON(
|
|
154
|
+
customFieldValue: CustomFieldValue,
|
|
155
|
+
): string {
|
|
156
|
+
return JSON.stringify(
|
|
157
|
+
CustomFieldValue$outboundSchema.parse(customFieldValue),
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
export function customFieldValueFromJSON(
|
|
161
|
+
jsonString: string,
|
|
162
|
+
): SafeParseResult<CustomFieldValue, SDKValidationError> {
|
|
163
|
+
return safeParse(
|
|
164
|
+
jsonString,
|
|
165
|
+
(x) => CustomFieldValue$inboundSchema.parse(JSON.parse(x)),
|
|
166
|
+
`Failed to parse 'CustomFieldValue' from JSON`,
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export const CustomField2$inboundSchema: z.ZodType<
|
|
172
|
+
CustomField2,
|
|
173
|
+
z.ZodTypeDef,
|
|
174
|
+
unknown
|
|
175
|
+
> = z.object({
|
|
176
|
+
id: z.nullable(z.string()).optional(),
|
|
177
|
+
name: z.nullable(z.string()),
|
|
178
|
+
description: z.nullable(z.string()).optional(),
|
|
179
|
+
value: z.nullable(
|
|
180
|
+
z.union([
|
|
181
|
+
z.string(),
|
|
182
|
+
z.number(),
|
|
183
|
+
z.boolean(),
|
|
184
|
+
z.record(z.any()),
|
|
185
|
+
z.array(
|
|
186
|
+
z.nullable(
|
|
187
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
188
|
+
),
|
|
75
189
|
),
|
|
190
|
+
]),
|
|
191
|
+
).optional(),
|
|
192
|
+
});
|
|
193
|
+
/** @internal */
|
|
194
|
+
export type CustomField2$Outbound = {
|
|
195
|
+
id?: string | null | undefined;
|
|
196
|
+
name: string | null;
|
|
197
|
+
description?: string | null | undefined;
|
|
198
|
+
value?:
|
|
199
|
+
| string
|
|
200
|
+
| number
|
|
201
|
+
| boolean
|
|
202
|
+
| { [k: string]: any }
|
|
203
|
+
| Array<string | number | boolean | { [k: string]: any } | null>
|
|
204
|
+
| null
|
|
205
|
+
| undefined;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
/** @internal */
|
|
209
|
+
export const CustomField2$outboundSchema: z.ZodType<
|
|
210
|
+
CustomField2$Outbound,
|
|
211
|
+
z.ZodTypeDef,
|
|
212
|
+
CustomField2
|
|
213
|
+
> = z.object({
|
|
214
|
+
id: z.nullable(z.string()).optional(),
|
|
215
|
+
name: z.nullable(z.string()),
|
|
216
|
+
description: z.nullable(z.string()).optional(),
|
|
217
|
+
value: z.nullable(
|
|
218
|
+
z.union([
|
|
219
|
+
z.string(),
|
|
220
|
+
z.number(),
|
|
221
|
+
z.boolean(),
|
|
222
|
+
z.record(z.any()),
|
|
223
|
+
z.array(
|
|
224
|
+
z.nullable(
|
|
225
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
226
|
+
),
|
|
227
|
+
),
|
|
228
|
+
]),
|
|
229
|
+
).optional(),
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
export function customField2ToJSON(customField2: CustomField2): string {
|
|
233
|
+
return JSON.stringify(CustomField2$outboundSchema.parse(customField2));
|
|
234
|
+
}
|
|
235
|
+
export function customField2FromJSON(
|
|
236
|
+
jsonString: string,
|
|
237
|
+
): SafeParseResult<CustomField2, SDKValidationError> {
|
|
238
|
+
return safeParse(
|
|
239
|
+
jsonString,
|
|
240
|
+
(x) => CustomField2$inboundSchema.parse(JSON.parse(x)),
|
|
241
|
+
`Failed to parse 'CustomField2' from JSON`,
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/** @internal */
|
|
246
|
+
export const CustomFieldValue5$inboundSchema: z.ZodType<
|
|
247
|
+
CustomFieldValue5,
|
|
248
|
+
z.ZodTypeDef,
|
|
249
|
+
unknown
|
|
250
|
+
> = z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]);
|
|
251
|
+
/** @internal */
|
|
252
|
+
export type CustomFieldValue5$Outbound = string | number | boolean | {
|
|
253
|
+
[k: string]: any;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
/** @internal */
|
|
257
|
+
export const CustomFieldValue5$outboundSchema: z.ZodType<
|
|
258
|
+
CustomFieldValue5$Outbound,
|
|
259
|
+
z.ZodTypeDef,
|
|
260
|
+
CustomFieldValue5
|
|
261
|
+
> = z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]);
|
|
262
|
+
|
|
263
|
+
export function customFieldValue5ToJSON(
|
|
264
|
+
customFieldValue5: CustomFieldValue5,
|
|
265
|
+
): string {
|
|
266
|
+
return JSON.stringify(
|
|
267
|
+
CustomFieldValue5$outboundSchema.parse(customFieldValue5),
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
export function customFieldValue5FromJSON(
|
|
271
|
+
jsonString: string,
|
|
272
|
+
): SafeParseResult<CustomFieldValue5, SDKValidationError> {
|
|
273
|
+
return safeParse(
|
|
274
|
+
jsonString,
|
|
275
|
+
(x) => CustomFieldValue5$inboundSchema.parse(JSON.parse(x)),
|
|
276
|
+
`Failed to parse 'CustomFieldValue5' from JSON`,
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/** @internal */
|
|
281
|
+
export const CustomField1Value$inboundSchema: z.ZodType<
|
|
282
|
+
CustomField1Value,
|
|
283
|
+
z.ZodTypeDef,
|
|
284
|
+
unknown
|
|
285
|
+
> = z.union([
|
|
286
|
+
z.string(),
|
|
287
|
+
z.number(),
|
|
288
|
+
z.boolean(),
|
|
289
|
+
z.record(z.any()),
|
|
290
|
+
z.array(
|
|
291
|
+
z.nullable(
|
|
292
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
76
293
|
),
|
|
77
|
-
|
|
294
|
+
),
|
|
295
|
+
]);
|
|
78
296
|
/** @internal */
|
|
79
|
-
export type
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
| boolean
|
|
83
|
-
| { [k: string]: any }
|
|
84
|
-
| Array<string | number | boolean | { [k: string]: any } | null>;
|
|
297
|
+
export type CustomField1Value$Outbound = string | number | boolean | {
|
|
298
|
+
[k: string]: any;
|
|
299
|
+
} | Array<string | number | boolean | { [k: string]: any } | null>;
|
|
85
300
|
|
|
86
301
|
/** @internal */
|
|
87
|
-
export const
|
|
88
|
-
|
|
302
|
+
export const CustomField1Value$outboundSchema: z.ZodType<
|
|
303
|
+
CustomField1Value$Outbound,
|
|
89
304
|
z.ZodTypeDef,
|
|
90
|
-
|
|
305
|
+
CustomField1Value
|
|
91
306
|
> = z.union([
|
|
92
307
|
z.string(),
|
|
93
308
|
z.number(),
|
|
@@ -100,22 +315,26 @@ export const Value$outboundSchema: z.ZodType<
|
|
|
100
315
|
),
|
|
101
316
|
]);
|
|
102
317
|
|
|
103
|
-
export function
|
|
104
|
-
|
|
318
|
+
export function customField1ValueToJSON(
|
|
319
|
+
customField1Value: CustomField1Value,
|
|
320
|
+
): string {
|
|
321
|
+
return JSON.stringify(
|
|
322
|
+
CustomField1Value$outboundSchema.parse(customField1Value),
|
|
323
|
+
);
|
|
105
324
|
}
|
|
106
|
-
export function
|
|
325
|
+
export function customField1ValueFromJSON(
|
|
107
326
|
jsonString: string,
|
|
108
|
-
): SafeParseResult<
|
|
327
|
+
): SafeParseResult<CustomField1Value, SDKValidationError> {
|
|
109
328
|
return safeParse(
|
|
110
329
|
jsonString,
|
|
111
|
-
(x) =>
|
|
112
|
-
`Failed to parse '
|
|
330
|
+
(x) => CustomField1Value$inboundSchema.parse(JSON.parse(x)),
|
|
331
|
+
`Failed to parse 'CustomField1Value' from JSON`,
|
|
113
332
|
);
|
|
114
333
|
}
|
|
115
334
|
|
|
116
335
|
/** @internal */
|
|
117
|
-
export const
|
|
118
|
-
|
|
336
|
+
export const CustomField1$inboundSchema: z.ZodType<
|
|
337
|
+
CustomField1,
|
|
119
338
|
z.ZodTypeDef,
|
|
120
339
|
unknown
|
|
121
340
|
> = z.object({
|
|
@@ -137,7 +356,7 @@ export const CustomField$inboundSchema: z.ZodType<
|
|
|
137
356
|
).optional(),
|
|
138
357
|
});
|
|
139
358
|
/** @internal */
|
|
140
|
-
export type
|
|
359
|
+
export type CustomField1$Outbound = {
|
|
141
360
|
id: string | null;
|
|
142
361
|
name?: string | null | undefined;
|
|
143
362
|
description?: string | null | undefined;
|
|
@@ -152,10 +371,10 @@ export type CustomField$Outbound = {
|
|
|
152
371
|
};
|
|
153
372
|
|
|
154
373
|
/** @internal */
|
|
155
|
-
export const
|
|
156
|
-
|
|
374
|
+
export const CustomField1$outboundSchema: z.ZodType<
|
|
375
|
+
CustomField1$Outbound,
|
|
157
376
|
z.ZodTypeDef,
|
|
158
|
-
|
|
377
|
+
CustomField1
|
|
159
378
|
> = z.object({
|
|
160
379
|
id: z.nullable(z.string()),
|
|
161
380
|
name: z.nullable(z.string()).optional(),
|
|
@@ -175,6 +394,43 @@ export const CustomField$outboundSchema: z.ZodType<
|
|
|
175
394
|
).optional(),
|
|
176
395
|
});
|
|
177
396
|
|
|
397
|
+
export function customField1ToJSON(customField1: CustomField1): string {
|
|
398
|
+
return JSON.stringify(CustomField1$outboundSchema.parse(customField1));
|
|
399
|
+
}
|
|
400
|
+
export function customField1FromJSON(
|
|
401
|
+
jsonString: string,
|
|
402
|
+
): SafeParseResult<CustomField1, SDKValidationError> {
|
|
403
|
+
return safeParse(
|
|
404
|
+
jsonString,
|
|
405
|
+
(x) => CustomField1$inboundSchema.parse(JSON.parse(x)),
|
|
406
|
+
`Failed to parse 'CustomField1' from JSON`,
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/** @internal */
|
|
411
|
+
export const CustomField$inboundSchema: z.ZodType<
|
|
412
|
+
CustomField,
|
|
413
|
+
z.ZodTypeDef,
|
|
414
|
+
unknown
|
|
415
|
+
> = z.union([
|
|
416
|
+
z.lazy(() => CustomField1$inboundSchema),
|
|
417
|
+
z.lazy(() => CustomField2$inboundSchema),
|
|
418
|
+
]);
|
|
419
|
+
/** @internal */
|
|
420
|
+
export type CustomField$Outbound =
|
|
421
|
+
| CustomField1$Outbound
|
|
422
|
+
| CustomField2$Outbound;
|
|
423
|
+
|
|
424
|
+
/** @internal */
|
|
425
|
+
export const CustomField$outboundSchema: z.ZodType<
|
|
426
|
+
CustomField$Outbound,
|
|
427
|
+
z.ZodTypeDef,
|
|
428
|
+
CustomField
|
|
429
|
+
> = z.union([
|
|
430
|
+
z.lazy(() => CustomField1$outboundSchema),
|
|
431
|
+
z.lazy(() => CustomField2$outboundSchema),
|
|
432
|
+
]);
|
|
433
|
+
|
|
178
434
|
export function customFieldToJSON(customField: CustomField): string {
|
|
179
435
|
return JSON.stringify(CustomField$outboundSchema.parse(customField));
|
|
180
436
|
}
|
|
@@ -50,7 +50,7 @@ export type EcommerceOrderLineItem = {
|
|
|
50
50
|
/**
|
|
51
51
|
* The name of the product or variant associated with the line item.
|
|
52
52
|
*/
|
|
53
|
-
name
|
|
53
|
+
name?: string | null | undefined;
|
|
54
54
|
/**
|
|
55
55
|
* The description of the product or variant associated with the line item.
|
|
56
56
|
*/
|
|
@@ -123,7 +123,7 @@ export const EcommerceOrderLineItem$inboundSchema: z.ZodType<
|
|
|
123
123
|
product_id: z.nullable(z.string()).optional(),
|
|
124
124
|
variant_id: z.nullable(z.string()).optional(),
|
|
125
125
|
sku: z.nullable(z.string()).optional(),
|
|
126
|
-
name: z.nullable(z.string()),
|
|
126
|
+
name: z.nullable(z.string()).optional(),
|
|
127
127
|
description: z.nullable(z.string()).optional(),
|
|
128
128
|
options: z.array(z.lazy(() => Options$inboundSchema)).optional(),
|
|
129
129
|
quantity: z.nullable(z.string()),
|
|
@@ -15,6 +15,10 @@ export type Folder = {
|
|
|
15
15
|
* A unique identifier for an object.
|
|
16
16
|
*/
|
|
17
17
|
id?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The third-party API ID of original entity
|
|
20
|
+
*/
|
|
21
|
+
downstreamId?: string | null | undefined;
|
|
18
22
|
/**
|
|
19
23
|
* The name of the folder
|
|
20
24
|
*/
|
|
@@ -31,6 +35,10 @@ export type Folder = {
|
|
|
31
35
|
* The size of the folder in bytes
|
|
32
36
|
*/
|
|
33
37
|
size?: number | null | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the current user can download the contents of this folder
|
|
40
|
+
*/
|
|
41
|
+
downloadable?: boolean | null | undefined;
|
|
34
42
|
owner?: Owner | undefined;
|
|
35
43
|
/**
|
|
36
44
|
* The parent folders of the file, starting from the root
|
|
@@ -66,10 +74,12 @@ export type Folder = {
|
|
|
66
74
|
export const Folder$inboundSchema: z.ZodType<Folder, z.ZodTypeDef, unknown> = z
|
|
67
75
|
.object({
|
|
68
76
|
id: z.string().optional(),
|
|
77
|
+
downstream_id: z.nullable(z.string()).optional(),
|
|
69
78
|
name: z.string(),
|
|
70
79
|
description: z.nullable(z.string()).optional(),
|
|
71
80
|
path: z.nullable(z.string()).optional(),
|
|
72
81
|
size: z.nullable(z.number().int()).optional(),
|
|
82
|
+
downloadable: z.nullable(z.boolean()).optional(),
|
|
73
83
|
owner: Owner$inboundSchema.optional(),
|
|
74
84
|
parent_folders: z.array(LinkedFolder$inboundSchema),
|
|
75
85
|
parent_folders_complete: z.boolean().optional(),
|
|
@@ -84,6 +94,7 @@ export const Folder$inboundSchema: z.ZodType<Folder, z.ZodTypeDef, unknown> = z
|
|
|
84
94
|
).optional(),
|
|
85
95
|
}).transform((v) => {
|
|
86
96
|
return remap$(v, {
|
|
97
|
+
"downstream_id": "downstreamId",
|
|
87
98
|
"parent_folders": "parentFolders",
|
|
88
99
|
"parent_folders_complete": "parentFoldersComplete",
|
|
89
100
|
"custom_mappings": "customMappings",
|
|
@@ -37,6 +37,7 @@ export * from "./balancesheetfilter.js";
|
|
|
37
37
|
export * from "./bankaccount.js";
|
|
38
38
|
export * from "./bankaccount1.js";
|
|
39
39
|
export * from "./bankaccount2.js";
|
|
40
|
+
export * from "./bankaccountfilter.js";
|
|
40
41
|
export * from "./bankaccountsfilter.js";
|
|
41
42
|
export * from "./bankaccountssort.js";
|
|
42
43
|
export * from "./bankfeedaccount.js";
|
|
@@ -163,6 +163,10 @@ export type InvoiceItem = {
|
|
|
163
163
|
* The ID of the subsidiary
|
|
164
164
|
*/
|
|
165
165
|
subsidiaryId?: string | null | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* ID of the category of the item
|
|
168
|
+
*/
|
|
169
|
+
categoryId?: string | null | undefined;
|
|
166
170
|
/**
|
|
167
171
|
* The ID of the tax schedule
|
|
168
172
|
*/
|
|
@@ -296,6 +300,10 @@ export type InvoiceItemInput = {
|
|
|
296
300
|
* The ID of the subsidiary
|
|
297
301
|
*/
|
|
298
302
|
subsidiaryId?: string | null | undefined;
|
|
303
|
+
/**
|
|
304
|
+
* ID of the category of the item
|
|
305
|
+
*/
|
|
306
|
+
categoryId?: string | null | undefined;
|
|
299
307
|
/**
|
|
300
308
|
* The ID of the tax schedule
|
|
301
309
|
*/
|
|
@@ -412,6 +420,7 @@ export const InvoiceItem$inboundSchema: z.ZodType<
|
|
|
412
420
|
department_id: z.nullable(z.string()).optional(),
|
|
413
421
|
location_id: z.nullable(z.string()).optional(),
|
|
414
422
|
subsidiary_id: z.nullable(z.string()).optional(),
|
|
423
|
+
category_id: z.nullable(z.string()).optional(),
|
|
415
424
|
tax_schedule_id: z.nullable(z.string()).optional(),
|
|
416
425
|
custom_mappings: z.nullable(z.record(z.any())).optional(),
|
|
417
426
|
row_version: z.nullable(z.string()).optional(),
|
|
@@ -439,6 +448,7 @@ export const InvoiceItem$inboundSchema: z.ZodType<
|
|
|
439
448
|
"department_id": "departmentId",
|
|
440
449
|
"location_id": "locationId",
|
|
441
450
|
"subsidiary_id": "subsidiaryId",
|
|
451
|
+
"category_id": "categoryId",
|
|
442
452
|
"tax_schedule_id": "taxScheduleId",
|
|
443
453
|
"custom_mappings": "customMappings",
|
|
444
454
|
"row_version": "rowVersion",
|
|
@@ -562,6 +572,7 @@ export type InvoiceItemInput$Outbound = {
|
|
|
562
572
|
department_id?: string | null | undefined;
|
|
563
573
|
location_id?: string | null | undefined;
|
|
564
574
|
subsidiary_id?: string | null | undefined;
|
|
575
|
+
category_id?: string | null | undefined;
|
|
565
576
|
tax_schedule_id?: string | null | undefined;
|
|
566
577
|
row_version?: string | null | undefined;
|
|
567
578
|
pass_through?: Array<PassThroughBody$Outbound> | undefined;
|
|
@@ -602,6 +613,7 @@ export const InvoiceItemInput$outboundSchema: z.ZodType<
|
|
|
602
613
|
departmentId: z.nullable(z.string()).optional(),
|
|
603
614
|
locationId: z.nullable(z.string()).optional(),
|
|
604
615
|
subsidiaryId: z.nullable(z.string()).optional(),
|
|
616
|
+
categoryId: z.nullable(z.string()).optional(),
|
|
605
617
|
taxScheduleId: z.nullable(z.string()).optional(),
|
|
606
618
|
rowVersion: z.nullable(z.string()).optional(),
|
|
607
619
|
passThrough: z.array(PassThroughBody$outboundSchema).optional(),
|
|
@@ -620,6 +632,7 @@ export const InvoiceItemInput$outboundSchema: z.ZodType<
|
|
|
620
632
|
departmentId: "department_id",
|
|
621
633
|
locationId: "location_id",
|
|
622
634
|
subsidiaryId: "subsidiary_id",
|
|
635
|
+
categoryId: "category_id",
|
|
623
636
|
taxScheduleId: "tax_schedule_id",
|
|
624
637
|
rowVersion: "row_version",
|
|
625
638
|
passThrough: "pass_through",
|
|
@@ -44,6 +44,10 @@ export type Lead = {
|
|
|
44
44
|
* The company the lead is associated with.
|
|
45
45
|
*/
|
|
46
46
|
companyId?: string | null | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* The contact the lead is associated with.
|
|
49
|
+
*/
|
|
50
|
+
contactId?: string | null | undefined;
|
|
47
51
|
/**
|
|
48
52
|
* The identifier of the lead.
|
|
49
53
|
*/
|
|
@@ -123,6 +127,7 @@ export const Lead$inboundSchema: z.ZodType<Lead, z.ZodTypeDef, unknown> = z
|
|
|
123
127
|
owner_id: z.nullable(z.string()).optional(),
|
|
124
128
|
owner_name: z.nullable(z.string()).optional(),
|
|
125
129
|
company_id: z.nullable(z.string()).optional(),
|
|
130
|
+
contact_id: z.nullable(z.string()).optional(),
|
|
126
131
|
lead_id: z.nullable(z.string()).optional(),
|
|
127
132
|
lead_source: z.nullable(z.string()).optional(),
|
|
128
133
|
first_name: z.nullable(z.string()).optional(),
|
|
@@ -152,6 +157,7 @@ export const Lead$inboundSchema: z.ZodType<Lead, z.ZodTypeDef, unknown> = z
|
|
|
152
157
|
"owner_id": "ownerId",
|
|
153
158
|
"owner_name": "ownerName",
|
|
154
159
|
"company_id": "companyId",
|
|
160
|
+
"contact_id": "contactId",
|
|
155
161
|
"lead_id": "leadId",
|
|
156
162
|
"lead_source": "leadSource",
|
|
157
163
|
"first_name": "firstName",
|
|
@@ -58,6 +58,10 @@ export type LeadInput = {
|
|
|
58
58
|
* The company the lead is associated with.
|
|
59
59
|
*/
|
|
60
60
|
companyId?: string | null | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* The contact the lead is associated with.
|
|
63
|
+
*/
|
|
64
|
+
contactId?: string | null | undefined;
|
|
61
65
|
/**
|
|
62
66
|
* The identifier of the lead.
|
|
63
67
|
*/
|
|
@@ -123,6 +127,7 @@ export type LeadInput$Outbound = {
|
|
|
123
127
|
owner_id?: string | null | undefined;
|
|
124
128
|
owner_name?: string | null | undefined;
|
|
125
129
|
company_id?: string | null | undefined;
|
|
130
|
+
contact_id?: string | null | undefined;
|
|
126
131
|
lead_id?: string | null | undefined;
|
|
127
132
|
lead_source?: string | null | undefined;
|
|
128
133
|
first_name?: string | null | undefined;
|
|
@@ -156,6 +161,7 @@ export const LeadInput$outboundSchema: z.ZodType<
|
|
|
156
161
|
ownerId: z.nullable(z.string()).optional(),
|
|
157
162
|
ownerName: z.nullable(z.string()).optional(),
|
|
158
163
|
companyId: z.nullable(z.string()).optional(),
|
|
164
|
+
contactId: z.nullable(z.string()).optional(),
|
|
159
165
|
leadId: z.nullable(z.string()).optional(),
|
|
160
166
|
leadSource: z.nullable(z.string()).optional(),
|
|
161
167
|
firstName: z.nullable(z.string()).optional(),
|
|
@@ -182,6 +188,7 @@ export const LeadInput$outboundSchema: z.ZodType<
|
|
|
182
188
|
ownerId: "owner_id",
|
|
183
189
|
ownerName: "owner_name",
|
|
184
190
|
companyId: "company_id",
|
|
191
|
+
contactId: "contact_id",
|
|
185
192
|
leadId: "lead_id",
|
|
186
193
|
leadSource: "lead_source",
|
|
187
194
|
firstName: "first_name",
|
|
@@ -4,18 +4,38 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
|
|
9
|
+
export const PaymentsFilterType = {
|
|
10
|
+
AccountsReceivable: "accounts_receivable",
|
|
11
|
+
AccountsPayable: "accounts_payable",
|
|
12
|
+
AccountsReceivableCredit: "accounts_receivable_credit",
|
|
13
|
+
AccountsPayableCredit: "accounts_payable_credit",
|
|
14
|
+
AccountsReceivableOverpayment: "accounts_receivable_overpayment",
|
|
15
|
+
AccountsPayableOverpayment: "accounts_payable_overpayment",
|
|
16
|
+
AccountsReceivablePrepayment: "accounts_receivable_prepayment",
|
|
17
|
+
AccountsPayablePrepayment: "accounts_payable_prepayment",
|
|
18
|
+
} as const;
|
|
19
|
+
export type PaymentsFilterType = ClosedEnum<typeof PaymentsFilterType>;
|
|
7
20
|
|
|
8
21
|
export type PaymentsFilter = {
|
|
9
22
|
updatedSince?: Date | undefined;
|
|
10
23
|
invoiceId?: string | undefined;
|
|
11
24
|
supplierId?: string | undefined;
|
|
25
|
+
type?: PaymentsFilterType | undefined;
|
|
12
26
|
};
|
|
13
27
|
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const PaymentsFilterType$outboundSchema: z.ZodNativeEnum<
|
|
30
|
+
typeof PaymentsFilterType
|
|
31
|
+
> = z.nativeEnum(PaymentsFilterType);
|
|
32
|
+
|
|
14
33
|
/** @internal */
|
|
15
34
|
export type PaymentsFilter$Outbound = {
|
|
16
35
|
updated_since?: string | undefined;
|
|
17
36
|
invoice_id?: string | undefined;
|
|
18
37
|
supplier_id?: string | undefined;
|
|
38
|
+
type?: string | undefined;
|
|
19
39
|
};
|
|
20
40
|
|
|
21
41
|
/** @internal */
|
|
@@ -27,6 +47,7 @@ export const PaymentsFilter$outboundSchema: z.ZodType<
|
|
|
27
47
|
updatedSince: z.date().transform(v => v.toISOString()).optional(),
|
|
28
48
|
invoiceId: z.string().optional(),
|
|
29
49
|
supplierId: z.string().optional(),
|
|
50
|
+
type: PaymentsFilterType$outboundSchema.optional(),
|
|
30
51
|
}).transform((v) => {
|
|
31
52
|
return remap$(v, {
|
|
32
53
|
updatedSince: "updated_since",
|
|
@@ -34,6 +34,18 @@ export type Stages = {
|
|
|
34
34
|
* The order in which the Pipeline Stage is displayed in the UI.
|
|
35
35
|
*/
|
|
36
36
|
displayOrder?: number | null | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the Pipeline Stage is archived or not.
|
|
39
|
+
*/
|
|
40
|
+
archived?: boolean | null | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The date and time when the Pipeline Stage was created.
|
|
43
|
+
*/
|
|
44
|
+
createdAt?: Date | null | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The date and time when the Pipeline Stage was last updated.
|
|
47
|
+
*/
|
|
48
|
+
updatedAt?: Date | null | undefined;
|
|
37
49
|
};
|
|
38
50
|
|
|
39
51
|
export type Pipeline = {
|
|
@@ -91,10 +103,19 @@ export const Stages$inboundSchema: z.ZodType<Stages, z.ZodTypeDef, unknown> = z
|
|
|
91
103
|
value: z.nullable(z.string()).optional(),
|
|
92
104
|
win_probability: z.nullable(z.number().int()).optional(),
|
|
93
105
|
display_order: z.nullable(z.number().int()).optional(),
|
|
106
|
+
archived: z.nullable(z.boolean()).optional(),
|
|
107
|
+
created_at: z.nullable(
|
|
108
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
109
|
+
).optional(),
|
|
110
|
+
updated_at: z.nullable(
|
|
111
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
112
|
+
).optional(),
|
|
94
113
|
}).transform((v) => {
|
|
95
114
|
return remap$(v, {
|
|
96
115
|
"win_probability": "winProbability",
|
|
97
116
|
"display_order": "displayOrder",
|
|
117
|
+
"created_at": "createdAt",
|
|
118
|
+
"updated_at": "updatedAt",
|
|
98
119
|
});
|
|
99
120
|
});
|
|
100
121
|
|
|
@@ -28,6 +28,10 @@ export type PipelineStages = {
|
|
|
28
28
|
* The order in which the Pipeline Stage is displayed in the UI.
|
|
29
29
|
*/
|
|
30
30
|
displayOrder?: number | null | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the Pipeline Stage is archived or not.
|
|
33
|
+
*/
|
|
34
|
+
archived?: boolean | null | undefined;
|
|
31
35
|
};
|
|
32
36
|
|
|
33
37
|
export type PipelineInput = {
|
|
@@ -75,6 +79,7 @@ export type PipelineStages$Outbound = {
|
|
|
75
79
|
value?: string | null | undefined;
|
|
76
80
|
win_probability?: number | null | undefined;
|
|
77
81
|
display_order?: number | null | undefined;
|
|
82
|
+
archived?: boolean | null | undefined;
|
|
78
83
|
};
|
|
79
84
|
|
|
80
85
|
/** @internal */
|
|
@@ -87,6 +92,7 @@ export const PipelineStages$outboundSchema: z.ZodType<
|
|
|
87
92
|
value: z.nullable(z.string()).optional(),
|
|
88
93
|
winProbability: z.nullable(z.number().int()).optional(),
|
|
89
94
|
displayOrder: z.nullable(z.number().int()).optional(),
|
|
95
|
+
archived: z.nullable(z.boolean()).optional(),
|
|
90
96
|
}).transform((v) => {
|
|
91
97
|
return remap$(v, {
|
|
92
98
|
winProbability: "win_probability",
|
|
@@ -9,9 +9,9 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
-
export type
|
|
12
|
+
export type Five = string | number | number;
|
|
13
13
|
|
|
14
|
-
export type
|
|
14
|
+
export type Value =
|
|
15
15
|
| string
|
|
16
16
|
| number
|
|
17
17
|
| number
|
|
@@ -36,45 +36,39 @@ export type SimpleFormFieldOption = {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
/** @internal */
|
|
39
|
-
export const
|
|
39
|
+
export const Five$inboundSchema: z.ZodType<Five, z.ZodTypeDef, unknown> = z
|
|
40
40
|
.union([z.string(), z.number().int(), z.number()]);
|
|
41
41
|
/** @internal */
|
|
42
|
-
export type
|
|
42
|
+
export type Five$Outbound = string | number | number;
|
|
43
43
|
|
|
44
44
|
/** @internal */
|
|
45
|
-
export const
|
|
46
|
-
|
|
47
|
-
z.ZodTypeDef,
|
|
48
|
-
Value5
|
|
49
|
-
> = z.union([z.string(), z.number().int(), z.number()]);
|
|
45
|
+
export const Five$outboundSchema: z.ZodType<Five$Outbound, z.ZodTypeDef, Five> =
|
|
46
|
+
z.union([z.string(), z.number().int(), z.number()]);
|
|
50
47
|
|
|
51
|
-
export function
|
|
52
|
-
return JSON.stringify(
|
|
48
|
+
export function fiveToJSON(five: Five): string {
|
|
49
|
+
return JSON.stringify(Five$outboundSchema.parse(five));
|
|
53
50
|
}
|
|
54
|
-
export function
|
|
51
|
+
export function fiveFromJSON(
|
|
55
52
|
jsonString: string,
|
|
56
|
-
): SafeParseResult<
|
|
53
|
+
): SafeParseResult<Five, SDKValidationError> {
|
|
57
54
|
return safeParse(
|
|
58
55
|
jsonString,
|
|
59
|
-
(x) =>
|
|
60
|
-
`Failed to parse '
|
|
56
|
+
(x) => Five$inboundSchema.parse(JSON.parse(x)),
|
|
57
|
+
`Failed to parse 'Five' from JSON`,
|
|
61
58
|
);
|
|
62
59
|
}
|
|
63
60
|
|
|
64
61
|
/** @internal */
|
|
65
|
-
export const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
z.boolean(),
|
|
74
|
-
z.array(z.union([z.string(), z.number().int(), z.number()])),
|
|
75
|
-
]);
|
|
62
|
+
export const Value$inboundSchema: z.ZodType<Value, z.ZodTypeDef, unknown> = z
|
|
63
|
+
.union([
|
|
64
|
+
z.string(),
|
|
65
|
+
z.number().int(),
|
|
66
|
+
z.number(),
|
|
67
|
+
z.boolean(),
|
|
68
|
+
z.array(z.union([z.string(), z.number().int(), z.number()])),
|
|
69
|
+
]);
|
|
76
70
|
/** @internal */
|
|
77
|
-
export type
|
|
71
|
+
export type Value$Outbound =
|
|
78
72
|
| string
|
|
79
73
|
| number
|
|
80
74
|
| number
|
|
@@ -82,10 +76,10 @@ export type SimpleFormFieldOptionValue$Outbound =
|
|
|
82
76
|
| Array<string | number | number>;
|
|
83
77
|
|
|
84
78
|
/** @internal */
|
|
85
|
-
export const
|
|
86
|
-
|
|
79
|
+
export const Value$outboundSchema: z.ZodType<
|
|
80
|
+
Value$Outbound,
|
|
87
81
|
z.ZodTypeDef,
|
|
88
|
-
|
|
82
|
+
Value
|
|
89
83
|
> = z.union([
|
|
90
84
|
z.string(),
|
|
91
85
|
z.number().int(),
|
|
@@ -94,20 +88,16 @@ export const SimpleFormFieldOptionValue$outboundSchema: z.ZodType<
|
|
|
94
88
|
z.array(z.union([z.string(), z.number().int(), z.number()])),
|
|
95
89
|
]);
|
|
96
90
|
|
|
97
|
-
export function
|
|
98
|
-
|
|
99
|
-
): string {
|
|
100
|
-
return JSON.stringify(
|
|
101
|
-
SimpleFormFieldOptionValue$outboundSchema.parse(simpleFormFieldOptionValue),
|
|
102
|
-
);
|
|
91
|
+
export function valueToJSON(value: Value): string {
|
|
92
|
+
return JSON.stringify(Value$outboundSchema.parse(value));
|
|
103
93
|
}
|
|
104
|
-
export function
|
|
94
|
+
export function valueFromJSON(
|
|
105
95
|
jsonString: string,
|
|
106
|
-
): SafeParseResult<
|
|
96
|
+
): SafeParseResult<Value, SDKValidationError> {
|
|
107
97
|
return safeParse(
|
|
108
98
|
jsonString,
|
|
109
|
-
(x) =>
|
|
110
|
-
`Failed to parse '
|
|
99
|
+
(x) => Value$inboundSchema.parse(JSON.parse(x)),
|
|
100
|
+
`Failed to parse 'Value' from JSON`,
|
|
111
101
|
);
|
|
112
102
|
}
|
|
113
103
|
|
|
@@ -25,6 +25,10 @@ export type AccountingBankAccountsOneRequest = {
|
|
|
25
25
|
* ID of the record you are acting upon.
|
|
26
26
|
*/
|
|
27
27
|
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Apply filters
|
|
30
|
+
*/
|
|
31
|
+
filter?: components.BankAccountFilter | undefined;
|
|
28
32
|
/**
|
|
29
33
|
* ID of the consumer which you want to get or push data from
|
|
30
34
|
*/
|
|
@@ -62,6 +66,7 @@ export type AccountingBankAccountsOneResponse = {
|
|
|
62
66
|
/** @internal */
|
|
63
67
|
export type AccountingBankAccountsOneRequest$Outbound = {
|
|
64
68
|
id: string;
|
|
69
|
+
filter?: components.BankAccountFilter$Outbound | undefined;
|
|
65
70
|
consumerId?: string | undefined;
|
|
66
71
|
appId?: string | undefined;
|
|
67
72
|
serviceId?: string | undefined;
|
|
@@ -76,6 +81,7 @@ export const AccountingBankAccountsOneRequest$outboundSchema: z.ZodType<
|
|
|
76
81
|
AccountingBankAccountsOneRequest
|
|
77
82
|
> = z.object({
|
|
78
83
|
id: z.string(),
|
|
84
|
+
filter: components.BankAccountFilter$outboundSchema.optional(),
|
|
79
85
|
consumerId: z.string().optional(),
|
|
80
86
|
appId: z.string().optional(),
|
|
81
87
|
serviceId: z.string().optional(),
|