@unified-api/typescript-sdk 2.85.43 → 2.85.45

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 (229) hide show
  1. package/README.md +2 -6
  2. package/dist/commonjs/funcs/{reportListAdsReports.d.ts → adsListAdsReports.d.ts} +2 -2
  3. package/dist/commonjs/funcs/adsListAdsReports.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/{reportListAdsReports.js → adsListAdsReports.js} +3 -3
  5. package/dist/commonjs/funcs/adsListAdsReports.js.map +1 -0
  6. package/dist/commonjs/lib/config.d.ts +3 -3
  7. package/dist/commonjs/lib/config.js +3 -3
  8. package/dist/commonjs/lib/config.js.map +1 -1
  9. package/dist/commonjs/sdk/accounting.d.ts +0 -8
  10. package/dist/commonjs/sdk/accounting.d.ts.map +1 -1
  11. package/dist/commonjs/sdk/accounting.js +0 -14
  12. package/dist/commonjs/sdk/accounting.js.map +1 -1
  13. package/dist/commonjs/sdk/ads.js +2 -2
  14. package/dist/commonjs/sdk/ads.js.map +1 -1
  15. package/dist/commonjs/sdk/models/operations/createcommerceitem.d.ts +0 -1
  16. package/dist/commonjs/sdk/models/operations/createcommerceitem.d.ts.map +1 -1
  17. package/dist/commonjs/sdk/models/operations/createcommerceitem.js +0 -1
  18. package/dist/commonjs/sdk/models/operations/createcommerceitem.js.map +1 -1
  19. package/dist/commonjs/sdk/models/operations/createunifiedwebhook.d.ts +1 -1
  20. package/dist/commonjs/sdk/models/operations/getcommerceitem.d.ts +0 -1
  21. package/dist/commonjs/sdk/models/operations/getcommerceitem.d.ts.map +1 -1
  22. package/dist/commonjs/sdk/models/operations/getcommerceitem.js +0 -1
  23. package/dist/commonjs/sdk/models/operations/getcommerceitem.js.map +1 -1
  24. package/dist/commonjs/sdk/models/operations/index.d.ts +0 -2
  25. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  26. package/dist/commonjs/sdk/models/operations/index.js +0 -2
  27. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  28. package/dist/commonjs/sdk/models/operations/listcommerceitems.d.ts +0 -1
  29. package/dist/commonjs/sdk/models/operations/listcommerceitems.d.ts.map +1 -1
  30. package/dist/commonjs/sdk/models/operations/listcommerceitems.js +0 -1
  31. package/dist/commonjs/sdk/models/operations/listcommerceitems.js.map +1 -1
  32. package/dist/commonjs/sdk/models/operations/patchcommerceitem.d.ts +0 -1
  33. package/dist/commonjs/sdk/models/operations/patchcommerceitem.d.ts.map +1 -1
  34. package/dist/commonjs/sdk/models/operations/patchcommerceitem.js +0 -1
  35. package/dist/commonjs/sdk/models/operations/patchcommerceitem.js.map +1 -1
  36. package/dist/commonjs/sdk/models/operations/updatecommerceitem.d.ts +0 -1
  37. package/dist/commonjs/sdk/models/operations/updatecommerceitem.d.ts.map +1 -1
  38. package/dist/commonjs/sdk/models/operations/updatecommerceitem.js +0 -1
  39. package/dist/commonjs/sdk/models/operations/updatecommerceitem.js.map +1 -1
  40. package/dist/commonjs/sdk/models/shared/accountinginvoice.d.ts +0 -1
  41. package/dist/commonjs/sdk/models/shared/accountinginvoice.d.ts.map +1 -1
  42. package/dist/commonjs/sdk/models/shared/accountinginvoice.js +0 -1
  43. package/dist/commonjs/sdk/models/shared/accountinginvoice.js.map +1 -1
  44. package/dist/commonjs/sdk/models/shared/commerceitem.d.ts +0 -6
  45. package/dist/commonjs/sdk/models/shared/commerceitem.d.ts.map +1 -1
  46. package/dist/commonjs/sdk/models/shared/commerceitem.js +0 -3
  47. package/dist/commonjs/sdk/models/shared/commerceitem.js.map +1 -1
  48. package/dist/commonjs/sdk/models/shared/index.d.ts +0 -4
  49. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  50. package/dist/commonjs/sdk/models/shared/index.js +0 -4
  51. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  52. package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.d.ts +0 -2
  53. package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  54. package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.js +0 -2
  55. package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  56. package/dist/commonjs/sdk/models/shared/webhook.d.ts +0 -1
  57. package/dist/commonjs/sdk/models/shared/webhook.d.ts.map +1 -1
  58. package/dist/commonjs/sdk/models/shared/webhook.js +0 -1
  59. package/dist/commonjs/sdk/models/shared/webhook.js.map +1 -1
  60. package/dist/commonjs/sdk/report.d.ts +0 -8
  61. package/dist/commonjs/sdk/report.d.ts.map +1 -1
  62. package/dist/commonjs/sdk/report.js +2 -16
  63. package/dist/commonjs/sdk/report.js.map +1 -1
  64. package/dist/commonjs/sdk/sdk.d.ts +2 -2
  65. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  66. package/dist/commonjs/sdk/sdk.js +3 -3
  67. package/dist/commonjs/sdk/sdk.js.map +1 -1
  68. package/dist/esm/funcs/{reportListAdsReports.d.ts → adsListAdsReports.d.ts} +2 -2
  69. package/dist/esm/funcs/adsListAdsReports.d.ts.map +1 -0
  70. package/dist/esm/funcs/{reportListAdsReports.js → adsListAdsReports.js} +2 -2
  71. package/dist/esm/funcs/adsListAdsReports.js.map +1 -0
  72. package/dist/esm/lib/config.d.ts +3 -3
  73. package/dist/esm/lib/config.js +3 -3
  74. package/dist/esm/lib/config.js.map +1 -1
  75. package/dist/esm/sdk/accounting.d.ts +0 -8
  76. package/dist/esm/sdk/accounting.d.ts.map +1 -1
  77. package/dist/esm/sdk/accounting.js +0 -14
  78. package/dist/esm/sdk/accounting.js.map +1 -1
  79. package/dist/esm/sdk/ads.js +2 -2
  80. package/dist/esm/sdk/ads.js.map +1 -1
  81. package/dist/esm/sdk/models/operations/createcommerceitem.d.ts +0 -1
  82. package/dist/esm/sdk/models/operations/createcommerceitem.d.ts.map +1 -1
  83. package/dist/esm/sdk/models/operations/createcommerceitem.js +0 -1
  84. package/dist/esm/sdk/models/operations/createcommerceitem.js.map +1 -1
  85. package/dist/esm/sdk/models/operations/createunifiedwebhook.d.ts +1 -1
  86. package/dist/esm/sdk/models/operations/getcommerceitem.d.ts +0 -1
  87. package/dist/esm/sdk/models/operations/getcommerceitem.d.ts.map +1 -1
  88. package/dist/esm/sdk/models/operations/getcommerceitem.js +0 -1
  89. package/dist/esm/sdk/models/operations/getcommerceitem.js.map +1 -1
  90. package/dist/esm/sdk/models/operations/index.d.ts +0 -2
  91. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  92. package/dist/esm/sdk/models/operations/index.js +0 -2
  93. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  94. package/dist/esm/sdk/models/operations/listcommerceitems.d.ts +0 -1
  95. package/dist/esm/sdk/models/operations/listcommerceitems.d.ts.map +1 -1
  96. package/dist/esm/sdk/models/operations/listcommerceitems.js +0 -1
  97. package/dist/esm/sdk/models/operations/listcommerceitems.js.map +1 -1
  98. package/dist/esm/sdk/models/operations/patchcommerceitem.d.ts +0 -1
  99. package/dist/esm/sdk/models/operations/patchcommerceitem.d.ts.map +1 -1
  100. package/dist/esm/sdk/models/operations/patchcommerceitem.js +0 -1
  101. package/dist/esm/sdk/models/operations/patchcommerceitem.js.map +1 -1
  102. package/dist/esm/sdk/models/operations/updatecommerceitem.d.ts +0 -1
  103. package/dist/esm/sdk/models/operations/updatecommerceitem.d.ts.map +1 -1
  104. package/dist/esm/sdk/models/operations/updatecommerceitem.js +0 -1
  105. package/dist/esm/sdk/models/operations/updatecommerceitem.js.map +1 -1
  106. package/dist/esm/sdk/models/shared/accountinginvoice.d.ts +0 -1
  107. package/dist/esm/sdk/models/shared/accountinginvoice.d.ts.map +1 -1
  108. package/dist/esm/sdk/models/shared/accountinginvoice.js +0 -1
  109. package/dist/esm/sdk/models/shared/accountinginvoice.js.map +1 -1
  110. package/dist/esm/sdk/models/shared/commerceitem.d.ts +0 -6
  111. package/dist/esm/sdk/models/shared/commerceitem.d.ts.map +1 -1
  112. package/dist/esm/sdk/models/shared/commerceitem.js +0 -3
  113. package/dist/esm/sdk/models/shared/commerceitem.js.map +1 -1
  114. package/dist/esm/sdk/models/shared/index.d.ts +0 -4
  115. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  116. package/dist/esm/sdk/models/shared/index.js +0 -4
  117. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  118. package/dist/esm/sdk/models/shared/propertyconnectionpermissions.d.ts +0 -2
  119. package/dist/esm/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  120. package/dist/esm/sdk/models/shared/propertyconnectionpermissions.js +0 -2
  121. package/dist/esm/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  122. package/dist/esm/sdk/models/shared/webhook.d.ts +0 -1
  123. package/dist/esm/sdk/models/shared/webhook.d.ts.map +1 -1
  124. package/dist/esm/sdk/models/shared/webhook.js +0 -1
  125. package/dist/esm/sdk/models/shared/webhook.js.map +1 -1
  126. package/dist/esm/sdk/report.d.ts +0 -8
  127. package/dist/esm/sdk/report.d.ts.map +1 -1
  128. package/dist/esm/sdk/report.js +2 -16
  129. package/dist/esm/sdk/report.js.map +1 -1
  130. package/dist/esm/sdk/sdk.d.ts +2 -2
  131. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  132. package/dist/esm/sdk/sdk.js +3 -3
  133. package/dist/esm/sdk/sdk.js.map +1 -1
  134. package/jsr.json +1 -1
  135. package/package.json +1 -1
  136. package/src/funcs/{reportListAdsReports.ts → adsListAdsReports.ts} +1 -1
  137. package/src/lib/config.ts +3 -3
  138. package/src/sdk/accounting.ts +0 -30
  139. package/src/sdk/ads.ts +2 -2
  140. package/src/sdk/models/operations/createcommerceitem.ts +0 -1
  141. package/src/sdk/models/operations/createunifiedwebhook.ts +1 -1
  142. package/src/sdk/models/operations/getcommerceitem.ts +0 -1
  143. package/src/sdk/models/operations/index.ts +0 -2
  144. package/src/sdk/models/operations/listcommerceitems.ts +0 -1
  145. package/src/sdk/models/operations/patchcommerceitem.ts +0 -1
  146. package/src/sdk/models/operations/updatecommerceitem.ts +0 -1
  147. package/src/sdk/models/shared/accountinginvoice.ts +0 -1
  148. package/src/sdk/models/shared/commerceitem.ts +0 -13
  149. package/src/sdk/models/shared/index.ts +0 -4
  150. package/src/sdk/models/shared/propertyconnectionpermissions.ts +0 -2
  151. package/src/sdk/models/shared/webhook.ts +0 -1
  152. package/src/sdk/report.ts +2 -32
  153. package/src/sdk/sdk.ts +5 -5
  154. package/dist/commonjs/funcs/accountingGetAccountingReport.d.ts +0 -15
  155. package/dist/commonjs/funcs/accountingGetAccountingReport.d.ts.map +0 -1
  156. package/dist/commonjs/funcs/accountingGetAccountingReport.js +0 -126
  157. package/dist/commonjs/funcs/accountingGetAccountingReport.js.map +0 -1
  158. package/dist/commonjs/funcs/accountingListAccountingReports.d.ts +0 -15
  159. package/dist/commonjs/funcs/accountingListAccountingReports.d.ts.map +0 -1
  160. package/dist/commonjs/funcs/accountingListAccountingReports.js +0 -132
  161. package/dist/commonjs/funcs/accountingListAccountingReports.js.map +0 -1
  162. package/dist/commonjs/funcs/reportListAdsReports.d.ts.map +0 -1
  163. package/dist/commonjs/funcs/reportListAdsReports.js.map +0 -1
  164. package/dist/commonjs/sdk/models/operations/getaccountingreport.d.ts +0 -48
  165. package/dist/commonjs/sdk/models/operations/getaccountingreport.d.ts.map +0 -1
  166. package/dist/commonjs/sdk/models/operations/getaccountingreport.js +0 -74
  167. package/dist/commonjs/sdk/models/operations/getaccountingreport.js.map +0 -1
  168. package/dist/commonjs/sdk/models/operations/listaccountingreports.d.ts +0 -73
  169. package/dist/commonjs/sdk/models/operations/listaccountingreports.d.ts.map +0 -1
  170. package/dist/commonjs/sdk/models/operations/listaccountingreports.js +0 -85
  171. package/dist/commonjs/sdk/models/operations/listaccountingreports.js.map +0 -1
  172. package/dist/commonjs/sdk/models/shared/accountingreport.d.ts +0 -38
  173. package/dist/commonjs/sdk/models/shared/accountingreport.d.ts.map +0 -1
  174. package/dist/commonjs/sdk/models/shared/accountingreport.js +0 -88
  175. package/dist/commonjs/sdk/models/shared/accountingreport.js.map +0 -1
  176. package/dist/commonjs/sdk/models/shared/propertyaccountingreportbalancesheet.d.ts +0 -24
  177. package/dist/commonjs/sdk/models/shared/propertyaccountingreportbalancesheet.d.ts.map +0 -1
  178. package/dist/commonjs/sdk/models/shared/propertyaccountingreportbalancesheet.js +0 -75
  179. package/dist/commonjs/sdk/models/shared/propertyaccountingreportbalancesheet.js.map +0 -1
  180. package/dist/commonjs/sdk/models/shared/propertyaccountingreportprofitandloss.d.ts +0 -28
  181. package/dist/commonjs/sdk/models/shared/propertyaccountingreportprofitandloss.d.ts.map +0 -1
  182. package/dist/commonjs/sdk/models/shared/propertyaccountingreportprofitandloss.js +0 -88
  183. package/dist/commonjs/sdk/models/shared/propertyaccountingreportprofitandloss.js.map +0 -1
  184. package/dist/commonjs/sdk/models/shared/propertyaccountingreporttrialbalance.d.ts +0 -23
  185. package/dist/commonjs/sdk/models/shared/propertyaccountingreporttrialbalance.d.ts.map +0 -1
  186. package/dist/commonjs/sdk/models/shared/propertyaccountingreporttrialbalance.js +0 -76
  187. package/dist/commonjs/sdk/models/shared/propertyaccountingreporttrialbalance.js.map +0 -1
  188. package/dist/esm/funcs/accountingGetAccountingReport.d.ts +0 -15
  189. package/dist/esm/funcs/accountingGetAccountingReport.d.ts.map +0 -1
  190. package/dist/esm/funcs/accountingGetAccountingReport.js +0 -90
  191. package/dist/esm/funcs/accountingGetAccountingReport.js.map +0 -1
  192. package/dist/esm/funcs/accountingListAccountingReports.d.ts +0 -15
  193. package/dist/esm/funcs/accountingListAccountingReports.d.ts.map +0 -1
  194. package/dist/esm/funcs/accountingListAccountingReports.js +0 -96
  195. package/dist/esm/funcs/accountingListAccountingReports.js.map +0 -1
  196. package/dist/esm/funcs/reportListAdsReports.d.ts.map +0 -1
  197. package/dist/esm/funcs/reportListAdsReports.js.map +0 -1
  198. package/dist/esm/sdk/models/operations/getaccountingreport.d.ts +0 -48
  199. package/dist/esm/sdk/models/operations/getaccountingreport.d.ts.map +0 -1
  200. package/dist/esm/sdk/models/operations/getaccountingreport.js +0 -37
  201. package/dist/esm/sdk/models/operations/getaccountingreport.js.map +0 -1
  202. package/dist/esm/sdk/models/operations/listaccountingreports.d.ts +0 -73
  203. package/dist/esm/sdk/models/operations/listaccountingreports.d.ts.map +0 -1
  204. package/dist/esm/sdk/models/operations/listaccountingreports.js +0 -48
  205. package/dist/esm/sdk/models/operations/listaccountingreports.js.map +0 -1
  206. package/dist/esm/sdk/models/shared/accountingreport.d.ts +0 -38
  207. package/dist/esm/sdk/models/shared/accountingreport.d.ts.map +0 -1
  208. package/dist/esm/sdk/models/shared/accountingreport.js +0 -51
  209. package/dist/esm/sdk/models/shared/accountingreport.js.map +0 -1
  210. package/dist/esm/sdk/models/shared/propertyaccountingreportbalancesheet.d.ts +0 -24
  211. package/dist/esm/sdk/models/shared/propertyaccountingreportbalancesheet.d.ts.map +0 -1
  212. package/dist/esm/sdk/models/shared/propertyaccountingreportbalancesheet.js +0 -38
  213. package/dist/esm/sdk/models/shared/propertyaccountingreportbalancesheet.js.map +0 -1
  214. package/dist/esm/sdk/models/shared/propertyaccountingreportprofitandloss.d.ts +0 -28
  215. package/dist/esm/sdk/models/shared/propertyaccountingreportprofitandloss.d.ts.map +0 -1
  216. package/dist/esm/sdk/models/shared/propertyaccountingreportprofitandloss.js +0 -51
  217. package/dist/esm/sdk/models/shared/propertyaccountingreportprofitandloss.js.map +0 -1
  218. package/dist/esm/sdk/models/shared/propertyaccountingreporttrialbalance.d.ts +0 -23
  219. package/dist/esm/sdk/models/shared/propertyaccountingreporttrialbalance.d.ts.map +0 -1
  220. package/dist/esm/sdk/models/shared/propertyaccountingreporttrialbalance.js +0 -39
  221. package/dist/esm/sdk/models/shared/propertyaccountingreporttrialbalance.js.map +0 -1
  222. package/src/funcs/accountingGetAccountingReport.ts +0 -177
  223. package/src/funcs/accountingListAccountingReports.ts +0 -181
  224. package/src/sdk/models/operations/getaccountingreport.ts +0 -83
  225. package/src/sdk/models/operations/listaccountingreports.ts +0 -121
  226. package/src/sdk/models/shared/accountingreport.ts +0 -100
  227. package/src/sdk/models/shared/propertyaccountingreportbalancesheet.ts +0 -71
  228. package/src/sdk/models/shared/propertyaccountingreportprofitandloss.ts +0 -90
  229. package/src/sdk/models/shared/propertyaccountingreporttrialbalance.ts +0 -71
