@snagsolutions/sdk 0.1.0-alpha.14 → 0.1.0-alpha.15

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 (368) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +21 -13
  3. package/core.js +2 -1
  4. package/core.js.map +1 -1
  5. package/core.mjs +2 -1
  6. package/core.mjs.map +1 -1
  7. package/index.d.mts +6 -21
  8. package/index.d.ts +6 -21
  9. package/index.d.ts.map +1 -1
  10. package/index.js +8 -23
  11. package/index.js.map +1 -1
  12. package/index.mjs +8 -23
  13. package/index.mjs.map +1 -1
  14. package/package.json +8 -29
  15. package/resources/api/api.d.ts +365 -0
  16. package/resources/api/api.d.ts.map +1 -0
  17. package/resources/{assets/assets.js → api/api.js} +38 -13
  18. package/resources/api/api.js.map +1 -0
  19. package/resources/{assets/assets.mjs → api/api.mjs} +37 -12
  20. package/resources/api/api.mjs.map +1 -0
  21. package/resources/api/index.d.ts +9 -0
  22. package/resources/api/index.d.ts.map +1 -0
  23. package/resources/{assets → api}/index.js +11 -7
  24. package/resources/api/index.js.map +1 -0
  25. package/resources/{assets → api}/index.mjs +5 -3
  26. package/resources/api/index.mjs.map +1 -0
  27. package/resources/{loyalty/transaction-entries → api/loyalty}/accounts.d.ts +8 -4
  28. package/resources/api/loyalty/accounts.d.ts.map +1 -0
  29. package/resources/{loyalty/transaction-entries → api/loyalty}/accounts.js +1 -1
  30. package/resources/api/loyalty/accounts.js.map +1 -0
  31. package/resources/{loyalty/transaction-entries → api/loyalty}/accounts.mjs +1 -1
  32. package/resources/api/loyalty/accounts.mjs.map +1 -0
  33. package/resources/{loyalty → api/loyalty}/badges.d.ts +6 -2
  34. package/resources/api/loyalty/badges.d.ts.map +1 -0
  35. package/resources/{loyalty → api/loyalty}/badges.js +2 -2
  36. package/resources/api/loyalty/badges.js.map +1 -0
  37. package/resources/{loyalty → api/loyalty}/badges.mjs +2 -2
  38. package/resources/api/loyalty/badges.mjs.map +1 -0
  39. package/resources/{loyalty → api/loyalty}/currencies.d.ts +2 -2
  40. package/resources/api/loyalty/currencies.d.ts.map +1 -0
  41. package/resources/{loyalty → api/loyalty}/currencies.js +1 -1
  42. package/resources/api/loyalty/currencies.js.map +1 -0
  43. package/resources/{loyalty → api/loyalty}/currencies.mjs +1 -1
  44. package/resources/api/loyalty/currencies.mjs.map +1 -0
  45. package/resources/api/loyalty/index.d.ts +10 -0
  46. package/resources/api/loyalty/index.d.ts.map +1 -0
  47. package/resources/{loyalty → api/loyalty}/index.js +5 -3
  48. package/resources/api/loyalty/index.js.map +1 -0
  49. package/resources/{loyalty → api/loyalty}/index.mjs +4 -3
  50. package/resources/api/loyalty/index.mjs.map +1 -0
  51. package/resources/api/loyalty/loyalty.d.ts +807 -0
  52. package/resources/api/loyalty/loyalty.d.ts.map +1 -0
  53. package/resources/{loyalty → api/loyalty}/loyalty.js +36 -13
  54. package/resources/api/loyalty/loyalty.js.map +1 -0
  55. package/resources/api/loyalty/loyalty.mjs +59 -0
  56. package/resources/api/loyalty/loyalty.mjs.map +1 -0
  57. package/resources/{loyalty → api/loyalty}/multipliers.d.ts +15 -8
  58. package/resources/api/loyalty/multipliers.d.ts.map +1 -0
  59. package/resources/{loyalty → api/loyalty}/multipliers.js +9 -3
  60. package/resources/api/loyalty/multipliers.js.map +1 -0
  61. package/resources/{loyalty → api/loyalty}/multipliers.mjs +9 -3
  62. package/resources/api/loyalty/multipliers.mjs.map +1 -0
  63. package/resources/api/loyalty/questions-responses.d.ts.map +1 -0
  64. package/resources/api/loyalty/questions-responses.js.map +1 -0
  65. package/resources/api/loyalty/questions-responses.mjs.map +1 -0
  66. package/resources/api/loyalty/questions.d.ts.map +1 -0
  67. package/resources/api/loyalty/questions.js.map +1 -0
  68. package/resources/api/loyalty/questions.mjs.map +1 -0
  69. package/resources/{loyalty → api/loyalty}/rule-edits.d.ts +8 -8
  70. package/resources/api/loyalty/rule-edits.d.ts.map +1 -0
  71. package/resources/{loyalty → api/loyalty}/rule-edits.js +2 -2
  72. package/resources/api/loyalty/rule-edits.js.map +1 -0
  73. package/resources/{loyalty → api/loyalty}/rule-edits.mjs +2 -2
  74. package/resources/api/loyalty/rule-edits.mjs.map +1 -0
  75. package/resources/{loyalty → api/loyalty}/rules.d.ts +41 -25
  76. package/resources/api/loyalty/rules.d.ts.map +1 -0
  77. package/resources/{loyalty → api/loyalty}/rules.js +3 -3
  78. package/resources/api/loyalty/rules.js.map +1 -0
  79. package/resources/{loyalty → api/loyalty}/rules.mjs +3 -3
  80. package/resources/api/loyalty/rules.mjs.map +1 -0
  81. package/resources/api/loyalty.d.ts +2 -0
  82. package/resources/api/loyalty.d.ts.map +1 -0
  83. package/resources/api/loyalty.js +19 -0
  84. package/resources/api/loyalty.js.map +1 -0
  85. package/resources/api/loyalty.mjs +3 -0
  86. package/resources/api/loyalty.mjs.map +1 -0
  87. package/resources/{assets → api}/minting.d.ts +8 -8
  88. package/resources/api/minting.d.ts.map +1 -0
  89. package/resources/{assets → api}/minting.js +1 -1
  90. package/resources/api/minting.js.map +1 -0
  91. package/resources/{assets → api}/minting.mjs +1 -1
  92. package/resources/api/minting.mjs.map +1 -0
  93. package/resources/api/referral/index.d.ts +3 -0
  94. package/resources/api/referral/index.d.ts.map +1 -0
  95. package/resources/api/referral/index.js.map +1 -0
  96. package/resources/{assets → api}/referral/index.mjs +1 -1
  97. package/resources/api/referral/index.mjs.map +1 -0
  98. package/resources/api/referral/referral.d.ts +31 -0
  99. package/resources/api/referral/referral.d.ts.map +1 -0
  100. package/resources/{assets → api}/referral/referral.js +2 -2
  101. package/resources/api/referral/referral.js.map +1 -0
  102. package/resources/{assets → api}/referral/referral.mjs +3 -3
  103. package/resources/api/referral/referral.mjs.map +1 -0
  104. package/resources/{assets → api}/referral/users.d.ts +9 -9
  105. package/resources/api/referral/users.d.ts.map +1 -0
  106. package/resources/{assets → api}/referral/users.js +2 -2
  107. package/resources/api/referral/users.js.map +1 -0
  108. package/resources/{assets → api}/referral/users.mjs +2 -2
  109. package/resources/api/referral/users.mjs.map +1 -0
  110. package/resources/api/referral.d.ts +2 -0
  111. package/resources/api/referral.d.ts.map +1 -0
  112. package/resources/api/referral.js +19 -0
  113. package/resources/api/referral.js.map +1 -0
  114. package/resources/api/referral.mjs +3 -0
  115. package/resources/api/referral.mjs.map +1 -0
  116. package/resources/api/users/index.d.ts +3 -0
  117. package/resources/api/users/index.d.ts.map +1 -0
  118. package/resources/{users → api/users}/index.js +1 -3
  119. package/resources/api/users/index.js.map +1 -0
  120. package/resources/{users → api/users}/index.mjs +1 -2
  121. package/resources/api/users/index.mjs.map +1 -0
  122. package/resources/{users → api/users}/metadatas.d.ts +14 -9
  123. package/resources/api/users/metadatas.d.ts.map +1 -0
  124. package/resources/{users → api/users}/metadatas.js +4 -4
  125. package/resources/api/users/metadatas.js.map +1 -0
  126. package/resources/{users → api/users}/metadatas.mjs +4 -4
  127. package/resources/api/users/metadatas.mjs.map +1 -0
  128. package/resources/api/users/users.d.ts +133 -0
  129. package/resources/api/users/users.d.ts.map +1 -0
  130. package/resources/{users → api/users}/users.js +19 -5
  131. package/resources/api/users/users.js.map +1 -0
  132. package/resources/{assets → api/users}/users.mjs +15 -15
  133. package/resources/api/users/users.mjs.map +1 -0
  134. package/resources/api/users.d.ts +2 -0
  135. package/resources/api/users.d.ts.map +1 -0
  136. package/resources/api/users.js +19 -0
  137. package/resources/api/users.js.map +1 -0
  138. package/resources/api/users.mjs +3 -0
  139. package/resources/api/users.mjs.map +1 -0
  140. package/resources/{assets → api}/website-collections.d.ts +9 -9
  141. package/resources/api/website-collections.d.ts.map +1 -0
  142. package/resources/{assets → api}/website-collections.js +2 -2
  143. package/resources/api/website-collections.js.map +1 -0
  144. package/resources/{assets → api}/website-collections.mjs +2 -2
  145. package/resources/api/website-collections.mjs.map +1 -0
  146. package/resources/{assets → api}/website-user-roles.d.ts +28 -28
  147. package/resources/api/website-user-roles.d.ts.map +1 -0
  148. package/resources/{assets → api}/website-user-roles.js +7 -7
  149. package/resources/api/website-user-roles.js.map +1 -0
  150. package/resources/{assets → api}/website-user-roles.mjs +7 -7
  151. package/resources/api/website-user-roles.mjs.map +1 -0
  152. package/resources/{websites.d.ts → api/websites.d.ts} +2 -2
  153. package/resources/api/websites.d.ts.map +1 -0
  154. package/resources/{websites.js → api/websites.js} +2 -2
  155. package/resources/api/websites.js.map +1 -0
  156. package/resources/{websites.mjs → api/websites.mjs} +2 -2
  157. package/resources/api/websites.mjs.map +1 -0
  158. package/resources/api.d.ts +2 -0
  159. package/resources/api.d.ts.map +1 -0
  160. package/resources/api.js +19 -0
  161. package/resources/api.js.map +1 -0
  162. package/resources/api.mjs +3 -0
  163. package/resources/api.mjs.map +1 -0
  164. package/resources/index.d.ts +1 -6
  165. package/resources/index.d.ts.map +1 -1
  166. package/resources/index.js +3 -13
  167. package/resources/index.js.map +1 -1
  168. package/resources/index.mjs +1 -6
  169. package/resources/index.mjs.map +1 -1
  170. package/resources.d.ts +2 -0
  171. package/resources.d.ts.map +1 -0
  172. package/resources.js +18 -0
  173. package/resources.js.map +1 -0
  174. package/resources.mjs +2 -0
  175. package/resources.mjs.map +1 -0
  176. package/src/core.ts +2 -2
  177. package/src/index.ts +23 -54
  178. package/src/resources/api/api.ts +629 -0
  179. package/src/resources/api/index.ts +51 -0
  180. package/src/resources/{loyalty/transaction-entries → api/loyalty}/accounts.ts +12 -7
  181. package/src/resources/{loyalty → api/loyalty}/badges.ts +8 -3
  182. package/src/resources/{loyalty → api/loyalty}/currencies.ts +2 -2
  183. package/src/resources/{loyalty → api/loyalty}/index.ts +38 -16
  184. package/src/resources/api/loyalty/loyalty.ts +1297 -0
  185. package/src/resources/{loyalty → api/loyalty}/multipliers.ts +23 -11
  186. package/src/resources/{loyalty → api/loyalty}/rule-edits.ts +9 -12
  187. package/src/resources/{loyalty → api/loyalty}/rules.ts +98 -27
  188. package/src/resources/api/loyalty.ts +3 -0
  189. package/src/resources/{assets → api}/minting.ts +15 -11
  190. package/src/resources/api/referral/index.ts +10 -0
  191. package/src/resources/api/referral/referral.ts +70 -0
  192. package/src/resources/{assets → api}/referral/users.ts +12 -18
  193. package/src/resources/api/referral.ts +3 -0
  194. package/src/resources/api/users/index.ts +18 -0
  195. package/src/resources/{users → api/users}/metadatas.ts +22 -18
  196. package/src/resources/api/users/users.ts +203 -0
  197. package/src/resources/api/users.ts +3 -0
  198. package/src/resources/{assets → api}/website-collections.ts +17 -16
  199. package/src/resources/{assets → api}/website-user-roles.ts +40 -40
  200. package/src/resources/{websites.ts → api/websites.ts} +3 -3
  201. package/src/resources/api.ts +3 -0
  202. package/src/resources/index.ts +8 -16
  203. package/src/resources.ts +1 -0
  204. package/src/version.ts +1 -1
  205. package/version.d.ts +1 -1
  206. package/version.js +1 -1
  207. package/version.mjs +1 -1
  208. package/resources/assets/assets.d.ts +0 -153
  209. package/resources/assets/assets.d.ts.map +0 -1
  210. package/resources/assets/assets.js.map +0 -1
  211. package/resources/assets/assets.mjs.map +0 -1
  212. package/resources/assets/index.d.ts +0 -7
  213. package/resources/assets/index.d.ts.map +0 -1
  214. package/resources/assets/index.js.map +0 -1
  215. package/resources/assets/index.mjs.map +0 -1
  216. package/resources/assets/minting.d.ts.map +0 -1
  217. package/resources/assets/minting.js.map +0 -1
  218. package/resources/assets/minting.mjs.map +0 -1
  219. package/resources/assets/referral/index.d.ts +0 -3
  220. package/resources/assets/referral/index.d.ts.map +0 -1
  221. package/resources/assets/referral/index.js.map +0 -1
  222. package/resources/assets/referral/index.mjs.map +0 -1
  223. package/resources/assets/referral/referral.d.ts +0 -30
  224. package/resources/assets/referral/referral.d.ts.map +0 -1
  225. package/resources/assets/referral/referral.js.map +0 -1
  226. package/resources/assets/referral/referral.mjs.map +0 -1
  227. package/resources/assets/referral/users.d.ts.map +0 -1
  228. package/resources/assets/referral/users.js.map +0 -1
  229. package/resources/assets/referral/users.mjs.map +0 -1
  230. package/resources/assets/users.d.ts +0 -285
  231. package/resources/assets/users.d.ts.map +0 -1
  232. package/resources/assets/users.js +0 -34
  233. package/resources/assets/users.js.map +0 -1
  234. package/resources/assets/users.mjs.map +0 -1
  235. package/resources/assets/website-collections.d.ts.map +0 -1
  236. package/resources/assets/website-collections.js.map +0 -1
  237. package/resources/assets/website-collections.mjs.map +0 -1
  238. package/resources/assets/website-user-roles.d.ts.map +0 -1
  239. package/resources/assets/website-user-roles.js.map +0 -1
  240. package/resources/assets/website-user-roles.mjs.map +0 -1
  241. package/resources/auction-bids.d.ts +0 -51
  242. package/resources/auction-bids.d.ts.map +0 -1
  243. package/resources/auction-bids.js +0 -20
  244. package/resources/auction-bids.js.map +0 -1
  245. package/resources/auction-bids.mjs +0 -16
  246. package/resources/auction-bids.mjs.map +0 -1
  247. package/resources/drip/drip.d.ts +0 -14
  248. package/resources/drip/drip.d.ts.map +0 -1
  249. package/resources/drip/drip.js +0 -43
  250. package/resources/drip/drip.js.map +0 -1
  251. package/resources/drip/drip.mjs +0 -16
  252. package/resources/drip/drip.mjs.map +0 -1
  253. package/resources/drip/index.d.ts +0 -4
  254. package/resources/drip/index.d.ts.map +0 -1
  255. package/resources/drip/index.js +0 -11
  256. package/resources/drip/index.js.map +0 -1
  257. package/resources/drip/index.mjs +0 -5
  258. package/resources/drip/index.mjs.map +0 -1
  259. package/resources/drip/quests.d.ts +0 -4
  260. package/resources/drip/quests.d.ts.map +0 -1
  261. package/resources/drip/quests.js +0 -9
  262. package/resources/drip/quests.js.map +0 -1
  263. package/resources/drip/quests.mjs +0 -5
  264. package/resources/drip/quests.mjs.map +0 -1
  265. package/resources/drip/status.d.ts +0 -4
  266. package/resources/drip/status.d.ts.map +0 -1
  267. package/resources/drip/status.js +0 -9
  268. package/resources/drip/status.js.map +0 -1
  269. package/resources/drip/status.mjs +0 -5
  270. package/resources/drip/status.mjs.map +0 -1
  271. package/resources/loyalty/accounts.d.ts +0 -4
  272. package/resources/loyalty/accounts.d.ts.map +0 -1
  273. package/resources/loyalty/accounts.js +0 -9
  274. package/resources/loyalty/accounts.js.map +0 -1
  275. package/resources/loyalty/accounts.mjs +0 -5
  276. package/resources/loyalty/accounts.mjs.map +0 -1
  277. package/resources/loyalty/badges.d.ts.map +0 -1
  278. package/resources/loyalty/badges.js.map +0 -1
  279. package/resources/loyalty/badges.mjs.map +0 -1
  280. package/resources/loyalty/currencies.d.ts.map +0 -1
  281. package/resources/loyalty/currencies.js.map +0 -1
  282. package/resources/loyalty/currencies.mjs.map +0 -1
  283. package/resources/loyalty/index.d.ts +0 -9
  284. package/resources/loyalty/index.d.ts.map +0 -1
  285. package/resources/loyalty/index.js.map +0 -1
  286. package/resources/loyalty/index.mjs.map +0 -1
  287. package/resources/loyalty/loyalty.d.ts +0 -34
  288. package/resources/loyalty/loyalty.d.ts.map +0 -1
  289. package/resources/loyalty/loyalty.js.map +0 -1
  290. package/resources/loyalty/loyalty.mjs +0 -36
  291. package/resources/loyalty/loyalty.mjs.map +0 -1
  292. package/resources/loyalty/multipliers.d.ts.map +0 -1
  293. package/resources/loyalty/multipliers.js.map +0 -1
  294. package/resources/loyalty/multipliers.mjs.map +0 -1
  295. package/resources/loyalty/rule-edits.d.ts.map +0 -1
  296. package/resources/loyalty/rule-edits.js.map +0 -1
  297. package/resources/loyalty/rule-edits.mjs.map +0 -1
  298. package/resources/loyalty/rules.d.ts.map +0 -1
  299. package/resources/loyalty/rules.js.map +0 -1
  300. package/resources/loyalty/rules.mjs.map +0 -1
  301. package/resources/loyalty/transaction-entries/accounts.d.ts.map +0 -1
  302. package/resources/loyalty/transaction-entries/accounts.js.map +0 -1
  303. package/resources/loyalty/transaction-entries/accounts.mjs.map +0 -1
  304. package/resources/loyalty/transaction-entries/index.d.ts +0 -5
  305. package/resources/loyalty/transaction-entries/index.d.ts.map +0 -1
  306. package/resources/loyalty/transaction-entries/index.js +0 -13
  307. package/resources/loyalty/transaction-entries/index.js.map +0 -1
  308. package/resources/loyalty/transaction-entries/index.mjs +0 -6
  309. package/resources/loyalty/transaction-entries/index.mjs.map +0 -1
  310. package/resources/loyalty/transaction-entries/questions-responses.d.ts.map +0 -1
  311. package/resources/loyalty/transaction-entries/questions-responses.js.map +0 -1
  312. package/resources/loyalty/transaction-entries/questions-responses.mjs.map +0 -1
  313. package/resources/loyalty/transaction-entries/questions.d.ts.map +0 -1
  314. package/resources/loyalty/transaction-entries/questions.js.map +0 -1
  315. package/resources/loyalty/transaction-entries/questions.mjs.map +0 -1
  316. package/resources/loyalty/transaction-entries/transaction-entries.d.ts +0 -300
  317. package/resources/loyalty/transaction-entries/transaction-entries.d.ts.map +0 -1
  318. package/resources/loyalty/transaction-entries/transaction-entries.js +0 -66
  319. package/resources/loyalty/transaction-entries/transaction-entries.js.map +0 -1
  320. package/resources/loyalty/transaction-entries/transaction-entries.mjs +0 -39
  321. package/resources/loyalty/transaction-entries/transaction-entries.mjs.map +0 -1
  322. package/resources/users/index.d.ts +0 -4
  323. package/resources/users/index.d.ts.map +0 -1
  324. package/resources/users/index.js.map +0 -1
  325. package/resources/users/index.mjs.map +0 -1
  326. package/resources/users/metadatas.d.ts.map +0 -1
  327. package/resources/users/metadatas.js.map +0 -1
  328. package/resources/users/metadatas.mjs.map +0 -1
  329. package/resources/users/users.d.ts +0 -14
  330. package/resources/users/users.d.ts.map +0 -1
  331. package/resources/users/users.js.map +0 -1
  332. package/resources/users/users.mjs +0 -16
  333. package/resources/users/users.mjs.map +0 -1
  334. package/resources/users/wallets.d.ts +0 -4
  335. package/resources/users/wallets.d.ts.map +0 -1
  336. package/resources/users/wallets.js +0 -9
  337. package/resources/users/wallets.js.map +0 -1
  338. package/resources/users/wallets.mjs +0 -5
  339. package/resources/users/wallets.mjs.map +0 -1
  340. package/resources/websites.d.ts.map +0 -1
  341. package/resources/websites.js.map +0 -1
  342. package/resources/websites.mjs.map +0 -1
  343. package/src/resources/assets/assets.ts +0 -294
  344. package/src/resources/assets/index.ts +0 -38
  345. package/src/resources/assets/referral/index.ts +0 -14
  346. package/src/resources/assets/referral/referral.ts +0 -74
  347. package/src/resources/assets/users.ts +0 -415
  348. package/src/resources/auction-bids.ts +0 -77
  349. package/src/resources/drip/drip.ts +0 -21
  350. package/src/resources/drip/index.ts +0 -5
  351. package/src/resources/drip/quests.ts +0 -5
  352. package/src/resources/drip/status.ts +0 -5
  353. package/src/resources/loyalty/accounts.ts +0 -5
  354. package/src/resources/loyalty/loyalty.ts +0 -165
  355. package/src/resources/loyalty/transaction-entries/index.ts +0 -34
  356. package/src/resources/loyalty/transaction-entries/transaction-entries.ts +0 -525
  357. package/src/resources/users/index.ts +0 -11
  358. package/src/resources/users/users.ts +0 -33
  359. package/src/resources/users/wallets.ts +0 -5
  360. /package/resources/{loyalty/transaction-entries → api/loyalty}/questions-responses.d.ts +0 -0
  361. /package/resources/{loyalty/transaction-entries → api/loyalty}/questions-responses.js +0 -0
  362. /package/resources/{loyalty/transaction-entries → api/loyalty}/questions-responses.mjs +0 -0
  363. /package/resources/{loyalty/transaction-entries → api/loyalty}/questions.d.ts +0 -0
  364. /package/resources/{loyalty/transaction-entries → api/loyalty}/questions.js +0 -0
  365. /package/resources/{loyalty/transaction-entries → api/loyalty}/questions.mjs +0 -0
  366. /package/resources/{assets → api}/referral/index.js +0 -0
  367. /package/src/resources/{loyalty/transaction-entries → api/loyalty}/questions-responses.ts +0 -0
  368. /package/src/resources/{loyalty/transaction-entries → api/loyalty}/questions.ts +0 -0
