@unified-api/typescript-sdk 2.6.3 → 2.7.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 +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/lib/config.js.map +1 -1
- 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/commerceitem.d.ts +2 -0
- package/sdk/models/shared/commerceitem.d.ts.map +1 -1
- package/sdk/models/shared/commerceitem.js +4 -0
- package/sdk/models/shared/commerceitem.js.map +1 -1
- 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/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/storagefile.d.ts +2 -0
- package/sdk/models/shared/storagefile.d.ts.map +1 -1
- package/sdk/models/shared/storagefile.js +2 -0
- package/sdk/models/shared/storagefile.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/commerceitem.ts +6 -0
- package/src/sdk/models/shared/index.ts +3 -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/storagefile.ts +4 -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,124 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { UnifiedToCore } from "../core.js";
|
|
7
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
20
|
+
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
|
21
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
22
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
23
|
+
import { Result } from "../sdk/types/fp.js";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Remove an order
|
|
27
|
+
*/
|
|
28
|
+
export async function orderRemoveAccountingOrder(
|
|
29
|
+
client: UnifiedToCore,
|
|
30
|
+
request: operations.RemoveAccountingOrderRequest,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): Promise<
|
|
33
|
+
Result<
|
|
34
|
+
void,
|
|
35
|
+
| SDKError
|
|
36
|
+
| SDKValidationError
|
|
37
|
+
| UnexpectedClientError
|
|
38
|
+
| InvalidRequestError
|
|
39
|
+
| RequestAbortedError
|
|
40
|
+
| RequestTimeoutError
|
|
41
|
+
| ConnectionError
|
|
42
|
+
>
|
|
43
|
+
> {
|
|
44
|
+
const parsed = safeParse(
|
|
45
|
+
request,
|
|
46
|
+
(value) =>
|
|
47
|
+
operations.RemoveAccountingOrderRequest$outboundSchema.parse(value),
|
|
48
|
+
"Input validation failed",
|
|
49
|
+
);
|
|
50
|
+
if (!parsed.ok) {
|
|
51
|
+
return parsed;
|
|
52
|
+
}
|
|
53
|
+
const payload = parsed.value;
|
|
54
|
+
const body = null;
|
|
55
|
+
|
|
56
|
+
const pathParams = {
|
|
57
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
58
|
+
explode: false,
|
|
59
|
+
charEncoding: "percent",
|
|
60
|
+
}),
|
|
61
|
+
id: encodeSimple("id", payload.id, {
|
|
62
|
+
explode: false,
|
|
63
|
+
charEncoding: "percent",
|
|
64
|
+
}),
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const path = pathToFunc("/accounting/{connection_id}/order/{id}")(pathParams);
|
|
68
|
+
|
|
69
|
+
const headers = new Headers({
|
|
70
|
+
Accept: "*/*",
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
74
|
+
const context = {
|
|
75
|
+
operationID: "removeAccountingOrder",
|
|
76
|
+
oAuth2Scopes: [],
|
|
77
|
+
securitySource: client._options.security,
|
|
78
|
+
};
|
|
79
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
80
|
+
|
|
81
|
+
const requestRes = client._createRequest(context, {
|
|
82
|
+
security: requestSecurity,
|
|
83
|
+
method: "DELETE",
|
|
84
|
+
path: path,
|
|
85
|
+
headers: headers,
|
|
86
|
+
body: body,
|
|
87
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
88
|
+
}, options);
|
|
89
|
+
if (!requestRes.ok) {
|
|
90
|
+
return requestRes;
|
|
91
|
+
}
|
|
92
|
+
const req = requestRes.value;
|
|
93
|
+
|
|
94
|
+
const doResult = await client._do(req, {
|
|
95
|
+
context,
|
|
96
|
+
errorCodes: ["4XX", "5XX"],
|
|
97
|
+
retryConfig: options?.retries
|
|
98
|
+
|| client._options.retryConfig,
|
|
99
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
100
|
+
});
|
|
101
|
+
if (!doResult.ok) {
|
|
102
|
+
return doResult;
|
|
103
|
+
}
|
|
104
|
+
const response = doResult.value;
|
|
105
|
+
|
|
106
|
+
const [result] = await M.match<
|
|
107
|
+
void,
|
|
108
|
+
| SDKError
|
|
109
|
+
| SDKValidationError
|
|
110
|
+
| UnexpectedClientError
|
|
111
|
+
| InvalidRequestError
|
|
112
|
+
| RequestAbortedError
|
|
113
|
+
| RequestTimeoutError
|
|
114
|
+
| ConnectionError
|
|
115
|
+
>(
|
|
116
|
+
M.fail(["4XX", "5XX"]),
|
|
117
|
+
M.nil([200, "default"], z.void()),
|
|
118
|
+
)(response);
|
|
119
|
+
if (!result.ok) {
|
|
120
|
+
return result;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return result;
|
|
124
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { UnifiedToCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
19
|
+
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
|
20
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
21
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
22
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
23
|
+
import { Result } from "../sdk/types/fp.js";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Update an order
|
|
27
|
+
*/
|
|
28
|
+
export async function orderUpdateAccountingOrder(
|
|
29
|
+
client: UnifiedToCore,
|
|
30
|
+
request: operations.UpdateAccountingOrderRequest,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): Promise<
|
|
33
|
+
Result<
|
|
34
|
+
shared.AccountingOrder,
|
|
35
|
+
| SDKError
|
|
36
|
+
| SDKValidationError
|
|
37
|
+
| UnexpectedClientError
|
|
38
|
+
| InvalidRequestError
|
|
39
|
+
| RequestAbortedError
|
|
40
|
+
| RequestTimeoutError
|
|
41
|
+
| ConnectionError
|
|
42
|
+
>
|
|
43
|
+
> {
|
|
44
|
+
const parsed = safeParse(
|
|
45
|
+
request,
|
|
46
|
+
(value) =>
|
|
47
|
+
operations.UpdateAccountingOrderRequest$outboundSchema.parse(value),
|
|
48
|
+
"Input validation failed",
|
|
49
|
+
);
|
|
50
|
+
if (!parsed.ok) {
|
|
51
|
+
return parsed;
|
|
52
|
+
}
|
|
53
|
+
const payload = parsed.value;
|
|
54
|
+
const body = encodeJSON("body", payload.AccountingOrder, { explode: true });
|
|
55
|
+
|
|
56
|
+
const pathParams = {
|
|
57
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
58
|
+
explode: false,
|
|
59
|
+
charEncoding: "percent",
|
|
60
|
+
}),
|
|
61
|
+
id: encodeSimple("id", payload.id, {
|
|
62
|
+
explode: false,
|
|
63
|
+
charEncoding: "percent",
|
|
64
|
+
}),
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const path = pathToFunc("/accounting/{connection_id}/order/{id}")(pathParams);
|
|
68
|
+
|
|
69
|
+
const query = encodeFormQuery({
|
|
70
|
+
"fields": payload.fields,
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const headers = new Headers({
|
|
74
|
+
"Content-Type": "application/json",
|
|
75
|
+
Accept: "application/json",
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
79
|
+
const context = {
|
|
80
|
+
operationID: "updateAccountingOrder",
|
|
81
|
+
oAuth2Scopes: [],
|
|
82
|
+
securitySource: client._options.security,
|
|
83
|
+
};
|
|
84
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
85
|
+
|
|
86
|
+
const requestRes = client._createRequest(context, {
|
|
87
|
+
security: requestSecurity,
|
|
88
|
+
method: "PUT",
|
|
89
|
+
path: path,
|
|
90
|
+
headers: headers,
|
|
91
|
+
query: query,
|
|
92
|
+
body: body,
|
|
93
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
94
|
+
}, options);
|
|
95
|
+
if (!requestRes.ok) {
|
|
96
|
+
return requestRes;
|
|
97
|
+
}
|
|
98
|
+
const req = requestRes.value;
|
|
99
|
+
|
|
100
|
+
const doResult = await client._do(req, {
|
|
101
|
+
context,
|
|
102
|
+
errorCodes: ["4XX", "5XX"],
|
|
103
|
+
retryConfig: options?.retries
|
|
104
|
+
|| client._options.retryConfig,
|
|
105
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
106
|
+
});
|
|
107
|
+
if (!doResult.ok) {
|
|
108
|
+
return doResult;
|
|
109
|
+
}
|
|
110
|
+
const response = doResult.value;
|
|
111
|
+
|
|
112
|
+
const [result] = await M.match<
|
|
113
|
+
shared.AccountingOrder,
|
|
114
|
+
| SDKError
|
|
115
|
+
| SDKValidationError
|
|
116
|
+
| UnexpectedClientError
|
|
117
|
+
| InvalidRequestError
|
|
118
|
+
| RequestAbortedError
|
|
119
|
+
| RequestTimeoutError
|
|
120
|
+
| ConnectionError
|
|
121
|
+
>(
|
|
122
|
+
M.json(200, shared.AccountingOrder$inboundSchema),
|
|
123
|
+
M.fail(["4XX", "5XX"]),
|
|
124
|
+
)(response);
|
|
125
|
+
if (!result.ok) {
|
|
126
|
+
return result;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return result;
|
|
130
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -65,8 +65,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.0",
|
|
68
|
-
sdkVersion: "2.
|
|
69
|
-
genVersion: "2.438.
|
|
68
|
+
sdkVersion: "2.7.0",
|
|
69
|
+
genVersion: "2.438.15",
|
|
70
70
|
userAgent:
|
|
71
|
-
"speakeasy-sdk/typescript 2.
|
|
71
|
+
"speakeasy-sdk/typescript 2.7.0 2.438.15 1.0 @unified-api/typescript-sdk",
|
|
72
72
|
} as const;
|
package/src/sdk/accounting.ts
CHANGED
|
@@ -6,12 +6,14 @@ import { accountingCreateAccountingAccount } from "../funcs/accountingCreateAcco
|
|
|
6
6
|
import { accountingCreateAccountingContact } from "../funcs/accountingCreateAccountingContact.js";
|
|
7
7
|
import { accountingCreateAccountingInvoice } from "../funcs/accountingCreateAccountingInvoice.js";
|
|
8
8
|
import { accountingCreateAccountingJournal } from "../funcs/accountingCreateAccountingJournal.js";
|
|
9
|
+
import { accountingCreateAccountingOrder } from "../funcs/accountingCreateAccountingOrder.js";
|
|
9
10
|
import { accountingCreateAccountingTaxrate } from "../funcs/accountingCreateAccountingTaxrate.js";
|
|
10
11
|
import { accountingCreateAccountingTransaction } from "../funcs/accountingCreateAccountingTransaction.js";
|
|
11
12
|
import { accountingGetAccountingAccount } from "../funcs/accountingGetAccountingAccount.js";
|
|
12
13
|
import { accountingGetAccountingContact } from "../funcs/accountingGetAccountingContact.js";
|
|
13
14
|
import { accountingGetAccountingInvoice } from "../funcs/accountingGetAccountingInvoice.js";
|
|
14
15
|
import { accountingGetAccountingJournal } from "../funcs/accountingGetAccountingJournal.js";
|
|
16
|
+
import { accountingGetAccountingOrder } from "../funcs/accountingGetAccountingOrder.js";
|
|
15
17
|
import { accountingGetAccountingOrganization } from "../funcs/accountingGetAccountingOrganization.js";
|
|
16
18
|
import { accountingGetAccountingTaxrate } from "../funcs/accountingGetAccountingTaxrate.js";
|
|
17
19
|
import { accountingGetAccountingTransaction } from "../funcs/accountingGetAccountingTransaction.js";
|
|
@@ -19,6 +21,7 @@ import { accountingListAccountingAccounts } from "../funcs/accountingListAccount
|
|
|
19
21
|
import { accountingListAccountingContacts } from "../funcs/accountingListAccountingContacts.js";
|
|
20
22
|
import { accountingListAccountingInvoices } from "../funcs/accountingListAccountingInvoices.js";
|
|
21
23
|
import { accountingListAccountingJournals } from "../funcs/accountingListAccountingJournals.js";
|
|
24
|
+
import { accountingListAccountingOrders } from "../funcs/accountingListAccountingOrders.js";
|
|
22
25
|
import { accountingListAccountingOrganizations } from "../funcs/accountingListAccountingOrganizations.js";
|
|
23
26
|
import { accountingListAccountingTaxrates } from "../funcs/accountingListAccountingTaxrates.js";
|
|
24
27
|
import { accountingListAccountingTransactions } from "../funcs/accountingListAccountingTransactions.js";
|
|
@@ -26,18 +29,21 @@ import { accountingPatchAccountingAccount } from "../funcs/accountingPatchAccoun
|
|
|
26
29
|
import { accountingPatchAccountingContact } from "../funcs/accountingPatchAccountingContact.js";
|
|
27
30
|
import { accountingPatchAccountingInvoice } from "../funcs/accountingPatchAccountingInvoice.js";
|
|
28
31
|
import { accountingPatchAccountingJournal } from "../funcs/accountingPatchAccountingJournal.js";
|
|
32
|
+
import { accountingPatchAccountingOrder } from "../funcs/accountingPatchAccountingOrder.js";
|
|
29
33
|
import { accountingPatchAccountingTaxrate } from "../funcs/accountingPatchAccountingTaxrate.js";
|
|
30
34
|
import { accountingPatchAccountingTransaction } from "../funcs/accountingPatchAccountingTransaction.js";
|
|
31
35
|
import { accountingRemoveAccountingAccount } from "../funcs/accountingRemoveAccountingAccount.js";
|
|
32
36
|
import { accountingRemoveAccountingContact } from "../funcs/accountingRemoveAccountingContact.js";
|
|
33
37
|
import { accountingRemoveAccountingInvoice } from "../funcs/accountingRemoveAccountingInvoice.js";
|
|
34
38
|
import { accountingRemoveAccountingJournal } from "../funcs/accountingRemoveAccountingJournal.js";
|
|
39
|
+
import { accountingRemoveAccountingOrder } from "../funcs/accountingRemoveAccountingOrder.js";
|
|
35
40
|
import { accountingRemoveAccountingTaxrate } from "../funcs/accountingRemoveAccountingTaxrate.js";
|
|
36
41
|
import { accountingRemoveAccountingTransaction } from "../funcs/accountingRemoveAccountingTransaction.js";
|
|
37
42
|
import { accountingUpdateAccountingAccount } from "../funcs/accountingUpdateAccountingAccount.js";
|
|
38
43
|
import { accountingUpdateAccountingContact } from "../funcs/accountingUpdateAccountingContact.js";
|
|
39
44
|
import { accountingUpdateAccountingInvoice } from "../funcs/accountingUpdateAccountingInvoice.js";
|
|
40
45
|
import { accountingUpdateAccountingJournal } from "../funcs/accountingUpdateAccountingJournal.js";
|
|
46
|
+
import { accountingUpdateAccountingOrder } from "../funcs/accountingUpdateAccountingOrder.js";
|
|
41
47
|
import { accountingUpdateAccountingTaxrate } from "../funcs/accountingUpdateAccountingTaxrate.js";
|
|
42
48
|
import { accountingUpdateAccountingTransaction } from "../funcs/accountingUpdateAccountingTransaction.js";
|
|
43
49
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
@@ -102,6 +108,20 @@ export class Accounting extends ClientSDK {
|
|
|
102
108
|
));
|
|
103
109
|
}
|
|
104
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Create an order
|
|
113
|
+
*/
|
|
114
|
+
async createAccountingOrder(
|
|
115
|
+
request: operations.CreateAccountingOrderRequest,
|
|
116
|
+
options?: RequestOptions,
|
|
117
|
+
): Promise<shared.AccountingOrder> {
|
|
118
|
+
return unwrapAsync(accountingCreateAccountingOrder(
|
|
119
|
+
this,
|
|
120
|
+
request,
|
|
121
|
+
options,
|
|
122
|
+
));
|
|
123
|
+
}
|
|
124
|
+
|
|
105
125
|
/**
|
|
106
126
|
* Create a taxrate
|
|
107
127
|
*/
|
|
@@ -186,6 +206,20 @@ export class Accounting extends ClientSDK {
|
|
|
186
206
|
));
|
|
187
207
|
}
|
|
188
208
|
|
|
209
|
+
/**
|
|
210
|
+
* Retrieve an order
|
|
211
|
+
*/
|
|
212
|
+
async getAccountingOrder(
|
|
213
|
+
request: operations.GetAccountingOrderRequest,
|
|
214
|
+
options?: RequestOptions,
|
|
215
|
+
): Promise<shared.AccountingOrder> {
|
|
216
|
+
return unwrapAsync(accountingGetAccountingOrder(
|
|
217
|
+
this,
|
|
218
|
+
request,
|
|
219
|
+
options,
|
|
220
|
+
));
|
|
221
|
+
}
|
|
222
|
+
|
|
189
223
|
/**
|
|
190
224
|
* Retrieve an organization
|
|
191
225
|
*/
|
|
@@ -284,6 +318,20 @@ export class Accounting extends ClientSDK {
|
|
|
284
318
|
));
|
|
285
319
|
}
|
|
286
320
|
|
|
321
|
+
/**
|
|
322
|
+
* List all orders
|
|
323
|
+
*/
|
|
324
|
+
async listAccountingOrders(
|
|
325
|
+
request: operations.ListAccountingOrdersRequest,
|
|
326
|
+
options?: RequestOptions,
|
|
327
|
+
): Promise<Array<shared.AccountingOrder>> {
|
|
328
|
+
return unwrapAsync(accountingListAccountingOrders(
|
|
329
|
+
this,
|
|
330
|
+
request,
|
|
331
|
+
options,
|
|
332
|
+
));
|
|
333
|
+
}
|
|
334
|
+
|
|
287
335
|
/**
|
|
288
336
|
* List all organizations
|
|
289
337
|
*/
|
|
@@ -382,6 +430,20 @@ export class Accounting extends ClientSDK {
|
|
|
382
430
|
));
|
|
383
431
|
}
|
|
384
432
|
|
|
433
|
+
/**
|
|
434
|
+
* Update an order
|
|
435
|
+
*/
|
|
436
|
+
async patchAccountingOrder(
|
|
437
|
+
request: operations.PatchAccountingOrderRequest,
|
|
438
|
+
options?: RequestOptions,
|
|
439
|
+
): Promise<shared.AccountingOrder> {
|
|
440
|
+
return unwrapAsync(accountingPatchAccountingOrder(
|
|
441
|
+
this,
|
|
442
|
+
request,
|
|
443
|
+
options,
|
|
444
|
+
));
|
|
445
|
+
}
|
|
446
|
+
|
|
385
447
|
/**
|
|
386
448
|
* Update a taxrate
|
|
387
449
|
*/
|
|
@@ -466,6 +528,20 @@ export class Accounting extends ClientSDK {
|
|
|
466
528
|
));
|
|
467
529
|
}
|
|
468
530
|
|
|
531
|
+
/**
|
|
532
|
+
* Remove an order
|
|
533
|
+
*/
|
|
534
|
+
async removeAccountingOrder(
|
|
535
|
+
request: operations.RemoveAccountingOrderRequest,
|
|
536
|
+
options?: RequestOptions,
|
|
537
|
+
): Promise<void> {
|
|
538
|
+
return unwrapAsync(accountingRemoveAccountingOrder(
|
|
539
|
+
this,
|
|
540
|
+
request,
|
|
541
|
+
options,
|
|
542
|
+
));
|
|
543
|
+
}
|
|
544
|
+
|
|
469
545
|
/**
|
|
470
546
|
* Remove a taxrate
|
|
471
547
|
*/
|
|
@@ -550,6 +626,20 @@ export class Accounting extends ClientSDK {
|
|
|
550
626
|
));
|
|
551
627
|
}
|
|
552
628
|
|
|
629
|
+
/**
|
|
630
|
+
* Update an order
|
|
631
|
+
*/
|
|
632
|
+
async updateAccountingOrder(
|
|
633
|
+
request: operations.UpdateAccountingOrderRequest,
|
|
634
|
+
options?: RequestOptions,
|
|
635
|
+
): Promise<shared.AccountingOrder> {
|
|
636
|
+
return unwrapAsync(accountingUpdateAccountingOrder(
|
|
637
|
+
this,
|
|
638
|
+
request,
|
|
639
|
+
options,
|
|
640
|
+
));
|
|
641
|
+
}
|
|
642
|
+
|
|
553
643
|
/**
|
|
554
644
|
* Update a taxrate
|
|
555
645
|
*/
|
|
@@ -0,0 +1,71 @@
|
|
|
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 CreateAccountingOrderRequest = {
|
|
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
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const CreateAccountingOrderRequest$inboundSchema: z.ZodType<
|
|
23
|
+
CreateAccountingOrderRequest,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
AccountingOrder: shared.AccountingOrder$inboundSchema.optional(),
|
|
28
|
+
connection_id: z.string(),
|
|
29
|
+
fields: z.array(z.string()).optional(),
|
|
30
|
+
}).transform((v) => {
|
|
31
|
+
return remap$(v, {
|
|
32
|
+
"AccountingOrder": "accountingOrder",
|
|
33
|
+
"connection_id": "connectionId",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type CreateAccountingOrderRequest$Outbound = {
|
|
39
|
+
AccountingOrder?: shared.AccountingOrder$Outbound | undefined;
|
|
40
|
+
connection_id: string;
|
|
41
|
+
fields?: Array<string> | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const CreateAccountingOrderRequest$outboundSchema: z.ZodType<
|
|
46
|
+
CreateAccountingOrderRequest$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
CreateAccountingOrderRequest
|
|
49
|
+
> = z.object({
|
|
50
|
+
accountingOrder: shared.AccountingOrder$outboundSchema.optional(),
|
|
51
|
+
connectionId: z.string(),
|
|
52
|
+
fields: z.array(z.string()).optional(),
|
|
53
|
+
}).transform((v) => {
|
|
54
|
+
return remap$(v, {
|
|
55
|
+
accountingOrder: "AccountingOrder",
|
|
56
|
+
connectionId: "connection_id",
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
63
|
+
*/
|
|
64
|
+
export namespace CreateAccountingOrderRequest$ {
|
|
65
|
+
/** @deprecated use `CreateAccountingOrderRequest$inboundSchema` instead. */
|
|
66
|
+
export const inboundSchema = CreateAccountingOrderRequest$inboundSchema;
|
|
67
|
+
/** @deprecated use `CreateAccountingOrderRequest$outboundSchema` instead. */
|
|
68
|
+
export const outboundSchema = CreateAccountingOrderRequest$outboundSchema;
|
|
69
|
+
/** @deprecated use `CreateAccountingOrderRequest$Outbound` instead. */
|
|
70
|
+
export type Outbound = CreateAccountingOrderRequest$Outbound;
|
|
71
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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 GetAccountingOrderRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* ID of the connection
|
|
11
|
+
*/
|
|
12
|
+
connectionId: string;
|
|
13
|
+
/**
|
|
14
|
+
* Comma-delimited fields to return
|
|
15
|
+
*/
|
|
16
|
+
fields?: Array<string> | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* ID of the Order
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const GetAccountingOrderRequest$inboundSchema: z.ZodType<
|
|
25
|
+
GetAccountingOrderRequest,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
connection_id: z.string(),
|
|
30
|
+
fields: z.array(z.string()).optional(),
|
|
31
|
+
id: z.string(),
|
|
32
|
+
}).transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"connection_id": "connectionId",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type GetAccountingOrderRequest$Outbound = {
|
|
40
|
+
connection_id: string;
|
|
41
|
+
fields?: Array<string> | undefined;
|
|
42
|
+
id: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const GetAccountingOrderRequest$outboundSchema: z.ZodType<
|
|
47
|
+
GetAccountingOrderRequest$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
GetAccountingOrderRequest
|
|
50
|
+
> = z.object({
|
|
51
|
+
connectionId: z.string(),
|
|
52
|
+
fields: z.array(z.string()).optional(),
|
|
53
|
+
id: z.string(),
|
|
54
|
+
}).transform((v) => {
|
|
55
|
+
return remap$(v, {
|
|
56
|
+
connectionId: "connection_id",
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
63
|
+
*/
|
|
64
|
+
export namespace GetAccountingOrderRequest$ {
|
|
65
|
+
/** @deprecated use `GetAccountingOrderRequest$inboundSchema` instead. */
|
|
66
|
+
export const inboundSchema = GetAccountingOrderRequest$inboundSchema;
|
|
67
|
+
/** @deprecated use `GetAccountingOrderRequest$outboundSchema` instead. */
|
|
68
|
+
export const outboundSchema = GetAccountingOrderRequest$outboundSchema;
|
|
69
|
+
/** @deprecated use `GetAccountingOrderRequest$Outbound` instead. */
|
|
70
|
+
export type Outbound = GetAccountingOrderRequest$Outbound;
|
|
71
|
+
}
|
|
@@ -21,6 +21,8 @@ export const Scopes = {
|
|
|
21
21
|
AccountingTaxrateRead: "accounting_taxrate_read",
|
|
22
22
|
AccountingTaxrateWrite: "accounting_taxrate_write",
|
|
23
23
|
AccountingOrganizationRead: "accounting_organization_read",
|
|
24
|
+
AccountingOrderRead: "accounting_order_read",
|
|
25
|
+
AccountingOrderWrite: "accounting_order_write",
|
|
24
26
|
PaymentPaymentRead: "payment_payment_read",
|
|
25
27
|
PaymentPaymentWrite: "payment_payment_write",
|
|
26
28
|
PaymentPayoutRead: "payment_payout_read",
|
|
@@ -6,6 +6,7 @@ export * from "./createaccountingaccount.js";
|
|
|
6
6
|
export * from "./createaccountingcontact.js";
|
|
7
7
|
export * from "./createaccountinginvoice.js";
|
|
8
8
|
export * from "./createaccountingjournal.js";
|
|
9
|
+
export * from "./createaccountingorder.js";
|
|
9
10
|
export * from "./createaccountingtaxrate.js";
|
|
10
11
|
export * from "./createaccountingtransaction.js";
|
|
11
12
|
export * from "./createatsactivity.js";
|
|
@@ -53,6 +54,7 @@ export * from "./getaccountingaccount.js";
|
|
|
53
54
|
export * from "./getaccountingcontact.js";
|
|
54
55
|
export * from "./getaccountinginvoice.js";
|
|
55
56
|
export * from "./getaccountingjournal.js";
|
|
57
|
+
export * from "./getaccountingorder.js";
|
|
56
58
|
export * from "./getaccountingorganization.js";
|
|
57
59
|
export * from "./getaccountingtaxrate.js";
|
|
58
60
|
export * from "./getaccountingtransaction.js";
|
|
@@ -107,6 +109,7 @@ export * from "./listaccountingaccounts.js";
|
|
|
107
109
|
export * from "./listaccountingcontacts.js";
|
|
108
110
|
export * from "./listaccountinginvoices.js";
|
|
109
111
|
export * from "./listaccountingjournals.js";
|
|
112
|
+
export * from "./listaccountingorders.js";
|
|
110
113
|
export * from "./listaccountingorganizations.js";
|
|
111
114
|
export * from "./listaccountingtaxrates.js";
|
|
112
115
|
export * from "./listaccountingtransactions.js";
|
|
@@ -169,6 +172,7 @@ export * from "./patchaccountingaccount.js";
|
|
|
169
172
|
export * from "./patchaccountingcontact.js";
|
|
170
173
|
export * from "./patchaccountinginvoice.js";
|
|
171
174
|
export * from "./patchaccountingjournal.js";
|
|
175
|
+
export * from "./patchaccountingorder.js";
|
|
172
176
|
export * from "./patchaccountingtaxrate.js";
|
|
173
177
|
export * from "./patchaccountingtransaction.js";
|
|
174
178
|
export * from "./patchatsactivity.js";
|
|
@@ -217,6 +221,7 @@ export * from "./removeaccountingaccount.js";
|
|
|
217
221
|
export * from "./removeaccountingcontact.js";
|
|
218
222
|
export * from "./removeaccountinginvoice.js";
|
|
219
223
|
export * from "./removeaccountingjournal.js";
|
|
224
|
+
export * from "./removeaccountingorder.js";
|
|
220
225
|
export * from "./removeaccountingtaxrate.js";
|
|
221
226
|
export * from "./removeaccountingtransaction.js";
|
|
222
227
|
export * from "./removeatsactivity.js";
|
|
@@ -263,6 +268,7 @@ export * from "./updateaccountingaccount.js";
|
|
|
263
268
|
export * from "./updateaccountingcontact.js";
|
|
264
269
|
export * from "./updateaccountinginvoice.js";
|
|
265
270
|
export * from "./updateaccountingjournal.js";
|
|
271
|
+
export * from "./updateaccountingorder.js";
|
|
266
272
|
export * from "./updateaccountingtaxrate.js";
|
|
267
273
|
export * from "./updateaccountingtransaction.js";
|
|
268
274
|
export * from "./updateatsactivity.js";
|