@@ -1,181 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { UnifiedToCore } from "../core.js";
7
- import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
8
- import { matchStatusCode } from "../lib/http.js";
9
- import * as M from "../lib/matchers.js";
10
- import { compactMap } from "../lib/primitives.js";
11
- import { safeParse } from "../lib/schemas.js";
12
- import { RequestOptions } from "../lib/sdks.js";
13
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
14
- import { pathToFunc } from "../lib/url.js";
15
- import {
16
- ConnectionError,
17
- InvalidRequestError,
18
- RequestAbortedError,
19
- RequestTimeoutError,
20
- UnexpectedClientError,
21
- } from "../sdk/models/errors/httpclienterrors.js";
22
- import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
23
- import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
24
- import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
25
- import * as operations from "../sdk/models/operations/index.js";
26
- import * as shared from "../sdk/models/shared/index.js";
27
- import { APICall, APIPromise } from "../sdk/types/async.js";
28
- import { Result } from "../sdk/types/fp.js";
29
-
30
- /**
31
- * List all reports
32
- */
33
- export function accountingListAccountingReports(
34
- client: UnifiedToCore,
35
- request: operations.ListAccountingReportsRequest,
36
- options?: RequestOptions,
37
- ): APIPromise<
38
- Result<
39
- Array<shared.AccountingReport>,
40
- | UnifiedToError
41
- | ResponseValidationError
42
- | ConnectionError
43
- | RequestAbortedError
44
- | RequestTimeoutError
45
- | InvalidRequestError
46
- | UnexpectedClientError
47
- | SDKValidationError
48
- >
49
- > {
50
- return new APIPromise($do(
51
- client,
52
- request,
53
- options,
54
- ));
55
- }
56
-
57
- async function $do(
58
- client: UnifiedToCore,
59
- request: operations.ListAccountingReportsRequest,
60
- options?: RequestOptions,
61
- ): Promise<
62
- [
63
- Result<
64
- Array<shared.AccountingReport>,
65
- | UnifiedToError
66
- | ResponseValidationError
67
- | ConnectionError
68
- | RequestAbortedError
69
- | RequestTimeoutError
70
- | InvalidRequestError
71
- | UnexpectedClientError
72
- | SDKValidationError
73
- >,
74
- APICall,
75
- ]
76
- > {
77
- const parsed = safeParse(
78
- request,
79
- (value) =>
80
- operations.ListAccountingReportsRequest$outboundSchema.parse(value),
81
- "Input validation failed",
82
- );
83
- if (!parsed.ok) {
84
- return [parsed, { status: "invalid" }];
85
- }
86
- const payload = parsed.value;
87
- const body = null;
88
-
89
- const pathParams = {
90
- connection_id: encodeSimple("connection_id", payload.connection_id, {
91
- explode: false,
92
- charEncoding: "percent",
93
- }),
94
- };
95
- const path = pathToFunc("/accounting/{connection_id}/report")(pathParams);
96
-
97
- const query = encodeFormQuery({
98
- "end_lt": payload.end_lt,
99
- "fields": payload.fields,
100
- "limit": payload.limit,
101
- "offset": payload.offset,
102
- "order": payload.order,
103
- "query": payload.query,
104
- "raw": payload.raw,
105
- "sort": payload.sort,
106
- "start_gte": payload.start_gte,
107
- "type": payload.type,
108
- "updated_gte": payload.updated_gte,
109
- });
110
-
111
- const headers = new Headers(compactMap({
112
- Accept: "application/json",
113
- }));
114
-
115
- const securityInput = await extractSecurity(client._options.security);
116
- const requestSecurity = resolveGlobalSecurity(securityInput);
117
-
118
- const context = {
119
- options: client._options,
120
- baseURL: options?.serverURL ?? client._baseURL ?? "",
121
- operationID: "listAccountingReports",
122
- oAuth2Scopes: null,
123
-
124
- resolvedSecurity: requestSecurity,
125
-
126
- securitySource: client._options.security,
127
- retryConfig: options?.retries
128
- || client._options.retryConfig
129
- || { strategy: "none" },
130
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
131
- };
132
-
133
- const requestRes = client._createRequest(context, {
134
- security: requestSecurity,
135
- method: "GET",
136
- baseURL: options?.serverURL,
137
- path: path,
138
- headers: headers,
139
- query: query,
140
- body: body,
141
- userAgent: client._options.userAgent,
142
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
143
- }, options);
144
- if (!requestRes.ok) {
145
- return [requestRes, { status: "invalid" }];
146
- }
147
- const req = requestRes.value;
148
-
149
- const doResult = await client._do(req, {
150
- context,
151
- isErrorStatusCode: (statusCode: number) =>
152
- matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
153
- retryConfig: context.retryConfig,
154
- retryCodes: context.retryCodes,
155
- });
156
- if (!doResult.ok) {
157
- return [doResult, { status: "request-error", request: req }];
158
- }
159
- const response = doResult.value;
160
-
161
- const [result] = await M.match<
162
- Array<shared.AccountingReport>,
163
- | UnifiedToError
164
- | ResponseValidationError
165
- | ConnectionError
166
- | RequestAbortedError
167
- | RequestTimeoutError
168
- | InvalidRequestError
169
- | UnexpectedClientError
170
- | SDKValidationError
171
- >(
172
- M.json(200, z.array(shared.AccountingReport$inboundSchema)),
173
- M.fail("4XX"),
174
- M.fail("5XX"),
175
- )(response, req);
176
- if (!result.ok) {
177
- return [result, { status: "complete", request: req, response }];
178
- }
179
-
180
- return [result, { status: "complete", request: req, response }];
181
- }
@@ -1,83 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../../lib/primitives.js";
7
- import { ClosedEnum } from "../../types/enums.js";
8
-
9
- export const GetAccountingReportQueryParamFields = {
10
- Id: "id",
11
- CreatedAt: "created_at",
12
- UpdatedAt: "updated_at",
13
- Type: "type",
14
- Name: "name",
15
- Currency: "currency",
16
- StartAt: "start_at",
17
- EndAt: "end_at",
18
- BalanceSheet: "balance_sheet",
19
- ProfitAndLoss: "profit_and_loss",
20
- TrialBalance: "trial_balance",
21
- Raw: "raw",
22
- } as const;
23
- export type GetAccountingReportQueryParamFields = ClosedEnum<
24
- typeof GetAccountingReportQueryParamFields
25
- >;
26
-
27
- export type GetAccountingReportRequest = {
28
- /**
29
- * ID of the connection
30
- */
31
- connectionId: string;
32
- /**
33
- * Fields to return
34
- */
35
- fields?: Array<GetAccountingReportQueryParamFields> | undefined;
36
- /**
37
- * ID of the Report
38
- */
39
- id: string;
40
- /**
41
- * Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
42
- */
43
- raw?: string | undefined;
44
- };
45
-
46
- /** @internal */
47
- export const GetAccountingReportQueryParamFields$outboundSchema:
48
- z.ZodNativeEnum<typeof GetAccountingReportQueryParamFields> = z.nativeEnum(
49
- GetAccountingReportQueryParamFields,
50
- );
51
-
52
- /** @internal */
53
- export type GetAccountingReportRequest$Outbound = {
54
- connection_id: string;
55
- fields?: Array<string> | undefined;
56
- id: string;
57
- raw?: string | undefined;
58
- };
59
-
60
- /** @internal */
61
- export const GetAccountingReportRequest$outboundSchema: z.ZodType<
62
- GetAccountingReportRequest$Outbound,
63
- z.ZodTypeDef,
64
- GetAccountingReportRequest
65
- > = z.object({
66
- connectionId: z.string(),
67
- fields: z.array(GetAccountingReportQueryParamFields$outboundSchema)
68
- .optional(),
69
- id: z.string(),
70
- raw: z.string().optional(),
71
- }).transform((v) => {
72
- return remap$(v, {
73
- connectionId: "connection_id",
74
- });
75
- });
76
-
77
- export function getAccountingReportRequestToJSON(
78
- getAccountingReportRequest: GetAccountingReportRequest,
79
- ): string {
80
- return JSON.stringify(
81
- GetAccountingReportRequest$outboundSchema.parse(getAccountingReportRequest),
82
- );
83
- }
@@ -1,121 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../../lib/primitives.js";
7
- import { ClosedEnum } from "../../types/enums.js";
8
-
9
- export const ListAccountingReportsQueryParamFields = {
10
- Id: "id",
11
- CreatedAt: "created_at",
12
- UpdatedAt: "updated_at",
13
- Type: "type",
14
- Name: "name",
15
- Currency: "currency",
16
- StartAt: "start_at",
17
- EndAt: "end_at",
18
- BalanceSheet: "balance_sheet",
19
- ProfitAndLoss: "profit_and_loss",
20
- TrialBalance: "trial_balance",
21
- Raw: "raw",
22
- } as const;
23
- export type ListAccountingReportsQueryParamFields = ClosedEnum<
24
- typeof ListAccountingReportsQueryParamFields
25
- >;
26
-
27
- export type ListAccountingReportsRequest = {
28
- /**
29
- * ID of the connection
30
- */
31
- connectionId: string;
32
- /**
33
- * The end date to filter by (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
34
- */
35
- endLt?: string | undefined;
36
- /**
37
- * Fields to return
38
- */
39
- fields?: Array<ListAccountingReportsQueryParamFields> | undefined;
40
- limit?: number | undefined;
41
- offset?: number | undefined;
42
- order?: string | undefined;
43
- /**
44
- * Query string to search. eg. email address or name
45
- */
46
- query?: string | undefined;
47
- /**
48
- * Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
49
- */
50
- raw?: string | undefined;
51
- sort?: string | undefined;
52
- /**
53
- * The start date to filter by (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
54
- */
55
- startGte?: string | undefined;
56
- type?: string | undefined;
57
- /**
58
- * Return only results whose updated date is equal or greater to this value (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
59
- */
60
- updatedGte?: string | undefined;
61
- };
62
-
63
- /** @internal */
64
- export const ListAccountingReportsQueryParamFields$outboundSchema:
65
- z.ZodNativeEnum<typeof ListAccountingReportsQueryParamFields> = z.nativeEnum(
66
- ListAccountingReportsQueryParamFields,
67
- );
68
-
69
- /** @internal */
70
- export type ListAccountingReportsRequest$Outbound = {
71
- connection_id: string;
72
- end_lt?: string | undefined;
73
- fields?: Array<string> | undefined;
74
- limit?: number | undefined;
75
- offset?: number | undefined;
76
- order?: string | undefined;
77
- query?: string | undefined;
78
- raw?: string | undefined;
79
- sort?: string | undefined;
80
- start_gte?: string | undefined;
81
- type?: string | undefined;
82
- updated_gte?: string | undefined;
83
- };
84
-
85
- /** @internal */
86
- export const ListAccountingReportsRequest$outboundSchema: z.ZodType<
87
- ListAccountingReportsRequest$Outbound,
88
- z.ZodTypeDef,
89
- ListAccountingReportsRequest
90
- > = z.object({
91
- connectionId: z.string(),
92
- endLt: z.string().optional(),
93
- fields: z.array(ListAccountingReportsQueryParamFields$outboundSchema)
94
- .optional(),
95
- limit: z.number().optional(),
96
- offset: z.number().optional(),
97
- order: z.string().optional(),
98
- query: z.string().optional(),
99
- raw: z.string().optional(),
100
- sort: z.string().optional(),
101
- startGte: z.string().optional(),
102
- type: z.string().optional(),
103
- updatedGte: z.string().optional(),
104
- }).transform((v) => {
105
- return remap$(v, {
106
- connectionId: "connection_id",
107
- endLt: "end_lt",
108
- startGte: "start_gte",
109
- updatedGte: "updated_gte",
110
- });
111
- });
112
-
113
- export function listAccountingReportsRequestToJSON(
114
- listAccountingReportsRequest: ListAccountingReportsRequest,
115
- ): string {
116
- return JSON.stringify(
117
- ListAccountingReportsRequest$outboundSchema.parse(
118
- listAccountingReportsRequest,
119
- ),
120
- );
121
- }
@@ -1,100 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../../lib/primitives.js";
7
- import { safeParse } from "../../../lib/schemas.js";
8
- import * as openEnums from "../../types/enums.js";
9
- import { OpenEnum } from "../../types/enums.js";
10
- import { Result as SafeParseResult } from "../../types/fp.js";
11
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
- import {
13
- PropertyAccountingReportBalanceSheet,
14
- PropertyAccountingReportBalanceSheet$inboundSchema,
15
- } from "./propertyaccountingreportbalancesheet.js";
16
- import {
17
- PropertyAccountingReportProfitAndLoss,
18
- PropertyAccountingReportProfitAndLoss$inboundSchema,
19
- } from "./propertyaccountingreportprofitandloss.js";
20
- import {
21
- PropertyAccountingReportTrialBalance,
22
- PropertyAccountingReportTrialBalance$inboundSchema,
23
- } from "./propertyaccountingreporttrialbalance.js";
24
-
25
- export const AccountingReportType = {
26
- TrialBalance: "TRIAL_BALANCE",
27
- BalanceSheet: "BALANCE_SHEET",
28
- ProfitAndLoss: "PROFIT_AND_LOSS",
29
- } as const;
30
- export type AccountingReportType = OpenEnum<typeof AccountingReportType>;
31
-
32
- /**
33
- * @deprecated; use either AccountingProfitandloss, AccountingTrialbalance, AccountingBalancesheet, or AccountingCashflow instead
34
- */
35
- export type AccountingReport = {
36
- balanceSheet?: PropertyAccountingReportBalanceSheet | undefined;
37
- createdAt?: Date | undefined;
38
- currency?: string | undefined;
39
- endAt?: Date | undefined;
40
- id?: string | undefined;
41
- name?: string | undefined;
42
- profitAndLoss?: PropertyAccountingReportProfitAndLoss | undefined;
43
- raw?: { [k: string]: any } | undefined;
44
- startAt?: Date | undefined;
45
- trialBalance?: PropertyAccountingReportTrialBalance | undefined;
46
- type?: AccountingReportType | undefined;
47
- updatedAt?: Date | undefined;
48
- };
49
-
50
- /** @internal */
51
- export const AccountingReportType$inboundSchema: z.ZodType<
52
- AccountingReportType,
53
- z.ZodTypeDef,
54
- unknown
55
- > = openEnums.inboundSchema(AccountingReportType);
56
-
57
- /** @internal */
58
- export const AccountingReport$inboundSchema: z.ZodType<
59
- AccountingReport,
60
- z.ZodTypeDef,
61
- unknown
62
- > = z.object({
63
- balance_sheet: PropertyAccountingReportBalanceSheet$inboundSchema.optional(),
64
- created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
65
- .optional(),
66
- currency: z.string().optional(),
67
- end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
68
- .optional(),
69
- id: z.string().optional(),
70
- name: z.string().optional(),
71
- profit_and_loss: PropertyAccountingReportProfitAndLoss$inboundSchema
72
- .optional(),
73
- raw: z.record(z.any()).optional(),
74
- start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
75
- .optional(),
76
- trial_balance: PropertyAccountingReportTrialBalance$inboundSchema.optional(),
77
- type: AccountingReportType$inboundSchema.optional(),
78
- updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
79
- .optional(),
80
- }).transform((v) => {
81
- return remap$(v, {
82
- "balance_sheet": "balanceSheet",
83
- "created_at": "createdAt",
84
- "end_at": "endAt",
85
- "profit_and_loss": "profitAndLoss",
86
- "start_at": "startAt",
87
- "trial_balance": "trialBalance",
88
- "updated_at": "updatedAt",
89
- });
90
- });
91
-
92
- export function accountingReportFromJSON(
93
- jsonString: string,
94
- ): SafeParseResult<AccountingReport, SDKValidationError> {
95
- return safeParse(
96
- jsonString,
97
- (x) => AccountingReport$inboundSchema.parse(JSON.parse(x)),
98
- `Failed to parse 'AccountingReport' from JSON`,
99
- );
100
- }
@@ -1,71 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../../lib/primitives.js";
7
- import { safeParse } from "../../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- AccountingBalancesheetItem,
12
- AccountingBalancesheetItem$inboundSchema,
13
- } from "./accountingbalancesheetitem.js";
14
-
15
- export type PropertyAccountingReportBalanceSheet = {
16
- assets?: Array<AccountingBalancesheetItem> | undefined;
17
- createdAt?: Date | undefined;
18
- currency?: string | undefined;
19
- endAt?: Date | undefined;
20
- equity?: Array<AccountingBalancesheetItem> | undefined;
21
- id?: string | undefined;
22
- liabilities?: Array<AccountingBalancesheetItem> | undefined;
23
- name?: string | undefined;
24
- netAssetsAmount?: number | undefined;
25
- raw?: { [k: string]: any } | undefined;
26
- startAt?: Date | undefined;
27
- updatedAt?: Date | undefined;
28
- };
29
-
30
- /** @internal */
31
- export const PropertyAccountingReportBalanceSheet$inboundSchema: z.ZodType<
32
- PropertyAccountingReportBalanceSheet,
33
- z.ZodTypeDef,
34
- unknown
35
- > = z.object({
36
- assets: z.array(AccountingBalancesheetItem$inboundSchema).optional(),
37
- created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
38
- .optional(),
39
- currency: z.string().optional(),
40
- end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
41
- .optional(),
42
- equity: z.array(AccountingBalancesheetItem$inboundSchema).optional(),
43
- id: z.string().optional(),
44
- liabilities: z.array(AccountingBalancesheetItem$inboundSchema).optional(),
45
- name: z.string().optional(),
46
- net_assets_amount: z.number().optional(),
47
- raw: z.record(z.any()).optional(),
48
- start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
49
- .optional(),
50
- updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
51
- .optional(),
52
- }).transform((v) => {
53
- return remap$(v, {
54
- "created_at": "createdAt",
55
- "end_at": "endAt",
56
- "net_assets_amount": "netAssetsAmount",
57
- "start_at": "startAt",
58
- "updated_at": "updatedAt",
59
- });
60
- });
61
-
62
- export function propertyAccountingReportBalanceSheetFromJSON(
63
- jsonString: string,
64
- ): SafeParseResult<PropertyAccountingReportBalanceSheet, SDKValidationError> {
65
- return safeParse(
66
- jsonString,
67
- (x) =>
68
- PropertyAccountingReportBalanceSheet$inboundSchema.parse(JSON.parse(x)),
69
- `Failed to parse 'PropertyAccountingReportBalanceSheet' from JSON`,
70
- );
71
- }
@@ -1,90 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../../lib/primitives.js";
7
- import { safeParse } from "../../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- AccountingProfitlossSection,
12
- AccountingProfitlossSection$inboundSchema,
13
- } from "./accountingprofitlosssection.js";
14
-
15
- export type PropertyAccountingReportProfitAndLoss = {
16
- categoryIds?: Array<string> | undefined;
17
- costOfGoodsSoldSections?: Array<AccountingProfitlossSection> | undefined;
18
- costOfGoodsSoldTotalAmount?: number | undefined;
19
- createdAt?: Date | undefined;
20
- currency?: string | undefined;
21
- endAt?: Date | undefined;
22
- expensesSections?: Array<AccountingProfitlossSection> | undefined;
23
- expensesTotalAmount?: number | undefined;
24
- id?: string | undefined;
25
- incomeSections?: Array<AccountingProfitlossSection> | undefined;
26
- incomeTotalAmount?: number | undefined;
27
- name?: string | undefined;
28
- netIncomeAmount?: number | undefined;
29
- raw?: { [k: string]: any } | undefined;
30
- startAt?: Date | undefined;
31
- updatedAt?: Date | undefined;
32
- };
33
-
34
- /** @internal */
35
- export const PropertyAccountingReportProfitAndLoss$inboundSchema: z.ZodType<
36
- PropertyAccountingReportProfitAndLoss,
37
- z.ZodTypeDef,
38
- unknown
39
- > = z.object({
40
- category_ids: z.array(z.string()).optional(),
41
- cost_of_goods_sold_sections: z.array(
42
- AccountingProfitlossSection$inboundSchema,
43
- ).optional(),
44
- cost_of_goods_sold_total_amount: z.number().optional(),
45
- created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
46
- .optional(),
47
- currency: z.string().optional(),
48
- end_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
49
- .optional(),
50
- expenses_sections: z.array(AccountingProfitlossSection$inboundSchema)
51
- .optional(),
52
- expenses_total_amount: z.number().optional(),
53
- id: z.string().optional(),
54
- income_sections: z.array(AccountingProfitlossSection$inboundSchema)
55
- .optional(),
56
- income_total_amount: z.number().optional(),
57
- name: z.string().optional(),
58
- net_income_amount: z.number().optional(),
59
- raw: z.record(z.any()).optional(),
60
- start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
61
- .optional(),
62
- updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
63
- .optional(),
64
- }).transform((v) => {
65
- return remap$(v, {
66
- "category_ids": "categoryIds",
67
- "cost_of_goods_sold_sections": "costOfGoodsSoldSections",
68
- "cost_of_goods_sold_total_amount": "costOfGoodsSoldTotalAmount",
69
- "created_at": "createdAt",
70
- "end_at": "endAt",
71
- "expenses_sections": "expensesSections",
72
- "expenses_total_amount": "expensesTotalAmount",
73
- "income_sections": "incomeSections",
74
- "income_total_amount": "incomeTotalAmount",
75
- "net_income_amount": "netIncomeAmount",
76
- "start_at": "startAt",
77
- "updated_at": "updatedAt",
78
- });
79
- });
80
-
81
- export function propertyAccountingReportProfitAndLossFromJSON(
82
- jsonString: string,
83
- ): SafeParseResult<PropertyAccountingReportProfitAndLoss, SDKValidationError> {
84
- return safeParse(
85
- jsonString,
86
- (x) =>
87
- PropertyAccountingReportProfitAndLoss$inboundSchema.parse(JSON.parse(x)),
88
- `Failed to parse 'PropertyAccountingReportProfitAndLoss' from JSON`,
89
- );
90
- }