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
@@ -432,6 +432,58 @@ export type LeadEventLink = {
432
432
  programId: string | null;
433
433
  };
434
434
 
435
+ export type LeadEventCustomerLink = {
436
+ /**
437
+ * The unique ID of the short link.
438
+ */
439
+ id: string;
440
+ /**
441
+ * 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).
442
+ */
443
+ domain: string;
444
+ /**
445
+ * The short link slug. If not provided, a random 7-character slug will be generated.
446
+ */
447
+ key: string;
448
+ /**
449
+ * The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
450
+ */
451
+ shortLink: string;
452
+ /**
453
+ * The ID of the program the short link is associated with.
454
+ */
455
+ programId: string | null;
456
+ };
457
+
458
+ export type Partner = {
459
+ id: string;
460
+ name: string;
461
+ email: string;
462
+ image?: string | null | undefined;
463
+ };
464
+
465
+ export const Type = {
466
+ Percentage: "percentage",
467
+ Flat: "flat",
468
+ } as const;
469
+ export type Type = ClosedEnum<typeof Type>;
470
+
471
+ export const Interval = {
472
+ Month: "month",
473
+ Year: "year",
474
+ } as const;
475
+ export type Interval = ClosedEnum<typeof Interval>;
476
+
477
+ export type Discount = {
478
+ id: string;
479
+ couponId: string | null;
480
+ couponTestId: string | null;
481
+ amount: number;
482
+ type: Type;
483
+ duration: number | null;
484
+ interval: Interval | null;
485
+ };
486
+
435
487
  export type Customer = {
436
488
  /**
437
489
  * The unique identifier of the customer in Dub.
@@ -453,10 +505,17 @@ export type Customer = {
453
505
  * Avatar URL of the customer.
454
506
  */
455
507
  avatar?: string | null | undefined;
508
+ /**
509
+ * Country of the customer.
510
+ */
511
+ country?: string | null | undefined;
456
512
  /**
457
513
  * The date the customer was created.
458
514
  */
459
515
  createdAt: string;
516
+ link?: LeadEventCustomerLink | null | undefined;
517
+ partner?: Partner | null | undefined;
518
+ discount?: Discount | null | undefined;
460
519
  };
461
520
 
462
521
  export type LeadEvent = {
@@ -2149,6 +2208,235 @@ export function leadEventLinkFromJSON(
2149
2208
  );
2150
2209
  }
2151
2210
 