@@ -1,8 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../resource';
4
- import { isRequestOptions } from '../../core';
5
- import * as Core from '../../core';
3
+ import { APIResource } from '../../../resource';
4
+ import { isRequestOptions } from '../../../core';
5
+ import * as Core from '../../../core';
6
6
 
7
7
  export class Multipliers extends APIResource {
8
8
  /**
@@ -50,13 +50,20 @@ export class Multipliers extends APIResource {
50
50
  return this._client.get('/api/loyalty/multipliers', { query, ...options });
51
51
  }
52
52
 
53
+ /**
54
+ * Delete a loyalty multiplier by its ID.
55
+ */
56
+ delete(multiplierId: string, options?: Core.RequestOptions): Core.APIPromise<MultiplierDeleteResponse> {
57
+ return this._client.delete(`/api/loyalty/multipliers/${multiplierId}`, options);
58
+ }
59
+
53
60
  /**
54
61
  * Delete a loyalty multiplier by its external identifier.
55
62
  */
56
- delete(
57
- body: MultiplierDeleteParams,
63
+ deleteByExternalId(
64
+ body: MultiplierDeleteByExternalIDParams,
58
65
  options?: Core.RequestOptions,
59
- ): Core.APIPromise<MultiplierDeleteResponse> {
66
+ ): Core.APIPromise<MultiplierDeleteByExternalIDResponse> {
60
67
  return this._client.delete('/api/loyalty/multipliers', { body, ...options });
61
68
  }
62
69
  }
@@ -180,10 +187,14 @@ export namespace MultiplierListResponse {
180
187
  }
181
188
  }
