@unified-api/typescript-sdk 2.9.14 → 2.9.16

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 (288) hide show
  1. package/README.md +24 -0
  2. package/docs/sdks/comment/README.md +501 -0
  3. package/docs/sdks/payment/README.md +494 -0
  4. package/docs/sdks/subscription/README.md +501 -0
  5. package/docs/sdks/task/README.md +494 -0
  6. package/funcs/commentCreateTaskComment.d.ts +13 -0
  7. package/funcs/commentCreateTaskComment.d.ts.map +1 -0
  8. package/funcs/commentCreateTaskComment.js +103 -0
  9. package/funcs/commentCreateTaskComment.js.map +1 -0
  10. package/funcs/commentGetTaskComment.d.ts +13 -0
  11. package/funcs/commentGetTaskComment.d.ts.map +1 -0
  12. package/funcs/commentGetTaskComment.js +106 -0
  13. package/funcs/commentGetTaskComment.js.map +1 -0
  14. package/funcs/commentListTaskComments.d.ts +13 -0
  15. package/funcs/commentListTaskComments.d.ts.map +1 -0
  16. package/funcs/commentListTaskComments.js +110 -0
  17. package/funcs/commentListTaskComments.js.map +1 -0
  18. package/funcs/commentPatchTaskComment.d.ts +13 -0
  19. package/funcs/commentPatchTaskComment.d.ts.map +1 -0
  20. package/funcs/commentPatchTaskComment.js +107 -0
  21. package/funcs/commentPatchTaskComment.js.map +1 -0
  22. package/funcs/commentRemoveTaskComment.d.ts +12 -0
  23. package/funcs/commentRemoveTaskComment.d.ts.map +1 -0
  24. package/funcs/commentRemoveTaskComment.js +104 -0
  25. package/funcs/commentRemoveTaskComment.js.map +1 -0
  26. package/funcs/commentUpdateTaskComment.d.ts +13 -0
  27. package/funcs/commentUpdateTaskComment.d.ts.map +1 -0
  28. package/funcs/commentUpdateTaskComment.js +107 -0
  29. package/funcs/commentUpdateTaskComment.js.map +1 -0
  30. package/funcs/paymentCreatePaymentSubscription.d.ts +13 -0
  31. package/funcs/paymentCreatePaymentSubscription.d.ts.map +1 -0
  32. package/funcs/paymentCreatePaymentSubscription.js +105 -0
  33. package/funcs/paymentCreatePaymentSubscription.js.map +1 -0
  34. package/funcs/paymentGetPaymentSubscription.d.ts +13 -0
  35. package/funcs/paymentGetPaymentSubscription.d.ts.map +1 -0
  36. package/funcs/paymentGetPaymentSubscription.js +106 -0
  37. package/funcs/paymentGetPaymentSubscription.js.map +1 -0
  38. package/funcs/paymentListPaymentSubscriptions.d.ts +13 -0
  39. package/funcs/paymentListPaymentSubscriptions.d.ts.map +1 -0
  40. package/funcs/paymentListPaymentSubscriptions.js +110 -0
  41. package/funcs/paymentListPaymentSubscriptions.js.map +1 -0
  42. package/funcs/paymentPatchPaymentSubscription.d.ts +13 -0
  43. package/funcs/paymentPatchPaymentSubscription.d.ts.map +1 -0
  44. package/funcs/paymentPatchPaymentSubscription.js +109 -0
  45. package/funcs/paymentPatchPaymentSubscription.js.map +1 -0
  46. package/funcs/paymentRemovePaymentSubscription.d.ts +12 -0
  47. package/funcs/paymentRemovePaymentSubscription.d.ts.map +1 -0
  48. package/funcs/paymentRemovePaymentSubscription.js +104 -0
  49. package/funcs/paymentRemovePaymentSubscription.js.map +1 -0
  50. package/funcs/paymentUpdatePaymentSubscription.d.ts +13 -0
  51. package/funcs/paymentUpdatePaymentSubscription.d.ts.map +1 -0
  52. package/funcs/paymentUpdatePaymentSubscription.js +109 -0
  53. package/funcs/paymentUpdatePaymentSubscription.js.map +1 -0
  54. package/funcs/subscriptionCreatePaymentSubscription.d.ts +13 -0
  55. package/funcs/subscriptionCreatePaymentSubscription.d.ts.map +1 -0
  56. package/funcs/subscriptionCreatePaymentSubscription.js +105 -0
  57. package/funcs/subscriptionCreatePaymentSubscription.js.map +1 -0
  58. package/funcs/subscriptionGetPaymentSubscription.d.ts +13 -0
  59. package/funcs/subscriptionGetPaymentSubscription.d.ts.map +1 -0
  60. package/funcs/subscriptionGetPaymentSubscription.js +106 -0
  61. package/funcs/subscriptionGetPaymentSubscription.js.map +1 -0
  62. package/funcs/subscriptionListPaymentSubscriptions.d.ts +13 -0
  63. package/funcs/subscriptionListPaymentSubscriptions.d.ts.map +1 -0
  64. package/funcs/subscriptionListPaymentSubscriptions.js +110 -0
  65. package/funcs/subscriptionListPaymentSubscriptions.js.map +1 -0
  66. package/funcs/subscriptionPatchPaymentSubscription.d.ts +13 -0
  67. package/funcs/subscriptionPatchPaymentSubscription.d.ts.map +1 -0
  68. package/funcs/subscriptionPatchPaymentSubscription.js +109 -0
  69. package/funcs/subscriptionPatchPaymentSubscription.js.map +1 -0
  70. package/funcs/subscriptionRemovePaymentSubscription.d.ts +12 -0
  71. package/funcs/subscriptionRemovePaymentSubscription.d.ts.map +1 -0
  72. package/funcs/subscriptionRemovePaymentSubscription.js +104 -0
  73. package/funcs/subscriptionRemovePaymentSubscription.js.map +1 -0
  74. package/funcs/subscriptionUpdatePaymentSubscription.d.ts +13 -0
  75. package/funcs/subscriptionUpdatePaymentSubscription.d.ts.map +1 -0
  76. package/funcs/subscriptionUpdatePaymentSubscription.js +109 -0
  77. package/funcs/subscriptionUpdatePaymentSubscription.js.map +1 -0
  78. package/funcs/taskCreateTaskComment.d.ts +13 -0
  79. package/funcs/taskCreateTaskComment.d.ts.map +1 -0
  80. package/funcs/taskCreateTaskComment.js +103 -0
  81. package/funcs/taskCreateTaskComment.js.map +1 -0
  82. package/funcs/taskGetTaskComment.d.ts +13 -0
  83. package/funcs/taskGetTaskComment.d.ts.map +1 -0
  84. package/funcs/taskGetTaskComment.js +106 -0
  85. package/funcs/taskGetTaskComment.js.map +1 -0
  86. package/funcs/taskListTaskComments.d.ts +13 -0
  87. package/funcs/taskListTaskComments.d.ts.map +1 -0
  88. package/funcs/taskListTaskComments.js +110 -0
  89. package/funcs/taskListTaskComments.js.map +1 -0
  90. package/funcs/taskPatchTaskComment.d.ts +13 -0
  91. package/funcs/taskPatchTaskComment.d.ts.map +1 -0
  92. package/funcs/taskPatchTaskComment.js +107 -0
  93. package/funcs/taskPatchTaskComment.js.map +1 -0
  94. package/funcs/taskRemoveTaskComment.d.ts +12 -0
  95. package/funcs/taskRemoveTaskComment.d.ts.map +1 -0
  96. package/funcs/taskRemoveTaskComment.js +104 -0
  97. package/funcs/taskRemoveTaskComment.js.map +1 -0
  98. package/funcs/taskUpdateTaskComment.d.ts +13 -0
  99. package/funcs/taskUpdateTaskComment.d.ts.map +1 -0
  100. package/funcs/taskUpdateTaskComment.js +107 -0
  101. package/funcs/taskUpdateTaskComment.js.map +1 -0
  102. package/lib/config.d.ts +2 -2
  103. package/lib/config.js +2 -2
  104. package/package.json +1 -1
  105. package/sdk/comment.d.ts +30 -0
  106. package/sdk/comment.d.ts.map +1 -0
  107. package/sdk/comment.js +54 -0
  108. package/sdk/comment.js.map +1 -0
  109. package/sdk/models/operations/createpaymentsubscription.d.ts +40 -0
  110. package/sdk/models/operations/createpaymentsubscription.d.ts.map +1 -0
  111. package/sdk/models/operations/createpaymentsubscription.js +75 -0
  112. package/sdk/models/operations/createpaymentsubscription.js.map +1 -0
  113. package/sdk/models/operations/createtaskcomment.d.ts +40 -0
  114. package/sdk/models/operations/createtaskcomment.d.ts.map +1 -0
  115. package/sdk/models/operations/createtaskcomment.js +75 -0
  116. package/sdk/models/operations/createtaskcomment.js.map +1 -0
  117. package/sdk/models/operations/getpaymentsubscription.d.ts +42 -0
  118. package/sdk/models/operations/getpaymentsubscription.d.ts.map +1 -0
  119. package/sdk/models/operations/getpaymentsubscription.js +72 -0
  120. package/sdk/models/operations/getpaymentsubscription.js.map +1 -0
  121. package/sdk/models/operations/gettaskcomment.d.ts +42 -0
  122. package/sdk/models/operations/gettaskcomment.d.ts.map +1 -0
  123. package/sdk/models/operations/gettaskcomment.js +72 -0
  124. package/sdk/models/operations/gettaskcomment.js.map +1 -0
  125. package/sdk/models/operations/getunifiedintegrationauth.d.ts +12 -0
  126. package/sdk/models/operations/getunifiedintegrationauth.d.ts.map +1 -1
  127. package/sdk/models/operations/getunifiedintegrationauth.js +4 -0
  128. package/sdk/models/operations/getunifiedintegrationauth.js.map +1 -1
  129. package/sdk/models/operations/index.d.ts +12 -0
  130. package/sdk/models/operations/index.d.ts.map +1 -1
  131. package/sdk/models/operations/index.js +12 -0
  132. package/sdk/models/operations/index.js.map +1 -1
  133. package/sdk/models/operations/listpaymentsubscriptions.d.ts +57 -0
  134. package/sdk/models/operations/listpaymentsubscriptions.d.ts.map +1 -0
  135. package/sdk/models/operations/listpaymentsubscriptions.js +89 -0
  136. package/sdk/models/operations/listpaymentsubscriptions.js.map +1 -0
  137. package/sdk/models/operations/listtaskcomments.d.ts +57 -0
  138. package/sdk/models/operations/listtaskcomments.d.ts.map +1 -0
  139. package/sdk/models/operations/listtaskcomments.js +89 -0
  140. package/sdk/models/operations/listtaskcomments.js.map +1 -0
  141. package/sdk/models/operations/patchpaymentsubscription.d.ts +45 -0
  142. package/sdk/models/operations/patchpaymentsubscription.d.ts.map +1 -0
  143. package/sdk/models/operations/patchpaymentsubscription.js +77 -0
  144. package/sdk/models/operations/patchpaymentsubscription.js.map +1 -0
  145. package/sdk/models/operations/patchtaskcomment.d.ts +45 -0
  146. package/sdk/models/operations/patchtaskcomment.d.ts.map +1 -0
  147. package/sdk/models/operations/patchtaskcomment.js +77 -0
  148. package/sdk/models/operations/patchtaskcomment.js.map +1 -0
  149. package/sdk/models/operations/removepaymentsubscription.d.ts +66 -0
  150. package/sdk/models/operations/removepaymentsubscription.d.ts.map +1 -0
  151. package/sdk/models/operations/removepaymentsubscription.js +105 -0
  152. package/sdk/models/operations/removepaymentsubscription.js.map +1 -0
  153. package/sdk/models/operations/removetaskcomment.d.ts +66 -0
  154. package/sdk/models/operations/removetaskcomment.d.ts.map +1 -0
  155. package/sdk/models/operations/removetaskcomment.js +105 -0
  156. package/sdk/models/operations/removetaskcomment.js.map +1 -0
  157. package/sdk/models/operations/updatepaymentsubscription.d.ts +45 -0
  158. package/sdk/models/operations/updatepaymentsubscription.d.ts.map +1 -0
  159. package/sdk/models/operations/updatepaymentsubscription.js +77 -0
  160. package/sdk/models/operations/updatepaymentsubscription.js.map +1 -0
  161. package/sdk/models/operations/updatetaskcomment.d.ts +45 -0
  162. package/sdk/models/operations/updatetaskcomment.d.ts.map +1 -0
  163. package/sdk/models/operations/updatetaskcomment.js +77 -0
  164. package/sdk/models/operations/updatetaskcomment.js.map +1 -0
  165. package/sdk/models/shared/accountingjournal.d.ts +2 -2
  166. package/sdk/models/shared/accountingjournal.d.ts.map +1 -1
  167. package/sdk/models/shared/accountingjournal.js +6 -4
  168. package/sdk/models/shared/accountingjournal.js.map +1 -1
  169. package/sdk/models/shared/index.d.ts +3 -1
  170. package/sdk/models/shared/index.d.ts.map +1 -1
  171. package/sdk/models/shared/index.js +3 -1
  172. package/sdk/models/shared/index.js.map +1 -1
  173. package/sdk/models/shared/{paymentlinklineitem.d.ts → paymentlineitem.d.ts} +14 -14
  174. package/sdk/models/shared/paymentlineitem.d.ts.map +1 -0
  175. package/sdk/models/shared/{paymentlinklineitem.js → paymentlineitem.js} +17 -17
  176. package/sdk/models/shared/paymentlineitem.js.map +1 -0
  177. package/sdk/models/shared/paymentlink.d.ts +3 -3
  178. package/sdk/models/shared/paymentlink.d.ts.map +1 -1
  179. package/sdk/models/shared/paymentlink.js +3 -3
  180. package/sdk/models/shared/paymentlink.js.map +1 -1
  181. package/sdk/models/shared/paymentrefund.d.ts +2 -2
  182. package/sdk/models/shared/paymentrefund.d.ts.map +1 -1
  183. package/sdk/models/shared/paymentrefund.js +6 -4
  184. package/sdk/models/shared/paymentrefund.js.map +1 -1
  185. package/sdk/models/shared/paymentsubscription.d.ts +135 -0
  186. package/sdk/models/shared/paymentsubscription.d.ts.map +1 -0
  187. package/sdk/models/shared/paymentsubscription.js +176 -0
  188. package/sdk/models/shared/paymentsubscription.js.map +1 -0
  189. package/sdk/models/shared/propertyconnectionpermissions.d.ts +12 -0
  190. package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  191. package/sdk/models/shared/propertyconnectionpermissions.js +4 -0
  192. package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  193. package/sdk/models/shared/propertycrmeventemail.d.ts +2 -2
  194. package/sdk/models/shared/repoorganization.d.ts +4 -4
  195. package/sdk/models/shared/repoorganization.d.ts.map +1 -1
  196. package/sdk/models/shared/repoorganization.js +8 -6
  197. package/sdk/models/shared/repoorganization.js.map +1 -1
  198. package/sdk/models/shared/taskcomment.d.ts +47 -0
  199. package/sdk/models/shared/taskcomment.d.ts.map +1 -0
  200. package/sdk/models/shared/taskcomment.js +92 -0
  201. package/sdk/models/shared/taskcomment.js.map +1 -0
  202. package/sdk/models/shared/tasktask.d.ts +5 -0
  203. package/sdk/models/shared/tasktask.d.ts.map +1 -1
  204. package/sdk/models/shared/tasktask.js +4 -0
  205. package/sdk/models/shared/tasktask.js.map +1 -1
  206. package/sdk/models/shared/ticketingnote.d.ts +1 -1
  207. package/sdk/models/shared/ticketingnote.d.ts.map +1 -1
  208. package/sdk/models/shared/ticketingnote.js +3 -2
  209. package/sdk/models/shared/ticketingnote.js.map +1 -1
  210. package/sdk/models/shared/webhook.d.ts +6 -0
  211. package/sdk/models/shared/webhook.d.ts.map +1 -1
  212. package/sdk/models/shared/webhook.js +2 -0
  213. package/sdk/models/shared/webhook.js.map +1 -1
  214. package/sdk/payment.d.ts +24 -0
  215. package/sdk/payment.d.ts.map +1 -1
  216. package/sdk/payment.js +42 -0
  217. package/sdk/payment.js.map +1 -1
  218. package/sdk/sdk.d.ts +6 -0
  219. package/sdk/sdk.d.ts.map +1 -1
  220. package/sdk/sdk.js +8 -0
  221. package/sdk/sdk.js.map +1 -1
  222. package/sdk/subscription.d.ts +30 -0
  223. package/sdk/subscription.d.ts.map +1 -0
  224. package/sdk/subscription.js +54 -0
  225. package/sdk/subscription.js.map +1 -0
  226. package/sdk/task.d.ts +24 -0
  227. package/sdk/task.d.ts.map +1 -1
  228. package/sdk/task.js +42 -0
  229. package/sdk/task.js.map +1 -1
  230. package/src/funcs/commentCreateTaskComment.ts +133 -0
  231. package/src/funcs/commentGetTaskComment.ts +136 -0
  232. package/src/funcs/commentListTaskComments.ts +140 -0
  233. package/src/funcs/commentPatchTaskComment.ts +137 -0
  234. package/src/funcs/commentRemoveTaskComment.ts +139 -0
  235. package/src/funcs/commentUpdateTaskComment.ts +137 -0
  236. package/src/funcs/paymentCreatePaymentSubscription.ts +136 -0
  237. package/src/funcs/paymentGetPaymentSubscription.ts +139 -0
  238. package/src/funcs/paymentListPaymentSubscriptions.ts +141 -0
  239. package/src/funcs/paymentPatchPaymentSubscription.ts +142 -0
  240. package/src/funcs/paymentRemovePaymentSubscription.ts +145 -0
  241. package/src/funcs/paymentUpdatePaymentSubscription.ts +142 -0
  242. package/src/funcs/subscriptionCreatePaymentSubscription.ts +136 -0
  243. package/src/funcs/subscriptionGetPaymentSubscription.ts +139 -0
  244. package/src/funcs/subscriptionListPaymentSubscriptions.ts +141 -0
  245. package/src/funcs/subscriptionPatchPaymentSubscription.ts +142 -0
  246. package/src/funcs/subscriptionRemovePaymentSubscription.ts +145 -0
  247. package/src/funcs/subscriptionUpdatePaymentSubscription.ts +142 -0
  248. package/src/funcs/taskCreateTaskComment.ts +133 -0
  249. package/src/funcs/taskGetTaskComment.ts +136 -0
  250. package/src/funcs/taskListTaskComments.ts +140 -0
  251. package/src/funcs/taskPatchTaskComment.ts +137 -0
  252. package/src/funcs/taskRemoveTaskComment.ts +139 -0
  253. package/src/funcs/taskUpdateTaskComment.ts +137 -0
  254. package/src/lib/config.ts +2 -2
  255. package/src/sdk/comment.ts +100 -0
  256. package/src/sdk/models/operations/createpaymentsubscription.ts +94 -0
  257. package/src/sdk/models/operations/createtaskcomment.ts +92 -0
  258. package/src/sdk/models/operations/getpaymentsubscription.ts +94 -0
  259. package/src/sdk/models/operations/gettaskcomment.ts +92 -0
  260. package/src/sdk/models/operations/getunifiedintegrationauth.ts +4 -0
  261. package/src/sdk/models/operations/index.ts +12 -0
  262. package/src/sdk/models/operations/listpaymentsubscriptions.ts +126 -0
  263. package/src/sdk/models/operations/listtaskcomments.ts +124 -0
  264. package/src/sdk/models/operations/patchpaymentsubscription.ts +101 -0
  265. package/src/sdk/models/operations/patchtaskcomment.ts +99 -0
  266. package/src/sdk/models/operations/removepaymentsubscription.ts +156 -0
  267. package/src/sdk/models/operations/removetaskcomment.ts +151 -0
  268. package/src/sdk/models/operations/updatepaymentsubscription.ts +101 -0
  269. package/src/sdk/models/operations/updatetaskcomment.ts +99 -0
  270. package/src/sdk/models/shared/accountingjournal.ts +8 -6
  271. package/src/sdk/models/shared/index.ts +3 -1
  272. package/src/sdk/models/shared/{paymentlinklineitem.ts → paymentlineitem.ts} +21 -23
  273. package/src/sdk/models/shared/paymentlink.ts +9 -9
  274. package/src/sdk/models/shared/paymentrefund.ts +8 -6
  275. package/src/sdk/models/shared/paymentsubscription.ts +247 -0
  276. package/src/sdk/models/shared/propertyconnectionpermissions.ts +4 -0
  277. package/src/sdk/models/shared/propertycrmeventemail.ts +2 -2
  278. package/src/sdk/models/shared/repoorganization.ts +12 -10
  279. package/src/sdk/models/shared/taskcomment.ts +109 -0
  280. package/src/sdk/models/shared/tasktask.ts +9 -0
  281. package/src/sdk/models/shared/ticketingnote.ts +4 -3
  282. package/src/sdk/models/shared/webhook.ts +2 -0
  283. package/src/sdk/payment.ts +90 -0
  284. package/src/sdk/sdk.ts +12 -0
  285. package/src/sdk/subscription.ts +100 -0
  286. package/src/sdk/task.ts +90 -0
  287. package/sdk/models/shared/paymentlinklineitem.d.ts.map +0 -1
  288. package/sdk/models/shared/paymentlinklineitem.js.map +0 -1
