dub 0.46.7 → 0.46.9

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 (334) hide show
  1. package/README.md +0 -2
  2. package/RUNTIMES.md +27 -1
  3. package/dist/commonjs/funcs/analyticsRetrieve.js +29 -29
  4. package/dist/commonjs/funcs/analyticsRetrieve.js.map +1 -1
  5. package/dist/commonjs/funcs/customersCreate.js +4 -4
  6. package/dist/commonjs/funcs/customersCreate.js.map +1 -1
  7. package/dist/commonjs/funcs/customersDelete.js +4 -4
  8. package/dist/commonjs/funcs/customersDelete.js.map +1 -1
  9. package/dist/commonjs/funcs/customersGet.js +4 -4
  10. package/dist/commonjs/funcs/customersGet.js.map +1 -1
  11. package/dist/commonjs/funcs/customersList.js +4 -4
  12. package/dist/commonjs/funcs/customersList.js.map +1 -1
  13. package/dist/commonjs/funcs/customersUpdate.js +4 -4
  14. package/dist/commonjs/funcs/customersUpdate.js.map +1 -1
  15. package/dist/commonjs/funcs/domainsCreate.js +4 -4
  16. package/dist/commonjs/funcs/domainsCreate.js.map +1 -1
  17. package/dist/commonjs/funcs/domainsDelete.js +4 -4
  18. package/dist/commonjs/funcs/domainsDelete.js.map +1 -1
  19. package/dist/commonjs/funcs/domainsList.js +10 -10
  20. package/dist/commonjs/funcs/domainsList.js.map +1 -1
  21. package/dist/commonjs/funcs/domainsUpdate.js +4 -4
  22. package/dist/commonjs/funcs/domainsUpdate.js.map +1 -1
  23. package/dist/commonjs/funcs/embedTokensCreate.js +4 -4
  24. package/dist/commonjs/funcs/embedTokensCreate.js.map +1 -1
  25. package/dist/commonjs/funcs/eventsList.js +32 -32
  26. package/dist/commonjs/funcs/eventsList.js.map +1 -1
  27. package/dist/commonjs/funcs/linksCount.js +13 -13
  28. package/dist/commonjs/funcs/linksCount.js.map +1 -1
  29. package/dist/commonjs/funcs/linksCreate.js +4 -4
  30. package/dist/commonjs/funcs/linksCreate.js.map +1 -1
  31. package/dist/commonjs/funcs/linksCreateMany.js +4 -4
  32. package/dist/commonjs/funcs/linksCreateMany.js.map +1 -1
  33. package/dist/commonjs/funcs/linksDelete.js +4 -4
  34. package/dist/commonjs/funcs/linksDelete.js.map +1 -1
  35. package/dist/commonjs/funcs/linksDeleteMany.js +4 -4
  36. package/dist/commonjs/funcs/linksDeleteMany.js.map +1 -1
  37. package/dist/commonjs/funcs/linksGet.js +8 -8
  38. package/dist/commonjs/funcs/linksGet.js.map +1 -1
  39. package/dist/commonjs/funcs/linksList.js +17 -17
  40. package/dist/commonjs/funcs/linksList.js.map +1 -1
  41. package/dist/commonjs/funcs/linksUpdate.js +4 -4
  42. package/dist/commonjs/funcs/linksUpdate.js.map +1 -1
  43. package/dist/commonjs/funcs/linksUpdateMany.js +4 -4
  44. package/dist/commonjs/funcs/linksUpdateMany.js.map +1 -1
  45. package/dist/commonjs/funcs/linksUpsert.js +4 -4
  46. package/dist/commonjs/funcs/linksUpsert.js.map +1 -1
  47. package/dist/commonjs/funcs/metatagsGet.js +4 -4
  48. package/dist/commonjs/funcs/metatagsGet.js.map +1 -1
  49. package/dist/commonjs/funcs/qrCodesGet.js +4 -4
  50. package/dist/commonjs/funcs/qrCodesGet.js.map +1 -1
  51. package/dist/commonjs/funcs/tagsCreate.js +4 -4
  52. package/dist/commonjs/funcs/tagsCreate.js.map +1 -1
  53. package/dist/commonjs/funcs/tagsDelete.js +4 -4
  54. package/dist/commonjs/funcs/tagsDelete.js.map +1 -1
  55. package/dist/commonjs/funcs/tagsList.js +4 -4
  56. package/dist/commonjs/funcs/tagsList.js.map +1 -1
  57. package/dist/commonjs/funcs/tagsUpdate.js +4 -4
  58. package/dist/commonjs/funcs/tagsUpdate.js.map +1 -1
  59. package/dist/commonjs/funcs/trackLead.js +4 -4
  60. package/dist/commonjs/funcs/trackLead.js.map +1 -1
  61. package/dist/commonjs/funcs/trackSale.js +4 -4
  62. package/dist/commonjs/funcs/trackSale.js.map +1 -1
  63. package/dist/commonjs/funcs/workspacesGet.js +4 -4
  64. package/dist/commonjs/funcs/workspacesGet.js.map +1 -1
  65. package/dist/commonjs/funcs/workspacesUpdate.js +4 -4
  66. package/dist/commonjs/funcs/workspacesUpdate.js.map +1 -1
  67. package/dist/commonjs/hooks/auth.js +1 -2
  68. package/dist/commonjs/hooks/auth.js.map +1 -1
  69. package/dist/commonjs/hooks/base-url.js +1 -2
  70. package/dist/commonjs/hooks/base-url.js.map +1 -1
  71. package/dist/commonjs/lib/config.d.ts +3 -3
  72. package/dist/commonjs/lib/config.js +4 -5
  73. package/dist/commonjs/lib/config.js.map +1 -1
  74. package/dist/commonjs/lib/encodings.js +18 -19
  75. package/dist/commonjs/lib/encodings.js.map +1 -1
  76. package/dist/commonjs/lib/http.js +1 -2
  77. package/dist/commonjs/lib/http.js.map +1 -1
  78. package/dist/commonjs/lib/matchers.js +5 -6
  79. package/dist/commonjs/lib/matchers.js.map +1 -1
  80. package/dist/commonjs/lib/primitives.js +1 -1
  81. package/dist/commonjs/lib/primitives.js.map +1 -1
  82. package/dist/commonjs/lib/retries.js +3 -4
  83. package/dist/commonjs/lib/retries.js.map +1 -1
  84. package/dist/commonjs/lib/sdks.js +15 -16
  85. package/dist/commonjs/lib/sdks.js.map +1 -1
  86. package/dist/commonjs/lib/security.js +2 -2
  87. package/dist/commonjs/lib/security.js.map +1 -1
  88. package/dist/commonjs/lib/url.js +1 -1
  89. package/dist/commonjs/lib/url.js.map +1 -1
  90. package/dist/commonjs/models/components/leadcreatedevent.d.ts +177 -0
  91. package/dist/commonjs/models/components/leadcreatedevent.d.ts.map +1 -1
  92. package/dist/commonjs/models/components/leadcreatedevent.js +161 -1
  93. package/dist/commonjs/models/components/leadcreatedevent.js.map +1 -1
  94. package/dist/commonjs/models/components/leadevent.d.ts +177 -0
  95. package/dist/commonjs/models/components/leadevent.d.ts.map +1 -1
  96. package/dist/commonjs/models/components/leadevent.js +158 -1
  97. package/dist/commonjs/models/components/leadevent.js.map +1 -1
  98. package/dist/commonjs/models/components/salecreatedevent.d.ts +177 -0
  99. package/dist/commonjs/models/components/salecreatedevent.d.ts.map +1 -1
  100. package/dist/commonjs/models/components/salecreatedevent.js +161 -1
  101. package/dist/commonjs/models/components/salecreatedevent.js.map +1 -1
  102. package/dist/commonjs/models/components/saleevent.d.ts +177 -0
  103. package/dist/commonjs/models/components/saleevent.d.ts.map +1 -1
  104. package/dist/commonjs/models/components/saleevent.js +159 -1
  105. package/dist/commonjs/models/components/saleevent.js.map +1 -1
  106. package/dist/commonjs/models/errors/badrequest.js +1 -2
  107. package/dist/commonjs/models/errors/badrequest.js.map +1 -1
  108. package/dist/commonjs/models/errors/conflict.js +1 -2
  109. package/dist/commonjs/models/errors/conflict.js.map +1 -1
  110. package/dist/commonjs/models/errors/forbidden.js +1 -2
  111. package/dist/commonjs/models/errors/forbidden.js.map +1 -1
  112. package/dist/commonjs/models/errors/httpclienterrors.js +2 -2
  113. package/dist/commonjs/models/errors/httpclienterrors.js.map +1 -1
  114. package/dist/commonjs/models/errors/internalservererror.js +1 -2
  115. package/dist/commonjs/models/errors/internalservererror.js.map +1 -1
  116. package/dist/commonjs/models/errors/inviteexpired.js +1 -2
  117. package/dist/commonjs/models/errors/inviteexpired.js.map +1 -1
  118. package/dist/commonjs/models/errors/notfound.js +1 -2
  119. package/dist/commonjs/models/errors/notfound.js.map +1 -1
  120. package/dist/commonjs/models/errors/ratelimitexceeded.js +1 -2
  121. package/dist/commonjs/models/errors/ratelimitexceeded.js.map +1 -1
  122. package/dist/commonjs/models/errors/unauthorized.js +1 -2
  123. package/dist/commonjs/models/errors/unauthorized.js.map +1 -1
  124. package/dist/commonjs/models/errors/unprocessableentity.js +1 -2
  125. package/dist/commonjs/models/errors/unprocessableentity.js.map +1 -1
  126. package/dist/commonjs/models/operations/createcustomer.d.ts +178 -0
  127. package/dist/commonjs/models/operations/createcustomer.d.ts.map +1 -1
  128. package/dist/commonjs/models/operations/createcustomer.js +158 -1
  129. package/dist/commonjs/models/operations/createcustomer.js.map +1 -1
  130. package/dist/commonjs/models/operations/getcustomer.d.ts +178 -0
  131. package/dist/commonjs/models/operations/getcustomer.d.ts.map +1 -1
  132. package/dist/commonjs/models/operations/getcustomer.js +158 -1
  133. package/dist/commonjs/models/operations/getcustomer.js.map +1 -1
  134. package/dist/commonjs/models/operations/getcustomers.d.ts +178 -0
  135. package/dist/commonjs/models/operations/getcustomers.d.ts.map +1 -1
  136. package/dist/commonjs/models/operations/getcustomers.js +155 -1
  137. package/dist/commonjs/models/operations/getcustomers.js.map +1 -1
  138. package/dist/commonjs/models/operations/index.d.ts +0 -1
  139. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  140. package/dist/commonjs/models/operations/index.js +0 -1
  141. package/dist/commonjs/models/operations/index.js.map +1 -1
  142. package/dist/commonjs/models/operations/updatecustomer.d.ts +178 -0
  143. package/dist/commonjs/models/operations/updatecustomer.d.ts.map +1 -1
  144. package/dist/commonjs/models/operations/updatecustomer.js +158 -1
  145. package/dist/commonjs/models/operations/updatecustomer.js.map +1 -1
  146. package/dist/commonjs/sdk/sdk.js +11 -22
  147. package/dist/commonjs/sdk/sdk.js.map +1 -1
  148. package/dist/commonjs/sdk/track.d.ts +0 -9
  149. package/dist/commonjs/sdk/track.d.ts.map +1 -1
  150. package/dist/commonjs/sdk/track.js +0 -12
  151. package/dist/commonjs/sdk/track.js.map +1 -1
  152. package/dist/esm/funcs/analyticsRetrieve.js +29 -29
  153. package/dist/esm/funcs/analyticsRetrieve.js.map +1 -1
  154. package/dist/esm/funcs/customersCreate.js +4 -4
  155. package/dist/esm/funcs/customersCreate.js.map +1 -1
  156. package/dist/esm/funcs/customersDelete.js +4 -4
  157. package/dist/esm/funcs/customersDelete.js.map +1 -1
  158. package/dist/esm/funcs/customersGet.js +4 -4
  159. package/dist/esm/funcs/customersGet.js.map +1 -1
  160. package/dist/esm/funcs/customersList.js +4 -4
  161. package/dist/esm/funcs/customersList.js.map +1 -1
  162. package/dist/esm/funcs/customersUpdate.js +4 -4
  163. package/dist/esm/funcs/customersUpdate.js.map +1 -1
  164. package/dist/esm/funcs/domainsCreate.js +4 -4
  165. package/dist/esm/funcs/domainsCreate.js.map +1 -1
  166. package/dist/esm/funcs/domainsDelete.js +4 -4
  167. package/dist/esm/funcs/domainsDelete.js.map +1 -1
  168. package/dist/esm/funcs/domainsList.js +10 -10
  169. package/dist/esm/funcs/domainsList.js.map +1 -1
  170. package/dist/esm/funcs/domainsUpdate.js +4 -4
  171. package/dist/esm/funcs/domainsUpdate.js.map +1 -1
  172. package/dist/esm/funcs/embedTokensCreate.js +4 -4
  173. package/dist/esm/funcs/embedTokensCreate.js.map +1 -1
  174. package/dist/esm/funcs/eventsList.js +32 -32
  175. package/dist/esm/funcs/eventsList.js.map +1 -1
  176. package/dist/esm/funcs/linksCount.js +13 -13
  177. package/dist/esm/funcs/linksCount.js.map +1 -1
  178. package/dist/esm/funcs/linksCreate.js +4 -4
  179. package/dist/esm/funcs/linksCreate.js.map +1 -1
  180. package/dist/esm/funcs/linksCreateMany.js +4 -4
  181. package/dist/esm/funcs/linksCreateMany.js.map +1 -1
  182. package/dist/esm/funcs/linksDelete.js +4 -4
  183. package/dist/esm/funcs/linksDelete.js.map +1 -1
  184. package/dist/esm/funcs/linksDeleteMany.js +4 -4
  185. package/dist/esm/funcs/linksDeleteMany.js.map +1 -1
  186. package/dist/esm/funcs/linksGet.js +8 -8
  187. package/dist/esm/funcs/linksGet.js.map +1 -1
  188. package/dist/esm/funcs/linksList.js +17 -17
  189. package/dist/esm/funcs/linksList.js.map +1 -1
  190. package/dist/esm/funcs/linksUpdate.js +4 -4
  191. package/dist/esm/funcs/linksUpdate.js.map +1 -1
  192. package/dist/esm/funcs/linksUpdateMany.js +4 -4
  193. package/dist/esm/funcs/linksUpdateMany.js.map +1 -1
  194. package/dist/esm/funcs/linksUpsert.js +4 -4
  195. package/dist/esm/funcs/linksUpsert.js.map +1 -1
  196. package/dist/esm/funcs/metatagsGet.js +4 -4
  197. package/dist/esm/funcs/metatagsGet.js.map +1 -1
  198. package/dist/esm/funcs/qrCodesGet.js +4 -4
  199. package/dist/esm/funcs/qrCodesGet.js.map +1 -1
  200. package/dist/esm/funcs/tagsCreate.js +4 -4
  201. package/dist/esm/funcs/tagsCreate.js.map +1 -1
  202. package/dist/esm/funcs/tagsDelete.js +4 -4
  203. package/dist/esm/funcs/tagsDelete.js.map +1 -1
  204. package/dist/esm/funcs/tagsList.js +4 -4
  205. package/dist/esm/funcs/tagsList.js.map +1 -1
  206. package/dist/esm/funcs/tagsUpdate.js +4 -4
  207. package/dist/esm/funcs/tagsUpdate.js.map +1 -1
  208. package/dist/esm/funcs/trackLead.js +4 -4
  209. package/dist/esm/funcs/trackLead.js.map +1 -1
  210. package/dist/esm/funcs/trackSale.js +4 -4
  211. package/dist/esm/funcs/trackSale.js.map +1 -1
  212. package/dist/esm/funcs/workspacesGet.js +4 -4
  213. package/dist/esm/funcs/workspacesGet.js.map +1 -1
  214. package/dist/esm/funcs/workspacesUpdate.js +4 -4
  215. package/dist/esm/funcs/workspacesUpdate.js.map +1 -1
  216. package/dist/esm/hooks/auth.js +1 -2
  217. package/dist/esm/hooks/auth.js.map +1 -1
  218. package/dist/esm/hooks/base-url.js +1 -2
  219. package/dist/esm/hooks/base-url.js.map +1 -1
  220. package/dist/esm/lib/config.d.ts +3 -3
  221. package/dist/esm/lib/config.js +4 -5
  222. package/dist/esm/lib/config.js.map +1 -1
  223. package/dist/esm/lib/encodings.js +18 -19
  224. package/dist/esm/lib/encodings.js.map +1 -1
  225. package/dist/esm/lib/http.js +1 -2
  226. package/dist/esm/lib/http.js.map +1 -1
  227. package/dist/esm/lib/matchers.js +5 -6
  228. package/dist/esm/lib/matchers.js.map +1 -1
  229. package/dist/esm/lib/primitives.js +1 -1
  230. package/dist/esm/lib/primitives.js.map +1 -1
  231. package/dist/esm/lib/retries.js +3 -4
  232. package/dist/esm/lib/retries.js.map +1 -1
  233. package/dist/esm/lib/sdks.js +15 -16
  234. package/dist/esm/lib/sdks.js.map +1 -1
  235. package/dist/esm/lib/security.js +2 -2
  236. package/dist/esm/lib/security.js.map +1 -1
  237. package/dist/esm/lib/url.js +1 -1
  238. package/dist/esm/lib/url.js.map +1 -1
  239. package/dist/esm/models/components/leadcreatedevent.d.ts +177 -0
  240. package/dist/esm/models/components/leadcreatedevent.d.ts.map +1 -1
  241. package/dist/esm/models/components/leadcreatedevent.js +153 -0
  242. package/dist/esm/models/components/leadcreatedevent.js.map +1 -1
  243. package/dist/esm/models/components/leadevent.d.ts +177 -0
  244. package/dist/esm/models/components/leadevent.d.ts.map +1 -1
  245. package/dist/esm/models/components/leadevent.js +150 -0
  246. package/dist/esm/models/components/leadevent.js.map +1 -1
  247. package/dist/esm/models/components/salecreatedevent.d.ts +177 -0
  248. package/dist/esm/models/components/salecreatedevent.d.ts.map +1 -1
  249. package/dist/esm/models/components/salecreatedevent.js +153 -0
  250. package/dist/esm/models/components/salecreatedevent.js.map +1 -1
  251. package/dist/esm/models/components/saleevent.d.ts +177 -0
  252. package/dist/esm/models/components/saleevent.d.ts.map +1 -1
  253. package/dist/esm/models/components/saleevent.js +151 -0
  254. package/dist/esm/models/components/saleevent.js.map +1 -1
  255. package/dist/esm/models/errors/badrequest.js +1 -2
  256. package/dist/esm/models/errors/badrequest.js.map +1 -1
  257. package/dist/esm/models/errors/conflict.js +1 -2
  258. package/dist/esm/models/errors/conflict.js.map +1 -1
  259. package/dist/esm/models/errors/forbidden.js +1 -2
  260. package/dist/esm/models/errors/forbidden.js.map +1 -1
  261. package/dist/esm/models/errors/httpclienterrors.js +2 -2
  262. package/dist/esm/models/errors/httpclienterrors.js.map +1 -1
  263. package/dist/esm/models/errors/internalservererror.js +1 -2
  264. package/dist/esm/models/errors/internalservererror.js.map +1 -1
  265. package/dist/esm/models/errors/inviteexpired.js +1 -2
  266. package/dist/esm/models/errors/inviteexpired.js.map +1 -1
  267. package/dist/esm/models/errors/notfound.js +1 -2
  268. package/dist/esm/models/errors/notfound.js.map +1 -1
  269. package/dist/esm/models/errors/ratelimitexceeded.js +1 -2
  270. package/dist/esm/models/errors/ratelimitexceeded.js.map +1 -1
  271. package/dist/esm/models/errors/unauthorized.js +1 -2
  272. package/dist/esm/models/errors/unauthorized.js.map +1 -1
  273. package/dist/esm/models/errors/unprocessableentity.js +1 -2
  274. package/dist/esm/models/errors/unprocessableentity.js.map +1 -1
  275. package/dist/esm/models/operations/createcustomer.d.ts +178 -0
  276. package/dist/esm/models/operations/createcustomer.d.ts.map +1 -1
  277. package/dist/esm/models/operations/createcustomer.js +151 -0
  278. package/dist/esm/models/operations/createcustomer.js.map +1 -1
  279. package/dist/esm/models/operations/getcustomer.d.ts +178 -0
  280. package/dist/esm/models/operations/getcustomer.d.ts.map +1 -1
  281. package/dist/esm/models/operations/getcustomer.js +151 -0
  282. package/dist/esm/models/operations/getcustomer.js.map +1 -1
  283. package/dist/esm/models/operations/getcustomers.d.ts +178 -0
  284. package/dist/esm/models/operations/getcustomers.d.ts.map +1 -1
  285. package/dist/esm/models/operations/getcustomers.js +148 -0
  286. package/dist/esm/models/operations/getcustomers.js.map +1 -1
  287. package/dist/esm/models/operations/index.d.ts +0 -1
  288. package/dist/esm/models/operations/index.d.ts.map +1 -1
  289. package/dist/esm/models/operations/index.js +0 -1
  290. package/dist/esm/models/operations/index.js.map +1 -1
  291. package/dist/esm/models/operations/updatecustomer.d.ts +178 -0
  292. package/dist/esm/models/operations/updatecustomer.d.ts.map +1 -1
  293. package/dist/esm/models/operations/updatecustomer.js +151 -0
  294. package/dist/esm/models/operations/updatecustomer.js.map +1 -1
  295. package/dist/esm/sdk/sdk.js +11 -22
  296. package/dist/esm/sdk/sdk.js.map +1 -1
  297. package/dist/esm/sdk/track.d.ts +0 -9
  298. package/dist/esm/sdk/track.d.ts.map +1 -1
  299. package/dist/esm/sdk/track.js +0 -12
  300. package/dist/esm/sdk/track.js.map +1 -1
  301. package/docs/sdks/track/README.md +0 -84
  302. package/package.json +1 -1
  303. package/src/funcs/domainsList.ts +2 -2
  304. package/src/funcs/linksList.ts +2 -2
  305. package/src/lib/config.ts +3 -3
  306. package/src/lib/security.ts +1 -1
  307. package/src/models/components/leadcreatedevent.ts +322 -0
  308. package/src/models/components/leadevent.ts +302 -0
  309. package/src/models/components/salecreatedevent.ts +322 -0
  310. package/src/models/components/saleevent.ts +318 -0
  311. package/src/models/operations/createcustomer.ts +319 -0
  312. package/src/models/operations/getcustomer.ts +317 -0
  313. package/src/models/operations/getcustomers.ts +293 -0
  314. package/src/models/operations/index.ts +0 -1
  315. package/src/models/operations/updatecustomer.ts +319 -0
  316. package/src/sdk/track.ts +0 -20
  317. package/dist/commonjs/funcs/trackCustomer.d.ts +0 -18
  318. package/dist/commonjs/funcs/trackCustomer.d.ts.map +0 -1
  319. package/dist/commonjs/funcs/trackCustomer.js +0 -117
  320. package/dist/commonjs/funcs/trackCustomer.js.map +0 -1
  321. package/dist/commonjs/models/operations/trackcustomer.d.ts +0 -81
  322. package/dist/commonjs/models/operations/trackcustomer.d.ts.map +0 -1
  323. package/dist/commonjs/models/operations/trackcustomer.js +0 -98
  324. package/dist/commonjs/models/operations/trackcustomer.js.map +0 -1
  325. package/dist/esm/funcs/trackCustomer.d.ts +0 -18
  326. package/dist/esm/funcs/trackCustomer.d.ts.map +0 -1
  327. package/dist/esm/funcs/trackCustomer.js +0 -90
  328. package/dist/esm/funcs/trackCustomer.js.map +0 -1
  329. package/dist/esm/models/operations/trackcustomer.d.ts +0 -81
  330. package/dist/esm/models/operations/trackcustomer.d.ts.map +0 -1
  331. package/dist/esm/models/operations/trackcustomer.js +0 -68
  332. package/dist/esm/models/operations/trackcustomer.js.map +0 -1
  333. package/src/funcs/trackCustomer.ts +0 -175
  334. package/src/models/operations/trackcustomer.ts +0 -163
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
7
8
  import { Result as SafeParseResult } from "../../types/fp.js";
