dub 0.70.0 → 0.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/README.md +11 -7
  2. package/dist/commonjs/funcs/bountiesApproveSubmission.d.ts +18 -0
  3. package/dist/commonjs/funcs/bountiesApproveSubmission.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/bountiesApproveSubmission.js +140 -0
  5. package/dist/commonjs/funcs/bountiesApproveSubmission.js.map +1 -0
  6. package/dist/commonjs/funcs/bountiesListSubmissions.d.ts +18 -0
  7. package/dist/commonjs/funcs/bountiesListSubmissions.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/bountiesListSubmissions.js +146 -0
  9. package/dist/commonjs/funcs/bountiesListSubmissions.js.map +1 -0
  10. package/dist/commonjs/funcs/bountiesRejectSubmission.d.ts +18 -0
  11. package/dist/commonjs/funcs/bountiesRejectSubmission.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/{workspacesUpdate.js → bountiesRejectSubmission.js} +17 -18
  13. package/dist/commonjs/funcs/bountiesRejectSubmission.js.map +1 -0
  14. package/dist/commonjs/funcs/partnersDeactivate.d.ts +18 -0
  15. package/dist/commonjs/funcs/partnersDeactivate.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/{workspacesGet.js → partnersDeactivate.js} +14 -18
  17. package/dist/commonjs/funcs/partnersDeactivate.js.map +1 -0
  18. package/dist/commonjs/lib/config.d.ts +3 -3
  19. package/dist/commonjs/lib/config.js +3 -3
  20. package/dist/commonjs/models/components/commissioncreatedevent.d.ts +54 -6
  21. package/dist/commonjs/models/components/commissioncreatedevent.d.ts.map +1 -1
  22. package/dist/commonjs/models/components/commissioncreatedevent.js +33 -3
  23. package/dist/commonjs/models/components/commissioncreatedevent.js.map +1 -1
  24. package/dist/commonjs/models/components/index.d.ts +0 -1
  25. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  26. package/dist/commonjs/models/components/index.js +0 -1
  27. package/dist/commonjs/models/components/index.js.map +1 -1
  28. package/dist/commonjs/models/components/leadcreatedevent.d.ts +21 -6
  29. package/dist/commonjs/models/components/leadcreatedevent.d.ts.map +1 -1
  30. package/dist/commonjs/models/components/leadcreatedevent.js +8 -2
  31. package/dist/commonjs/models/components/leadcreatedevent.js.map +1 -1
  32. package/dist/commonjs/models/components/partnerenrolledevent.d.ts +402 -0
  33. package/dist/commonjs/models/components/partnerenrolledevent.d.ts.map +1 -1
  34. package/dist/commonjs/models/components/partnerenrolledevent.js +421 -1
  35. package/dist/commonjs/models/components/partnerenrolledevent.js.map +1 -1
  36. package/dist/commonjs/models/components/salecreatedevent.d.ts +21 -6
  37. package/dist/commonjs/models/components/salecreatedevent.d.ts.map +1 -1
  38. package/dist/commonjs/models/components/salecreatedevent.js +8 -2
  39. package/dist/commonjs/models/components/salecreatedevent.js.map +1 -1
  40. package/dist/commonjs/models/operations/approvebountysubmission.d.ts +130 -0
  41. package/dist/commonjs/models/operations/approvebountysubmission.d.ts.map +1 -0
  42. package/dist/commonjs/models/operations/approvebountysubmission.js +107 -0
  43. package/dist/commonjs/models/operations/approvebountysubmission.js.map +1 -0
  44. package/dist/commonjs/models/operations/createpartner.d.ts +130 -0
  45. package/dist/commonjs/models/operations/createpartner.d.ts.map +1 -1
  46. package/dist/commonjs/models/operations/createpartner.js +183 -1
  47. package/dist/commonjs/models/operations/createpartner.js.map +1 -1
  48. package/dist/commonjs/models/operations/deactivatepartner.d.ts +34 -0
  49. package/dist/commonjs/models/operations/deactivatepartner.d.ts.map +1 -0
  50. package/dist/commonjs/models/operations/{getworkspace.js → deactivatepartner.js} +17 -7
  51. package/dist/commonjs/models/operations/deactivatepartner.js.map +1 -0
  52. package/dist/commonjs/models/operations/getcustomer.d.ts +17 -5
  53. package/dist/commonjs/models/operations/getcustomer.d.ts.map +1 -1
  54. package/dist/commonjs/models/operations/getcustomer.js +4 -1
  55. package/dist/commonjs/models/operations/getcustomer.js.map +1 -1
  56. package/dist/commonjs/models/operations/getcustomers.d.ts +19 -5
  57. package/dist/commonjs/models/operations/getcustomers.d.ts.map +1 -1
  58. package/dist/commonjs/models/operations/getcustomers.js +6 -1
  59. package/dist/commonjs/models/operations/getcustomers.js.map +1 -1
  60. package/dist/commonjs/models/operations/index.d.ts +4 -2
  61. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  62. package/dist/commonjs/models/operations/index.js +4 -2
  63. package/dist/commonjs/models/operations/index.js.map +1 -1
  64. package/dist/commonjs/models/operations/listbountysubmissions.d.ts +183 -0
  65. package/dist/commonjs/models/operations/listbountysubmissions.d.ts.map +1 -0
  66. package/dist/commonjs/models/operations/listbountysubmissions.js +129 -0
  67. package/dist/commonjs/models/operations/listbountysubmissions.js.map +1 -0
  68. package/dist/commonjs/models/operations/listcommissions.d.ts +17 -5
  69. package/dist/commonjs/models/operations/listcommissions.d.ts.map +1 -1
  70. package/dist/commonjs/models/operations/listcommissions.js +4 -1
  71. package/dist/commonjs/models/operations/listcommissions.js.map +1 -1
  72. package/dist/commonjs/models/operations/listevents.d.ts +34 -10
  73. package/dist/commonjs/models/operations/listevents.d.ts.map +1 -1
  74. package/dist/commonjs/models/operations/listevents.js +8 -2
  75. package/dist/commonjs/models/operations/listevents.js.map +1 -1
  76. package/dist/commonjs/models/operations/listpartners.d.ts +130 -0
  77. package/dist/commonjs/models/operations/listpartners.d.ts.map +1 -1
  78. package/dist/commonjs/models/operations/listpartners.js +179 -1
  79. package/dist/commonjs/models/operations/listpartners.js.map +1 -1
  80. package/dist/commonjs/models/operations/rejectbountysubmission.d.ts +151 -0
  81. package/dist/commonjs/models/operations/rejectbountysubmission.d.ts.map +1 -0
  82. package/dist/commonjs/models/operations/rejectbountysubmission.js +120 -0
  83. package/dist/commonjs/models/operations/rejectbountysubmission.js.map +1 -0
  84. package/dist/commonjs/models/operations/updatecommission.d.ts +17 -5
  85. package/dist/commonjs/models/operations/updatecommission.d.ts.map +1 -1
  86. package/dist/commonjs/models/operations/updatecommission.js +4 -1
  87. package/dist/commonjs/models/operations/updatecommission.js.map +1 -1
  88. package/dist/commonjs/models/operations/updatecustomer.d.ts +17 -5
  89. package/dist/commonjs/models/operations/updatecustomer.d.ts.map +1 -1
  90. package/dist/commonjs/models/operations/updatecustomer.js +4 -1
  91. package/dist/commonjs/models/operations/updatecustomer.js.map +1 -1
  92. package/dist/commonjs/models/operations/upsertpartnerlink.d.ts +3 -3
  93. package/dist/commonjs/models/operations/upsertpartnerlink.d.ts.map +1 -1
  94. package/dist/commonjs/models/operations/upsertpartnerlink.js +1 -1
  95. package/dist/commonjs/models/operations/upsertpartnerlink.js.map +1 -1
  96. package/dist/commonjs/sdk/bounties.d.ts +26 -0
  97. package/dist/commonjs/sdk/bounties.d.ts.map +1 -0
  98. package/dist/commonjs/sdk/bounties.js +42 -0
  99. package/dist/commonjs/sdk/bounties.js.map +1 -0
  100. package/dist/commonjs/sdk/partners.d.ts +7 -0
  101. package/dist/commonjs/sdk/partners.d.ts.map +1 -1
  102. package/dist/commonjs/sdk/partners.js +10 -0
  103. package/dist/commonjs/sdk/partners.js.map +1 -1
  104. package/dist/commonjs/sdk/sdk.d.ts +3 -3
  105. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  106. package/dist/commonjs/sdk/sdk.js +4 -4
  107. package/dist/commonjs/sdk/sdk.js.map +1 -1
  108. package/dist/esm/funcs/bountiesApproveSubmission.d.ts +18 -0
  109. package/dist/esm/funcs/bountiesApproveSubmission.d.ts.map +1 -0
  110. package/dist/esm/funcs/bountiesApproveSubmission.js +104 -0
  111. package/dist/esm/funcs/bountiesApproveSubmission.js.map +1 -0
  112. package/dist/esm/funcs/bountiesListSubmissions.d.ts +18 -0
  113. package/dist/esm/funcs/bountiesListSubmissions.d.ts.map +1 -0
  114. package/dist/esm/funcs/bountiesListSubmissions.js +110 -0
  115. package/dist/esm/funcs/bountiesListSubmissions.js.map +1 -0
  116. package/dist/esm/funcs/bountiesRejectSubmission.d.ts +18 -0
  117. package/dist/esm/funcs/bountiesRejectSubmission.d.ts.map +1 -0
  118. package/dist/esm/funcs/{workspacesUpdate.js → bountiesRejectSubmission.js} +16 -17
  119. package/dist/esm/funcs/bountiesRejectSubmission.js.map +1 -0
  120. package/dist/esm/funcs/partnersDeactivate.d.ts +18 -0
  121. package/dist/esm/funcs/partnersDeactivate.d.ts.map +1 -0
  122. package/dist/esm/funcs/{workspacesGet.js → partnersDeactivate.js} +14 -18
  123. package/dist/esm/funcs/partnersDeactivate.js.map +1 -0
  124. package/dist/esm/lib/config.d.ts +3 -3
  125. package/dist/esm/lib/config.js +3 -3
  126. package/dist/esm/models/components/commissioncreatedevent.d.ts +54 -6
  127. package/dist/esm/models/components/commissioncreatedevent.d.ts.map +1 -1
  128. package/dist/esm/models/components/commissioncreatedevent.js +30 -2
  129. package/dist/esm/models/components/commissioncreatedevent.js.map +1 -1
  130. package/dist/esm/models/components/index.d.ts +0 -1
  131. package/dist/esm/models/components/index.d.ts.map +1 -1
  132. package/dist/esm/models/components/index.js +0 -1
  133. package/dist/esm/models/components/index.js.map +1 -1
  134. package/dist/esm/models/components/leadcreatedevent.d.ts +21 -6
  135. package/dist/esm/models/components/leadcreatedevent.d.ts.map +1 -1
  136. package/dist/esm/models/components/leadcreatedevent.js +8 -2
  137. package/dist/esm/models/components/leadcreatedevent.js.map +1 -1
  138. package/dist/esm/models/components/partnerenrolledevent.d.ts +402 -0
  139. package/dist/esm/models/components/partnerenrolledevent.d.ts.map +1 -1
  140. package/dist/esm/models/components/partnerenrolledevent.js +391 -0
  141. package/dist/esm/models/components/partnerenrolledevent.js.map +1 -1
  142. package/dist/esm/models/components/salecreatedevent.d.ts +21 -6
  143. package/dist/esm/models/components/salecreatedevent.d.ts.map +1 -1
  144. package/dist/esm/models/components/salecreatedevent.js +8 -2
  145. package/dist/esm/models/components/salecreatedevent.js.map +1 -1
  146. package/dist/esm/models/operations/approvebountysubmission.d.ts +130 -0
  147. package/dist/esm/models/operations/approvebountysubmission.d.ts.map +1 -0
  148. package/dist/esm/models/operations/approvebountysubmission.js +67 -0
  149. package/dist/esm/models/operations/approvebountysubmission.js.map +1 -0
  150. package/dist/esm/models/operations/createpartner.d.ts +130 -0
  151. package/dist/esm/models/operations/createpartner.d.ts.map +1 -1
  152. package/dist/esm/models/operations/createpartner.js +168 -0
  153. package/dist/esm/models/operations/createpartner.js.map +1 -1
  154. package/dist/esm/models/operations/deactivatepartner.d.ts +34 -0
  155. package/dist/esm/models/operations/deactivatepartner.d.ts.map +1 -0
  156. package/dist/esm/models/operations/deactivatepartner.js +21 -0
  157. package/dist/esm/models/operations/deactivatepartner.js.map +1 -0
  158. package/dist/esm/models/operations/getcustomer.d.ts +17 -5
  159. package/dist/esm/models/operations/getcustomer.d.ts.map +1 -1
  160. package/dist/esm/models/operations/getcustomer.js +4 -1
  161. package/dist/esm/models/operations/getcustomer.js.map +1 -1
  162. package/dist/esm/models/operations/getcustomers.d.ts +19 -5
  163. package/dist/esm/models/operations/getcustomers.d.ts.map +1 -1
  164. package/dist/esm/models/operations/getcustomers.js +6 -1
  165. package/dist/esm/models/operations/getcustomers.js.map +1 -1
  166. package/dist/esm/models/operations/index.d.ts +4 -2
  167. package/dist/esm/models/operations/index.d.ts.map +1 -1
  168. package/dist/esm/models/operations/index.js +4 -2
  169. package/dist/esm/models/operations/index.js.map +1 -1
  170. package/dist/esm/models/operations/listbountysubmissions.d.ts +183 -0
  171. package/dist/esm/models/operations/listbountysubmissions.d.ts.map +1 -0
  172. package/dist/esm/models/operations/listbountysubmissions.js +90 -0
  173. package/dist/esm/models/operations/listbountysubmissions.js.map +1 -0
  174. package/dist/esm/models/operations/listcommissions.d.ts +17 -5
  175. package/dist/esm/models/operations/listcommissions.d.ts.map +1 -1
  176. package/dist/esm/models/operations/listcommissions.js +4 -1
  177. package/dist/esm/models/operations/listcommissions.js.map +1 -1
  178. package/dist/esm/models/operations/listevents.d.ts +34 -10
  179. package/dist/esm/models/operations/listevents.d.ts.map +1 -1
  180. package/dist/esm/models/operations/listevents.js +8 -2
  181. package/dist/esm/models/operations/listevents.js.map +1 -1
  182. package/dist/esm/models/operations/listpartners.d.ts +130 -0
  183. package/dist/esm/models/operations/listpartners.d.ts.map +1 -1
  184. package/dist/esm/models/operations/listpartners.js +164 -0
  185. package/dist/esm/models/operations/listpartners.js.map +1 -1
  186. package/dist/esm/models/operations/rejectbountysubmission.d.ts +151 -0
  187. package/dist/esm/models/operations/rejectbountysubmission.d.ts.map +1 -0
  188. package/dist/esm/models/operations/rejectbountysubmission.js +80 -0
  189. package/dist/esm/models/operations/rejectbountysubmission.js.map +1 -0
  190. package/dist/esm/models/operations/updatecommission.d.ts +17 -5
  191. package/dist/esm/models/operations/updatecommission.d.ts.map +1 -1
  192. package/dist/esm/models/operations/updatecommission.js +4 -1
  193. package/dist/esm/models/operations/updatecommission.js.map +1 -1
  194. package/dist/esm/models/operations/updatecustomer.d.ts +17 -5
  195. package/dist/esm/models/operations/updatecustomer.d.ts.map +1 -1
  196. package/dist/esm/models/operations/updatecustomer.js +4 -1
  197. package/dist/esm/models/operations/updatecustomer.js.map +1 -1
  198. package/dist/esm/models/operations/upsertpartnerlink.d.ts +3 -3
  199. package/dist/esm/models/operations/upsertpartnerlink.d.ts.map +1 -1
  200. package/dist/esm/models/operations/upsertpartnerlink.js +1 -1
  201. package/dist/esm/models/operations/upsertpartnerlink.js.map +1 -1
  202. package/dist/esm/sdk/bounties.d.ts +26 -0
  203. package/dist/esm/sdk/bounties.d.ts.map +1 -0
  204. package/dist/esm/sdk/bounties.js +38 -0
  205. package/dist/esm/sdk/bounties.js.map +1 -0
  206. package/dist/esm/sdk/partners.d.ts +7 -0
  207. package/dist/esm/sdk/partners.d.ts.map +1 -1
  208. package/dist/esm/sdk/partners.js +10 -0
  209. package/dist/esm/sdk/partners.js.map +1 -1
  210. package/dist/esm/sdk/sdk.d.ts +3 -3
  211. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  212. package/dist/esm/sdk/sdk.js +4 -4
  213. package/dist/esm/sdk/sdk.js.map +1 -1
  214. package/examples/package-lock.json +1 -1
  215. package/jsr.json +1 -1
  216. package/package.json +1 -1
  217. package/src/funcs/bountiesApproveSubmission.ts +227 -0
  218. package/src/funcs/bountiesListSubmissions.ts +235 -0
  219. package/src/funcs/{workspacesUpdate.ts → bountiesRejectSubmission.ts} +23 -25
  220. package/src/funcs/{workspacesGet.ts → partnersDeactivate.ts} +21 -23
  221. package/src/lib/config.ts +3 -3
  222. package/src/models/components/commissioncreatedevent.ts +100 -8
  223. package/src/models/components/index.ts +0 -1
  224. package/src/models/components/leadcreatedevent.ts +29 -8
  225. package/src/models/components/partnerenrolledevent.ts +959 -0
  226. package/src/models/components/salecreatedevent.ts +29 -8
  227. package/src/models/operations/approvebountysubmission.ts +235 -0
  228. package/src/models/operations/createpartner.ts +415 -0
  229. package/src/models/operations/deactivatepartner.ts +74 -0
  230. package/src/models/operations/getcustomer.ts +21 -6
  231. package/src/models/operations/getcustomers.ts +23 -6
  232. package/src/models/operations/index.ts +4 -2
  233. package/src/models/operations/listbountysubmissions.ts +287 -0
  234. package/src/models/operations/listcommissions.ts +21 -6
  235. package/src/models/operations/listevents.ts +42 -12
  236. package/src/models/operations/listpartners.ts +446 -0
  237. package/src/models/operations/rejectbountysubmission.ts +261 -0
  238. package/src/models/operations/updatecommission.ts +21 -6
  239. package/src/models/operations/updatecustomer.ts +21 -6
  240. package/src/models/operations/upsertpartnerlink.ts +4 -4
  241. package/src/sdk/bounties.ts +63 -0
  242. package/src/sdk/partners.ts +18 -0
  243. package/src/sdk/sdk.ts +6 -6
  244. package/dist/commonjs/funcs/workspacesGet.d.ts +0 -19
  245. package/dist/commonjs/funcs/workspacesGet.d.ts.map +0 -1
  246. package/dist/commonjs/funcs/workspacesGet.js.map +0 -1
  247. package/dist/commonjs/funcs/workspacesUpdate.d.ts +0 -19
  248. package/dist/commonjs/funcs/workspacesUpdate.d.ts.map +0 -1
  249. package/dist/commonjs/funcs/workspacesUpdate.js.map +0 -1
  250. package/dist/commonjs/models/components/workspaceschema.d.ts +0 -222
  251. package/dist/commonjs/models/components/workspaceschema.d.ts.map +0 -1
  252. package/dist/commonjs/models/components/workspaceschema.js +0 -131
  253. package/dist/commonjs/models/components/workspaceschema.js.map +0 -1
  254. package/dist/commonjs/models/operations/getworkspace.d.ts +0 -15
  255. package/dist/commonjs/models/operations/getworkspace.d.ts.map +0 -1
  256. package/dist/commonjs/models/operations/getworkspace.js.map +0 -1
  257. package/dist/commonjs/models/operations/updateworkspace.d.ts +0 -33
  258. package/dist/commonjs/models/operations/updateworkspace.d.ts.map +0 -1
  259. package/dist/commonjs/models/operations/updateworkspace.js +0 -67
  260. package/dist/commonjs/models/operations/updateworkspace.js.map +0 -1
  261. package/dist/commonjs/sdk/workspaces.d.ts +0 -20
  262. package/dist/commonjs/sdk/workspaces.d.ts.map +0 -1
  263. package/dist/commonjs/sdk/workspaces.js +0 -32
  264. package/dist/commonjs/sdk/workspaces.js.map +0 -1
  265. package/dist/esm/funcs/workspacesGet.d.ts +0 -19
  266. package/dist/esm/funcs/workspacesGet.d.ts.map +0 -1
  267. package/dist/esm/funcs/workspacesGet.js.map +0 -1
  268. package/dist/esm/funcs/workspacesUpdate.d.ts +0 -19
  269. package/dist/esm/funcs/workspacesUpdate.d.ts.map +0 -1
  270. package/dist/esm/funcs/workspacesUpdate.js.map +0 -1
  271. package/dist/esm/models/components/workspaceschema.d.ts +0 -222
  272. package/dist/esm/models/components/workspaceschema.d.ts.map +0 -1
  273. package/dist/esm/models/components/workspaceschema.js +0 -92
  274. package/dist/esm/models/components/workspaceschema.js.map +0 -1
  275. package/dist/esm/models/operations/getworkspace.d.ts +0 -15
  276. package/dist/esm/models/operations/getworkspace.d.ts.map +0 -1
  277. package/dist/esm/models/operations/getworkspace.js +0 -12
  278. package/dist/esm/models/operations/getworkspace.js.map +0 -1
  279. package/dist/esm/models/operations/updateworkspace.d.ts +0 -33
  280. package/dist/esm/models/operations/updateworkspace.d.ts.map +0 -1
  281. package/dist/esm/models/operations/updateworkspace.js +0 -29
  282. package/dist/esm/models/operations/updateworkspace.js.map +0 -1
  283. package/dist/esm/sdk/workspaces.d.ts +0 -20
  284. package/dist/esm/sdk/workspaces.d.ts.map +0 -1
  285. package/dist/esm/sdk/workspaces.js +0 -28
  286. package/dist/esm/sdk/workspaces.js.map +0 -1
  287. package/src/models/components/workspaceschema.ts +0 -315
  288. package/src/models/operations/getworkspace.ts +0 -34
  289. package/src/models/operations/updateworkspace.ts +0 -78
  290. package/src/sdk/workspaces.ts +0 -48