2211
+ /** @internal */
2212
+ export const LeadEventCustomerLink$inboundSchema: z.ZodType<
2213
+ LeadEventCustomerLink,
2214
+ z.ZodTypeDef,
2215
+ unknown
2216
+ > = z.object({
2217
+ id: z.string(),
2218
+ domain: z.string(),
2219
+ key: z.string(),
2220
+ shortLink: z.string(),
2221
+ programId: z.nullable(z.string()),
2222
+ });
2223
+
2224
+ /** @internal */
2225
+ export type LeadEventCustomerLink$Outbound = {
2226
+ id: string;
2227
+ domain: string;
2228
+ key: string;
2229
+ shortLink: string;
2230
+ programId: string | null;
2231
+ };
2232
+
2233
+ /** @internal */
2234
+ export const LeadEventCustomerLink$outboundSchema: z.ZodType<
2235
+ LeadEventCustomerLink$Outbound,
2236
+ z.ZodTypeDef,
2237
+ LeadEventCustomerLink
2238
+ > = z.object({
2239
+ id: z.string(),
2240
+ domain: z.string(),
2241
+ key: z.string(),
2242
+ shortLink: z.string(),
2243
+ programId: z.nullable(z.string()),
2244
+ });
2245
+
2246
+ /**
2247
+ * @internal
2248
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2249
+ */
2250
+ export namespace LeadEventCustomerLink$ {
2251
+ /** @deprecated use `LeadEventCustomerLink$inboundSchema` instead. */
2252
+ export const inboundSchema = LeadEventCustomerLink$inboundSchema;
2253
+ /** @deprecated use `LeadEventCustomerLink$outboundSchema` instead. */
2254
+ export const outboundSchema = LeadEventCustomerLink$outboundSchema;
2255
+ /** @deprecated use `LeadEventCustomerLink$Outbound` instead. */
2256
+ export type Outbound = LeadEventCustomerLink$Outbound;
2257
+ }
2258
+
2259
+ export function leadEventCustomerLinkToJSON(
2260
+ leadEventCustomerLink: LeadEventCustomerLink,
2261
+ ): string {
2262
+ return JSON.stringify(
2263
+ LeadEventCustomerLink$outboundSchema.parse(leadEventCustomerLink),
2264
+ );
2265
+ }
2266
+
2267
+ export function leadEventCustomerLinkFromJSON(
2268
+ jsonString: string,
2269
+ ): SafeParseResult<LeadEventCustomerLink, SDKValidationError> {
2270
+ return safeParse(
2271
+ jsonString,
2272
+ (x) => LeadEventCustomerLink$inboundSchema.parse(JSON.parse(x)),
2273
+ `Failed to parse 'LeadEventCustomerLink' from JSON`,
2274
+ );
2275
+ }
2276
+
2277
+ /** @internal */
2278
+ export const Partner$inboundSchema: z.ZodType<Partner, z.ZodTypeDef, unknown> =
2279
+ z.object({
2280
+ id: z.string(),
2281
+ name: z.string(),
2282
+ email: z.string(),
2283
+ image: z.nullable(z.string()).optional(),
2284
+ });
2285
+
2286
+ /** @internal */
2287
+ export type Partner$Outbound = {
2288
+ id: string;
2289
+ name: string;
2290
+ email: string;
2291
+ image?: string | null | undefined;
2292
+ };
2293
+
2294
+ /** @internal */
2295
+ export const Partner$outboundSchema: z.ZodType<
2296
+ Partner$Outbound,
2297
+ z.ZodTypeDef,
2298
+ Partner
2299
+ > = z.object({
2300
+ id: z.string(),
2301
+ name: z.string(),
2302
+ email: z.string(),
2303
+ image: z.nullable(z.string()).optional(),
2304
+ });
2305
+
2306
+ /**
2307
+ * @internal
2308
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2309
+ */
2310
+ export namespace Partner$ {
2311
+ /** @deprecated use `Partner$inboundSchema` instead. */
2312
+ export const inboundSchema = Partner$inboundSchema;
2313
+ /** @deprecated use `Partner$outboundSchema` instead. */
2314
+ export const outboundSchema = Partner$outboundSchema;
2315
+ /** @deprecated use `Partner$Outbound` instead. */
2316
+ export type Outbound = Partner$Outbound;
2317
+ }
2318
+
2319
+ export function partnerToJSON(partner: Partner): string {
2320
+ return JSON.stringify(Partner$outboundSchema.parse(partner));
2321
+ }
2322
+
2323
+ export function partnerFromJSON(
2324
+ jsonString: string,
2325
+ ): SafeParseResult<Partner, SDKValidationError> {
2326
+ return safeParse(
2327
+ jsonString,
2328
+ (x) => Partner$inboundSchema.parse(JSON.parse(x)),
2329
+ `Failed to parse 'Partner' from JSON`,
2330
+ );
2331
+ }
2332
+
2333
+ /** @internal */
2334
+ export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
2335
+ Type,
2336
+ );
2337
+
2338
+ /** @internal */
2339
+ export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
2340
+ Type$inboundSchema;
2341
+
2342
+ /**
2343
+ * @internal
2344
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2345
+ */
2346
+ export namespace Type$ {
2347
+ /** @deprecated use `Type$inboundSchema` instead. */
2348
+ export const inboundSchema = Type$inboundSchema;
2349
+ /** @deprecated use `Type$outboundSchema` instead. */
2350
+ export const outboundSchema = Type$outboundSchema;
2351
+ }
2352
+
2353
+ /** @internal */
2354
+ export const Interval$inboundSchema: z.ZodNativeEnum<typeof Interval> = z
2355
+ .nativeEnum(Interval);
2356
+
2357
+ /** @internal */
2358
+ export const Interval$outboundSchema: z.ZodNativeEnum<typeof Interval> =
2359
+ Interval$inboundSchema;
2360
+
2361
+ /**
2362
+ * @internal
2363
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2364
+ */
2365
+ export namespace Interval$ {
2366
+ /** @deprecated use `Interval$inboundSchema` instead. */
2367
+ export const inboundSchema = Interval$inboundSchema;
2368
+ /** @deprecated use `Interval$outboundSchema` instead. */
2369
+ export const outboundSchema = Interval$outboundSchema;
2370
+ }
2371
+
2372
+ /** @internal */
2373
+ export const Discount$inboundSchema: z.ZodType<
2374
+ Discount,
2375
+ z.ZodTypeDef,
2376
+ unknown
2377
+ > = z.object({
2378
+ id: z.string(),
2379
+ couponId: z.nullable(z.string()),
2380
+ couponTestId: z.nullable(z.string()),
2381
+ amount: z.number(),
2382
+ type: Type$inboundSchema,
2383
+ duration: z.nullable(z.number()),
2384
+ interval: z.nullable(Interval$inboundSchema),
2385
+ });
2386
+
2387
+ /** @internal */
2388
+ export type Discount$Outbound = {
2389
+ id: string;
2390
+ couponId: string | null;
2391
+ couponTestId: string | null;
2392
+ amount: number;
2393
+ type: string;
2394
+ duration: number | null;
2395
+ interval: string | null;
2396
+ };
2397
+
2398
+ /** @internal */
2399
+ export const Discount$outboundSchema: z.ZodType<
2400
+ Discount$Outbound,
2401
+ z.ZodTypeDef,
2402
+ Discount
2403
+ > = z.object({
2404
+ id: z.string(),
2405
+ couponId: z.nullable(z.string()),
2406
+ couponTestId: z.nullable(z.string()),
2407
+ amount: z.number(),
2408
+ type: Type$outboundSchema,
2409
+ duration: z.nullable(z.number()),
2410
+ interval: z.nullable(Interval$outboundSchema),
2411
+ });
2412
+
2413
+ /**
2414
+ * @internal
2415
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2416
+ */
2417
+ export namespace Discount$ {
2418
+ /** @deprecated use `Discount$inboundSchema` instead. */
2419
+ export const inboundSchema = Discount$inboundSchema;
2420
+ /** @deprecated use `Discount$outboundSchema` instead. */
2421
+ export const outboundSchema = Discount$outboundSchema;
2422
+ /** @deprecated use `Discount$Outbound` instead. */
2423
+ export type Outbound = Discount$Outbound;
2424
+ }
2425
+
2426
+ export function discountToJSON(discount: Discount): string {
2427
+ return JSON.stringify(Discount$outboundSchema.parse(discount));
2428
+ }
2429
+
2430
+ export function discountFromJSON(
2431
+ jsonString: string,
2432
+ ): SafeParseResult<Discount, SDKValidationError> {
2433
+ return safeParse(
2434
+ jsonString,
2435
+ (x) => Discount$inboundSchema.parse(JSON.parse(x)),
2436
+ `Failed to parse 'Discount' from JSON`,
2437
+ );
2438
+ }
2439
+
2152
2440
  /** @internal */