8
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
10
 
@@ -26,6 +27,58 @@ export type CreateCustomerRequestBody = {
26
27
  externalId: string;
27
28
  };
28
29
 
30
+ export type CreateCustomerLink = {
31
+ /**
32
+ * The unique ID of the short link.
33
+ */
34
+ id: string;
35
+ /**
36
+ * 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).
37
+ */
38
+ domain: string;
39
+ /**
40
+ * The short link slug. If not provided, a random 7-character slug will be generated.
41
+ */
42
+ key: string;
43
+ /**
44
+ * The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
45
+ */
46
+ shortLink: string;
47
+ /**
48
+ * The ID of the program the short link is associated with.
49
+ */
50
+ programId: string | null;
51
+ };
52
+
53
+ export type CreateCustomerPartner = {
54
+ id: string;
55
+ name: string;
56
+ email: string;
57
+ image?: string | null | undefined;
58
+ };
59
+
60
+ export const CreateCustomerType = {
61
+ Percentage: "percentage",
62
+ Flat: "flat",
63
+ } as const;
64
+ export type CreateCustomerType = ClosedEnum<typeof CreateCustomerType>;
65
+
66
+ export const CreateCustomerInterval = {
67
+ Month: "month",
68
+ Year: "year",
69
+ } as const;
70
+ export type CreateCustomerInterval = ClosedEnum<typeof CreateCustomerInterval>;
71
+
72
+ export type CreateCustomerDiscount = {
73
+ id: string;
74
+ couponId: string | null;
75
+ couponTestId: string | null;
76
+ amount: number;
77
+ type: CreateCustomerType;
78
+ duration: number | null;
79
+ interval: CreateCustomerInterval | null;
80
+ };
81
+
29
82
  /**
30
83
  * The customer was created.
31
84
  */
