@unified-api/typescript-sdk 2.73.10 → 2.73.12

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 (257) hide show
  1. package/README.md +12 -0
  2. package/bin/mcp-server.js +4421 -3450
  3. package/bin/mcp-server.js.map +32 -13
  4. package/docs/sdks/account/README.md +6 -0
  5. package/docs/sdks/accounting/README.md +558 -0
  6. package/docs/sdks/activity/README.md +6 -0
  7. package/docs/sdks/apicall/README.md +2 -0
  8. package/docs/sdks/application/README.md +6 -0
  9. package/docs/sdks/applicationstatus/README.md +1 -0
  10. package/docs/sdks/ats/README.md +49 -0
  11. package/docs/sdks/auth/README.md +2 -0
  12. package/docs/sdks/balancesheet/README.md +2 -0
  13. package/docs/sdks/bill/README.md +6 -0
  14. package/docs/sdks/branch/README.md +6 -0
  15. package/docs/sdks/busy/README.md +1 -0
  16. package/docs/sdks/calendar/README.md +21 -0
  17. package/docs/sdks/call/README.md +1 -0
  18. package/docs/sdks/candidate/README.md +6 -0
  19. package/docs/sdks/category/README.md +489 -0
  20. package/docs/sdks/channel/README.md +2 -0
  21. package/docs/sdks/class/README.md +6 -0
  22. package/docs/sdks/collection/README.md +6 -0
  23. package/docs/sdks/comment/README.md +18 -0
  24. package/docs/sdks/commerce/README.md +30 -0
  25. package/docs/sdks/commit/README.md +6 -0
  26. package/docs/sdks/company/README.md +19 -0
  27. package/docs/sdks/connection/README.md +6 -0
  28. package/docs/sdks/contact/README.md +18 -0
  29. package/docs/sdks/course/README.md +6 -0
  30. package/docs/sdks/creditmemo/README.md +6 -0
  31. package/docs/sdks/crm/README.md +36 -0
  32. package/docs/sdks/customer/README.md +6 -0
  33. package/docs/sdks/deal/README.md +6 -0
  34. package/docs/sdks/device/README.md +6 -0
  35. package/docs/sdks/document/README.md +6 -0
  36. package/docs/sdks/employee/README.md +6 -0
  37. package/docs/sdks/enrich/README.md +2 -0
  38. package/docs/sdks/event/README.md +12 -0
  39. package/docs/sdks/file/README.md +6 -0
  40. package/docs/sdks/genai/README.md +2 -0
  41. package/docs/sdks/group/README.md +12 -0
  42. package/docs/sdks/hris/README.md +40 -0
  43. package/docs/sdks/instructor/README.md +6 -0
  44. package/docs/sdks/integration/README.md +3 -0
  45. package/docs/sdks/interview/README.md +6 -0
  46. package/docs/sdks/inventory/README.md +6 -0
  47. package/docs/sdks/invoice/README.md +6 -0
  48. package/docs/sdks/issue/README.md +1 -0
  49. package/docs/sdks/item/README.md +6 -0
  50. package/docs/sdks/job/README.md +6 -0
  51. package/docs/sdks/journal/README.md +6 -0
  52. package/docs/sdks/kms/README.md +18 -0
  53. package/docs/sdks/lead/README.md +6 -0
  54. package/docs/sdks/link/README.md +12 -0
  55. package/docs/sdks/list/README.md +6 -0
  56. package/docs/sdks/lms/README.md +24 -0
  57. package/docs/sdks/location/README.md +12 -0
  58. package/docs/sdks/login/README.md +1 -0
  59. package/docs/sdks/martech/README.md +12 -0
  60. package/docs/sdks/member/README.md +6 -0
  61. package/docs/sdks/message/README.md +6 -0
  62. package/docs/sdks/messaging/README.md +8 -0
  63. package/docs/sdks/metadata/README.md +6 -0
  64. package/docs/sdks/model/README.md +1 -0
  65. package/docs/sdks/note/README.md +6 -0
  66. package/docs/sdks/order/README.md +6 -0
  67. package/docs/sdks/organization/README.md +8 -0
  68. package/docs/sdks/page/README.md +6 -0
  69. package/docs/sdks/passthrough/README.md +8 -0
  70. package/docs/sdks/payment/README.md +22 -0
  71. package/docs/sdks/payout/README.md +2 -0
  72. package/docs/sdks/payslip/README.md +2 -0
  73. package/docs/sdks/person/README.md +1 -0
  74. package/docs/sdks/pipeline/README.md +6 -0
  75. package/docs/sdks/profitloss/README.md +2 -0
  76. package/docs/sdks/project/README.md +6 -0
  77. package/docs/sdks/prompt/README.md +1 -0
  78. package/docs/sdks/pullrequest/README.md +6 -0
  79. package/docs/sdks/purchaseorder/README.md +6 -0
  80. package/docs/sdks/recording/README.md +8 -0
  81. package/docs/sdks/refund/README.md +2 -0
  82. package/docs/sdks/repo/README.md +30 -0
  83. package/docs/sdks/report/README.md +2 -0
  84. package/docs/sdks/repository/README.md +6 -0
  85. package/docs/sdks/review/README.md +6 -0
  86. package/docs/sdks/salesorder/README.md +6 -0
  87. package/docs/sdks/scim/README.md +12 -0
  88. package/docs/sdks/scorecard/README.md +6 -0
  89. package/docs/sdks/space/README.md +6 -0
  90. package/docs/sdks/storage/README.md +6 -0
  91. package/docs/sdks/student/README.md +6 -0
  92. package/docs/sdks/subscription/README.md +6 -0
  93. package/docs/sdks/task/README.md +18 -0
  94. package/docs/sdks/taxrate/README.md +6 -0
  95. package/docs/sdks/ticket/README.md +6 -0
  96. package/docs/sdks/ticketing/README.md +18 -0
  97. package/docs/sdks/timeoff/README.md +2 -0
  98. package/docs/sdks/timeshift/README.md +6 -0
  99. package/docs/sdks/transaction/README.md +6 -0
  100. package/docs/sdks/trialbalance/README.md +2 -0
  101. package/docs/sdks/uc/README.md +19 -0
  102. package/docs/sdks/unified/README.md +20 -0
  103. package/docs/sdks/user/README.md +6 -0
  104. package/docs/sdks/webhook/README.md +8 -0
  105. package/examples/README.md +5 -0
  106. package/examples/accountingCreateAccountingAccount.example.ts +2 -0
  107. package/examples/package-lock.json +6 -5
  108. package/funcs/accountingCreateAccountingCategory.d.ts +15 -0
  109. package/funcs/accountingCreateAccountingCategory.d.ts.map +1 -0
  110. package/funcs/accountingCreateAccountingCategory.js +114 -0
  111. package/funcs/accountingCreateAccountingCategory.js.map +1 -0
  112. package/funcs/accountingGetAccountingCategory.d.ts +15 -0
  113. package/funcs/accountingGetAccountingCategory.d.ts.map +1 -0
  114. package/funcs/accountingGetAccountingCategory.js +115 -0
  115. package/funcs/accountingGetAccountingCategory.js.map +1 -0
  116. package/funcs/accountingListAccountingCategories.d.ts +15 -0
  117. package/funcs/accountingListAccountingCategories.d.ts.map +1 -0
  118. package/funcs/accountingListAccountingCategories.js +119 -0
  119. package/funcs/accountingListAccountingCategories.js.map +1 -0
  120. package/funcs/accountingPatchAccountingCategory.d.ts +15 -0
  121. package/funcs/accountingPatchAccountingCategory.d.ts.map +1 -0
  122. package/funcs/accountingPatchAccountingCategory.js +118 -0
  123. package/funcs/accountingPatchAccountingCategory.js.map +1 -0
  124. package/funcs/accountingRemoveAccountingCategory.d.ts +14 -0
  125. package/funcs/accountingRemoveAccountingCategory.d.ts.map +1 -0
  126. package/funcs/accountingRemoveAccountingCategory.js +112 -0
  127. package/funcs/accountingRemoveAccountingCategory.js.map +1 -0
  128. package/funcs/accountingUpdateAccountingCategory.d.ts +15 -0
  129. package/funcs/accountingUpdateAccountingCategory.d.ts.map +1 -0
  130. package/funcs/accountingUpdateAccountingCategory.js +118 -0
  131. package/funcs/accountingUpdateAccountingCategory.js.map +1 -0
  132. package/jsr.json +1 -1
  133. package/lib/config.d.ts +3 -3
  134. package/lib/config.js +3 -3
  135. package/mcp-server/mcp-server.js +1 -1
  136. package/mcp-server/server.d.ts.map +1 -1
  137. package/mcp-server/server.js +13 -1
  138. package/mcp-server/server.js.map +1 -1
  139. package/mcp-server/tools/accountingCreateAccountingCategory.d.ts +8 -0
  140. package/mcp-server/tools/accountingCreateAccountingCategory.d.ts.map +1 -0
  141. package/mcp-server/tools/accountingCreateAccountingCategory.js +52 -0
  142. package/mcp-server/tools/accountingCreateAccountingCategory.js.map +1 -0
  143. package/mcp-server/tools/accountingGetAccountingCategory.d.ts +8 -0
  144. package/mcp-server/tools/accountingGetAccountingCategory.d.ts.map +1 -0
  145. package/mcp-server/tools/accountingGetAccountingCategory.js +52 -0
  146. package/mcp-server/tools/accountingGetAccountingCategory.js.map +1 -0
  147. package/mcp-server/tools/accountingListAccountingCategories.d.ts +8 -0
  148. package/mcp-server/tools/accountingListAccountingCategories.d.ts.map +1 -0
  149. package/mcp-server/tools/accountingListAccountingCategories.js +52 -0
  150. package/mcp-server/tools/accountingListAccountingCategories.js.map +1 -0
  151. package/mcp-server/tools/accountingPatchAccountingCategory.d.ts +8 -0
  152. package/mcp-server/tools/accountingPatchAccountingCategory.d.ts.map +1 -0
  153. package/mcp-server/tools/accountingPatchAccountingCategory.js +52 -0
  154. package/mcp-server/tools/accountingPatchAccountingCategory.js.map +1 -0
  155. package/mcp-server/tools/accountingRemoveAccountingCategory.d.ts +8 -0
  156. package/mcp-server/tools/accountingRemoveAccountingCategory.d.ts.map +1 -0
  157. package/mcp-server/tools/accountingRemoveAccountingCategory.js +51 -0
  158. package/mcp-server/tools/accountingRemoveAccountingCategory.js.map +1 -0
  159. package/mcp-server/tools/accountingUpdateAccountingCategory.d.ts +8 -0
  160. package/mcp-server/tools/accountingUpdateAccountingCategory.d.ts.map +1 -0
  161. package/mcp-server/tools/accountingUpdateAccountingCategory.js +52 -0
  162. package/mcp-server/tools/accountingUpdateAccountingCategory.js.map +1 -0
  163. package/package.json +4 -6
  164. package/sdk/accounting.d.ts +24 -0
  165. package/sdk/accounting.d.ts.map +1 -1
  166. package/sdk/accounting.js +42 -0
  167. package/sdk/accounting.js.map +1 -1
  168. package/sdk/category.d.ts +30 -0
  169. package/sdk/category.d.ts.map +1 -0
  170. package/sdk/category.js +54 -0
  171. package/sdk/category.js.map +1 -0
  172. package/sdk/models/operations/createaccountingcategory.d.ts +45 -0
  173. package/sdk/models/operations/createaccountingcategory.d.ts.map +1 -0
  174. package/sdk/models/operations/createaccountingcategory.js +77 -0
  175. package/sdk/models/operations/createaccountingcategory.js.map +1 -0
  176. package/sdk/models/operations/getaccountingcategory.d.ts +47 -0
  177. package/sdk/models/operations/getaccountingcategory.d.ts.map +1 -0
  178. package/sdk/models/operations/getaccountingcategory.js +74 -0
  179. package/sdk/models/operations/getaccountingcategory.js.map +1 -0
  180. package/sdk/models/operations/index.d.ts +6 -0
  181. package/sdk/models/operations/index.d.ts.map +1 -1
  182. package/sdk/models/operations/index.js +6 -0
  183. package/sdk/models/operations/index.js.map +1 -1
  184. package/sdk/models/operations/listaccountingcategories.d.ts +65 -0
  185. package/sdk/models/operations/listaccountingcategories.d.ts.map +1 -0
  186. package/sdk/models/operations/listaccountingcategories.js +90 -0
  187. package/sdk/models/operations/listaccountingcategories.js.map +1 -0
  188. package/sdk/models/operations/patchaccountingcategory.d.ts +50 -0
  189. package/sdk/models/operations/patchaccountingcategory.d.ts.map +1 -0
  190. package/sdk/models/operations/patchaccountingcategory.js +79 -0
  191. package/sdk/models/operations/patchaccountingcategory.js.map +1 -0
  192. package/sdk/models/operations/removeaccountingcategory.d.ts +66 -0
  193. package/sdk/models/operations/removeaccountingcategory.d.ts.map +1 -0
  194. package/sdk/models/operations/removeaccountingcategory.js +105 -0
  195. package/sdk/models/operations/removeaccountingcategory.js.map +1 -0
  196. package/sdk/models/operations/updateaccountingcategory.d.ts +50 -0
  197. package/sdk/models/operations/updateaccountingcategory.d.ts.map +1 -0
  198. package/sdk/models/operations/updateaccountingcategory.js +79 -0
  199. package/sdk/models/operations/updateaccountingcategory.js.map +1 -0
  200. package/sdk/models/shared/accountingcategory.d.ts +47 -0
  201. package/sdk/models/shared/accountingcategory.d.ts.map +1 -0
  202. package/sdk/models/shared/accountingcategory.js +90 -0
  203. package/sdk/models/shared/accountingcategory.js.map +1 -0
  204. package/sdk/models/shared/accountinglineitem.d.ts +2 -0
  205. package/sdk/models/shared/accountinglineitem.d.ts.map +1 -1
  206. package/sdk/models/shared/accountinglineitem.js +4 -0
  207. package/sdk/models/shared/accountinglineitem.js.map +1 -1
  208. package/sdk/models/shared/accountingprofitloss.d.ts +3 -3
  209. package/sdk/models/shared/index.d.ts +1 -0
  210. package/sdk/models/shared/index.d.ts.map +1 -1
  211. package/sdk/models/shared/index.js +1 -0
  212. package/sdk/models/shared/index.js.map +1 -1
  213. package/sdk/models/shared/propertyaccountingreportprofitandloss.d.ts +3 -3
  214. package/sdk/models/shared/propertyconnectionpermissions.d.ts +2 -0
  215. package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  216. package/sdk/models/shared/propertyconnectionpermissions.js +2 -0
  217. package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  218. package/sdk/models/shared/webhook.d.ts +1 -0
  219. package/sdk/models/shared/webhook.d.ts.map +1 -1
  220. package/sdk/models/shared/webhook.js +1 -0
  221. package/sdk/models/shared/webhook.js.map +1 -1
  222. package/sdk/sdk.d.ts +3 -0
  223. package/sdk/sdk.d.ts.map +1 -1
  224. package/sdk/sdk.js +4 -0
  225. package/sdk/sdk.js.map +1 -1
  226. package/src/funcs/accountingCreateAccountingCategory.ts +173 -0
  227. package/src/funcs/accountingGetAccountingCategory.ts +176 -0
  228. package/src/funcs/accountingListAccountingCategories.ts +178 -0
  229. package/src/funcs/accountingPatchAccountingCategory.ts +179 -0
  230. package/src/funcs/accountingRemoveAccountingCategory.ts +181 -0
  231. package/src/funcs/accountingUpdateAccountingCategory.ts +179 -0
  232. package/src/lib/config.ts +3 -3
  233. package/src/mcp-server/mcp-server.ts +1 -1
  234. package/src/mcp-server/server.ts +13 -1
  235. package/src/mcp-server/tools/accountingCreateAccountingCategory.ts +37 -0
  236. package/src/mcp-server/tools/accountingGetAccountingCategory.ts +36 -0
  237. package/src/mcp-server/tools/accountingListAccountingCategories.ts +37 -0
  238. package/src/mcp-server/tools/accountingPatchAccountingCategory.ts +37 -0
  239. package/src/mcp-server/tools/accountingRemoveAccountingCategory.ts +35 -0
  240. package/src/mcp-server/tools/accountingUpdateAccountingCategory.ts +37 -0
  241. package/src/sdk/accounting.ts +90 -0
  242. package/src/sdk/category.ts +100 -0
  243. package/src/sdk/models/operations/createaccountingcategory.ts +101 -0
  244. package/src/sdk/models/operations/getaccountingcategory.ts +101 -0
  245. package/src/sdk/models/operations/index.ts +6 -0
  246. package/src/sdk/models/operations/listaccountingcategories.ts +135 -0
  247. package/src/sdk/models/operations/patchaccountingcategory.ts +108 -0
  248. package/src/sdk/models/operations/removeaccountingcategory.ts +155 -0
  249. package/src/sdk/models/operations/updateaccountingcategory.ts +108 -0
  250. package/src/sdk/models/shared/accountingcategory.ts +111 -0
  251. package/src/sdk/models/shared/accountinglineitem.ts +6 -0
  252. package/src/sdk/models/shared/accountingprofitloss.ts +3 -3
  253. package/src/sdk/models/shared/index.ts +1 -0
  254. package/src/sdk/models/shared/propertyaccountingreportprofitandloss.ts +3 -3
  255. package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
  256. package/src/sdk/models/shared/webhook.ts +1 -0
  257. package/src/sdk/sdk.ts +6 -0
