@apideck/unify 0.25.1 → 0.26.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/README.md +7 -0
- package/docs/sdks/categories/README.md +181 -0
- package/funcs/accountingCategoriesGet.d.ts +18 -0
- package/funcs/accountingCategoriesGet.d.ts.map +1 -0
- package/funcs/accountingCategoriesGet.js +133 -0
- package/funcs/accountingCategoriesGet.js.map +1 -0
- package/funcs/accountingCategoriesList.d.ts +21 -0
- package/funcs/accountingCategoriesList.d.ts.map +1 -0
- package/funcs/accountingCategoriesList.js +151 -0
- package/funcs/accountingCategoriesList.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/models/components/bill.d.ts +2 -2
- package/models/components/category.d.ts +114 -0
- package/models/components/category.d.ts.map +1 -0
- package/models/components/category.js +121 -0
- package/models/components/category.js.map +1 -0
- package/models/components/expense.d.ts +10 -0
- package/models/components/expense.d.ts.map +1 -1
- package/models/components/expense.js +4 -0
- package/models/components/expense.js.map +1 -1
- package/models/components/formfieldoption.d.ts +6 -6
- package/models/components/formfieldoption.d.ts.map +1 -1
- package/models/components/formfieldoption.js +4 -4
- package/models/components/formfieldoption.js.map +1 -1
- package/models/components/getcategoriesresponse.d.ts +79 -0
- package/models/components/getcategoriesresponse.d.ts.map +1 -0
- package/models/components/getcategoriesresponse.js +89 -0
- package/models/components/getcategoriesresponse.js.map +1 -0
- package/models/components/getcategoryresponse.d.ts +67 -0
- package/models/components/getcategoryresponse.d.ts.map +1 -0
- package/models/components/getcategoryresponse.js +83 -0
- package/models/components/getcategoryresponse.js.map +1 -0
- package/models/components/index.d.ts +3 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +3 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invoice.d.ts +2 -2
- package/models/components/supplier.d.ts +10 -0
- package/models/components/supplier.d.ts.map +1 -1
- package/models/components/supplier.js +8 -0
- package/models/components/supplier.js.map +1 -1
- package/models/operations/accountingcategoriesall.d.ts +131 -0
- package/models/operations/accountingcategoriesall.d.ts.map +1 -0
- package/models/operations/accountingcategoriesall.js +149 -0
- package/models/operations/accountingcategoriesall.js.map +1 -0
- package/models/operations/accountingcategoriesone.d.ts +126 -0
- package/models/operations/accountingcategoriesone.d.ts.map +1 -0
- package/models/operations/accountingcategoriesone.js +145 -0
- package/models/operations/accountingcategoriesone.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/accounting.d.ts +3 -0
- package/sdk/accounting.d.ts.map +1 -1
- package/sdk/accounting.js +4 -0
- package/sdk/accounting.js.map +1 -1
- package/sdk/categories.d.ts +22 -0
- package/sdk/categories.d.ts.map +1 -0
- package/sdk/categories.js +33 -0
- package/sdk/categories.js.map +1 -0
- package/src/__tests__/categories.test.ts +127 -0
- package/src/funcs/accountingCategoriesGet.ts +230 -0
- package/src/funcs/accountingCategoriesList.ts +288 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/bill.ts +2 -2
- package/src/models/components/category.ts +193 -0
- package/src/models/components/expense.ts +14 -0
- package/src/models/components/formfieldoption.ts +12 -12
- package/src/models/components/getcategoriesresponse.ts +154 -0
- package/src/models/components/getcategoryresponse.ts +128 -0
- package/src/models/components/index.ts +3 -0
- package/src/models/components/invoice.ts +2 -2
- package/src/models/components/supplier.ts +18 -0
- package/src/models/operations/accountingcategoriesall.ts +277 -0
- package/src/models/operations/accountingcategoriesone.ts +268 -0
- package/src/models/operations/index.ts +2 -0
- package/src/sdk/accounting.ts +6 -0
- package/src/sdk/categories.ts +48 -0
- package/src/types/constdatetime.ts +1 -1
- package/types/constdatetime.js +1 -1
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
Category,
|
|
12
|
+
Category$inboundSchema,
|
|
13
|
+
Category$Outbound,
|
|
14
|
+
Category$outboundSchema,
|
|
15
|
+
} from "./category.js";
|
|
16
|
+
import {
|
|
17
|
+
Links,
|
|
18
|
+
Links$inboundSchema,
|
|
19
|
+
Links$Outbound,
|
|
20
|
+
Links$outboundSchema,
|
|
21
|
+
} from "./links.js";
|
|
22
|
+
import {
|
|
23
|
+
Meta,
|
|
24
|
+
Meta$inboundSchema,
|
|
25
|
+
Meta$Outbound,
|
|
26
|
+
Meta$outboundSchema,
|
|
27
|
+
} from "./meta.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Categories
|
|
31
|
+
*/
|
|
32
|
+
export type GetCategoriesResponse = {
|
|
33
|
+
/**
|
|
34
|
+
* HTTP Response Status Code
|
|
35
|
+
*/
|
|
36
|
+
statusCode: number;
|
|
37
|
+
/**
|
|
38
|
+
* HTTP Response Status
|
|
39
|
+
*/
|
|
40
|
+
status: string;
|
|
41
|
+
/**
|
|
42
|
+
* Apideck ID of service provider
|
|
43
|
+
*/
|
|
44
|
+
service: string;
|
|
45
|
+
/**
|
|
46
|
+
* Unified API resource name
|
|
47
|
+
*/
|
|
48
|
+
resource: string;
|
|
49
|
+
/**
|
|
50
|
+
* Operation performed
|
|
51
|
+
*/
|
|
52
|
+
operation: string;
|
|
53
|
+
data: Array<Category>;
|
|
54
|
+
/**
|
|
55
|
+
* Response metadata
|
|
56
|
+
*/
|
|
57
|
+
meta?: Meta | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Links to navigate to previous or next pages through the API
|
|
60
|
+
*/
|
|
61
|
+
links?: Links | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Raw response from the integration when raw=true query param is provided
|
|
64
|
+
*/
|
|
65
|
+
raw?: { [k: string]: any } | null | undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const GetCategoriesResponse$inboundSchema: z.ZodType<
|
|
70
|
+
GetCategoriesResponse,
|
|
71
|
+
z.ZodTypeDef,
|
|
72
|
+
unknown
|
|
73
|
+
> = z.object({
|
|
74
|
+
status_code: z.number().int(),
|
|
75
|
+
status: z.string(),
|
|
76
|
+
service: z.string(),
|
|
77
|
+
resource: z.string(),
|
|
78
|
+
operation: z.string(),
|
|
79
|
+
data: z.array(Category$inboundSchema),
|
|
80
|
+
meta: Meta$inboundSchema.optional(),
|
|
81
|
+
links: Links$inboundSchema.optional(),
|
|
82
|
+
_raw: z.nullable(z.record(z.any())).optional(),
|
|
83
|
+
}).transform((v) => {
|
|
84
|
+
return remap$(v, {
|
|
85
|
+
"status_code": "statusCode",
|
|
86
|
+
"_raw": "raw",
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export type GetCategoriesResponse$Outbound = {
|
|
92
|
+
status_code: number;
|
|
93
|
+
status: string;
|
|
94
|
+
service: string;
|
|
95
|
+
resource: string;
|
|
96
|
+
operation: string;
|
|
97
|
+
data: Array<Category$Outbound>;
|
|
98
|
+
meta?: Meta$Outbound | undefined;
|
|
99
|
+
links?: Links$Outbound | undefined;
|
|
100
|
+
_raw?: { [k: string]: any } | null | undefined;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const GetCategoriesResponse$outboundSchema: z.ZodType<
|
|
105
|
+
GetCategoriesResponse$Outbound,
|
|
106
|
+
z.ZodTypeDef,
|
|
107
|
+
GetCategoriesResponse
|
|
108
|
+
> = z.object({
|
|
109
|
+
statusCode: z.number().int(),
|
|
110
|
+
status: z.string(),
|
|
111
|
+
service: z.string(),
|
|
112
|
+
resource: z.string(),
|
|
113
|
+
operation: z.string(),
|
|
114
|
+
data: z.array(Category$outboundSchema),
|
|
115
|
+
meta: Meta$outboundSchema.optional(),
|
|
116
|
+
links: Links$outboundSchema.optional(),
|
|
117
|
+
raw: z.nullable(z.record(z.any())).optional(),
|
|
118
|
+
}).transform((v) => {
|
|
119
|
+
return remap$(v, {
|
|
120
|
+
statusCode: "status_code",
|
|
121
|
+
raw: "_raw",
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @internal
|
|
127
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
128
|
+
*/
|
|
129
|
+
export namespace GetCategoriesResponse$ {
|
|
130
|
+
/** @deprecated use `GetCategoriesResponse$inboundSchema` instead. */
|
|
131
|
+
export const inboundSchema = GetCategoriesResponse$inboundSchema;
|
|
132
|
+
/** @deprecated use `GetCategoriesResponse$outboundSchema` instead. */
|
|
133
|
+
export const outboundSchema = GetCategoriesResponse$outboundSchema;
|
|
134
|
+
/** @deprecated use `GetCategoriesResponse$Outbound` instead. */
|
|
135
|
+
export type Outbound = GetCategoriesResponse$Outbound;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function getCategoriesResponseToJSON(
|
|
139
|
+
getCategoriesResponse: GetCategoriesResponse,
|
|
140
|
+
): string {
|
|
141
|
+
return JSON.stringify(
|
|
142
|
+
GetCategoriesResponse$outboundSchema.parse(getCategoriesResponse),
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function getCategoriesResponseFromJSON(
|
|
147
|
+
jsonString: string,
|
|
148
|
+
): SafeParseResult<GetCategoriesResponse, SDKValidationError> {
|
|
149
|
+
return safeParse(
|
|
150
|
+
jsonString,
|
|
151
|
+
(x) => GetCategoriesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
152
|
+
`Failed to parse 'GetCategoriesResponse' from JSON`,
|
|
153
|
+
);
|
|
154
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
Category,
|
|
12
|
+
Category$inboundSchema,
|
|
13
|
+
Category$Outbound,
|
|
14
|
+
Category$outboundSchema,
|
|
15
|
+
} from "./category.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Category
|
|
19
|
+
*/
|
|
20
|
+
export type GetCategoryResponse = {
|
|
21
|
+
/**
|
|
22
|
+
* HTTP Response Status Code
|
|
23
|
+
*/
|
|
24
|
+
statusCode: number;
|
|
25
|
+
/**
|
|
26
|
+
* HTTP Response Status
|
|
27
|
+
*/
|
|
28
|
+
status: string;
|
|
29
|
+
/**
|
|
30
|
+
* Apideck ID of service provider
|
|
31
|
+
*/
|
|
32
|
+
service: string;
|
|
33
|
+
/**
|
|
34
|
+
* Unified API resource name
|
|
35
|
+
*/
|
|
36
|
+
resource: string;
|
|
37
|
+
/**
|
|
38
|
+
* Operation performed
|
|
39
|
+
*/
|
|
40
|
+
operation: string;
|
|
41
|
+
data: Category;
|
|
42
|
+
/**
|
|
43
|
+
* Raw response from the integration when raw=true query param is provided
|
|
44
|
+
*/
|
|
45
|
+
raw?: { [k: string]: any } | null | undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const GetCategoryResponse$inboundSchema: z.ZodType<
|
|
50
|
+
GetCategoryResponse,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
unknown
|
|
53
|
+
> = z.object({
|
|
54
|
+
status_code: z.number().int(),
|
|
55
|
+
status: z.string(),
|
|
56
|
+
service: z.string(),
|
|
57
|
+
resource: z.string(),
|
|
58
|
+
operation: z.string(),
|
|
59
|
+
data: Category$inboundSchema,
|
|
60
|
+
_raw: z.nullable(z.record(z.any())).optional(),
|
|
61
|
+
}).transform((v) => {
|
|
62
|
+
return remap$(v, {
|
|
63
|
+
"status_code": "statusCode",
|
|
64
|
+
"_raw": "raw",
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export type GetCategoryResponse$Outbound = {
|
|
70
|
+
status_code: number;
|
|
71
|
+
status: string;
|
|
72
|
+
service: string;
|
|
73
|
+
resource: string;
|
|
74
|
+
operation: string;
|
|
75
|
+
data: Category$Outbound;
|
|
76
|
+
_raw?: { [k: string]: any } | null | undefined;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const GetCategoryResponse$outboundSchema: z.ZodType<
|
|
81
|
+
GetCategoryResponse$Outbound,
|
|
82
|
+
z.ZodTypeDef,
|
|
83
|
+
GetCategoryResponse
|
|
84
|
+
> = z.object({
|
|
85
|
+
statusCode: z.number().int(),
|
|
86
|
+
status: z.string(),
|
|
87
|
+
service: z.string(),
|
|
88
|
+
resource: z.string(),
|
|
89
|
+
operation: z.string(),
|
|
90
|
+
data: Category$outboundSchema,
|
|
91
|
+
raw: z.nullable(z.record(z.any())).optional(),
|
|
92
|
+
}).transform((v) => {
|
|
93
|
+
return remap$(v, {
|
|
94
|
+
statusCode: "status_code",
|
|
95
|
+
raw: "_raw",
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @internal
|
|
101
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
102
|
+
*/
|
|
103
|
+
export namespace GetCategoryResponse$ {
|
|
104
|
+
/** @deprecated use `GetCategoryResponse$inboundSchema` instead. */
|
|
105
|
+
export const inboundSchema = GetCategoryResponse$inboundSchema;
|
|
106
|
+
/** @deprecated use `GetCategoryResponse$outboundSchema` instead. */
|
|
107
|
+
export const outboundSchema = GetCategoryResponse$outboundSchema;
|
|
108
|
+
/** @deprecated use `GetCategoryResponse$Outbound` instead. */
|
|
109
|
+
export type Outbound = GetCategoryResponse$Outbound;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function getCategoryResponseToJSON(
|
|
113
|
+
getCategoryResponse: GetCategoryResponse,
|
|
114
|
+
): string {
|
|
115
|
+
return JSON.stringify(
|
|
116
|
+
GetCategoryResponse$outboundSchema.parse(getCategoryResponse),
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function getCategoryResponseFromJSON(
|
|
121
|
+
jsonString: string,
|
|
122
|
+
): SafeParseResult<GetCategoryResponse, SDKValidationError> {
|
|
123
|
+
return safeParse(
|
|
124
|
+
jsonString,
|
|
125
|
+
(x) => GetCategoryResponse$inboundSchema.parse(JSON.parse(x)),
|
|
126
|
+
`Failed to parse 'GetCategoryResponse' from JSON`,
|
|
127
|
+
);
|
|
128
|
+
}
|
|
@@ -42,6 +42,7 @@ export * from "./billlineitem.js";
|
|
|
42
42
|
export * from "./billpayment.js";
|
|
43
43
|
export * from "./billsfilter.js";
|
|
44
44
|
export * from "./billssort.js";
|
|
45
|
+
export * from "./category.js";
|
|
45
46
|
export * from "./collection.js";
|
|
46
47
|
export * from "./collectionssort.js";
|
|
47
48
|
export * from "./collectiontag.js";
|
|
@@ -259,6 +260,8 @@ export * from "./getbillpaymentresponse.js";
|
|
|
259
260
|
export * from "./getbillpaymentsresponse.js";
|
|
260
261
|
export * from "./getbillresponse.js";
|
|
261
262
|
export * from "./getbillsresponse.js";
|
|
263
|
+
export * from "./getcategoriesresponse.js";
|
|
264
|
+
export * from "./getcategoryresponse.js";
|
|
262
265
|
export * from "./getcollectionresponse.js";
|
|
263
266
|
export * from "./getcollectionsresponse.js";
|
|
264
267
|
export * from "./getcollectiontagsresponse.js";
|
|
@@ -176,7 +176,7 @@ export type Invoice = {
|
|
|
176
176
|
*/
|
|
177
177
|
poNumber?: string | null | undefined;
|
|
178
178
|
/**
|
|
179
|
-
* Optional
|
|
179
|
+
* Optional reference identifier for the transaction.
|
|
180
180
|
*/
|
|
181
181
|
reference?: string | null | undefined;
|
|
182
182
|
/**
|
|
@@ -341,7 +341,7 @@ export type InvoiceInput = {
|
|
|
341
341
|
*/
|
|
342
342
|
poNumber?: string | null | undefined;
|
|
343
343
|
/**
|
|
344
|
-
* Optional
|
|
344
|
+
* Optional reference identifier for the transaction.
|
|
345
345
|
*/
|
|
346
346
|
reference?: string | null | undefined;
|
|
347
347
|
/**
|
|
@@ -120,6 +120,10 @@ export type Supplier = {
|
|
|
120
120
|
* The company or subsidiary id the transaction belongs to
|
|
121
121
|
*/
|
|
122
122
|
companyId?: string | null | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* The category/type of the supplier
|
|
125
|
+
*/
|
|
126
|
+
supplierCategory?: string | null | undefined;
|
|
123
127
|
/**
|
|
124
128
|
* The job title of the person.
|
|
125
129
|
*/
|
|
@@ -221,6 +225,10 @@ export type SupplierInput = {
|
|
|
221
225
|
* The company or subsidiary id the transaction belongs to
|
|
222
226
|
*/
|
|
223
227
|
companyId?: string | null | undefined;
|
|
228
|
+
/**
|
|
229
|
+
* The category/type of the supplier
|
|
230
|
+
*/
|
|
231
|
+
supplierCategory?: string | null | undefined;
|
|
224
232
|
/**
|
|
225
233
|
* The job title of the person.
|
|
226
234
|
*/
|
|
@@ -318,6 +326,7 @@ export const Supplier$inboundSchema: z.ZodType<
|
|
|
318
326
|
display_name: z.nullable(z.string()).optional(),
|
|
319
327
|
company_name: z.nullable(z.string()).optional(),
|
|
320
328
|
company_id: z.nullable(z.string()).optional(),
|
|
329
|
+
supplier_category: z.nullable(z.string()).optional(),
|
|
321
330
|
title: z.nullable(z.string()).optional(),
|
|
322
331
|
first_name: z.nullable(z.string()).optional(),
|
|
323
332
|
middle_name: z.nullable(z.string()).optional(),
|
|
@@ -357,6 +366,7 @@ export const Supplier$inboundSchema: z.ZodType<
|
|
|
357
366
|
"display_name": "displayName",
|
|
358
367
|
"company_name": "companyName",
|
|
359
368
|
"company_id": "companyId",
|
|
369
|
+
"supplier_category": "supplierCategory",
|
|
360
370
|
"first_name": "firstName",
|
|
361
371
|
"middle_name": "middleName",
|
|
362
372
|
"last_name": "lastName",
|
|
@@ -385,6 +395,7 @@ export type Supplier$Outbound = {
|
|
|
385
395
|
display_name?: string | null | undefined;
|
|
386
396
|
company_name?: string | null | undefined;
|
|
387
397
|
company_id?: string | null | undefined;
|
|
398
|
+
supplier_category?: string | null | undefined;
|
|
388
399
|
title?: string | null | undefined;
|
|
389
400
|
first_name?: string | null | undefined;
|
|
390
401
|
middle_name?: string | null | undefined;
|
|
@@ -427,6 +438,7 @@ export const Supplier$outboundSchema: z.ZodType<
|
|
|
427
438
|
displayName: z.nullable(z.string()).optional(),
|
|
428
439
|
companyName: z.nullable(z.string()).optional(),
|
|
429
440
|
companyId: z.nullable(z.string()).optional(),
|
|
441
|
+
supplierCategory: z.nullable(z.string()).optional(),
|
|
430
442
|
title: z.nullable(z.string()).optional(),
|
|
431
443
|
firstName: z.nullable(z.string()).optional(),
|
|
432
444
|
middleName: z.nullable(z.string()).optional(),
|
|
@@ -462,6 +474,7 @@ export const Supplier$outboundSchema: z.ZodType<
|
|
|
462
474
|
displayName: "display_name",
|
|
463
475
|
companyName: "company_name",
|
|
464
476
|
companyId: "company_id",
|
|
477
|
+
supplierCategory: "supplier_category",
|
|
465
478
|
firstName: "first_name",
|
|
466
479
|
middleName: "middle_name",
|
|
467
480
|
lastName: "last_name",
|
|
@@ -519,6 +532,7 @@ export const SupplierInput$inboundSchema: z.ZodType<
|
|
|
519
532
|
display_name: z.nullable(z.string()).optional(),
|
|
520
533
|
company_name: z.nullable(z.string()).optional(),
|
|
521
534
|
company_id: z.nullable(z.string()).optional(),
|
|
535
|
+
supplier_category: z.nullable(z.string()).optional(),
|
|
522
536
|
title: z.nullable(z.string()).optional(),
|
|
523
537
|
first_name: z.nullable(z.string()).optional(),
|
|
524
538
|
middle_name: z.nullable(z.string()).optional(),
|
|
@@ -548,6 +562,7 @@ export const SupplierInput$inboundSchema: z.ZodType<
|
|
|
548
562
|
"display_name": "displayName",
|
|
549
563
|
"company_name": "companyName",
|
|
550
564
|
"company_id": "companyId",
|
|
565
|
+
"supplier_category": "supplierCategory",
|
|
551
566
|
"first_name": "firstName",
|
|
552
567
|
"middle_name": "middleName",
|
|
553
568
|
"last_name": "lastName",
|
|
@@ -569,6 +584,7 @@ export type SupplierInput$Outbound = {
|
|
|
569
584
|
display_name?: string | null | undefined;
|
|
570
585
|
company_name?: string | null | undefined;
|
|
571
586
|
company_id?: string | null | undefined;
|
|
587
|
+
supplier_category?: string | null | undefined;
|
|
572
588
|
title?: string | null | undefined;
|
|
573
589
|
first_name?: string | null | undefined;
|
|
574
590
|
middle_name?: string | null | undefined;
|
|
@@ -604,6 +620,7 @@ export const SupplierInput$outboundSchema: z.ZodType<
|
|
|
604
620
|
displayName: z.nullable(z.string()).optional(),
|
|
605
621
|
companyName: z.nullable(z.string()).optional(),
|
|
606
622
|
companyId: z.nullable(z.string()).optional(),
|
|
623
|
+
supplierCategory: z.nullable(z.string()).optional(),
|
|
607
624
|
title: z.nullable(z.string()).optional(),
|
|
608
625
|
firstName: z.nullable(z.string()).optional(),
|
|
609
626
|
middleName: z.nullable(z.string()).optional(),
|
|
@@ -633,6 +650,7 @@ export const SupplierInput$outboundSchema: z.ZodType<
|
|
|
633
650
|
displayName: "display_name",
|
|
634
651
|
companyName: "company_name",
|
|
635
652
|
companyId: "company_id",
|
|
653
|
+
supplierCategory: "supplier_category",
|
|
636
654
|
firstName: "first_name",
|
|
637
655
|
middleName: "middle_name",
|
|
638
656
|
lastName: "last_name",
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type AccountingCategoriesAllGlobals = {
|
|
13
|
+
/**
|
|
14
|
+
* ID of the consumer which you want to get or push data from
|
|
15
|
+
*/
|
|
16
|
+
consumerId?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The ID of your Unify application
|
|
19
|
+
*/
|
|
20
|
+
appId?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type AccountingCategoriesAllRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* Include raw response. Mostly used for debugging purposes
|
|
26
|
+
*/
|
|
27
|
+
raw?: boolean | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* ID of the consumer which you want to get or push data from
|
|
30
|
+
*/
|
|
31
|
+
consumerId?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The ID of your Unify application
|
|
34
|
+
*/
|
|
35
|
+
appId?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.
|
|
38
|
+
*/
|
|
39
|
+
serviceId?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.
|
|
42
|
+
*/
|
|
43
|
+
cursor?: string | null | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Number of results to return. Minimum 1, Maximum 200, Default 20
|
|
46
|
+
*/
|
|
47
|
+
limit?: number | undefined;
|
|
48
|
+
/**
|
|
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
|
+
*/
|
|
51
|
+
fields?: string | null | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export type AccountingCategoriesAllResponse = {
|
|
55
|
+
httpMeta: components.HTTPMetadata;
|
|
56
|
+
/**
|
|
57
|
+
* Categories
|
|
58
|
+
*/
|
|
59
|
+
getCategoriesResponse?: components.GetCategoriesResponse | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Unexpected error
|
|
62
|
+
*/
|
|
63
|
+
unexpectedErrorResponse?: components.UnexpectedErrorResponse | undefined;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const AccountingCategoriesAllGlobals$inboundSchema: z.ZodType<
|
|
68
|
+
AccountingCategoriesAllGlobals,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
unknown
|
|
71
|
+
> = z.object({
|
|
72
|
+
consumerId: z.string().optional(),
|
|
73
|
+
appId: z.string().optional(),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export type AccountingCategoriesAllGlobals$Outbound = {
|
|
78
|
+
consumerId?: string | undefined;
|
|
79
|
+
appId?: string | undefined;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export const AccountingCategoriesAllGlobals$outboundSchema: z.ZodType<
|
|
84
|
+
AccountingCategoriesAllGlobals$Outbound,
|
|
85
|
+
z.ZodTypeDef,
|
|
86
|
+
AccountingCategoriesAllGlobals
|
|
87
|
+
> = z.object({
|
|
88
|
+
consumerId: z.string().optional(),
|
|
89
|
+
appId: z.string().optional(),
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @internal
|
|
94
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
95
|
+
*/
|
|
96
|
+
export namespace AccountingCategoriesAllGlobals$ {
|
|
97
|
+
/** @deprecated use `AccountingCategoriesAllGlobals$inboundSchema` instead. */
|
|
98
|
+
export const inboundSchema = AccountingCategoriesAllGlobals$inboundSchema;
|
|
99
|
+
/** @deprecated use `AccountingCategoriesAllGlobals$outboundSchema` instead. */
|
|
100
|
+
export const outboundSchema = AccountingCategoriesAllGlobals$outboundSchema;
|
|
101
|
+
/** @deprecated use `AccountingCategoriesAllGlobals$Outbound` instead. */
|
|
102
|
+
export type Outbound = AccountingCategoriesAllGlobals$Outbound;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function accountingCategoriesAllGlobalsToJSON(
|
|
106
|
+
accountingCategoriesAllGlobals: AccountingCategoriesAllGlobals,
|
|
107
|
+
): string {
|
|
108
|
+
return JSON.stringify(
|
|
109
|
+
AccountingCategoriesAllGlobals$outboundSchema.parse(
|
|
110
|
+
accountingCategoriesAllGlobals,
|
|
111
|
+
),
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function accountingCategoriesAllGlobalsFromJSON(
|
|
116
|
+
jsonString: string,
|
|
117
|
+
): SafeParseResult<AccountingCategoriesAllGlobals, SDKValidationError> {
|
|
118
|
+
return safeParse(
|
|
119
|
+
jsonString,
|
|
120
|
+
(x) => AccountingCategoriesAllGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
121
|
+
`Failed to parse 'AccountingCategoriesAllGlobals' from JSON`,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const AccountingCategoriesAllRequest$inboundSchema: z.ZodType<
|
|
127
|
+
AccountingCategoriesAllRequest,
|
|
128
|
+
z.ZodTypeDef,
|
|
129
|
+
unknown
|
|
130
|
+
> = z.object({
|
|
131
|
+
raw: z.boolean().default(false),
|
|
132
|
+
consumerId: z.string().optional(),
|
|
133
|
+
appId: z.string().optional(),
|
|
134
|
+
serviceId: z.string().optional(),
|
|
135
|
+
cursor: z.nullable(z.string()).optional(),
|
|
136
|
+
limit: z.number().int().default(20),
|
|
137
|
+
fields: z.nullable(z.string()).optional(),
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
/** @internal */
|
|
141
|
+
export type AccountingCategoriesAllRequest$Outbound = {
|
|
142
|
+
raw: boolean;
|
|
143
|
+
consumerId?: string | undefined;
|
|
144
|
+
appId?: string | undefined;
|
|
145
|
+
serviceId?: string | undefined;
|
|
146
|
+
cursor?: string | null | undefined;
|
|
147
|
+
limit: number;
|
|
148
|
+
fields?: string | null | undefined;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/** @internal */
|
|
152
|
+
export const AccountingCategoriesAllRequest$outboundSchema: z.ZodType<
|
|
153
|
+
AccountingCategoriesAllRequest$Outbound,
|
|
154
|
+
z.ZodTypeDef,
|
|
155
|
+
AccountingCategoriesAllRequest
|
|
156
|
+
> = z.object({
|
|
157
|
+
raw: z.boolean().default(false),
|
|
158
|
+
consumerId: z.string().optional(),
|
|
159
|
+
appId: z.string().optional(),
|
|
160
|
+
serviceId: z.string().optional(),
|
|
161
|
+
cursor: z.nullable(z.string()).optional(),
|
|
162
|
+
limit: z.number().int().default(20),
|
|
163
|
+
fields: z.nullable(z.string()).optional(),
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* @internal
|
|
168
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
169
|
+
*/
|
|
170
|
+
export namespace AccountingCategoriesAllRequest$ {
|
|
171
|
+
/** @deprecated use `AccountingCategoriesAllRequest$inboundSchema` instead. */
|
|
172
|
+
export const inboundSchema = AccountingCategoriesAllRequest$inboundSchema;
|
|
173
|
+
/** @deprecated use `AccountingCategoriesAllRequest$outboundSchema` instead. */
|
|
174
|
+
export const outboundSchema = AccountingCategoriesAllRequest$outboundSchema;
|
|
175
|
+
/** @deprecated use `AccountingCategoriesAllRequest$Outbound` instead. */
|
|
176
|
+
export type Outbound = AccountingCategoriesAllRequest$Outbound;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function accountingCategoriesAllRequestToJSON(
|
|
180
|
+
accountingCategoriesAllRequest: AccountingCategoriesAllRequest,
|
|
181
|
+
): string {
|
|
182
|
+
return JSON.stringify(
|
|
183
|
+
AccountingCategoriesAllRequest$outboundSchema.parse(
|
|
184
|
+
accountingCategoriesAllRequest,
|
|
185
|
+
),
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function accountingCategoriesAllRequestFromJSON(
|
|
190
|
+
jsonString: string,
|
|
191
|
+
): SafeParseResult<AccountingCategoriesAllRequest, SDKValidationError> {
|
|
192
|
+
return safeParse(
|
|
193
|
+
jsonString,
|
|
194
|
+
(x) => AccountingCategoriesAllRequest$inboundSchema.parse(JSON.parse(x)),
|
|
195
|
+
`Failed to parse 'AccountingCategoriesAllRequest' from JSON`,
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/** @internal */
|
|
200
|
+
export const AccountingCategoriesAllResponse$inboundSchema: z.ZodType<
|
|
201
|
+
AccountingCategoriesAllResponse,
|
|
202
|
+
z.ZodTypeDef,
|
|
203
|
+
unknown
|
|
204
|
+
> = z.object({
|
|
205
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
206
|
+
GetCategoriesResponse: components.GetCategoriesResponse$inboundSchema
|
|
207
|
+
.optional(),
|
|
208
|
+
UnexpectedErrorResponse: components.UnexpectedErrorResponse$inboundSchema
|
|
209
|
+
.optional(),
|
|
210
|
+
}).transform((v) => {
|
|
211
|
+
return remap$(v, {
|
|
212
|
+
"HttpMeta": "httpMeta",
|
|
213
|
+
"GetCategoriesResponse": "getCategoriesResponse",
|
|
214
|
+
"UnexpectedErrorResponse": "unexpectedErrorResponse",
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
/** @internal */
|
|
219
|
+
export type AccountingCategoriesAllResponse$Outbound = {
|
|
220
|
+
HttpMeta: components.HTTPMetadata$Outbound;
|
|
221
|
+
GetCategoriesResponse?: components.GetCategoriesResponse$Outbound | undefined;
|
|
222
|
+
UnexpectedErrorResponse?:
|
|
223
|
+
| components.UnexpectedErrorResponse$Outbound
|
|
224
|
+
| undefined;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
/** @internal */
|
|
228
|
+
export const AccountingCategoriesAllResponse$outboundSchema: z.ZodType<
|
|
229
|
+
AccountingCategoriesAllResponse$Outbound,
|
|
230
|
+
z.ZodTypeDef,
|
|
231
|
+
AccountingCategoriesAllResponse
|
|
232
|
+
> = z.object({
|
|
233
|
+
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
234
|
+
getCategoriesResponse: components.GetCategoriesResponse$outboundSchema
|
|
235
|
+
.optional(),
|
|
236
|
+
unexpectedErrorResponse: components.UnexpectedErrorResponse$outboundSchema
|
|
237
|
+
.optional(),
|
|
238
|
+
}).transform((v) => {
|
|
239
|
+
return remap$(v, {
|
|
240
|
+
httpMeta: "HttpMeta",
|
|
241
|
+
getCategoriesResponse: "GetCategoriesResponse",
|
|
242
|
+
unexpectedErrorResponse: "UnexpectedErrorResponse",
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* @internal
|
|
248
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
249
|
+
*/
|
|
250
|
+
export namespace AccountingCategoriesAllResponse$ {
|
|
251
|
+
/** @deprecated use `AccountingCategoriesAllResponse$inboundSchema` instead. */
|
|
252
|
+
export const inboundSchema = AccountingCategoriesAllResponse$inboundSchema;
|
|
253
|
+
/** @deprecated use `AccountingCategoriesAllResponse$outboundSchema` instead. */
|
|
254
|
+
export const outboundSchema = AccountingCategoriesAllResponse$outboundSchema;
|
|
255
|
+
/** @deprecated use `AccountingCategoriesAllResponse$Outbound` instead. */
|
|
256
|
+
export type Outbound = AccountingCategoriesAllResponse$Outbound;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export function accountingCategoriesAllResponseToJSON(
|
|
260
|
+
accountingCategoriesAllResponse: AccountingCategoriesAllResponse,
|
|
261
|
+
): string {
|
|
262
|
+
return JSON.stringify(
|
|
263
|
+
AccountingCategoriesAllResponse$outboundSchema.parse(
|
|
264
|
+
accountingCategoriesAllResponse,
|
|
265
|
+
),
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export function accountingCategoriesAllResponseFromJSON(
|
|
270
|
+
jsonString: string,
|
|
271
|
+
): SafeParseResult<AccountingCategoriesAllResponse, SDKValidationError> {
|
|
272
|
+
return safeParse(
|
|
273
|
+
jsonString,
|
|
274
|
+
(x) => AccountingCategoriesAllResponse$inboundSchema.parse(JSON.parse(x)),
|
|
275
|
+
`Failed to parse 'AccountingCategoriesAllResponse' from JSON`,
|
|
276
|
+
);
|
|
277
|
+
}
|