@unified-api/typescript-sdk 2.73.9 → 2.73.11

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 (273) hide show
  1. package/README.md +15 -3
  2. package/bin/mcp-server.js +4587 -3584
  3. package/bin/mcp-server.js.map +33 -14
  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 +3 -1
  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 +7 -1
  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 +4 -1
  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 +22 -2
  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/funcs/unifiedCreateUnifiedConnection.d.ts +1 -1
  133. package/funcs/unifiedCreateUnifiedConnection.js +1 -1
  134. package/funcs/unifiedGetUnifiedIntegrationAuth.d.ts +1 -1
  135. package/funcs/unifiedGetUnifiedIntegrationAuth.js +1 -1
  136. package/jsr.json +1 -1
  137. package/lib/config.d.ts +3 -3
  138. package/lib/config.js +3 -3
  139. package/lib/config.js.map +1 -1
  140. package/mcp-server/mcp-server.js +1 -1
  141. package/mcp-server/mcp-server.js.map +1 -1
  142. package/mcp-server/server.d.ts.map +1 -1
  143. package/mcp-server/server.js +13 -1
  144. package/mcp-server/server.js.map +1 -1
  145. package/mcp-server/tools/accountingCreateAccountingCategory.d.ts +8 -0
  146. package/mcp-server/tools/accountingCreateAccountingCategory.d.ts.map +1 -0
  147. package/mcp-server/tools/accountingCreateAccountingCategory.js +52 -0
  148. package/mcp-server/tools/accountingCreateAccountingCategory.js.map +1 -0
  149. package/mcp-server/tools/accountingGetAccountingCategory.d.ts +8 -0
  150. package/mcp-server/tools/accountingGetAccountingCategory.d.ts.map +1 -0
  151. package/mcp-server/tools/accountingGetAccountingCategory.js +52 -0
  152. package/mcp-server/tools/accountingGetAccountingCategory.js.map +1 -0
  153. package/mcp-server/tools/accountingListAccountingCategories.d.ts +8 -0
  154. package/mcp-server/tools/accountingListAccountingCategories.d.ts.map +1 -0
  155. package/mcp-server/tools/accountingListAccountingCategories.js +52 -0
  156. package/mcp-server/tools/accountingListAccountingCategories.js.map +1 -0
  157. package/mcp-server/tools/accountingPatchAccountingCategory.d.ts +8 -0
  158. package/mcp-server/tools/accountingPatchAccountingCategory.d.ts.map +1 -0
  159. package/mcp-server/tools/accountingPatchAccountingCategory.js +52 -0
  160. package/mcp-server/tools/accountingPatchAccountingCategory.js.map +1 -0
  161. package/mcp-server/tools/accountingRemoveAccountingCategory.d.ts +8 -0
  162. package/mcp-server/tools/accountingRemoveAccountingCategory.d.ts.map +1 -0
  163. package/mcp-server/tools/accountingRemoveAccountingCategory.js +51 -0
  164. package/mcp-server/tools/accountingRemoveAccountingCategory.js.map +1 -0
  165. package/mcp-server/tools/accountingUpdateAccountingCategory.d.ts +8 -0
  166. package/mcp-server/tools/accountingUpdateAccountingCategory.d.ts.map +1 -0
  167. package/mcp-server/tools/accountingUpdateAccountingCategory.js +52 -0
  168. package/mcp-server/tools/accountingUpdateAccountingCategory.js.map +1 -0
  169. package/mcp-server/tools/unifiedCreateUnifiedConnection.js +1 -1
  170. package/mcp-server/tools/unifiedCreateUnifiedConnection.js.map +1 -1
  171. package/mcp-server/tools/unifiedGetUnifiedIntegrationAuth.js +1 -1
  172. package/package.json +4 -6
  173. package/sdk/accounting.d.ts +24 -0
  174. package/sdk/accounting.d.ts.map +1 -1
  175. package/sdk/accounting.js +42 -0
  176. package/sdk/accounting.js.map +1 -1
  177. package/sdk/auth.d.ts +1 -1
  178. package/sdk/auth.js +1 -1
  179. package/sdk/category.d.ts +30 -0
  180. package/sdk/category.d.ts.map +1 -0
  181. package/sdk/category.js +54 -0
  182. package/sdk/category.js.map +1 -0
  183. package/sdk/connection.d.ts +1 -1
  184. package/sdk/connection.js +1 -1
  185. package/sdk/integration.d.ts +1 -1
  186. package/sdk/integration.js +1 -1
  187. package/sdk/models/operations/createaccountingcategory.d.ts +45 -0
  188. package/sdk/models/operations/createaccountingcategory.d.ts.map +1 -0
  189. package/sdk/models/operations/createaccountingcategory.js +77 -0
  190. package/sdk/models/operations/createaccountingcategory.js.map +1 -0
  191. package/sdk/models/operations/getaccountingcategory.d.ts +47 -0
  192. package/sdk/models/operations/getaccountingcategory.d.ts.map +1 -0
  193. package/sdk/models/operations/getaccountingcategory.js +74 -0
  194. package/sdk/models/operations/getaccountingcategory.js.map +1 -0
  195. package/sdk/models/operations/index.d.ts +6 -0
  196. package/sdk/models/operations/index.d.ts.map +1 -1
  197. package/sdk/models/operations/index.js +6 -0
  198. package/sdk/models/operations/index.js.map +1 -1
  199. package/sdk/models/operations/listaccountingcategories.d.ts +65 -0
  200. package/sdk/models/operations/listaccountingcategories.d.ts.map +1 -0
  201. package/sdk/models/operations/listaccountingcategories.js +90 -0
  202. package/sdk/models/operations/listaccountingcategories.js.map +1 -0
  203. package/sdk/models/operations/patchaccountingcategory.d.ts +50 -0
  204. package/sdk/models/operations/patchaccountingcategory.d.ts.map +1 -0
  205. package/sdk/models/operations/patchaccountingcategory.js +79 -0
  206. package/sdk/models/operations/patchaccountingcategory.js.map +1 -0
  207. package/sdk/models/operations/removeaccountingcategory.d.ts +66 -0
  208. package/sdk/models/operations/removeaccountingcategory.d.ts.map +1 -0
  209. package/sdk/models/operations/removeaccountingcategory.js +105 -0
  210. package/sdk/models/operations/removeaccountingcategory.js.map +1 -0
  211. package/sdk/models/operations/updateaccountingcategory.d.ts +50 -0
  212. package/sdk/models/operations/updateaccountingcategory.d.ts.map +1 -0
  213. package/sdk/models/operations/updateaccountingcategory.js +79 -0
  214. package/sdk/models/operations/updateaccountingcategory.js.map +1 -0
  215. package/sdk/models/shared/accountingcategory.d.ts +47 -0
  216. package/sdk/models/shared/accountingcategory.d.ts.map +1 -0
  217. package/sdk/models/shared/accountingcategory.js +90 -0
  218. package/sdk/models/shared/accountingcategory.js.map +1 -0
  219. package/sdk/models/shared/accountinglineitem.d.ts +2 -0
  220. package/sdk/models/shared/accountinglineitem.d.ts.map +1 -1
  221. package/sdk/models/shared/accountinglineitem.js +4 -0
  222. package/sdk/models/shared/accountinglineitem.js.map +1 -1
  223. package/sdk/models/shared/calendareventrecurrence.d.ts +38 -0
  224. package/sdk/models/shared/calendareventrecurrence.d.ts.map +1 -1
  225. package/sdk/models/shared/calendareventrecurrence.js +46 -1
  226. package/sdk/models/shared/calendareventrecurrence.js.map +1 -1
  227. package/sdk/models/shared/index.d.ts +1 -0
  228. package/sdk/models/shared/index.d.ts.map +1 -1
  229. package/sdk/models/shared/index.js +1 -0
  230. package/sdk/models/shared/index.js.map +1 -1
  231. package/sdk/sdk.d.ts +3 -0
  232. package/sdk/sdk.d.ts.map +1 -1
  233. package/sdk/sdk.js +4 -0
  234. package/sdk/sdk.js.map +1 -1
  235. package/sdk/unified.d.ts +2 -2
  236. package/sdk/unified.js +2 -2
  237. package/src/funcs/accountingCreateAccountingCategory.ts +173 -0
  238. package/src/funcs/accountingGetAccountingCategory.ts +176 -0
  239. package/src/funcs/accountingListAccountingCategories.ts +178 -0
  240. package/src/funcs/accountingPatchAccountingCategory.ts +179 -0
  241. package/src/funcs/accountingRemoveAccountingCategory.ts +181 -0
  242. package/src/funcs/accountingUpdateAccountingCategory.ts +179 -0
  243. package/src/funcs/unifiedCreateUnifiedConnection.ts +1 -1
  244. package/src/funcs/unifiedGetUnifiedIntegrationAuth.ts +1 -1
  245. package/src/lib/config.ts +3 -3
  246. package/src/mcp-server/mcp-server.ts +1 -1
  247. package/src/mcp-server/server.ts +13 -1
  248. package/src/mcp-server/tools/accountingCreateAccountingCategory.ts +37 -0
  249. package/src/mcp-server/tools/accountingGetAccountingCategory.ts +36 -0
  250. package/src/mcp-server/tools/accountingListAccountingCategories.ts +37 -0
  251. package/src/mcp-server/tools/accountingPatchAccountingCategory.ts +37 -0
  252. package/src/mcp-server/tools/accountingRemoveAccountingCategory.ts +35 -0
  253. package/src/mcp-server/tools/accountingUpdateAccountingCategory.ts +37 -0
  254. package/src/mcp-server/tools/unifiedCreateUnifiedConnection.ts +1 -1
  255. package/src/mcp-server/tools/unifiedGetUnifiedIntegrationAuth.ts +1 -1
  256. package/src/sdk/accounting.ts +90 -0
  257. package/src/sdk/auth.ts +1 -1
  258. package/src/sdk/category.ts +100 -0
  259. package/src/sdk/connection.ts +1 -1
  260. package/src/sdk/integration.ts +1 -1
  261. package/src/sdk/models/operations/createaccountingcategory.ts +101 -0
  262. package/src/sdk/models/operations/getaccountingcategory.ts +101 -0
  263. package/src/sdk/models/operations/index.ts +6 -0
  264. package/src/sdk/models/operations/listaccountingcategories.ts +135 -0
  265. package/src/sdk/models/operations/patchaccountingcategory.ts +108 -0
  266. package/src/sdk/models/operations/removeaccountingcategory.ts +155 -0
  267. package/src/sdk/models/operations/updateaccountingcategory.ts +108 -0
  268. package/src/sdk/models/shared/accountingcategory.ts +111 -0
  269. package/src/sdk/models/shared/accountinglineitem.ts +6 -0
  270. package/src/sdk/models/shared/calendareventrecurrence.ts +71 -0
  271. package/src/sdk/models/shared/index.ts +1 -0
  272. package/src/sdk/sdk.ts +6 -0
  273. package/src/sdk/unified.ts +2 -2
