@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,182 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { UnifiedToCore } from "../core.js";
|
|
7
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
23
|
+
import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
|
|
24
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
25
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../sdk/types/async.js";
|
|
27
|
+
import { Result } from "../sdk/types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* List all cashflows
|
|
31
|
+
*/
|
|
32
|
+
export function accountingListAccountingCashflows(
|
|
33
|
+
client: UnifiedToCore,
|
|
34
|
+
request: operations.ListAccountingCashflowsRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<
|
|
37
|
+
Result<
|
|
38
|
+
Array<shared.AccountingCashflow>,
|
|
39
|
+
| UnifiedToError
|
|
40
|
+
| ResponseValidationError
|
|
41
|
+
| ConnectionError
|
|
42
|
+
| RequestAbortedError
|
|
43
|
+
| RequestTimeoutError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| UnexpectedClientError
|
|
46
|
+
| SDKValidationError
|
|
47
|
+
>
|
|
48
|
+
> {
|
|
49
|
+
return new APIPromise($do(
|
|
50
|
+
client,
|
|
51
|
+
request,
|
|
52
|
+
options,
|
|
53
|
+
));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function $do(
|
|
57
|
+
client: UnifiedToCore,
|
|
58
|
+
request: operations.ListAccountingCashflowsRequest,
|
|
59
|
+
options?: RequestOptions,
|
|
60
|
+
): Promise<
|
|
61
|
+
[
|
|
62
|
+
Result<
|
|
63
|
+
Array<shared.AccountingCashflow>,
|
|
64
|
+
| UnifiedToError
|
|
65
|
+
| ResponseValidationError
|
|
66
|
+
| ConnectionError
|
|
67
|
+
| RequestAbortedError
|
|
68
|
+
| RequestTimeoutError
|
|
69
|
+
| InvalidRequestError
|
|
70
|
+
| UnexpectedClientError
|
|
71
|
+
| SDKValidationError
|
|
72
|
+
>,
|
|
73
|
+
APICall,
|
|
74
|
+
]
|
|
75
|
+
> {
|
|
76
|
+
const parsed = safeParse(
|
|
77
|
+
request,
|
|
78
|
+
(value) =>
|
|
79
|
+
operations.ListAccountingCashflowsRequest$outboundSchema.parse(value),
|
|
80
|
+
"Input validation failed",
|
|
81
|
+
);
|
|
82
|
+
if (!parsed.ok) {
|
|
83
|
+
return [parsed, { status: "invalid" }];
|
|
84
|
+
}
|
|
85
|
+
const payload = parsed.value;
|
|
86
|
+
const body = null;
|
|
87
|
+
|
|
88
|
+
const pathParams = {
|
|
89
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
90
|
+
explode: false,
|
|
91
|
+
charEncoding: "percent",
|
|
92
|
+
}),
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const path = pathToFunc("/accounting/{connection_id}/cashflow")(pathParams);
|
|
96
|
+
|
|
97
|
+
const query = encodeFormQuery({
|
|
98
|
+
"category_id": payload.category_id,
|
|
99
|
+
"contact_id": payload.contact_id,
|
|
100
|
+
"end_le": payload.end_le,
|
|
101
|
+
"end_lt": payload.end_lt,
|
|
102
|
+
"fields": payload.fields,
|
|
103
|
+
"limit": payload.limit,
|
|
104
|
+
"offset": payload.offset,
|
|
105
|
+
"order": payload.order,
|
|
106
|
+
"query": payload.query,
|
|
107
|
+
"raw": payload.raw,
|
|
108
|
+
"sort": payload.sort,
|
|
109
|
+
"start_gte": payload.start_gte,
|
|
110
|
+
"updated_gte": payload.updated_gte,
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
const headers = new Headers(compactMap({
|
|
114
|
+
Accept: "application/json",
|
|
115
|
+
}));
|
|
116
|
+
|
|
117
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
118
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
119
|
+
|
|
120
|
+
const context = {
|
|
121
|
+
options: client._options,
|
|
122
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
123
|
+
operationID: "listAccountingCashflows",
|
|
124
|
+
oAuth2Scopes: null,
|
|
125
|
+
|
|
126
|
+
resolvedSecurity: requestSecurity,
|
|
127
|
+
|
|
128
|
+
securitySource: client._options.security,
|
|
129
|
+
retryConfig: options?.retries
|
|
130
|
+
|| client._options.retryConfig
|
|
131
|
+
|| { strategy: "none" },
|
|
132
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const requestRes = client._createRequest(context, {
|
|
136
|
+
security: requestSecurity,
|
|
137
|
+
method: "GET",
|
|
138
|
+
baseURL: options?.serverURL,
|
|
139
|
+
path: path,
|
|
140
|
+
headers: headers,
|
|
141
|
+
query: query,
|
|
142
|
+
body: body,
|
|
143
|
+
userAgent: client._options.userAgent,
|
|
144
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
145
|
+
}, options);
|
|
146
|
+
if (!requestRes.ok) {
|
|
147
|
+
return [requestRes, { status: "invalid" }];
|
|
148
|
+
}
|
|
149
|
+
const req = requestRes.value;
|
|
150
|
+
|
|
151
|
+
const doResult = await client._do(req, {
|
|
152
|
+
context,
|
|
153
|
+
errorCodes: ["4XX", "5XX"],
|
|
154
|
+
retryConfig: context.retryConfig,
|
|
155
|
+
retryCodes: context.retryCodes,
|
|
156
|
+
});
|
|
157
|
+
if (!doResult.ok) {
|
|
158
|
+
return [doResult, { status: "request-error", request: req }];
|
|
159
|
+
}
|
|
160
|
+
const response = doResult.value;
|
|
161
|
+
|
|
162
|
+
const [result] = await M.match<
|
|
163
|
+
Array<shared.AccountingCashflow>,
|
|
164
|
+
| UnifiedToError
|
|
165
|
+
| ResponseValidationError
|
|
166
|
+
| ConnectionError
|
|
167
|
+
| RequestAbortedError
|
|
168
|
+
| RequestTimeoutError
|
|
169
|
+
| InvalidRequestError
|
|
170
|
+
| UnexpectedClientError
|
|
171
|
+
| SDKValidationError
|
|
172
|
+
>(
|
|
173
|
+
M.json(200, z.array(shared.AccountingCashflow$inboundSchema)),
|
|
174
|
+
M.fail("4XX"),
|
|
175
|
+
M.fail("5XX"),
|
|
176
|
+
)(response, req);
|
|
177
|
+
if (!result.ok) {
|
|
178
|
+
return [result, { status: "complete", request: req, response }];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return [result, { status: "complete", request: req, response }];
|
|
182
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
73
73
|
export const SDK_METADATA = {
|
|
74
74
|
language: "typescript",
|
|
75
75
|
openapiDocVersion: "1.0",
|
|
76
|
-
sdkVersion: "2.
|
|
77
|
-
genVersion: "2.
|
|
76
|
+
sdkVersion: "2.79.0",
|
|
77
|
+
genVersion: "2.735.1",
|
|
78
78
|
userAgent:
|
|
79
|
-
"speakeasy-sdk/typescript 2.
|
|
79
|
+
"speakeasy-sdk/typescript 2.79.0 2.735.1 1.0 @unified-api/typescript-sdk",
|
|
80
80
|
} as const;
|
package/src/sdk/accounting.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { accountingCreateAccountingTransaction } from "../funcs/accountingCreate
|
|
|
18
18
|
import { accountingGetAccountingAccount } from "../funcs/accountingGetAccountingAccount.js";
|
|
19
19
|
import { accountingGetAccountingBalancesheet } from "../funcs/accountingGetAccountingBalancesheet.js";
|
|
20
20
|
import { accountingGetAccountingBill } from "../funcs/accountingGetAccountingBill.js";
|
|
21
|
+
import { accountingGetAccountingCashflow } from "../funcs/accountingGetAccountingCashflow.js";
|
|
21
22
|
import { accountingGetAccountingCategory } from "../funcs/accountingGetAccountingCategory.js";
|
|
22
23
|
import { accountingGetAccountingContact } from "../funcs/accountingGetAccountingContact.js";
|
|
23
24
|
import { accountingGetAccountingCreditmemo } from "../funcs/accountingGetAccountingCreditmemo.js";
|
|
@@ -36,6 +37,7 @@ import { accountingGetAccountingTrialbalance } from "../funcs/accountingGetAccou
|
|
|
36
37
|
import { accountingListAccountingAccounts } from "../funcs/accountingListAccountingAccounts.js";
|
|
37
38
|
import { accountingListAccountingBalancesheets } from "../funcs/accountingListAccountingBalancesheets.js";
|
|
38
39
|
import { accountingListAccountingBills } from "../funcs/accountingListAccountingBills.js";
|
|
40
|
+
import { accountingListAccountingCashflows } from "../funcs/accountingListAccountingCashflows.js";
|
|
39
41
|
import { accountingListAccountingCategories } from "../funcs/accountingListAccountingCategories.js";
|
|
40
42
|
import { accountingListAccountingContacts } from "../funcs/accountingListAccountingContacts.js";
|
|
41
43
|
import { accountingListAccountingCreditmemoes } from "../funcs/accountingListAccountingCreditmemoes.js";
|
|
@@ -320,6 +322,20 @@ export class Accounting extends ClientSDK {
|
|
|
320
322
|
));
|
|
321
323
|
}
|
|
322
324
|
|
|
325
|
+
/**
|
|
326
|
+
* Retrieve a cashflow
|
|
327
|
+
*/
|
|
328
|
+
async getAccountingCashflow(
|
|
329
|
+
request: operations.GetAccountingCashflowRequest,
|
|
330
|
+
options?: RequestOptions,
|
|
331
|
+
): Promise<shared.AccountingCashflow> {
|
|
332
|
+
return unwrapAsync(accountingGetAccountingCashflow(
|
|
333
|
+
this,
|
|
334
|
+
request,
|
|
335
|
+
options,
|
|
336
|
+
));
|
|
337
|
+
}
|
|
338
|
+
|
|
323
339
|
/**
|
|
324
340
|
* Retrieve a category
|
|
325
341
|
*/
|
|
@@ -572,6 +588,20 @@ export class Accounting extends ClientSDK {
|
|
|
572
588
|
));
|
|
573
589
|
}
|
|
574
590
|
|
|
591
|
+
/**
|
|
592
|
+
* List all cashflows
|
|
593
|
+
*/
|
|
594
|
+
async listAccountingCashflows(
|
|
595
|
+
request: operations.ListAccountingCashflowsRequest,
|
|
596
|
+
options?: RequestOptions,
|
|
597
|
+
): Promise<Array<shared.AccountingCashflow>> {
|
|
598
|
+
return unwrapAsync(accountingListAccountingCashflows(
|
|
599
|
+
this,
|
|
600
|
+
request,
|
|
601
|
+
options,
|
|
602
|
+
));
|
|
603
|
+
}
|
|
604
|
+
|
|
575
605
|
/**
|
|
576
606
|
* List all categories
|
|
577
607
|
*/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { accountingGetAccountingCashflow } from "../funcs/accountingGetAccountingCashflow.js";
|
|
6
|
+
import { accountingListAccountingCashflows } from "../funcs/accountingListAccountingCashflows.js";
|
|
7
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
|
+
import * as operations from "./models/operations/index.js";
|
|
9
|
+
import * as shared from "./models/shared/index.js";
|
|
10
|
+
import { unwrapAsync } from "./types/fp.js";
|
|
11
|
+
|
|
12
|
+
export class Cashflow extends ClientSDK {
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve a cashflow
|
|
15
|
+
*/
|
|
16
|
+
async getAccountingCashflow(
|
|
17
|
+
request: operations.GetAccountingCashflowRequest,
|
|
18
|
+
options?: RequestOptions,
|
|
19
|
+
): Promise<shared.AccountingCashflow> {
|
|
20
|
+
return unwrapAsync(accountingGetAccountingCashflow(
|
|
21
|
+
this,
|
|
22
|
+
request,
|
|
23
|
+
options,
|
|
24
|
+
));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* List all cashflows
|
|
29
|
+
*/
|
|
30
|
+
async listAccountingCashflows(
|
|
31
|
+
request: operations.ListAccountingCashflowsRequest,
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): Promise<Array<shared.AccountingCashflow>> {
|
|
34
|
+
return unwrapAsync(accountingListAccountingCashflows(
|
|
35
|
+
this,
|
|
36
|
+
request,
|
|
37
|
+
options,
|
|
38
|
+
));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
|
|
11
|
+
export type GetAccountingCashflowRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* ID of the connection
|
|
14
|
+
*/
|
|
15
|
+
connectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* Comma-delimited fields to return
|
|
18
|
+
*/
|
|
19
|
+
fields?: Array<string> | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* ID of the Cashflow
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
|
|
26
|
+
*/
|
|
27
|
+
raw?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const GetAccountingCashflowRequest$inboundSchema: z.ZodType<
|
|
32
|
+
GetAccountingCashflowRequest,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
connection_id: z.string(),
|
|
37
|
+
fields: z.array(z.string()).optional(),
|
|
38
|
+
id: z.string(),
|
|
39
|
+
raw: z.string().optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"connection_id": "connectionId",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type GetAccountingCashflowRequest$Outbound = {
|
|
48
|
+
connection_id: string;
|
|
49
|
+
fields?: Array<string> | undefined;
|
|
50
|
+
id: string;
|
|
51
|
+
raw?: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const GetAccountingCashflowRequest$outboundSchema: z.ZodType<
|
|
56
|
+
GetAccountingCashflowRequest$Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
GetAccountingCashflowRequest
|
|
59
|
+
> = z.object({
|
|
60
|
+
connectionId: z.string(),
|
|
61
|
+
fields: z.array(z.string()).optional(),
|
|
62
|
+
id: z.string(),
|
|
63
|
+
raw: z.string().optional(),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
connectionId: "connection_id",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
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 GetAccountingCashflowRequest$ {
|
|
75
|
+
/** @deprecated use `GetAccountingCashflowRequest$inboundSchema` instead. */
|
|
76
|
+
export const inboundSchema = GetAccountingCashflowRequest$inboundSchema;
|
|
77
|
+
/** @deprecated use `GetAccountingCashflowRequest$outboundSchema` instead. */
|
|
78
|
+
export const outboundSchema = GetAccountingCashflowRequest$outboundSchema;
|
|
79
|
+
/** @deprecated use `GetAccountingCashflowRequest$Outbound` instead. */
|
|
80
|
+
export type Outbound = GetAccountingCashflowRequest$Outbound;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function getAccountingCashflowRequestToJSON(
|
|
84
|
+
getAccountingCashflowRequest: GetAccountingCashflowRequest,
|
|
85
|
+
): string {
|
|
86
|
+
return JSON.stringify(
|
|
87
|
+
GetAccountingCashflowRequest$outboundSchema.parse(
|
|
88
|
+
getAccountingCashflowRequest,
|
|
89
|
+
),
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function getAccountingCashflowRequestFromJSON(
|
|
94
|
+
jsonString: string,
|
|
95
|
+
): SafeParseResult<GetAccountingCashflowRequest, SDKValidationError> {
|
|
96
|
+
return safeParse(
|
|
97
|
+
jsonString,
|
|
98
|
+
(x) => GetAccountingCashflowRequest$inboundSchema.parse(JSON.parse(x)),
|
|
99
|
+
`Failed to parse 'GetAccountingCashflowRequest' from JSON`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -84,6 +84,7 @@ export * from "./createverificationrequest.js";
|
|
|
84
84
|
export * from "./getaccountingaccount.js";
|
|
85
85
|
export * from "./getaccountingbalancesheet.js";
|
|
86
86
|
export * from "./getaccountingbill.js";
|
|
87
|
+
export * from "./getaccountingcashflow.js";
|
|
87
88
|
export * from "./getaccountingcategory.js";
|
|
88
89
|
export * from "./getaccountingcontact.js";
|
|
89
90
|
export * from "./getaccountingcreditmemo.js";
|
|
@@ -178,6 +179,7 @@ export * from "./getverificationrequest.js";
|
|
|
178
179
|
export * from "./listaccountingaccounts.js";
|
|
179
180
|
export * from "./listaccountingbalancesheets.js";
|
|
180
181
|
export * from "./listaccountingbills.js";
|
|
182
|
+
export * from "./listaccountingcashflows.js";
|
|
181
183
|
export * from "./listaccountingcategories.js";
|
|
182
184
|
export * from "./listaccountingcontacts.js";
|
|
183
185
|
export * from "./listaccountingcreditmemoes.js";
|
|
@@ -0,0 +1,171 @@
|
|
|
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
|
+
|
|
11
|
+
export type ListAccountingCashflowsRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* The category ID to filter by
|
|
14
|
+
*/
|
|
15
|
+
categoryId?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* ID of the connection
|
|
18
|
+
*/
|
|
19
|
+
connectionId: string;
|
|
20
|
+
/**
|
|
21
|
+
* The contact ID to filter by
|
|
22
|
+
*/
|
|
23
|
+
contactId?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The end date to filter by (deprecated)
|
|
26
|
+
*/
|
|
27
|
+
endLe?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The end date to filter by
|
|
30
|
+
*/
|
|
31
|
+
endLt?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Comma-delimited fields to return
|
|
34
|
+
*/
|
|
35
|
+
fields?: Array<string> | undefined;
|
|
36
|
+
limit?: number | undefined;
|
|
37
|
+
offset?: number | undefined;
|
|
38
|
+
order?: string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Query string to search. eg. email address or name
|
|
41
|
+
*/
|
|
42
|
+
query?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
|
|
45
|
+
*/
|
|
46
|
+
raw?: string | undefined;
|
|
47
|
+
sort?: string | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* The start date to filter by
|
|
50
|
+
*/
|
|
51
|
+
startGte?: string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Return only results whose updated date is equal or greater to this value
|
|
54
|
+
*/
|
|
55
|
+
updatedGte?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const ListAccountingCashflowsRequest$inboundSchema: z.ZodType<
|
|
60
|
+
ListAccountingCashflowsRequest,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
unknown
|
|
63
|
+
> = z.object({
|
|
64
|
+
category_id: z.string().optional(),
|
|
65
|
+
connection_id: z.string(),
|
|
66
|
+
contact_id: z.string().optional(),
|
|
67
|
+
end_le: z.string().optional(),
|
|
68
|
+
end_lt: z.string().optional(),
|
|
69
|
+
fields: z.array(z.string()).optional(),
|
|
70
|
+
limit: z.number().optional(),
|
|
71
|
+
offset: z.number().optional(),
|
|
72
|
+
order: z.string().optional(),
|
|
73
|
+
query: z.string().optional(),
|
|
74
|
+
raw: z.string().optional(),
|
|
75
|
+
sort: z.string().optional(),
|
|
76
|
+
start_gte: z.string().optional(),
|
|
77
|
+
updated_gte: z.string().optional(),
|
|
78
|
+
}).transform((v) => {
|
|
79
|
+
return remap$(v, {
|
|
80
|
+
"category_id": "categoryId",
|
|
81
|
+
"connection_id": "connectionId",
|
|
82
|
+
"contact_id": "contactId",
|
|
83
|
+
"end_le": "endLe",
|
|
84
|
+
"end_lt": "endLt",
|
|
85
|
+
"start_gte": "startGte",
|
|
86
|
+
"updated_gte": "updatedGte",
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export type ListAccountingCashflowsRequest$Outbound = {
|
|
92
|
+
category_id?: string | undefined;
|
|
93
|
+
connection_id: string;
|
|
94
|
+
contact_id?: string | undefined;
|
|
95
|
+
end_le?: string | undefined;
|
|
96
|
+
end_lt?: string | undefined;
|
|
97
|
+
fields?: Array<string> | undefined;
|
|
98
|
+
limit?: number | undefined;
|
|
99
|
+
offset?: number | undefined;
|
|
100
|
+
order?: string | undefined;
|
|
101
|
+
query?: string | undefined;
|
|
102
|
+
raw?: string | undefined;
|
|
103
|
+
sort?: string | undefined;
|
|
104
|
+
start_gte?: string | undefined;
|
|
105
|
+
updated_gte?: string | undefined;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const ListAccountingCashflowsRequest$outboundSchema: z.ZodType<
|
|
110
|
+
ListAccountingCashflowsRequest$Outbound,
|
|
111
|
+
z.ZodTypeDef,
|
|
112
|
+
ListAccountingCashflowsRequest
|
|
113
|
+
> = z.object({
|
|
114
|
+
categoryId: z.string().optional(),
|
|
115
|
+
connectionId: z.string(),
|
|
116
|
+
contactId: z.string().optional(),
|
|
117
|
+
endLe: z.string().optional(),
|
|
118
|
+
endLt: z.string().optional(),
|
|
119
|
+
fields: z.array(z.string()).optional(),
|
|
120
|
+
limit: z.number().optional(),
|
|
121
|
+
offset: z.number().optional(),
|
|
122
|
+
order: z.string().optional(),
|
|
123
|
+
query: z.string().optional(),
|
|
124
|
+
raw: z.string().optional(),
|
|
125
|
+
sort: z.string().optional(),
|
|
126
|
+
startGte: z.string().optional(),
|
|
127
|
+
updatedGte: z.string().optional(),
|
|
128
|
+
}).transform((v) => {
|
|
129
|
+
return remap$(v, {
|
|
130
|
+
categoryId: "category_id",
|
|
131
|
+
connectionId: "connection_id",
|
|
132
|
+
contactId: "contact_id",
|
|
133
|
+
endLe: "end_le",
|
|
134
|
+
endLt: "end_lt",
|
|
135
|
+
startGte: "start_gte",
|
|
136
|
+
updatedGte: "updated_gte",
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @internal
|
|
142
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
143
|
+
*/
|
|
144
|
+
export namespace ListAccountingCashflowsRequest$ {
|
|
145
|
+
/** @deprecated use `ListAccountingCashflowsRequest$inboundSchema` instead. */
|
|
146
|
+
export const inboundSchema = ListAccountingCashflowsRequest$inboundSchema;
|
|
147
|
+
/** @deprecated use `ListAccountingCashflowsRequest$outboundSchema` instead. */
|
|
148
|
+
export const outboundSchema = ListAccountingCashflowsRequest$outboundSchema;
|
|
149
|
+
/** @deprecated use `ListAccountingCashflowsRequest$Outbound` instead. */
|
|
150
|
+
export type Outbound = ListAccountingCashflowsRequest$Outbound;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function listAccountingCashflowsRequestToJSON(
|
|
154
|
+
listAccountingCashflowsRequest: ListAccountingCashflowsRequest,
|
|
155
|
+
): string {
|
|
156
|
+
return JSON.stringify(
|
|
157
|
+
ListAccountingCashflowsRequest$outboundSchema.parse(
|
|
158
|
+
listAccountingCashflowsRequest,
|
|
159
|
+
),
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function listAccountingCashflowsRequestFromJSON(
|
|
164
|
+
jsonString: string,
|
|
165
|
+
): SafeParseResult<ListAccountingCashflowsRequest, SDKValidationError> {
|
|
166
|
+
return safeParse(
|
|
167
|
+
jsonString,
|
|
168
|
+
(x) => ListAccountingCashflowsRequest$inboundSchema.parse(JSON.parse(x)),
|
|
169
|
+
`Failed to parse 'ListAccountingCashflowsRequest' from JSON`,
|
|
170
|
+
);
|
|
171
|
+
}
|