@apideck/unify 0.28.0 → 0.28.2
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/expense.d.ts +10 -0
- package/models/components/expense.d.ts.map +1 -1
- package/models/components/expense.js +8 -0
- package/models/components/expense.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/expense.ts +18 -0
- 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
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The type of the category.
|
|
13
|
+
*/
|
|
14
|
+
export const CategoriesFilterType = {
|
|
15
|
+
Supplier: "supplier",
|
|
16
|
+
Expense: "expense",
|
|
17
|
+
Revenue: "revenue",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* The type of the category.
|
|
21
|
+
*/
|
|
22
|
+
export type CategoriesFilterType = ClosedEnum<typeof CategoriesFilterType>;
|
|
23
|
+
|
|
24
|
+
export type CategoriesFilter = {
|
|
25
|
+
/**
|
|
26
|
+
* The type of the category.
|
|
27
|
+
*/
|
|
28
|
+
type?: CategoriesFilterType | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const CategoriesFilterType$inboundSchema: z.ZodNativeEnum<
|
|
33
|
+
typeof CategoriesFilterType
|
|
34
|
+
> = z.nativeEnum(CategoriesFilterType);
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const CategoriesFilterType$outboundSchema: z.ZodNativeEnum<
|
|
38
|
+
typeof CategoriesFilterType
|
|
39
|
+
> = CategoriesFilterType$inboundSchema;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
44
|
+
*/
|
|
45
|
+
export namespace CategoriesFilterType$ {
|
|
46
|
+
/** @deprecated use `CategoriesFilterType$inboundSchema` instead. */
|
|
47
|
+
export const inboundSchema = CategoriesFilterType$inboundSchema;
|
|
48
|
+
/** @deprecated use `CategoriesFilterType$outboundSchema` instead. */
|
|
49
|
+
export const outboundSchema = CategoriesFilterType$outboundSchema;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const CategoriesFilter$inboundSchema: z.ZodType<
|
|
54
|
+
CategoriesFilter,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
unknown
|
|
57
|
+
> = z.object({
|
|
58
|
+
type: CategoriesFilterType$inboundSchema.optional(),
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export type CategoriesFilter$Outbound = {
|
|
63
|
+
type?: string | undefined;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const CategoriesFilter$outboundSchema: z.ZodType<
|
|
68
|
+
CategoriesFilter$Outbound,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
CategoriesFilter
|
|
71
|
+
> = z.object({
|
|
72
|
+
type: CategoriesFilterType$outboundSchema.optional(),
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
78
|
+
*/
|
|
79
|
+
export namespace CategoriesFilter$ {
|
|
80
|
+
/** @deprecated use `CategoriesFilter$inboundSchema` instead. */
|
|
81
|
+
export const inboundSchema = CategoriesFilter$inboundSchema;
|
|
82
|
+
/** @deprecated use `CategoriesFilter$outboundSchema` instead. */
|
|
83
|
+
export const outboundSchema = CategoriesFilter$outboundSchema;
|
|
84
|
+
/** @deprecated use `CategoriesFilter$Outbound` instead. */
|
|
85
|
+
export type Outbound = CategoriesFilter$Outbound;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function categoriesFilterToJSON(
|
|
89
|
+
categoriesFilter: CategoriesFilter,
|
|
90
|
+
): string {
|
|
91
|
+
return JSON.stringify(
|
|
92
|
+
CategoriesFilter$outboundSchema.parse(categoriesFilter),
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function categoriesFilterFromJSON(
|
|
97
|
+
jsonString: string,
|
|
98
|
+
): SafeParseResult<CategoriesFilter, SDKValidationError> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) => CategoriesFilter$inboundSchema.parse(JSON.parse(x)),
|
|
102
|
+
`Failed to parse 'CategoriesFilter' from JSON`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
@@ -15,6 +15,19 @@ import {
|
|
|
15
15
|
PassThroughBody$outboundSchema,
|
|
16
16
|
} from "./passthroughbody.js";
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* The type of the category.
|
|
20
|
+
*/
|
|
21
|
+
export const CategoryType = {
|
|
22
|
+
Supplier: "supplier",
|
|
23
|
+
Expense: "expense",
|
|
24
|
+
Revenue: "revenue",
|
|
25
|
+
} as const;
|
|
26
|
+
/**
|
|
27
|
+
* The type of the category.
|
|
28
|
+
*/
|
|
29
|
+
export type CategoryType = ClosedEnum<typeof CategoryType>;
|
|
30
|
+
|
|
18
31
|
/**
|
|
19
32
|
* Based on the status some functionality is enabled or disabled.
|
|
20
33
|
*/
|
|
@@ -36,6 +49,10 @@ export type Category = {
|
|
|
36
49
|
* The name of the category.
|
|
37
50
|
*/
|
|
38
51
|
name?: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* The type of the category.
|
|
54
|
+
*/
|
|
55
|
+
type?: CategoryType | undefined;
|
|
39
56
|
/**
|
|
40
57
|
* Based on the status some functionality is enabled or disabled.
|
|
41
58
|
*/
|
|
@@ -70,6 +87,25 @@ export type Category = {
|
|
|
70
87
|
passThrough?: Array<PassThroughBody> | undefined;
|
|
71
88
|
};
|
|
72
89
|
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const CategoryType$inboundSchema: z.ZodNativeEnum<typeof CategoryType> =
|
|
92
|
+
z.nativeEnum(CategoryType);
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const CategoryType$outboundSchema: z.ZodNativeEnum<typeof CategoryType> =
|
|
96
|
+
CategoryType$inboundSchema;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
101
|
+
*/
|
|
102
|
+
export namespace CategoryType$ {
|
|
103
|
+
/** @deprecated use `CategoryType$inboundSchema` instead. */
|
|
104
|
+
export const inboundSchema = CategoryType$inboundSchema;
|
|
105
|
+
/** @deprecated use `CategoryType$outboundSchema` instead. */
|
|
106
|
+
export const outboundSchema = CategoryType$outboundSchema;
|
|
107
|
+
}
|
|
108
|
+
|
|
73
109
|
/** @internal */
|
|
74
110
|
export const CategoryStatus$inboundSchema: z.ZodNativeEnum<
|
|
75
111
|
typeof CategoryStatus
|
|
@@ -99,6 +135,7 @@ export const Category$inboundSchema: z.ZodType<
|
|
|
99
135
|
> = z.object({
|
|
100
136
|
id: z.string().optional(),
|
|
101
137
|
name: z.string().optional(),
|
|
138
|
+
type: CategoryType$inboundSchema.optional(),
|
|
102
139
|
status: CategoryStatus$inboundSchema.optional(),
|
|
103
140
|
custom_mappings: z.nullable(z.record(z.any())).optional(),
|
|
104
141
|
row_version: z.nullable(z.string()).optional(),
|
|
@@ -127,6 +164,7 @@ export const Category$inboundSchema: z.ZodType<
|
|
|
127
164
|
export type Category$Outbound = {
|
|
128
165
|
id?: string | undefined;
|
|
129
166
|
name?: string | undefined;
|
|
167
|
+
type?: string | undefined;
|
|
130
168
|
status?: string | undefined;
|
|
131
169
|
custom_mappings?: { [k: string]: any } | null | undefined;
|
|
132
170
|
row_version?: string | null | undefined;
|
|
@@ -145,6 +183,7 @@ export const Category$outboundSchema: z.ZodType<
|
|
|
145
183
|
> = z.object({
|
|
146
184
|
id: z.string().optional(),
|
|
147
185
|
name: z.string().optional(),
|
|
186
|
+
type: CategoryType$outboundSchema.optional(),
|
|
148
187
|
status: CategoryStatus$outboundSchema.optional(),
|
|
149
188
|
customMappings: z.nullable(z.record(z.any())).optional(),
|
|
150
189
|
rowVersion: z.nullable(z.string()).optional(),
|
|
@@ -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
|
});
|
|
@@ -141,6 +141,10 @@ export type Expense = {
|
|
|
141
141
|
* Optional reference identifier for the transaction.
|
|
142
142
|
*/
|
|
143
143
|
reference?: string | null | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero.
|
|
146
|
+
*/
|
|
147
|
+
sourceDocumentUrl?: string | null | undefined;
|
|
144
148
|
customFields?: Array<CustomField> | undefined;
|
|
145
149
|
/**
|
|
146
150
|
* When custom mappings are configured on the resource, the result is included here.
|
|
@@ -234,6 +238,10 @@ export type ExpenseInput = {
|
|
|
234
238
|
* Optional reference identifier for the transaction.
|
|
235
239
|
*/
|
|
236
240
|
reference?: string | null | undefined;
|
|
241
|
+
/**
|
|
242
|
+
* URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero.
|
|
243
|
+
*/
|
|
244
|
+
sourceDocumentUrl?: string | null | undefined;
|
|
237
245
|
customFields?: Array<CustomField> | undefined;
|
|
238
246
|
/**
|
|
239
247
|
* A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.
|
|
@@ -307,6 +315,7 @@ export const Expense$inboundSchema: z.ZodType<Expense, z.ZodTypeDef, unknown> =
|
|
|
307
315
|
total_amount: z.nullable(z.number()).optional(),
|
|
308
316
|
line_items: z.array(ExpenseLineItem$inboundSchema),
|
|
309
317
|
reference: z.nullable(z.string()).optional(),
|
|
318
|
+
source_document_url: z.nullable(z.string()).optional(),
|
|
310
319
|
custom_fields: z.array(CustomField$inboundSchema).optional(),
|
|
311
320
|
custom_mappings: z.nullable(z.record(z.any())).optional(),
|
|
312
321
|
updated_at: z.nullable(
|
|
@@ -332,6 +341,7 @@ export const Expense$inboundSchema: z.ZodType<Expense, z.ZodTypeDef, unknown> =
|
|
|
332
341
|
"tax_rate": "taxRate",
|
|
333
342
|
"total_amount": "totalAmount",
|
|
334
343
|
"line_items": "lineItems",
|
|
344
|
+
"source_document_url": "sourceDocumentUrl",
|
|
335
345
|
"custom_fields": "customFields",
|
|
336
346
|
"custom_mappings": "customMappings",
|
|
337
347
|
"updated_at": "updatedAt",
|
|
@@ -362,6 +372,7 @@ export type Expense$Outbound = {
|
|
|
362
372
|
total_amount?: number | null | undefined;
|
|
363
373
|
line_items: Array<ExpenseLineItem$Outbound>;
|
|
364
374
|
reference?: string | null | undefined;
|
|
375
|
+
source_document_url?: string | null | undefined;
|
|
365
376
|
custom_fields?: Array<CustomField$Outbound> | undefined;
|
|
366
377
|
custom_mappings?: { [k: string]: any } | null | undefined;
|
|
367
378
|
updated_at?: string | null | undefined;
|
|
@@ -395,6 +406,7 @@ export const Expense$outboundSchema: z.ZodType<
|
|
|
395
406
|
totalAmount: z.nullable(z.number()).optional(),
|
|
396
407
|
lineItems: z.array(ExpenseLineItem$outboundSchema),
|
|
397
408
|
reference: z.nullable(z.string()).optional(),
|
|
409
|
+
sourceDocumentUrl: z.nullable(z.string()).optional(),
|
|
398
410
|
customFields: z.array(CustomField$outboundSchema).optional(),
|
|
399
411
|
customMappings: z.nullable(z.record(z.any())).optional(),
|
|
400
412
|
updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
@@ -416,6 +428,7 @@ export const Expense$outboundSchema: z.ZodType<
|
|
|
416
428
|
taxRate: "tax_rate",
|
|
417
429
|
totalAmount: "total_amount",
|
|
418
430
|
lineItems: "line_items",
|
|
431
|
+
sourceDocumentUrl: "source_document_url",
|
|
419
432
|
customFields: "custom_fields",
|
|
420
433
|
customMappings: "custom_mappings",
|
|
421
434
|
updatedAt: "updated_at",
|
|
@@ -478,6 +491,7 @@ export const ExpenseInput$inboundSchema: z.ZodType<
|
|
|
478
491
|
total_amount: z.nullable(z.number()).optional(),
|
|
479
492
|
line_items: z.array(ExpenseLineItemInput$inboundSchema),
|
|
480
493
|
reference: z.nullable(z.string()).optional(),
|
|
494
|
+
source_document_url: z.nullable(z.string()).optional(),
|
|
481
495
|
custom_fields: z.array(CustomField$inboundSchema).optional(),
|
|
482
496
|
row_version: z.nullable(z.string()).optional(),
|
|
483
497
|
pass_through: z.array(PassThroughBody$inboundSchema).optional(),
|
|
@@ -494,6 +508,7 @@ export const ExpenseInput$inboundSchema: z.ZodType<
|
|
|
494
508
|
"tax_rate": "taxRate",
|
|
495
509
|
"total_amount": "totalAmount",
|
|
496
510
|
"line_items": "lineItems",
|
|
511
|
+
"source_document_url": "sourceDocumentUrl",
|
|
497
512
|
"custom_fields": "customFields",
|
|
498
513
|
"row_version": "rowVersion",
|
|
499
514
|
"pass_through": "passThrough",
|
|
@@ -518,6 +533,7 @@ export type ExpenseInput$Outbound = {
|
|
|
518
533
|
total_amount?: number | null | undefined;
|
|
519
534
|
line_items: Array<ExpenseLineItemInput$Outbound>;
|
|
520
535
|
reference?: string | null | undefined;
|
|
536
|
+
source_document_url?: string | null | undefined;
|
|
521
537
|
custom_fields?: Array<CustomField$Outbound> | undefined;
|
|
522
538
|
row_version?: string | null | undefined;
|
|
523
539
|
pass_through?: Array<PassThroughBody$Outbound> | undefined;
|
|
@@ -545,6 +561,7 @@ export const ExpenseInput$outboundSchema: z.ZodType<
|
|
|
545
561
|
totalAmount: z.nullable(z.number()).optional(),
|
|
546
562
|
lineItems: z.array(ExpenseLineItemInput$outboundSchema),
|
|
547
563
|
reference: z.nullable(z.string()).optional(),
|
|
564
|
+
sourceDocumentUrl: z.nullable(z.string()).optional(),
|
|
548
565
|
customFields: z.array(CustomField$outboundSchema).optional(),
|
|
549
566
|
rowVersion: z.nullable(z.string()).optional(),
|
|
550
567
|
passThrough: z.array(PassThroughBody$outboundSchema).optional(),
|
|
@@ -561,6 +578,7 @@ export const ExpenseInput$outboundSchema: z.ZodType<
|
|
|
561
578
|
taxRate: "tax_rate",
|
|
562
579
|
totalAmount: "total_amount",
|
|
563
580
|
lineItems: "line_items",
|
|
581
|
+
sourceDocumentUrl: "source_document_url",
|
|
564
582
|
customFields: "custom_fields",
|
|
565
583
|
rowVersion: "row_version",
|
|
566
584
|
passThrough: "pass_through",
|
|
@@ -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";
|