@@ -0,0 +1,181 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { UnifiedToCore } from "../core.js";
6
+ import { encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../sdk/models/errors/httpclienterrors.js";
20
+ import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
21
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
22
+ import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
23
+ import * as operations from "../sdk/models/operations/index.js";
24
+ import { APICall, APIPromise } from "../sdk/types/async.js";
25
+ import { Result } from "../sdk/types/fp.js";
26
+
27
+ /**
28
+ * Remove a category
29
+ */
30
+ export function accountingRemoveAccountingCategory(
31
+ client: UnifiedToCore,
32
+ request: operations.RemoveAccountingCategoryRequest,
33
+ options?: RequestOptions,
34
+ ): APIPromise<
35
+ Result<
36
+ operations.RemoveAccountingCategoryResponse | undefined,
37
+ | UnifiedToError
38
+ | ResponseValidationError
39
+ | ConnectionError
40
+ | RequestAbortedError
41
+ | RequestTimeoutError
42
+ | InvalidRequestError
43
+ | UnexpectedClientError
44
+ | SDKValidationError
45
+ >
46
+ > {
47
+ return new APIPromise($do(
48
+ client,
49
+ request,
50
+ options,
51
+ ));
52
+ }
53
+
54
+ async function $do(
55
+ client: UnifiedToCore,
56
+ request: operations.RemoveAccountingCategoryRequest,
57
+ options?: RequestOptions,
58
+ ): Promise<
59
+ [
60
+ Result<
61
+ operations.RemoveAccountingCategoryResponse | undefined,
62
+ | UnifiedToError
63
+ | ResponseValidationError
64
+ | ConnectionError
65
+ | RequestAbortedError
66
+ | RequestTimeoutError
67
+ | InvalidRequestError
68
+ | UnexpectedClientError
69
+ | SDKValidationError
70
+ >,
71
+ APICall,
72
+ ]
73
+ > {
74
+ const parsed = safeParse(
75
+ request,
76
+ (value) =>
77
+ operations.RemoveAccountingCategoryRequest$outboundSchema.parse(value),
78
+ "Input validation failed",
79
+ );
80
+ if (!parsed.ok) {
81
+ return [parsed, { status: "invalid" }];
82
+ }
83
+ const payload = parsed.value;
84
+ const body = null;
85
+
86
+ const pathParams = {
87
+ connection_id: encodeSimple("connection_id", payload.connection_id, {
88
+ explode: false,
89
+ charEncoding: "percent",
90
+ }),
91
+ id: encodeSimple("id", payload.id, {
92
+ explode: false,
93
+ charEncoding: "percent",
94
+ }),
95
+ };
96
+
97
+ const path = pathToFunc("/accounting/{connection_id}/category/{id}")(
98
+ pathParams,
99
+ );
100
+
101
+ const headers = new Headers(compactMap({
102
+ Accept: "*/*",
103
+ }));
104
+
105
+ const securityInput = await extractSecurity(client._options.security);
106
+ const requestSecurity = resolveGlobalSecurity(securityInput);
107
+
108
+ const context = {
109
+ options: client._options,
110
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
111
+ operationID: "removeAccountingCategory",
112
+ oAuth2Scopes: [],
113
+
114
+ resolvedSecurity: requestSecurity,
115
+
116
+ securitySource: client._options.security,
117
+ retryConfig: options?.retries
118
+ || client._options.retryConfig
119
+ || { strategy: "none" },
120
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
121
+ };
122
+
123
+ const requestRes = client._createRequest(context, {
124
+ security: requestSecurity,
125
+ method: "DELETE",
126
+ baseURL: options?.serverURL,
127
+ path: path,
128
+ headers: headers,
129
+ body: body,
130
+ userAgent: client._options.userAgent,
131
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
132
+ }, options);
133
+ if (!requestRes.ok) {
134
+ return [requestRes, { status: "invalid" }];
135
+ }
136
+ const req = requestRes.value;
137
+
138
+ const doResult = await client._do(req, {
139
+ context,
140
+ errorCodes: ["4XX", "5XX"],
141
+ retryConfig: context.retryConfig,
142
+ retryCodes: context.retryCodes,
143
+ });
144
+ if (!doResult.ok) {
145
+ return [doResult, { status: "request-error", request: req }];
146
+ }
147
+ const response = doResult.value;
148
+
149
+ const responseFields = {
150
+ HttpMeta: { Response: response, Request: req },
151
+ };
152
+
153
+ const [result] = await M.match<
154
+ operations.RemoveAccountingCategoryResponse | undefined,
155
+ | UnifiedToError
156
+ | ResponseValidationError
157
+ | ConnectionError
158
+ | RequestAbortedError
159
+ | RequestTimeoutError
160
+ | InvalidRequestError
161
+ | UnexpectedClientError
162
+ | SDKValidationError
163
+ >(
164
+ M.nil(
165
+ 200,
166
+ operations.RemoveAccountingCategoryResponse$inboundSchema.optional(),
167
+ ),
168
+ M.fail("4XX"),
169
+ M.fail("5XX"),
170
+ M.nil(
171
+ "default",
172
+ operations.RemoveAccountingCategoryResponse$inboundSchema.optional(),
173
+ { hdrs: true },
174
+ ),
175
+ )(response, req, { extraFields: responseFields });
176
+ if (!result.ok) {
177
+ return [result, { status: "complete", request: req, response }];
178
+ }
179
+
180
+ return [result, { status: "complete", request: req, response }];
181
+ }
@@ -0,0 +1,179 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { UnifiedToCore } from "../core.js";
6
+ import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../sdk/models/errors/httpclienterrors.js";
20
+ import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
21
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
22
+ import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
23
+ import * as operations from "../sdk/models/operations/index.js";
24
+ import * as shared from "../sdk/models/shared/index.js";
25
+ import { APICall, APIPromise } from "../sdk/types/async.js";
26
+ import { Result } from "../sdk/types/fp.js";
27
+
28
+ /**
29
+ * Update a category
30
+ */
31
+ export function accountingUpdateAccountingCategory(
32
+ client: UnifiedToCore,
33
+ request: operations.UpdateAccountingCategoryRequest,
34
+ options?: RequestOptions,
35
+ ): APIPromise<
36
+ Result<
37
+ shared.AccountingCategory,
38
+ | UnifiedToError
39
+ | ResponseValidationError
40
+ | ConnectionError
41
+ | RequestAbortedError
42
+ | RequestTimeoutError
43
+ | InvalidRequestError
44
+ | UnexpectedClientError
45
+ | SDKValidationError
46
+ >
47
+ > {
48
+ return new APIPromise($do(
49
+ client,
50
+ request,
51
+ options,
52
+ ));
53
+ }
54
+
55
+ async function $do(
56
+ client: UnifiedToCore,
57
+ request: operations.UpdateAccountingCategoryRequest,
58
+ options?: RequestOptions,
59
+ ): Promise<
60
+ [
61
+ Result<
62
+ shared.AccountingCategory,
63
+ | UnifiedToError
64
+ | ResponseValidationError
65
+ | ConnectionError
66
+ | RequestAbortedError
67
+ | RequestTimeoutError
68
+ | InvalidRequestError
69
+ | UnexpectedClientError
70
+ | SDKValidationError
71
+ >,
72
+ APICall,
73
+ ]
74
+ > {
75
+ const parsed = safeParse(
76
+ request,
77
+ (value) =>
78
+ operations.UpdateAccountingCategoryRequest$outboundSchema.parse(value),
79
+ "Input validation failed",
80
+ );
81
+ if (!parsed.ok) {
82
+ return [parsed, { status: "invalid" }];
83
+ }
84
+ const payload = parsed.value;
85
+ const body = encodeJSON("body", payload.AccountingCategory, {
86
+ explode: true,
87
+ });
88
+
89
+ const pathParams = {
90
+ connection_id: encodeSimple("connection_id", payload.connection_id, {
91
+ explode: false,
92
+ charEncoding: "percent",
93
+ }),
94
+ id: encodeSimple("id", payload.id, {
95
+ explode: false,
96
+ charEncoding: "percent",
97
+ }),
98
+ };
99
+
100
+ const path = pathToFunc("/accounting/{connection_id}/category/{id}")(
101
+ pathParams,
102
+ );
103
+
104
+ const query = encodeFormQuery({
105
+ "fields": payload.fields,
106
+ "raw": payload.raw,
107
+ });
108
+
109
+ const headers = new Headers(compactMap({
110
+ "Content-Type": "application/json",
111
+ Accept: "application/json",
112
+ }));
113
+
114
+ const securityInput = await extractSecurity(client._options.security);
115
+ const requestSecurity = resolveGlobalSecurity(securityInput);
116
+
117
+ const context = {
118
+ options: client._options,
119
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
120
+ operationID: "updateAccountingCategory",
121
+ oAuth2Scopes: [],
122
+
123
+ resolvedSecurity: requestSecurity,
124
+
125
+ securitySource: client._options.security,
126
+ retryConfig: options?.retries
127
+ || client._options.retryConfig
128
+ || { strategy: "none" },
129
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
130
+ };
131
+
132
+ const requestRes = client._createRequest(context, {
133
+ security: requestSecurity,
134
+ method: "PUT",
135
+ baseURL: options?.serverURL,
136
+ path: path,
137
+ headers: headers,
138
+ query: query,
139
+ body: body,
140
+ userAgent: client._options.userAgent,
141
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
142
+ }, options);
143
+ if (!requestRes.ok) {
144
+ return [requestRes, { status: "invalid" }];
145
+ }
146
+ const req = requestRes.value;
147
+
148
+ const doResult = await client._do(req, {
149
+ context,
150
+ errorCodes: ["4XX", "5XX"],
151
+ retryConfig: context.retryConfig,
152
+ retryCodes: context.retryCodes,
153
+ });
154
+ if (!doResult.ok) {
155
+ return [doResult, { status: "request-error", request: req }];
156
+ }
157
+ const response = doResult.value;
158
+
159
+ const [result] = await M.match<
160
+ shared.AccountingCategory,
161
+ | UnifiedToError
162
+ | ResponseValidationError
163
+ | ConnectionError
164
+ | RequestAbortedError
165
+ | RequestTimeoutError
166
+ | InvalidRequestError
167
+ | UnexpectedClientError
168
+ | SDKValidationError
169
+ >(
170
+ M.json(200, shared.AccountingCategory$inboundSchema),
171
+ M.fail("4XX"),
172
+ M.fail("5XX"),
173
+ )(response, req);
174
+ if (!result.ok) {
175
+ return [result, { status: "complete", request: req, response }];
176
+ }
177
+
178
+ return [result, { status: "complete", request: req, response }];
179
+ }
package/src/lib/config.ts CHANGED
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
73
73
  export const SDK_METADATA = {
74
74
  language: "typescript",
75
75
  openapiDocVersion: "1.0",
76
- sdkVersion: "2.73.10",
77
- genVersion: "2.657.1",
76
+ sdkVersion: "2.73.12",
77
+ genVersion: "2.672.0",
78
78
  userAgent:
79
- "speakeasy-sdk/typescript 2.73.10 2.657.1 1.0 @unified-api/typescript-sdk",
79
+ "speakeasy-sdk/typescript 2.73.12 2.672.0 1.0 @unified-api/typescript-sdk",
80
80
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "2.73.10",
22
+ currentVersion: "2.73.12",
23
23
  },
24
24
  });
