@apideck/unify 0.25.0 → 0.26.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.
Files changed (97) hide show
  1. package/README.md +7 -0
  2. package/docs/sdks/categories/README.md +181 -0
  3. package/funcs/accountingCategoriesGet.d.ts +18 -0
  4. package/funcs/accountingCategoriesGet.d.ts.map +1 -0
  5. package/funcs/accountingCategoriesGet.js +133 -0
  6. package/funcs/accountingCategoriesGet.js.map +1 -0
  7. package/funcs/accountingCategoriesList.d.ts +21 -0
  8. package/funcs/accountingCategoriesList.d.ts.map +1 -0
  9. package/funcs/accountingCategoriesList.js +151 -0
  10. package/funcs/accountingCategoriesList.js.map +1 -0
  11. package/jsr.json +1 -1
  12. package/lib/config.d.ts +4 -4
  13. package/lib/config.js +4 -4
  14. package/lib/files.d.ts +5 -0
  15. package/lib/files.d.ts.map +1 -1
  16. package/lib/files.js +41 -0
  17. package/lib/files.js.map +1 -1
  18. package/lib/security.d.ts +2 -2
  19. package/lib/security.d.ts.map +1 -1
  20. package/models/components/bill.d.ts +2 -2
  21. package/models/components/category.d.ts +114 -0
  22. package/models/components/category.d.ts.map +1 -0
  23. package/models/components/category.js +121 -0
  24. package/models/components/category.js.map +1 -0
  25. package/models/components/contact.d.ts +4 -4
  26. package/models/components/contact.d.ts.map +1 -1
  27. package/models/components/contact.js +4 -4
  28. package/models/components/contact.js.map +1 -1
  29. package/models/components/expense.d.ts +10 -0
  30. package/models/components/expense.d.ts.map +1 -1
  31. package/models/components/expense.js +4 -0
  32. package/models/components/expense.js.map +1 -1
  33. package/models/components/formfieldoption.d.ts +6 -6
  34. package/models/components/formfieldoption.d.ts.map +1 -1
  35. package/models/components/formfieldoption.js +4 -4
  36. package/models/components/formfieldoption.js.map +1 -1
  37. package/models/components/getcategoriesresponse.d.ts +79 -0
  38. package/models/components/getcategoriesresponse.d.ts.map +1 -0
  39. package/models/components/getcategoriesresponse.js +89 -0
  40. package/models/components/getcategoriesresponse.js.map +1 -0
  41. package/models/components/getcategoryresponse.d.ts +67 -0
  42. package/models/components/getcategoryresponse.d.ts.map +1 -0
  43. package/models/components/getcategoryresponse.js +83 -0
  44. package/models/components/getcategoryresponse.js.map +1 -0
  45. package/models/components/index.d.ts +3 -0
  46. package/models/components/index.d.ts.map +1 -1
  47. package/models/components/index.js +3 -0
  48. package/models/components/index.js.map +1 -1
  49. package/models/components/invoice.d.ts +2 -2
  50. package/models/components/supplier.d.ts +10 -0
  51. package/models/components/supplier.d.ts.map +1 -1
  52. package/models/components/supplier.js +8 -0
  53. package/models/components/supplier.js.map +1 -1
  54. package/models/operations/accountingcategoriesall.d.ts +131 -0
  55. package/models/operations/accountingcategoriesall.d.ts.map +1 -0
  56. package/models/operations/accountingcategoriesall.js +149 -0
  57. package/models/operations/accountingcategoriesall.js.map +1 -0
  58. package/models/operations/accountingcategoriesone.d.ts +126 -0
  59. package/models/operations/accountingcategoriesone.d.ts.map +1 -0
  60. package/models/operations/accountingcategoriesone.js +145 -0
  61. package/models/operations/accountingcategoriesone.js.map +1 -0
  62. package/models/operations/index.d.ts +2 -0
  63. package/models/operations/index.d.ts.map +1 -1
  64. package/models/operations/index.js +2 -0
  65. package/models/operations/index.js.map +1 -1
  66. package/package.json +1 -1
  67. package/sdk/accounting.d.ts +3 -0
  68. package/sdk/accounting.d.ts.map +1 -1
  69. package/sdk/accounting.js +4 -0
  70. package/sdk/accounting.js.map +1 -1
  71. package/sdk/categories.d.ts +22 -0
  72. package/sdk/categories.d.ts.map +1 -0
  73. package/sdk/categories.js +33 -0
  74. package/sdk/categories.js.map +1 -0
  75. package/src/__tests__/categories.test.ts +127 -0
  76. package/src/funcs/accountingCategoriesGet.ts +230 -0
  77. package/src/funcs/accountingCategoriesList.ts +288 -0
  78. package/src/lib/config.ts +4 -4
  79. package/src/lib/files.ts +42 -0
  80. package/src/lib/security.ts +2 -2
  81. package/src/models/components/bill.ts +2 -2
  82. package/src/models/components/category.ts +193 -0
  83. package/src/models/components/contact.ts +8 -8
  84. package/src/models/components/expense.ts +14 -0
  85. package/src/models/components/formfieldoption.ts +12 -12
  86. package/src/models/components/getcategoriesresponse.ts +154 -0
  87. package/src/models/components/getcategoryresponse.ts +128 -0
  88. package/src/models/components/index.ts +3 -0
  89. package/src/models/components/invoice.ts +2 -2
  90. package/src/models/components/supplier.ts +18 -0
  91. package/src/models/operations/accountingcategoriesall.ts +277 -0
  92. package/src/models/operations/accountingcategoriesone.ts +268 -0
  93. package/src/models/operations/index.ts +2 -0
  94. package/src/sdk/accounting.ts +6 -0
  95. package/src/sdk/categories.ts +48 -0
  96. package/src/types/constdatetime.ts +1 -1
  97. package/types/constdatetime.js +1 -1
