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
@@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js";
10
10
  import { RequestOptions } from "../lib/sdks.js";
11
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
12
  import { pathToFunc } from "../lib/url.js";
13
- import * as components from "../models/components/index.js";
14
13
  import { DubError } from "../models/errors/duberror.js";
15
14
  import {
16
15
  ConnectionError,
@@ -27,19 +26,18 @@ import { APICall, APIPromise } from "../types/async.js";
27
26
  import { Result } from "../types/fp.js";
28
27
 
29
28
  /**
30
- * Update a workspace
29
+ * Reject a bounty submission
31
30
  *
32
31
  * @remarks
33
- * Update a workspace by ID or slug.
32
+ * Reject a bounty submission with a specified reason and optional note.
34
33
  */
35
- export function workspacesUpdate(
34
+ export function bountiesRejectSubmission(
36
35
  client: DubCore,
37
- idOrSlug: string,
38
- requestBody?: operations.UpdateWorkspaceRequestBody | undefined,
36
+ request: operations.RejectBountySubmissionRequest,
39
37
  options?: RequestOptions,
40
38
  ): APIPromise<
41
39
  Result<
42
- components.WorkspaceSchema,
40
+ operations.RejectBountySubmissionResponseBody,
43
41
  | errors.BadRequest
44
42
  | errors.Unauthorized
45
43
  | errors.Forbidden
@@ -61,21 +59,19 @@ export function workspacesUpdate(
61
59
  > {
62
60
  return new APIPromise($do(
63
61
  client,
64
- idOrSlug,
65
- requestBody,
62
+ request,
66
63
  options,
67
64
  ));
68
65
  }
69
66
 
70
67
  async function $do(
71
68
  client: DubCore,
72
- idOrSlug: string,
73
- requestBody?: operations.UpdateWorkspaceRequestBody | undefined,
69
+ request: operations.RejectBountySubmissionRequest,
74
70
  options?: RequestOptions,
75
71
  ): Promise<
76
72
  [
77
73
  Result<
78
- components.WorkspaceSchema,
74
+ operations.RejectBountySubmissionResponseBody,
79
75
  | errors.BadRequest
80
76
  | errors.Unauthorized
81
77
  | errors.Forbidden
@@ -97,14 +93,10 @@ async function $do(
97
93
  APICall,
98
94
  ]
99
95
  > {
100
- const input: operations.UpdateWorkspaceRequest = {
101
- idOrSlug: idOrSlug,
102
- requestBody: requestBody,
103
- };
104
-
105
96
  const parsed = safeParse(
106
- input,
107
- (value) => operations.UpdateWorkspaceRequest$outboundSchema.parse(value),
97
+ request,
98
+ (value) =>
99
+ operations.RejectBountySubmissionRequest$outboundSchema.parse(value),
108
100
  "Input validation failed",
109
101
  );
110
102
  if (!parsed.ok) {
@@ -114,13 +106,19 @@ async function $do(
114
106
  const body = encodeJSON("body", payload.RequestBody, { explode: true });
115
107
 
116
108
  const pathParams = {
117
- idOrSlug: encodeSimple("idOrSlug", payload.idOrSlug, {
109
+ bountyId: encodeSimple("bountyId", payload.bountyId, {
110
+ explode: false,
111
+ charEncoding: "percent",
112
+ }),
113
+ submissionId: encodeSimple("submissionId", payload.submissionId, {
118
114
  explode: false,
119
115
  charEncoding: "percent",
120
116
  }),
121
117
  };
122
118
 
123
- const path = pathToFunc("/workspaces/{idOrSlug}")(pathParams);
119
+ const path = pathToFunc(
120
+ "/bounties/{bountyId}/submissions/{submissionId}/reject",
121
+ )(pathParams);
124
122
 
125
123
  const headers = new Headers(compactMap({
126
124
  "Content-Type": "application/json",
@@ -134,7 +132,7 @@ async function $do(
134
132
  const context = {
135
133
  options: client._options,
136
134
  baseURL: options?.serverURL ?? client._baseURL ?? "",
137
- operationID: "updateWorkspace",
135
+ operationID: "rejectBountySubmission",
138
136
  oAuth2Scopes: null,
139
137
 
140
138
  resolvedSecurity: requestSecurity,
@@ -148,7 +146,7 @@ async function $do(
148
146
 
149
147
  const requestRes = client._createRequest(context, {
150
148
  security: requestSecurity,
151
- method: "PATCH",
149
+ method: "POST",
152
150
  baseURL: options?.serverURL,
153
151
  path: path,
154
152
  headers: headers,
@@ -189,7 +187,7 @@ async function $do(
189
187
  };
190
188
 
191
189
  const [result] = await M.match<
192
- components.WorkspaceSchema,
190
+ operations.RejectBountySubmissionResponseBody,
193
191
  | errors.BadRequest
194
192
  | errors.Unauthorized
195
193
  | errors.Forbidden
@@ -208,7 +206,7 @@ async function $do(
208
206
  | UnexpectedClientError
209
207
  | SDKValidationError
210
208
  >(
211
- M.json(200, components.WorkspaceSchema$inboundSchema),
209
+ M.json(200, operations.RejectBountySubmissionResponseBody$inboundSchema),
212
210
  M.jsonErr(400, errors.BadRequest$inboundSchema),
213
211
  M.jsonErr(401, errors.Unauthorized$inboundSchema),
214
212
  M.jsonErr(403, errors.Forbidden$inboundSchema),
@@ -3,14 +3,13 @@
3
3
  */
4
4
 
5
5
  import { DubCore } from "../core.js";
6
- import { encodeSimple } from "../lib/encodings.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
9
9
  import { safeParse } from "../lib/schemas.js";
10
10
  import { RequestOptions } from "../lib/sdks.js";
11
11
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
12
  import { pathToFunc } from "../lib/url.js";
13
- import * as components from "../models/components/index.js";
14
13
  import { DubError } from "../models/errors/duberror.js";
15
14
  import {
16
15
  ConnectionError,
@@ -27,18 +26,18 @@ import { APICall, APIPromise } from "../types/async.js";
27
26
  import { Result } from "../types/fp.js";
28
27
 
29
28
  /**
30
- * Retrieve a workspace
29
+ * Deactivate a partner
31
30
  *
32
31
  * @remarks
33
- * Retrieve a workspace for the authenticated user.
32
+ * This will deactivate the partner from your program and disable all their active links. Their commissions and payouts will remain intact. You can reactivate them later if needed.
34
33
  */
35
- export function workspacesGet(
34
+ export function partnersDeactivate(
36
35
  client: DubCore,
37
- request: operations.GetWorkspaceRequest,
36
+ request?: operations.DeactivatePartnerRequestBody | undefined,
38
37
  options?: RequestOptions,
39
38
  ): APIPromise<
40
39
  Result<
41
- components.WorkspaceSchema,
40
+ operations.DeactivatePartnerResponseBody,
42
41
  | errors.BadRequest
43
42
  | errors.Unauthorized
44
43
  | errors.Forbidden
@@ -67,12 +66,12 @@ export function workspacesGet(
67
66
 
68
67
  async function $do(
69
68
  client: DubCore,
70
- request: operations.GetWorkspaceRequest,
69
+ request?: operations.DeactivatePartnerRequestBody | undefined,
71
70
  options?: RequestOptions,
72
71
  ): Promise<
73
72
  [
74
73
  Result<
75
- components.WorkspaceSchema,
74
+ operations.DeactivatePartnerResponseBody,
76
75
  | errors.BadRequest
77
76
  | errors.Unauthorized
78
77
  | errors.Forbidden
@@ -96,25 +95,24 @@ async function $do(
96
95
  > {
97
96
  const parsed = safeParse(
98
97
  request,
99
- (value) => operations.GetWorkspaceRequest$outboundSchema.parse(value),
98
+ (value) =>
99
+ operations.DeactivatePartnerRequestBody$outboundSchema.optional().parse(
100
+ value,
101
+ ),
100
102
  "Input validation failed",
101
103
  );
102
104
  if (!parsed.ok) {
103
105
  return [parsed, { status: "invalid" }];
104
106
  }
105
107
  const payload = parsed.value;
106
- const body = null;
108
+ const body = payload === undefined
109
+ ? null
110
+ : encodeJSON("body", payload, { explode: true });
107
111
 
108
- const pathParams = {
109
- idOrSlug: encodeSimple("idOrSlug", payload.idOrSlug, {
110
- explode: false,
111
- charEncoding: "percent",
112
- }),
113
- };
114
-
115
- const path = pathToFunc("/workspaces/{idOrSlug}")(pathParams);
112
+ const path = pathToFunc("/partners/deactivate")();
116
113
 
117
114
  const headers = new Headers(compactMap({
115
+ "Content-Type": "application/json",
118
116
  Accept: "application/json",
119
117
  }));
120
118
 
@@ -125,7 +123,7 @@ async function $do(
125
123
  const context = {
126
124
  options: client._options,
127
125
  baseURL: options?.serverURL ?? client._baseURL ?? "",
128
- operationID: "getWorkspace",
126
+ operationID: "deactivatePartner",
129
127
  oAuth2Scopes: null,
130
128
 
131
129
  resolvedSecurity: requestSecurity,
@@ -139,7 +137,7 @@ async function $do(
139
137
 
140
138
  const requestRes = client._createRequest(context, {
141
139
  security: requestSecurity,
142
- method: "GET",
140
+ method: "POST",
143
141
  baseURL: options?.serverURL,
144
142
  path: path,
145
143
  headers: headers,
@@ -180,7 +178,7 @@ async function $do(
180
178
  };
181
179
 
182
180
  const [result] = await M.match<
183
- components.WorkspaceSchema,
181
+ operations.DeactivatePartnerResponseBody,
184
182
  | errors.BadRequest
185
183
  | errors.Unauthorized
186
184
  | errors.Forbidden
@@ -199,7 +197,7 @@ async function $do(
199
197
  | UnexpectedClientError
200
198
  | SDKValidationError
201
199
  >(
202
- M.json(200, components.WorkspaceSchema$inboundSchema),
200
+ M.json(200, operations.DeactivatePartnerResponseBody$inboundSchema),
203
201
  M.jsonErr(400, errors.BadRequest$inboundSchema),
204
202
  M.jsonErr(401, errors.Unauthorized$inboundSchema),
205
203
  M.jsonErr(403, errors.Forbidden$inboundSchema),
package/src/lib/config.ts CHANGED
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "0.0.1",
64
- sdkVersion: "0.70.0",
65
- genVersion: "2.793.2",
66
- userAgent: "speakeasy-sdk/typescript 0.70.0 2.793.2 0.0.1 dub",
64
+ sdkVersion: "0.71.0",
65
+ genVersion: "2.803.3",
66
+ userAgent: "speakeasy-sdk/typescript 0.71.0 2.803.3 0.0.1 dub",
67
67
  } as const;
@@ -77,10 +77,6 @@ export type CommissionCreatedEventCustomer = {
77
77
  * The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`).
78
78
  */
79
79
  id: string;
80
- /**
81
- * Unique identifier for the customer in the client's app.
82
- */
83
- externalId: string;
84
80
  /**
85
81
  * Name of the customer.
86
82
  */
@@ -93,6 +89,14 @@ export type CommissionCreatedEventCustomer = {
93
89
  * Avatar URL of the customer.
94
90
  */
95
91
  avatar?: string | null | undefined;
92
+ /**
93
+ * Unique identifier for the customer in the client's app.
94
+ */
95
+ externalId: string;
96
+ /**
97
+ * The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
98
+ */
99
+ stripeCustomerId?: string | null | undefined;
96
100
  /**
97
101
  * Country of the customer.
98
102
  */
@@ -106,9 +110,36 @@ export type CommissionCreatedEventCustomer = {
106
110
  */
107
111
  saleAmount?: number | null | undefined;
108
112
  /**
109
- * The date the customer was created.
113
+ * The date the customer was created (usually the signup date or trial start date).
110
114
  */
111
115
  createdAt: string;
116
+ /**
117
+ * The date the customer made their first sale. Useful for calculating the time to first sale and LTV.
118
+ */
119
+ firstSaleAt?: string | null | undefined;
120
+ /**
121
+ * The date the customer canceled their subscription. Useful for calculating LTV and churn rate.
122
+ */
123
+ subscriptionCanceledAt?: string | null | undefined;
124
+ };
125
+
126
+ export type CommissionCreatedEventLink = {
127
+ /**
128
+ * The unique ID of the short link.
129
+ */
130
+ id: string;
131
+ /**
132
+ * The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
133
+ */
134
+ shortLink: string;
135
+ /**
136
+ * The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).
137
+ */
138
+ domain: string;
139
+ /**
140
+ * The short link slug. If not provided, a random 7-character slug will be generated.
141
+ */
142
+ key: string;
112
143
  };
113
144
 
114
145
  export type CommissionCreatedEventData = {
@@ -132,6 +163,7 @@ export type CommissionCreatedEventData = {
132
163
  updatedAt: string;
133
164
  partner: CommissionCreatedEventPartner;
134
165
  customer?: CommissionCreatedEventCustomer | null | undefined;
166
+ link: CommissionCreatedEventLink | null;
135
167
  };
136
168
 
137
169
  /**
@@ -255,26 +287,32 @@ export const CommissionCreatedEventCustomer$inboundSchema: z.ZodType<
255
287
  unknown
256
288
  > = z.object({
257
289
  id: z.string(),
258
- externalId: z.string(),
259
290
  name: z.string(),
260
291
  email: z.nullable(z.string()).optional(),
261
292
  avatar: z.nullable(z.string()).optional(),
293
+ externalId: z.string(),
294
+ stripeCustomerId: z.nullable(z.string()).optional(),
262
295
  country: z.nullable(z.string()).optional(),
263
296
  sales: z.nullable(z.number()).optional(),
264
297
  saleAmount: z.nullable(z.number()).optional(),
265
298
  createdAt: z.string(),
299
+ firstSaleAt: z.nullable(z.string()).optional(),
300
+ subscriptionCanceledAt: z.nullable(z.string()).optional(),
266
301
  });
267
302
  /** @internal */
268
303
  export type CommissionCreatedEventCustomer$Outbound = {
269
304
  id: string;
270
- externalId: string;
271
305
  name: string;
272
306
  email?: string | null | undefined;
273
307
  avatar?: string | null | undefined;
308
+ externalId: string;
309
+ stripeCustomerId?: string | null | undefined;
274
310
  country?: string | null | undefined;
275
311
  sales?: number | null | undefined;
276
312
  saleAmount?: number | null | undefined;
277
313
  createdAt: string;
314
+ firstSaleAt?: string | null | undefined;
315
+ subscriptionCanceledAt?: string | null | undefined;
278
316
  };
279
317
 
280
318
  /** @internal */
@@ -284,14 +322,17 @@ export const CommissionCreatedEventCustomer$outboundSchema: z.ZodType<
284
322
  CommissionCreatedEventCustomer
285
323
  > = z.object({
286
324
  id: z.string(),
287
- externalId: z.string(),
288
325
  name: z.string(),
289
326
  email: z.nullable(z.string()).optional(),
290
327
  avatar: z.nullable(z.string()).optional(),
328
+ externalId: z.string(),
329
+ stripeCustomerId: z.nullable(z.string()).optional(),
291
330
  country: z.nullable(z.string()).optional(),
292
331
  sales: z.nullable(z.number()).optional(),
293
332
  saleAmount: z.nullable(z.number()).optional(),
294
333
  createdAt: z.string(),
334
+ firstSaleAt: z.nullable(z.string()).optional(),
335
+ subscriptionCanceledAt: z.nullable(z.string()).optional(),
295
336
  });
296
337
 
297
338
  export function commissionCreatedEventCustomerToJSON(
@@ -313,6 +354,54 @@ export function commissionCreatedEventCustomerFromJSON(
313
354
  );
314
355
  }
315
356
 
357
+ /** @internal */
358
+ export const CommissionCreatedEventLink$inboundSchema: z.ZodType<
359
+ CommissionCreatedEventLink,
360
+ z.ZodTypeDef,
361
+ unknown
362
+ > = z.object({
363
+ id: z.string(),
364
+ shortLink: z.string(),
365
+ domain: z.string(),
366
+ key: z.string(),
367
+ });
368
+ /** @internal */
369
+ export type CommissionCreatedEventLink$Outbound = {
370
+ id: string;
371
+ shortLink: string;
372
+ domain: string;
373
+ key: string;
374
+ };
375
+
376
+ /** @internal */
377
+ export const CommissionCreatedEventLink$outboundSchema: z.ZodType<
378
+ CommissionCreatedEventLink$Outbound,
379
+ z.ZodTypeDef,
380
+ CommissionCreatedEventLink
381
+ > = z.object({
382
+ id: z.string(),
383
+ shortLink: z.string(),
384
+ domain: z.string(),
385
+ key: z.string(),
386
+ });
387
+
388
+ export function commissionCreatedEventLinkToJSON(
389
+ commissionCreatedEventLink: CommissionCreatedEventLink,
390
+ ): string {
391
+ return JSON.stringify(
392
+ CommissionCreatedEventLink$outboundSchema.parse(commissionCreatedEventLink),
393
+ );
394
+ }
395
+ export function commissionCreatedEventLinkFromJSON(
396
+ jsonString: string,
397
+ ): SafeParseResult<CommissionCreatedEventLink, SDKValidationError> {
398
+ return safeParse(
399
+ jsonString,
400
+ (x) => CommissionCreatedEventLink$inboundSchema.parse(JSON.parse(x)),
401
+ `Failed to parse 'CommissionCreatedEventLink' from JSON`,
402
+ );
403
+ }
404
+
316
405
  /** @internal */
317
406
  export const CommissionCreatedEventData$inboundSchema: z.ZodType<
318
407
  CommissionCreatedEventData,
@@ -335,6 +424,7 @@ export const CommissionCreatedEventData$inboundSchema: z.ZodType<
335
424
  customer: z.nullable(
336
425
  z.lazy(() => CommissionCreatedEventCustomer$inboundSchema),
337
426
  ).optional(),
427
+ link: z.nullable(z.lazy(() => CommissionCreatedEventLink$inboundSchema)),
338
428
  });
339
429
  /** @internal */
340
430
  export type CommissionCreatedEventData$Outbound = {
@@ -352,6 +442,7 @@ export type CommissionCreatedEventData$Outbound = {
352
442
  updatedAt: string;
353
443
  partner: CommissionCreatedEventPartner$Outbound;
354
444
  customer?: CommissionCreatedEventCustomer$Outbound | null | undefined;
445
+ link: CommissionCreatedEventLink$Outbound | null;
355
446
  };
356
447
 
357
448
  /** @internal */
@@ -376,6 +467,7 @@ export const CommissionCreatedEventData$outboundSchema: z.ZodType<
376
467
  customer: z.nullable(
377
468
  z.lazy(() => CommissionCreatedEventCustomer$outboundSchema),
378
469
  ).optional(),
470
+ link: z.nullable(z.lazy(() => CommissionCreatedEventLink$outboundSchema)),
379
471
  });
380
472
 
381
473
  export function commissionCreatedEventDataToJSON(
@@ -34,4 +34,3 @@ export * from "./partnerenrolledevent.js";
34
34
  export * from "./salecreatedevent.js";
35
35
  export * from "./security.js";
36
36
  export * from "./webhookevent.js";
37
- export * from "./workspaceschema.js";
@@ -25,10 +25,6 @@ export type Customer = {
25
25
  * The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`).
26
26
  */
27
27
  id: string;
28
- /**
29
- * Unique identifier for the customer in the client's app.
30
- */
31
- externalId: string;
32
28
  /**
33
29
  * Name of the customer.
34
30
  */
@@ -41,6 +37,14 @@ export type Customer = {
41
37
  * Avatar URL of the customer.
42
38
  */
43
39
  avatar?: string | null | undefined;
40
+ /**
41
+ * Unique identifier for the customer in the client's app.
42
+ */
43
+ externalId: string;
44
+ /**
45
+ * The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.
46
+ */
47
+ stripeCustomerId?: string | null | undefined;
44
48
  /**
45
49
  * Country of the customer.
46
50
  */
@@ -54,9 +58,17 @@ export type Customer = {
54
58
  */
55
59
  saleAmount?: number | null | undefined;
56
60
  /**
57
- * The date the customer was created.
61
+ * The date the customer was created (usually the signup date or trial start date).
58
62
  */
59
63
  createdAt: string;
64
+ /**
65
+ * The date the customer made their first sale. Useful for calculating the time to first sale and LTV.
66
+ */
67
+ firstSaleAt?: string | null | undefined;
68
+ /**
69
+ * The date the customer canceled their subscription. Useful for calculating LTV and churn rate.
70
+ */
71
+ subscriptionCanceledAt?: string | null | undefined;
60
72
  };
61
73
 
62
74
  export type LeadCreatedEventClick = {
@@ -314,26 +326,32 @@ export const Customer$inboundSchema: z.ZodType<
314
326
  unknown
315
327
  > = z.object({
316
328
  id: z.string(),
317
- externalId: z.string(),
318
329
  name: z.string(),
319
330
  email: z.nullable(z.string()).optional(),
320
331
  avatar: z.nullable(z.string()).optional(),
332
+ externalId: z.string(),
333
+ stripeCustomerId: z.nullable(z.string()).optional(),
321
334
  country: z.nullable(z.string()).optional(),
322
335
  sales: z.nullable(z.number()).optional(),
323
336
  saleAmount: z.nullable(z.number()).optional(),
324
337
  createdAt: z.string(),
338
+ firstSaleAt: z.nullable(z.string()).optional(),
339
+ subscriptionCanceledAt: z.nullable(z.string()).optional(),
325
340
  });
326
341
  /** @internal */
327
342
  export type Customer$Outbound = {
328
343
  id: string;
329
- externalId: string;
330
344
  name: string;
331
345
  email?: string | null | undefined;
332
346
  avatar?: string | null | undefined;
347
+ externalId: string;
348
+ stripeCustomerId?: string | null | undefined;
333
349
  country?: string | null | undefined;
334
350
  sales?: number | null | undefined;
335
351
  saleAmount?: number | null | undefined;
336
352
  createdAt: string;
353
+ firstSaleAt?: string | null | undefined;
354
+ subscriptionCanceledAt?: string | null | undefined;
337
355
  };
338
356
 
339
357
  /** @internal */
@@ -343,14 +361,17 @@ export const Customer$outboundSchema: z.ZodType<
343
361
  Customer
344
362
  > = z.object({
345
363
  id: z.string(),
346
- externalId: z.string(),
347
364
  name: z.string(),
348
365
  email: z.nullable(z.string()).optional(),
349
366
  avatar: z.nullable(z.string()).optional(),
367
+ externalId: z.string(),
368
+ stripeCustomerId: z.nullable(z.string()).optional(),
350
369
  country: z.nullable(z.string()).optional(),
351
370
  sales: z.nullable(z.number()).optional(),
352
371
  saleAmount: z.nullable(z.number()).optional(),
353
372
  createdAt: z.string(),
373
+ firstSaleAt: z.nullable(z.string()).optional(),
374
+ subscriptionCanceledAt: z.nullable(z.string()).optional(),
354
375
  });
355
376
 
356
377
  export function customerToJSON(customer: Customer): string {