2153
2441
  export const Customer$inboundSchema: z.ZodType<
2154
2442
  Customer,
@@ -2160,7 +2448,12 @@ export const Customer$inboundSchema: z.ZodType<
2160
2448
  name: z.string(),
2161
2449
  email: z.nullable(z.string()).optional(),
2162
2450
  avatar: z.nullable(z.string()).optional(),
2451
+ country: z.nullable(z.string()).optional(),
2163
2452
  createdAt: z.string(),
2453
+ link: z.nullable(z.lazy(() => LeadEventCustomerLink$inboundSchema))
2454
+ .optional(),
2455
+ partner: z.nullable(z.lazy(() => Partner$inboundSchema)).optional(),
2456
+ discount: z.nullable(z.lazy(() => Discount$inboundSchema)).optional(),
2164
2457
  });
2165
2458
 
2166
2459
  /** @internal */
@@ -2170,7 +2463,11 @@ export type Customer$Outbound = {
2170
2463
  name: string;
2171
2464
  email?: string | null | undefined;
2172
2465
  avatar?: string | null | undefined;
2466
+ country?: string | null | undefined;
2173
2467
  createdAt: string;
2468
+ link?: LeadEventCustomerLink$Outbound | null | undefined;
2469
+ partner?: Partner$Outbound | null | undefined;
2470
+ discount?: Discount$Outbound | null | undefined;
2174
2471
  };
