@unified-api/typescript-sdk 2.78.0 → 2.79.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 +5 -1
- package/docs/sdks/accounting/README.md +158 -0
- package/docs/sdks/cashflow/README.md +165 -0
- package/examples/package-lock.json +1 -1
- package/funcs/accountingGetAccountingCashflow.d.ts +15 -0
- package/funcs/accountingGetAccountingCashflow.d.ts.map +1 -0
- package/funcs/accountingGetAccountingCashflow.js +125 -0
- package/funcs/accountingGetAccountingCashflow.js.map +1 -0
- package/funcs/accountingListAccountingCashflows.d.ts +15 -0
- package/funcs/accountingListAccountingCashflows.d.ts.map +1 -0
- package/funcs/accountingListAccountingCashflows.js +133 -0
- package/funcs/accountingListAccountingCashflows.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/package.json +1 -1
- package/sdk/accounting.d.ts +8 -0
- package/sdk/accounting.d.ts.map +1 -1
- package/sdk/accounting.js +14 -0
- package/sdk/accounting.js.map +1 -1
- package/sdk/cashflow.d.ts +14 -0
- package/sdk/cashflow.d.ts.map +1 -0
- package/sdk/cashflow.js +26 -0
- package/sdk/cashflow.js.map +1 -0
- package/sdk/models/operations/getaccountingcashflow.d.ts +47 -0
- package/sdk/models/operations/getaccountingcashflow.d.ts.map +1 -0
- package/sdk/models/operations/getaccountingcashflow.js +84 -0
- package/sdk/models/operations/getaccountingcashflow.js.map +1 -0
- package/sdk/models/operations/index.d.ts +2 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +2 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listaccountingcashflows.d.ts +85 -0
- package/sdk/models/operations/listaccountingcashflows.d.ts.map +1 -0
- package/sdk/models/operations/listaccountingcashflows.js +116 -0
- package/sdk/models/operations/listaccountingcashflows.js.map +1 -0
- package/sdk/models/shared/accountingcashflow.d.ts +67 -0
- package/sdk/models/shared/accountingcashflow.d.ts.map +1 -0
- package/sdk/models/shared/accountingcashflow.js +141 -0
- package/sdk/models/shared/accountingcashflow.js.map +1 -0
- package/sdk/models/shared/accountingcashflowitem.d.ts +41 -0
- package/sdk/models/shared/accountingcashflowitem.d.ts.map +1 -0
- package/sdk/models/shared/accountingcashflowitem.js +93 -0
- package/sdk/models/shared/accountingcashflowitem.js.map +1 -0
- package/sdk/models/shared/accountingcashflowsection.d.ts +34 -0
- package/sdk/models/shared/accountingcashflowsection.d.ts.map +1 -0
- package/sdk/models/shared/accountingcashflowsection.js +85 -0
- package/sdk/models/shared/accountingcashflowsection.js.map +1 -0
- package/sdk/models/shared/calendareventrecurrence.d.ts +12 -4
- package/sdk/models/shared/calendareventrecurrence.d.ts.map +1 -1
- package/sdk/models/shared/calendareventrecurrence.js +8 -4
- package/sdk/models/shared/calendareventrecurrence.js.map +1 -1
- package/sdk/models/shared/index.d.ts +4 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +4 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/kmspagemetadata.d.ts +5 -0
- package/sdk/models/shared/kmspagemetadata.d.ts.map +1 -1
- package/sdk/models/shared/kmspagemetadata.js +5 -0
- package/sdk/models/shared/kmspagemetadata.js.map +1 -1
- package/sdk/models/shared/propertyaccountingcashflowitemsubitems.d.ts +25 -0
- package/sdk/models/shared/propertyaccountingcashflowitemsubitems.d.ts.map +1 -0
- package/sdk/models/shared/propertyaccountingcashflowitemsubitems.js +65 -0
- package/sdk/models/shared/propertyaccountingcashflowitemsubitems.js.map +1 -0
- package/sdk/models/shared/propertyconnectionpermissions.d.ts +2 -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 +1 -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/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/accountingGetAccountingCashflow.ts +176 -0
- package/src/funcs/accountingListAccountingCashflows.ts +182 -0
- package/src/lib/config.ts +3 -3
- package/src/sdk/accounting.ts +30 -0
- package/src/sdk/cashflow.ts +40 -0
- package/src/sdk/models/operations/getaccountingcashflow.ts +101 -0
- package/src/sdk/models/operations/index.ts +2 -0
- package/src/sdk/models/operations/listaccountingcashflows.ts +171 -0
- package/src/sdk/models/shared/accountingcashflow.ts +176 -0
- package/src/sdk/models/shared/accountingcashflowitem.ts +108 -0
- package/src/sdk/models/shared/accountingcashflowsection.ts +91 -0
- package/src/sdk/models/shared/calendareventrecurrence.ts +20 -8
- package/src/sdk/models/shared/index.ts +4 -0
- package/src/sdk/models/shared/kmspagemetadata.ts +5 -0
- package/src/sdk/models/shared/propertyaccountingcashflowitemsubitems.ts +64 -0
- package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
- package/src/sdk/models/shared/webhook.ts +1 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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
|
+
AccountingCashflowSection,
|
|
12
|
+
AccountingCashflowSection$inboundSchema,
|
|
13
|
+
AccountingCashflowSection$Outbound,
|
|
14
|
+
AccountingCashflowSection$outboundSchema,
|
|
15
|
+
} from "./accountingcashflowsection.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Sections
|
|
19
|
+
*/
|
|
20
|
+
export type AccountingCashflow = {
|
|
21
|
+
cashBeginningAmount?: number | undefined;
|
|
22
|
+
cashEndingAmount?: number | undefined;
|
|
23
|
+
categoryIds?: Array<string> | undefined;
|
|
24
|
+
contactId?: string | undefined;
|
|
25
|
+
createdAt?: Date | undefined;
|
|
26
|
+
currency?: string | undefined;
|
|
27
|
+
endAt?: Date | undefined;
|
|
28
|
+
financingSections?: Array<AccountingCashflowSection> | undefined;
|
|
29
|
+
id?: string | undefined;
|
|
30
|
+
investingSections?: Array<AccountingCashflowSection> | undefined;
|
|
31
|
+
name?: string | undefined;
|
|
32
|
+
netChangeInCashAmount?: number | undefined;
|
|
33
|
+
operatingSections?: Array<AccountingCashflowSection> | undefined;
|
|
34
|
+
raw?: { [k: string]: any } | undefined;
|
|
35
|
+
startAt?: Date | undefined;
|
|
36
|
+
updatedAt?: Date | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const AccountingCashflow$inboundSchema: z.ZodType<
|
|
41
|
+
AccountingCashflow,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.object({
|
|
45
|
+
cash_beginning_amount: z.number().optional(),
|
|
46
|
+
cash_ending_amount: z.number().optional(),
|
|
47
|
+
category_ids: z.array(z.string()).optional(),
|
|
48
|
+
contact_id: z.string().optional(),
|
|
49
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
50
|
+
.optional(),
|
|
51
|
+
currency: z.string().optional(),
|
|
52
|
+
end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
53
|
+
.optional(),
|
|
54
|
+
financing_sections: z.array(AccountingCashflowSection$inboundSchema)
|
|
55
|
+
.optional(),
|
|
56
|
+
id: z.string().optional(),
|
|
57
|
+
investing_sections: z.array(AccountingCashflowSection$inboundSchema)
|
|
58
|
+
.optional(),
|
|
59
|
+
name: z.string().optional(),
|
|
60
|
+
net_change_in_cash_amount: z.number().optional(),
|
|
61
|
+
operating_sections: z.array(AccountingCashflowSection$inboundSchema)
|
|
62
|
+
.optional(),
|
|
63
|
+
raw: z.record(z.any()).optional(),
|
|
64
|
+
start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
65
|
+
.optional(),
|
|
66
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
67
|
+
.optional(),
|
|
68
|
+
}).transform((v) => {
|
|
69
|
+
return remap$(v, {
|
|
70
|
+
"cash_beginning_amount": "cashBeginningAmount",
|
|
71
|
+
"cash_ending_amount": "cashEndingAmount",
|
|
72
|
+
"category_ids": "categoryIds",
|
|
73
|
+
"contact_id": "contactId",
|
|
74
|
+
"created_at": "createdAt",
|
|
75
|
+
"end_at": "endAt",
|
|
76
|
+
"financing_sections": "financingSections",
|
|
77
|
+
"investing_sections": "investingSections",
|
|
78
|
+
"net_change_in_cash_amount": "netChangeInCashAmount",
|
|
79
|
+
"operating_sections": "operatingSections",
|
|
80
|
+
"start_at": "startAt",
|
|
81
|
+
"updated_at": "updatedAt",
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export type AccountingCashflow$Outbound = {
|
|
87
|
+
cash_beginning_amount?: number | undefined;
|
|
88
|
+
cash_ending_amount?: number | undefined;
|
|
89
|
+
category_ids?: Array<string> | undefined;
|
|
90
|
+
contact_id?: string | undefined;
|
|
91
|
+
created_at?: string | undefined;
|
|
92
|
+
currency?: string | undefined;
|
|
93
|
+
end_at?: string | undefined;
|
|
94
|
+
financing_sections?: Array<AccountingCashflowSection$Outbound> | undefined;
|
|
95
|
+
id?: string | undefined;
|
|
96
|
+
investing_sections?: Array<AccountingCashflowSection$Outbound> | undefined;
|
|
97
|
+
name?: string | undefined;
|
|
98
|
+
net_change_in_cash_amount?: number | undefined;
|
|
99
|
+
operating_sections?: Array<AccountingCashflowSection$Outbound> | undefined;
|
|
100
|
+
raw?: { [k: string]: any } | undefined;
|
|
101
|
+
start_at?: string | undefined;
|
|
102
|
+
updated_at?: string | undefined;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export const AccountingCashflow$outboundSchema: z.ZodType<
|
|
107
|
+
AccountingCashflow$Outbound,
|
|
108
|
+
z.ZodTypeDef,
|
|
109
|
+
AccountingCashflow
|
|
110
|
+
> = z.object({
|
|
111
|
+
cashBeginningAmount: z.number().optional(),
|
|
112
|
+
cashEndingAmount: z.number().optional(),
|
|
113
|
+
categoryIds: z.array(z.string()).optional(),
|
|
114
|
+
contactId: z.string().optional(),
|
|
115
|
+
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
116
|
+
currency: z.string().optional(),
|
|
117
|
+
endAt: z.date().transform(v => v.toISOString()).optional(),
|
|
118
|
+
financingSections: z.array(AccountingCashflowSection$outboundSchema)
|
|
119
|
+
.optional(),
|
|
120
|
+
id: z.string().optional(),
|
|
121
|
+
investingSections: z.array(AccountingCashflowSection$outboundSchema)
|
|
122
|
+
.optional(),
|
|
123
|
+
name: z.string().optional(),
|
|
124
|
+
netChangeInCashAmount: z.number().optional(),
|
|
125
|
+
operatingSections: z.array(AccountingCashflowSection$outboundSchema)
|
|
126
|
+
.optional(),
|
|
127
|
+
raw: z.record(z.any()).optional(),
|
|
128
|
+
startAt: z.date().transform(v => v.toISOString()).optional(),
|
|
129
|
+
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
130
|
+
}).transform((v) => {
|
|
131
|
+
return remap$(v, {
|
|
132
|
+
cashBeginningAmount: "cash_beginning_amount",
|
|
133
|
+
cashEndingAmount: "cash_ending_amount",
|
|
134
|
+
categoryIds: "category_ids",
|
|
135
|
+
contactId: "contact_id",
|
|
136
|
+
createdAt: "created_at",
|
|
137
|
+
endAt: "end_at",
|
|
138
|
+
financingSections: "financing_sections",
|
|
139
|
+
investingSections: "investing_sections",
|
|
140
|
+
netChangeInCashAmount: "net_change_in_cash_amount",
|
|
141
|
+
operatingSections: "operating_sections",
|
|
142
|
+
startAt: "start_at",
|
|
143
|
+
updatedAt: "updated_at",
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @internal
|
|
149
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
150
|
+
*/
|
|
151
|
+
export namespace AccountingCashflow$ {
|
|
152
|
+
/** @deprecated use `AccountingCashflow$inboundSchema` instead. */
|
|
153
|
+
export const inboundSchema = AccountingCashflow$inboundSchema;
|
|
154
|
+
/** @deprecated use `AccountingCashflow$outboundSchema` instead. */
|
|
155
|
+
export const outboundSchema = AccountingCashflow$outboundSchema;
|
|
156
|
+
/** @deprecated use `AccountingCashflow$Outbound` instead. */
|
|
157
|
+
export type Outbound = AccountingCashflow$Outbound;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function accountingCashflowToJSON(
|
|
161
|
+
accountingCashflow: AccountingCashflow,
|
|
162
|
+
): string {
|
|
163
|
+
return JSON.stringify(
|
|
164
|
+
AccountingCashflow$outboundSchema.parse(accountingCashflow),
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export function accountingCashflowFromJSON(
|
|
169
|
+
jsonString: string,
|
|
170
|
+
): SafeParseResult<AccountingCashflow, SDKValidationError> {
|
|
171
|
+
return safeParse(
|
|
172
|
+
jsonString,
|
|
173
|
+
(x) => AccountingCashflow$inboundSchema.parse(JSON.parse(x)),
|
|
174
|
+
`Failed to parse 'AccountingCashflow' from JSON`,
|
|
175
|
+
);
|
|
176
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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
|
+
PropertyAccountingCashflowItemSubItems,
|
|
12
|
+
PropertyAccountingCashflowItemSubItems$inboundSchema,
|
|
13
|
+
PropertyAccountingCashflowItemSubItems$Outbound,
|
|
14
|
+
PropertyAccountingCashflowItemSubItems$outboundSchema,
|
|
15
|
+
} from "./propertyaccountingcashflowitemsubitems.js";
|
|
16
|
+
|
|
17
|
+
export type AccountingCashflowItem = {
|
|
18
|
+
accountId?: string | undefined;
|
|
19
|
+
amount?: number | undefined;
|
|
20
|
+
name?: string | undefined;
|
|
21
|
+
subItems?: Array<PropertyAccountingCashflowItemSubItems> | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Optional linkage to transactions
|
|
24
|
+
*/
|
|
25
|
+
transactionIds?: Array<string> | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const AccountingCashflowItem$inboundSchema: z.ZodType<
|
|
30
|
+
AccountingCashflowItem,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
account_id: z.string().optional(),
|
|
35
|
+
amount: z.number().optional(),
|
|
36
|
+
name: z.string().optional(),
|
|
37
|
+
sub_items: z.array(PropertyAccountingCashflowItemSubItems$inboundSchema)
|
|
38
|
+
.optional(),
|
|
39
|
+
transaction_ids: z.array(z.string()).optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"account_id": "accountId",
|
|
43
|
+
"sub_items": "subItems",
|
|
44
|
+
"transaction_ids": "transactionIds",
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type AccountingCashflowItem$Outbound = {
|
|
50
|
+
account_id?: string | undefined;
|
|
51
|
+
amount?: number | undefined;
|
|
52
|
+
name?: string | undefined;
|
|
53
|
+
sub_items?:
|
|
54
|
+
| Array<PropertyAccountingCashflowItemSubItems$Outbound>
|
|
55
|
+
| undefined;
|
|
56
|
+
transaction_ids?: Array<string> | undefined;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const AccountingCashflowItem$outboundSchema: z.ZodType<
|
|
61
|
+
AccountingCashflowItem$Outbound,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
AccountingCashflowItem
|
|
64
|
+
> = z.object({
|
|
65
|
+
accountId: z.string().optional(),
|
|
66
|
+
amount: z.number().optional(),
|
|
67
|
+
name: z.string().optional(),
|
|
68
|
+
subItems: z.array(PropertyAccountingCashflowItemSubItems$outboundSchema)
|
|
69
|
+
.optional(),
|
|
70
|
+
transactionIds: z.array(z.string()).optional(),
|
|
71
|
+
}).transform((v) => {
|
|
72
|
+
return remap$(v, {
|
|
73
|
+
accountId: "account_id",
|
|
74
|
+
subItems: "sub_items",
|
|
75
|
+
transactionIds: "transaction_ids",
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @internal
|
|
81
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
82
|
+
*/
|
|
83
|
+
export namespace AccountingCashflowItem$ {
|
|
84
|
+
/** @deprecated use `AccountingCashflowItem$inboundSchema` instead. */
|
|
85
|
+
export const inboundSchema = AccountingCashflowItem$inboundSchema;
|
|
86
|
+
/** @deprecated use `AccountingCashflowItem$outboundSchema` instead. */
|
|
87
|
+
export const outboundSchema = AccountingCashflowItem$outboundSchema;
|
|
88
|
+
/** @deprecated use `AccountingCashflowItem$Outbound` instead. */
|
|
89
|
+
export type Outbound = AccountingCashflowItem$Outbound;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function accountingCashflowItemToJSON(
|
|
93
|
+
accountingCashflowItem: AccountingCashflowItem,
|
|
94
|
+
): string {
|
|
95
|
+
return JSON.stringify(
|
|
96
|
+
AccountingCashflowItem$outboundSchema.parse(accountingCashflowItem),
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function accountingCashflowItemFromJSON(
|
|
101
|
+
jsonString: string,
|
|
102
|
+
): SafeParseResult<AccountingCashflowItem, SDKValidationError> {
|
|
103
|
+
return safeParse(
|
|
104
|
+
jsonString,
|
|
105
|
+
(x) => AccountingCashflowItem$inboundSchema.parse(JSON.parse(x)),
|
|
106
|
+
`Failed to parse 'AccountingCashflowItem' from JSON`,
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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
|
+
AccountingCashflowItem,
|
|
12
|
+
AccountingCashflowItem$inboundSchema,
|
|
13
|
+
AccountingCashflowItem$Outbound,
|
|
14
|
+
AccountingCashflowItem$outboundSchema,
|
|
15
|
+
} from "./accountingcashflowitem.js";
|
|
16
|
+
|
|
17
|
+
export type AccountingCashflowSection = {
|
|
18
|
+
items?: Array<AccountingCashflowItem> | undefined;
|
|
19
|
+
sectionName?: string | undefined;
|
|
20
|
+
totalAmount?: number | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const AccountingCashflowSection$inboundSchema: z.ZodType<
|
|
25
|
+
AccountingCashflowSection,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
items: z.array(AccountingCashflowItem$inboundSchema).optional(),
|
|
30
|
+
section_name: z.string().optional(),
|
|
31
|
+
total_amount: z.number().optional(),
|
|
32
|
+
}).transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"section_name": "sectionName",
|
|
35
|
+
"total_amount": "totalAmount",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type AccountingCashflowSection$Outbound = {
|
|
41
|
+
items?: Array<AccountingCashflowItem$Outbound> | undefined;
|
|
42
|
+
section_name?: string | undefined;
|
|
43
|
+
total_amount?: number | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const AccountingCashflowSection$outboundSchema: z.ZodType<
|
|
48
|
+
AccountingCashflowSection$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
AccountingCashflowSection
|
|
51
|
+
> = z.object({
|
|
52
|
+
items: z.array(AccountingCashflowItem$outboundSchema).optional(),
|
|
53
|
+
sectionName: z.string().optional(),
|
|
54
|
+
totalAmount: z.number().optional(),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
sectionName: "section_name",
|
|
58
|
+
totalAmount: "total_amount",
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
65
|
+
*/
|
|
66
|
+
export namespace AccountingCashflowSection$ {
|
|
67
|
+
/** @deprecated use `AccountingCashflowSection$inboundSchema` instead. */
|
|
68
|
+
export const inboundSchema = AccountingCashflowSection$inboundSchema;
|
|
69
|
+
/** @deprecated use `AccountingCashflowSection$outboundSchema` instead. */
|
|
70
|
+
export const outboundSchema = AccountingCashflowSection$outboundSchema;
|
|
71
|
+
/** @deprecated use `AccountingCashflowSection$Outbound` instead. */
|
|
72
|
+
export type Outbound = AccountingCashflowSection$Outbound;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function accountingCashflowSectionToJSON(
|
|
76
|
+
accountingCashflowSection: AccountingCashflowSection,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
AccountingCashflowSection$outboundSchema.parse(accountingCashflowSection),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function accountingCashflowSectionFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<AccountingCashflowSection, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) => AccountingCashflowSection$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'AccountingCashflowSection' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -46,7 +46,11 @@ export type CalendarEventRecurrence = {
|
|
|
46
46
|
* dates to exclude from the recurrence, defaults to undefined (no exclusions)
|
|
47
47
|
*/
|
|
48
48
|
excludedDates?: Array<string> | undefined;
|
|
49
|
-
frequency
|
|
49
|
+
frequency?: CalendarEventRecurrenceFrequency | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* dates to include in the recurrence, defaults to undefined (no inclusions)
|
|
52
|
+
*/
|
|
53
|
+
includedDates?: Array<string> | undefined;
|
|
50
54
|
interval?: number | undefined;
|
|
51
55
|
/**
|
|
52
56
|
* days of the week to repeat on, defaults to undefined (every day), only used if frequency is WEEKLY
|
|
@@ -68,7 +72,10 @@ export type CalendarEventRecurrence = {
|
|
|
68
72
|
* days of the year to repeat on, defaults to undefined (every day), only used if frequency is YEARLY
|
|
69
73
|
*/
|
|
70
74
|
onYearDays?: Array<number> | undefined;
|
|
71
|
-
|
|
75
|
+
/**
|
|
76
|
+
* timezone, defaults to undefined (no timezone)
|
|
77
|
+
*/
|
|
78
|
+
timezone?: Array<string> | undefined;
|
|
72
79
|
weekStart?: WeekStart | undefined;
|
|
73
80
|
};
|
|
74
81
|
|
|
@@ -146,7 +153,8 @@ export const CalendarEventRecurrence$inboundSchema: z.ZodType<
|
|
|
146
153
|
end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
147
154
|
.optional(),
|
|
148
155
|
excluded_dates: z.array(z.string()).optional(),
|
|
149
|
-
frequency: CalendarEventRecurrenceFrequency$inboundSchema,
|
|
156
|
+
frequency: CalendarEventRecurrenceFrequency$inboundSchema.optional(),
|
|
157
|
+
included_dates: z.array(z.string()).optional(),
|
|
150
158
|
interval: z.number().optional(),
|
|
151
159
|
on_days: z.array(PropertyCalendarEventRecurrenceOnDays$inboundSchema)
|
|
152
160
|
.optional(),
|
|
@@ -154,12 +162,13 @@ export const CalendarEventRecurrence$inboundSchema: z.ZodType<
|
|
|
154
162
|
on_months: z.array(z.number()).optional(),
|
|
155
163
|
on_weeks: z.array(z.number()).optional(),
|
|
156
164
|
on_year_days: z.array(z.number()).optional(),
|
|
157
|
-
timezone: z.string().optional(),
|
|
165
|
+
timezone: z.array(z.string()).optional(),
|
|
158
166
|
week_start: WeekStart$inboundSchema.optional(),
|
|
159
167
|
}).transform((v) => {
|
|
160
168
|
return remap$(v, {
|
|
161
169
|
"end_at": "endAt",
|
|
162
170
|
"excluded_dates": "excludedDates",
|
|
171
|
+
"included_dates": "includedDates",
|
|
163
172
|
"on_days": "onDays",
|
|
164
173
|
"on_month_days": "onMonthDays",
|
|
165
174
|
"on_months": "onMonths",
|
|
@@ -174,14 +183,15 @@ export type CalendarEventRecurrence$Outbound = {
|
|
|
174
183
|
count?: number | undefined;
|
|
175
184
|
end_at?: string | undefined;
|
|
176
185
|
excluded_dates?: Array<string> | undefined;
|
|
177
|
-
frequency
|
|
186
|
+
frequency?: string | undefined;
|
|
187
|
+
included_dates?: Array<string> | undefined;
|
|
178
188
|
interval?: number | undefined;
|
|
179
189
|
on_days?: Array<string> | undefined;
|
|
180
190
|
on_month_days?: Array<number> | undefined;
|
|
181
191
|
on_months?: Array<number> | undefined;
|
|
182
192
|
on_weeks?: Array<number> | undefined;
|
|
183
193
|
on_year_days?: Array<number> | undefined;
|
|
184
|
-
timezone?: string | undefined;
|
|
194
|
+
timezone?: Array<string> | undefined;
|
|
185
195
|
week_start?: string | undefined;
|
|
186
196
|
};
|
|
187
197
|
|
|
@@ -194,7 +204,8 @@ export const CalendarEventRecurrence$outboundSchema: z.ZodType<
|
|
|
194
204
|
count: z.number().optional(),
|
|
195
205
|
endAt: z.date().transform(v => v.toISOString()).optional(),
|
|
196
206
|
excludedDates: z.array(z.string()).optional(),
|
|
197
|
-
frequency: CalendarEventRecurrenceFrequency$outboundSchema,
|
|
207
|
+
frequency: CalendarEventRecurrenceFrequency$outboundSchema.optional(),
|
|
208
|
+
includedDates: z.array(z.string()).optional(),
|
|
198
209
|
interval: z.number().optional(),
|
|
199
210
|
onDays: z.array(PropertyCalendarEventRecurrenceOnDays$outboundSchema)
|
|
200
211
|
.optional(),
|
|
@@ -202,12 +213,13 @@ export const CalendarEventRecurrence$outboundSchema: z.ZodType<
|
|
|
202
213
|
onMonths: z.array(z.number()).optional(),
|
|
203
214
|
onWeeks: z.array(z.number()).optional(),
|
|
204
215
|
onYearDays: z.array(z.number()).optional(),
|
|
205
|
-
timezone: z.string().optional(),
|
|
216
|
+
timezone: z.array(z.string()).optional(),
|
|
206
217
|
weekStart: WeekStart$outboundSchema.optional(),
|
|
207
218
|
}).transform((v) => {
|
|
208
219
|
return remap$(v, {
|
|
209
220
|
endAt: "end_at",
|
|
210
221
|
excludedDates: "excluded_dates",
|
|
222
|
+
includedDates: "included_dates",
|
|
211
223
|
onDays: "on_days",
|
|
212
224
|
onMonthDays: "on_month_days",
|
|
213
225
|
onMonths: "on_months",
|
|
@@ -8,6 +8,9 @@ export * from "./accountingattachment.js";
|
|
|
8
8
|
export * from "./accountingbalancesheet.js";
|
|
9
9
|
export * from "./accountingbalancesheetitem.js";
|
|
10
10
|
export * from "./accountingbill.js";
|
|
11
|
+
export * from "./accountingcashflow.js";
|
|
12
|
+
export * from "./accountingcashflowitem.js";
|
|
13
|
+
export * from "./accountingcashflowsection.js";
|
|
11
14
|
export * from "./accountingcategory.js";
|
|
12
15
|
export * from "./accountingcontact.js";
|
|
13
16
|
export * from "./accountingcontactpaymentmethod.js";
|
|
@@ -147,6 +150,7 @@ export * from "./paymentpayout.js";
|
|
|
147
150
|
export * from "./paymentrefund.js";
|
|
148
151
|
export * from "./paymentsubscription.js";
|
|
149
152
|
export * from "./propertyaccountingbalancesheetitemsubitems.js";
|
|
153
|
+
export * from "./propertyaccountingcashflowitemsubitems.js";
|
|
150
154
|
export * from "./propertyaccountingcontactbillingaddress.js";
|
|
151
155
|
export * from "./propertyaccountingcontactshippingaddress.js";
|
|
152
156
|
export * from "./propertyaccountingorderbillingaddress.js";
|
|
@@ -38,6 +38,11 @@ export const KmsPageMetadataFormat = {
|
|
|
38
38
|
YesNo: "YES_NO",
|
|
39
39
|
Currency: "CURRENCY",
|
|
40
40
|
Url: "URL",
|
|
41
|
+
Percent: "PERCENT",
|
|
42
|
+
Email: "EMAIL",
|
|
43
|
+
Phone: "PHONE",
|
|
44
|
+
Reference: "REFERENCE",
|
|
45
|
+
Time: "TIME",
|
|
41
46
|
} as const;
|
|
42
47
|
export type KmsPageMetadataFormat = OpenEnum<typeof KmsPageMetadataFormat>;
|
|
43
48
|
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type PropertyAccountingCashflowItemSubItems = {};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const PropertyAccountingCashflowItemSubItems$inboundSchema: z.ZodType<
|
|
14
|
+
PropertyAccountingCashflowItemSubItems,
|
|
15
|
+
z.ZodTypeDef,
|
|
16
|
+
unknown
|
|
17
|
+
> = z.object({});
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type PropertyAccountingCashflowItemSubItems$Outbound = {};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const PropertyAccountingCashflowItemSubItems$outboundSchema: z.ZodType<
|
|
24
|
+
PropertyAccountingCashflowItemSubItems$Outbound,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
PropertyAccountingCashflowItemSubItems
|
|
27
|
+
> = z.object({});
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
32
|
+
*/
|
|
33
|
+
export namespace PropertyAccountingCashflowItemSubItems$ {
|
|
34
|
+
/** @deprecated use `PropertyAccountingCashflowItemSubItems$inboundSchema` instead. */
|
|
35
|
+
export const inboundSchema =
|
|
36
|
+
PropertyAccountingCashflowItemSubItems$inboundSchema;
|
|
37
|
+
/** @deprecated use `PropertyAccountingCashflowItemSubItems$outboundSchema` instead. */
|
|
38
|
+
export const outboundSchema =
|
|
39
|
+
PropertyAccountingCashflowItemSubItems$outboundSchema;
|
|
40
|
+
/** @deprecated use `PropertyAccountingCashflowItemSubItems$Outbound` instead. */
|
|
41
|
+
export type Outbound = PropertyAccountingCashflowItemSubItems$Outbound;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function propertyAccountingCashflowItemSubItemsToJSON(
|
|
45
|
+
propertyAccountingCashflowItemSubItems:
|
|
46
|
+
PropertyAccountingCashflowItemSubItems,
|
|
47
|
+
): string {
|
|
48
|
+
return JSON.stringify(
|
|
49
|
+
PropertyAccountingCashflowItemSubItems$outboundSchema.parse(
|
|
50
|
+
propertyAccountingCashflowItemSubItems,
|
|
51
|
+
),
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function propertyAccountingCashflowItemSubItemsFromJSON(
|
|
56
|
+
jsonString: string,
|
|
57
|
+
): SafeParseResult<PropertyAccountingCashflowItemSubItems, SDKValidationError> {
|
|
58
|
+
return safeParse(
|
|
59
|
+
jsonString,
|
|
60
|
+
(x) =>
|
|
61
|
+
PropertyAccountingCashflowItemSubItems$inboundSchema.parse(JSON.parse(x)),
|
|
62
|
+
`Failed to parse 'PropertyAccountingCashflowItemSubItems' from JSON`,
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -47,6 +47,8 @@ export const PropertyConnectionPermissions = {
|
|
|
47
47
|
AccountingCategoryWrite: "accounting_category_write",
|
|
48
48
|
PaymentPaymentRead: "payment_payment_read",
|
|
49
49
|
PaymentPaymentWrite: "payment_payment_write",
|
|
50
|
+
AccountingCashflowRead: "accounting_cashflow_read",
|
|
51
|
+
AccountingCashflowWrite: "accounting_cashflow_write",
|
|
50
52
|
PaymentPayoutRead: "payment_payout_read",
|
|
51
53
|
PaymentRefundRead: "payment_refund_read",
|
|
52
54
|
PaymentLinkRead: "payment_link_read",
|
|
@@ -48,6 +48,7 @@ export const ObjectType = {
|
|
|
48
48
|
AccountingTrialbalance: "accounting_trialbalance",
|
|
49
49
|
AccountingCategory: "accounting_category",
|
|
50
50
|
AccountingExpense: "accounting_expense",
|
|
51
|
+
AccountingCashflow: "accounting_cashflow",
|
|
51
52
|
PaymentPayment: "payment_payment",
|
|
52
53
|
PaymentLink: "payment_link",
|
|
53
54
|
PaymentPayout: "payment_payout",
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { Busy } from "./busy.js";
|
|
|
18
18
|
import { Calendar } from "./calendar.js";
|
|
19
19
|
import { Call } from "./call.js";
|
|
20
20
|
import { Candidate } from "./candidate.js";
|
|
21
|
+
import { Cashflow } from "./cashflow.js";
|
|
21
22
|
import { Category } from "./category.js";
|
|
22
23
|
import { Change } from "./change.js";
|
|
23
24
|
import { Channel } from "./channel.js";
|
|
@@ -132,6 +133,11 @@ export class UnifiedTo extends ClientSDK {
|
|
|
132
133
|
return (this._bill ??= new Bill(this._options));
|
|
133
134
|
}
|
|
134
135
|
|
|
136
|
+
private _cashflow?: Cashflow;
|
|
137
|
+
get cashflow(): Cashflow {
|
|
138
|
+
return (this._cashflow ??= new Cashflow(this._options));
|
|
139
|
+
}
|
|
140
|
+
|
|
135
141
|
private _category?: Category;
|
|
136
142
|
get category(): Category {
|
|
137
143
|
return (this._category ??= new Category(this._options));
|