@unified-api/typescript-sdk 2.6.4 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/funcs/accountingCreateAccountingOrder.d.ts +13 -0
- package/funcs/accountingCreateAccountingOrder.d.ts.map +1 -0
- package/funcs/accountingCreateAccountingOrder.js +98 -0
- package/funcs/accountingCreateAccountingOrder.js.map +1 -0
- package/funcs/accountingGetAccountingOrder.d.ts +13 -0
- package/funcs/accountingGetAccountingOrder.d.ts.map +1 -0
- package/funcs/accountingGetAccountingOrder.js +101 -0
- package/funcs/accountingGetAccountingOrder.js.map +1 -0
- package/funcs/accountingListAccountingOrders.d.ts +13 -0
- package/funcs/accountingListAccountingOrders.d.ts.map +1 -0
- package/funcs/accountingListAccountingOrders.js +105 -0
- package/funcs/accountingListAccountingOrders.js.map +1 -0
- package/funcs/accountingPatchAccountingOrder.d.ts +13 -0
- package/funcs/accountingPatchAccountingOrder.d.ts.map +1 -0
- package/funcs/accountingPatchAccountingOrder.js +102 -0
- package/funcs/accountingPatchAccountingOrder.js.map +1 -0
- package/funcs/accountingRemoveAccountingOrder.d.ts +12 -0
- package/funcs/accountingRemoveAccountingOrder.d.ts.map +1 -0
- package/funcs/accountingRemoveAccountingOrder.js +97 -0
- package/funcs/accountingRemoveAccountingOrder.js.map +1 -0
- package/funcs/accountingUpdateAccountingOrder.d.ts +13 -0
- package/funcs/accountingUpdateAccountingOrder.d.ts.map +1 -0
- package/funcs/accountingUpdateAccountingOrder.js +102 -0
- package/funcs/accountingUpdateAccountingOrder.js.map +1 -0
- package/funcs/orderCreateAccountingOrder.d.ts +13 -0
- package/funcs/orderCreateAccountingOrder.d.ts.map +1 -0
- package/funcs/orderCreateAccountingOrder.js +98 -0
- package/funcs/orderCreateAccountingOrder.js.map +1 -0
- package/funcs/orderGetAccountingOrder.d.ts +13 -0
- package/funcs/orderGetAccountingOrder.d.ts.map +1 -0
- package/funcs/orderGetAccountingOrder.js +101 -0
- package/funcs/orderGetAccountingOrder.js.map +1 -0
- package/funcs/orderListAccountingOrders.d.ts +13 -0
- package/funcs/orderListAccountingOrders.d.ts.map +1 -0
- package/funcs/orderListAccountingOrders.js +105 -0
- package/funcs/orderListAccountingOrders.js.map +1 -0
- package/funcs/orderPatchAccountingOrder.d.ts +13 -0
- package/funcs/orderPatchAccountingOrder.d.ts.map +1 -0
- package/funcs/orderPatchAccountingOrder.js +102 -0
- package/funcs/orderPatchAccountingOrder.js.map +1 -0
- package/funcs/orderRemoveAccountingOrder.d.ts +12 -0
- package/funcs/orderRemoveAccountingOrder.d.ts.map +1 -0
- package/funcs/orderRemoveAccountingOrder.js +97 -0
- package/funcs/orderRemoveAccountingOrder.js.map +1 -0
- package/funcs/orderUpdateAccountingOrder.d.ts +13 -0
- package/funcs/orderUpdateAccountingOrder.d.ts.map +1 -0
- package/funcs/orderUpdateAccountingOrder.js +102 -0
- package/funcs/orderUpdateAccountingOrder.js.map +1 -0
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/package.json +1 -1
- package/sdk/accounting.d.ts +24 -0
- package/sdk/accounting.d.ts.map +1 -1
- package/sdk/accounting.js +42 -0
- package/sdk/accounting.js.map +1 -1
- package/sdk/models/operations/createaccountingorder.d.ts +36 -0
- package/sdk/models/operations/createaccountingorder.d.ts.map +1 -0
- package/sdk/models/operations/createaccountingorder.js +66 -0
- package/sdk/models/operations/createaccountingorder.js.map +1 -0
- package/sdk/models/operations/getaccountingorder.d.ts +38 -0
- package/sdk/models/operations/getaccountingorder.d.ts.map +1 -0
- package/sdk/models/operations/getaccountingorder.js +63 -0
- package/sdk/models/operations/getaccountingorder.js.map +1 -0
- package/sdk/models/operations/getunifiedintegrationauth.d.ts +6 -0
- package/sdk/models/operations/getunifiedintegrationauth.d.ts.map +1 -1
- package/sdk/models/operations/getunifiedintegrationauth.js +2 -0
- package/sdk/models/operations/getunifiedintegrationauth.js.map +1 -1
- package/sdk/models/operations/index.d.ts +6 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +6 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listaccountingorders.d.ts +53 -0
- package/sdk/models/operations/listaccountingorders.d.ts.map +1 -0
- package/sdk/models/operations/listaccountingorders.js +78 -0
- package/sdk/models/operations/listaccountingorders.js.map +1 -0
- package/sdk/models/operations/patchaccountingorder.d.ts +41 -0
- package/sdk/models/operations/patchaccountingorder.d.ts.map +1 -0
- package/sdk/models/operations/patchaccountingorder.js +68 -0
- package/sdk/models/operations/patchaccountingorder.js.map +1 -0
- package/sdk/models/operations/removeaccountingorder.d.ts +33 -0
- package/sdk/models/operations/removeaccountingorder.d.ts.map +1 -0
- package/sdk/models/operations/removeaccountingorder.js +61 -0
- package/sdk/models/operations/removeaccountingorder.js.map +1 -0
- package/sdk/models/operations/updateaccountingorder.d.ts +41 -0
- package/sdk/models/operations/updateaccountingorder.d.ts.map +1 -0
- package/sdk/models/operations/updateaccountingorder.js +68 -0
- package/sdk/models/operations/updateaccountingorder.js.map +1 -0
- package/sdk/models/shared/accountinginvoice.d.ts +29 -0
- package/sdk/models/shared/accountinginvoice.d.ts.map +1 -1
- package/sdk/models/shared/accountinginvoice.js +27 -1
- package/sdk/models/shared/accountinginvoice.js.map +1 -1
- package/sdk/models/shared/accountingorder.d.ts +122 -0
- package/sdk/models/shared/accountingorder.d.ts.map +1 -0
- package/sdk/models/shared/accountingorder.js +147 -0
- package/sdk/models/shared/accountingorder.js.map +1 -0
- package/sdk/models/shared/index.d.ts +3 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +3 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/paymentlink.d.ts +2 -0
- package/sdk/models/shared/paymentlink.d.ts.map +1 -1
- package/sdk/models/shared/paymentlink.js +4 -0
- package/sdk/models/shared/paymentlink.js.map +1 -1
- package/sdk/models/shared/propertyaccountingorderbillingaddress.d.ts +39 -0
- package/sdk/models/shared/propertyaccountingorderbillingaddress.d.ts.map +1 -0
- package/sdk/models/shared/propertyaccountingorderbillingaddress.js +77 -0
- package/sdk/models/shared/propertyaccountingorderbillingaddress.js.map +1 -0
- package/sdk/models/shared/propertyaccountingordershippingaddress.d.ts +39 -0
- package/sdk/models/shared/propertyaccountingordershippingaddress.d.ts.map +1 -0
- package/sdk/models/shared/propertyaccountingordershippingaddress.js +77 -0
- package/sdk/models/shared/propertyaccountingordershippingaddress.js.map +1 -0
- package/sdk/models/shared/propertyconnectionpermissions.d.ts +6 -0
- package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
- package/sdk/models/shared/propertyconnectionpermissions.js +2 -0
- package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
- package/sdk/models/shared/webhook.d.ts +3 -0
- package/sdk/models/shared/webhook.d.ts.map +1 -1
- package/sdk/models/shared/webhook.js +1 -0
- package/sdk/models/shared/webhook.js.map +1 -1
- package/sdk/order.d.ts +30 -0
- package/sdk/order.d.ts.map +1 -0
- package/sdk/order.js +54 -0
- package/sdk/order.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +5 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/accountingCreateAccountingOrder.ts +126 -0
- package/src/funcs/accountingGetAccountingOrder.ts +128 -0
- package/src/funcs/accountingListAccountingOrders.ts +133 -0
- package/src/funcs/accountingPatchAccountingOrder.ts +130 -0
- package/src/funcs/accountingRemoveAccountingOrder.ts +124 -0
- package/src/funcs/accountingUpdateAccountingOrder.ts +130 -0
- package/src/funcs/orderCreateAccountingOrder.ts +126 -0
- package/src/funcs/orderGetAccountingOrder.ts +128 -0
- package/src/funcs/orderListAccountingOrders.ts +133 -0
- package/src/funcs/orderPatchAccountingOrder.ts +130 -0
- package/src/funcs/orderRemoveAccountingOrder.ts +124 -0
- package/src/funcs/orderUpdateAccountingOrder.ts +130 -0
- package/src/lib/config.ts +3 -3
- package/src/sdk/accounting.ts +90 -0
- package/src/sdk/models/operations/createaccountingorder.ts +71 -0
- package/src/sdk/models/operations/getaccountingorder.ts +71 -0
- package/src/sdk/models/operations/getunifiedintegrationauth.ts +2 -0
- package/src/sdk/models/operations/index.ts +6 -0
- package/src/sdk/models/operations/listaccountingorders.ts +101 -0
- package/src/sdk/models/operations/patchaccountingorder.ts +78 -0
- package/src/sdk/models/operations/removeaccountingorder.ts +64 -0
- package/src/sdk/models/operations/updateaccountingorder.ts +78 -0
- package/src/sdk/models/shared/accountinginvoice.ts +38 -0
- package/src/sdk/models/shared/accountingorder.ts +200 -0
- package/src/sdk/models/shared/index.ts +3 -0
- package/src/sdk/models/shared/paymentlink.ts +6 -0
- package/src/sdk/models/shared/propertyaccountingorderbillingaddress.ts +88 -0
- package/src/sdk/models/shared/propertyaccountingordershippingaddress.ts +88 -0
- package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
- package/src/sdk/models/shared/webhook.ts +1 -0
- package/src/sdk/order.ts +100 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
|
|
8
|
+
export type RemoveAccountingOrderRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* ID of the connection
|
|
11
|
+
*/
|
|
12
|
+
connectionId: string;
|
|
13
|
+
/**
|
|
14
|
+
* ID of the Order
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const RemoveAccountingOrderRequest$inboundSchema: z.ZodType<
|
|
21
|
+
RemoveAccountingOrderRequest,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.object({
|
|
25
|
+
connection_id: z.string(),
|
|
26
|
+
id: z.string(),
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
"connection_id": "connectionId",
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type RemoveAccountingOrderRequest$Outbound = {
|
|
35
|
+
connection_id: string;
|
|
36
|
+
id: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const RemoveAccountingOrderRequest$outboundSchema: z.ZodType<
|
|
41
|
+
RemoveAccountingOrderRequest$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
RemoveAccountingOrderRequest
|
|
44
|
+
> = z.object({
|
|
45
|
+
connectionId: z.string(),
|
|
46
|
+
id: z.string(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
connectionId: "connection_id",
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
|
+
*/
|
|
57
|
+
export namespace RemoveAccountingOrderRequest$ {
|
|
58
|
+
/** @deprecated use `RemoveAccountingOrderRequest$inboundSchema` instead. */
|
|
59
|
+
export const inboundSchema = RemoveAccountingOrderRequest$inboundSchema;
|
|
60
|
+
/** @deprecated use `RemoveAccountingOrderRequest$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema = RemoveAccountingOrderRequest$outboundSchema;
|
|
62
|
+
/** @deprecated use `RemoveAccountingOrderRequest$Outbound` instead. */
|
|
63
|
+
export type Outbound = RemoveAccountingOrderRequest$Outbound;
|
|
64
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 * as shared from "../shared/index.js";
|
|
8
|
+
|
|
9
|
+
export type UpdateAccountingOrderRequest = {
|
|
10
|
+
accountingOrder?: shared.AccountingOrder | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* ID of the connection
|
|
13
|
+
*/
|
|
14
|
+
connectionId: string;
|
|
15
|
+
/**
|
|
16
|
+
* Comma-delimited fields to return
|
|
17
|
+
*/
|
|
18
|
+
fields?: Array<string> | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* ID of the Order
|
|
21
|
+
*/
|
|
22
|
+
id: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const UpdateAccountingOrderRequest$inboundSchema: z.ZodType<
|
|
27
|
+
UpdateAccountingOrderRequest,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
AccountingOrder: shared.AccountingOrder$inboundSchema.optional(),
|
|
32
|
+
connection_id: z.string(),
|
|
33
|
+
fields: z.array(z.string()).optional(),
|
|
34
|
+
id: z.string(),
|
|
35
|
+
}).transform((v) => {
|
|
36
|
+
return remap$(v, {
|
|
37
|
+
"AccountingOrder": "accountingOrder",
|
|
38
|
+
"connection_id": "connectionId",
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type UpdateAccountingOrderRequest$Outbound = {
|
|
44
|
+
AccountingOrder?: shared.AccountingOrder$Outbound | undefined;
|
|
45
|
+
connection_id: string;
|
|
46
|
+
fields?: Array<string> | undefined;
|
|
47
|
+
id: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const UpdateAccountingOrderRequest$outboundSchema: z.ZodType<
|
|
52
|
+
UpdateAccountingOrderRequest$Outbound,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
UpdateAccountingOrderRequest
|
|
55
|
+
> = z.object({
|
|
56
|
+
accountingOrder: shared.AccountingOrder$outboundSchema.optional(),
|
|
57
|
+
connectionId: z.string(),
|
|
58
|
+
fields: z.array(z.string()).optional(),
|
|
59
|
+
id: z.string(),
|
|
60
|
+
}).transform((v) => {
|
|
61
|
+
return remap$(v, {
|
|
62
|
+
accountingOrder: "AccountingOrder",
|
|
63
|
+
connectionId: "connection_id",
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
70
|
+
*/
|
|
71
|
+
export namespace UpdateAccountingOrderRequest$ {
|
|
72
|
+
/** @deprecated use `UpdateAccountingOrderRequest$inboundSchema` instead. */
|
|
73
|
+
export const inboundSchema = UpdateAccountingOrderRequest$inboundSchema;
|
|
74
|
+
/** @deprecated use `UpdateAccountingOrderRequest$outboundSchema` instead. */
|
|
75
|
+
export const outboundSchema = UpdateAccountingOrderRequest$outboundSchema;
|
|
76
|
+
/** @deprecated use `UpdateAccountingOrderRequest$Outbound` instead. */
|
|
77
|
+
export type Outbound = UpdateAccountingOrderRequest$Outbound;
|
|
78
|
+
}
|
|
@@ -33,6 +33,12 @@ export type AccountingInvoiceStatus = ClosedEnum<
|
|
|
33
33
|
typeof AccountingInvoiceStatus
|
|
34
34
|
>;
|
|
35
35
|
|
|
36
|
+
export const AccountingInvoiceType = {
|
|
37
|
+
Bill: "BILL",
|
|
38
|
+
Invoice: "INVOICE",
|
|
39
|
+
} as const;
|
|
40
|
+
export type AccountingInvoiceType = ClosedEnum<typeof AccountingInvoiceType>;
|
|
41
|
+
|
|
36
42
|
export type AccountingInvoice = {
|
|
37
43
|
balanceAmount?: number | undefined;
|
|
38
44
|
cancelledAt?: Date | undefined;
|
|
@@ -42,6 +48,7 @@ export type AccountingInvoice = {
|
|
|
42
48
|
discountAmount?: number | undefined;
|
|
43
49
|
dueAt?: Date | undefined;
|
|
44
50
|
id?: string | undefined;
|
|
51
|
+
invoiceAt?: Date | undefined;
|
|
45
52
|
invoiceNumber?: string | undefined;
|
|
46
53
|
lineitems?: Array<AccountingLineitem> | undefined;
|
|
47
54
|
notes?: string | undefined;
|
|
@@ -55,6 +62,7 @@ export type AccountingInvoice = {
|
|
|
55
62
|
status?: AccountingInvoiceStatus | undefined;
|
|
56
63
|
taxAmount?: number | undefined;
|
|
57
64
|
totalAmount?: number | undefined;
|
|
65
|
+
type?: AccountingInvoiceType | undefined;
|
|
58
66
|
updatedAt?: Date | undefined;
|
|
59
67
|
url?: string | undefined;
|
|
60
68
|
};
|
|
@@ -101,6 +109,27 @@ export namespace AccountingInvoiceStatus$ {
|
|
|
101
109
|
export const outboundSchema = AccountingInvoiceStatus$outboundSchema;
|
|
102
110
|
}
|
|
103
111
|
|
|
112
|
+
/** @internal */
|
|
113
|
+
export const AccountingInvoiceType$inboundSchema: z.ZodNativeEnum<
|
|
114
|
+
typeof AccountingInvoiceType
|
|
115
|
+
> = z.nativeEnum(AccountingInvoiceType);
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const AccountingInvoiceType$outboundSchema: z.ZodNativeEnum<
|
|
119
|
+
typeof AccountingInvoiceType
|
|
120
|
+
> = AccountingInvoiceType$inboundSchema;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @internal
|
|
124
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
125
|
+
*/
|
|
126
|
+
export namespace AccountingInvoiceType$ {
|
|
127
|
+
/** @deprecated use `AccountingInvoiceType$inboundSchema` instead. */
|
|
128
|
+
export const inboundSchema = AccountingInvoiceType$inboundSchema;
|
|
129
|
+
/** @deprecated use `AccountingInvoiceType$outboundSchema` instead. */
|
|
130
|
+
export const outboundSchema = AccountingInvoiceType$outboundSchema;
|
|
131
|
+
}
|
|
132
|
+
|
|
104
133
|
/** @internal */
|
|
105
134
|
export const AccountingInvoice$inboundSchema: z.ZodType<
|
|
106
135
|
AccountingInvoice,
|
|
@@ -119,6 +148,8 @@ export const AccountingInvoice$inboundSchema: z.ZodType<
|
|
|
119
148
|
due_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
120
149
|
.optional(),
|
|
121
150
|
id: z.string().optional(),
|
|
151
|
+
invoice_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
152
|
+
.optional(),
|
|
122
153
|
invoice_number: z.string().optional(),
|
|
123
154
|
lineitems: z.array(AccountingLineitem$inboundSchema).optional(),
|
|
124
155
|
notes: z.string().optional(),
|
|
@@ -134,6 +165,7 @@ export const AccountingInvoice$inboundSchema: z.ZodType<
|
|
|
134
165
|
status: AccountingInvoiceStatus$inboundSchema.optional(),
|
|
135
166
|
tax_amount: z.number().optional(),
|
|
136
167
|
total_amount: z.number().optional(),
|
|
168
|
+
type: AccountingInvoiceType$inboundSchema.optional(),
|
|
137
169
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
138
170
|
.optional(),
|
|
139
171
|
url: z.string().optional(),
|
|
@@ -145,6 +177,7 @@ export const AccountingInvoice$inboundSchema: z.ZodType<
|
|
|
145
177
|
"created_at": "createdAt",
|
|
146
178
|
"discount_amount": "discountAmount",
|
|
147
179
|
"due_at": "dueAt",
|
|
180
|
+
"invoice_at": "invoiceAt",
|
|
148
181
|
"invoice_number": "invoiceNumber",
|
|
149
182
|
"paid_amount": "paidAmount",
|
|
150
183
|
"paid_at": "paidAt",
|
|
@@ -168,6 +201,7 @@ export type AccountingInvoice$Outbound = {
|
|
|
168
201
|
discount_amount?: number | undefined;
|
|
169
202
|
due_at?: string | undefined;
|
|
170
203
|
id?: string | undefined;
|
|
204
|
+
invoice_at?: string | undefined;
|
|
171
205
|
invoice_number?: string | undefined;
|
|
172
206
|
lineitems?: Array<AccountingLineitem$Outbound> | undefined;
|
|
173
207
|
notes?: string | undefined;
|
|
@@ -181,6 +215,7 @@ export type AccountingInvoice$Outbound = {
|
|
|
181
215
|
status?: string | undefined;
|
|
182
216
|
tax_amount?: number | undefined;
|
|
183
217
|
total_amount?: number | undefined;
|
|
218
|
+
type?: string | undefined;
|
|
184
219
|
updated_at?: string | undefined;
|
|
185
220
|
url?: string | undefined;
|
|
186
221
|
};
|
|
@@ -199,6 +234,7 @@ export const AccountingInvoice$outboundSchema: z.ZodType<
|
|
|
199
234
|
discountAmount: z.number().optional(),
|
|
200
235
|
dueAt: z.date().transform(v => v.toISOString()).optional(),
|
|
201
236
|
id: z.string().optional(),
|
|
237
|
+
invoiceAt: z.date().transform(v => v.toISOString()).optional(),
|
|
202
238
|
invoiceNumber: z.string().optional(),
|
|
203
239
|
lineitems: z.array(AccountingLineitem$outboundSchema).optional(),
|
|
204
240
|
notes: z.string().optional(),
|
|
@@ -212,6 +248,7 @@ export const AccountingInvoice$outboundSchema: z.ZodType<
|
|
|
212
248
|
status: AccountingInvoiceStatus$outboundSchema.optional(),
|
|
213
249
|
taxAmount: z.number().optional(),
|
|
214
250
|
totalAmount: z.number().optional(),
|
|
251
|
+
type: AccountingInvoiceType$outboundSchema.optional(),
|
|
215
252
|
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
216
253
|
url: z.string().optional(),
|
|
217
254
|
}).transform((v) => {
|
|
@@ -222,6 +259,7 @@ export const AccountingInvoice$outboundSchema: z.ZodType<
|
|
|
222
259
|
createdAt: "created_at",
|
|
223
260
|
discountAmount: "discount_amount",
|
|
224
261
|
dueAt: "due_at",
|
|
262
|
+
invoiceAt: "invoice_at",
|
|
225
263
|
invoiceNumber: "invoice_number",
|
|
226
264
|
paidAmount: "paid_amount",
|
|
227
265
|
paidAt: "paid_at",
|
|
@@ -0,0 +1,200 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import {
|
|
9
|
+
AccountingLineitem,
|
|
10
|
+
AccountingLineitem$inboundSchema,
|
|
11
|
+
AccountingLineitem$Outbound,
|
|
12
|
+
AccountingLineitem$outboundSchema,
|
|
13
|
+
} from "./accountinglineitem.js";
|
|
14
|
+
import {
|
|
15
|
+
PropertyAccountingOrderBillingAddress,
|
|
16
|
+
PropertyAccountingOrderBillingAddress$inboundSchema,
|
|
17
|
+
PropertyAccountingOrderBillingAddress$Outbound,
|
|
18
|
+
PropertyAccountingOrderBillingAddress$outboundSchema,
|
|
19
|
+
} from "./propertyaccountingorderbillingaddress.js";
|
|
20
|
+
import {
|
|
21
|
+
PropertyAccountingOrderShippingAddress,
|
|
22
|
+
PropertyAccountingOrderShippingAddress$inboundSchema,
|
|
23
|
+
PropertyAccountingOrderShippingAddress$Outbound,
|
|
24
|
+
PropertyAccountingOrderShippingAddress$outboundSchema,
|
|
25
|
+
} from "./propertyaccountingordershippingaddress.js";
|
|
26
|
+
|
|
27
|
+
export const AccountingOrderStatus = {
|
|
28
|
+
Draft: "DRAFT",
|
|
29
|
+
Voided: "VOIDED",
|
|
30
|
+
Authorized: "AUTHORIZED",
|
|
31
|
+
Paid: "PAID",
|
|
32
|
+
PartiallyPaid: "PARTIALLY_PAID",
|
|
33
|
+
PartiallyRefunded: "PARTIALLY_REFUNDED",
|
|
34
|
+
Refunded: "REFUNDED",
|
|
35
|
+
} as const;
|
|
36
|
+
export type AccountingOrderStatus = ClosedEnum<typeof AccountingOrderStatus>;
|
|
37
|
+
|
|
38
|
+
export const AccountingOrderType = {
|
|
39
|
+
Sales: "SALES",
|
|
40
|
+
Purchase: "PURCHASE",
|
|
41
|
+
} as const;
|
|
42
|
+
export type AccountingOrderType = ClosedEnum<typeof AccountingOrderType>;
|
|
43
|
+
|
|
44
|
+
export type AccountingOrder = {
|
|
45
|
+
accountId?: string | undefined;
|
|
46
|
+
billingAddress?: PropertyAccountingOrderBillingAddress | undefined;
|
|
47
|
+
contactId?: string | undefined;
|
|
48
|
+
createdAt?: Date | undefined;
|
|
49
|
+
currency?: string | undefined;
|
|
50
|
+
id?: string | undefined;
|
|
51
|
+
lineitems?: Array<AccountingLineitem> | undefined;
|
|
52
|
+
raw?: { [k: string]: any } | undefined;
|
|
53
|
+
shippingAddress?: PropertyAccountingOrderShippingAddress | undefined;
|
|
54
|
+
status?: AccountingOrderStatus | undefined;
|
|
55
|
+
totalAmount?: number | undefined;
|
|
56
|
+
type?: AccountingOrderType | undefined;
|
|
57
|
+
updatedAt?: Date | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const AccountingOrderStatus$inboundSchema: z.ZodNativeEnum<
|
|
62
|
+
typeof AccountingOrderStatus
|
|
63
|
+
> = z.nativeEnum(AccountingOrderStatus);
|
|
64
|
+
|
|
65
|
+
/** @internal */
|
|
66
|
+
export const AccountingOrderStatus$outboundSchema: z.ZodNativeEnum<
|
|
67
|
+
typeof AccountingOrderStatus
|
|
68
|
+
> = AccountingOrderStatus$inboundSchema;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
73
|
+
*/
|
|
74
|
+
export namespace AccountingOrderStatus$ {
|
|
75
|
+
/** @deprecated use `AccountingOrderStatus$inboundSchema` instead. */
|
|
76
|
+
export const inboundSchema = AccountingOrderStatus$inboundSchema;
|
|
77
|
+
/** @deprecated use `AccountingOrderStatus$outboundSchema` instead. */
|
|
78
|
+
export const outboundSchema = AccountingOrderStatus$outboundSchema;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** @internal */
|
|
82
|
+
export const AccountingOrderType$inboundSchema: z.ZodNativeEnum<
|
|
83
|
+
typeof AccountingOrderType
|
|
84
|
+
> = z.nativeEnum(AccountingOrderType);
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const AccountingOrderType$outboundSchema: z.ZodNativeEnum<
|
|
88
|
+
typeof AccountingOrderType
|
|
89
|
+
> = AccountingOrderType$inboundSchema;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
94
|
+
*/
|
|
95
|
+
export namespace AccountingOrderType$ {
|
|
96
|
+
/** @deprecated use `AccountingOrderType$inboundSchema` instead. */
|
|
97
|
+
export const inboundSchema = AccountingOrderType$inboundSchema;
|
|
98
|
+
/** @deprecated use `AccountingOrderType$outboundSchema` instead. */
|
|
99
|
+
export const outboundSchema = AccountingOrderType$outboundSchema;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const AccountingOrder$inboundSchema: z.ZodType<
|
|
104
|
+
AccountingOrder,
|
|
105
|
+
z.ZodTypeDef,
|
|
106
|
+
unknown
|
|
107
|
+
> = z.object({
|
|
108
|
+
account_id: z.string().optional(),
|
|
109
|
+
billing_address: PropertyAccountingOrderBillingAddress$inboundSchema
|
|
110
|
+
.optional(),
|
|
111
|
+
contact_id: z.string().optional(),
|
|
112
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
113
|
+
.optional(),
|
|
114
|
+
currency: z.string().optional(),
|
|
115
|
+
id: z.string().optional(),
|
|
116
|
+
lineitems: z.array(AccountingLineitem$inboundSchema).optional(),
|
|
117
|
+
raw: z.record(z.any()).optional(),
|
|
118
|
+
shipping_address: PropertyAccountingOrderShippingAddress$inboundSchema
|
|
119
|
+
.optional(),
|
|
120
|
+
status: AccountingOrderStatus$inboundSchema.optional(),
|
|
121
|
+
total_amount: z.number().optional(),
|
|
122
|
+
type: AccountingOrderType$inboundSchema.optional(),
|
|
123
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
124
|
+
.optional(),
|
|
125
|
+
}).transform((v) => {
|
|
126
|
+
return remap$(v, {
|
|
127
|
+
"account_id": "accountId",
|
|
128
|
+
"billing_address": "billingAddress",
|
|
129
|
+
"contact_id": "contactId",
|
|
130
|
+
"created_at": "createdAt",
|
|
131
|
+
"shipping_address": "shippingAddress",
|
|
132
|
+
"total_amount": "totalAmount",
|
|
133
|
+
"updated_at": "updatedAt",
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
export type AccountingOrder$Outbound = {
|
|
139
|
+
account_id?: string | undefined;
|
|
140
|
+
billing_address?: PropertyAccountingOrderBillingAddress$Outbound | undefined;
|
|
141
|
+
contact_id?: string | undefined;
|
|
142
|
+
created_at?: string | undefined;
|
|
143
|
+
currency?: string | undefined;
|
|
144
|
+
id?: string | undefined;
|
|
145
|
+
lineitems?: Array<AccountingLineitem$Outbound> | undefined;
|
|
146
|
+
raw?: { [k: string]: any } | undefined;
|
|
147
|
+
shipping_address?:
|
|
148
|
+
| PropertyAccountingOrderShippingAddress$Outbound
|
|
149
|
+
| undefined;
|
|
150
|
+
status?: string | undefined;
|
|
151
|
+
total_amount?: number | undefined;
|
|
152
|
+
type?: string | undefined;
|
|
153
|
+
updated_at?: string | undefined;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
/** @internal */
|
|
157
|
+
export const AccountingOrder$outboundSchema: z.ZodType<
|
|
158
|
+
AccountingOrder$Outbound,
|
|
159
|
+
z.ZodTypeDef,
|
|
160
|
+
AccountingOrder
|
|
161
|
+
> = z.object({
|
|
162
|
+
accountId: z.string().optional(),
|
|
163
|
+
billingAddress: PropertyAccountingOrderBillingAddress$outboundSchema
|
|
164
|
+
.optional(),
|
|
165
|
+
contactId: z.string().optional(),
|
|
166
|
+
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
167
|
+
currency: z.string().optional(),
|
|
168
|
+
id: z.string().optional(),
|
|
169
|
+
lineitems: z.array(AccountingLineitem$outboundSchema).optional(),
|
|
170
|
+
raw: z.record(z.any()).optional(),
|
|
171
|
+
shippingAddress: PropertyAccountingOrderShippingAddress$outboundSchema
|
|
172
|
+
.optional(),
|
|
173
|
+
status: AccountingOrderStatus$outboundSchema.optional(),
|
|
174
|
+
totalAmount: z.number().optional(),
|
|
175
|
+
type: AccountingOrderType$outboundSchema.optional(),
|
|
176
|
+
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
177
|
+
}).transform((v) => {
|
|
178
|
+
return remap$(v, {
|
|
179
|
+
accountId: "account_id",
|
|
180
|
+
billingAddress: "billing_address",
|
|
181
|
+
contactId: "contact_id",
|
|
182
|
+
createdAt: "created_at",
|
|
183
|
+
shippingAddress: "shipping_address",
|
|
184
|
+
totalAmount: "total_amount",
|
|
185
|
+
updatedAt: "updated_at",
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* @internal
|
|
191
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
192
|
+
*/
|
|
193
|
+
export namespace AccountingOrder$ {
|
|
194
|
+
/** @deprecated use `AccountingOrder$inboundSchema` instead. */
|
|
195
|
+
export const inboundSchema = AccountingOrder$inboundSchema;
|
|
196
|
+
/** @deprecated use `AccountingOrder$outboundSchema` instead. */
|
|
197
|
+
export const outboundSchema = AccountingOrder$outboundSchema;
|
|
198
|
+
/** @deprecated use `AccountingOrder$Outbound` instead. */
|
|
199
|
+
export type Outbound = AccountingOrder$Outbound;
|
|
200
|
+
}
|
|
@@ -10,6 +10,7 @@ export * from "./accountinginvoice.js";
|
|
|
10
10
|
export * from "./accountingjournal.js";
|
|
11
11
|
export * from "./accountingjournallineitem.js";
|
|
12
12
|
export * from "./accountinglineitem.js";
|
|
13
|
+
export * from "./accountingorder.js";
|
|
13
14
|
export * from "./accountingorganization.js";
|
|
14
15
|
export * from "./accountingtaxrate.js";
|
|
15
16
|
export * from "./accountingtelephone.js";
|
|
@@ -91,6 +92,8 @@ export * from "./paymentpayout.js";
|
|
|
91
92
|
export * from "./paymentrefund.js";
|
|
92
93
|
export * from "./propertyaccountingcontactbillingaddress.js";
|
|
93
94
|
export * from "./propertyaccountingcontactshippingaddress.js";
|
|
95
|
+
export * from "./propertyaccountingorderbillingaddress.js";
|
|
96
|
+
export * from "./propertyaccountingordershippingaddress.js";
|
|
94
97
|
export * from "./propertyaccountingorganizationaddress.js";
|
|
95
98
|
export * from "./propertyatsactivityfrom.js";
|
|
96
99
|
export * from "./propertyatscandidateaddress.js";
|
|
@@ -22,6 +22,7 @@ export type PaymentLink = {
|
|
|
22
22
|
lineitems?: Array<PaymentLinkLineitem> | undefined;
|
|
23
23
|
paymentId?: string | undefined;
|
|
24
24
|
raw?: { [k: string]: any } | undefined;
|
|
25
|
+
successUrl?: string | undefined;
|
|
25
26
|
updatedAt?: Date | undefined;
|
|
26
27
|
url?: string | undefined;
|
|
27
28
|
};
|
|
@@ -43,6 +44,7 @@ export const PaymentLink$inboundSchema: z.ZodType<
|
|
|
43
44
|
lineitems: z.array(PaymentLinkLineitem$inboundSchema).optional(),
|
|
44
45
|
payment_id: z.string().optional(),
|
|
45
46
|
raw: z.record(z.any()).optional(),
|
|
47
|
+
success_url: z.string().optional(),
|
|
46
48
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
47
49
|
.optional(),
|
|
48
50
|
url: z.string().optional(),
|
|
@@ -53,6 +55,7 @@ export const PaymentLink$inboundSchema: z.ZodType<
|
|
|
53
55
|
"is_active": "isActive",
|
|
54
56
|
"is_chargeable_now": "isChargeableNow",
|
|
55
57
|
"payment_id": "paymentId",
|
|
58
|
+
"success_url": "successUrl",
|
|
56
59
|
"updated_at": "updatedAt",
|
|
57
60
|
});
|
|
58
61
|
});
|
|
@@ -69,6 +72,7 @@ export type PaymentLink$Outbound = {
|
|
|
69
72
|
lineitems?: Array<PaymentLinkLineitem$Outbound> | undefined;
|
|
70
73
|
payment_id?: string | undefined;
|
|
71
74
|
raw?: { [k: string]: any } | undefined;
|
|
75
|
+
success_url?: string | undefined;
|
|
72
76
|
updated_at?: string | undefined;
|
|
73
77
|
url?: string | undefined;
|
|
74
78
|
};
|
|
@@ -89,6 +93,7 @@ export const PaymentLink$outboundSchema: z.ZodType<
|
|
|
89
93
|
lineitems: z.array(PaymentLinkLineitem$outboundSchema).optional(),
|
|
90
94
|
paymentId: z.string().optional(),
|
|
91
95
|
raw: z.record(z.any()).optional(),
|
|
96
|
+
successUrl: z.string().optional(),
|
|
92
97
|
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
93
98
|
url: z.string().optional(),
|
|
94
99
|
}).transform((v) => {
|
|
@@ -98,6 +103,7 @@ export const PaymentLink$outboundSchema: z.ZodType<
|
|
|
98
103
|
isActive: "is_active",
|
|
99
104
|
isChargeableNow: "is_chargeable_now",
|
|
100
105
|
paymentId: "payment_id",
|
|
106
|
+
successUrl: "success_url",
|
|
101
107
|
updatedAt: "updated_at",
|
|
102
108
|
});
|
|
103
109
|
});
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
|
|
8
|
+
export type PropertyAccountingOrderBillingAddress = {
|
|
9
|
+
address1?: string | undefined;
|
|
10
|
+
address2?: string | undefined;
|
|
11
|
+
city?: string | undefined;
|
|
12
|
+
country?: string | undefined;
|
|
13
|
+
countryCode?: string | undefined;
|
|
14
|
+
postalCode?: string | undefined;
|
|
15
|
+
region?: string | undefined;
|
|
16
|
+
regionCode?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const PropertyAccountingOrderBillingAddress$inboundSchema: z.ZodType<
|
|
21
|
+
PropertyAccountingOrderBillingAddress,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.object({
|
|
25
|
+
address1: z.string().optional(),
|
|
26
|
+
address2: z.string().optional(),
|
|
27
|
+
city: z.string().optional(),
|
|
28
|
+
country: z.string().optional(),
|
|
29
|
+
country_code: z.string().optional(),
|
|
30
|
+
postal_code: z.string().optional(),
|
|
31
|
+
region: z.string().optional(),
|
|
32
|
+
region_code: z.string().optional(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"country_code": "countryCode",
|
|
36
|
+
"postal_code": "postalCode",
|
|
37
|
+
"region_code": "regionCode",
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export type PropertyAccountingOrderBillingAddress$Outbound = {
|
|
43
|
+
address1?: string | undefined;
|
|
44
|
+
address2?: string | undefined;
|
|
45
|
+
city?: string | undefined;
|
|
46
|
+
country?: string | undefined;
|
|
47
|
+
country_code?: string | undefined;
|
|
48
|
+
postal_code?: string | undefined;
|
|
49
|
+
region?: string | undefined;
|
|
50
|
+
region_code?: string | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const PropertyAccountingOrderBillingAddress$outboundSchema: z.ZodType<
|
|
55
|
+
PropertyAccountingOrderBillingAddress$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
PropertyAccountingOrderBillingAddress
|
|
58
|
+
> = z.object({
|
|
59
|
+
address1: z.string().optional(),
|
|
60
|
+
address2: z.string().optional(),
|
|
61
|
+
city: z.string().optional(),
|
|
62
|
+
country: z.string().optional(),
|
|
63
|
+
countryCode: z.string().optional(),
|
|
64
|
+
postalCode: z.string().optional(),
|
|
65
|
+
region: z.string().optional(),
|
|
66
|
+
regionCode: z.string().optional(),
|
|
67
|
+
}).transform((v) => {
|
|
68
|
+
return remap$(v, {
|
|
69
|
+
countryCode: "country_code",
|
|
70
|
+
postalCode: "postal_code",
|
|
71
|
+
regionCode: "region_code",
|
|
72
|
+
});
|
|
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 PropertyAccountingOrderBillingAddress$ {
|
|
80
|
+
/** @deprecated use `PropertyAccountingOrderBillingAddress$inboundSchema` instead. */
|
|
81
|
+
export const inboundSchema =
|
|
82
|
+
PropertyAccountingOrderBillingAddress$inboundSchema;
|
|
83
|
+
/** @deprecated use `PropertyAccountingOrderBillingAddress$outboundSchema` instead. */
|
|
84
|
+
export const outboundSchema =
|
|
85
|
+
PropertyAccountingOrderBillingAddress$outboundSchema;
|
|
86
|
+
/** @deprecated use `PropertyAccountingOrderBillingAddress$Outbound` instead. */
|
|
87
|
+
export type Outbound = PropertyAccountingOrderBillingAddress$Outbound;
|
|
88
|
+
}
|