@unified-api/typescript-sdk 2.34.0 → 2.36.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 (83) hide show
  1. package/README.md +4 -0
  2. package/docs/sdks/accounting/README.md +164 -0
  3. package/docs/sdks/report/README.md +171 -0
  4. package/funcs/accountingGetAccountingReport.d.ts +14 -0
  5. package/funcs/accountingGetAccountingReport.d.ts.map +1 -0
  6. package/funcs/accountingGetAccountingReport.js +112 -0
  7. package/funcs/accountingGetAccountingReport.js.map +1 -0
  8. package/funcs/accountingListAccountingReports.d.ts +14 -0
  9. package/funcs/accountingListAccountingReports.d.ts.map +1 -0
  10. package/funcs/accountingListAccountingReports.js +116 -0
  11. package/funcs/accountingListAccountingReports.js.map +1 -0
  12. package/funcs/reportGetAccountingReport.d.ts +14 -0
  13. package/funcs/reportGetAccountingReport.d.ts.map +1 -0
  14. package/funcs/reportGetAccountingReport.js +112 -0
  15. package/funcs/reportGetAccountingReport.js.map +1 -0
  16. package/funcs/reportListAccountingReports.d.ts +14 -0
  17. package/funcs/reportListAccountingReports.d.ts.map +1 -0
  18. package/funcs/reportListAccountingReports.js +116 -0
  19. package/funcs/reportListAccountingReports.js.map +1 -0
  20. package/jsr.json +1 -1
  21. package/lib/config.d.ts +2 -2
  22. package/lib/config.js +2 -2
  23. package/package.json +1 -1
  24. package/sdk/accounting.d.ts +8 -0
  25. package/sdk/accounting.d.ts.map +1 -1
  26. package/sdk/accounting.js +14 -0
  27. package/sdk/accounting.js.map +1 -1
  28. package/sdk/models/operations/getaccountingreport.d.ts +42 -0
  29. package/sdk/models/operations/getaccountingreport.d.ts.map +1 -0
  30. package/sdk/models/operations/getaccountingreport.js +72 -0
  31. package/sdk/models/operations/getaccountingreport.js.map +1 -0
  32. package/sdk/models/operations/index.d.ts +2 -0
  33. package/sdk/models/operations/index.d.ts.map +1 -1
  34. package/sdk/models/operations/index.js +2 -0
  35. package/sdk/models/operations/index.js.map +1 -1
  36. package/sdk/models/operations/listaccountingreports.d.ts +57 -0
  37. package/sdk/models/operations/listaccountingreports.d.ts.map +1 -0
  38. package/sdk/models/operations/listaccountingreports.js +87 -0
  39. package/sdk/models/operations/listaccountingreports.js.map +1 -0
  40. package/sdk/models/shared/accountingreport.d.ts +97 -0
  41. package/sdk/models/shared/accountingreport.d.ts.map +1 -0
  42. package/sdk/models/shared/accountingreport.js +137 -0
  43. package/sdk/models/shared/accountingreport.js.map +1 -0
  44. package/sdk/models/shared/index.d.ts +1 -0
  45. package/sdk/models/shared/index.d.ts.map +1 -1
  46. package/sdk/models/shared/index.js +1 -0
  47. package/sdk/models/shared/index.js.map +1 -1
  48. package/sdk/models/shared/integrationsupport.d.ts +2 -2
  49. package/sdk/models/shared/integrationsupport.d.ts.map +1 -1
  50. package/sdk/models/shared/integrationsupport.js +2 -2
  51. package/sdk/models/shared/integrationsupport.js.map +1 -1
  52. package/sdk/models/shared/propertyconnectionpermissions.d.ts +6 -0
  53. package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  54. package/sdk/models/shared/propertyconnectionpermissions.js +2 -0
  55. package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  56. package/sdk/models/shared/webhook.d.ts +5 -2
  57. package/sdk/models/shared/webhook.d.ts.map +1 -1
  58. package/sdk/models/shared/webhook.js +3 -2
  59. package/sdk/models/shared/webhook.js.map +1 -1
  60. package/sdk/report.d.ts +14 -0
  61. package/sdk/report.d.ts.map +1 -0
  62. package/sdk/report.js +26 -0
  63. package/sdk/report.js.map +1 -0
  64. package/sdk/sdk.d.ts +3 -0
  65. package/sdk/sdk.d.ts.map +1 -1
  66. package/sdk/sdk.js +4 -0
  67. package/sdk/sdk.js.map +1 -1
  68. package/src/funcs/accountingGetAccountingReport.ts +169 -0
  69. package/src/funcs/accountingListAccountingReports.ts +171 -0
  70. package/src/funcs/reportGetAccountingReport.ts +169 -0
  71. package/src/funcs/reportListAccountingReports.ts +171 -0
  72. package/src/lib/config.ts +2 -2
  73. package/src/sdk/accounting.ts +30 -0
  74. package/src/sdk/models/operations/getaccountingreport.ts +92 -0
  75. package/src/sdk/models/operations/index.ts +2 -0
  76. package/src/sdk/models/operations/listaccountingreports.ts +124 -0
  77. package/src/sdk/models/shared/accountingreport.ts +198 -0
  78. package/src/sdk/models/shared/index.ts +1 -0
  79. package/src/sdk/models/shared/integrationsupport.ts +4 -4
  80. package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
  81. package/src/sdk/models/shared/webhook.ts +5 -4
  82. package/src/sdk/report.ts +40 -0
  83. package/src/sdk/sdk.ts +6 -0
