@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
@@ -0,0 +1,1297 @@
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 AccountsAPI from './accounts';
7
+ import {
8
+ AccountGetRankParams,
9
+ AccountGetRankResponse,
10
+ AccountListParams,
11
+ AccountListResponse,
12
+ Accounts,
13
+ } from './accounts';
14
+ import * as BadgesAPI from './badges';
15
+ import {
16
+ BadgeCreateParams,
17
+ BadgeCreateResponse,
18
+ BadgeDeleteResponse,
19
+ BadgeListParams,
20
+ BadgeListResponse,
21
+ BadgeRevokeParams,
22
+ BadgeRevokeResponse,
23
+ BadgeRewardParams,
24
+ BadgeRewardResponse,
25
+ BadgeUpdateParams,
26
+ BadgeUpdateResponse,
27
+ Badges,
28
+ } from './badges';
29
+ import * as CurrenciesAPI from './currencies';
30
+ import {
31
+ Currencies,
32
+ CurrencyCreateParams,
33
+ CurrencyCreateResponse,
34
+ CurrencyListParams,
35
+ CurrencyListResponse,
36
+ } from './currencies';
37
+ import * as MultipliersAPI from './multipliers';
38
+ import {
39
+ MultiplierCreateParams,
40
+ MultiplierCreateResponse,
41
+ MultiplierDeleteByExternalIDParams,
42
+ MultiplierDeleteByExternalIDResponse,
43
+ MultiplierDeleteResponse,
44
+ MultiplierListParams,
45
+ MultiplierListResponse,
46
+ MultiplierUpdateParams,
47
+ MultiplierUpdateResponse,
48
+ Multipliers,
49
+ } from './multipliers';
50
+ import * as QuestionsAPI from './questions';
51
+ import {
52
+ QuestionCreateParams,
53
+ QuestionCreateResponse,
54
+ QuestionListParams,
55
+ QuestionListResponse,
56
+ QuestionUpdateParams,
57
+ QuestionUpdateResponse,
58
+ Questions,
59
+ } from './questions';
60
+ import * as QuestionsResponsesAPI from './questions-responses';
61
+ import {
62
+ QuestionsResponseListParams,
63
+ QuestionsResponseListResponse,
64
+ QuestionsResponseSubmitParams,
65
+ QuestionsResponseSubmitResponse,
66
+ QuestionsResponses,
67
+ } from './questions-responses';
68
+ import * as RuleEditsAPI from './rule-edits';
69
+ import {
70
+ RuleEditListParams,
71
+ RuleEditListResponse,
72
+ RuleEditRestoreParams,
73
+ RuleEditRestoreResponse,
74
+ RuleEdits,
75
+ } from './rule-edits';
76
+ import * as RulesAPI from './rules';
77
+ import {
78
+ RuleCompleteParams,
79
+ RuleCompleteResponse,
80
+ RuleCreateParams,
81
+ RuleCreateResponse,
82
+ RuleDeleteResponse,
83
+ RuleGetStatusParams,
84
+ RuleGetStatusResponse,
85
+ RuleListParams,
86
+ RuleListResponse,
87
+ RuleUpdateParams,
88
+ RuleUpdateResponse,
89
+ Rules,
90
+ } from './rules';
91
+
92
+ export class Loyalty extends APIResource {
93
+ accounts: AccountsAPI.Accounts = new AccountsAPI.Accounts(this._client);
94
+ badges: BadgesAPI.Badges = new BadgesAPI.Badges(this._client);
95
+ currencies: CurrenciesAPI.Currencies = new CurrenciesAPI.Currencies(this._client);
96
+ multipliers: MultipliersAPI.Multipliers = new MultipliersAPI.Multipliers(this._client);
97
+ ruleEdits: RuleEditsAPI.RuleEdits = new RuleEditsAPI.RuleEdits(this._client);
98
+ rules: RulesAPI.Rules = new RulesAPI.Rules(this._client);
99
+ questions: QuestionsAPI.Questions = new QuestionsAPI.Questions(this._client);
100
+ questionsResponses: QuestionsResponsesAPI.QuestionsResponses = new QuestionsResponsesAPI.QuestionsResponses(
101
+ this._client,
102
+ );
103
+
104
+ /**
105
+ * Create a loyalty transaction to update account balances.
106
+ */
107
+ createTransaction(
108
+ body: LoyaltyCreateTransactionParams,
109
+ options?: Core.RequestOptions,
110
+ ): Core.APIPromise<LoyaltyCreateTransactionResponse> {
111
+ return this._client.post('/api/loyalty/transactions', { body, ...options });
112
+ }
113
+
114
+ /**
115
+ * Retrieve configured loyalty rule groups
116
+ */
117
+ getRuleGroups(
118
+ query?: LoyaltyGetRuleGroupsParams,
119
+ options?: Core.RequestOptions,
120
+ ): Core.APIPromise<LoyaltyGetRuleGroupsResponse>;
121
+ getRuleGroups(options?: Core.RequestOptions): Core.APIPromise<LoyaltyGetRuleGroupsResponse>;
122
+ getRuleGroups(
123
+ query: LoyaltyGetRuleGroupsParams | Core.RequestOptions = {},
124
+ options?: Core.RequestOptions,
125
+ ): Core.APIPromise<LoyaltyGetRuleGroupsResponse> {
126
+ if (isRequestOptions(query)) {
127
+ return this.getRuleGroups({}, query);
128
+ }
129
+ return this._client.get('/api/loyalty/rule_groups', { query, ...options });
130
+ }
131
+
132
+ /**
133
+ * Fetch loyalty transaction entries for wallets or users, representing account
134
+ * balance changes.
135
+ */
136
+ listTransactionEntries(
137
+ query?: LoyaltyListTransactionEntriesParams,
138
+ options?: Core.RequestOptions,
139
+ ): Core.APIPromise<LoyaltyListTransactionEntriesResponse>;
140
+ listTransactionEntries(
141
+ options?: Core.RequestOptions,
142
+ ): Core.APIPromise<LoyaltyListTransactionEntriesResponse>;
143
+ listTransactionEntries(
144
+ query: LoyaltyListTransactionEntriesParams | Core.RequestOptions = {},
145
+ options?: Core.RequestOptions,
146
+ ): Core.APIPromise<LoyaltyListTransactionEntriesResponse> {
147
+ if (isRequestOptions(query)) {
148
+ return this.listTransactionEntries({}, query);
149
+ }
150
+ return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
151
+ }
152
+ }
153
+
154
+ export interface LoyaltyCreateTransactionResponse {
155
+ id: string;
156
+
157
+ createdAt: string;
158
+
159
+ description: string;
160
+
161
+ entries: Array<LoyaltyCreateTransactionResponse.Entry>;
162
+
163
+ updatedAt: string;
164
+ }
165
+
166
+ export namespace LoyaltyCreateTransactionResponse {
167
+ export interface Entry {
168
+ amount: number;
169
+
170
+ /**
171
+ * Direction of the transaction entry
172
+ */
173
+ direction: 'credit' | 'debit';
174
+
175
+ walletAddress: string;
176
+
177
+ idempotencyKey?: string;
178
+ }
179
+ }
180
+
181
+ export interface LoyaltyGetRuleGroupsResponse {
182
+ data: Array<LoyaltyGetRuleGroupsResponse.Data>;
183
+
184
+ hasNextPage: boolean;
185
+ }
186
+
187
+ export namespace LoyaltyGetRuleGroupsResponse {
188
+ export interface Data {
189
+ id: string;
190
+
191
+ isCollapsible: boolean;
192
+
193
+ isRequired: boolean;
194
+
195
+ loyaltyGroupItems: Array<Data.LoyaltyGroupItem>;
196
+
197
+ name: string;
198
+
199
+ sortId: number;
200
+
201
+ subTitle: string | null;
202
+ }
203
+
204
+ export namespace Data {
205
+ export interface LoyaltyGroupItem {
206
+ id: string;
207
+
208
+ loyaltyRule: LoyaltyGroupItem.LoyaltyRule;
209
+
210
+ sortId: number;
211
+ }
212
+
213
+ export namespace LoyaltyGroupItem {
214
+ export interface LoyaltyRule {
215
+ id: string;
216
+
217
+ amount: number | null;
218
+
219
+ deletedAt: string | null;
220
+
221
+ description: string | null;
222
+
223
+ endTime: string | null;
224
+
225
+ frequency: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately' | null;
226
+
227
+ hideInUi: boolean;
228
+
229
+ isRequired: boolean;
230
+
231
+ loyaltyCurrencyId: string;
232
+
233
+ metadata: LoyaltyRule.Metadata;
234
+
235
+ name: string;
236
+
237
+ rewardType: 'points' | 'multiplier';
238
+
239
+ startTime: string | null;
240
+
241
+ type:
242
+ | 'Bonus'
243
+ | 'BoughtOn'
244
+ | 'BoughtWithRoyalties'
245
+ | 'DiscordMessages'
246
+ | 'Listing'
247
+ | 'Lodging'
248
+ | 'MintOn'
249
+ | 'PoapClaim'
250
+ | 'SnagSocialsConnected'
251
+ | 'SnapshotFullset'
252
+ | 'SnapshotHold'
253
+ | 'SoldOn'
254
+ | 'SoldWithRoyalties'
255
+ | 'TokenHold'
256
+ | 'TwitterBio'
257
+ | 'TwitterHashTagPost'
258
+ | 'Retweet'
259
+ | 'check_in'
260
+ | 'code_entry'
261
+ | 'connect_wallet'
262
+ | 'connected_discord'
263
+ | 'connected_email'
264
+ | 'connected_epic'
265
+ | 'connected_steam'
266
+ | 'connected_telegram'
267
+ | 'connected_twitter'
268
+ | 'create_partner_account'
269
+ | 'discord_member'
270
+ | 'drip_x_follow'
271
+ | 'drip_x_new_tweet'
272
+ | 'drip_x_text_in_bio'
273
+ | 'drip_x_text_in_comment'
274
+ | 'drip_x_text_in_name'
275
+ | 'drip_x_tweet'
276
+ | 'external_rule'
277
+ | 'link_click'
278
+ | 'manual_upload'
279
+ | 'profile_completed'
280
+ | 'referred_user'
281
+ | 'smart_contract_event'
282
+ | 'snapshot_governance'
283
+ | 'telegram_join'
284
+ | 'telegram_messages'
285
+ | 'text_input'
286
+ | 'token_hold_erc20'
287
+ | 'tweet_liked_by_project'
288
+ | 'twitter_comment'
289
+ | 'twitter_follow'
290
+ | 'twitter_followers'
291
+ | 'twitter_like'
292
+ | 'twitter_post_hashtag'
293
+ | 'quiz'
294
+ | 'poll';
295
+ }
296
+
297
+ export namespace LoyaltyRule {
298
+ export interface Metadata {
299
+ /**
300
+ * Text displayed on the action button.
301
+ */
302
+ buttonText?: string | null;
303
+
304
+ /**
305
+ * Flag indicating if commenting is required.
306
+ */
307
+ checkComment?: boolean | null;
308
+
309
+ /**
310
+ * Flag indicating if liking the post is required.
311
+ */
312
+ checkLike?: boolean | null;
313
+
314
+ /**
315
+ * Flag indicating if reposting is required.
316
+ */
317
+ checkRepost?: boolean | null;
318
+
319
+ /**
320
+ * Text to check in the Twitter post, username, or bio.
321
+ */
322
+ checkText?: string | null;
323
+
324
+ /**
325
+ * Array of collections associated with the rule.
326
+ */
327
+ collection?: Array<Metadata.Collection>;
328
+
329
+ /**
330
+ * Object containing details for the call-to-action.
331
+ */
332
+ cta?: Metadata.Cta | null;
333
+
334
+ /**
335
+ * API key for custom rewards integration.
336
+ */
337
+ customRewardsApiKey?: string;
338
+
339
+ /**
340
+ * Array of Discord servers, channels, and roles to join.
341
+ */
342
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
343
+
344
+ /**
345
+ * Array of drip quests required to complete the rule.
346
+ */
347
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
348
+
349
+ /**
350
+ * Flag indicating whether joining Discord servers is required.
351
+ */
352
+ enableJoinDiscordServers?: boolean | null;
353
+
354
+ /**
355
+ * Flag indicating whether streaks are enabled.
356
+ */
357
+ enableStreaks?: boolean | null;
358
+
359
+ /**
360
+ * Flag indicating whether the verified multiplier is enabled.
361
+ */
362
+ enableVerifiedMultiplier?: boolean;
363
+
364
+ /**
365
+ * Percentage reward given to a user for their first referral.
366
+ */
367
+ firstReferralReward?: number | null;
368
+
369
+ /**
370
+ * Indicates if the item has never been sold.
371
+ */
372
+ hasNeverSold?: boolean;
373
+
374
+ /**
375
+ * Indicates if the full royalty has been paid for items.
376
+ */
377
+ hasPaidFullRoyalty?: boolean;
378
+
379
+ /**
380
+ * Flag indicating if the sale currency is included.
381
+ */
382
+ hasSaleCurrency?: boolean;
383
+
384
+ /**
385
+ * Indicates if the user has a verified Twitter account.
386
+ */
387
+ hasVerifiedTwitter?: boolean;
388
+
389
+ /**
390
+ * URL of the image associated with the rule.
391
+ */
392
+ imageUrl?: string | null;
393
+
394
+ /**
395
+ * Indicates if the multiplier has been applied to rewards.
396
+ */
397
+ isMultiplierApplied?: boolean;
398
+
399
+ /**
400
+ * Flag indicating if rewards are applied retroactively.
401
+ */
402
+ isRetroactive?: boolean | null;
403
+
404
+ /**
405
+ * Flag indicating if the token hold multiplier is applied.
406
+ */
407
+ isTokenHoldMultiplier?: boolean;
408
+
409
+ /**
410
+ * Optional link associated with the metadata.
411
+ */
412
+ link?: string | null;
413
+
414
+ /**
415
+ * Maximum quantity constraint for token holding.
416
+ */
417
+ maxQty?: number | null;
418
+
419
+ /**
420
+ * Minimum quantity constraint for token holding.
421
+ */
422
+ minQty?: number | null;
423
+
424
+ /**
425
+ * Array of loyalty currency IDs used for multipliers.
426
+ */
427
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
428
+
429
+ /**
430
+ * Flag indicating whether to include only known users.
431
+ */
432
+ onlyKnownUsers?: boolean;
433
+
434
+ /**
435
+ * Flag indicating whether to include only native tokens.
436
+ */
437
+ onlyNative?: boolean;
438
+
439
+ /**
440
+ * Flag indicating whether to include only non-listed items.
441
+ */
442
+ onlyNonListed?: boolean;
443
+
444
+ /**
445
+ * Indicates if only existing users are rewarded.
446
+ */
447
+ onlyRewardExistingUser?: boolean;
448
+
449
+ /**
450
+ * give points for only one token ownership per contract
451
+ */
452
+ onlyRewardSingleTokenOwnership?: boolean | null;
453
+
454
+ /**
455
+ * Promotional code associated with the rule.
456
+ */
457
+ promoCode?: string;
458
+
459
+ /**
460
+ * Array defining ranges and corresponding rewards.
461
+ */
462
+ range?: Array<Metadata.Range>;
463
+
464
+ /**
465
+ * Object defining referral requirements.
466
+ */
467
+ referralRequirements?: Metadata.ReferralRequirements | null;
468
+
469
+ /**
470
+ * Lump sum reward given to a referrer.
471
+ */
472
+ referrerReward?: number | null;
473
+
474
+ /**
475
+ * Flag indicating if rewards are given per impression.
476
+ */
477
+ rewardPerImpression?: boolean | null;
478
+
479
+ /**
480
+ * Currency associated with sales.
481
+ */
482
+ saleCurrency?: string;
483
+
484
+ /**
485
+ * Percentage reward given for a second-level referral.
486
+ */
487
+ secondReferralReward?: number | null;
488
+
489
+ /**
490
+ * Flag indicating if the multiplier is skipped.
491
+ */
492
+ skipMultiplier?: boolean | null;
493
+
494
+ /**
495
+ * Object containing details of the associated smart contract.
496
+ */
497
+ smartContract?: Metadata.SmartContract;
498
+
499
+ /**
500
+ * Array of snapshot proposals for the rule.
501
+ */
502
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
503
+
504
+ /**
505
+ * Social media platform associated with the rule.
506
+ */
507
+ socialPlatform?:
508
+ | 'Custom'
509
+ | 'Discord'
510
+ | 'EpicGames'
511
+ | 'Instagram'
512
+ | 'Steam'
513
+ | 'Telegram'
514
+ | 'TikTok'
515
+ | 'Twitch'
516
+ | 'X(Twitter)'
517
+ | 'YouTube'
518
+ | null;
519
+
520
+ /**
521
+ * URL of the social platform's logo.
522
+ */
523
+ socialPlatformLogo?: string | null;
524
+
525
+ /**
526
+ * Name of the social platform.
527
+ */
528
+ socialPlatformName?: string | null;
529
+
530
+ /**
531
+ * Array of streak milestones and corresponding rewards.
532
+ */
533
+ streakArray?: Array<Metadata.StreakArray> | null;
534
+
535
+ /**
536
+ * ID of the Telegram channel.
537
+ */
538
+ telegramChannelId?: string | null;
539
+
540
+ /**
541
+ * Time delay in seconds to verify actions.
542
+ */
543
+ timeDelayToVerifySeconds?: string | number | null;
544
+
545
+ /**
546
+ * Flag indicating if all contracts are tracked.
547
+ */
548
+ trackAllContracts?: boolean | null;
549
+
550
+ /**
551
+ * URL of the associated Twitter account.
552
+ */
553
+ twitterAccountUrl?: string;
554
+
555
+ /**
556
+ * Hashtag associated with the Twitter post.
557
+ */
558
+ twitterHashtag?: string;
559
+
560
+ /**
561
+ * URL of the associated Twitter post.
562
+ */
563
+ twitterPostUrl?: string;
564
+
565
+ /**
566
+ * Unique identifier of the Twitter user.
567
+ */
568
+ twitterUserId?: string;
569
+
570
+ /**
571
+ * Twitter username of the user.
572
+ */
573
+ twitterUsername?: string;
574
+
575
+ /**
576
+ * Minimum length of the verification text.
577
+ */
578
+ verificationTextMinimumLength?: number | null;
579
+
580
+ /**
581
+ * Multiplier applied to rewards for verified users.
582
+ */
583
+ verifiedMultiplier?: number | null;
584
+
585
+ /**
586
+ * Placeholder text for verification input fields.
587
+ */
588
+ verifyPlaceHolderText?: string | null;
589
+
590
+ /**
591
+ * Type of wallet associated with the rule.
592
+ */
593
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
594
+ }
595
+
596
+ export namespace Metadata {
597
+ export interface Collection {
598
+ /**
599
+ * Blockchain address of the collection.
600
+ */
601
+ address?: string;
602
+
603
+ /**
604
+ * Multiplier applied to the rewards for this collection.
605
+ */
606
+ multiplier?: number;
607
+
608
+ /**
609
+ * Blockchain network of the collection.
610
+ */
611
+ network?:
612
+ | 'mainnet'
613
+ | 'polygon'
614
+ | 'polygon_mumbai'
615
+ | 'optimism'
616
+ | 'arbitrum'
617
+ | 'binance'
618
+ | 'bscTestnet'
619
+ | 'avalanche'
620
+ | 'avalancheFuji'
621
+ | 'zksync'
622
+ | 'fantom'
623
+ | 'fantomTestnet'
624
+ | 'base'
625
+ | 'baseSepolia'
626
+ | 'skaleNebula'
627
+ | 'xai'
628
+ | 'berachainArtio'
629
+ | 'solana'
630
+ | 'apechain'
631
+ | 'flowMainnet'
632
+ | 'campTestnet'
633
+ | 'sui'
634
+ | 'vanar'
635
+ | 'superseed'
636
+ | 'superseedSepolia'
637
+ | 'sepolia'
638
+ | 'optimism_sepolia'
639
+ | 'arbitrumSepolia'
640
+ | 'goerli'
641
+ | 'optimism_goerli'
642
+ | 'arbitrumGoerli'
643
+ | 'basecamp'
644
+ | 'abstract';
645
+ }
646
+
647
+ /**
648
+ * Object containing details for the call-to-action.
649
+ */
650
+ export interface Cta {
651
+ /**
652
+ * Link for the call-to-action.
653
+ */
654
+ href?: string | null;
655
+
656
+ /**
657
+ * Label for the call-to-action.
658
+ */
659
+ label?: string | null;
660
+ }
661
+
662
+ export interface DiscordServersToJoin {
663
+ /**
664
+ * ID of the Discord server to join.
665
+ */
666
+ id?: string;
667
+
668
+ /**
669
+ * Array of Discord channels to join.
670
+ */
671
+ channels?: Array<DiscordServersToJoin.Channel>;
672
+
673
+ /**
674
+ * Array of roles to assign in the Discord server.
675
+ */
676
+ roles?: Array<DiscordServersToJoin.Role>;
677
+ }
678
+
679
+ export namespace DiscordServersToJoin {
680
+ export interface Channel {
681
+ /**
682
+ * ID of the Discord channel.
683
+ */
684
+ id?: string;
685
+
686
+ /**
687
+ * Array of emojis used in the channel.
688
+ */
689
+ emojis?: Array<Channel.Emoji>;
690
+
691
+ /**
692
+ * Phrase of text to be present in the discord message
693
+ */
694
+ text?: string;
695
+ }
696
+
697
+ export namespace Channel {
698
+ export interface Emoji {
699
+ /**
700
+ * ID of the emoji used in the channel.
701
+ */
702
+ id?: string;
703
+ }
704
+ }
705
+
706
+ export interface Role {
707
+ /**
708
+ * ID of the role in the Discord server.
709
+ */
710
+ id: string;
711
+ }
712
+ }
713
+
714
+ export interface DripQuestsToComplete {
715
+ /**
716
+ * ID of the drip quest to complete.
717
+ */
718
+ id: string;
719
+ }
720
+
721
+ export interface Range {
722
+ /**
723
+ * Reward amount for this range.
724
+ */
725
+ amount: number;
726
+
727
+ /**
728
+ * End value of the range.
729
+ */
730
+ endRange: number;
731
+
732
+ /**
733
+ * Start value of the range.
734
+ */
735
+ startRange: number;
736
+ }
737
+
738
+ /**
739
+ * Object defining referral requirements.
740
+ */
741
+ export interface ReferralRequirements {
742
+ /**
743
+ * Flag indicating if achieving points is required.
744
+ */
745
+ achievePoints?: boolean | null;
746
+
747
+ /**
748
+ * Flag indicating if completing the profile is required.
749
+ */
750
+ completeProfile?: boolean | null;
751
+
752
+ /**
753
+ * Flag indicating if connecting Discord is required.
754
+ */
755
+ connectDiscord?: boolean | null;
756
+
757
+ /**
758
+ * Flag indicating if connecting email is required.
759
+ */
760
+ connectEmail?: boolean | null;
761
+
762
+ /**
763
+ * Flag indicating if connecting Twitter is required.
764
+ */
765
+ connectTwitter?: boolean | null;
766
+
767
+ points?: ReferralRequirements.Points | null;
768
+ }
769
+
770
+ export namespace ReferralRequirements {
771
+ export interface Points {
772
+ /**
773
+ * Points required for referral.
774
+ */
775
+ amount?: number | null;
776
+
777
+ /**
778
+ * ID of the loyalty currency for referral.
779
+ */
780
+ loyaltyCurrecyId?: string | null;
781
+ }
782
+ }
783
+
784
+ /**
785
+ * Object containing details of the associated smart contract.
786
+ */
787
+ export interface SmartContract {
788
+ /**
789
+ * ABI of the smart contract.
790
+ */
791
+ abi?: string | null;
792
+
793
+ /**
794
+ * Mapping of addresses for the smart contract.
795
+ */
796
+ addressMapping?: string | null;
797
+
798
+ /**
799
+ * Array of bonus details applied to the rule.
800
+ */
801
+ bonus?: Array<SmartContract.Bonus> | null;
802
+
803
+ /**
804
+ * ID of the smart contract.
805
+ */
806
+ contractId?: string | null;
807
+
808
+ /**
809
+ * Criteria to evaluate the smart contract event.
810
+ */
811
+ criteria?: 'everyEvent' | 'byParameter' | null;
812
+
813
+ /**
814
+ * Time range applied to the rule.
815
+ */
816
+ customRange?: SmartContract.CustomRange | null;
817
+
818
+ /**
819
+ * Event emitted by the smart contract.
820
+ */
821
+ event?: string | null;
822
+
823
+ /**
824
+ * Maximum value allowed for the parameter.
825
+ */
826
+ max?: number | null;
827
+
828
+ /**
829
+ * Array of parameters for the smart contract.
830
+ */
831
+ params?: Array<SmartContract.Param> | null;
832
+
833
+ /**
834
+ * Flag indicating if a bonus is applied.
835
+ */
836
+ withBonus?: boolean | null;
837
+
838
+ /**
839
+ * Flag indicating if a custom range is applied.
840
+ */
841
+ withCustomRange?: boolean | null;
842
+
843
+ /**
844
+ * Flag indicating if a maximum limit is applied.
845
+ */
846
+ withMax?: boolean | null;
847
+ }
848
+
849
+ export namespace SmartContract {
850
+ export interface Bonus {
851
+ /**
852
+ * Amount of the bonus.
853
+ */
854
+ amount?: number | null;
855
+
856
+ /**
857
+ * Number of times the bonus is applied.
858
+ */
859
+ count?: number | null;
860
+ }
861
+
862
+ /**
863
+ * Time range applied to the rule.
864
+ */
865
+ export interface CustomRange {
866
+ /**
867
+ * End time of the custom range.
868
+ */
869
+ endsAt?: string | null;
870
+
871
+ /**
872
+ * Start time of the custom range.
873
+ */
874
+ startsAt?: string | null;
875
+ }
876
+
877
+ export interface Param {
878
+ /**
879
+ * Condition to check for the parameter.
880
+ */
881
+ condition?: string | null;
882
+
883
+ /**
884
+ * Name of the smart contract parameter.
885
+ */
886
+ name?: string | null;
887
+
888
+ /**
889
+ * Value of the parameter.
890
+ */
891
+ value?: string | null;
892
+ }
893
+ }
894
+
895
+ export interface SnapshotProposal {
896
+ /**
897
+ * ID of the snapshot proposal.
898
+ */
899
+ id: string;
900
+
901
+ /**
902
+ * Space associated with the snapshot proposal.
903
+ */
904
+ space: string;
905
+ }
906
+
907
+ export interface StreakArray {
908
+ /**
909
+ * Reward amount for achieving the streak milestone.
910
+ */
911
+ streakAmount: number;
912
+
913
+ /**
914
+ * Milestone required to achieve the streak.
915
+ */
916
+ streakMilestone: number;
917
+ }
918
+ }
919
+ }
920
+ }
921
+ }
922
+ }
923
+
924
+ export interface LoyaltyListTransactionEntriesResponse {
925
+ data: Array<LoyaltyListTransactionEntriesResponse.Data>;
926
+
927
+ hasNextPage: boolean;
928
+ }
929
+
930
+ export namespace LoyaltyListTransactionEntriesResponse {
931
+ /**
932
+ * Schema for a loyalty transaction entry
933
+ */
934
+ export interface Data {
935
+ /**
936
+ * Unique identifier for the transaction entry
937
+ */
938
+ id: string;
939
+
940
+ /**
941
+ * Amount involved in the transaction
942
+ */
943
+ amount: number;
944
+
945
+ /**
946
+ * Timestamp when the transaction entry was created
947
+ */
948
+ createdAt: string;
949
+
950
+ /**
951
+ * Direction of the transaction entry
952
+ */
953
+ direction: 'credit' | 'debit';
954
+
955
+ /**
956
+ * Unique identifier for the loyalty account
957
+ */
958
+ loyaltyAccountId: string;
959
+
960
+ /**
961
+ * Details of the loyalty transaction
962
+ */
963
+ loyaltyTransaction: Data.LoyaltyTransaction;
964
+
965
+ /**
966
+ * Unique identifier for the organization
967
+ */
968
+ organizationId: string;
969
+
970
+ /**
971
+ * Type of the loyalty transaction
972
+ */
973
+ type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
974
+
975
+ /**
976
+ * Timestamp when the transaction entry was last updated
977
+ */
978
+ updatedAt: string;
979
+
980
+ /**
981
+ * Unique identifier for the website
982
+ */
983
+ websiteId: string;
984
+
985
+ /**
986
+ * Optional metadata for the transaction entry
987
+ */
988
+ metadata?: Record<string, unknown>;
989
+ }
990
+
991
+ export namespace Data {
992
+ /**
993
+ * Details of the loyalty transaction
994
+ */
995
+ export interface LoyaltyTransaction {
996
+ /**
997
+ * Unique identifier for the loyalty transaction
998
+ */
999
+ id: string;
1000
+
1001
+ /**
1002
+ * Type of the loyalty transaction
1003
+ */
1004
+ type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
1005
+
1006
+ /**
1007
+ * Details of the loyalty rule associated with the transaction
1008
+ */
1009
+ loyaltyRule?: LoyaltyTransaction.LoyaltyRule;
1010
+ }
1011
+
1012
+ export namespace LoyaltyTransaction {
1013
+ /**
1014
+ * Details of the loyalty rule associated with the transaction
1015
+ */
1016
+ export interface LoyaltyRule {
1017
+ /**
1018
+ * Unique identifier for the loyalty rule
1019
+ */
1020
+ id: string;
1021
+
1022
+ /**
1023
+ * Type of the loyalty rule
1024
+ */
1025
+ type: string;
1026
+
1027
+ /**
1028
+ * Description of the loyalty rule
1029
+ */
1030
+ description?: string;
1031
+
1032
+ /**
1033
+ * Optional metadata for the loyalty rule
1034
+ */
1035
+ metadata?: Record<string, unknown>;
1036
+
1037
+ /**
1038
+ * Name of the loyalty rule
1039
+ */
1040
+ name?: string;
1041
+ }
1042
+ }
1043
+ }
1044
+ }
1045
+
1046
+ export interface LoyaltyCreateTransactionParams {
1047
+ /**
1048
+ * Description of the loyalty transaction
1049
+ */
1050
+ description: string;
1051
+
1052
+ /**
1053
+ * Array of transaction entries
1054
+ */
1055
+ entries: Array<LoyaltyCreateTransactionParams.Entry>;
1056
+
1057
+ /**
1058
+ * Unique identifier for the loyalty currency
1059
+ */
1060
+ loyaltyCurrencyId?: string;
1061
+ }
1062
+
1063
+ export namespace LoyaltyCreateTransactionParams {
1064
+ export interface Entry {
1065
+ /**
1066
+ * Transaction entry amount.
1067
+ */
1068
+ amount: number;
1069
+
1070
+ /**
1071
+ * Direction of the transaction entry for this wallet address
1072
+ */
1073
+ direction?: 'credit' | 'debit';
1074
+
1075
+ /**
1076
+ * Idempotency key for the transaction entry. Creation will fail if already exists
1077
+ * for this wallet address.
1078
+ */
1079
+ idempotencyKey?: string;
1080
+
1081
+ /**
1082
+ * The wallet address of the user
1083
+ */
1084
+ walletAddress?: string;
1085
+ }
1086
+ }
1087
+
1088
+ export interface LoyaltyGetRuleGroupsParams {
1089
+ excludeHidden?: string;
1090
+
1091
+ limit?: number;
1092
+
1093
+ organizationId?: string;
1094
+
1095
+ startingAfter?: string;
1096
+
1097
+ websiteId?: string;
1098
+ }
1099
+
1100
+ export interface LoyaltyListTransactionEntriesParams {
1101
+ /**
1102
+ * End date to filter by (exclusive, less than)
1103
+ */
1104
+ createdAtEnd?: string;
1105
+
1106
+ /**
1107
+ * Start date to filter by (inclusive, greater than or equal to)
1108
+ */
1109
+ createdAtStart?: string;
1110
+
1111
+ /**
1112
+ * Direction of the transaction entry to filter by
1113
+ */
1114
+ direction?: 'credit' | 'debit';
1115
+
1116
+ /**
1117
+ * Key to ensure idempotency of the request
1118
+ */
1119
+ idempotencyKey?: string;
1120
+
1121
+ /**
1122
+ * Maximum number of records to return (max 1000)
1123
+ */
1124
+ limit?: number;
1125
+
1126
+ /**
1127
+ * Unique identifier for the loyalty rule to filter by
1128
+ */
1129
+ loyaltyRuleId?: string;
1130
+
1131
+ /**
1132
+ * Unique identifier for the loyalty transaction to filter by
1133
+ */
1134
+ loyaltyTransactionId?: string;
1135
+
1136
+ /**
1137
+ * Field to order the results by
1138
+ */
1139
+ orderBy?: 'createdAt' | 'updatedAt' | 'loyaltyAccountLockVersion';
1140
+
1141
+ /**
1142
+ * Unique identifier for the organization to filter by
1143
+ */
1144
+ organizationId?: string;
1145
+
1146
+ /**
1147
+ * Pagination cursor to start after a specific resource ID
1148
+ */
1149
+ startingAfter?: string;
1150
+
1151
+ /**
1152
+ * Type of the loyalty transaction to filter by
1153
+ */
1154
+ type?: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
1155
+
1156
+ /**
1157
+ * When passed in return the list of fulfilled entries for loyalty rules. If a
1158
+ * loyalty rule has a fulfilled entry this means the user cannot currently complete
1159
+ * the rule. Must be passed in with userId or walletAddress.
1160
+ */
1161
+ userCompletedLoyaltyRuleId?: string | Array<string>;
1162
+
1163
+ /**
1164
+ * External identifier for the user group controlled by you
1165
+ */
1166
+ userGroupExternalIdentifier?: string;
1167
+
1168
+ /**
1169
+ * Unique identifier for the user group
1170
+ */
1171
+ userGroupId?: string;
1172
+
1173
+ /**
1174
+ * User ID or array of User IDs to filter by
1175
+ */
1176
+ userId?: string | Array<string>;
1177
+
1178
+ /**
1179
+ * Wallet address or array of wallet addresses to filter by
1180
+ */
1181
+ walletAddress?: string | Array<string>;
1182
+
1183
+ /**
1184
+ * Identifier for the wallet group to filter by
1185
+ */
1186
+ walletGroupIdentifier?: string;
1187
+
1188
+ /**
1189
+ * Unique identifier for the website to filter by
1190
+ */
1191
+ websiteId?: string;
1192
+ }
1193
+
1194
+ Loyalty.Accounts = Accounts;
1195
+ Loyalty.Badges = Badges;
1196
+ Loyalty.Currencies = Currencies;
1197
+ Loyalty.Multipliers = Multipliers;
1198
+ Loyalty.RuleEdits = RuleEdits;
1199
+ Loyalty.Rules = Rules;
1200
+ Loyalty.Questions = Questions;
1201
+ Loyalty.QuestionsResponses = QuestionsResponses;
1202
+
1203
+ export declare namespace Loyalty {
1204
+ export {
1205
+ type LoyaltyCreateTransactionResponse as LoyaltyCreateTransactionResponse,
1206
+ type LoyaltyGetRuleGroupsResponse as LoyaltyGetRuleGroupsResponse,
1207
+ type LoyaltyListTransactionEntriesResponse as LoyaltyListTransactionEntriesResponse,
1208
+ type LoyaltyCreateTransactionParams as LoyaltyCreateTransactionParams,
1209
+ type LoyaltyGetRuleGroupsParams as LoyaltyGetRuleGroupsParams,
1210
+ type LoyaltyListTransactionEntriesParams as LoyaltyListTransactionEntriesParams,
1211
+ };
1212
+
1213
+ export {
1214
+ Accounts as Accounts,
1215
+ type AccountListResponse as AccountListResponse,
1216
+ type AccountGetRankResponse as AccountGetRankResponse,
1217
+ type AccountListParams as AccountListParams,
1218
+ type AccountGetRankParams as AccountGetRankParams,
1219
+ };
1220
+
1221
+ export {
1222
+ Badges as Badges,
1223
+ type BadgeCreateResponse as BadgeCreateResponse,
1224
+ type BadgeUpdateResponse as BadgeUpdateResponse,
1225
+ type BadgeListResponse as BadgeListResponse,
1226
+ type BadgeDeleteResponse as BadgeDeleteResponse,
1227
+ type BadgeRevokeResponse as BadgeRevokeResponse,
1228
+ type BadgeRewardResponse as BadgeRewardResponse,
1229
+ type BadgeCreateParams as BadgeCreateParams,
1230
+ type BadgeUpdateParams as BadgeUpdateParams,
1231
+ type BadgeListParams as BadgeListParams,
1232
+ type BadgeRevokeParams as BadgeRevokeParams,
1233
+ type BadgeRewardParams as BadgeRewardParams,
1234
+ };
1235
+
1236
+ export {
1237
+ Currencies as Currencies,
1238
+ type CurrencyCreateResponse as CurrencyCreateResponse,
1239
+ type CurrencyListResponse as CurrencyListResponse,
1240
+ type CurrencyCreateParams as CurrencyCreateParams,
1241
+ type CurrencyListParams as CurrencyListParams,
1242
+ };
1243
+
1244
+ export {
1245
+ Multipliers as Multipliers,
1246
+ type MultiplierCreateResponse as MultiplierCreateResponse,
1247
+ type MultiplierUpdateResponse as MultiplierUpdateResponse,
1248
+ type MultiplierListResponse as MultiplierListResponse,
1249
+ type MultiplierDeleteResponse as MultiplierDeleteResponse,
1250
+ type MultiplierDeleteByExternalIDResponse as MultiplierDeleteByExternalIDResponse,
1251
+ type MultiplierCreateParams as MultiplierCreateParams,
1252
+ type MultiplierUpdateParams as MultiplierUpdateParams,
1253
+ type MultiplierListParams as MultiplierListParams,
1254
+ type MultiplierDeleteByExternalIDParams as MultiplierDeleteByExternalIDParams,
1255
+ };
1256
+
1257
+ export {
1258
+ RuleEdits as RuleEdits,
1259
+ type RuleEditListResponse as RuleEditListResponse,
1260
+ type RuleEditRestoreResponse as RuleEditRestoreResponse,
1261
+ type RuleEditListParams as RuleEditListParams,
1262
+ type RuleEditRestoreParams as RuleEditRestoreParams,
1263
+ };
1264
+
1265
+ export {
1266
+ Rules as Rules,
1267
+ type RuleCreateResponse as RuleCreateResponse,
1268
+ type RuleUpdateResponse as RuleUpdateResponse,
1269
+ type RuleListResponse as RuleListResponse,
1270
+ type RuleDeleteResponse as RuleDeleteResponse,
1271
+ type RuleCompleteResponse as RuleCompleteResponse,
1272
+ type RuleGetStatusResponse as RuleGetStatusResponse,
1273
+ type RuleCreateParams as RuleCreateParams,
1274
+ type RuleUpdateParams as RuleUpdateParams,
1275
+ type RuleListParams as RuleListParams,
1276
+ type RuleCompleteParams as RuleCompleteParams,
1277
+ type RuleGetStatusParams as RuleGetStatusParams,
1278
+ };
1279
+
1280
+ export {
1281
+ Questions as Questions,
1282
+ type QuestionCreateResponse as QuestionCreateResponse,
1283
+ type QuestionUpdateResponse as QuestionUpdateResponse,
1284
+ type QuestionListResponse as QuestionListResponse,
1285
+ type QuestionCreateParams as QuestionCreateParams,
1286
+ type QuestionUpdateParams as QuestionUpdateParams,
1287
+ type QuestionListParams as QuestionListParams,
1288
+ };
1289
+
1290
+ export {
1291
+ QuestionsResponses as QuestionsResponses,
1292
+ type QuestionsResponseListResponse as QuestionsResponseListResponse,
1293
+ type QuestionsResponseSubmitResponse as QuestionsResponseSubmitResponse,
1294
+ type QuestionsResponseListParams as QuestionsResponseListParams,
1295
+ type QuestionsResponseSubmitParams as QuestionsResponseSubmitParams,
1296
+ };
1297
+ }