2175
2472
 
2176
2473
  /** @internal */
@@ -2184,7 +2481,12 @@ export const Customer$outboundSchema: z.ZodType<
2184
2481
  name: z.string(),
2185
2482
  email: z.nullable(z.string()).optional(),
2186
2483
  avatar: z.nullable(z.string()).optional(),
2484
+ country: z.nullable(z.string()).optional(),
2187
2485
  createdAt: z.string(),
2486
+ link: z.nullable(z.lazy(() => LeadEventCustomerLink$outboundSchema))
2487
+ .optional(),
2488
+ partner: z.nullable(z.lazy(() => Partner$outboundSchema)).optional(),
2489
+ discount: z.nullable(z.lazy(() => Discount$outboundSchema)).optional(),
2188
2490
  });
2189
2491
 
2190
2492
  /**
@@ -20,6 +20,60 @@ export const SaleCreatedEventEvent = {
20
20
  } as const;
21
21
  export type SaleCreatedEventEvent = ClosedEnum<typeof SaleCreatedEventEvent>;
22
22
 
23
+ export type SaleCreatedEventDataLink = {
24
+ /**
25
+ * The unique ID of the short link.
26
+ */
27
+ id: string;
28
+ /**
29
+ * 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).
30
+ */
31
+ domain: string;
32
+ /**
33
+ * The short link slug. If not provided, a random 7-character slug will be generated.
34
+ */
35
+ key: string;
36
+ /**
37
+ * The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
38
+ */
39
+ shortLink: string;
40
+ /**
41
+ * The ID of the program the short link is associated with.
42
+ */
43
+ programId: string | null;
44
+ };
45
+
46
+ export type SaleCreatedEventPartner = {
47
+ id: string;
48
+ name: string;
49
+ email: string;
50
+ image?: string | null | undefined;
51
+ };
52
+
53
+ export const SaleCreatedEventType = {
54
+ Percentage: "percentage",
55
+ Flat: "flat",
56
+ } as const;
57
+ export type SaleCreatedEventType = ClosedEnum<typeof SaleCreatedEventType>;
58
+
59
+ export const SaleCreatedEventInterval = {
60
+ Month: "month",
61
+ Year: "year",
62
+ } as const;
63
+ export type SaleCreatedEventInterval = ClosedEnum<
64
+ typeof SaleCreatedEventInterval
65
+ >;
66
+
67
+ export type SaleCreatedEventDiscount = {
68
+ id: string;
69
+ couponId: string | null;
70
+ couponTestId: string | null;
71
+ amount: number;
72
+ type: SaleCreatedEventType;
73
+ duration: number | null;
74
+ interval: SaleCreatedEventInterval | null;
75
+ };
76
+
23
77
  export type SaleCreatedEventCustomer = {
24
78
  /**
25
79
  * The unique identifier of the customer in Dub.
@@ -41,10 +95,17 @@ export type SaleCreatedEventCustomer = {
41
95
  * Avatar URL of the customer.
42
96
  */
43
97
  avatar?: string | null | undefined;
98
+ /**
99
+ * Country of the customer.
100
+ */
101
+ country?: string | null | undefined;
44
102
  /**
45
103
  * The date the customer was created.
46
104
  */
47
105
  createdAt: string;
106
+ link?: SaleCreatedEventDataLink | null | undefined;
107
+ partner?: SaleCreatedEventPartner | null | undefined;
108
+ discount?: SaleCreatedEventDiscount | null | undefined;
48
109
  };
49
110
 