package/README.md CHANGED
@@ -181,6 +181,11 @@ run();
181
181
  * [update](docs/sdks/bills/README.md#update) - Update Bill
182
182
  * [delete](docs/sdks/bills/README.md#delete) - Delete Bill
183
183
 
184
+ #### [accounting.categories](docs/sdks/categories/README.md)
185
+
186
+ * [list](docs/sdks/categories/README.md#list) - List Categories
187
+ * [get](docs/sdks/categories/README.md#get) - Get Category
188
+
184
189
  #### [accounting.companyInfo](docs/sdks/companyinfo/README.md)
185
190
 
186
191
  * [get](docs/sdks/companyinfo/README.md#get) - Get company info
@@ -732,6 +737,8 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
732
737
  - [`accountingBillsGet`](docs/sdks/bills/README.md#get) - Get Bill
733
738
  - [`accountingBillsList`](docs/sdks/bills/README.md#list) - List Bills
734
739
  - [`accountingBillsUpdate`](docs/sdks/bills/README.md#update) - Update Bill
740
+ - [`accountingCategoriesGet`](docs/sdks/categories/README.md#get) - Get Category
741
+ - [`accountingCategoriesList`](docs/sdks/categories/README.md#list) - List Categories
735
742
  - [`accountingCompanyInfoGet`](docs/sdks/companyinfo/README.md#get) - Get company info
736
743
  - [`accountingCreditNotesCreate`](docs/sdks/creditnotes/README.md#create) - Create Credit Note
737
744
  - [`accountingCreditNotesDelete`](docs/sdks/creditnotes/README.md#delete) - Delete Credit Note
@@ -0,0 +1,181 @@
1
+ # Categories
2
+ (*accounting.categories*)
3
+
4
+ ## Overview
5
+
6
+ ### Available Operations
7
+
8
+ * [list](#list) - List Categories
9
+ * [get](#get) - Get Category
10
+
11
+ ## list
12
+
13
+ List Categories
14
+
15
+ ### Example Usage
16
+
17
+ ```typescript
18
+ import { Apideck } from "@apideck/unify";
19
+
20
+ const apideck = new Apideck({
21
+ consumerId: "test-consumer",
22
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
23
+ apiKey: process.env["APIDECK_API_KEY"] ?? "",
24
+ });
25
+
26
+ async function run() {
27
+ const result = await apideck.accounting.categories.list({
28
+ serviceId: "salesforce",
29
+ fields: "id,updated_at",
30
+ });
31
+
32
+ for await (const page of result) {
33
+ console.log(page);
34
+ }
35
+ }
36
+
37
+ run();
38
+ ```
39
+
40
+ ### Standalone function
41
+
42
+ The standalone function version of this method:
43
+
44
+ ```typescript
45
+ import { ApideckCore } from "@apideck/unify/core.js";
46
+ import { accountingCategoriesList } from "@apideck/unify/funcs/accountingCategoriesList.js";
47
+
48
+ // Use `ApideckCore` for best tree-shaking performance.
49
+ // You can create one instance of it to use across an application.
50
+ const apideck = new ApideckCore({
51
+ consumerId: "test-consumer",
52
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
53
+ apiKey: process.env["APIDECK_API_KEY"] ?? "",
54
+ });
55
+
56
+ async function run() {
57
+ const res = await accountingCategoriesList(apideck, {
58
+ serviceId: "salesforce",
59
+ fields: "id,updated_at",
60
+ });
61
+ if (res.ok) {
62
+ const { value: result } = res;
63
+ for await (const page of result) {
64
+ console.log(page);
65
+ }
66
+ } else {
67
+ console.log("accountingCategoriesList failed:", res.error);
68
+ }
69
+ }
70
+
71
+ run();
72
+ ```
73
+
74
+ ### Parameters
75
+
76
+ | Parameter | Type | Required | Description |
77
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
78
+ | `request` | [operations.AccountingCategoriesAllRequest](../../models/operations/accountingcategoriesallrequest.md) | :heavy_check_mark: | The request object to use for the request. |
79
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
80
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
81
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
82
+
83
+ ### Response
84
+
85
+ **Promise\<[operations.AccountingCategoriesAllResponse](../../models/operations/accountingcategoriesallresponse.md)\>**
86
+
87
+ ### Errors
88
+
89
+ | Error Type | Status Code | Content Type |
90
+ | ------------------------------ | ------------------------------ | ------------------------------ |
91
+ | errors.BadRequestResponse | 400 | application/json |
92
+ | errors.UnauthorizedResponse | 401 | application/json |
93
+ | errors.PaymentRequiredResponse | 402 | application/json |
94
+ | errors.NotFoundResponse | 404 | application/json |
95
+ | errors.UnprocessableResponse | 422 | application/json |
96
+ | errors.APIError | 4XX, 5XX | \*/\* |
97
+
98
+ ## get
99
+
100
+ Get Category
101
+
102
+ ### Example Usage
103
+
104
+ ```typescript
105
+ import { Apideck } from "@apideck/unify";
106
+
107
+ const apideck = new Apideck({
108
+ consumerId: "test-consumer",
109
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
110
+ apiKey: process.env["APIDECK_API_KEY"] ?? "",
111
+ });
112
+
113
+ async function run() {
114
+ const result = await apideck.accounting.categories.get({
115
+ id: "<id>",
116
+ serviceId: "salesforce",
117
+ fields: "id,updated_at",
118
+ });
119
+
120
+ console.log(result);
121
+ }
122
+
123
+ run();
124
+ ```
125
+
126
+ ### Standalone function
127
+
128
+ The standalone function version of this method:
129
+
130
+ ```typescript
131
+ import { ApideckCore } from "@apideck/unify/core.js";
132
+ import { accountingCategoriesGet } from "@apideck/unify/funcs/accountingCategoriesGet.js";
133
+
134
+ // Use `ApideckCore` for best tree-shaking performance.
135
+ // You can create one instance of it to use across an application.
136
+ const apideck = new ApideckCore({
137
+ consumerId: "test-consumer",
138
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
139
+ apiKey: process.env["APIDECK_API_KEY"] ?? "",
140
+ });
141
+
142
+ async function run() {
143
+ const res = await accountingCategoriesGet(apideck, {
144
+ id: "<id>",
145
+ serviceId: "salesforce",
146
+ fields: "id,updated_at",
147
+ });
148
+ if (res.ok) {
149
+ const { value: result } = res;
150
+ console.log(result);
151
+ } else {
152
+ console.log("accountingCategoriesGet failed:", res.error);
153
+ }
154
+ }
155
+
156
+ run();
157
+ ```
158
+
159
+ ### Parameters
160
+
161
+ | Parameter | Type | Required | Description |
162
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
163
+ | `request` | [operations.AccountingCategoriesOneRequest](../../models/operations/accountingcategoriesonerequest.md) | :heavy_check_mark: | The request object to use for the request. |
164
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
165
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
166
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
167
+
168
+ ### Response
169
+
170
+ **Promise\<[operations.AccountingCategoriesOneResponse](../../models/operations/accountingcategoriesoneresponse.md)\>**
171
+
172
+ ### Errors
173
+
174
+ | Error Type | Status Code | Content Type |
175
+ | ------------------------------ | ------------------------------ | ------------------------------ |
176
+ | errors.BadRequestResponse | 400 | application/json |
177
+ | errors.UnauthorizedResponse | 401 | application/json |
178
+ | errors.PaymentRequiredResponse | 402 | application/json |
179
+ | errors.NotFoundResponse | 404 | application/json |
180
+ | errors.UnprocessableResponse | 422 | application/json |
181
+ | errors.APIError | 4XX, 5XX | \*/\* |
@@ -0,0 +1,18 @@
1
+ import { ApideckCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ApideckError } from "../models/errors/apideckerror.js";
4
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
+ import * as errors from "../models/errors/index.js";
6
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { APIPromise } from "../types/async.js";
10
+ import { Result } from "../types/fp.js";
11
+ /**
12
+ * Get Category
13
+ *
14
+ * @remarks
15
+ * Get Category
16
+ */
17
+ export declare function accountingCategoriesGet(client: ApideckCore, request: operations.AccountingCategoriesOneRequest, options?: RequestOptions): APIPromise<Result<operations.AccountingCategoriesOneResponse, errors.BadRequestResponse | errors.UnauthorizedResponse | errors.PaymentRequiredResponse | errors.NotFoundResponse | errors.UnprocessableResponse | ApideckError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ //# sourceMappingURL=accountingCategoriesGet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountingCategoriesGet.d.ts","sourceRoot":"","sources":["../src/funcs/accountingCategoriesGet.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAKzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,+BAA+B,EACxC,MAAM,CAAC,kBAAkB,GACzB,MAAM,CAAC,oBAAoB,GAC3B,MAAM,CAAC,uBAAuB,GAC9B,MAAM,CAAC,gBAAgB,GACvB,MAAM,CAAC,qBAAqB,GAC5B,YAAY,GACZ,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.accountingCategoriesGet = accountingCategoriesGet;
30
+ const encodings_js_1 = require("../lib/encodings.js");
31
+ const M = __importStar(require("../lib/matchers.js"));
32
+ const primitives_js_1 = require("../lib/primitives.js");
33
+ const schemas_js_1 = require("../lib/schemas.js");
34
+ const security_js_1 = require("../lib/security.js");
35
+ const url_js_1 = require("../lib/url.js");
36
+ const errors = __importStar(require("../models/errors/index.js"));
37
+ const operations = __importStar(require("../models/operations/index.js"));
38
+ const async_js_1 = require("../types/async.js");
39
+ /**
40
+ * Get Category
41
+ *
42
+ * @remarks
43
+ * Get Category
44
+ */
45
+ function accountingCategoriesGet(client, request, options) {
46
+ return new async_js_1.APIPromise($do(client, request, options));
47
+ }
48
+ async function $do(client, request, options) {
49
+ const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.AccountingCategoriesOneRequest$outboundSchema.parse(value), "Input validation failed");
50
+ if (!parsed.ok) {
51
+ return [parsed, { status: "invalid" }];
52
+ }
53
+ const payload = parsed.value;
54
+ const body = null;
55
+ const pathParams = {
56
+ id: (0, encodings_js_1.encodeSimple)("id", payload.id, {
57
+ explode: false,
58
+ charEncoding: "percent",
59
+ }),
60
+ };
61
+ const path = (0, url_js_1.pathToFunc)("/accounting/categories/{id}")(pathParams);
62
+ const query = (0, encodings_js_1.encodeFormQuery)({
63
+ "fields": payload.fields,
64
+ "raw": payload.raw,
65
+ });
66
+ const headers = new Headers((0, primitives_js_1.compactMap)({
67
+ Accept: "application/json",
68
+ "x-apideck-app-id": (0, encodings_js_1.encodeSimple)("x-apideck-app-id", payload.appId ?? client._options.appId, { explode: false, charEncoding: "none" }),
69
+ "x-apideck-consumer-id": (0, encodings_js_1.encodeSimple)("x-apideck-consumer-id", payload.consumerId ?? client._options.consumerId, { explode: false, charEncoding: "none" }),
70
+ "x-apideck-service-id": (0, encodings_js_1.encodeSimple)("x-apideck-service-id", payload.serviceId, { explode: false, charEncoding: "none" }),
71
+ }));
72
+ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
73
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
74
+ const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
75
+ const context = {
76
+ options: client._options,
77
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
78
+ operationID: "accounting.categoriesOne",
79
+ oAuth2Scopes: [],
80
+ resolvedSecurity: requestSecurity,
81
+ securitySource: client._options.apiKey,
82
+ retryConfig: options?.retries
83
+ || client._options.retryConfig
84
+ || {
85
+ strategy: "backoff",
86
+ backoff: {
87
+ initialInterval: 500,
88
+ maxInterval: 60000,
89
+ exponent: 1.5,
90
+ maxElapsedTime: 3600000,
91
+ },
92
+ retryConnectionErrors: true,
93
+ }
94
+ || { strategy: "none" },
95
+ retryCodes: options?.retryCodes || ["408", "500", "502", "503", "504"],
96
+ };
97
+ const requestRes = client._createRequest(context, {
98
+ security: requestSecurity,
99
+ method: "GET",
100
+ baseURL: options?.serverURL,
101
+ path: path,
102
+ headers: headers,
103
+ query: query,
104
+ body: body,
105
+ userAgent: client._options.userAgent,
106
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
107
+ }, options);
108
+ if (!requestRes.ok) {
109
+ return [requestRes, { status: "invalid" }];
110
+ }
111
+ const req = requestRes.value;
112
+ const doResult = await client._do(req, {
113
+ context,
114
+ errorCodes: ["400", "401", "402", "404", "422", "4XX", "5XX"],
115
+ retryConfig: context.retryConfig,
116
+ retryCodes: context.retryCodes,
117
+ });
118
+ if (!doResult.ok) {
119
+ return [doResult, { status: "request-error", request: req }];
120
+ }
121
+ const response = doResult.value;
122
+ const responseFields = {
123
+ HttpMeta: { Response: response, Request: req },
124
+ };
125
+ const [result] = await M.match(M.json(200, operations.AccountingCategoriesOneResponse$inboundSchema, {
126
+ key: "GetCategoryResponse",
127
+ }), M.jsonErr(400, errors.BadRequestResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponse$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponse$inboundSchema), M.jsonErr(404, errors.NotFoundResponse$inboundSchema), M.jsonErr(422, errors.UnprocessableResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"), M.json("default", operations.AccountingCategoriesOneResponse$inboundSchema, { key: "UnexpectedErrorResponse" }))(response, req, { extraFields: responseFields });
128
+ if (!result.ok) {
129
+ return [result, { status: "complete", request: req, response }];
130
+ }
131
+ return [result, { status: "complete", request: req, response }];
132
+ }
133
+ //# sourceMappingURL=accountingCategoriesGet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountingCategoriesGet.js","sourceRoot":"","sources":["../src/funcs/accountingCategoriesGet.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AA+BH,0DA2BC;AAvDD,sDAAoE;AACpE,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAS3C,kEAAoD;AAGpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;GAKG;AACH,SAAgB,uBAAuB,CACrC,MAAmB,EACnB,OAAkD,EAClD,OAAwB;IAmBxB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CA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GAAG,EAAE,UAAU,CAAC,6CAA6C,EAAE;QACpE,GAAG,EAAE,qBAAqB;KAC3B,CAAC,EACF,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,gCAAgC,CAAC,EACvD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,kCAAkC,CAAC,EACzD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,qCAAqC,CAAC,EAC5D,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,8BAA8B,CAAC,EACrD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,mCAAmC,CAAC,EAC1D,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CACJ,SAAS,EACT,UAAU,CAAC,6CAA6C,EACxD,EAAE,GAAG,EAAE,yBAAyB,EAAE,CACnC,CACF,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { ApideckCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ApideckError } from "../models/errors/apideckerror.js";
4
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
+ import * as errors from "../models/errors/index.js";
6
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { APIPromise } from "../types/async.js";
10
+ import { Result } from "../types/fp.js";
11
+ import { PageIterator } from "../types/operations.js";
12
+ /**
13
+ * List Categories
14
+ *
15
+ * @remarks
16
+ * List Categories
17
+ */
18
+ export declare function accountingCategoriesList(client: ApideckCore, request: operations.AccountingCategoriesAllRequest, options?: RequestOptions): APIPromise<PageIterator<Result<operations.AccountingCategoriesAllResponse, errors.BadRequestResponse | errors.UnauthorizedResponse | errors.PaymentRequiredResponse | errors.NotFoundResponse | errors.UnprocessableResponse | ApideckError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
19
+ cursor: string;
20
+ }>>;
21
+ //# sourceMappingURL=accountingCategoriesList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountingCategoriesList.d.ts","sourceRoot":"","sources":["../src/funcs/accountingCategoriesList.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAMzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAGL,YAAY,EAEb,MAAM,wBAAwB,CAAC;AAEhC;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,YAAY,CACV,MAAM,CACJ,UAAU,CAAC,+BAA+B,EACxC,MAAM,CAAC,kBAAkB,GACzB,MAAM,CAAC,oBAAoB,GAC3B,MAAM,CAAC,uBAAuB,GAC9B,MAAM,CAAC,gBAAgB,GACvB,MAAM,CAAC,qBAAqB,GAC5B,YAAY,GACZ,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,EACD;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CACnB,CACF,CAMA"}
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.accountingCategoriesList = accountingCategoriesList;
30
+ const dlv_js_1 = require("../lib/dlv.js");
31
+ const encodings_js_1 = require("../lib/encodings.js");
32
+ const M = __importStar(require("../lib/matchers.js"));
33
+ const primitives_js_1 = require("../lib/primitives.js");
34
+ const schemas_js_1 = require("../lib/schemas.js");
35
+ const security_js_1 = require("../lib/security.js");
36
+ const url_js_1 = require("../lib/url.js");
37
+ const errors = __importStar(require("../models/errors/index.js"));
38
+ const operations = __importStar(require("../models/operations/index.js"));
39
+ const async_js_1 = require("../types/async.js");
40
+ const operations_js_1 = require("../types/operations.js");
41
+ /**
42
+ * List Categories
43
+ *
44
+ * @remarks
45
+ * List Categories
46
+ */
47
+ function accountingCategoriesList(client, request, options) {
48
+ return new async_js_1.APIPromise($do(client, request, options));
49
+ }
50
+ async function $do(client, request, options) {
51
+ const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.AccountingCategoriesAllRequest$outboundSchema.parse(value), "Input validation failed");
52
+ if (!parsed.ok) {
53
+ return [(0, operations_js_1.haltIterator)(parsed), { status: "invalid" }];
54
+ }
55
+ const payload = parsed.value;
56
+ const body = null;
57
+ const path = (0, url_js_1.pathToFunc)("/accounting/categories")();
58
+ const query = (0, encodings_js_1.encodeFormQuery)({
59
+ "cursor": payload.cursor,
60
+ "fields": payload.fields,
61
+ "limit": payload.limit,
62
+ "raw": payload.raw,
63
+ });
64
+ const headers = new Headers((0, primitives_js_1.compactMap)({
65
+ Accept: "application/json",
66
+ "x-apideck-app-id": (0, encodings_js_1.encodeSimple)("x-apideck-app-id", payload.appId ?? client._options.appId, { explode: false, charEncoding: "none" }),
67
+ "x-apideck-consumer-id": (0, encodings_js_1.encodeSimple)("x-apideck-consumer-id", payload.consumerId ?? client._options.consumerId, { explode: false, charEncoding: "none" }),
68
+ "x-apideck-service-id": (0, encodings_js_1.encodeSimple)("x-apideck-service-id", payload.serviceId, { explode: false, charEncoding: "none" }),
69
+ }));
70
+ const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
71
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
72
+ const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
73
+ const context = {
74
+ options: client._options,
75
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
76
+ operationID: "accounting.categoriesAll",
77
+ oAuth2Scopes: [],
78
+ resolvedSecurity: requestSecurity,
79
+ securitySource: client._options.apiKey,
80
+ retryConfig: options?.retries
81
+ || client._options.retryConfig
82
+ || {
83
+ strategy: "backoff",
84
+ backoff: {
85
+ initialInterval: 500,
86
+ maxInterval: 60000,
87
+ exponent: 1.5,
88
+ maxElapsedTime: 3600000,
89
+ },
90
+ retryConnectionErrors: true,
91
+ }
92
+ || { strategy: "none" },
93
+ retryCodes: options?.retryCodes || ["408", "500", "502", "503", "504"],
94
+ };
95
+ const requestRes = client._createRequest(context, {
96
+ security: requestSecurity,
97
+ method: "GET",
98
+ baseURL: options?.serverURL,
99
+ path: path,
100
+ headers: headers,
101
+ query: query,
102
+ body: body,
103
+ userAgent: client._options.userAgent,
104
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
105
+ }, options);
106
+ if (!requestRes.ok) {
107
+ return [(0, operations_js_1.haltIterator)(requestRes), { status: "invalid" }];
108
+ }
109
+ const req = requestRes.value;
110
+ const doResult = await client._do(req, {
111
+ context,
112
+ errorCodes: ["400", "401", "402", "404", "422", "4XX", "5XX"],
113
+ retryConfig: context.retryConfig,
114
+ retryCodes: context.retryCodes,
115
+ });
116
+ if (!doResult.ok) {
117
+ return [(0, operations_js_1.haltIterator)(doResult), { status: "request-error", request: req }];
118
+ }
119
+ const response = doResult.value;
120
+ const responseFields = {
121
+ HttpMeta: { Response: response, Request: req },
122
+ };
123
+ const [result, raw] = await M.match(M.json(200, operations.AccountingCategoriesAllResponse$inboundSchema, {
124
+ key: "GetCategoriesResponse",
125
+ }), M.jsonErr(400, errors.BadRequestResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponse$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponse$inboundSchema), M.jsonErr(404, errors.NotFoundResponse$inboundSchema), M.jsonErr(422, errors.UnprocessableResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"), M.json("default", operations.AccountingCategoriesAllResponse$inboundSchema, { key: "UnexpectedErrorResponse" }))(response, req, { extraFields: responseFields });
126
+ if (!result.ok) {
127
+ return [(0, operations_js_1.haltIterator)(result), {
128
+ status: "complete",
129
+ request: req,
130
+ response,
131
+ }];
132
+ }
133
+ const nextFunc = (responseData) => {
134
+ const nextCursor = (0, dlv_js_1.dlv)(responseData, "meta.cursors.next");
135
+ if (typeof nextCursor !== "string") {
136
+ return { next: () => null };
137
+ }
138
+ const nextVal = () => accountingCategoriesList(client, {
139
+ ...request,
140
+ cursor: nextCursor,
141
+ }, options);
142
+ return { next: nextVal, "~next": { cursor: nextCursor } };
143
+ };
144
+ const page = { ...result, ...nextFunc(raw) };
145
+ return [{ ...page, ...(0, operations_js_1.createPageIterator)(page, (v) => !v.ok) }, {
146
+ status: "complete",
147
+ request: req,
148
+ response,
149
+ }];
150
+ }
151
+ //# sourceMappingURL=accountingCategoriesList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountingCategoriesList.js","sourceRoot":"","sources":["../src/funcs/accountingCategoriesList.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAsCH,4DA8BC;AAjED,0CAAoC;AACpC,sDAAoE;AACpE,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAS3C,kEAAoD;AAGpD,0EAA4D;AAC5D,gDAAwD;AAExD,0DAKgC;AAEhC;;;;;GAKG;AACH,SAAgB,wBAAwB,CACtC,MAAmB,EACnB,OAAkD,EAClD,OAAwB;IAsBxB,OAAO,IAAI,qBAAU,CAAC,GA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ACE,GAAG,OAAO;YACV,MAAM,EAAE,UAAU;SACnB,EACD,OAAO,CACR,CAAC;QAEJ,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5D,CAAC,CAAC;IAEF,MAAM,IAAI,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;IAC7C,OAAO,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,IAAA,kCAAkB,EAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YAC9D,MAAM,EAAE,UAAU;YAClB,OAAO,EAAE,GAAG;YACZ,QAAQ;SACT,CAAC,CAAC;AACL,CAAC"}
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@apideck/unify",
5
- "version": "0.25.0",
5
+ "version": "0.26.0",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/lib/config.d.ts CHANGED
@@ -38,9 +38,9 @@ export type SDKOptions = {
38
38
  export declare function serverURLFromOptions(options: SDKOptions): URL | null;
39
39
  export declare const SDK_METADATA: {
40
40
  readonly language: "typescript";
41
- readonly openapiDocVersion: "10.17.2";
42
- readonly sdkVersion: "0.25.0";
43
- readonly genVersion: "2.624.0";
44
- readonly userAgent: "speakeasy-sdk/typescript 0.25.0 2.624.0 10.17.2 @apideck/unify";
41
+ readonly openapiDocVersion: "10.18.0";
42
+ readonly sdkVersion: "0.26.0";
43
+ readonly genVersion: "2.632.2";
44
+ readonly userAgent: "speakeasy-sdk/typescript 0.26.0 2.632.2 10.18.0 @apideck/unify";
45
45
  };
46
46
  //# sourceMappingURL=config.d.ts.map
package/lib/config.js CHANGED
@@ -27,9 +27,9 @@ function serverURLFromOptions(options) {
27
27
  }
28
28
  exports.SDK_METADATA = {
29
29
  language: "typescript",
30
- openapiDocVersion: "10.17.2",
31
- sdkVersion: "0.25.0",
32
- genVersion: "2.624.0",
33
- userAgent: "speakeasy-sdk/typescript 0.25.0 2.624.0 10.17.2 @apideck/unify",
30
+ openapiDocVersion: "10.18.0",
31
+ sdkVersion: "0.26.0",
32
+ genVersion: "2.632.2",
33
+ userAgent: "speakeasy-sdk/typescript 0.26.0 2.632.2 10.18.0 @apideck/unify",
34
34
  };
35
35
  //# sourceMappingURL=config.js.map
package/lib/files.d.ts CHANGED
@@ -5,4 +5,9 @@
5
5
  * request structure.
6
6
  */
7
7
  export declare function readableStreamToArrayBuffer(readable: ReadableStream<Uint8Array>): Promise<ArrayBuffer>;
8
+ /**
9
+ * Determines the MIME content type based on a file's extension.
10
+ * Returns null if the extension is not recognized.
11
+ */
12
+ export declare function getContentTypeFromFileName(fileName: string): string | null;
8
13
  //# sourceMappingURL=files.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/lib/files.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,GACnC,OAAO,CAAC,WAAW,CAAC,CA2BtB"}
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/lib/files.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,GACnC,OAAO,CAAC,WAAW,CAAC,CA2BtB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAoC1E"}