@apideck/unify 0.11.4 → 0.11.5
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/FUNCTIONS.md +119 -0
- package/README.md +3 -3
- package/RUNTIMES.md +22 -0
- package/docs/sdks/invoiceitems/README.md +8 -0
- package/funcs/accountingInvoiceItemsGet.d.ts.map +1 -1
- package/funcs/accountingInvoiceItemsGet.js +4 -2
- package/funcs/accountingInvoiceItemsGet.js.map +1 -1
- package/hooks/registration.d.ts +1 -1
- package/hooks/registration.d.ts.map +1 -1
- package/hooks/registration.js +2 -3
- package/hooks/registration.js.map +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/security.js +1 -1
- package/lib/security.js.map +1 -1
- package/models/components/expense.d.ts +44 -0
- package/models/components/expense.d.ts.map +1 -1
- package/models/components/expense.js +32 -1
- 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/invoiceitem.d.ts +9 -9
- package/models/components/invoiceitem.d.ts.map +1 -1
- package/models/components/invoiceitem.js +15 -15
- package/models/components/invoiceitem.js.map +1 -1
- package/models/components/invoiceitemfilter.d.ts +67 -0
- package/models/components/invoiceitemfilter.d.ts.map +1 -0
- package/models/components/invoiceitemfilter.js +82 -0
- package/models/components/invoiceitemfilter.js.map +1 -0
- package/models/components/invoiceitemsfilter.d.ts +40 -0
- package/models/components/invoiceitemsfilter.d.ts.map +1 -1
- package/models/components/invoiceitemsfilter.js +26 -1
- package/models/components/invoiceitemsfilter.js.map +1 -1
- package/models/components/ledgeraccount.d.ts +17 -17
- package/models/components/ledgeraccount.d.ts.map +1 -1
- package/models/components/ledgeraccount.js +24 -20
- package/models/components/ledgeraccount.js.map +1 -1
- package/models/components/message.d.ts +2 -2
- package/models/components/message.d.ts.map +1 -1
- package/models/components/message.js +4 -4
- package/models/components/message.js.map +1 -1
- 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/components/taxrate.d.ts +38 -0
- package/models/components/taxrate.d.ts.map +1 -1
- package/models/components/taxrate.js +32 -1
- package/models/components/taxrate.js.map +1 -1
- package/models/components/trackingcategory.d.ts +38 -0
- package/models/components/trackingcategory.d.ts.map +1 -1
- package/models/components/trackingcategory.js +32 -1
- package/models/components/trackingcategory.js.map +1 -1
- package/models/operations/accountinginvoiceitemsone.d.ts +5 -0
- package/models/operations/accountinginvoiceitemsone.d.ts.map +1 -1
- package/models/operations/accountinginvoiceitemsone.js +2 -0
- package/models/operations/accountinginvoiceitemsone.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/accountingInvoiceItemsGet.ts +15 -5
- package/src/hooks/registration.ts +2 -4
- package/src/lib/config.ts +4 -4
- package/src/lib/security.ts +1 -1
- package/src/models/components/expense.ts +52 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/invoiceitem.ts +19 -19
- package/src/models/components/invoiceitemfilter.ts +106 -0
- package/src/models/components/invoiceitemsfilter.ts +42 -0
- package/src/models/components/ledgeraccount.ts +36 -28
- package/src/models/components/message.ts +2 -2
- package/src/models/components/supplier.ts +18 -0
- package/src/models/components/taxrate.ts +71 -0
- package/src/models/components/trackingcategory.ts +85 -0
- package/src/models/operations/accountinginvoiceitemsone.ts +7 -0
- package/hooks/headers.d.ts +0 -11
- package/hooks/headers.d.ts.map +0 -1
- package/hooks/headers.js +0 -26
- package/hooks/headers.js.map +0 -1
- package/src/hooks/headers.ts +0 -42
|
@@ -70,6 +70,7 @@ exports.AccountingInvoiceItemsOneRequest$inboundSchema = z.object({
|
|
|
70
70
|
serviceId: z.string().optional(),
|
|
71
71
|
raw: z.boolean().default(false),
|
|
72
72
|
fields: z.nullable(z.string()).optional(),
|
|
73
|
+
filter: components.InvoiceItemFilter$inboundSchema.optional(),
|
|
73
74
|
});
|
|
74
75
|
/** @internal */
|
|
75
76
|
exports.AccountingInvoiceItemsOneRequest$outboundSchema = z.object({
|
|
@@ -77,6 +78,7 @@ exports.AccountingInvoiceItemsOneRequest$outboundSchema = z.object({
|
|
|
77
78
|
serviceId: z.string().optional(),
|
|
78
79
|
raw: z.boolean().default(false),
|
|
79
80
|
fields: z.nullable(z.string()).optional(),
|
|
81
|
+
filter: components.InvoiceItemFilter$outboundSchema.optional(),
|
|
80
82
|
});
|
|
81
83
|
/**
|
|
82
84
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountinginvoiceitemsone.js","sourceRoot":"","sources":["../../src/models/operations/accountinginvoiceitemsone.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"accountinginvoiceitemsone.js","sourceRoot":"","sources":["../../src/models/operations/accountinginvoiceitemsone.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AA8FH,wFAQC;AAED,4FAQC;AAkDD,wFAQC;AAED,4FAQC;AAiED,0FAQC;AAED,8FAQC;AArQD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAEjD,mEAAqD;AAiDrD,gBAAgB;AACH,QAAA,8CAA8C,GAIvD,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AAQH,gBAAgB;AACH,QAAA,+CAA+C,GAIxD,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,iCAAi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AsB,EAAE,UAAU,CAAC,qCAAqC;SACrE,QAAQ,EAAE;IACb,uBAAuB,EAAE,UAAU,CAAC,sCAAsC;SACvE,QAAQ,EAAE;CACd,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,QAAQ,EAAE,UAAU;QACpB,sBAAsB,EAAE,wBAAwB;QAChD,uBAAuB,EAAE,yBAAyB;KACnD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,kCAAkC,CAQlD;AARD,WAAiB,kCAAkC;IACjD,iFAAiF;IACpE,gDAAa,GAAG,uDAA+C,CAAC;IAC7E,kFAAkF;IACrE,iDAAc,GACzB,wDAAgD,CAAC;AAGrD,CAAC,EARgB,kCAAkC,kDAAlC,kCAAkC,QAQlD;AAED,SAAgB,uCAAuC,CACrD,iCAAoE;IAEpE,OAAO,IAAI,CAAC,SAAS,CACnB,wDAAgD,CAAC,KAAK,CACpD,iCAAiC,CAClC,CACF,CAAC;AACJ,CAAC;AAED,SAAgB,yCAAyC,CACvD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,uDAA+C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC3E,+DAA+D,CAChE,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { ApideckCore } from "../core.js";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
encodeDeepObjectQuery,
|
|
8
|
+
encodeFormQuery,
|
|
9
|
+
encodeSimple,
|
|
10
|
+
queryJoin,
|
|
11
|
+
} from "../lib/encodings.js";
|
|
7
12
|
import * as M from "../lib/matchers.js";
|
|
8
13
|
import { safeParse } from "../lib/schemas.js";
|
|
9
14
|
import { RequestOptions } from "../lib/sdks.js";
|
|
@@ -70,10 +75,15 @@ export async function accountingInvoiceItemsGet(
|
|
|
70
75
|
|
|
71
76
|
const path = pathToFunc("/accounting/invoice-items/{id}")(pathParams);
|
|
72
77
|
|
|
73
|
-
const query =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
const query = queryJoin(
|
|
79
|
+
encodeDeepObjectQuery({
|
|
80
|
+
"filter": payload.filter,
|
|
81
|
+
}),
|
|
82
|
+
encodeFormQuery({
|
|
83
|
+
"fields": payload.fields,
|
|
84
|
+
"raw": payload.raw,
|
|
85
|
+
}),
|
|
86
|
+
);
|
|
77
87
|
|
|
78
88
|
const headers = new Headers({
|
|
79
89
|
Accept: "application/json",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { HeadersHook } from "./headers";
|
|
2
1
|
import { Hooks } from "./types";
|
|
3
2
|
/*
|
|
4
3
|
* This file is only ever generated once on the first generation and then is free to be modified.
|
|
@@ -6,10 +5,9 @@ import { Hooks } from "./types";
|
|
|
6
5
|
* in this file or in separate files in the hooks folder.
|
|
7
6
|
*/
|
|
8
7
|
|
|
9
|
-
export function initHooks(
|
|
8
|
+
export function initHooks(_: Hooks) {
|
|
10
9
|
// Add hooks by calling hooks.register{ClientInit/BeforeCreateRequest/BeforeRequest/AfterSuccess/AfterError}Hook
|
|
11
10
|
// with an instance of a hook that implements that specific Hook interface
|
|
12
11
|
// Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance
|
|
13
|
-
hooks.registerBeforeRequestHook(new HeadersHook());
|
|
14
|
-
|
|
12
|
+
// hooks.registerBeforeRequestHook(new HeadersHook());
|
|
15
13
|
}
|
package/src/lib/config.ts
CHANGED
|
@@ -63,8 +63,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
63
63
|
|
|
64
64
|
export const SDK_METADATA = {
|
|
65
65
|
language: "typescript",
|
|
66
|
-
openapiDocVersion: "10.8.
|
|
67
|
-
sdkVersion: "0.11.
|
|
68
|
-
genVersion: "2.
|
|
69
|
-
userAgent: "speakeasy-sdk/typescript 0.11.
|
|
66
|
+
openapiDocVersion: "10.8.3",
|
|
67
|
+
sdkVersion: "0.11.5",
|
|
68
|
+
genVersion: "2.472.1",
|
|
69
|
+
userAgent: "speakeasy-sdk/typescript 0.11.5 2.472.1 10.8.3 @apideck/unify",
|
|
70
70
|
} as const;
|
package/src/lib/security.ts
CHANGED
|
@@ -56,6 +56,19 @@ import {
|
|
|
56
56
|
PassThroughBody$outboundSchema,
|
|
57
57
|
} from "./passthroughbody.js";
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* The type of payment for the expense.
|
|
61
|
+
*/
|
|
62
|
+
export const ExpensePaymentType = {
|
|
63
|
+
Cash: "cash",
|
|
64
|
+
Check: "check",
|
|
65
|
+
CreditCard: "credit_card",
|
|
66
|
+
} as const;
|
|
67
|
+
/**
|
|
68
|
+
* The type of payment for the expense.
|
|
69
|
+
*/
|
|
70
|
+
export type ExpensePaymentType = ClosedEnum<typeof ExpensePaymentType>;
|
|
71
|
+
|
|
59
72
|
/**
|
|
60
73
|
* The type of expense.
|
|
61
74
|
*/
|
|
@@ -101,6 +114,10 @@ export type Expense = {
|
|
|
101
114
|
* The ID of the department this expense is linked to.
|
|
102
115
|
*/
|
|
103
116
|
departmentId?: string | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* The type of payment for the expense.
|
|
119
|
+
*/
|
|
120
|
+
paymentType?: ExpensePaymentType | null | undefined;
|
|
104
121
|
/**
|
|
105
122
|
* Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
|
|
106
123
|
*/
|
|
@@ -178,6 +195,10 @@ export type ExpenseInput = {
|
|
|
178
195
|
* The ID of the department this expense is linked to.
|
|
179
196
|
*/
|
|
180
197
|
departmentId?: string | undefined;
|
|
198
|
+
/**
|
|
199
|
+
* The type of payment for the expense.
|
|
200
|
+
*/
|
|
201
|
+
paymentType?: ExpensePaymentType | null | undefined;
|
|
181
202
|
/**
|
|
182
203
|
* Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
|
|
183
204
|
*/
|
|
@@ -214,6 +235,27 @@ export type ExpenseInput = {
|
|
|
214
235
|
passThrough?: Array<PassThroughBody> | undefined;
|
|
215
236
|
};
|
|
216
237
|
|
|
238
|
+
/** @internal */
|
|
239
|
+
export const ExpensePaymentType$inboundSchema: z.ZodNativeEnum<
|
|
240
|
+
typeof ExpensePaymentType
|
|
241
|
+
> = z.nativeEnum(ExpensePaymentType);
|
|
242
|
+
|
|
243
|
+
/** @internal */
|
|
244
|
+
export const ExpensePaymentType$outboundSchema: z.ZodNativeEnum<
|
|
245
|
+
typeof ExpensePaymentType
|
|
246
|
+
> = ExpensePaymentType$inboundSchema;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @internal
|
|
250
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
251
|
+
*/
|
|
252
|
+
export namespace ExpensePaymentType$ {
|
|
253
|
+
/** @deprecated use `ExpensePaymentType$inboundSchema` instead. */
|
|
254
|
+
export const inboundSchema = ExpensePaymentType$inboundSchema;
|
|
255
|
+
/** @deprecated use `ExpensePaymentType$outboundSchema` instead. */
|
|
256
|
+
export const outboundSchema = ExpensePaymentType$outboundSchema;
|
|
257
|
+
}
|
|
258
|
+
|
|
217
259
|
/** @internal */
|
|
218
260
|
export const ExpenseType$inboundSchema: z.ZodNativeEnum<typeof ExpenseType> = z
|
|
219
261
|
.nativeEnum(ExpenseType);
|
|
@@ -246,6 +288,7 @@ export const Expense$inboundSchema: z.ZodType<Expense, z.ZodTypeDef, unknown> =
|
|
|
246
288
|
supplier_id: z.string().optional(),
|
|
247
289
|
company_id: z.nullable(z.string()).optional(),
|
|
248
290
|
department_id: z.string().optional(),
|
|
291
|
+
payment_type: z.nullable(ExpensePaymentType$inboundSchema).optional(),
|
|
249
292
|
currency: z.nullable(Currency$inboundSchema).optional(),
|
|
250
293
|
currency_rate: z.nullable(z.number()).optional(),
|
|
251
294
|
type: z.nullable(ExpenseType$inboundSchema).optional(),
|
|
@@ -271,6 +314,7 @@ export const Expense$inboundSchema: z.ZodType<Expense, z.ZodTypeDef, unknown> =
|
|
|
271
314
|
"supplier_id": "supplierId",
|
|
272
315
|
"company_id": "companyId",
|
|
273
316
|
"department_id": "departmentId",
|
|
317
|
+
"payment_type": "paymentType",
|
|
274
318
|
"currency_rate": "currencyRate",
|
|
275
319
|
"tax_rate": "taxRate",
|
|
276
320
|
"total_amount": "totalAmount",
|
|
@@ -294,6 +338,7 @@ export type Expense$Outbound = {
|
|
|
294
338
|
supplier_id?: string | undefined;
|
|
295
339
|
company_id?: string | null | undefined;
|
|
296
340
|
department_id?: string | undefined;
|
|
341
|
+
payment_type?: string | null | undefined;
|
|
297
342
|
currency?: string | null | undefined;
|
|
298
343
|
currency_rate?: number | null | undefined;
|
|
299
344
|
type?: string | null | undefined;
|
|
@@ -323,6 +368,7 @@ export const Expense$outboundSchema: z.ZodType<
|
|
|
323
368
|
supplierId: z.string().optional(),
|
|
324
369
|
companyId: z.nullable(z.string()).optional(),
|
|
325
370
|
departmentId: z.string().optional(),
|
|
371
|
+
paymentType: z.nullable(ExpensePaymentType$outboundSchema).optional(),
|
|
326
372
|
currency: z.nullable(Currency$outboundSchema).optional(),
|
|
327
373
|
currencyRate: z.nullable(z.number()).optional(),
|
|
328
374
|
type: z.nullable(ExpenseType$outboundSchema).optional(),
|
|
@@ -344,6 +390,7 @@ export const Expense$outboundSchema: z.ZodType<
|
|
|
344
390
|
supplierId: "supplier_id",
|
|
345
391
|
companyId: "company_id",
|
|
346
392
|
departmentId: "department_id",
|
|
393
|
+
paymentType: "payment_type",
|
|
347
394
|
currencyRate: "currency_rate",
|
|
348
395
|
taxRate: "tax_rate",
|
|
349
396
|
totalAmount: "total_amount",
|
|
@@ -399,6 +446,7 @@ export const ExpenseInput$inboundSchema: z.ZodType<
|
|
|
399
446
|
supplier_id: z.string().optional(),
|
|
400
447
|
company_id: z.nullable(z.string()).optional(),
|
|
401
448
|
department_id: z.string().optional(),
|
|
449
|
+
payment_type: z.nullable(ExpensePaymentType$inboundSchema).optional(),
|
|
402
450
|
currency: z.nullable(Currency$inboundSchema).optional(),
|
|
403
451
|
currency_rate: z.nullable(z.number()).optional(),
|
|
404
452
|
type: z.nullable(ExpenseType$inboundSchema).optional(),
|
|
@@ -417,6 +465,7 @@ export const ExpenseInput$inboundSchema: z.ZodType<
|
|
|
417
465
|
"supplier_id": "supplierId",
|
|
418
466
|
"company_id": "companyId",
|
|
419
467
|
"department_id": "departmentId",
|
|
468
|
+
"payment_type": "paymentType",
|
|
420
469
|
"currency_rate": "currencyRate",
|
|
421
470
|
"tax_rate": "taxRate",
|
|
422
471
|
"total_amount": "totalAmount",
|
|
@@ -436,6 +485,7 @@ export type ExpenseInput$Outbound = {
|
|
|
436
485
|
supplier_id?: string | undefined;
|
|
437
486
|
company_id?: string | null | undefined;
|
|
438
487
|
department_id?: string | undefined;
|
|
488
|
+
payment_type?: string | null | undefined;
|
|
439
489
|
currency?: string | null | undefined;
|
|
440
490
|
currency_rate?: number | null | undefined;
|
|
441
491
|
type?: string | null | undefined;
|
|
@@ -461,6 +511,7 @@ export const ExpenseInput$outboundSchema: z.ZodType<
|
|
|
461
511
|
supplierId: z.string().optional(),
|
|
462
512
|
companyId: z.nullable(z.string()).optional(),
|
|
463
513
|
departmentId: z.string().optional(),
|
|
514
|
+
paymentType: z.nullable(ExpensePaymentType$outboundSchema).optional(),
|
|
464
515
|
currency: z.nullable(Currency$outboundSchema).optional(),
|
|
465
516
|
currencyRate: z.nullable(z.number()).optional(),
|
|
466
517
|
type: z.nullable(ExpenseType$outboundSchema).optional(),
|
|
@@ -479,6 +530,7 @@ export const ExpenseInput$outboundSchema: z.ZodType<
|
|
|
479
530
|
supplierId: "supplier_id",
|
|
480
531
|
companyId: "company_id",
|
|
481
532
|
departmentId: "department_id",
|
|
533
|
+
paymentType: "payment_type",
|
|
482
534
|
currencyRate: "currency_rate",
|
|
483
535
|
taxRate: "tax_rate",
|
|
484
536
|
totalAmount: "total_amount",
|
|
@@ -337,6 +337,7 @@ export * from "./httpmetadata.js";
|
|
|
337
337
|
export * from "./integrationstate.js";
|
|
338
338
|
export * from "./invoice.js";
|
|
339
339
|
export * from "./invoiceitem.js";
|
|
340
|
+
export * from "./invoiceitemfilter.js";
|
|
340
341
|
export * from "./invoiceitemsfilter.js";
|
|
341
342
|
export * from "./invoicelineitem.js";
|
|
342
343
|
export * from "./invoiceresponse.js";
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
/**
|
|
62
62
|
* Item type
|
|
63
63
|
*/
|
|
64
|
-
export const
|
|
64
|
+
export const InvoiceItemTypeType = {
|
|
65
65
|
Inventory: "inventory",
|
|
66
66
|
Service: "service",
|
|
67
67
|
Other: "other",
|
|
@@ -69,7 +69,7 @@ export const InvoiceItemType = {
|
|
|
69
69
|
/**
|
|
70
70
|
* Item type
|
|
71
71
|
*/
|
|
72
|
-
export type
|
|
72
|
+
export type InvoiceItemTypeType = ClosedEnum<typeof InvoiceItemTypeType>;
|
|
73
73
|
|
|
74
74
|
export type SalesDetails = {
|
|
75
75
|
unitPrice?: number | null | undefined;
|
|
@@ -137,7 +137,7 @@ export type InvoiceItem = {
|
|
|
137
137
|
/**
|
|
138
138
|
* Item type
|
|
139
139
|
*/
|
|
140
|
-
type?:
|
|
140
|
+
type?: InvoiceItemTypeType | null | undefined;
|
|
141
141
|
salesDetails?: SalesDetails | undefined;
|
|
142
142
|
purchaseDetails?: PurchaseDetails | undefined;
|
|
143
143
|
quantity?: number | null | undefined;
|
|
@@ -246,7 +246,7 @@ export type InvoiceItemInput = {
|
|
|
246
246
|
/**
|
|
247
247
|
* Item type
|
|
248
248
|
*/
|
|
249
|
-
type?:
|
|
249
|
+
type?: InvoiceItemTypeType | null | undefined;
|
|
250
250
|
salesDetails?: InvoiceItemSalesDetails | undefined;
|
|
251
251
|
purchaseDetails?: InvoiceItemPurchaseDetails | undefined;
|
|
252
252
|
quantity?: number | null | undefined;
|
|
@@ -274,24 +274,24 @@ export type InvoiceItemInput = {
|
|
|
274
274
|
};
|
|
275
275
|
|
|
276
276
|
/** @internal */
|
|
277
|
-
export const
|
|
278
|
-
typeof
|
|
279
|
-
> = z.nativeEnum(
|
|
277
|
+
export const InvoiceItemTypeType$inboundSchema: z.ZodNativeEnum<
|
|
278
|
+
typeof InvoiceItemTypeType
|
|
279
|
+
> = z.nativeEnum(InvoiceItemTypeType);
|
|
280
280
|
|
|
281
281
|
/** @internal */
|
|
282
|
-
export const
|
|
283
|
-
typeof
|
|
284
|
-
> =
|
|
282
|
+
export const InvoiceItemTypeType$outboundSchema: z.ZodNativeEnum<
|
|
283
|
+
typeof InvoiceItemTypeType
|
|
284
|
+
> = InvoiceItemTypeType$inboundSchema;
|
|
285
285
|
|
|
286
286
|
/**
|
|
287
287
|
* @internal
|
|
288
288
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
289
289
|
*/
|
|
290
|
-
export namespace
|
|
291
|
-
/** @deprecated use `
|
|
292
|
-
export const inboundSchema =
|
|
293
|
-
/** @deprecated use `
|
|
294
|
-
export const outboundSchema =
|
|
290
|
+
export namespace InvoiceItemTypeType$ {
|
|
291
|
+
/** @deprecated use `InvoiceItemTypeType$inboundSchema` instead. */
|
|
292
|
+
export const inboundSchema = InvoiceItemTypeType$inboundSchema;
|
|
293
|
+
/** @deprecated use `InvoiceItemTypeType$outboundSchema` instead. */
|
|
294
|
+
export const outboundSchema = InvoiceItemTypeType$outboundSchema;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
/** @internal */
|
|
@@ -458,7 +458,7 @@ export const InvoiceItem$inboundSchema: z.ZodType<
|
|
|
458
458
|
taxable: z.nullable(z.boolean()).optional(),
|
|
459
459
|
inventory_date: z.nullable(z.string().transform(v => new RFCDate(v)))
|
|
460
460
|
.optional(),
|
|
461
|
-
type: z.nullable(
|
|
461
|
+
type: z.nullable(InvoiceItemTypeType$inboundSchema).optional(),
|
|
462
462
|
sales_details: z.lazy(() => SalesDetails$inboundSchema).optional(),
|
|
463
463
|
purchase_details: z.lazy(() => PurchaseDetails$inboundSchema).optional(),
|
|
464
464
|
quantity: z.nullable(z.number()).optional(),
|
|
@@ -556,7 +556,7 @@ export const InvoiceItem$outboundSchema: z.ZodType<
|
|
|
556
556
|
taxable: z.nullable(z.boolean()).optional(),
|
|
557
557
|
inventoryDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString()))
|
|
558
558
|
.optional(),
|
|
559
|
-
type: z.nullable(
|
|
559
|
+
type: z.nullable(InvoiceItemTypeType$outboundSchema).optional(),
|
|
560
560
|
salesDetails: z.lazy(() => SalesDetails$outboundSchema).optional(),
|
|
561
561
|
purchaseDetails: z.lazy(() => PurchaseDetails$outboundSchema).optional(),
|
|
562
562
|
quantity: z.nullable(z.number()).optional(),
|
|
@@ -793,7 +793,7 @@ export const InvoiceItemInput$inboundSchema: z.ZodType<
|
|
|
793
793
|
taxable: z.nullable(z.boolean()).optional(),
|
|
794
794
|
inventory_date: z.nullable(z.string().transform(v => new RFCDate(v)))
|
|
795
795
|
.optional(),
|
|
796
|
-
type: z.nullable(
|
|
796
|
+
type: z.nullable(InvoiceItemTypeType$inboundSchema).optional(),
|
|
797
797
|
sales_details: z.lazy(() => InvoiceItemSalesDetails$inboundSchema).optional(),
|
|
798
798
|
purchase_details: z.lazy(() => InvoiceItemPurchaseDetails$inboundSchema)
|
|
799
799
|
.optional(),
|
|
@@ -872,7 +872,7 @@ export const InvoiceItemInput$outboundSchema: z.ZodType<
|
|
|
872
872
|
taxable: z.nullable(z.boolean()).optional(),
|
|
873
873
|
inventoryDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString()))
|
|
874
874
|
.optional(),
|
|
875
|
-
type: z.nullable(
|
|
875
|
+
type: z.nullable(InvoiceItemTypeType$outboundSchema).optional(),
|
|
876
876
|
salesDetails: z.lazy(() => InvoiceItemSalesDetails$outboundSchema).optional(),
|
|
877
877
|
purchaseDetails: z.lazy(() => InvoiceItemPurchaseDetails$outboundSchema)
|
|
878
878
|
.optional(),
|
|
@@ -0,0 +1,106 @@
|
|
|
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 invoice item, indicating whether it is an inventory item, a service, or another type.
|
|
13
|
+
*/
|
|
14
|
+
export const InvoiceItemFilterInvoiceItemType = {
|
|
15
|
+
Inventory: "inventory",
|
|
16
|
+
Service: "service",
|
|
17
|
+
Other: "other",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* The type of invoice item, indicating whether it is an inventory item, a service, or another type.
|
|
21
|
+
*/
|
|
22
|
+
export type InvoiceItemFilterInvoiceItemType = ClosedEnum<
|
|
23
|
+
typeof InvoiceItemFilterInvoiceItemType
|
|
24
|
+
>;
|
|
25
|
+
|
|
26
|
+
export type InvoiceItemFilter = {
|
|
27
|
+
/**
|
|
28
|
+
* The type of invoice item, indicating whether it is an inventory item, a service, or another type.
|
|
29
|
+
*/
|
|
30
|
+
type?: InvoiceItemFilterInvoiceItemType | null | undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const InvoiceItemFilterInvoiceItemType$inboundSchema: z.ZodNativeEnum<
|
|
35
|
+
typeof InvoiceItemFilterInvoiceItemType
|
|
36
|
+
> = z.nativeEnum(InvoiceItemFilterInvoiceItemType);
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const InvoiceItemFilterInvoiceItemType$outboundSchema: z.ZodNativeEnum<
|
|
40
|
+
typeof InvoiceItemFilterInvoiceItemType
|
|
41
|
+
> = InvoiceItemFilterInvoiceItemType$inboundSchema;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
46
|
+
*/
|
|
47
|
+
export namespace InvoiceItemFilterInvoiceItemType$ {
|
|
48
|
+
/** @deprecated use `InvoiceItemFilterInvoiceItemType$inboundSchema` instead. */
|
|
49
|
+
export const inboundSchema = InvoiceItemFilterInvoiceItemType$inboundSchema;
|
|
50
|
+
/** @deprecated use `InvoiceItemFilterInvoiceItemType$outboundSchema` instead. */
|
|
51
|
+
export const outboundSchema = InvoiceItemFilterInvoiceItemType$outboundSchema;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const InvoiceItemFilter$inboundSchema: z.ZodType<
|
|
56
|
+
InvoiceItemFilter,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
unknown
|
|
59
|
+
> = z.object({
|
|
60
|
+
type: z.nullable(InvoiceItemFilterInvoiceItemType$inboundSchema).optional(),
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export type InvoiceItemFilter$Outbound = {
|
|
65
|
+
type?: string | null | undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const InvoiceItemFilter$outboundSchema: z.ZodType<
|
|
70
|
+
InvoiceItemFilter$Outbound,
|
|
71
|
+
z.ZodTypeDef,
|
|
72
|
+
InvoiceItemFilter
|
|
73
|
+
> = z.object({
|
|
74
|
+
type: z.nullable(InvoiceItemFilterInvoiceItemType$outboundSchema).optional(),
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
80
|
+
*/
|
|
81
|
+
export namespace InvoiceItemFilter$ {
|
|
82
|
+
/** @deprecated use `InvoiceItemFilter$inboundSchema` instead. */
|
|
83
|
+
export const inboundSchema = InvoiceItemFilter$inboundSchema;
|
|
84
|
+
/** @deprecated use `InvoiceItemFilter$outboundSchema` instead. */
|
|
85
|
+
export const outboundSchema = InvoiceItemFilter$outboundSchema;
|
|
86
|
+
/** @deprecated use `InvoiceItemFilter$Outbound` instead. */
|
|
87
|
+
export type Outbound = InvoiceItemFilter$Outbound;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function invoiceItemFilterToJSON(
|
|
91
|
+
invoiceItemFilter: InvoiceItemFilter,
|
|
92
|
+
): string {
|
|
93
|
+
return JSON.stringify(
|
|
94
|
+
InvoiceItemFilter$outboundSchema.parse(invoiceItemFilter),
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function invoiceItemFilterFromJSON(
|
|
99
|
+
jsonString: string,
|
|
100
|
+
): SafeParseResult<InvoiceItemFilter, SDKValidationError> {
|
|
101
|
+
return safeParse(
|
|
102
|
+
jsonString,
|
|
103
|
+
(x) => InvoiceItemFilter$inboundSchema.parse(JSON.parse(x)),
|
|
104
|
+
`Failed to parse 'InvoiceItemFilter' from JSON`,
|
|
105
|
+
);
|
|
106
|
+
}
|
|
@@ -4,16 +4,55 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
10
|
|
|
11
|
+
/**
|
|
12
|
+
* The type of invoice item, indicating whether it is an inventory item, a service, or another type.
|
|
13
|
+
*/
|
|
14
|
+
export const InvoiceItemType = {
|
|
15
|
+
Inventory: "inventory",
|
|
16
|
+
Service: "service",
|
|
17
|
+
Other: "other",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* The type of invoice item, indicating whether it is an inventory item, a service, or another type.
|
|
21
|
+
*/
|
|
22
|
+
export type InvoiceItemType = ClosedEnum<typeof InvoiceItemType>;
|
|
23
|
+
|
|
10
24
|
export type InvoiceItemsFilter = {
|
|
11
25
|
/**
|
|
12
26
|
* Name of Invoice Items to search for
|
|
13
27
|
*/
|
|
14
28
|
name?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The type of invoice item, indicating whether it is an inventory item, a service, or another type.
|
|
31
|
+
*/
|
|
32
|
+
type?: InvoiceItemType | null | undefined;
|
|
15
33
|
};
|
|
16
34
|
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const InvoiceItemType$inboundSchema: z.ZodNativeEnum<
|
|
37
|
+
typeof InvoiceItemType
|
|
38
|
+
> = z.nativeEnum(InvoiceItemType);
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const InvoiceItemType$outboundSchema: z.ZodNativeEnum<
|
|
42
|
+
typeof InvoiceItemType
|
|
43
|
+
> = InvoiceItemType$inboundSchema;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
48
|
+
*/
|
|
49
|
+
export namespace InvoiceItemType$ {
|
|
50
|
+
/** @deprecated use `InvoiceItemType$inboundSchema` instead. */
|
|
51
|
+
export const inboundSchema = InvoiceItemType$inboundSchema;
|
|
52
|
+
/** @deprecated use `InvoiceItemType$outboundSchema` instead. */
|
|
53
|
+
export const outboundSchema = InvoiceItemType$outboundSchema;
|
|
54
|
+
}
|
|
55
|
+
|
|
17
56
|
/** @internal */
|
|
18
57
|
export const InvoiceItemsFilter$inboundSchema: z.ZodType<
|
|
19
58
|
InvoiceItemsFilter,
|
|
@@ -21,11 +60,13 @@ export const InvoiceItemsFilter$inboundSchema: z.ZodType<
|
|
|
21
60
|
unknown
|
|
22
61
|
> = z.object({
|
|
23
62
|
name: z.string().optional(),
|
|
63
|
+
type: z.nullable(InvoiceItemType$inboundSchema).optional(),
|
|
24
64
|
});
|
|
25
65
|
|
|
26
66
|
/** @internal */
|
|
27
67
|
export type InvoiceItemsFilter$Outbound = {
|
|
28
68
|
name?: string | undefined;
|
|
69
|
+
type?: string | null | undefined;
|
|
29
70
|
};
|
|
30
71
|
|
|
31
72
|
/** @internal */
|
|
@@ -35,6 +76,7 @@ export const InvoiceItemsFilter$outboundSchema: z.ZodType<
|
|
|
35
76
|
InvoiceItemsFilter
|
|
36
77
|
> = z.object({
|
|
37
78
|
name: z.string().optional(),
|
|
79
|
+
type: z.nullable(InvoiceItemType$outboundSchema).optional(),
|
|
38
80
|
});
|
|
39
81
|
|
|
40
82
|
/**
|