package/README.md CHANGED
@@ -466,6 +466,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
466
466
  - [`accountingGetAccountingJournal`](docs/sdks/accounting/README.md#getaccountingjournal) - Retrieve a journal
467
467
  - [`accountingGetAccountingOrder`](docs/sdks/accounting/README.md#getaccountingorder) - Retrieve an order
468
468
  - [`accountingGetAccountingOrganization`](docs/sdks/accounting/README.md#getaccountingorganization) - Retrieve an organization
469
+ - [`accountingGetAccountingReport`](docs/sdks/accounting/README.md#getaccountingreport) - Retrieve a report
469
470
  - [`accountingGetAccountingTaxrate`](docs/sdks/accounting/README.md#getaccountingtaxrate) - Retrieve a taxrate
470
471
  - [`accountingGetAccountingTransaction`](docs/sdks/accounting/README.md#getaccountingtransaction) - Retrieve a transaction
471
472
  - [`accountingListAccountingAccounts`](docs/sdks/accounting/README.md#listaccountingaccounts) - List all accounts
@@ -474,6 +475,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
474
475
  - [`accountingListAccountingJournals`](docs/sdks/accounting/README.md#listaccountingjournals) - List all journals
475
476
  - [`accountingListAccountingOrders`](docs/sdks/accounting/README.md#listaccountingorders) - List all orders
476
477
  - [`accountingListAccountingOrganizations`](docs/sdks/accounting/README.md#listaccountingorganizations) - List all organizations
478
+ - [`accountingListAccountingReports`](docs/sdks/accounting/README.md#listaccountingreports) - List all reports
477
479
  - [`accountingListAccountingTaxrates`](docs/sdks/accounting/README.md#listaccountingtaxrates) - List all taxrates
478
480
  - [`accountingListAccountingTransactions`](docs/sdks/accounting/README.md#listaccountingtransactions) - List all transactions
479
481
  - [`accountingPatchAccountingAccount`](docs/sdks/accounting/README.md#patchaccountingaccount) - Update an account
@@ -1094,6 +1096,8 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
1094
1096
  - [`repoRemoveRepoOrganization`](docs/sdks/repo/README.md#removerepoorganization) - Remove an organization
1095
1097
  - [`repoRemoveRepoPullrequest`](docs/sdks/repo/README.md#removerepopullrequest) - Remove a pullrequest
1096
1098
  - [`repoRemoveRepoRepository`](docs/sdks/repo/README.md#removereporepository) - Remove a repository
1099
+ - [`reportGetAccountingReport`](docs/sdks/report/README.md#getaccountingreport) - Retrieve a report
1100
+ - [`reportListAccountingReports`](docs/sdks/report/README.md#listaccountingreports) - List all reports
1097
1101
  - [`repositoryCreateRepoRepository`](docs/sdks/repository/README.md#createreporepository) - Create a repository
1098
1102
  - [`repositoryGetRepoRepository`](docs/sdks/repository/README.md#getreporepository) - Retrieve a repository
1099
1103
  - [`repositoryListRepoRepositories`](docs/sdks/repository/README.md#listreporepositories) - List all repositories
@@ -18,6 +18,7 @@
18
18
  * [getAccountingJournal](#getaccountingjournal) - Retrieve a journal
19
19
  * [getAccountingOrder](#getaccountingorder) - Retrieve an order
20
20
  * [getAccountingOrganization](#getaccountingorganization) - Retrieve an organization
21
+ * [getAccountingReport](#getaccountingreport) - Retrieve a report
21
22
  * [getAccountingTaxrate](#getaccountingtaxrate) - Retrieve a taxrate
22
23
  * [getAccountingTransaction](#getaccountingtransaction) - Retrieve a transaction
23
24
  * [listAccountingAccounts](#listaccountingaccounts) - List all accounts
@@ -26,6 +27,7 @@
26
27
  * [listAccountingJournals](#listaccountingjournals) - List all journals
27
28
  * [listAccountingOrders](#listaccountingorders) - List all orders
28
29
  * [listAccountingOrganizations](#listaccountingorganizations) - List all organizations
30
+ * [listAccountingReports](#listaccountingreports) - List all reports
29
31
  * [listAccountingTaxrates](#listaccountingtaxrates) - List all taxrates
30
32
  * [listAccountingTransactions](#listaccountingtransactions) - List all transactions
31
33
  * [patchAccountingAccount](#patchaccountingaccount) - Update an account
@@ -1116,6 +1118,88 @@ run();
1116
1118
  | --------------- | --------------- | --------------- |
1117
1119
  | errors.SDKError | 4XX, 5XX | \*/\* |
1118
1120
 
1121
+ ## getAccountingReport
1122
+
1123
+ Retrieve a report
1124
+
1125
+ ### Example Usage
1126
+
1127
+ ```typescript
1128
+ import { UnifiedTo } from "@unified-api/typescript-sdk";
1129
+
1130
+ const unifiedTo = new UnifiedTo({
1131
+ security: {
1132
+ jwt: "<YOUR_API_KEY_HERE>",
1133
+ },
1134
+ });
1135
+
1136
+ async function run() {
1137
+ const result = await unifiedTo.accounting.getAccountingReport({
1138
+ connectionId: "<id>",
1139
+ id: "<id>",
1140
+ });
1141
+
1142
+ // Handle the result
1143
+ console.log(result);
1144
+ }
1145
+
1146
+ run();
1147
+ ```
1148
+
1149
+ ### Standalone function
1150
+
1151
+ The standalone function version of this method:
1152
+
1153
+ ```typescript
1154
+ import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
1155
+ import { accountingGetAccountingReport } from "@unified-api/typescript-sdk/funcs/accountingGetAccountingReport.js";
1156
+
1157
+ // Use `UnifiedToCore` for best tree-shaking performance.
1158
+ // You can create one instance of it to use across an application.
1159
+ const unifiedTo = new UnifiedToCore({
1160
+ security: {
1161
+ jwt: "<YOUR_API_KEY_HERE>",
1162
+ },
1163
+ });
1164
+
1165
+ async function run() {
1166
+ const res = await accountingGetAccountingReport(unifiedTo, {
1167
+ connectionId: "<id>",
1168
+ id: "<id>",
1169
+ });
1170
+
1171
+ if (!res.ok) {
1172
+ throw res.error;
1173
+ }
1174
+
1175
+ const { value: result } = res;
1176
+
1177
+ // Handle the result
1178
+ console.log(result);
1179
+ }
1180
+
1181
+ run();
1182
+ ```
1183
+
1184
+ ### Parameters
1185
+
1186
+ | Parameter | Type | Required | Description |
1187
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1188
+ | `request` | [operations.GetAccountingReportRequest](../../sdk/models/operations/getaccountingreportrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1189
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1190
+ | `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. |
1191
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1192
+
1193
+ ### Response
1194
+
1195
+ **Promise\<[shared.AccountingReport](../../sdk/models/shared/accountingreport.md)\>**
1196
+
1197
+ ### Errors
1198
+
1199
+ | Error Type | Status Code | Content Type |
1200
+ | --------------- | --------------- | --------------- |
1201
+ | errors.SDKError | 4XX, 5XX | \*/\* |
1202
+
1119
1203
  ## getAccountingTaxrate
1120
1204
 
1121
1205
  Retrieve a taxrate
@@ -1760,6 +1844,86 @@ run();
1760
1844
  | --------------- | --------------- | --------------- |
1761
1845
  | errors.SDKError | 4XX, 5XX | \*/\* |
1762
1846
 
1847
+ ## listAccountingReports
1848
+
1849
+ List all reports
1850
+
1851
+ ### Example Usage
1852
+
1853
+ ```typescript
1854
+ import { UnifiedTo } from "@unified-api/typescript-sdk";
1855
+
1856
+ const unifiedTo = new UnifiedTo({
1857
+ security: {
1858
+ jwt: "<YOUR_API_KEY_HERE>",
1859
+ },
1860
+ });
1861
+
1862
+ async function run() {
1863
+ const result = await unifiedTo.accounting.listAccountingReports({
1864
+ connectionId: "<id>",
1865
+ });
1866
+
1867
+ // Handle the result
1868
+ console.log(result);
1869
+ }
1870
+
1871
+ run();
1872
+ ```
1873
+
1874
+ ### Standalone function
1875
+
1876
+ The standalone function version of this method:
1877
+
1878
+ ```typescript
1879
+ import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
1880
+ import { accountingListAccountingReports } from "@unified-api/typescript-sdk/funcs/accountingListAccountingReports.js";
1881
+
1882
+ // Use `UnifiedToCore` for best tree-shaking performance.
1883
+ // You can create one instance of it to use across an application.
1884
+ const unifiedTo = new UnifiedToCore({
1885
+ security: {
1886
+ jwt: "<YOUR_API_KEY_HERE>",
1887
+ },
1888
+ });
1889
+
1890
+ async function run() {
1891
+ const res = await accountingListAccountingReports(unifiedTo, {
1892
+ connectionId: "<id>",
1893
+ });
1894
+
1895
+ if (!res.ok) {
1896
+ throw res.error;
1897
+ }
1898
+
1899
+ const { value: result } = res;
1900
+
1901
+ // Handle the result
1902
+ console.log(result);
1903
+ }
1904
+
1905
+ run();
1906
+ ```
1907
+
1908
+ ### Parameters
1909
+
1910
+ | Parameter | Type | Required | Description |
1911
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1912
+ | `request` | [operations.ListAccountingReportsRequest](../../sdk/models/operations/listaccountingreportsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1913
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1914
+ | `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. |
1915
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1916
+
1917
+ ### Response
1918
+
1919
+ **Promise\<[shared.AccountingReport[]](../../models/.md)\>**
1920
+
1921
+ ### Errors
1922
+
1923
+ | Error Type | Status Code | Content Type |
1924
+ | --------------- | --------------- | --------------- |
1925
+ | errors.SDKError | 4XX, 5XX | \*/\* |
1926
+
1763
1927
  ## listAccountingTaxrates
1764
1928
 
1765
1929
  List all taxrates
@@ -0,0 +1,171 @@
1
+ # Report
2
+ (*report*)
3
+
4
+ ## Overview
5
+
6
+ ### Available Operations
7
+
8
+ * [getAccountingReport](#getaccountingreport) - Retrieve a report
9
+ * [listAccountingReports](#listaccountingreports) - List all reports
10
+
11
+ ## getAccountingReport
12
+
13
+ Retrieve a report
14
+
15
+ ### Example Usage
16
+
17
+ ```typescript
18
+ import { UnifiedTo } from "@unified-api/typescript-sdk";
19
+
20
+ const unifiedTo = new UnifiedTo({
21
+ security: {
22
+ jwt: "<YOUR_API_KEY_HERE>",
23
+ },
24
+ });
25
+
26
+ async function run() {
27
+ const result = await unifiedTo.report.getAccountingReport({
28
+ connectionId: "<id>",
29
+ id: "<id>",
30
+ });
31
+
32
+ // Handle the result
33
+ console.log(result);
34
+ }
35
+
36
+ run();
37
+ ```
38
+
39
+ ### Standalone function
40
+
41
+ The standalone function version of this method:
42
+
43
+ ```typescript
44
+ import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
45
+ import { reportGetAccountingReport } from "@unified-api/typescript-sdk/funcs/reportGetAccountingReport.js";
46
+
47
+ // Use `UnifiedToCore` for best tree-shaking performance.
48
+ // You can create one instance of it to use across an application.
49
+ const unifiedTo = new UnifiedToCore({
50
+ security: {
51
+ jwt: "<YOUR_API_KEY_HERE>",
52
+ },
53
+ });
54
+
55
+ async function run() {
56
+ const res = await reportGetAccountingReport(unifiedTo, {
57
+ connectionId: "<id>",
58
+ id: "<id>",
59
+ });
60
+
61
+ if (!res.ok) {
62
+ throw res.error;
63
+ }
64
+
65
+ const { value: result } = res;
66
+
67
+ // Handle the result
68
+ console.log(result);
69
+ }
70
+
71
+ run();
72
+ ```
73
+
74
+ ### Parameters
75
+
76
+ | Parameter | Type | Required | Description |
77
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
78
+ | `request` | [operations.GetAccountingReportRequest](../../sdk/models/operations/getaccountingreportrequest.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\<[shared.AccountingReport](../../sdk/models/shared/accountingreport.md)\>**
86
+
87
+ ### Errors
88
+
89
+ | Error Type | Status Code | Content Type |
90
+ | --------------- | --------------- | --------------- |
91
+ | errors.SDKError | 4XX, 5XX | \*/\* |
92
+
93
+ ## listAccountingReports
94
+
95
+ List all reports
96
+
97
+ ### Example Usage
98
+
99
+ ```typescript
100
+ import { UnifiedTo } from "@unified-api/typescript-sdk";
101
+
102
+ const unifiedTo = new UnifiedTo({
103
+ security: {
104
+ jwt: "<YOUR_API_KEY_HERE>",
105
+ },
106
+ });
107
+
108
+ async function run() {
109
+ const result = await unifiedTo.report.listAccountingReports({
110
+ connectionId: "<id>",
111
+ });
112
+
113
+ // Handle the result
114
+ console.log(result);
115
+ }
116
+
117
+ run();
118
+ ```
119
+
120
+ ### Standalone function
121
+
122
+ The standalone function version of this method:
123
+
124
+ ```typescript
125
+ import { UnifiedToCore } from "@unified-api/typescript-sdk/core.js";
126
+ import { reportListAccountingReports } from "@unified-api/typescript-sdk/funcs/reportListAccountingReports.js";
127
+
128
+ // Use `UnifiedToCore` for best tree-shaking performance.
129
+ // You can create one instance of it to use across an application.
130
+ const unifiedTo = new UnifiedToCore({
131
+ security: {
132
+ jwt: "<YOUR_API_KEY_HERE>",
133
+ },
134
+ });
135
+
136
+ async function run() {
137
+ const res = await reportListAccountingReports(unifiedTo, {
138
+ connectionId: "<id>",
139
+ });
140
+
141
+ if (!res.ok) {
142
+ throw res.error;
143
+ }
144
+
145
+ const { value: result } = res;
146
+
147
+ // Handle the result
148
+ console.log(result);
149
+ }
150
+
151
+ run();
152
+ ```
153
+
154
+ ### Parameters
155
+
156
+ | Parameter | Type | Required | Description |
157
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
158
+ | `request` | [operations.ListAccountingReportsRequest](../../sdk/models/operations/listaccountingreportsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
159
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
160
+ | `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. |
161
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
162
+
163
+ ### Response
164
+
165
+ **Promise\<[shared.AccountingReport[]](../../models/.md)\>**
166
+
167
+ ### Errors
168
+
169
+ | Error Type | Status Code | Content Type |
170
+ | --------------- | --------------- | --------------- |
171
+ | errors.SDKError | 4XX, 5XX | \*/\* |
@@ -0,0 +1,14 @@
1
+ import { UnifiedToCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../sdk/models/errors/httpclienterrors.js";
4
+ import { SDKError } from "../sdk/models/errors/sdkerror.js";
5
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
6
+ import * as operations from "../sdk/models/operations/index.js";
7
+ import * as shared from "../sdk/models/shared/index.js";
8
+ import { APIPromise } from "../sdk/types/async.js";
9
+ import { Result } from "../sdk/types/fp.js";
10
+ /**
11
+ * Retrieve a report
12
+ */
13
+ export declare function accountingGetAccountingReport(client: UnifiedToCore, request: operations.GetAccountingReportRequest, options?: RequestOptions): APIPromise<Result<shared.AccountingReport, SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
14
+ //# sourceMappingURL=accountingGetAccountingReport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountingGetAccountingReport.d.ts","sourceRoot":"","sources":["../src/funcs/accountingGetAccountingReport.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAK3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,UAAU,MAAM,mCAAmC,CAAC;AAChE,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAW,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,gBAAgB,EACrB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}
@@ -0,0 +1,112 @@
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.accountingGetAccountingReport = accountingGetAccountingReport;
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 operations = __importStar(require("../sdk/models/operations/index.js"));
37
+ const shared = __importStar(require("../sdk/models/shared/index.js"));
38
+ const async_js_1 = require("../sdk/types/async.js");
39
+ /**
40
+ * Retrieve a report
41
+ */
42
+ function accountingGetAccountingReport(client, request, options) {
43
+ return new async_js_1.APIPromise($do(client, request, options));
44
+ }
45
+ async function $do(client, request, options) {
46
+ const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.GetAccountingReportRequest$outboundSchema.parse(value), "Input validation failed");
47
+ if (!parsed.ok) {
48
+ return [parsed, { status: "invalid" }];
49
+ }
50
+ const payload = parsed.value;
51
+ const body = null;
52
+ const pathParams = {
53
+ connection_id: (0, encodings_js_1.encodeSimple)("connection_id", payload.connection_id, {
54
+ explode: false,
55
+ charEncoding: "percent",
56
+ }),
57
+ id: (0, encodings_js_1.encodeSimple)("id", payload.id, {
58
+ explode: false,
59
+ charEncoding: "percent",
60
+ }),
61
+ };
62
+ const path = (0, url_js_1.pathToFunc)("/accounting/{connection_id}/report/{id}")(pathParams);
63
+ const query = (0, encodings_js_1.encodeFormQuery)({
64
+ "fields": payload.fields,
65
+ });
66
+ const headers = new Headers((0, primitives_js_1.compactMap)({
67
+ Accept: "application/json",
68
+ }));
69
+ const securityInput = await (0, security_js_1.extractSecurity)(client._options.security);
70
+ const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
71
+ const context = {
72
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
73
+ operationID: "getAccountingReport",
74
+ oAuth2Scopes: [],
75
+ resolvedSecurity: requestSecurity,
76
+ securitySource: client._options.security,
77
+ retryConfig: options?.retries
78
+ || client._options.retryConfig
79
+ || { strategy: "none" },
80
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
81
+ };
82
+ const requestRes = client._createRequest(context, {
83
+ security: requestSecurity,
84
+ method: "GET",
85
+ baseURL: options?.serverURL,
86
+ path: path,
87
+ headers: headers,
88
+ query: query,
89
+ body: body,
90
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
91
+ }, options);
92
+ if (!requestRes.ok) {
93
+ return [requestRes, { status: "invalid" }];
94
+ }
95
+ const req = requestRes.value;
96
+ const doResult = await client._do(req, {
97
+ context,
98
+ errorCodes: ["4XX", "5XX"],
99
+ retryConfig: context.retryConfig,
100
+ retryCodes: context.retryCodes,
101
+ });
102
+ if (!doResult.ok) {
103
+ return [doResult, { status: "request-error", request: req }];
104
+ }
105
+ const response = doResult.value;
106
+ const [result] = await M.match(M.json(200, shared.AccountingReport$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response);
107
+ if (!result.ok) {
108
+ return [result, { status: "complete", request: req, response }];
109
+ }
110
+ return [result, { status: "complete", request: req, response }];
111
+ }
112
+ //# sourceMappingURL=accountingGetAccountingReport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountingGetAccountingReport.js","sourceRoot":"","sources":["../src/funcs/accountingGetAccountingReport.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AA2BH,sEAqBC;AA7CD,sDAAoE;AACpE,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAU3C,8EAAgE;AAChE,sEAAwD;AACxD,oDAA4D;AAG5D;;GAEG;AACH,SAAgB,6BAA6B,CAC3C,MAAqB,EACrB,OAA8C,EAC9C,OAAwB;IAaxB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAqB,EACrB,OAA8C,EAC9C,OAAwB;IAgBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,CAAC,yCAAyC,CAAC,KAAK,CAAC,KAAK,CAAC,EACnE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CA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EAClD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,CAAC,CAAC;IACZ,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,14 @@
1
+ import { UnifiedToCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../sdk/models/errors/httpclienterrors.js";
4
+ import { SDKError } from "../sdk/models/errors/sdkerror.js";
5
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
6
+ import * as operations from "../sdk/models/operations/index.js";
7
+ import * as shared from "../sdk/models/shared/index.js";
8
+ import { APIPromise } from "../sdk/types/async.js";
9
+ import { Result } from "../sdk/types/fp.js";
10
+ /**
11
+ * List all reports
12
+ */
13
+ export declare function accountingListAccountingReports(client: UnifiedToCore, request: operations.ListAccountingReportsRequest, options?: RequestOptions): APIPromise<Result<Array<shared.AccountingReport>, SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
14
+ //# sourceMappingURL=accountingListAccountingReports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountingListAccountingReports.d.ts","sourceRoot":"","sources":["../src/funcs/accountingListAccountingReports.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAK3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,UAAU,MAAM,mCAAmC,CAAC;AAChE,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAW,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,UAAU,CAAC,4BAA4B,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAC5B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}