@@ -0,0 +1,108 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import * as shared from "../shared/index.js";
11
+
12
+ export type UpdateAccountingCategoryRequest = {
13
+ accountingCategory: shared.AccountingCategory;
14
+ /**
15
+ * ID of the connection
16
+ */
17
+ connectionId: string;
18
+ /**
19
+ * Comma-delimited fields to return
20
+ */
21
+ fields?: Array<string> | undefined;
22
+ /**
23
+ * ID of the Category
24
+ */
25
+ id: string;
26
+ /**
27
+ * 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
28
+ */
29
+ raw?: string | undefined;
30
+ };
31
+
32
+ /** @internal */
33
+ export const UpdateAccountingCategoryRequest$inboundSchema: z.ZodType<
34
+ UpdateAccountingCategoryRequest,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = z.object({
38
+ AccountingCategory: shared.AccountingCategory$inboundSchema,
39
+ connection_id: z.string(),
40
+ fields: z.array(z.string()).optional(),
41
+ id: z.string(),
42
+ raw: z.string().optional(),
43
+ }).transform((v) => {
44
+ return remap$(v, {
45
+ "AccountingCategory": "accountingCategory",
46
+ "connection_id": "connectionId",
47
+ });
48
+ });
49
+
50
+ /** @internal */
51
+ export type UpdateAccountingCategoryRequest$Outbound = {
52
+ AccountingCategory: shared.AccountingCategory$Outbound;
53
+ connection_id: string;
54
+ fields?: Array<string> | undefined;
55
+ id: string;
56
+ raw?: string | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const UpdateAccountingCategoryRequest$outboundSchema: z.ZodType<
61
+ UpdateAccountingCategoryRequest$Outbound,
62
+ z.ZodTypeDef,
63
+ UpdateAccountingCategoryRequest
64
+ > = z.object({
65
+ accountingCategory: shared.AccountingCategory$outboundSchema,
66
+ connectionId: z.string(),
67
+ fields: z.array(z.string()).optional(),
68
+ id: z.string(),
69
+ raw: z.string().optional(),
70
+ }).transform((v) => {
71
+ return remap$(v, {
72
+ accountingCategory: "AccountingCategory",
73
+ connectionId: "connection_id",
74
+ });
75
+ });
76
+
77
+ /**
78
+ * @internal
79
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
80
+ */
81
+ export namespace UpdateAccountingCategoryRequest$ {
82
+ /** @deprecated use `UpdateAccountingCategoryRequest$inboundSchema` instead. */
83
+ export const inboundSchema = UpdateAccountingCategoryRequest$inboundSchema;
84
+ /** @deprecated use `UpdateAccountingCategoryRequest$outboundSchema` instead. */
85
+ export const outboundSchema = UpdateAccountingCategoryRequest$outboundSchema;
86
+ /** @deprecated use `UpdateAccountingCategoryRequest$Outbound` instead. */
87
+ export type Outbound = UpdateAccountingCategoryRequest$Outbound;
88
+ }
89
+
90
+ export function updateAccountingCategoryRequestToJSON(
91
+ updateAccountingCategoryRequest: UpdateAccountingCategoryRequest,
92
+ ): string {
93
+ return JSON.stringify(
94
+ UpdateAccountingCategoryRequest$outboundSchema.parse(
95
+ updateAccountingCategoryRequest,
96
+ ),
97
+ );
98
+ }
99
+
100
+ export function updateAccountingCategoryRequestFromJSON(
101
+ jsonString: string,
102
+ ): SafeParseResult<UpdateAccountingCategoryRequest, SDKValidationError> {
103
+ return safeParse(
104
+ jsonString,
105
+ (x) => UpdateAccountingCategoryRequest$inboundSchema.parse(JSON.parse(x)),
106
+ `Failed to parse 'UpdateAccountingCategoryRequest' from JSON`,
107
+ );
108
+ }
@@ -0,0 +1,111 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type AccountingCategory = {
12
+ createdAt?: Date | undefined;
13
+ description?: string | undefined;
14
+ id?: string | undefined;
15
+ isActive?: boolean | undefined;
16
+ name?: string | undefined;
17
+ parentId?: string | undefined;
18
+ raw?: { [k: string]: any } | undefined;
19
+ updatedAt?: Date | undefined;
20
+ };
21
+
22
+ /** @internal */
23
+ export const AccountingCategory$inboundSchema: z.ZodType<
24
+ AccountingCategory,
25
+ z.ZodTypeDef,
26
+ unknown
27
+ > = z.object({
28
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
29
+ .optional(),
30
+ description: z.string().optional(),
31
+ id: z.string().optional(),
32
+ is_active: z.boolean().optional(),
33
+ name: z.string().optional(),
34
+ parent_id: z.string().optional(),
35
+ raw: z.record(z.any()).optional(),
36
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
37
+ .optional(),
38
+ }).transform((v) => {
39
+ return remap$(v, {
40
+ "created_at": "createdAt",
41
+ "is_active": "isActive",
42
+ "parent_id": "parentId",
43
+ "updated_at": "updatedAt",
44
+ });
45
+ });
46
+
47
+ /** @internal */
48
+ export type AccountingCategory$Outbound = {
49
+ created_at?: string | undefined;
50
+ description?: string | undefined;
51
+ id?: string | undefined;
52
+ is_active?: boolean | undefined;
53
+ name?: string | undefined;
54
+ parent_id?: string | undefined;
55
+ raw?: { [k: string]: any } | undefined;
56
+ updated_at?: string | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const AccountingCategory$outboundSchema: z.ZodType<
61
+ AccountingCategory$Outbound,
62
+ z.ZodTypeDef,
63
+ AccountingCategory
64
+ > = z.object({
65
+ createdAt: z.date().transform(v => v.toISOString()).optional(),
66
+ description: z.string().optional(),
67
+ id: z.string().optional(),
68
+ isActive: z.boolean().optional(),
69
+ name: z.string().optional(),
70
+ parentId: z.string().optional(),
71
+ raw: z.record(z.any()).optional(),
72
+ updatedAt: z.date().transform(v => v.toISOString()).optional(),
73
+ }).transform((v) => {
74
+ return remap$(v, {
75
+ createdAt: "created_at",
76
+ isActive: "is_active",
77
+ parentId: "parent_id",
78
+ updatedAt: "updated_at",
79
+ });
80
+ });
81
+
82
+ /**
83
+ * @internal
84
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
85
+ */
86
+ export namespace AccountingCategory$ {
87
+ /** @deprecated use `AccountingCategory$inboundSchema` instead. */
88
+ export const inboundSchema = AccountingCategory$inboundSchema;
89
+ /** @deprecated use `AccountingCategory$outboundSchema` instead. */
90
+ export const outboundSchema = AccountingCategory$outboundSchema;
91
+ /** @deprecated use `AccountingCategory$Outbound` instead. */
92
+ export type Outbound = AccountingCategory$Outbound;
93
+ }
94
+
95
+ export function accountingCategoryToJSON(
96
+ accountingCategory: AccountingCategory,
97
+ ): string {
98
+ return JSON.stringify(
99
+ AccountingCategory$outboundSchema.parse(accountingCategory),
100
+ );
101
+ }
102
+
103
+ export function accountingCategoryFromJSON(
104
+ jsonString: string,
105
+ ): SafeParseResult<AccountingCategory, SDKValidationError> {
106
+ return safeParse(
107
+ jsonString,
108
+ (x) => AccountingCategory$inboundSchema.parse(JSON.parse(x)),
109
+ `Failed to parse 'AccountingCategory' from JSON`,
110
+ );
111
+ }
@@ -10,6 +10,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type AccountingLineitem = {
12
12
  accountId?: string | undefined;
13
+ categoryIds?: Array<string> | undefined;
13
14
  createdAt?: Date | undefined;
14
15
  discountAmount?: number | undefined;
15
16
  id?: string | undefined;
@@ -35,6 +36,7 @@ export const AccountingLineitem$inboundSchema: z.ZodType<
35
36
  unknown
36
37
  > = z.object({
37
38
  account_id: z.string().optional(),
39
+ category_ids: z.array(z.string()).optional(),
38
40
  created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
39
41
  .optional(),
40
42
  discount_amount: z.number().optional(),
@@ -57,6 +59,7 @@ export const AccountingLineitem$inboundSchema: z.ZodType<
57
59
  }).transform((v) => {
58
60
  return remap$(v, {
59
61
  "account_id": "accountId",
62
+ "category_ids": "categoryIds",
60
63
  "created_at": "createdAt",
61
64
  "discount_amount": "discountAmount",
62
65
  "item_description": "itemDescription",
@@ -77,6 +80,7 @@ export const AccountingLineitem$inboundSchema: z.ZodType<
77
80
  /** @internal */
78
81
  export type AccountingLineitem$Outbound = {
79
82
  account_id?: string | undefined;
83
+ category_ids?: Array<string> | undefined;
80
84
  created_at?: string | undefined;
81
85
  discount_amount?: number | undefined;
82
86
  id?: string | undefined;
@@ -102,6 +106,7 @@ export const AccountingLineitem$outboundSchema: z.ZodType<
102
106
  AccountingLineitem
103
107
  > = z.object({
104
108
  accountId: z.string().optional(),
109
+ categoryIds: z.array(z.string()).optional(),
105
110
  createdAt: z.date().transform(v => v.toISOString()).optional(),
106
111
  discountAmount: z.number().optional(),
107
112
  id: z.string().optional(),
@@ -121,6 +126,7 @@ export const AccountingLineitem$outboundSchema: z.ZodType<
121
126
  }).transform((v) => {
122
127
  return remap$(v, {
123
128
  accountId: "account_id",
129
+ categoryIds: "category_ids",
124
130
  createdAt: "created_at",
125
131
  discountAmount: "discount_amount",
126
132
  itemDescription: "item_description",
@@ -28,6 +28,17 @@ export type CalendarEventRecurrenceFrequency = OpenEnum<
28
28
  typeof CalendarEventRecurrenceFrequency
29
29
  >;
30
30
 
31
+ export const WeekStart = {
32
+ Su: "SU",
33
+ Mo: "MO",
34
+ Tu: "TU",
35
+ We: "WE",
36
+ Th: "TH",
37
+ Fr: "FR",
38
+ Sa: "SA",
39
+ } as const;
40
+ export type WeekStart = OpenEnum<typeof WeekStart>;
41
+
31
42
  export type CalendarEventRecurrence = {
32
43
  count?: number | undefined;
33
44
  endAt?: Date | undefined;
@@ -49,6 +60,16 @@ export type CalendarEventRecurrence = {
49
60
  * months of the year to repeat on, defaults to undefined (every month), only used if frequency is YEARLY, January is 1
50
61
  */
51
62
  onMonths?: Array<number> | undefined;
63
+ /**
64
+ * week ordinals for BYDAY (e.g., -1 for last, -2 for second-to-last, 1 for first, 2 for second), only used with on_days. 0 is used for days without week ordinals.
65
+ */
66
+ onWeeks?: Array<number> | undefined;
67
+ /**
68
+ * days of the year to repeat on, defaults to undefined (every day), only used if frequency is YEARLY
69
+ */
70
+ onYearDays?: Array<number> | undefined;
71
+ timezone?: string | undefined;
72
+ weekStart?: WeekStart | undefined;
52
73
  };
53
74
 
54
75
  /** @internal */
@@ -83,6 +104,38 @@ export namespace CalendarEventRecurrenceFrequency$ {
83
104
  export const outboundSchema = CalendarEventRecurrenceFrequency$outboundSchema;
84
105
  }
85
106
 
107
+ /** @internal */
108
+ export const WeekStart$inboundSchema: z.ZodType<
109
+ WeekStart,
110
+ z.ZodTypeDef,
111
+ unknown
112
+ > = z
113
+ .union([
114
+ z.nativeEnum(WeekStart),
115
+ z.string().transform(catchUnrecognizedEnum),
116
+ ]);
117
+
118
+ /** @internal */
119
+ export const WeekStart$outboundSchema: z.ZodType<
120
+ WeekStart,
121
+ z.ZodTypeDef,
122
+ WeekStart
123
+ > = z.union([
124
+ z.nativeEnum(WeekStart),
125
+ z.string().and(z.custom<Unrecognized<string>>()),
126
+ ]);
127
+
128
+ /**
129
+ * @internal
130
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
131
+ */
132
+ export namespace WeekStart$ {
133
+ /** @deprecated use `WeekStart$inboundSchema` instead. */
134
+ export const inboundSchema = WeekStart$inboundSchema;
135
+ /** @deprecated use `WeekStart$outboundSchema` instead. */
136
+ export const outboundSchema = WeekStart$outboundSchema;
137
+ }
138
+
86
139
  /** @internal */
87
140
  export const CalendarEventRecurrence$inboundSchema: z.ZodType<
88
141
  CalendarEventRecurrence,
@@ -99,6 +152,10 @@ export const CalendarEventRecurrence$inboundSchema: z.ZodType<
99
152
  .optional(),
100
153
  on_month_days: z.array(z.number()).optional(),
101
154
  on_months: z.array(z.number()).optional(),
155
+ on_weeks: z.array(z.number()).optional(),
156
+ on_year_days: z.array(z.number()).optional(),
157
+ timezone: z.string().optional(),
158
+ week_start: WeekStart$inboundSchema.optional(),
102
159
  }).transform((v) => {
103
160
  return remap$(v, {
104
161
  "end_at": "endAt",
@@ -106,6 +163,9 @@ export const CalendarEventRecurrence$inboundSchema: z.ZodType<
106
163
  "on_days": "onDays",
107
164
  "on_month_days": "onMonthDays",
108
165
  "on_months": "onMonths",
166
+ "on_weeks": "onWeeks",
167
+ "on_year_days": "onYearDays",
168
+ "week_start": "weekStart",
109
169
  });
110
170
  });
111
171
 
@@ -119,6 +179,10 @@ export type CalendarEventRecurrence$Outbound = {
119
179
  on_days?: Array<string> | undefined;
120
180
  on_month_days?: Array<number> | undefined;
121
181
  on_months?: Array<number> | undefined;
182
+ on_weeks?: Array<number> | undefined;
183
+ on_year_days?: Array<number> | undefined;
184
+ timezone?: string | undefined;
185
+ week_start?: string | undefined;
122
186
  };
123
187
 
124
188
  /** @internal */
@@ -136,6 +200,10 @@ export const CalendarEventRecurrence$outboundSchema: z.ZodType<
136
200
  .optional(),
137
201
  onMonthDays: z.array(z.number()).optional(),
138
202
  onMonths: z.array(z.number()).optional(),
203
+ onWeeks: z.array(z.number()).optional(),
204
+ onYearDays: z.array(z.number()).optional(),
205
+ timezone: z.string().optional(),
206
+ weekStart: WeekStart$outboundSchema.optional(),
139
207
  }).transform((v) => {
140
208
  return remap$(v, {
141
209
  endAt: "end_at",
@@ -143,6 +211,9 @@ export const CalendarEventRecurrence$outboundSchema: z.ZodType<
143
211
  onDays: "on_days",
144
212
  onMonthDays: "on_month_days",
145
213
  onMonths: "on_months",
214
+ onWeeks: "on_weeks",
215
+ onYearDays: "on_year_days",
216
+ weekStart: "week_start",
146
217
  });
147
218
  });
148
219
 
@@ -8,6 +8,7 @@ export * from "./accountingattachment.js";
8
8
  export * from "./accountingbalancesheet.js";
9
9
  export * from "./accountingbalancesheetitem.js";
10
10
  export * from "./accountingbill.js";
11
+ export * from "./accountingcategory.js";
11
12
  export * from "./accountingcontact.js";
12
13
  export * from "./accountingcontactpaymentmethod.js";
13
14
  export * from "./accountingcreditmemo.js";
package/src/sdk/sdk.ts CHANGED
@@ -18,6 +18,7 @@ import { Busy } from "./busy.js";
18
18
  import { Calendar } from "./calendar.js";
19
19
  import { Call } from "./call.js";
20
20
  import { Candidate } from "./candidate.js";
21
+ import { Category } from "./category.js";
21
22
  import { Channel } from "./channel.js";
22
23
  import { Class } from "./class.js";
23
24
  import { Collection } from "./collection.js";
@@ -125,6 +126,11 @@ export class UnifiedTo extends ClientSDK {
125
126
  return (this._bill ??= new Bill(this._options));
126
127
  }
127
128
 
129
+ private _category?: Category;
130
+ get category(): Category {
131
+ return (this._category ??= new Category(this._options));
132
+ }
133
+
128
134
  private _contact?: Contact;
129
135
  get contact(): Contact {
130
136
  return (this._contact ??= new Contact(this._options));
@@ -32,7 +32,7 @@ export class Unified extends ClientSDK {
32
32
  * Create connection
33
33
  *
34
34
  * @remarks
35
- * Used only to import existing customer credentials; use "Create connection indirectly" instead
35
+ * Used only to import existing customer credentials; use "Authorize new connection" instead
36
36
  */
37
37
  async createUnifiedConnection(
38
38
  request: shared.Connection,
@@ -91,7 +91,7 @@ export class Unified extends ClientSDK {
91
91
  }
92
92
 
93
93
  /**
94
- * Create connection indirectly
94
+ * Authorize new connection
95
95
  *
96
96
  * @remarks
97
97
  * Returns an authorization URL for the specified integration. Once a successful authorization occurs, a new connection is created.