25
25
 
@@ -15,6 +15,7 @@ import { MCPScope } from "./scopes.js";
15
15
  import { createRegisterTool } from "./tools.js";
16
16
  import { tool$accountingCreateAccountingAccount } from "./tools/accountingCreateAccountingAccount.js";
17
17
  import { tool$accountingCreateAccountingBill } from "./tools/accountingCreateAccountingBill.js";
18
+ import { tool$accountingCreateAccountingCategory } from "./tools/accountingCreateAccountingCategory.js";
18
19
  import { tool$accountingCreateAccountingContact } from "./tools/accountingCreateAccountingContact.js";
19
20
  import { tool$accountingCreateAccountingCreditmemo } from "./tools/accountingCreateAccountingCreditmemo.js";
20
21
  import { tool$accountingCreateAccountingInvoice } from "./tools/accountingCreateAccountingInvoice.js";
@@ -27,6 +28,7 @@ import { tool$accountingCreateAccountingTransaction } from "./tools/accountingCr
27
28
  import { tool$accountingGetAccountingAccount } from "./tools/accountingGetAccountingAccount.js";
28
29
  import { tool$accountingGetAccountingBalancesheet } from "./tools/accountingGetAccountingBalancesheet.js";
29
30
  import { tool$accountingGetAccountingBill } from "./tools/accountingGetAccountingBill.js";