50
111
  export type SaleCreatedEventClick = {
@@ -505,6 +566,249 @@ export namespace SaleCreatedEventEvent$ {
505
566
  export const outboundSchema = SaleCreatedEventEvent$outboundSchema;
506
567
  }
507
568
 
569
+ /** @internal */
570
+ export const SaleCreatedEventDataLink$inboundSchema: z.ZodType<
571
+ SaleCreatedEventDataLink,
572
+ z.ZodTypeDef,
573
+ unknown
574
+ > = z.object({
575
+ id: z.string(),
576
+ domain: z.string(),
577
+ key: z.string(),
578
+ shortLink: z.string(),
579
+ programId: z.nullable(z.string()),
580
+ });
581
+
582
+ /** @internal */
583
+ export type SaleCreatedEventDataLink$Outbound = {
584
+ id: string;
585
+ domain: string;
586
+ key: string;
587
+ shortLink: string;
588
+ programId: string | null;
589
+ };
590
+
591
+ /** @internal */
592
+ export const SaleCreatedEventDataLink$outboundSchema: z.ZodType<
593
+ SaleCreatedEventDataLink$Outbound,
594
+ z.ZodTypeDef,
595
+ SaleCreatedEventDataLink
596
+ > = z.object({
597
+ id: z.string(),
598
+ domain: z.string(),
599
+ key: z.string(),
600
+ shortLink: z.string(),
601
+ programId: z.nullable(z.string()),
602
+ });
603
+
604
+ /**
605
+ * @internal
606
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
607
+ */
608
+ export namespace SaleCreatedEventDataLink$ {
609
+ /** @deprecated use `SaleCreatedEventDataLink$inboundSchema` instead. */
610
+ export const inboundSchema = SaleCreatedEventDataLink$inboundSchema;
611
+ /** @deprecated use `SaleCreatedEventDataLink$outboundSchema` instead. */
612
+ export const outboundSchema = SaleCreatedEventDataLink$outboundSchema;
613
+ /** @deprecated use `SaleCreatedEventDataLink$Outbound` instead. */
614
+ export type Outbound = SaleCreatedEventDataLink$Outbound;
615
+ }
616
+
617
+ export function saleCreatedEventDataLinkToJSON(
618
+ saleCreatedEventDataLink: SaleCreatedEventDataLink,
619
+ ): string {
620
+ return JSON.stringify(
621
+ SaleCreatedEventDataLink$outboundSchema.parse(saleCreatedEventDataLink),
622
+ );
623
+ }
624
+
625
+ export function saleCreatedEventDataLinkFromJSON(
626
+ jsonString: string,
627
+ ): SafeParseResult<SaleCreatedEventDataLink, SDKValidationError> {
628
+ return safeParse(
629
+ jsonString,
630
+ (x) => SaleCreatedEventDataLink$inboundSchema.parse(JSON.parse(x)),
631
+ `Failed to parse 'SaleCreatedEventDataLink' from JSON`,
632
+ );
633
+ }
634
+
635
+ /** @internal */
636
+ export const SaleCreatedEventPartner$inboundSchema: z.ZodType<
637
+ SaleCreatedEventPartner,
638
+ z.ZodTypeDef,
639
+ unknown
640
+ > = z.object({
641
+ id: z.string(),
642
+ name: z.string(),
643
+ email: z.string(),
644
+ image: z.nullable(z.string()).optional(),
645
+ });
646
+
647
+ /** @internal */
648
+ export type SaleCreatedEventPartner$Outbound = {
649
+ id: string;
650
+ name: string;
651
+ email: string;
652
+ image?: string | null | undefined;
653
+ };
654
+
655
+ /** @internal */
656
+ export const SaleCreatedEventPartner$outboundSchema: z.ZodType<
657
+ SaleCreatedEventPartner$Outbound,
658
+ z.ZodTypeDef,
659
+ SaleCreatedEventPartner
660
+ > = z.object({
661
+ id: z.string(),
662
+ name: z.string(),
663
+ email: z.string(),
664
+ image: z.nullable(z.string()).optional(),
665
+ });
666
+
667
+ /**
668
+ * @internal
669
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
670
+ */
671
+ export namespace SaleCreatedEventPartner$ {
672
+ /** @deprecated use `SaleCreatedEventPartner$inboundSchema` instead. */
673
+ export const inboundSchema = SaleCreatedEventPartner$inboundSchema;
674
+ /** @deprecated use `SaleCreatedEventPartner$outboundSchema` instead. */
675
+ export const outboundSchema = SaleCreatedEventPartner$outboundSchema;
676
+ /** @deprecated use `SaleCreatedEventPartner$Outbound` instead. */
677
+ export type Outbound = SaleCreatedEventPartner$Outbound;
678
+ }
679
+
680
+ export function saleCreatedEventPartnerToJSON(
681
+ saleCreatedEventPartner: SaleCreatedEventPartner,
682
+ ): string {
683
+ return JSON.stringify(
684
+ SaleCreatedEventPartner$outboundSchema.parse(saleCreatedEventPartner),
685
+ );
686
+ }
687
+
688
+ export function saleCreatedEventPartnerFromJSON(
689
+ jsonString: string,
690
+ ): SafeParseResult<SaleCreatedEventPartner, SDKValidationError> {
691
+ return safeParse(
692
+ jsonString,
693
+ (x) => SaleCreatedEventPartner$inboundSchema.parse(JSON.parse(x)),
694
+ `Failed to parse 'SaleCreatedEventPartner' from JSON`,
695
+ );
696
+ }
697
+
698
+ /** @internal */
699
+ export const SaleCreatedEventType$inboundSchema: z.ZodNativeEnum<
700
+ typeof SaleCreatedEventType
701
+ > = z.nativeEnum(SaleCreatedEventType);
702
+
703
+ /** @internal */
704
+ export const SaleCreatedEventType$outboundSchema: z.ZodNativeEnum<
705
+ typeof SaleCreatedEventType
706
+ > = SaleCreatedEventType$inboundSchema;
707
+
708
+ /**
709
+ * @internal
710
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
711
+ */
712
+ export namespace SaleCreatedEventType$ {
713
+ /** @deprecated use `SaleCreatedEventType$inboundSchema` instead. */
714
+ export const inboundSchema = SaleCreatedEventType$inboundSchema;
715
+ /** @deprecated use `SaleCreatedEventType$outboundSchema` instead. */
716
+ export const outboundSchema = SaleCreatedEventType$outboundSchema;
717
+ }
718
+
719
+ /** @internal */
720
+ export const SaleCreatedEventInterval$inboundSchema: z.ZodNativeEnum<
721
+ typeof SaleCreatedEventInterval
722
+ > = z.nativeEnum(SaleCreatedEventInterval);
723
+
724
+ /** @internal */
725
+ export const SaleCreatedEventInterval$outboundSchema: z.ZodNativeEnum<
726
+ typeof SaleCreatedEventInterval
727
+ > = SaleCreatedEventInterval$inboundSchema;
728
+
729
+ /**
730
+ * @internal
731
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
732
+ */
733
+ export namespace SaleCreatedEventInterval$ {
734
+ /** @deprecated use `SaleCreatedEventInterval$inboundSchema` instead. */
735
+ export const inboundSchema = SaleCreatedEventInterval$inboundSchema;
736
+ /** @deprecated use `SaleCreatedEventInterval$outboundSchema` instead. */
737
+ export const outboundSchema = SaleCreatedEventInterval$outboundSchema;
738
+ }
739
+
740
+ /** @internal */
741
+ export const SaleCreatedEventDiscount$inboundSchema: z.ZodType<
742
+ SaleCreatedEventDiscount,
743
+ z.ZodTypeDef,
744
+ unknown
745
+ > = z.object({
746
+ id: z.string(),
747
+ couponId: z.nullable(z.string()),
748
+ couponTestId: z.nullable(z.string()),
749
+ amount: z.number(),
750
+ type: SaleCreatedEventType$inboundSchema,
751
+ duration: z.nullable(z.number()),
752
+ interval: z.nullable(SaleCreatedEventInterval$inboundSchema),
753
+ });
754
+
755
+ /** @internal */
756
+ export type SaleCreatedEventDiscount$Outbound = {
757
+ id: string;
758
+ couponId: string | null;
759
+ couponTestId: string | null;
760
+ amount: number;
761
+ type: string;
762
+ duration: number | null;
763
+ interval: string | null;
764
+ };
765
+
766
+ /** @internal */
767
+ export const SaleCreatedEventDiscount$outboundSchema: z.ZodType<
768
+ SaleCreatedEventDiscount$Outbound,
769
+ z.ZodTypeDef,
770
+ SaleCreatedEventDiscount
771
+ > = z.object({
772
+ id: z.string(),
773
+ couponId: z.nullable(z.string()),
774
+ couponTestId: z.nullable(z.string()),
775
+ amount: z.number(),
776
+ type: SaleCreatedEventType$outboundSchema,
777
+ duration: z.nullable(z.number()),
778
+ interval: z.nullable(SaleCreatedEventInterval$outboundSchema),
779
+ });
780
+
781
+ /**
782
+ * @internal
783
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
784
+ */
785
+ export namespace SaleCreatedEventDiscount$ {
786
+ /** @deprecated use `SaleCreatedEventDiscount$inboundSchema` instead. */
787
+ export const inboundSchema = SaleCreatedEventDiscount$inboundSchema;
788
+ /** @deprecated use `SaleCreatedEventDiscount$outboundSchema` instead. */
789
+ export const outboundSchema = SaleCreatedEventDiscount$outboundSchema;
790
+ /** @deprecated use `SaleCreatedEventDiscount$Outbound` instead. */
791
+ export type Outbound = SaleCreatedEventDiscount$Outbound;
792
+ }
793
+
794
+ export function saleCreatedEventDiscountToJSON(
795
+ saleCreatedEventDiscount: SaleCreatedEventDiscount,
796
+ ): string {
797
+ return JSON.stringify(
798
+ SaleCreatedEventDiscount$outboundSchema.parse(saleCreatedEventDiscount),
799
+ );
800
+ }
801
+
802
+ export function saleCreatedEventDiscountFromJSON(
803
+ jsonString: string,
804
+ ): SafeParseResult<SaleCreatedEventDiscount, SDKValidationError> {
805
+ return safeParse(
806
+ jsonString,
807
+ (x) => SaleCreatedEventDiscount$inboundSchema.parse(JSON.parse(x)),
808
+ `Failed to parse 'SaleCreatedEventDiscount' from JSON`,
809
+ );
810
+ }
811
+
508
812
  /** @internal */
509
813
  export const SaleCreatedEventCustomer$inboundSchema: z.ZodType<
510
814
  SaleCreatedEventCustomer,
@@ -516,7 +820,14 @@ export const SaleCreatedEventCustomer$inboundSchema: z.ZodType<
516
820
  name: z.string(),
517
821
  email: z.nullable(z.string()).optional(),
518
822
  avatar: z.nullable(z.string()).optional(),
823
+ country: z.nullable(z.string()).optional(),
519
824
  createdAt: z.string(),
825
+ link: z.nullable(z.lazy(() => SaleCreatedEventDataLink$inboundSchema))
826
+ .optional(),
827
+ partner: z.nullable(z.lazy(() => SaleCreatedEventPartner$inboundSchema))
828
+ .optional(),
829
+ discount: z.nullable(z.lazy(() => SaleCreatedEventDiscount$inboundSchema))
830
+ .optional(),
520
831
  });