@@ -50,10 +103,17 @@ export type CreateCustomerResponseBody = {
50
103
  * Avatar URL of the customer.
51
104
  */
52
105
  avatar?: string | null | undefined;
106
+ /**
107
+ * Country of the customer.
108
+ */
109
+ country?: string | null | undefined;
53
110
  /**
54
111
  * The date the customer was created.
55
112
  */
56
113
  createdAt: string;
114
+ link?: CreateCustomerLink | null | undefined;
115
+ partner?: CreateCustomerPartner | null | undefined;
116
+ discount?: CreateCustomerDiscount | null | undefined;
57
117
  };
58
118
 
59
119
  /** @internal */
@@ -119,6 +179,249 @@ export function createCustomerRequestBodyFromJSON(
119
179
  );
120
180
  }
121
181
 
182
+ /** @internal */
183
+ export const CreateCustomerLink$inboundSchema: z.ZodType<
184
+ CreateCustomerLink,
185
+ z.ZodTypeDef,
186
+ unknown
187
+ > = z.object({
188
+ id: z.string(),
189
+ domain: z.string(),
190
+ key: z.string(),
191
+ shortLink: z.string(),
192
+ programId: z.nullable(z.string()),
193
+ });
194
+
195
+ /** @internal */
196
+ export type CreateCustomerLink$Outbound = {
197
+ id: string;
198
+ domain: string;
199
+ key: string;
200
+ shortLink: string;
201
+ programId: string | null;
202
+ };
203
+
204
+ /** @internal */
205
+ export const CreateCustomerLink$outboundSchema: z.ZodType<
206
+ CreateCustomerLink$Outbound,
207
+ z.ZodTypeDef,
208
+ CreateCustomerLink
209
+ > = z.object({
210
+ id: z.string(),
211
+ domain: z.string(),
212
+ key: z.string(),
213
+ shortLink: z.string(),
214
+ programId: z.nullable(z.string()),
215
+ });
216
+
217
+ /**
218
+ * @internal
219
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
220
+ */
221
+ export namespace CreateCustomerLink$ {
222
+ /** @deprecated use `CreateCustomerLink$inboundSchema` instead. */
223
+ export const inboundSchema = CreateCustomerLink$inboundSchema;
224
+ /** @deprecated use `CreateCustomerLink$outboundSchema` instead. */
225
+ export const outboundSchema = CreateCustomerLink$outboundSchema;
226
+ /** @deprecated use `CreateCustomerLink$Outbound` instead. */
227
+ export type Outbound = CreateCustomerLink$Outbound;
228
+ }
229
+
230
+ export function createCustomerLinkToJSON(
231
+ createCustomerLink: CreateCustomerLink,
232
+ ): string {
233
+ return JSON.stringify(
234
+ CreateCustomerLink$outboundSchema.parse(createCustomerLink),
235
+ );
236
+ }
237
+
238
+ export function createCustomerLinkFromJSON(
239
+ jsonString: string,
240
+ ): SafeParseResult<CreateCustomerLink, SDKValidationError> {
241
+ return safeParse(
242
+ jsonString,
243
+ (x) => CreateCustomerLink$inboundSchema.parse(JSON.parse(x)),
244
+ `Failed to parse 'CreateCustomerLink' from JSON`,
245
+ );
246
+ }
247
+
248
+ /** @internal */
249
+ export const CreateCustomerPartner$inboundSchema: z.ZodType<
250
+ CreateCustomerPartner,
251
+ z.ZodTypeDef,
252
+ unknown
253
+ > = z.object({
254
+ id: z.string(),
255
+ name: z.string(),
256
+ email: z.string(),
257
+ image: z.nullable(z.string()).optional(),
258
+ });
259
+
260
+ /** @internal */
261
+ export type CreateCustomerPartner$Outbound = {
262
+ id: string;
263
+ name: string;
264
+ email: string;
265
+ image?: string | null | undefined;
266
+ };
267
+
268
+ /** @internal */
269
+ export const CreateCustomerPartner$outboundSchema: z.ZodType<
270
+ CreateCustomerPartner$Outbound,
271
+ z.ZodTypeDef,
272
+ CreateCustomerPartner
273
+ > = z.object({
274
+ id: z.string(),
275
+ name: z.string(),
276
+ email: z.string(),
277
+ image: z.nullable(z.string()).optional(),
278
+ });
279
+
280
+ /**
281
+ * @internal
282
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
283
+ */
284
+ export namespace CreateCustomerPartner$ {
285
+ /** @deprecated use `CreateCustomerPartner$inboundSchema` instead. */
286
+ export const inboundSchema = CreateCustomerPartner$inboundSchema;
287
+ /** @deprecated use `CreateCustomerPartner$outboundSchema` instead. */
288
+ export const outboundSchema = CreateCustomerPartner$outboundSchema;
289
+ /** @deprecated use `CreateCustomerPartner$Outbound` instead. */
290
+ export type Outbound = CreateCustomerPartner$Outbound;
291
+ }
292
+
293
+ export function createCustomerPartnerToJSON(
294
+ createCustomerPartner: CreateCustomerPartner,
295
+ ): string {
296
+ return JSON.stringify(
297
+ CreateCustomerPartner$outboundSchema.parse(createCustomerPartner),
298
+ );
299
+ }
300
+
301
+ export function createCustomerPartnerFromJSON(
302
+ jsonString: string,
303
+ ): SafeParseResult<CreateCustomerPartner, SDKValidationError> {
304
+ return safeParse(
305
+ jsonString,
306
+ (x) => CreateCustomerPartner$inboundSchema.parse(JSON.parse(x)),
307
+ `Failed to parse 'CreateCustomerPartner' from JSON`,
308
+ );
309
+ }
310
+
311
+ /** @internal */
312
+ export const CreateCustomerType$inboundSchema: z.ZodNativeEnum<
313
+ typeof CreateCustomerType
314
+ > = z.nativeEnum(CreateCustomerType);
315
+
316
+ /** @internal */
317
+ export const CreateCustomerType$outboundSchema: z.ZodNativeEnum<
318
+ typeof CreateCustomerType
319
+ > = CreateCustomerType$inboundSchema;
320
+
321
+ /**
322
+ * @internal
323
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
324
+ */
325
+ export namespace CreateCustomerType$ {
326
+ /** @deprecated use `CreateCustomerType$inboundSchema` instead. */
327
+ export const inboundSchema = CreateCustomerType$inboundSchema;
328
+ /** @deprecated use `CreateCustomerType$outboundSchema` instead. */
329
+ export const outboundSchema = CreateCustomerType$outboundSchema;
330
+ }
331
+
332
+ /** @internal */
333
+ export const CreateCustomerInterval$inboundSchema: z.ZodNativeEnum<
334
+ typeof CreateCustomerInterval
335
+ > = z.nativeEnum(CreateCustomerInterval);
336
+
337
+ /** @internal */
338
+ export const CreateCustomerInterval$outboundSchema: z.ZodNativeEnum<
339
+ typeof CreateCustomerInterval
340
+ > = CreateCustomerInterval$inboundSchema;
341
+
342
+ /**
343
+ * @internal
344
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
345
+ */
346
+ export namespace CreateCustomerInterval$ {
347
+ /** @deprecated use `CreateCustomerInterval$inboundSchema` instead. */
348
+ export const inboundSchema = CreateCustomerInterval$inboundSchema;
349
+ /** @deprecated use `CreateCustomerInterval$outboundSchema` instead. */
350
+ export const outboundSchema = CreateCustomerInterval$outboundSchema;
351
+ }
352
+
353
+ /** @internal */
354
+ export const CreateCustomerDiscount$inboundSchema: z.ZodType<
355
+ CreateCustomerDiscount,
356
+ z.ZodTypeDef,
357
+ unknown
358
+ > = z.object({
359
+ id: z.string(),
360
+ couponId: z.nullable(z.string()),
361
+ couponTestId: z.nullable(z.string()),
362
+ amount: z.number(),
363
+ type: CreateCustomerType$inboundSchema,
364
+ duration: z.nullable(z.number()),
365
+ interval: z.nullable(CreateCustomerInterval$inboundSchema),
366
+ });
367
+
368
+ /** @internal */
369
+ export type CreateCustomerDiscount$Outbound = {
370
+ id: string;
371
+ couponId: string | null;
372
+ couponTestId: string | null;
373
+ amount: number;
374
+ type: string;
375
+ duration: number | null;
376
+ interval: string | null;
377
+ };
378
+
379
+ /** @internal */
380
+ export const CreateCustomerDiscount$outboundSchema: z.ZodType<
381
+ CreateCustomerDiscount$Outbound,
382
+ z.ZodTypeDef,
383
+ CreateCustomerDiscount
384
+ > = z.object({
385
+ id: z.string(),
386
+ couponId: z.nullable(z.string()),
387
+ couponTestId: z.nullable(z.string()),
388
+ amount: z.number(),
389
+ type: CreateCustomerType$outboundSchema,
390
+ duration: z.nullable(z.number()),
391
+ interval: z.nullable(CreateCustomerInterval$outboundSchema),
392
+ });
393
+
394
+ /**
395
+ * @internal
396
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
397
+ */
398
+ export namespace CreateCustomerDiscount$ {
399
+ /** @deprecated use `CreateCustomerDiscount$inboundSchema` instead. */
400
+ export const inboundSchema = CreateCustomerDiscount$inboundSchema;
401
+ /** @deprecated use `CreateCustomerDiscount$outboundSchema` instead. */
402
+ export const outboundSchema = CreateCustomerDiscount$outboundSchema;
403
+ /** @deprecated use `CreateCustomerDiscount$Outbound` instead. */
404
+ export type Outbound = CreateCustomerDiscount$Outbound;
405
+ }
406
+
407
+ export function createCustomerDiscountToJSON(
408
+ createCustomerDiscount: CreateCustomerDiscount,
409
+ ): string {
410
+ return JSON.stringify(
411
+ CreateCustomerDiscount$outboundSchema.parse(createCustomerDiscount),
412
+ );
413
+ }
414
+
415
+ export function createCustomerDiscountFromJSON(
416
+ jsonString: string,
417
+ ): SafeParseResult<CreateCustomerDiscount, SDKValidationError> {
418
+ return safeParse(
419
+ jsonString,
420
+ (x) => CreateCustomerDiscount$inboundSchema.parse(JSON.parse(x)),
421
+ `Failed to parse 'CreateCustomerDiscount' from JSON`,
422
+ );
423
+ }
424
+
122
425
  /** @internal */