@@ -0,0 +1,137 @@
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 { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import {
13
+ ConnectionError,
14
+ InvalidRequestError,
15
+ RequestAbortedError,
16
+ RequestTimeoutError,
17
+ UnexpectedClientError,
18
+ } from "../sdk/models/errors/httpclienterrors.js";
19
+ import { SDKError } from "../sdk/models/errors/sdkerror.js";
20
+ import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
21
+ import * as operations from "../sdk/models/operations/index.js";
22
+ import * as shared from "../sdk/models/shared/index.js";
23
+ import { Result } from "../sdk/types/fp.js";
24
+
25
+ /**
26
+ * Update a comment
27
+ */
28
+ export async function taskUpdateTaskComment(
29
+ client: UnifiedToCore,
30
+ request: operations.UpdateTaskCommentRequest,
31
+ options?: RequestOptions,
32
+ ): Promise<
33
+ Result<
34
+ shared.TaskComment,
35
+ | SDKError
36
+ | SDKValidationError
37
+ | UnexpectedClientError
38
+ | InvalidRequestError
39
+ | RequestAbortedError
40
+ | RequestTimeoutError
41
+ | ConnectionError
42
+ >
43
+ > {
44
+ const parsed = safeParse(
45
+ request,
46
+ (value) => operations.UpdateTaskCommentRequest$outboundSchema.parse(value),
47
+ "Input validation failed",
48
+ );
49
+ if (!parsed.ok) {
50
+ return parsed;
51
+ }
52
+ const payload = parsed.value;
53
+ const body = encodeJSON("body", payload.TaskComment, { explode: true });
54
+
55
+ const pathParams = {
56
+ connection_id: encodeSimple("connection_id", payload.connection_id, {
57
+ explode: false,
58
+ charEncoding: "percent",
59
+ }),
60
+ id: encodeSimple("id", payload.id, {
61
+ explode: false,
62
+ charEncoding: "percent",
63
+ }),
64
+ };
65
+
66
+ const path = pathToFunc("/task/{connection_id}/comment/{id}")(pathParams);
67
+
68
+ const query = encodeFormQuery({
69
+ "fields": payload.fields,
70
+ });
71
+
72
+ const headers = new Headers({
73
+ "Content-Type": "application/json",
74
+ Accept: "application/json",
75
+ });
76
+
77
+ const securityInput = await extractSecurity(client._options.security);
78
+ const requestSecurity = resolveGlobalSecurity(securityInput);
79
+
80
+ const context = {
81
+ operationID: "updateTaskComment",
82
+ oAuth2Scopes: [],
83
+
84
+ resolvedSecurity: requestSecurity,
85
+
86
+ securitySource: client._options.security,
87
+ retryConfig: options?.retries
88
+ || client._options.retryConfig
89
+ || { strategy: "none" },
90
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
91
+ };
92
+
93
+ const requestRes = client._createRequest(context, {
94
+ security: requestSecurity,
95
+ method: "PUT",
96
+ baseURL: options?.serverURL,
97
+ path: path,
98
+ headers: headers,
99
+ query: query,
100
+ body: body,
101
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
102
+ }, options);
103
+ if (!requestRes.ok) {
104
+ return requestRes;
105
+ }
106
+ const req = requestRes.value;
107
+
108
+ const doResult = await client._do(req, {
109
+ context,
110
+ errorCodes: ["4XX", "5XX"],
111
+ retryConfig: context.retryConfig,
112
+ retryCodes: context.retryCodes,
113
+ });
114
+ if (!doResult.ok) {
115
+ return doResult;
116
+ }
117
+ const response = doResult.value;
118
+
119
+ const [result] = await M.match<
120
+ shared.TaskComment,
121
+ | SDKError
122
+ | SDKValidationError
123
+ | UnexpectedClientError
124
+ | InvalidRequestError
125
+ | RequestAbortedError
126
+ | RequestTimeoutError
127
+ | ConnectionError
128
+ >(
129
+ M.json(200, shared.TaskComment$inboundSchema),
130
+ M.fail(["4XX", "5XX"]),
131
+ )(response);
132
+ if (!result.ok) {
133
+ return result;
134
+ }
135
+
136
+ return result;
137
+ }
package/src/lib/config.ts CHANGED
@@ -65,8 +65,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
65
65
  export const SDK_METADATA = {
66
66
  language: "typescript",
67
67
  openapiDocVersion: "1.0",
68
- sdkVersion: "2.9.14",
68
+ sdkVersion: "2.9.16",
69
69
  genVersion: "2.484.0",
70
70
  userAgent:
71
- "speakeasy-sdk/typescript 2.9.14 2.484.0 1.0 @unified-api/typescript-sdk",
71
+ "speakeasy-sdk/typescript 2.9.16 2.484.0 1.0 @unified-api/typescript-sdk",
72
72
  } as const;
@@ -0,0 +1,100 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { commentCreateTaskComment } from "../funcs/commentCreateTaskComment.js";
6
+ import { commentGetTaskComment } from "../funcs/commentGetTaskComment.js";
7
+ import { commentListTaskComments } from "../funcs/commentListTaskComments.js";
8
+ import { commentPatchTaskComment } from "../funcs/commentPatchTaskComment.js";
9
+ import { commentRemoveTaskComment } from "../funcs/commentRemoveTaskComment.js";
10
+ import { commentUpdateTaskComment } from "../funcs/commentUpdateTaskComment.js";
11
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
12
+ import * as operations from "./models/operations/index.js";
13
+ import * as shared from "./models/shared/index.js";
14
+ import { unwrapAsync } from "./types/fp.js";
15
+
16
+ export class Comment extends ClientSDK {
17
+ /**
18
+ * Create a comment
19
+ */
20
+ async createTaskComment(
21
+ request: operations.CreateTaskCommentRequest,
22
+ options?: RequestOptions,
23
+ ): Promise<shared.TaskComment> {
24
+ return unwrapAsync(commentCreateTaskComment(
25
+ this,
26
+ request,
27
+ options,
28
+ ));
29
+ }
30
+
31
+ /**
32
+ * Retrieve a comment
33
+ */
34
+ async getTaskComment(
35
+ request: operations.GetTaskCommentRequest,
36
+ options?: RequestOptions,
37
+ ): Promise<shared.TaskComment> {
38
+ return unwrapAsync(commentGetTaskComment(
39
+ this,
40
+ request,
41
+ options,
42
+ ));
43
+ }
44
+
45
+ /**
46
+ * List all comments
47
+ */
48
+ async listTaskComments(
49
+ request: operations.ListTaskCommentsRequest,
50
+ options?: RequestOptions,
51
+ ): Promise<Array<shared.TaskComment>> {
52
+ return unwrapAsync(commentListTaskComments(
53
+ this,
54
+ request,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ /**
60
+ * Update a comment
61
+ */
62
+ async patchTaskComment(
63
+ request: operations.PatchTaskCommentRequest,
64
+ options?: RequestOptions,
65
+ ): Promise<shared.TaskComment> {
66
+ return unwrapAsync(commentPatchTaskComment(
67
+ this,
68
+ request,
69
+ options,
70
+ ));
71
+ }
72
+
73
+ /**
74
+ * Remove a comment
75
+ */
76
+ async removeTaskComment(
77
+ request: operations.RemoveTaskCommentRequest,
78
+ options?: RequestOptions,
79
+ ): Promise<operations.RemoveTaskCommentResponse | undefined> {
80
+ return unwrapAsync(commentRemoveTaskComment(
81
+ this,
82
+ request,
83
+ options,
84
+ ));
85
+ }
86
+
87
+ /**
88
+ * Update a comment
89
+ */
90
+ async updateTaskComment(
91
+ request: operations.UpdateTaskCommentRequest,
92
+ options?: RequestOptions,
93
+ ): Promise<shared.TaskComment> {
94
+ return unwrapAsync(commentUpdateTaskComment(
95
+ this,
96
+ request,
97
+ options,
98
+ ));
99
+ }
100
+ }
@@ -0,0 +1,94 @@
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 CreatePaymentSubscriptionRequest = {
13
+ paymentSubscription?: shared.PaymentSubscription | undefined;
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
+
24
+ /** @internal */
25
+ export const CreatePaymentSubscriptionRequest$inboundSchema: z.ZodType<
26
+ CreatePaymentSubscriptionRequest,
27
+ z.ZodTypeDef,
28
+ unknown
29
+ > = z.object({
30
+ PaymentSubscription: shared.PaymentSubscription$inboundSchema.optional(),
31
+ connection_id: z.string(),
32
+ fields: z.array(z.string()).optional(),
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ "PaymentSubscription": "paymentSubscription",
36
+ "connection_id": "connectionId",
37
+ });
38
+ });
39
+
40
+ /** @internal */
41
+ export type CreatePaymentSubscriptionRequest$Outbound = {
42
+ PaymentSubscription?: shared.PaymentSubscription$Outbound | undefined;
43
+ connection_id: string;
44
+ fields?: Array<string> | undefined;
45
+ };
46
+
47
+ /** @internal */
48
+ export const CreatePaymentSubscriptionRequest$outboundSchema: z.ZodType<
49
+ CreatePaymentSubscriptionRequest$Outbound,
50
+ z.ZodTypeDef,
51
+ CreatePaymentSubscriptionRequest
52
+ > = z.object({
53
+ paymentSubscription: shared.PaymentSubscription$outboundSchema.optional(),
54
+ connectionId: z.string(),
55
+ fields: z.array(z.string()).optional(),
56
+ }).transform((v) => {
57
+ return remap$(v, {
58
+ paymentSubscription: "PaymentSubscription",
59
+ connectionId: "connection_id",
60
+ });
61
+ });
62
+
63
+ /**
64
+ * @internal
65
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
66
+ */
67
+ export namespace CreatePaymentSubscriptionRequest$ {
68
+ /** @deprecated use `CreatePaymentSubscriptionRequest$inboundSchema` instead. */
69
+ export const inboundSchema = CreatePaymentSubscriptionRequest$inboundSchema;
70
+ /** @deprecated use `CreatePaymentSubscriptionRequest$outboundSchema` instead. */
71
+ export const outboundSchema = CreatePaymentSubscriptionRequest$outboundSchema;
72
+ /** @deprecated use `CreatePaymentSubscriptionRequest$Outbound` instead. */
73
+ export type Outbound = CreatePaymentSubscriptionRequest$Outbound;
74
+ }
75
+
76
+ export function createPaymentSubscriptionRequestToJSON(
77
+ createPaymentSubscriptionRequest: CreatePaymentSubscriptionRequest,
78
+ ): string {
79
+ return JSON.stringify(
80
+ CreatePaymentSubscriptionRequest$outboundSchema.parse(
81
+ createPaymentSubscriptionRequest,
82
+ ),
83
+ );
84
+ }
85
+
86
+ export function createPaymentSubscriptionRequestFromJSON(
87
+ jsonString: string,
88
+ ): SafeParseResult<CreatePaymentSubscriptionRequest, SDKValidationError> {
89
+ return safeParse(
90
+ jsonString,
91
+ (x) => CreatePaymentSubscriptionRequest$inboundSchema.parse(JSON.parse(x)),
92
+ `Failed to parse 'CreatePaymentSubscriptionRequest' from JSON`,
93
+ );
94
+ }
@@ -0,0 +1,92 @@
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 CreateTaskCommentRequest = {
13
+ taskComment?: shared.TaskComment | undefined;
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
+
24
+ /** @internal */
25
+ export const CreateTaskCommentRequest$inboundSchema: z.ZodType<
26
+ CreateTaskCommentRequest,
27
+ z.ZodTypeDef,
28
+ unknown
29
+ > = z.object({
30
+ TaskComment: shared.TaskComment$inboundSchema.optional(),
31
+ connection_id: z.string(),
32
+ fields: z.array(z.string()).optional(),
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ "TaskComment": "taskComment",
36
+ "connection_id": "connectionId",
37
+ });
38
+ });
39
+
40
+ /** @internal */
41
+ export type CreateTaskCommentRequest$Outbound = {
42
+ TaskComment?: shared.TaskComment$Outbound | undefined;
43
+ connection_id: string;
44
+ fields?: Array<string> | undefined;
45
+ };
46
+
47
+ /** @internal */
48
+ export const CreateTaskCommentRequest$outboundSchema: z.ZodType<
49
+ CreateTaskCommentRequest$Outbound,
50
+ z.ZodTypeDef,
51
+ CreateTaskCommentRequest
52
+ > = z.object({
53
+ taskComment: shared.TaskComment$outboundSchema.optional(),
54
+ connectionId: z.string(),
55
+ fields: z.array(z.string()).optional(),
56
+ }).transform((v) => {
57
+ return remap$(v, {
58
+ taskComment: "TaskComment",
59
+ connectionId: "connection_id",
60
+ });
61
+ });
62
+
63
+ /**
64
+ * @internal
65
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
66
+ */
67
+ export namespace CreateTaskCommentRequest$ {
68
+ /** @deprecated use `CreateTaskCommentRequest$inboundSchema` instead. */
69
+ export const inboundSchema = CreateTaskCommentRequest$inboundSchema;
70
+ /** @deprecated use `CreateTaskCommentRequest$outboundSchema` instead. */
71
+ export const outboundSchema = CreateTaskCommentRequest$outboundSchema;
72
+ /** @deprecated use `CreateTaskCommentRequest$Outbound` instead. */
73
+ export type Outbound = CreateTaskCommentRequest$Outbound;
74
+ }
75
+
76
+ export function createTaskCommentRequestToJSON(
77
+ createTaskCommentRequest: CreateTaskCommentRequest,
78
+ ): string {
79
+ return JSON.stringify(
80
+ CreateTaskCommentRequest$outboundSchema.parse(createTaskCommentRequest),
81
+ );
82
+ }
83
+
84
+ export function createTaskCommentRequestFromJSON(
85
+ jsonString: string,
86
+ ): SafeParseResult<CreateTaskCommentRequest, SDKValidationError> {
87
+ return safeParse(
88
+ jsonString,
89
+ (x) => CreateTaskCommentRequest$inboundSchema.parse(JSON.parse(x)),
90
+ `Failed to parse 'CreateTaskCommentRequest' from JSON`,
91
+ );
92
+ }
@@ -0,0 +1,94 @@
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 GetPaymentSubscriptionRequest = {
12
+ /**
13
+ * ID of the connection
14
+ */
15
+ connectionId: string;
16
+ /**
17
+ * Comma-delimited fields to return
18
+ */
19
+ fields?: Array<string> | undefined;
20
+ /**
21
+ * ID of the Subscription
22
+ */
23
+ id: string;
24
+ };
25
+
26
+ /** @internal */
27
+ export const GetPaymentSubscriptionRequest$inboundSchema: z.ZodType<
28
+ GetPaymentSubscriptionRequest,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ connection_id: z.string(),
33
+ fields: z.array(z.string()).optional(),
34
+ id: z.string(),
35
+ }).transform((v) => {
36
+ return remap$(v, {
37
+ "connection_id": "connectionId",
38
+ });
39
+ });
40
+
41
+ /** @internal */
42
+ export type GetPaymentSubscriptionRequest$Outbound = {
43
+ connection_id: string;
44
+ fields?: Array<string> | undefined;
45
+ id: string;
46
+ };
47
+
48
+ /** @internal */
49
+ export const GetPaymentSubscriptionRequest$outboundSchema: z.ZodType<
50
+ GetPaymentSubscriptionRequest$Outbound,
51
+ z.ZodTypeDef,
52
+ GetPaymentSubscriptionRequest
53
+ > = z.object({
54
+ connectionId: z.string(),
55
+ fields: z.array(z.string()).optional(),
56
+ id: z.string(),
57
+ }).transform((v) => {
58
+ return remap$(v, {
59
+ connectionId: "connection_id",
60
+ });
61
+ });
62
+
63
+ /**
64
+ * @internal
65
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
66
+ */
67
+ export namespace GetPaymentSubscriptionRequest$ {
68
+ /** @deprecated use `GetPaymentSubscriptionRequest$inboundSchema` instead. */
69
+ export const inboundSchema = GetPaymentSubscriptionRequest$inboundSchema;
70
+ /** @deprecated use `GetPaymentSubscriptionRequest$outboundSchema` instead. */
71
+ export const outboundSchema = GetPaymentSubscriptionRequest$outboundSchema;
72
+ /** @deprecated use `GetPaymentSubscriptionRequest$Outbound` instead. */
73
+ export type Outbound = GetPaymentSubscriptionRequest$Outbound;
74
+ }
75
+
76
+ export function getPaymentSubscriptionRequestToJSON(
77
+ getPaymentSubscriptionRequest: GetPaymentSubscriptionRequest,
78
+ ): string {
79
+ return JSON.stringify(
80
+ GetPaymentSubscriptionRequest$outboundSchema.parse(
81
+ getPaymentSubscriptionRequest,
82
+ ),
83
+ );
84
+ }
85
+
86
+ export function getPaymentSubscriptionRequestFromJSON(
87
+ jsonString: string,
88
+ ): SafeParseResult<GetPaymentSubscriptionRequest, SDKValidationError> {
89
+ return safeParse(
90
+ jsonString,
91
+ (x) => GetPaymentSubscriptionRequest$inboundSchema.parse(JSON.parse(x)),
92
+ `Failed to parse 'GetPaymentSubscriptionRequest' from JSON`,
93
+ );
94
+ }
@@ -0,0 +1,92 @@
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 GetTaskCommentRequest = {
12
+ /**
13
+ * ID of the connection
14
+ */
15
+ connectionId: string;
16
+ /**
17
+ * Comma-delimited fields to return
18
+ */
19
+ fields?: Array<string> | undefined;
20
+ /**
21
+ * ID of the Comment
22
+ */
23
+ id: string;
24
+ };
25
+
26
+ /** @internal */
27
+ export const GetTaskCommentRequest$inboundSchema: z.ZodType<
28
+ GetTaskCommentRequest,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ connection_id: z.string(),
33
+ fields: z.array(z.string()).optional(),
34
+ id: z.string(),
35
+ }).transform((v) => {
36
+ return remap$(v, {
37
+ "connection_id": "connectionId",
38
+ });
39
+ });
40
+
41
+ /** @internal */
42
+ export type GetTaskCommentRequest$Outbound = {
43
+ connection_id: string;
44
+ fields?: Array<string> | undefined;
45
+ id: string;
46
+ };
47
+
48
+ /** @internal */
49
+ export const GetTaskCommentRequest$outboundSchema: z.ZodType<
50
+ GetTaskCommentRequest$Outbound,
51
+ z.ZodTypeDef,
52
+ GetTaskCommentRequest
53
+ > = z.object({
54
+ connectionId: z.string(),
55
+ fields: z.array(z.string()).optional(),
56
+ id: z.string(),
57
+ }).transform((v) => {
58
+ return remap$(v, {
59
+ connectionId: "connection_id",
60
+ });
61
+ });
62
+
63
+ /**
64
+ * @internal
65
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
66
+ */
67
+ export namespace GetTaskCommentRequest$ {
68
+ /** @deprecated use `GetTaskCommentRequest$inboundSchema` instead. */
69
+ export const inboundSchema = GetTaskCommentRequest$inboundSchema;
70
+ /** @deprecated use `GetTaskCommentRequest$outboundSchema` instead. */
71
+ export const outboundSchema = GetTaskCommentRequest$outboundSchema;
72
+ /** @deprecated use `GetTaskCommentRequest$Outbound` instead. */
73
+ export type Outbound = GetTaskCommentRequest$Outbound;
74
+ }
75
+
76
+ export function getTaskCommentRequestToJSON(
77
+ getTaskCommentRequest: GetTaskCommentRequest,
78
+ ): string {
79
+ return JSON.stringify(
80
+ GetTaskCommentRequest$outboundSchema.parse(getTaskCommentRequest),
81
+ );
82
+ }
83
+
84
+ export function getTaskCommentRequestFromJSON(
85
+ jsonString: string,
86
+ ): SafeParseResult<GetTaskCommentRequest, SDKValidationError> {
87
+ return safeParse(
88
+ jsonString,
89
+ (x) => GetTaskCommentRequest$inboundSchema.parse(JSON.parse(x)),
90
+ `Failed to parse 'GetTaskCommentRequest' from JSON`,
91
+ );
92
+ }
@@ -32,6 +32,8 @@ export const Scopes = {
32
32
  PaymentRefundRead: "payment_refund_read",
33
33
  PaymentLinkRead: "payment_link_read",
34
34
  PaymentLinkWrite: "payment_link_write",
35
+ PaymentSubscriptionRead: "payment_subscription_read",
36
+ PaymentSubscriptionWrite: "payment_subscription_write",
35
37
  CommerceItemRead: "commerce_item_read",
36
38
  CommerceItemWrite: "commerce_item_write",
37
39
  CommerceCollectionRead: "commerce_collection_read",
@@ -112,6 +114,8 @@ export const Scopes = {
112
114
  TaskProjectWrite: "task_project_write",
113
115
  TaskTaskRead: "task_task_read",
114
116
  TaskTaskWrite: "task_task_write",
117
+ TaskCommentRead: "task_comment_read",
118
+ TaskCommentWrite: "task_comment_write",
115
119
  ScimUsersRead: "scim_users_read",
116
120
  ScimUsersWrite: "scim_users_write",
117
121
  ScimGroupsRead: "scim_groups_read",