31
+ import { tool$accountingGetAccountingCategory } from "./tools/accountingGetAccountingCategory.js";
30
32
  import { tool$accountingGetAccountingContact } from "./tools/accountingGetAccountingContact.js";
31
33
  import { tool$accountingGetAccountingCreditmemo } from "./tools/accountingGetAccountingCreditmemo.js";
32
34
  import { tool$accountingGetAccountingInvoice } from "./tools/accountingGetAccountingInvoice.js";
@@ -43,6 +45,7 @@ import { tool$accountingGetAccountingTrialbalance } from "./tools/accountingGetA
43
45
  import { tool$accountingListAccountingAccounts } from "./tools/accountingListAccountingAccounts.js";
44
46
  import { tool$accountingListAccountingBalancesheets } from "./tools/accountingListAccountingBalancesheets.js";
45
47
  import { tool$accountingListAccountingBills } from "./tools/accountingListAccountingBills.js";
48
+ import { tool$accountingListAccountingCategories } from "./tools/accountingListAccountingCategories.js";
46
49
  import { tool$accountingListAccountingContacts } from "./tools/accountingListAccountingContacts.js";
47
50
  import { tool$accountingListAccountingCreditmemoes } from "./tools/accountingListAccountingCreditmemoes.js";
48
51
  import { tool$accountingListAccountingInvoices } from "./tools/accountingListAccountingInvoices.js";