@@ -1,315 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { safeParse } from "../../lib/schemas.js";
7
- import { ClosedEnum } from "../../types/enums.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
-
11
- /**
12
- * The plan of the workspace.
13
- */
14
- export const Plan = {
15
- Free: "free",
16
- Pro: "pro",
17
- Business: "business",
18
- BusinessPlus: "business plus",
19
- BusinessExtra: "business extra",
20
- BusinessMax: "business max",
21
- Advanced: "advanced",
22
- Enterprise: "enterprise",
23
- } as const;
24
- /**
25
- * The plan of the workspace.
26
- */
27
- export type Plan = ClosedEnum<typeof Plan>;
28
-
29
- /**
30
- * The role of the authenticated user in the workspace.
31
- */
32
- export const Role = {
33
- Owner: "owner",
34
- Member: "member",
35
- } as const;
36
- /**
37
- * The role of the authenticated user in the workspace.
38
- */
39
- export type Role = ClosedEnum<typeof Role>;
40
-
41
- export type Users = {
42
- /**
43
- * The role of the authenticated user in the workspace.
44
- */
45
- role: Role;
46
- /**
47
- * The ID of the default folder for the user in the workspace.
48
- */
49
- defaultFolderId: string | null;
50
- };
51
-
52
- export type Domains = {
53
- /**
54
- * The domain name.
55
- */
56
- slug: string;
57
- /**
58
- * Whether the domain is the primary domain for the workspace.
59
- */
60
- primary: boolean;
61
- /**
62
- * Whether the domain is verified.
63
- */
64
- verified: boolean;
65
- };
66
-
67
- export type WorkspaceSchema = {
68
- /**
69
- * The unique ID of the workspace.
70
- */
71
- id: string;
72
- /**
73
- * The name of the workspace.
74
- */
75
- name: string;
76
- /**
77
- * The slug of the workspace.
78
- */
79
- slug: string;
80
- /**
81
- * The logo of the workspace.
82
- */
83
- logo: string | null;
84
- /**
85
- * The invite code of the workspace.
86
- */
87
- inviteCode: string | null;
88
- /**
89
- * The plan of the workspace.
90
- */
91
- plan: Plan;
92
- /**
93
- * The tier of the workspace's plan.
94
- */
95
- planTier: number | null;
96
- /**
97
- * The Stripe ID of the workspace.
98
- */
99
- stripeId: string | null;
100
- /**
101
- * The date and time when the billing cycle starts for the workspace.
102
- */
103
- billingCycleStart: number;
104
- /**
105
- * The date and time when the payment failed for the workspace.
106
- */
107
- paymentFailedAt: string | null;
108
- /**
109
- * The Stripe Connect ID of the workspace.
110
- */
111
- stripeConnectId: string | null;
112
- /**
113
- * The total number of links in the workspace.
114
- */
115
- totalLinks: number;
116
- /**
117
- * The usage of the workspace.
118
- */
119
- usage: number;
120
- /**
121
- * The usage limit of the workspace.
122
- */
123
- usageLimit: number;
124
- /**
125
- * The links usage of the workspace.
126
- */
127
- linksUsage: number;
128
- /**
129
- * The links limit of the workspace.
130
- */
131
- linksLimit: number;
132
- /**
133
- * The dollar amount of partner payouts processed in the current billing cycle (in cents).
134
- */
135
- payoutsUsage: number;
136
- /**
137
- * The max dollar amount of partner payouts that can be processed within a billing cycle (in cents).
138
- */
139
- payoutsLimit: number;
140
- /**
141
- * The processing fee (in decimals) for partner payouts. For card payments, an additional 0.03 is added to the fee. Learn more: https://d.to/payouts
142
- */
143
- payoutFee: number;
144
- /**
145
- * The domains limit of the workspace.
146
- */
147
- domainsLimit: number;
148
- /**
149
- * The tags limit of the workspace.
150
- */
151
- tagsLimit: number;
152
- /**
153
- * The folders usage of the workspace.
154
- */
155
- foldersUsage: number;
156
- /**
157
- * The folders limit of the workspace.
158
- */
159
- foldersLimit: number;
160
- /**
161
- * The groups limit of the workspace.
162
- */
163
- groupsLimit: number;
164
- /**
165
- * The weekly network invites limit of the workspace.
166
- */
167
- networkInvitesLimit: number;
168
- /**
169
- * The users limit of the workspace.
170
- */
171
- usersLimit: number;
172
- /**
173
- * The AI usage of the workspace.
174
- */
175
- aiUsage: number;
176
- /**
177
- * The AI limit of the workspace.
178
- */
179
- aiLimit: number;
180
- /**
181
- * Whether the workspace has conversion tracking enabled automatically for new links (d.to/conversions).
182
- */
183
- conversionEnabled: boolean;
184
- /**
185
- * Whether the workspace has claimed a free .link domain. (dub.link/free)
186
- */
187
- dotLinkClaimed: boolean;
188
- /**
189
- * The date and time when the workspace was created.
190
- */
191
- createdAt: string;
192
- /**
193
- * The role of the authenticated user in the workspace.
194
- */
195
- users: Array<Users>;
196
- /**
197
- * The domains of the workspace.
198
- */
199
- domains: Array<Domains>;
200
- /**
201
- * The feature flags of the workspace, indicating which features are enabled.
202
- */
203
- flags?: { [k: string]: boolean } | undefined;
204
- /**
205
- * The miscellaneous key-value store of the workspace.
206
- */
207
- store: { [k: string]: any } | null;
208
- /**
209
- * Specifies hostnames permitted for client-side click tracking.
210
- */
211
- allowedHostnames: Array<string> | null;
212
- ssoEmailDomain: string | null;
213
- ssoEnforcedAt: string | null;
214
- };
215
-
216
- /** @internal */
217
- export const Plan$inboundSchema: z.ZodNativeEnum<typeof Plan> = z.nativeEnum(
218
- Plan,
219
- );
220
-
221
- /** @internal */
222
- export const Role$inboundSchema: z.ZodNativeEnum<typeof Role> = z.nativeEnum(
223
- Role,
224
- );
225
-
226
- /** @internal */
227
- export const Users$inboundSchema: z.ZodType<Users, z.ZodTypeDef, unknown> = z
228
- .object({
229
- role: Role$inboundSchema,
230
- defaultFolderId: z.nullable(z.string()),
231
- });
232
-
233
- export function usersFromJSON(
234
- jsonString: string,
235
- ): SafeParseResult<Users, SDKValidationError> {
236
- return safeParse(
237
- jsonString,
238
- (x) => Users$inboundSchema.parse(JSON.parse(x)),
239
- `Failed to parse 'Users' from JSON`,
240
- );
241
- }
242
-
243
- /** @internal */
244
- export const Domains$inboundSchema: z.ZodType<Domains, z.ZodTypeDef, unknown> =
245
- z.object({
246
- slug: z.string(),
247
- primary: z.boolean().default(false),
248
- verified: z.boolean().default(false),
249
- });
250
-
251
- export function domainsFromJSON(
252
- jsonString: string,
253
- ): SafeParseResult<Domains, SDKValidationError> {
254
- return safeParse(
255
- jsonString,
256
- (x) => Domains$inboundSchema.parse(JSON.parse(x)),
257
- `Failed to parse 'Domains' from JSON`,
258
- );
259
- }
260
-
261
- /** @internal */
262
- export const WorkspaceSchema$inboundSchema: z.ZodType<
263
- WorkspaceSchema,
264
- z.ZodTypeDef,
265
- unknown
266
- > = z.object({
267
- id: z.string(),
268
- name: z.string(),
269
- slug: z.string(),
270
- logo: z.nullable(z.string()).default(null),
271
- inviteCode: z.nullable(z.string()),
272
- plan: Plan$inboundSchema,
273
- planTier: z.nullable(z.number()),
274
- stripeId: z.nullable(z.string()),
275
- billingCycleStart: z.number(),
276
- paymentFailedAt: z.nullable(z.string()),
277
- stripeConnectId: z.nullable(z.string()),
278
- totalLinks: z.number(),
279
- usage: z.number(),
280
- usageLimit: z.number(),
281
- linksUsage: z.number(),
282
- linksLimit: z.number(),
283
- payoutsUsage: z.number(),
284
- payoutsLimit: z.number(),
285
- payoutFee: z.number(),
286
- domainsLimit: z.number(),
287
- tagsLimit: z.number(),
288
- foldersUsage: z.number(),
289
- foldersLimit: z.number(),
290
- groupsLimit: z.number(),
291
- networkInvitesLimit: z.number(),
292
- usersLimit: z.number(),
293
- aiUsage: z.number(),
294
- aiLimit: z.number(),
295
- conversionEnabled: z.boolean(),
296
- dotLinkClaimed: z.boolean(),
297
- createdAt: z.string(),
298
- users: z.array(z.lazy(() => Users$inboundSchema)),
299
- domains: z.array(z.lazy(() => Domains$inboundSchema)),
300
- flags: z.record(z.boolean()).optional(),
301
- store: z.nullable(z.record(z.any())),
302
- allowedHostnames: z.nullable(z.array(z.string())),
303
- ssoEmailDomain: z.nullable(z.string()),
304
- ssoEnforcedAt: z.nullable(z.string()),
305
- });
306
-
307
- export function workspaceSchemaFromJSON(
308
- jsonString: string,
309
- ): SafeParseResult<WorkspaceSchema, SDKValidationError> {
310
- return safeParse(
311
- jsonString,
312
- (x) => WorkspaceSchema$inboundSchema.parse(JSON.parse(x)),
313
- `Failed to parse 'WorkspaceSchema' from JSON`,
314
- );
315
- }
@@ -1,34 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
-
7
- export type GetWorkspaceRequest = {
8
- /**
9
- * The ID or slug of the workspace.
10
- */
11
- idOrSlug: string;
12
- };
13
-
14
- /** @internal */
15
- export type GetWorkspaceRequest$Outbound = {
16
- idOrSlug: string;
17
- };
18
-
19
- /** @internal */
20
- export const GetWorkspaceRequest$outboundSchema: z.ZodType<
21
- GetWorkspaceRequest$Outbound,
22
- z.ZodTypeDef,
23
- GetWorkspaceRequest
24
- > = z.object({
25
- idOrSlug: z.string(),
26
- });
27
-
28
- export function getWorkspaceRequestToJSON(
29
- getWorkspaceRequest: GetWorkspaceRequest,
30
- ): string {
31
- return JSON.stringify(
32
- GetWorkspaceRequest$outboundSchema.parse(getWorkspaceRequest),
33
- );
34
- }
@@ -1,78 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
-
8
- export type UpdateWorkspaceRequestBody = {
9
- name?: string | undefined;
10
- slug?: string | undefined;
11
- logo?: any | null | undefined;
12
- conversionEnabled?: boolean | undefined;
13
- };
14
-
15
- export type UpdateWorkspaceRequest = {
16
- /**
17
- * The ID or slug of the workspace to update.
18
- */
19
- idOrSlug: string;
20
- requestBody?: UpdateWorkspaceRequestBody | undefined;
21
- };
22
-
23
- /** @internal */
24
- export type UpdateWorkspaceRequestBody$Outbound = {
25
- name?: string | undefined;
26
- slug?: string | undefined;
27
- logo?: any | null | undefined;
28
- conversionEnabled?: boolean | undefined;
29
- };
30
-
31
- /** @internal */
32
- export const UpdateWorkspaceRequestBody$outboundSchema: z.ZodType<
33
- UpdateWorkspaceRequestBody$Outbound,
34
- z.ZodTypeDef,
35
- UpdateWorkspaceRequestBody
36
- > = z.object({
37
- name: z.string().optional(),
38
- slug: z.string().optional(),
39
- logo: z.nullable(z.any()).optional(),
40
- conversionEnabled: z.boolean().optional(),
41
- });
42
-
43
- export function updateWorkspaceRequestBodyToJSON(
44
- updateWorkspaceRequestBody: UpdateWorkspaceRequestBody,
45
- ): string {
46
- return JSON.stringify(
47
- UpdateWorkspaceRequestBody$outboundSchema.parse(updateWorkspaceRequestBody),
48
- );
49
- }
50
-
51
- /** @internal */
52
- export type UpdateWorkspaceRequest$Outbound = {
53
- idOrSlug: string;
54
- RequestBody?: UpdateWorkspaceRequestBody$Outbound | undefined;
55
- };
56
-
57
- /** @internal */
58
- export const UpdateWorkspaceRequest$outboundSchema: z.ZodType<
59
- UpdateWorkspaceRequest$Outbound,
60
- z.ZodTypeDef,
61
- UpdateWorkspaceRequest
62
- > = z.object({
63
- idOrSlug: z.string(),
64
- requestBody: z.lazy(() => UpdateWorkspaceRequestBody$outboundSchema)
65
- .optional(),
66
- }).transform((v) => {
67
- return remap$(v, {
68
- requestBody: "RequestBody",
69
- });
70
- });
71
-
72
- export function updateWorkspaceRequestToJSON(
73
- updateWorkspaceRequest: UpdateWorkspaceRequest,
74
- ): string {
75
- return JSON.stringify(
76
- UpdateWorkspaceRequest$outboundSchema.parse(updateWorkspaceRequest),
77
- );
78
- }
@@ -1,48 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { workspacesGet } from "../funcs/workspacesGet.js";
6
- import { workspacesUpdate } from "../funcs/workspacesUpdate.js";
7
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
8
- import * as components from "../models/components/index.js";
9
- import * as operations from "../models/operations/index.js";
10
- import { unwrapAsync } from "../types/fp.js";
11
-
12
- export class Workspaces extends ClientSDK {
13
- /**
14
- * Retrieve a workspace
15
- *
16
- * @remarks
17
- * Retrieve a workspace for the authenticated user.
18
- */
19
- async get(
20
- request: operations.GetWorkspaceRequest,
21
- options?: RequestOptions,
22
- ): Promise<components.WorkspaceSchema> {
23
- return unwrapAsync(workspacesGet(
24
- this,
25
- request,
26
- options,
27
- ));
28
- }
29
-
30
- /**
31
- * Update a workspace
32
- *
33
- * @remarks
34
- * Update a workspace by ID or slug.
35
- */
36
- async update(
37
- idOrSlug: string,
38
- requestBody?: operations.UpdateWorkspaceRequestBody | undefined,
39
- options?: RequestOptions,
40
- ): Promise<components.WorkspaceSchema> {
41
- return unwrapAsync(workspacesUpdate(
42
- this,
43
- idOrSlug,
44
- requestBody,
45
- options,
46
- ));
47
- }
48
- }