@apideck/unify 0.28.0 → 0.28.1
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/docs/sdks/categories/README.md +12 -0
- package/examples/package-lock.json +2 -2
- package/funcs/accountingCategoriesGet.d.ts.map +1 -1
- package/funcs/accountingCategoriesGet.js +4 -2
- package/funcs/accountingCategoriesGet.js.map +1 -1
- package/funcs/accountingCategoriesList.d.ts.map +1 -1
- package/funcs/accountingCategoriesList.js +4 -2
- package/funcs/accountingCategoriesList.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/models/components/balancesheetfilter.d.ts +5 -0
- package/models/components/balancesheetfilter.d.ts.map +1 -1
- package/models/components/balancesheetfilter.js +4 -0
- package/models/components/balancesheetfilter.js.map +1 -1
- package/models/components/categoriesfilter.d.ts +67 -0
- package/models/components/categoriesfilter.d.ts.map +1 -0
- package/models/components/categoriesfilter.js +82 -0
- package/models/components/categoriesfilter.js.map +1 -0
- package/models/components/category.d.ts +39 -0
- package/models/components/category.d.ts.map +1 -1
- package/models/components/category.js +26 -1
- package/models/components/category.js.map +1 -1
- package/models/components/connection.d.ts +13 -13
- package/models/components/connection.d.ts.map +1 -1
- package/models/components/connection.js +16 -17
- package/models/components/connection.js.map +1 -1
- package/models/components/customfield.d.ts +37 -38
- package/models/components/customfield.d.ts.map +1 -1
- package/models/components/customfield.js +25 -54
- package/models/components/customfield.js.map +1 -1
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invoicelineitem.d.ts +10 -0
- package/models/components/invoicelineitem.d.ts.map +1 -1
- package/models/components/invoicelineitem.js +8 -0
- package/models/components/invoicelineitem.js.map +1 -1
- package/models/components/profitandlossfilter.d.ts +5 -0
- package/models/components/profitandlossfilter.d.ts.map +1 -1
- package/models/components/profitandlossfilter.js +4 -0
- package/models/components/profitandlossfilter.js.map +1 -1
- package/models/components/simpleformfieldoption.d.ts +13 -13
- package/models/components/simpleformfieldoption.d.ts.map +1 -1
- package/models/components/simpleformfieldoption.js +16 -16
- package/models/components/simpleformfieldoption.js.map +1 -1
- package/models/operations/accountingcategoriesall.d.ts +5 -0
- package/models/operations/accountingcategoriesall.d.ts.map +1 -1
- package/models/operations/accountingcategoriesall.js +2 -0
- package/models/operations/accountingcategoriesall.js.map +1 -1
- package/models/operations/accountingcategoriesone.d.ts +5 -0
- package/models/operations/accountingcategoriesone.d.ts.map +1 -1
- package/models/operations/accountingcategoriesone.js +2 -0
- package/models/operations/accountingcategoriesone.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/activities.test.ts +8 -8
- package/src/__tests__/applicants.test.ts +4 -4
- package/src/__tests__/bankfeedaccounts.test.ts +4 -4
- package/src/__tests__/billpayments.test.ts +15 -15
- package/src/__tests__/bills.test.ts +8 -8
- package/src/__tests__/companies.test.ts +7 -7
- package/src/__tests__/contacts.test.ts +7 -7
- package/src/__tests__/creditnotes.test.ts +38 -38
- package/src/__tests__/customers.test.ts +7 -7
- package/src/__tests__/employees.test.ts +5 -5
- package/src/__tests__/expenses.test.ts +6 -6
- package/src/__tests__/invoices.test.ts +33 -33
- package/src/__tests__/journalentries.test.ts +8 -8
- package/src/__tests__/leads.test.ts +7 -7
- package/src/__tests__/ledgeraccounts.test.ts +15 -15
- package/src/__tests__/opportunities.test.ts +4 -4
- package/src/__tests__/payments.test.ts +15 -15
- package/src/__tests__/purchaseorders.test.ts +29 -29
- package/src/__tests__/suppliers.test.ts +7 -7
- package/src/__tests__/taxrates.test.ts +8 -8
- package/src/funcs/accountingCategoriesGet.ts +15 -5
- package/src/funcs/accountingCategoriesList.ts +17 -7
- package/src/lib/config.ts +4 -4
- package/src/models/components/balancesheetfilter.ts +9 -0
- package/src/models/components/categoriesfilter.ts +104 -0
- package/src/models/components/category.ts +39 -0
- package/src/models/components/connection.ts +27 -20
- package/src/models/components/customfield.ts +51 -83
- package/src/models/components/index.ts +1 -0
- package/src/models/components/invoicelineitem.ts +18 -0
- package/src/models/components/profitandlossfilter.ts +9 -0
- package/src/models/components/simpleformfieldoption.ts +21 -18
- package/src/models/operations/accountingcategoriesall.ts +7 -0
- package/src/models/operations/accountingcategoriesone.ts +7 -0
|
@@ -78,7 +78,7 @@ export const Target = {
|
|
|
78
78
|
} as const;
|
|
79
79
|
export type Target = ClosedEnum<typeof Target>;
|
|
80
80
|
|
|
81
|
-
export type
|
|
81
|
+
export type ConnectionValue5 = string | number | number;
|
|
82
82
|
|
|
83
83
|
export type ConnectionValue =
|
|
84
84
|
| string
|
|
@@ -280,43 +280,50 @@ export namespace Target$ {
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
/** @internal */
|
|
283
|
-
export const
|
|
284
|
-
|
|
283
|
+
export const ConnectionValue5$inboundSchema: z.ZodType<
|
|
284
|
+
ConnectionValue5,
|
|
285
|
+
z.ZodTypeDef,
|
|
286
|
+
unknown
|
|
287
|
+
> = z.union([z.string(), z.number().int(), z.number()]);
|
|
285
288
|
|
|
286
289
|
/** @internal */
|
|
287
|
-
export type
|
|
290
|
+
export type ConnectionValue5$Outbound = string | number | number;
|
|
288
291
|
|
|
289
292
|
/** @internal */
|
|
290
|
-
export const
|
|
291
|
-
|
|
293
|
+
export const ConnectionValue5$outboundSchema: z.ZodType<
|
|
294
|
+
ConnectionValue5$Outbound,
|
|
292
295
|
z.ZodTypeDef,
|
|
293
|
-
|
|
296
|
+
ConnectionValue5
|
|
294
297
|
> = z.union([z.string(), z.number().int(), z.number()]);
|
|
295
298
|
|
|
296
299
|
/**
|
|
297
300
|
* @internal
|
|
298
301
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
299
302
|
*/
|
|
300
|
-
export namespace
|
|
301
|
-
/** @deprecated use `
|
|
302
|
-
export const inboundSchema =
|
|
303
|
-
/** @deprecated use `
|
|
304
|
-
export const outboundSchema =
|
|
305
|
-
/** @deprecated use `
|
|
306
|
-
export type Outbound =
|
|
303
|
+
export namespace ConnectionValue5$ {
|
|
304
|
+
/** @deprecated use `ConnectionValue5$inboundSchema` instead. */
|
|
305
|
+
export const inboundSchema = ConnectionValue5$inboundSchema;
|
|
306
|
+
/** @deprecated use `ConnectionValue5$outboundSchema` instead. */
|
|
307
|
+
export const outboundSchema = ConnectionValue5$outboundSchema;
|
|
308
|
+
/** @deprecated use `ConnectionValue5$Outbound` instead. */
|
|
309
|
+
export type Outbound = ConnectionValue5$Outbound;
|
|
307
310
|
}
|
|
308
311
|
|
|
309
|
-
export function
|
|
310
|
-
|
|
312
|
+
export function connectionValue5ToJSON(
|
|
313
|
+
connectionValue5: ConnectionValue5,
|
|
314
|
+
): string {
|
|
315
|
+
return JSON.stringify(
|
|
316
|
+
ConnectionValue5$outboundSchema.parse(connectionValue5),
|
|
317
|
+
);
|
|
311
318
|
}
|
|
312
319
|
|
|
313
|
-
export function
|
|
320
|
+
export function connectionValue5FromJSON(
|
|
314
321
|
jsonString: string,
|
|
315
|
-
): SafeParseResult<
|
|
322
|
+
): SafeParseResult<ConnectionValue5, SDKValidationError> {
|
|
316
323
|
return safeParse(
|
|
317
324
|
jsonString,
|
|
318
|
-
(x) =>
|
|
319
|
-
`Failed to parse '
|
|
325
|
+
(x) => ConnectionValue5$inboundSchema.parse(JSON.parse(x)),
|
|
326
|
+
`Failed to parse 'ConnectionValue5' from JSON`,
|
|
320
327
|
);
|
|
321
328
|
}
|
|
322
329
|
|
|
@@ -7,17 +7,14 @@ 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
|
|
11
|
-
|
|
12
|
-
export type Four = {};
|
|
10
|
+
export type Five = string | number | boolean | { [k: string]: any };
|
|
13
11
|
|
|
14
12
|
export type Value =
|
|
15
|
-
| Four
|
|
16
13
|
| string
|
|
17
14
|
| number
|
|
18
15
|
| boolean
|
|
19
|
-
|
|
|
20
|
-
| Array<
|
|
16
|
+
| { [k: string]: any }
|
|
17
|
+
| Array<string | number | boolean | { [k: string]: any } | null>;
|
|
21
18
|
|
|
22
19
|
export type CustomField = {
|
|
23
20
|
/**
|
|
@@ -33,111 +30,74 @@ export type CustomField = {
|
|
|
33
30
|
*/
|
|
34
31
|
description?: string | null | undefined;
|
|
35
32
|
value?:
|
|
36
|
-
| Four
|
|
37
33
|
| string
|
|
38
34
|
| number
|
|
39
35
|
| boolean
|
|
40
|
-
|
|
|
41
|
-
| Array<
|
|
36
|
+
| { [k: string]: any }
|
|
37
|
+
| Array<string | number | boolean | { [k: string]: any } | null>
|
|
42
38
|
| null
|
|
43
39
|
| undefined;
|
|
44
40
|
};
|
|
45
41
|
|
|
46
42
|
/** @internal */
|
|
47
|
-
export const
|
|
48
|
-
.
|
|
49
|
-
|
|
50
|
-
/** @internal */
|
|
51
|
-
export type Six$Outbound = {};
|
|
52
|
-
|
|
53
|
-
/** @internal */
|
|
54
|
-
export const Six$outboundSchema: z.ZodType<Six$Outbound, z.ZodTypeDef, Six> = z
|
|
55
|
-
.object({});
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @internal
|
|
59
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
60
|
-
*/
|
|
61
|
-
export namespace Six$ {
|
|
62
|
-
/** @deprecated use `Six$inboundSchema` instead. */
|
|
63
|
-
export const inboundSchema = Six$inboundSchema;
|
|
64
|
-
/** @deprecated use `Six$outboundSchema` instead. */
|
|
65
|
-
export const outboundSchema = Six$outboundSchema;
|
|
66
|
-
/** @deprecated use `Six$Outbound` instead. */
|
|
67
|
-
export type Outbound = Six$Outbound;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export function sixToJSON(six: Six): string {
|
|
71
|
-
return JSON.stringify(Six$outboundSchema.parse(six));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export function sixFromJSON(
|
|
75
|
-
jsonString: string,
|
|
76
|
-
): SafeParseResult<Six, SDKValidationError> {
|
|
77
|
-
return safeParse(
|
|
78
|
-
jsonString,
|
|
79
|
-
(x) => Six$inboundSchema.parse(JSON.parse(x)),
|
|
80
|
-
`Failed to parse 'Six' from JSON`,
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/** @internal */
|
|
85
|
-
export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
|
|
86
|
-
.object({});
|
|
43
|
+
export const Five$inboundSchema: z.ZodType<Five, z.ZodTypeDef, unknown> = z
|
|
44
|
+
.union([z.string(), z.number(), z.boolean(), z.record(z.any())]);
|
|
87
45
|
|
|
88
46
|
/** @internal */
|
|
89
|
-
export type
|
|
47
|
+
export type Five$Outbound = string | number | boolean | { [k: string]: any };
|
|
90
48
|
|
|
91
49
|
/** @internal */
|
|
92
|
-
export const
|
|
93
|
-
z.
|
|
50
|
+
export const Five$outboundSchema: z.ZodType<Five$Outbound, z.ZodTypeDef, Five> =
|
|
51
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]);
|
|
94
52
|
|
|
95
53
|
/**
|
|
96
54
|
* @internal
|
|
97
55
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
98
56
|
*/
|
|
99
|
-
export namespace
|
|
100
|
-
/** @deprecated use `
|
|
101
|
-
export const inboundSchema =
|
|
102
|
-
/** @deprecated use `
|
|
103
|
-
export const outboundSchema =
|
|
104
|
-
/** @deprecated use `
|
|
105
|
-
export type Outbound =
|
|
57
|
+
export namespace Five$ {
|
|
58
|
+
/** @deprecated use `Five$inboundSchema` instead. */
|
|
59
|
+
export const inboundSchema = Five$inboundSchema;
|
|
60
|
+
/** @deprecated use `Five$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema = Five$outboundSchema;
|
|
62
|
+
/** @deprecated use `Five$Outbound` instead. */
|
|
63
|
+
export type Outbound = Five$Outbound;
|
|
106
64
|
}
|
|
107
65
|
|
|
108
|
-
export function
|
|
109
|
-
return JSON.stringify(
|
|
66
|
+
export function fiveToJSON(five: Five): string {
|
|
67
|
+
return JSON.stringify(Five$outboundSchema.parse(five));
|
|
110
68
|
}
|
|
111
69
|
|
|
112
|
-
export function
|
|
70
|
+
export function fiveFromJSON(
|
|
113
71
|
jsonString: string,
|
|
114
|
-
): SafeParseResult<
|
|
72
|
+
): SafeParseResult<Five, SDKValidationError> {
|
|
115
73
|
return safeParse(
|
|
116
74
|
jsonString,
|
|
117
|
-
(x) =>
|
|
118
|
-
`Failed to parse '
|
|
75
|
+
(x) => Five$inboundSchema.parse(JSON.parse(x)),
|
|
76
|
+
`Failed to parse 'Five' from JSON`,
|
|
119
77
|
);
|
|
120
78
|
}
|
|
121
79
|
|
|
122
80
|
/** @internal */
|
|
123
81
|
export const Value$inboundSchema: z.ZodType<Value, z.ZodTypeDef, unknown> = z
|
|
124
82
|
.union([
|
|
125
|
-
z.lazy(() => Four$inboundSchema),
|
|
126
83
|
z.string(),
|
|
127
84
|
z.number(),
|
|
128
85
|
z.boolean(),
|
|
129
|
-
z.
|
|
130
|
-
z.array(
|
|
86
|
+
z.record(z.any()),
|
|
87
|
+
z.array(
|
|
88
|
+
z.nullable(
|
|
89
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
90
|
+
),
|
|
91
|
+
),
|
|
131
92
|
]);
|
|
132
93
|
|
|
133
94
|
/** @internal */
|
|
134
95
|
export type Value$Outbound =
|
|
135
|
-
| Four$Outbound
|
|
136
96
|
| string
|
|
137
97
|
| number
|
|
138
98
|
| boolean
|
|
139
|
-
|
|
|
140
|
-
| Array<
|
|
99
|
+
| { [k: string]: any }
|
|
100
|
+
| Array<string | number | boolean | { [k: string]: any } | null>;
|
|
141
101
|
|
|
142
102
|
/** @internal */
|
|
143
103
|
export const Value$outboundSchema: z.ZodType<
|
|
@@ -145,12 +105,15 @@ export const Value$outboundSchema: z.ZodType<
|
|
|
145
105
|
z.ZodTypeDef,
|
|
146
106
|
Value
|
|
147
107
|
> = z.union([
|
|
148
|
-
z.lazy(() => Four$outboundSchema),
|
|
149
108
|
z.string(),
|
|
150
109
|
z.number(),
|
|
151
110
|
z.boolean(),
|
|
152
|
-
z.
|
|
153
|
-
z.array(
|
|
111
|
+
z.record(z.any()),
|
|
112
|
+
z.array(
|
|
113
|
+
z.nullable(
|
|
114
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
115
|
+
),
|
|
116
|
+
),
|
|
154
117
|
]);
|
|
155
118
|
|
|
156
119
|
/**
|
|
@@ -191,12 +154,15 @@ export const CustomField$inboundSchema: z.ZodType<
|
|
|
191
154
|
description: z.nullable(z.string()).optional(),
|
|
192
155
|
value: z.nullable(
|
|
193
156
|
z.union([
|
|
194
|
-
z.lazy(() => Four$inboundSchema),
|
|
195
157
|
z.string(),
|
|
196
158
|
z.number(),
|
|
197
159
|
z.boolean(),
|
|
198
|
-
z.
|
|
199
|
-
z.array(
|
|
160
|
+
z.record(z.any()),
|
|
161
|
+
z.array(
|
|
162
|
+
z.nullable(
|
|
163
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
164
|
+
),
|
|
165
|
+
),
|
|
200
166
|
]),
|
|
201
167
|
).optional(),
|
|
202
168
|
});
|
|
@@ -207,12 +173,11 @@ export type CustomField$Outbound = {
|
|
|
207
173
|
name?: string | null | undefined;
|
|
208
174
|
description?: string | null | undefined;
|
|
209
175
|
value?:
|
|
210
|
-
| Four$Outbound
|
|
211
176
|
| string
|
|
212
177
|
| number
|
|
213
178
|
| boolean
|
|
214
|
-
|
|
|
215
|
-
| Array<
|
|
179
|
+
| { [k: string]: any }
|
|
180
|
+
| Array<string | number | boolean | { [k: string]: any } | null>
|
|
216
181
|
| null
|
|
217
182
|
| undefined;
|
|
218
183
|
};
|
|
@@ -228,12 +193,15 @@ export const CustomField$outboundSchema: z.ZodType<
|
|
|
228
193
|
description: z.nullable(z.string()).optional(),
|
|
229
194
|
value: z.nullable(
|
|
230
195
|
z.union([
|
|
231
|
-
z.lazy(() => Four$outboundSchema),
|
|
232
196
|
z.string(),
|
|
233
197
|
z.number(),
|
|
234
198
|
z.boolean(),
|
|
235
|
-
z.
|
|
236
|
-
z.array(
|
|
199
|
+
z.record(z.any()),
|
|
200
|
+
z.array(
|
|
201
|
+
z.nullable(
|
|
202
|
+
z.union([z.string(), z.number(), z.boolean(), z.record(z.any())]),
|
|
203
|
+
),
|
|
204
|
+
),
|
|
237
205
|
]),
|
|
238
206
|
).optional(),
|
|
239
207
|
});
|
|
@@ -43,6 +43,7 @@ export * from "./billlineitem.js";
|
|
|
43
43
|
export * from "./billpayment.js";
|
|
44
44
|
export * from "./billsfilter.js";
|
|
45
45
|
export * from "./billssort.js";
|
|
46
|
+
export * from "./categoriesfilter.js";
|
|
46
47
|
export * from "./category.js";
|
|
47
48
|
export * from "./collection.js";
|
|
48
49
|
export * from "./collectionssort.js";
|
|
@@ -114,6 +114,10 @@ export type InvoiceLineItem = {
|
|
|
114
114
|
* Discount amount applied to the line item when supported downstream.
|
|
115
115
|
*/
|
|
116
116
|
discountAmount?: number | null | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* ID of the category of the line item
|
|
119
|
+
*/
|
|
120
|
+
categoryId?: string | null | undefined;
|
|
117
121
|
/**
|
|
118
122
|
* The ID of the location
|
|
119
123
|
*/
|
|
@@ -199,6 +203,10 @@ export type InvoiceLineItemInput = {
|
|
|
199
203
|
* Discount amount applied to the line item when supported downstream.
|
|
200
204
|
*/
|
|
201
205
|
discountAmount?: number | null | undefined;
|
|
206
|
+
/**
|
|
207
|
+
* ID of the category of the line item
|
|
208
|
+
*/
|
|
209
|
+
categoryId?: string | null | undefined;
|
|
202
210
|
/**
|
|
203
211
|
* The ID of the location
|
|
204
212
|
*/
|
|
@@ -261,6 +269,7 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
|
|
|
261
269
|
unit_of_measure: z.nullable(z.string()).optional(),
|
|
262
270
|
discount_percentage: z.nullable(z.number()).optional(),
|
|
263
271
|
discount_amount: z.nullable(z.number()).optional(),
|
|
272
|
+
category_id: z.nullable(z.string()).optional(),
|
|
264
273
|
location_id: z.nullable(z.string()).optional(),
|
|
265
274
|
department_id: z.nullable(z.string()).optional(),
|
|
266
275
|
item: LinkedInvoiceItem$inboundSchema.optional(),
|
|
@@ -289,6 +298,7 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
|
|
|
289
298
|
"unit_of_measure": "unitOfMeasure",
|
|
290
299
|
"discount_percentage": "discountPercentage",
|
|
291
300
|
"discount_amount": "discountAmount",
|
|
301
|
+
"category_id": "categoryId",
|
|
292
302
|
"location_id": "locationId",
|
|
293
303
|
"department_id": "departmentId",
|
|
294
304
|
"tax_rate": "taxRate",
|
|
@@ -318,6 +328,7 @@ export type InvoiceLineItem$Outbound = {
|
|
|
318
328
|
unit_of_measure?: string | null | undefined;
|
|
319
329
|
discount_percentage?: number | null | undefined;
|
|
320
330
|
discount_amount?: number | null | undefined;
|
|
331
|
+
category_id?: string | null | undefined;
|
|
321
332
|
location_id?: string | null | undefined;
|
|
322
333
|
department_id?: string | null | undefined;
|
|
323
334
|
item?: LinkedInvoiceItem$Outbound | undefined;
|
|
@@ -354,6 +365,7 @@ export const InvoiceLineItem$outboundSchema: z.ZodType<
|
|
|
354
365
|
unitOfMeasure: z.nullable(z.string()).optional(),
|
|
355
366
|
discountPercentage: z.nullable(z.number()).optional(),
|
|
356
367
|
discountAmount: z.nullable(z.number()).optional(),
|
|
368
|
+
categoryId: z.nullable(z.string()).optional(),
|
|
357
369
|
locationId: z.nullable(z.string()).optional(),
|
|
358
370
|
departmentId: z.nullable(z.string()).optional(),
|
|
359
371
|
item: LinkedInvoiceItem$outboundSchema.optional(),
|
|
@@ -378,6 +390,7 @@ export const InvoiceLineItem$outboundSchema: z.ZodType<
|
|
|
378
390
|
unitOfMeasure: "unit_of_measure",
|
|
379
391
|
discountPercentage: "discount_percentage",
|
|
380
392
|
discountAmount: "discount_amount",
|
|
393
|
+
categoryId: "category_id",
|
|
381
394
|
locationId: "location_id",
|
|
382
395
|
departmentId: "department_id",
|
|
383
396
|
taxRate: "tax_rate",
|
|
@@ -440,6 +453,7 @@ export const InvoiceLineItemInput$inboundSchema: z.ZodType<
|
|
|
440
453
|
unit_of_measure: z.nullable(z.string()).optional(),
|
|
441
454
|
discount_percentage: z.nullable(z.number()).optional(),
|
|
442
455
|
discount_amount: z.nullable(z.number()).optional(),
|
|
456
|
+
category_id: z.nullable(z.string()).optional(),
|
|
443
457
|
location_id: z.nullable(z.string()).optional(),
|
|
444
458
|
department_id: z.nullable(z.string()).optional(),
|
|
445
459
|
item: LinkedInvoiceItem$inboundSchema.optional(),
|
|
@@ -460,6 +474,7 @@ export const InvoiceLineItemInput$inboundSchema: z.ZodType<
|
|
|
460
474
|
"unit_of_measure": "unitOfMeasure",
|
|
461
475
|
"discount_percentage": "discountPercentage",
|
|
462
476
|
"discount_amount": "discountAmount",
|
|
477
|
+
"category_id": "categoryId",
|
|
463
478
|
"location_id": "locationId",
|
|
464
479
|
"department_id": "departmentId",
|
|
465
480
|
"tax_rate": "taxRate",
|
|
@@ -485,6 +500,7 @@ export type InvoiceLineItemInput$Outbound = {
|
|
|
485
500
|
unit_of_measure?: string | null | undefined;
|
|
486
501
|
discount_percentage?: number | null | undefined;
|
|
487
502
|
discount_amount?: number | null | undefined;
|
|
503
|
+
category_id?: string | null | undefined;
|
|
488
504
|
location_id?: string | null | undefined;
|
|
489
505
|
department_id?: string | null | undefined;
|
|
490
506
|
item?: LinkedInvoiceItem$Outbound | undefined;
|
|
@@ -517,6 +533,7 @@ export const InvoiceLineItemInput$outboundSchema: z.ZodType<
|
|
|
517
533
|
unitOfMeasure: z.nullable(z.string()).optional(),
|
|
518
534
|
discountPercentage: z.nullable(z.number()).optional(),
|
|
519
535
|
discountAmount: z.nullable(z.number()).optional(),
|
|
536
|
+
categoryId: z.nullable(z.string()).optional(),
|
|
520
537
|
locationId: z.nullable(z.string()).optional(),
|
|
521
538
|
departmentId: z.nullable(z.string()).optional(),
|
|
522
539
|
item: LinkedInvoiceItem$outboundSchema.optional(),
|
|
@@ -537,6 +554,7 @@ export const InvoiceLineItemInput$outboundSchema: z.ZodType<
|
|
|
537
554
|
unitOfMeasure: "unit_of_measure",
|
|
538
555
|
discountPercentage: "discount_percentage",
|
|
539
556
|
discountAmount: "discount_amount",
|
|
557
|
+
categoryId: "category_id",
|
|
540
558
|
locationId: "location_id",
|
|
541
559
|
departmentId: "department_id",
|
|
542
560
|
taxRate: "tax_rate",
|
|
@@ -21,6 +21,10 @@ export type ProfitAndLossFilter = {
|
|
|
21
21
|
* Filter by end date. If end date is given, start date is required.
|
|
22
22
|
*/
|
|
23
23
|
endDate?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Filter by location id
|
|
26
|
+
*/
|
|
27
|
+
locationId?: string | undefined;
|
|
24
28
|
};
|
|
25
29
|
|
|
26
30
|
/** @internal */
|
|
@@ -32,11 +36,13 @@ export const ProfitAndLossFilter$inboundSchema: z.ZodType<
|
|
|
32
36
|
customer_id: z.string().optional(),
|
|
33
37
|
start_date: z.string().optional(),
|
|
34
38
|
end_date: z.string().optional(),
|
|
39
|
+
location_id: z.string().optional(),
|
|
35
40
|
}).transform((v) => {
|
|
36
41
|
return remap$(v, {
|
|
37
42
|
"customer_id": "customerId",
|
|
38
43
|
"start_date": "startDate",
|
|
39
44
|
"end_date": "endDate",
|
|
45
|
+
"location_id": "locationId",
|
|
40
46
|
});
|
|
41
47
|
});
|
|
42
48
|
|
|
@@ -45,6 +51,7 @@ export type ProfitAndLossFilter$Outbound = {
|
|
|
45
51
|
customer_id?: string | undefined;
|
|
46
52
|
start_date?: string | undefined;
|
|
47
53
|
end_date?: string | undefined;
|
|
54
|
+
location_id?: string | undefined;
|
|
48
55
|
};
|
|
49
56
|
|
|
50
57
|
/** @internal */
|
|
@@ -56,11 +63,13 @@ export const ProfitAndLossFilter$outboundSchema: z.ZodType<
|
|
|
56
63
|
customerId: z.string().optional(),
|
|
57
64
|
startDate: z.string().optional(),
|
|
58
65
|
endDate: z.string().optional(),
|
|
66
|
+
locationId: z.string().optional(),
|
|
59
67
|
}).transform((v) => {
|
|
60
68
|
return remap$(v, {
|
|
61
69
|
customerId: "customer_id",
|
|
62
70
|
startDate: "start_date",
|
|
63
71
|
endDate: "end_date",
|
|
72
|
+
locationId: "location_id",
|
|
64
73
|
});
|
|
65
74
|
});
|
|
66
75
|
|
|
@@ -9,7 +9,7 @@ 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 Value5 = string | number | number;
|
|
13
13
|
|
|
14
14
|
export type SimpleFormFieldOptionValue =
|
|
15
15
|
| string
|
|
@@ -36,40 +36,43 @@ export type SimpleFormFieldOption = {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
/** @internal */
|
|
39
|
-
export const
|
|
39
|
+
export const Value5$inboundSchema: z.ZodType<Value5, z.ZodTypeDef, unknown> = z
|
|
40
40
|
.union([z.string(), z.number().int(), z.number()]);
|
|
41
41
|
|
|
42
42
|
/** @internal */
|
|
43
|
-
export type
|
|
43
|
+
export type Value5$Outbound = string | number | number;
|
|
44
44
|
|
|
45
45
|
/** @internal */
|
|
46
|
-
export const
|
|
47
|
-
|
|
46
|
+
export const Value5$outboundSchema: z.ZodType<
|
|
47
|
+
Value5$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
Value5
|
|
50
|
+
> = z.union([z.string(), z.number().int(), z.number()]);
|
|
48
51
|
|
|
49
52
|
/**
|
|
50
53
|
* @internal
|
|
51
54
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
55
|
*/
|
|
53
|
-
export namespace
|
|
54
|
-
/** @deprecated use `
|
|
55
|
-
export const inboundSchema =
|
|
56
|
-
/** @deprecated use `
|
|
57
|
-
export const outboundSchema =
|
|
58
|
-
/** @deprecated use `
|
|
59
|
-
export type Outbound =
|
|
56
|
+
export namespace Value5$ {
|
|
57
|
+
/** @deprecated use `Value5$inboundSchema` instead. */
|
|
58
|
+
export const inboundSchema = Value5$inboundSchema;
|
|
59
|
+
/** @deprecated use `Value5$outboundSchema` instead. */
|
|
60
|
+
export const outboundSchema = Value5$outboundSchema;
|
|
61
|
+
/** @deprecated use `Value5$Outbound` instead. */
|
|
62
|
+
export type Outbound = Value5$Outbound;
|
|
60
63
|
}
|
|
61
64
|
|
|
62
|
-
export function
|
|
63
|
-
return JSON.stringify(
|
|
65
|
+
export function value5ToJSON(value5: Value5): string {
|
|
66
|
+
return JSON.stringify(Value5$outboundSchema.parse(value5));
|
|
64
67
|
}
|
|
65
68
|
|
|
66
|
-
export function
|
|
69
|
+
export function value5FromJSON(
|
|
67
70
|
jsonString: string,
|
|
68
|
-
): SafeParseResult<
|
|
71
|
+
): SafeParseResult<Value5, SDKValidationError> {
|
|
69
72
|
return safeParse(
|
|
70
73
|
jsonString,
|
|
71
|
-
(x) =>
|
|
72
|
-
`Failed to parse '
|
|
74
|
+
(x) => Value5$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'Value5' from JSON`,
|
|
73
76
|
);
|
|
74
77
|
}
|
|
75
78
|
|
|
@@ -49,6 +49,10 @@ export type AccountingCategoriesAllRequest = {
|
|
|
49
49
|
* 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.
|
|
50
50
|
*/
|
|
51
51
|
fields?: string | null | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Apply filters
|
|
54
|
+
*/
|
|
55
|
+
filter?: components.CategoriesFilter | undefined;
|
|
52
56
|
};
|
|
53
57
|
|
|
54
58
|
export type AccountingCategoriesAllResponse = {
|
|
@@ -135,6 +139,7 @@ export const AccountingCategoriesAllRequest$inboundSchema: z.ZodType<
|
|
|
135
139
|
cursor: z.nullable(z.string()).optional(),
|
|
136
140
|
limit: z.number().int().default(20),
|
|
137
141
|
fields: z.nullable(z.string()).optional(),
|
|
142
|
+
filter: components.CategoriesFilter$inboundSchema.optional(),
|
|
138
143
|
});
|
|
139
144
|
|
|
140
145
|
/** @internal */
|
|
@@ -146,6 +151,7 @@ export type AccountingCategoriesAllRequest$Outbound = {
|
|
|
146
151
|
cursor?: string | null | undefined;
|
|
147
152
|
limit: number;
|
|
148
153
|
fields?: string | null | undefined;
|
|
154
|
+
filter?: components.CategoriesFilter$Outbound | undefined;
|
|
149
155
|
};
|
|
150
156
|
|
|
151
157
|
/** @internal */
|
|
@@ -161,6 +167,7 @@ export const AccountingCategoriesAllRequest$outboundSchema: z.ZodType<
|
|
|
161
167
|
cursor: z.nullable(z.string()).optional(),
|
|
162
168
|
limit: z.number().int().default(20),
|
|
163
169
|
fields: z.nullable(z.string()).optional(),
|
|
170
|
+
filter: components.CategoriesFilter$outboundSchema.optional(),
|
|
164
171
|
});
|
|
165
172
|
|
|
166
173
|
/**
|
|
@@ -45,6 +45,10 @@ export type AccountingCategoriesOneRequest = {
|
|
|
45
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
46
|
*/
|
|
47
47
|
fields?: string | null | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Apply filters
|
|
50
|
+
*/
|
|
51
|
+
filter?: components.CategoriesFilter | undefined;
|
|
48
52
|
};
|
|
49
53
|
|
|
50
54
|
export type AccountingCategoriesOneResponse = {
|
|
@@ -130,6 +134,7 @@ export const AccountingCategoriesOneRequest$inboundSchema: z.ZodType<
|
|
|
130
134
|
serviceId: z.string().optional(),
|
|
131
135
|
raw: z.boolean().default(false),
|
|
132
136
|
fields: z.nullable(z.string()).optional(),
|
|
137
|
+
filter: components.CategoriesFilter$inboundSchema.optional(),
|
|
133
138
|
});
|
|
134
139
|
|
|
135
140
|
/** @internal */
|
|
@@ -140,6 +145,7 @@ export type AccountingCategoriesOneRequest$Outbound = {
|
|
|
140
145
|
serviceId?: string | undefined;
|
|
141
146
|
raw: boolean;
|
|
142
147
|
fields?: string | null | undefined;
|
|
148
|
+
filter?: components.CategoriesFilter$Outbound | undefined;
|
|
143
149
|
};
|
|
144
150
|
|
|
145
151
|
/** @internal */
|
|
@@ -154,6 +160,7 @@ export const AccountingCategoriesOneRequest$outboundSchema: z.ZodType<
|
|
|
154
160
|
serviceId: z.string().optional(),
|
|
155
161
|
raw: z.boolean().default(false),
|
|
156
162
|
fields: z.nullable(z.string()).optional(),
|
|
163
|
+
filter: components.CategoriesFilter$outboundSchema.optional(),
|
|
157
164
|
});
|
|
158
165
|
|
|
159
166
|
/**
|