@@ -58,6 +61,7 @@ import { tool$accountingListAccountingTransactions } from "./tools/accountingLis
58
61
  import { tool$accountingListAccountingTrialbalances } from "./tools/accountingListAccountingTrialbalances.js";
59
62
  import { tool$accountingPatchAccountingAccount } from "./tools/accountingPatchAccountingAccount.js";
60
63
  import { tool$accountingPatchAccountingBill } from "./tools/accountingPatchAccountingBill.js";
64
+ import { tool$accountingPatchAccountingCategory } from "./tools/accountingPatchAccountingCategory.js";
61
65
  import { tool$accountingPatchAccountingContact } from "./tools/accountingPatchAccountingContact.js";
62
66
  import { tool$accountingPatchAccountingCreditmemo } from "./tools/accountingPatchAccountingCreditmemo.js";
63
67
  import { tool$accountingPatchAccountingInvoice } from "./tools/accountingPatchAccountingInvoice.js";
@@ -69,6 +73,7 @@ import { tool$accountingPatchAccountingTaxrate } from "./tools/accountingPatchAc
69
73
  import { tool$accountingPatchAccountingTransaction } from "./tools/accountingPatchAccountingTransaction.js";
70
74
  import { tool$accountingRemoveAccountingAccount } from "./tools/accountingRemoveAccountingAccount.js";