521
832
 
522
833
  /** @internal */
@@ -526,7 +837,11 @@ export type SaleCreatedEventCustomer$Outbound = {
526
837
  name: string;
527
838
  email?: string | null | undefined;
528
839
  avatar?: string | null | undefined;
840
+ country?: string | null | undefined;
529
841
  createdAt: string;
842
+ link?: SaleCreatedEventDataLink$Outbound | null | undefined;
843
+ partner?: SaleCreatedEventPartner$Outbound | null | undefined;
844
+ discount?: SaleCreatedEventDiscount$Outbound | null | undefined;
530
845
  };
531
846
 
532
847
  /** @internal */
@@ -540,7 +855,14 @@ export const SaleCreatedEventCustomer$outboundSchema: z.ZodType<
540
855
  name: z.string(),
541
856
  email: z.nullable(z.string()).optional(),
542
857
  avatar: z.nullable(z.string()).optional(),
858
+ country: z.nullable(z.string()).optional(),
543
859
  createdAt: z.string(),
860
+ link: z.nullable(z.lazy(() => SaleCreatedEventDataLink$outboundSchema))
861
+ .optional(),
862
+ partner: z.nullable(z.lazy(() => SaleCreatedEventPartner$outboundSchema))
863
+ .optional(),
864
+ discount: z.nullable(z.lazy(() => SaleCreatedEventDiscount$outboundSchema))
865
+ .optional(),
544
866
  });
545
867
 
546
868
  /**