123
426
  export const CreateCustomerResponseBody$inboundSchema: z.ZodType<
124
427
  CreateCustomerResponseBody,
@@ -130,7 +433,13 @@ export const CreateCustomerResponseBody$inboundSchema: z.ZodType<
130
433
  name: z.string(),
131
434
  email: z.nullable(z.string()).optional(),
132
435
  avatar: z.nullable(z.string()).optional(),
436
+ country: z.nullable(z.string()).optional(),
133
437
  createdAt: z.string(),
438
+ link: z.nullable(z.lazy(() => CreateCustomerLink$inboundSchema)).optional(),
439
+ partner: z.nullable(z.lazy(() => CreateCustomerPartner$inboundSchema))
440
+ .optional(),
441
+ discount: z.nullable(z.lazy(() => CreateCustomerDiscount$inboundSchema))
442
+ .optional(),
134
443
  });
135
444
 
136
445
  /** @internal */
@@ -140,7 +449,11 @@ export type CreateCustomerResponseBody$Outbound = {
140
449
  name: string;
141
450
  email?: string | null | undefined;
142
451
  avatar?: string | null | undefined;
452
+ country?: string | null | undefined;
143
453
  createdAt: string;
454
+ link?: CreateCustomerLink$Outbound | null | undefined;
455
+ partner?: CreateCustomerPartner$Outbound | null | undefined;
456
+ discount?: CreateCustomerDiscount$Outbound | null | undefined;
144
457
  };
145
458
 
146
459
  /** @internal */
@@ -154,7 +467,13 @@ export const CreateCustomerResponseBody$outboundSchema: z.ZodType<
154
467
  name: z.string(),
155
468
  email: z.nullable(z.string()).optional(),
156
469
  avatar: z.nullable(z.string()).optional(),
470
+ country: z.nullable(z.string()).optional(),
157
471
  createdAt: z.string(),
472
+ link: z.nullable(z.lazy(() => CreateCustomerLink$outboundSchema)).optional(),
473
+ partner: z.nullable(z.lazy(() => CreateCustomerPartner$outboundSchema))
474
+ .optional(),
475
+ discount: z.nullable(z.lazy(() => CreateCustomerDiscount$outboundSchema))
476
+ .optional(),
158
477
  });
159
478
 
160
479
  /**