71
75
  import { tool$accountingRemoveAccountingBill } from "./tools/accountingRemoveAccountingBill.js";
76
+ import { tool$accountingRemoveAccountingCategory } from "./tools/accountingRemoveAccountingCategory.js";
72
77
  import { tool$accountingRemoveAccountingContact } from "./tools/accountingRemoveAccountingContact.js";
73
78
  import { tool$accountingRemoveAccountingCreditmemo } from "./tools/accountingRemoveAccountingCreditmemo.js";
74
79
  import { tool$accountingRemoveAccountingInvoice } from "./tools/accountingRemoveAccountingInvoice.js";
@@ -80,6 +85,7 @@ import { tool$accountingRemoveAccountingTaxrate } from "./tools/accountingRemove
80
85
  import { tool$accountingRemoveAccountingTransaction } from "./tools/accountingRemoveAccountingTransaction.js";
81
86
  import { tool$accountingUpdateAccountingAccount } from "./tools/accountingUpdateAccountingAccount.js";
82
87
  import { tool$accountingUpdateAccountingBill } from "./tools/accountingUpdateAccountingBill.js";
88
+ import { tool$accountingUpdateAccountingCategory } from "./tools/accountingUpdateAccountingCategory.js";
83
89
  import { tool$accountingUpdateAccountingContact } from "./tools/accountingUpdateAccountingContact.js";