182
189
 
190
+ export interface MultiplierDeleteResponse {
191
+ id: string;
192
+ }
193
+
183
194
  /**
184
195
  * Schema for loyalty multiplier
185
196
  */
186
- export interface MultiplierDeleteResponse {
197
+ export interface MultiplierDeleteByExternalIDResponse {
187
198
  id: string;
188
199
 
189
200
  createdAt: string;
@@ -202,14 +213,14 @@ export interface MultiplierDeleteResponse {
202
213
 
203
214
  updatedAt: string;
204
215
 
205
- user: MultiplierDeleteResponse.User;
216
+ user: MultiplierDeleteByExternalIDResponse.User;
206
217
 
207
218
  userId: string;
208
219
 
209
220
  websiteId: string;
210
221
  }
211
222
 
212
- export namespace MultiplierDeleteResponse {
223
+ export namespace MultiplierDeleteByExternalIDResponse {
213
224
  export interface User {
214
225
  id: string;
215
226
 
@@ -265,7 +276,7 @@ export interface MultiplierListParams {
265
276
  websiteId?: string;
266
277
  }
267
278
 
268
- export interface MultiplierDeleteParams {
279
+ export interface MultiplierDeleteByExternalIDParams {
269
280
  externalIdentifier: string;
270
281
  }
271
282
 
@@ -275,9 +286,10 @@ export declare namespace Multipliers {
275
286
  type MultiplierUpdateResponse as MultiplierUpdateResponse,
276
287
  type MultiplierListResponse as MultiplierListResponse,
277
288
  type MultiplierDeleteResponse as MultiplierDeleteResponse,
289
+ type MultiplierDeleteByExternalIDResponse as MultiplierDeleteByExternalIDResponse,
278
290
  type MultiplierCreateParams as MultiplierCreateParams,
279
291
  type MultiplierUpdateParams as MultiplierUpdateParams,
280
292
  type MultiplierListParams as MultiplierListParams,
281
- type MultiplierDeleteParams as MultiplierDeleteParams,
293
+ type MultiplierDeleteByExternalIDParams as MultiplierDeleteByExternalIDParams,
282
294
  };
283
295
  }
@@ -1,16 +1,13 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../resource';
4
- import * as Core from '../../core';
3
+ import { APIResource } from '../../../resource';
4
+ import * as Core from '../../../core';
5
5
 
6
6
  export class RuleEdits extends APIResource {
7
7
  /**
8
8
  * Retrieve configured loyalty rule edits with optional pagination and filters
9
9
  */
10
- retrieve(
11
- query: RuleEditRetrieveParams,
12
- options?: Core.RequestOptions,
13
- ): Core.APIPromise<RuleEditRetrieveResponse> {
10
+ list(query: RuleEditListParams, options?: Core.RequestOptions): Core.APIPromise<RuleEditListResponse> {
14
11
  return this._client.get('/api/loyalty/rule_edits', { query, ...options });
15
12
  }
16
13
 
@@ -26,13 +23,13 @@ export class RuleEdits extends APIResource {
26
23
  }
27
24
  }
28
25
 
29
- export interface RuleEditRetrieveResponse {
30
- data: Array<RuleEditRetrieveResponse.Data>;
26
+ export interface RuleEditListResponse {
27
+ data: Array<RuleEditListResponse.Data>;
31
28
 
32
29
  hasNextPage: boolean;
33
30
  }
34
31
 
35
- export namespace RuleEditRetrieveResponse {
32
+ export namespace RuleEditListResponse {
36
33
  export interface Data {
37
34
  /**
38
35
  * Unique identifier for the rule edit
@@ -382,7 +379,7 @@ export namespace RuleEditRestoreResponse {
382
379
  }
383
380
  }
384
381
 
385
- export interface RuleEditRetrieveParams {
382
+ export interface RuleEditListParams {
386
383
  /**
387
384
  * ID of the loyalty rule
388
385
  */
@@ -413,9 +410,9 @@ export interface RuleEditRestoreParams {}
413
410
 
414
411
  export declare namespace RuleEdits {
415
412
  export {
416
- type RuleEditRetrieveResponse as RuleEditRetrieveResponse,
413
+ type RuleEditListResponse as RuleEditListResponse,
417
414
  type RuleEditRestoreResponse as RuleEditRestoreResponse,
418
- type RuleEditRetrieveParams as RuleEditRetrieveParams,
415
+ type RuleEditListParams as RuleEditListParams,
419
416
  type RuleEditRestoreParams as RuleEditRestoreParams,
420
417
  };
421
418
  }
@@ -1,8 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../resource';
4
- import { isRequestOptions } from '../../core';
5
- import * as Core from '../../core';
3
+ import { APIResource } from '../../../resource';
4
+ import { isRequestOptions } from '../../../core';
5
+ import * as Core from '../../../core';
6
6
 
7
7
  export class Rules extends APIResource {
8
8
  /**
@@ -50,7 +50,7 @@ export class Rules extends APIResource {
50
50
  * endpoint currently only supports following rule types code_entry, text_input,
51
51
  * link_click, discord_member, connect_wallet, check_in, external_rule,
52
52
  * drip_x_follow, drip_x_new_tweet, drip_x_text_in_bio, drip_x_text_in_name,
53
- * drip_x_text_in_comment, drip_x_tweet, telegram_join
53
+ * drip_x_text_in_comment, drip_x_tweet, telegram_join, DiscordMessages
54
54
  */
55
55
  complete(
56
56
  id: string,
@@ -72,7 +72,10 @@ export class Rules extends APIResource {
72
72
  /**
73
73
  * This will return the processing status of quests for a specific user
74
74
  */
75
- status(query: RuleStatusParams, options?: Core.RequestOptions): Core.APIPromise<RuleStatusResponse> {
75
+ getStatus(
76
+ query: RuleGetStatusParams,
77
+ options?: Core.RequestOptions,
78
+ ): Core.APIPromise<RuleGetStatusResponse> {
76
79
  return this._client.get('/api/loyalty/rules/status', { query, ...options });
77
80
  }
78
81
  }
@@ -231,7 +234,7 @@ export interface RuleCreateResponse {
231
234
  /**
232
235
  * Interval between rule executions
233
236
  */
234
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | null;
237
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
235
238
 
236
239
  /**
237
240
  * Whether this rule is mandatory
@@ -270,12 +273,16 @@ export interface RuleCreateResponse {
270
273
  | 'campTestnet'
271
274
  | 'sui'
272
275
  | 'vanar'
276
+ | 'superseed'
277
+ | 'superseedSepolia'
273
278
  | 'sepolia'
274
279
  | 'optimism_sepolia'
275
280
  | 'arbitrumSepolia'
276
281
  | 'goerli'
277
282
  | 'optimism_goerli'
278
- | 'arbitrumGoerli';
283
+ | 'arbitrumGoerli'
284
+ | 'basecamp'
285
+ | 'abstract';
279
286
 
280
287
  /**
281
288
  * OAuth credentials associated with the rule
@@ -443,6 +450,11 @@ export namespace RuleCreateResponse {
443
450
  */
444
451
  onlyNonListed?: boolean;
445
452
 
453
+ /**
454
+ * Indicates if only existing users are rewarded.
455
+ */
456
+ onlyRewardExistingUser?: boolean;
457
+
446
458
  /**
447
459
  * give points for only one token ownership per contract
448
460
  */
@@ -629,12 +641,16 @@ export namespace RuleCreateResponse {
629
641
  | 'campTestnet'
630
642
  | 'sui'
631
643
  | 'vanar'
644
+ | 'superseed'
645
+ | 'superseedSepolia'
632
646
  | 'sepolia'
633
647
  | 'optimism_sepolia'
634
648
  | 'arbitrumSepolia'
635
649
  | 'goerli'
636
650
  | 'optimism_goerli'
637
- | 'arbitrumGoerli';
651
+ | 'arbitrumGoerli'
652
+ | 'basecamp'
653
+ | 'abstract';
638
654
  }
639
655
 
640
656
  /**
@@ -943,12 +959,16 @@ export namespace RuleCreateResponse {
943
959
  | 'campTestnet'
944
960
  | 'sui'
945
961
  | 'vanar'
962
+ | 'superseed'
963
+ | 'superseedSepolia'
946
964
  | 'sepolia'
947
965
  | 'optimism_sepolia'
948
966
  | 'arbitrumSepolia'
949
967
  | 'goerli'
950
968
  | 'optimism_goerli'
951
- | 'arbitrumGoerli';
969
+ | 'arbitrumGoerli'
970
+ | 'basecamp'
971
+ | 'abstract';
952
972
  }
953
973
  }
954
974
 
@@ -1018,7 +1038,7 @@ export interface RuleUpdateResponse {
1018
1038
  /**
1019
1039
  * Time interval for recurring rule execution
1020
1040
  */
1021
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | null;
1041
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1022
1042
 
1023
1043
  /**
1024
1044
  * Whether this rule is required for participation
@@ -1062,12 +1082,16 @@ export interface RuleUpdateResponse {
1062
1082
  | 'campTestnet'
1063
1083
  | 'sui'
1064
1084
  | 'vanar'
1085
+ | 'superseed'
1086
+ | 'superseedSepolia'
1065
1087
  | 'sepolia'
1066
1088
  | 'optimism_sepolia'
1067
1089
  | 'arbitrumSepolia'
1068
1090
  | 'goerli'
1069
1091
  | 'optimism_goerli'
1070
- | 'arbitrumGoerli';
1092
+ | 'arbitrumGoerli'
1093
+ | 'basecamp'
1094
+ | 'abstract';
1071
1095
 
1072
1096
  /**
1073
1097
  * ID for associated OAuth credentials
@@ -1124,12 +1148,16 @@ export namespace RuleUpdateResponse {
1124
1148
  | 'campTestnet'
1125
1149
  | 'sui'
1126
1150
  | 'vanar'
1151
+ | 'superseed'
1152
+ | 'superseedSepolia'
1127
1153
  | 'sepolia'
1128
1154
  | 'optimism_sepolia'
1129
1155
  | 'arbitrumSepolia'
1130
1156
  | 'goerli'
1131
1157
  | 'optimism_goerli'
1132
- | 'arbitrumGoerli';
1158
+ | 'arbitrumGoerli'
1159
+ | 'basecamp'
1160
+ | 'abstract';
1133
1161
  }
1134
1162
 
1135
1163
  /**
@@ -1281,6 +1309,11 @@ export namespace RuleUpdateResponse {
1281
1309
  */
1282
1310
  onlyNonListed?: boolean;
1283
1311
 
1312
+ /**
1313
+ * Indicates if only existing users are rewarded.
1314
+ */
1315
+ onlyRewardExistingUser?: boolean;
1316
+
1284
1317
  /**
1285
1318
  * give points for only one token ownership per contract
1286
1319
  */
@@ -1467,12 +1500,16 @@ export namespace RuleUpdateResponse {
1467
1500
  | 'campTestnet'
1468
1501
  | 'sui'
1469
1502
  | 'vanar'
1503
+ | 'superseed'
1504
+ | 'superseedSepolia'
1470
1505
  | 'sepolia'
1471
1506
  | 'optimism_sepolia'
1472
1507
  | 'arbitrumSepolia'
1473
1508
  | 'goerli'
1474
1509
  | 'optimism_goerli'
1475
- | 'arbitrumGoerli';
1510
+ | 'arbitrumGoerli'
1511
+ | 'basecamp'
1512
+ | 'abstract';
1476
1513
  }
1477
1514
 
1478
1515
  /**
@@ -1827,11 +1864,11 @@ export interface RuleCompleteResponse {
1827
1864
  message: string;
1828
1865
  }
1829
1866
 
1830
- export interface RuleStatusResponse {
1831
- data: Array<RuleStatusResponse.Data>;
1867
+ export interface RuleGetStatusResponse {
1868
+ data: Array<RuleGetStatusResponse.Data>;
1832
1869
  }
1833
1870
 
1834
- export namespace RuleStatusResponse {
1871
+ export namespace RuleGetStatusResponse {
1835
1872
  export interface Data {
1836
1873
  loyaltyRuleId: string;
1837
1874
 
@@ -1995,7 +2032,7 @@ export interface RuleCreateParams {
1995
2032
  /**
1996
2033
  * Interval between rule executions
1997
2034
  */
1998
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | null;
2035
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1999
2036
 
2000
2037
  /**
2001
2038
  * Whether this rule is mandatory
@@ -2034,12 +2071,16 @@ export interface RuleCreateParams {
2034
2071
  | 'campTestnet'
2035
2072
  | 'sui'
2036
2073
  | 'vanar'
2074
+ | 'superseed'
2075
+ | 'superseedSepolia'
2037
2076
  | 'sepolia'
2038
2077
  | 'optimism_sepolia'
2039
2078
  | 'arbitrumSepolia'
2040
2079
  | 'goerli'
2041
2080
  | 'optimism_goerli'
2042
- | 'arbitrumGoerli';
2081
+ | 'arbitrumGoerli'
2082
+ | 'basecamp'
2083
+ | 'abstract';
2043
2084
 
2044
2085
  /**
2045
2086
  * OAuth credentials associated with the rule
@@ -2207,6 +2248,11 @@ export namespace RuleCreateParams {
2207
2248
  */
2208
2249
  onlyNonListed?: boolean;
2209
2250
 
2251
+ /**
2252
+ * Indicates if only existing users are rewarded.
2253
+ */
2254
+ onlyRewardExistingUser?: boolean;
2255
+
2210
2256
  /**
2211
2257
  * give points for only one token ownership per contract
2212
2258
  */
@@ -2393,12 +2439,16 @@ export namespace RuleCreateParams {
2393
2439
  | 'campTestnet'
2394
2440
  | 'sui'
2395
2441
  | 'vanar'
2442
+ | 'superseed'
2443
+ | 'superseedSepolia'
2396
2444
  | 'sepolia'
2397
2445
  | 'optimism_sepolia'
2398
2446
  | 'arbitrumSepolia'
2399
2447
  | 'goerli'
2400
2448
  | 'optimism_goerli'
2401
- | 'arbitrumGoerli';
2449
+ | 'arbitrumGoerli'
2450
+ | 'basecamp'
2451
+ | 'abstract';
2402
2452
  }
2403
2453
 
2404
2454
  /**
@@ -2707,12 +2757,16 @@ export namespace RuleCreateParams {
2707
2757
  | 'campTestnet'
2708
2758
  | 'sui'
2709
2759
  | 'vanar'
2760
+ | 'superseed'
2761
+ | 'superseedSepolia'
2710
2762
  | 'sepolia'
2711
2763
  | 'optimism_sepolia'
2712
2764
  | 'arbitrumSepolia'
2713
2765
  | 'goerli'
2714
2766
  | 'optimism_goerli'
2715
- | 'arbitrumGoerli';
2767
+ | 'arbitrumGoerli'
2768
+ | 'basecamp'
2769
+ | 'abstract';
2716
2770
  }
2717
2771
  }
2718
2772
 
@@ -2780,7 +2834,7 @@ export interface RuleUpdateParams {
2780
2834
  /**
2781
2835
  * Time interval for recurring rule execution
2782
2836
  */
2783
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | null;
2837
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
2784
2838
 
2785
2839
  /**
2786
2840
  * Whether this rule is required for participation
@@ -2824,12 +2878,16 @@ export interface RuleUpdateParams {
2824
2878
  | 'campTestnet'
2825
2879
  | 'sui'
2826
2880
  | 'vanar'
2881
+ | 'superseed'
2882
+ | 'superseedSepolia'
2827
2883
  | 'sepolia'
2828
2884
  | 'optimism_sepolia'
2829
2885
  | 'arbitrumSepolia'
2830
2886
  | 'goerli'
2831
2887
  | 'optimism_goerli'
2832
- | 'arbitrumGoerli';
2888
+ | 'arbitrumGoerli'
2889
+ | 'basecamp'
2890
+ | 'abstract';
2833
2891
 
2834
2892
  /**
2835
2893
  * ID for associated OAuth credentials
@@ -2886,12 +2944,16 @@ export namespace RuleUpdateParams {
2886
2944
  | 'campTestnet'
2887
2945
  | 'sui'
2888
2946
  | 'vanar'
2947
+ | 'superseed'
2948
+ | 'superseedSepolia'
2889
2949
  | 'sepolia'
2890
2950
  | 'optimism_sepolia'
2891
2951
  | 'arbitrumSepolia'
2892
2952
  | 'goerli'
2893
2953
  | 'optimism_goerli'
2894
- | 'arbitrumGoerli';
2954
+ | 'arbitrumGoerli'
2955
+ | 'basecamp'
2956
+ | 'abstract';
2895
2957
  }
2896
2958
 
2897
2959
  /**
@@ -3043,6 +3105,11 @@ export namespace RuleUpdateParams {
3043
3105
  */
3044
3106
  onlyNonListed?: boolean;
3045
3107
 
3108
+ /**
3109
+ * Indicates if only existing users are rewarded.
3110
+ */
3111
+ onlyRewardExistingUser?: boolean;
3112
+
3046
3113
  /**
3047
3114
  * give points for only one token ownership per contract
3048
3115
  */
@@ -3229,12 +3296,16 @@ export namespace RuleUpdateParams {
3229
3296
  | 'campTestnet'
3230
3297
  | 'sui'
3231
3298
  | 'vanar'
3299
+ | 'superseed'
3300
+ | 'superseedSepolia'
3232
3301
  | 'sepolia'
3233
3302
  | 'optimism_sepolia'
3234
3303
  | 'arbitrumSepolia'
3235
3304
  | 'goerli'
3236
3305
  | 'optimism_goerli'
3237
- | 'arbitrumGoerli';
3306
+ | 'arbitrumGoerli'
3307
+ | 'basecamp'
3308
+ | 'abstract';
3238
3309
  }
3239
3310
 
3240
3311
  /**
@@ -3576,7 +3647,7 @@ export interface RuleCompleteParams {
3576
3647
  walletAddress?: string;
3577
3648
  }
3578
3649
 
3579
- export interface RuleStatusParams {
3650
+ export interface RuleGetStatusParams {
3580
3651
  organizationId: string;
3581
3652
 
3582
3653
  websiteId: string;
@@ -3591,11 +3662,11 @@ export declare namespace Rules {
3591
3662
  type RuleListResponse as RuleListResponse,
3592
3663
  type RuleDeleteResponse as RuleDeleteResponse,
3593
3664
  type RuleCompleteResponse as RuleCompleteResponse,
3594
- type RuleStatusResponse as RuleStatusResponse,
3665
+ type RuleGetStatusResponse as RuleGetStatusResponse,
3595
3666
  type RuleCreateParams as RuleCreateParams,
3596
3667
  type RuleUpdateParams as RuleUpdateParams,
3597
3668
  type RuleListParams as RuleListParams,
3598
3669
  type RuleCompleteParams as RuleCompleteParams,
3599
- type RuleStatusParams as RuleStatusParams,
3670
+ type RuleGetStatusParams as RuleGetStatusParams,
3600
3671
  };
3601
3672
  }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './loyalty/index';
@@ -7,10 +7,10 @@ export class Minting extends APIResource {
7
7
  /**
8
8
  * Returns minting assets and any relevant context
9
9
  */
10
- getMintingAssets(
11
- query: MintingGetMintingAssetsParams,
10
+ getAssets(
11
+ query: MintingGetAssetsParams,
12
12
  options?: Core.RequestOptions,
13
- ): Core.APIPromise<MintingGetMintingAssetsResponse> {
13
+ ): Core.APIPromise<MintingGetAssetsResponse> {
14
14
  return this._client.get('/api/minting/assets', { query, ...options });
15
15
  }
16
16
  }
@@ -18,11 +18,11 @@ export class Minting extends APIResource {
18
18
  /**
19
19
  * Schema for getting minting assets response
20
20
  */
21
- export interface MintingGetMintingAssetsResponse {
21
+ export interface MintingGetAssetsResponse {
22
22
  /**
23
23
  * Array of minting assets
24
24
  */
25
- data: Array<MintingGetMintingAssetsResponse.Data>;
25
+ data: Array<MintingGetAssetsResponse.Data>;
26
26
 
27
27
  /**
28
28
  * Indicates if more pages are available
@@ -30,7 +30,7 @@ export interface MintingGetMintingAssetsResponse {
30
30
  hasNextPage: boolean;
31
31
  }
32
32
 
33
- export namespace MintingGetMintingAssetsResponse {
33
+ export namespace MintingGetAssetsResponse {
34
34
  export interface Data {
35
35
  /**
36
36
  * UUID of the minting asset
@@ -39,7 +39,7 @@ export namespace MintingGetMintingAssetsResponse {
39
39
  }
40
40
  }
41
41
 
42
- export interface MintingGetMintingAssetsParams {
42
+ export interface MintingGetAssetsParams {
43
43
  /**
44
44
  * Organization ID
45
45
  */
@@ -81,7 +81,7 @@ export interface MintingGetMintingAssetsParams {
81
81
  mintingContractAssetId?: string | null;
82
82
 
83
83
  /**
84
- * Minting Contract IDs
84
+ * Comma-separated list of Minting Contract UUIDs
85
85
  */
86
86
  mintingContractIds?: string | null;
87
87
 
@@ -112,12 +112,16 @@ export interface MintingGetMintingAssetsParams {
112
112
  | 'campTestnet'
113
113
  | 'sui'
114
114
  | 'vanar'
115
+ | 'superseed'
116
+ | 'superseedSepolia'
115
117
  | 'sepolia'
116
118
  | 'optimism_sepolia'
117
119
  | 'arbitrumSepolia'
118
120
  | 'goerli'
119
121
  | 'optimism_goerli'
120
- | 'arbitrumGoerli';
122
+ | 'arbitrumGoerli'
123
+ | 'basecamp'
124
+ | 'abstract';
121
125
 
122
126
  /**
123
127
  * Sort Dir
@@ -147,7 +151,7 @@ export interface MintingGetMintingAssetsParams {
147
151
 
148
152
  export declare namespace Minting {
149
153
  export {
150
- type MintingGetMintingAssetsResponse as MintingGetMintingAssetsResponse,
151
- type MintingGetMintingAssetsParams as MintingGetMintingAssetsParams,
154
+ type MintingGetAssetsResponse as MintingGetAssetsResponse,
155
+ type MintingGetAssetsParams as MintingGetAssetsParams,
152
156
  };
153
157
  }
@@ -0,0 +1,10 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Referral, type ReferralCreateCodeResponse, type ReferralCreateCodeParams } from './referral';
4
+ export {
5
+ Users,
6
+ type UserCreateResponse,
7
+ type UserListResponse,
8
+ type UserCreateParams,
9
+ type UserListParams,
10
+ } from './users';
@@ -0,0 +1,70 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../resource';
4
+ import { isRequestOptions } from '../../../core';
5
+ import * as Core from '../../../core';
6
+ import * as UsersAPI from './users';
7
+ import { UserCreateParams, UserCreateResponse, UserListParams, UserListResponse, Users } from './users';
8
+
9
+ export class Referral extends APIResource {
10
+ users: UsersAPI.Users = new UsersAPI.Users(this._client);
11
+
12
+ /**
13
+ * This endpoint allows you to create a referral code
14
+ */
15
+ createCode(
16
+ body?: ReferralCreateCodeParams,
17
+ options?: Core.RequestOptions,
18
+ ): Core.APIPromise<ReferralCreateCodeResponse>;
19
+ createCode(options?: Core.RequestOptions): Core.APIPromise<ReferralCreateCodeResponse>;
20
+ createCode(
21
+ body: ReferralCreateCodeParams | Core.RequestOptions = {},
22
+ options?: Core.RequestOptions,
23
+ ): Core.APIPromise<ReferralCreateCodeResponse> {
24
+ if (isRequestOptions(body)) {
25
+ return this.createCode({}, body);
26
+ }
27
+ return this._client.post('/api/referral/codes', { body, ...options });
28
+ }
29
+ }
30
+
31
+ export interface ReferralCreateCodeResponse {
32
+ id: string;
33
+
34
+ createdAt: string;
35
+
36
+ deletedAt: string | null;
37
+
38
+ organizationId: string;
39
+
40
+ referralCode: string;
41
+
42
+ updatedAt: string;
43
+
44
+ userId: string;
45
+
46
+ websiteId: string;
47
+ }
48
+
49
+ export interface ReferralCreateCodeParams {
50
+ loyaltyRuleId?: string;
51
+
52
+ userId?: string;
53
+ }
54
+
55
+ Referral.Users = Users;
56
+
57
+ export declare namespace Referral {
58
+ export {
59
+ type ReferralCreateCodeResponse as ReferralCreateCodeResponse,
60
+ type ReferralCreateCodeParams as ReferralCreateCodeParams,
61
+ };
62
+
63
+ export {
64
+ Users as Users,
65
+ type UserCreateResponse as UserCreateResponse,
66
+ type UserListResponse as UserListResponse,
67
+ type UserCreateParams as UserCreateParams,
68
+ type UserListParams as UserListParams,
69
+ };
70
+ }