84
90
  import { tool$accountingUpdateAccountingCreditmemo } from "./tools/accountingUpdateAccountingCreditmemo.js";
85
91
  import { tool$accountingUpdateAccountingInvoice } from "./tools/accountingUpdateAccountingInvoice.js";
@@ -502,7 +508,7 @@ export function createMCPServer(deps: {
502
508
  }) {
503
509
  const server = new McpServer({
504
510
  name: "UnifiedTo",
505
- version: "2.73.10",
511
+ version: "2.73.12",
506
512
  });
507
513
 
508
514
  const client = new UnifiedToCore({
@@ -534,6 +540,7 @@ export function createMCPServer(deps: {
534
540
 
535
541
  tool(tool$accountingCreateAccountingAccount);
536
542
  tool(tool$accountingCreateAccountingBill);
543
+ tool(tool$accountingCreateAccountingCategory);
537
544
  tool(tool$accountingCreateAccountingContact);
538
545
  tool(tool$accountingCreateAccountingCreditmemo);
539
546
  tool(tool$accountingCreateAccountingInvoice);
@@ -546,6 +553,7 @@ export function createMCPServer(deps: {
546
553
  tool(tool$accountingGetAccountingAccount);
547
554
  tool(tool$accountingGetAccountingBalancesheet);
548
555
  tool(tool$accountingGetAccountingBill);
556
+ tool(tool$accountingGetAccountingCategory);
549
557
  tool(tool$accountingGetAccountingContact);
550
558
  tool(tool$accountingGetAccountingCreditmemo);
551
559
  tool(tool$accountingGetAccountingInvoice);
@@ -562,6 +570,7 @@ export function createMCPServer(deps: {
562
570
  tool(tool$accountingListAccountingAccounts);
563
571
  tool(tool$accountingListAccountingBalancesheets);
564
572
  tool(tool$accountingListAccountingBills);
573
+ tool(tool$accountingListAccountingCategories);
565
574
  tool(tool$accountingListAccountingContacts);
566
575
  tool(tool$accountingListAccountingCreditmemoes);
567
576
  tool(tool$accountingListAccountingInvoices);
@@ -577,6 +586,7 @@ export function createMCPServer(deps: {
577
586
  tool(tool$accountingListAccountingTrialbalances);
578
587
  tool(tool$accountingPatchAccountingAccount);
579
588
  tool(tool$accountingPatchAccountingBill);
589
+ tool(tool$accountingPatchAccountingCategory);
580
590
  tool(tool$accountingPatchAccountingContact);
581
591
  tool(tool$accountingPatchAccountingCreditmemo);
582
592
  tool(tool$accountingPatchAccountingInvoice);
@@ -588,6 +598,7 @@ export function createMCPServer(deps: {
588
598
  tool(tool$accountingPatchAccountingTransaction);
589
599
  tool(tool$accountingRemoveAccountingAccount);
590
600
  tool(tool$accountingRemoveAccountingBill);
601
+ tool(tool$accountingRemoveAccountingCategory);
591
602
  tool(tool$accountingRemoveAccountingContact);
592
603
  tool(tool$accountingRemoveAccountingCreditmemo);
593
604
  tool(tool$accountingRemoveAccountingInvoice);
@@ -599,6 +610,7 @@ export function createMCPServer(deps: {
599
610
  tool(tool$accountingRemoveAccountingTransaction);
600
611
  tool(tool$accountingUpdateAccountingAccount);
601
612
  tool(tool$accountingUpdateAccountingBill);
613
+ tool(tool$accountingUpdateAccountingCategory);
602
614
  tool(tool$accountingUpdateAccountingContact);
603
615
  tool(tool$accountingUpdateAccountingCreditmemo);
604
616
  tool(tool$accountingUpdateAccountingInvoice);
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { accountingCreateAccountingCategory } from "../../funcs/accountingCreateAccountingCategory.js";
6
+ import * as operations from "../../sdk/models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.CreateAccountingCategoryRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$accountingCreateAccountingCategory: ToolDefinition<
14
+ typeof args
15
+ > = {
16
+ name: "accounting-create-accounting-category",
17
+ description: `Create a category`,
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await accountingCreateAccountingCategory(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ const value = result.value;
34
+
35
+ return formatResult(value, apiCall);
36
+ },
37
+ };
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { accountingGetAccountingCategory } from "../../funcs/accountingGetAccountingCategory.js";
6
+ import * as operations from "../../sdk/models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.GetAccountingCategoryRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$accountingGetAccountingCategory: ToolDefinition<typeof args> =
14
+ {
15
+ name: "accounting-get-accounting-category",
16
+ description: `Retrieve a category`,
17
+ args,
18
+ tool: async (client, args, ctx) => {
19
+ const [result, apiCall] = await accountingGetAccountingCategory(
20
+ client,
21
+ args.request,
22
+ { fetchOptions: { signal: ctx.signal } },
23
+ ).$inspect();
24
+
25
+ if (!result.ok) {
26
+ return {
27
+ content: [{ type: "text", text: result.error.message }],
28
+ isError: true,
29
+ };
30
+ }
31
+
32
+ const value = result.value;
33
+
34
+ return formatResult(value, apiCall);
35
+ },
36
+ };
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { accountingListAccountingCategories } from "../../funcs/accountingListAccountingCategories.js";
6
+ import * as operations from "../../sdk/models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.ListAccountingCategoriesRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$accountingListAccountingCategories: ToolDefinition<
14
+ typeof args
15
+ > = {
16
+ name: "accounting-list-accounting-categories",
17
+ description: `List all categories`,
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await accountingListAccountingCategories(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ const value = result.value;
34
+
35
+ return formatResult(value, apiCall);
36
+ },
37
+ };
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { accountingPatchAccountingCategory } from "../../funcs/accountingPatchAccountingCategory.js";
6
+ import * as operations from "../../sdk/models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.PatchAccountingCategoryRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$accountingPatchAccountingCategory: ToolDefinition<
14
+ typeof args
15
+ > = {
16
+ name: "accounting-patch-accounting-category",
17
+ description: `Update a category`,
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await accountingPatchAccountingCategory(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ const value = result.value;
34
+
35
+ return formatResult(value, apiCall);
36
+ },
37
+ };
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { accountingRemoveAccountingCategory } from "../../funcs/accountingRemoveAccountingCategory.js";
6
+ import * as operations from "../../sdk/models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.RemoveAccountingCategoryRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$accountingRemoveAccountingCategory: ToolDefinition<
14
+ typeof args
15
+ > = {
16
+ name: "accounting-remove-accounting-category",
17
+ description: `Remove a category`,
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await accountingRemoveAccountingCategory(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ return formatResult(void 0, apiCall);
34
+ },
35
+ };