@snagsolutions/sdk 0.1.0-alpha.11 → 0.1.0-alpha.110

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 (378) hide show
  1. package/CHANGELOG.md +970 -0
  2. package/README.md +24 -28
  3. package/_shims/index.d.ts +2 -0
  4. package/_shims/index.js +5 -1
  5. package/_shims/index.mjs +5 -1
  6. package/core.d.ts +19 -5
  7. package/core.d.ts.map +1 -1
  8. package/core.js +35 -19
  9. package/core.js.map +1 -1
  10. package/core.mjs +36 -20
  11. package/core.mjs.map +1 -1
  12. package/index.d.mts +25 -16
  13. package/index.d.ts +25 -16
  14. package/index.d.ts.map +1 -1
  15. package/index.js +20 -10
  16. package/index.js.map +1 -1
  17. package/index.mjs +21 -11
  18. package/index.mjs.map +1 -1
  19. package/package.json +4 -5
  20. package/resource.d.ts +1 -1
  21. package/resource.d.ts.map +1 -1
  22. package/resource.js.map +1 -1
  23. package/resource.mjs.map +1 -1
  24. package/resources/assets.d.ts +22 -8
  25. package/resources/assets.d.ts.map +1 -1
  26. package/resources/assets.js +12 -4
  27. package/resources/assets.js.map +1 -1
  28. package/resources/assets.mjs +12 -4
  29. package/resources/assets.mjs.map +1 -1
  30. package/resources/auctions/auctions.d.ts +285 -0
  31. package/resources/auctions/auctions.d.ts.map +1 -0
  32. package/resources/auctions/auctions.js +76 -0
  33. package/resources/auctions/auctions.js.map +1 -0
  34. package/resources/auctions/auctions.mjs +49 -0
  35. package/resources/auctions/auctions.mjs.map +1 -0
  36. package/resources/auctions/index.d.ts +3 -0
  37. package/resources/auctions/index.d.ts.map +1 -0
  38. package/resources/auctions/index.js +9 -0
  39. package/resources/auctions/index.js.map +1 -0
  40. package/resources/auctions/index.mjs +4 -0
  41. package/resources/auctions/index.mjs.map +1 -0
  42. package/resources/auctions/website-user-attributes/index.d.ts +3 -0
  43. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
  44. package/resources/auctions/website-user-attributes/index.js +9 -0
  45. package/resources/auctions/website-user-attributes/index.js.map +1 -0
  46. package/resources/auctions/website-user-attributes/index.mjs +4 -0
  47. package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
  48. package/resources/auctions/website-user-attributes/values.d.ts +122 -0
  49. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  50. package/resources/auctions/website-user-attributes/values.js +49 -0
  51. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  52. package/resources/auctions/website-user-attributes/values.mjs +45 -0
  53. package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
  54. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +132 -0
  55. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
  56. package/resources/auctions/website-user-attributes/website-user-attributes.js +76 -0
  57. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
  58. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +49 -0
  59. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
  60. package/resources/auctions/website-user-attributes.d.ts +2 -0
  61. package/resources/auctions/website-user-attributes.d.ts.map +1 -0
  62. package/resources/auctions/website-user-attributes.js +19 -0
  63. package/resources/auctions/website-user-attributes.js.map +1 -0
  64. package/resources/auctions/website-user-attributes.mjs +3 -0
  65. package/resources/auctions/website-user-attributes.mjs.map +1 -0
  66. package/resources/auctions.d.ts +2 -0
  67. package/resources/auctions.d.ts.map +1 -0
  68. package/resources/auctions.js +19 -0
  69. package/resources/auctions.js.map +1 -0
  70. package/resources/auctions.mjs +3 -0
  71. package/resources/auctions.mjs.map +1 -0
  72. package/resources/auth.d.ts +44 -0
  73. package/resources/auth.d.ts.map +1 -0
  74. package/resources/auth.js +16 -0
  75. package/resources/auth.js.map +1 -0
  76. package/resources/auth.mjs +12 -0
  77. package/resources/auth.mjs.map +1 -0
  78. package/resources/index.d.ts +7 -5
  79. package/resources/index.d.ts.map +1 -1
  80. package/resources/index.js +10 -6
  81. package/resources/index.js.map +1 -1
  82. package/resources/index.mjs +6 -4
  83. package/resources/index.mjs.map +1 -1
  84. package/resources/loyalty/account-streaks.d.ts +81 -0
  85. package/resources/loyalty/account-streaks.d.ts.map +1 -0
  86. package/resources/loyalty/account-streaks.js +24 -0
  87. package/resources/loyalty/account-streaks.js.map +1 -0
  88. package/resources/loyalty/account-streaks.mjs +20 -0
  89. package/resources/loyalty/account-streaks.mjs.map +1 -0
  90. package/resources/loyalty/accounts.d.ts +62 -15
  91. package/resources/loyalty/accounts.d.ts.map +1 -1
  92. package/resources/loyalty/accounts.js +22 -1
  93. package/resources/loyalty/accounts.js.map +1 -1
  94. package/resources/loyalty/accounts.mjs +22 -1
  95. package/resources/loyalty/accounts.mjs.map +1 -1
  96. package/resources/loyalty/badges.d.ts +876 -77
  97. package/resources/loyalty/badges.d.ts.map +1 -1
  98. package/resources/loyalty/badges.js +19 -1
  99. package/resources/loyalty/badges.js.map +1 -1
  100. package/resources/loyalty/badges.mjs +19 -1
  101. package/resources/loyalty/badges.mjs.map +1 -1
  102. package/resources/loyalty/currencies.d.ts +20 -1
  103. package/resources/loyalty/currencies.d.ts.map +1 -1
  104. package/resources/loyalty/currencies.js +19 -0
  105. package/resources/loyalty/currencies.js.map +1 -1
  106. package/resources/loyalty/currencies.mjs +19 -0
  107. package/resources/loyalty/currencies.mjs.map +1 -1
  108. package/resources/loyalty/index.d.ts +9 -5
  109. package/resources/loyalty/index.d.ts.map +1 -1
  110. package/resources/loyalty/index.js +11 -3
  111. package/resources/loyalty/index.js.map +1 -1
  112. package/resources/loyalty/index.mjs +6 -2
  113. package/resources/loyalty/index.mjs.map +1 -1
  114. package/resources/loyalty/loyalty.d.ts +33 -17
  115. package/resources/loyalty/loyalty.d.ts.map +1 -1
  116. package/resources/loyalty/loyalty.js +28 -12
  117. package/resources/loyalty/loyalty.js.map +1 -1
  118. package/resources/loyalty/loyalty.mjs +29 -13
  119. package/resources/loyalty/loyalty.mjs.map +1 -1
  120. package/resources/loyalty/multipliers.d.ts +97 -4
  121. package/resources/loyalty/multipliers.d.ts.map +1 -1
  122. package/resources/loyalty/multipliers.js +29 -0
  123. package/resources/loyalty/multipliers.js.map +1 -1
  124. package/resources/loyalty/multipliers.mjs +29 -0
  125. package/resources/loyalty/multipliers.mjs.map +1 -1
  126. package/resources/loyalty/questions-responses.d.ts +112 -0
  127. package/resources/loyalty/questions-responses.d.ts.map +1 -0
  128. package/resources/loyalty/questions-responses.js +31 -0
  129. package/resources/loyalty/questions-responses.js.map +1 -0
  130. package/resources/loyalty/questions-responses.mjs +27 -0
  131. package/resources/loyalty/questions-responses.mjs.map +1 -0
  132. package/resources/loyalty/questions.d.ts +183 -0
  133. package/resources/loyalty/questions.d.ts.map +1 -0
  134. package/resources/loyalty/questions.js +60 -0
  135. package/resources/loyalty/questions.js.map +1 -0
  136. package/resources/loyalty/questions.mjs +56 -0
  137. package/resources/loyalty/questions.mjs.map +1 -0
  138. package/resources/loyalty/rule-edits.d.ts +2489 -11
  139. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  140. package/resources/loyalty/rule-edits.js +16 -2
  141. package/resources/loyalty/rule-edits.js.map +1 -1
  142. package/resources/loyalty/rule-edits.mjs +16 -2
  143. package/resources/loyalty/rule-edits.mjs.map +1 -1
  144. package/resources/loyalty/rule-groups.d.ts +738 -0
  145. package/resources/loyalty/rule-groups.d.ts.map +1 -0
  146. package/resources/loyalty/rule-groups.js +52 -0
  147. package/resources/loyalty/rule-groups.js.map +1 -0
  148. package/resources/loyalty/rule-groups.mjs +48 -0
  149. package/resources/loyalty/rule-groups.mjs.map +1 -0
  150. package/resources/loyalty/rules.d.ts +1717 -280
  151. package/resources/loyalty/rules.d.ts.map +1 -1
  152. package/resources/loyalty/rules.js +40 -9
  153. package/resources/loyalty/rules.js.map +1 -1
  154. package/resources/loyalty/rules.mjs +40 -9
  155. package/resources/loyalty/rules.mjs.map +1 -1
  156. package/resources/loyalty/transactions/index.d.ts +3 -0
  157. package/resources/loyalty/transactions/index.d.ts.map +1 -0
  158. package/resources/loyalty/transactions/index.js +9 -0
  159. package/resources/loyalty/transactions/index.js.map +1 -0
  160. package/resources/loyalty/transactions/index.mjs +4 -0
  161. package/resources/loyalty/transactions/index.mjs.map +1 -0
  162. package/resources/loyalty/transactions/rule-statuses.d.ts +120 -0
  163. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  164. package/resources/loyalty/transactions/rule-statuses.js +30 -0
  165. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  166. package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
  167. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  168. package/resources/loyalty/transactions/transactions.d.ts +410 -0
  169. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  170. package/resources/loyalty/transactions/transactions.js +76 -0
  171. package/resources/loyalty/transactions/transactions.js.map +1 -0
  172. package/resources/loyalty/transactions/transactions.mjs +49 -0
  173. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  174. package/resources/loyalty/transactions.d.ts +2 -0
  175. package/resources/loyalty/transactions.d.ts.map +1 -0
  176. package/resources/loyalty/transactions.js +19 -0
  177. package/resources/loyalty/transactions.js.map +1 -0
  178. package/resources/loyalty/transactions.mjs +3 -0
  179. package/resources/loyalty/transactions.mjs.map +1 -0
  180. package/resources/loyalty.d.ts +2 -0
  181. package/resources/loyalty.d.ts.map +1 -0
  182. package/resources/loyalty.js +19 -0
  183. package/resources/loyalty.js.map +1 -0
  184. package/resources/loyalty.mjs +3 -0
  185. package/resources/loyalty.mjs.map +1 -0
  186. package/resources/minting.d.ts +95 -0
  187. package/resources/minting.d.ts.map +1 -0
  188. package/resources/minting.js +15 -0
  189. package/resources/minting.js.map +1 -0
  190. package/resources/minting.mjs +11 -0
  191. package/resources/minting.mjs.map +1 -0
  192. package/resources/referral/index.d.ts +3 -0
  193. package/resources/referral/index.d.ts.map +1 -0
  194. package/resources/referral/index.js +9 -0
  195. package/resources/referral/index.js.map +1 -0
  196. package/resources/referral/index.mjs +4 -0
  197. package/resources/referral/index.mjs.map +1 -0
  198. package/resources/referral/referral.d.ts +39 -0
  199. package/resources/referral/referral.d.ts.map +1 -0
  200. package/resources/{drip/drip.js → referral/referral.js} +21 -12
  201. package/resources/referral/referral.js.map +1 -0
  202. package/resources/referral/referral.mjs +25 -0
  203. package/resources/referral/referral.mjs.map +1 -0
  204. package/resources/referral/users.d.ts +83 -0
  205. package/resources/referral/users.d.ts.map +1 -0
  206. package/resources/referral/users.js +35 -0
  207. package/resources/referral/users.js.map +1 -0
  208. package/resources/referral/users.mjs +31 -0
  209. package/resources/referral/users.mjs.map +1 -0
  210. package/resources/referral.d.ts +2 -0
  211. package/resources/referral.d.ts.map +1 -0
  212. package/resources/referral.js +19 -0
  213. package/resources/referral.js.map +1 -0
  214. package/resources/referral.mjs +3 -0
  215. package/resources/referral.mjs.map +1 -0
  216. package/resources/users/index.d.ts +2 -3
  217. package/resources/users/index.d.ts.map +1 -1
  218. package/resources/users/index.js +1 -3
  219. package/resources/users/index.js.map +1 -1
  220. package/resources/users/index.mjs +2 -3
  221. package/resources/users/index.mjs.map +1 -1
  222. package/resources/users/metadatas.d.ts +109 -9
  223. package/resources/users/metadatas.d.ts.map +1 -1
  224. package/resources/users/metadatas.js +6 -0
  225. package/resources/users/metadatas.js.map +1 -1
  226. package/resources/users/metadatas.mjs +6 -0
  227. package/resources/users/metadatas.mjs.map +1 -1
  228. package/resources/users/users.d.ts +414 -6
  229. package/resources/users/users.d.ts.map +1 -1
  230. package/resources/users/users.js +77 -4
  231. package/resources/users/users.js.map +1 -1
  232. package/resources/users/users.mjs +78 -5
  233. package/resources/users/users.mjs.map +1 -1
  234. package/resources/users.d.ts +2 -0
  235. package/resources/users.d.ts.map +1 -0
  236. package/resources/users.js +19 -0
  237. package/resources/users.js.map +1 -0
  238. package/resources/users.mjs +3 -0
  239. package/resources/users.mjs.map +1 -0
  240. package/resources/websites/index.d.ts +4 -0
  241. package/resources/websites/index.d.ts.map +1 -0
  242. package/resources/websites/index.js +11 -0
  243. package/resources/websites/index.js.map +1 -0
  244. package/resources/websites/index.mjs +5 -0
  245. package/resources/websites/index.mjs.map +1 -0
  246. package/resources/websites/website-collections.d.ts +94 -0
  247. package/resources/websites/website-collections.d.ts.map +1 -0
  248. package/resources/websites/website-collections.js +46 -0
  249. package/resources/websites/website-collections.js.map +1 -0
  250. package/resources/websites/website-collections.mjs +42 -0
  251. package/resources/websites/website-collections.mjs.map +1 -0
  252. package/resources/websites/website-user-roles.d.ts +96 -0
  253. package/resources/websites/website-user-roles.d.ts.map +1 -0
  254. package/resources/websites/website-user-roles.js +45 -0
  255. package/resources/websites/website-user-roles.js.map +1 -0
  256. package/resources/websites/website-user-roles.mjs +41 -0
  257. package/resources/websites/website-user-roles.mjs.map +1 -0
  258. package/resources/websites/websites.d.ts +223 -0
  259. package/resources/websites/websites.d.ts.map +1 -0
  260. package/resources/websites/websites.js +63 -0
  261. package/resources/websites/websites.js.map +1 -0
  262. package/resources/websites/websites.mjs +36 -0
  263. package/resources/websites/websites.mjs.map +1 -0
  264. package/resources/websites.d.ts +1 -202
  265. package/resources/websites.d.ts.map +1 -1
  266. package/resources/websites.js +15 -18
  267. package/resources/websites.js.map +1 -1
  268. package/resources/websites.mjs +1 -16
  269. package/resources/websites.mjs.map +1 -1
  270. package/resources.d.ts +2 -0
  271. package/resources.d.ts.map +1 -0
  272. package/resources.js +18 -0
  273. package/resources.js.map +1 -0
  274. package/resources.mjs +2 -0
  275. package/resources.mjs.map +1 -0
  276. package/src/_shims/index.d.ts +2 -0
  277. package/src/_shims/index.js +5 -1
  278. package/src/_shims/index.mjs +5 -1
  279. package/src/core.ts +56 -20
  280. package/src/index.ts +96 -24
  281. package/src/resource.ts +1 -1
  282. package/src/resources/assets.ts +29 -8
  283. package/src/resources/auctions/auctions.ts +436 -0
  284. package/src/resources/auctions/index.ts +18 -0
  285. package/src/resources/auctions/website-user-attributes/index.ts +18 -0
  286. package/src/resources/auctions/website-user-attributes/values.ts +165 -0
  287. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +207 -0
  288. package/src/resources/auctions/website-user-attributes.ts +3 -0
  289. package/src/resources/auctions.ts +3 -0
  290. package/src/resources/auth.ts +74 -0
  291. package/src/resources/index.ts +31 -5
  292. package/src/resources/loyalty/account-streaks.ts +110 -0
  293. package/src/resources/loyalty/accounts.ts +79 -16
  294. package/src/resources/loyalty/badges.ts +1055 -83
  295. package/src/resources/loyalty/currencies.ts +20 -1
  296. package/src/resources/loyalty/index.ts +53 -9
  297. package/src/resources/loyalty/loyalty.ts +160 -60
  298. package/src/resources/loyalty/multipliers.ts +124 -4
  299. package/src/resources/loyalty/questions-responses.ts +161 -0
  300. package/src/resources/loyalty/questions.ts +241 -0
  301. package/src/resources/loyalty/rule-edits.ts +3486 -63
  302. package/src/resources/loyalty/rule-groups.ts +1145 -0
  303. package/src/resources/loyalty/rules.ts +2854 -579
  304. package/src/resources/loyalty/transactions/index.ts +18 -0
  305. package/src/resources/loyalty/transactions/rule-statuses.ts +178 -0
  306. package/src/resources/loyalty/transactions/transactions.ts +671 -0
  307. package/src/resources/loyalty/transactions.ts +3 -0
  308. package/src/resources/loyalty.ts +3 -0
  309. package/src/resources/minting.ts +168 -0
  310. package/src/resources/referral/index.ts +10 -0
  311. package/src/resources/referral/referral.ts +72 -0
  312. package/src/resources/referral/users.ts +122 -0
  313. package/src/resources/referral.ts +3 -0
  314. package/src/resources/users/index.ts +21 -9
  315. package/src/resources/users/metadatas.ts +161 -8
  316. package/src/resources/users/users.ts +581 -17
  317. package/src/resources/users.ts +3 -0
  318. package/src/resources/websites/index.ts +22 -0
  319. package/src/resources/websites/website-collections.ts +180 -0
  320. package/src/resources/websites/website-user-roles.ts +130 -0
  321. package/src/resources/websites/websites.ts +311 -0
  322. package/src/resources/websites.ts +1 -257
  323. package/src/resources.ts +1 -0
  324. package/src/version.ts +1 -1
  325. package/version.d.ts +1 -1
  326. package/version.d.ts.map +1 -1
  327. package/version.js +1 -1
  328. package/version.js.map +1 -1
  329. package/version.mjs +1 -1
  330. package/version.mjs.map +1 -1
  331. package/resources/auction-bids.d.ts +0 -81
  332. package/resources/auction-bids.d.ts.map +0 -1
  333. package/resources/auction-bids.js +0 -30
  334. package/resources/auction-bids.js.map +0 -1
  335. package/resources/auction-bids.mjs +0 -26
  336. package/resources/auction-bids.mjs.map +0 -1
  337. package/resources/drip/drip.d.ts +0 -14
  338. package/resources/drip/drip.d.ts.map +0 -1
  339. package/resources/drip/drip.js.map +0 -1
  340. package/resources/drip/drip.mjs +0 -16
  341. package/resources/drip/drip.mjs.map +0 -1
  342. package/resources/drip/index.d.ts +0 -4
  343. package/resources/drip/index.d.ts.map +0 -1
  344. package/resources/drip/index.js +0 -11
  345. package/resources/drip/index.js.map +0 -1
  346. package/resources/drip/index.mjs +0 -5
  347. package/resources/drip/index.mjs.map +0 -1
  348. package/resources/drip/quests.d.ts +0 -168
  349. package/resources/drip/quests.d.ts.map +0 -1
  350. package/resources/drip/quests.js +0 -17
  351. package/resources/drip/quests.js.map +0 -1
  352. package/resources/drip/quests.mjs +0 -13
  353. package/resources/drip/quests.mjs.map +0 -1
  354. package/resources/drip/status.d.ts +0 -26
  355. package/resources/drip/status.d.ts.map +0 -1
  356. package/resources/drip/status.js +0 -16
  357. package/resources/drip/status.js.map +0 -1
  358. package/resources/drip/status.mjs +0 -12
  359. package/resources/drip/status.mjs.map +0 -1
  360. package/resources/loyalty/transaction-entries.d.ts +0 -175
  361. package/resources/loyalty/transaction-entries.d.ts.map +0 -1
  362. package/resources/loyalty/transaction-entries.js +0 -16
  363. package/resources/loyalty/transaction-entries.js.map +0 -1
  364. package/resources/loyalty/transaction-entries.mjs +0 -12
  365. package/resources/loyalty/transaction-entries.mjs.map +0 -1
  366. package/resources/users/wallets.d.ts +0 -193
  367. package/resources/users/wallets.d.ts.map +0 -1
  368. package/resources/users/wallets.js +0 -28
  369. package/resources/users/wallets.js.map +0 -1
  370. package/resources/users/wallets.mjs +0 -24
  371. package/resources/users/wallets.mjs.map +0 -1
  372. package/src/resources/auction-bids.ts +0 -123
  373. package/src/resources/drip/drip.ts +0 -25
  374. package/src/resources/drip/index.ts +0 -5
  375. package/src/resources/drip/quests.ts +0 -210
  376. package/src/resources/drip/status.ts +0 -33
  377. package/src/resources/loyalty/transaction-entries.ts +0 -229
  378. package/src/resources/users/wallets.ts +0 -271
@@ -2,30 +2,74 @@ import { APIResource } from "../../resource.js";
2
2
  import * as Core from "../../core.js";
3
3
  export declare class Badges extends APIResource {
4
4
  /**
5
- * This endpoint allows you to configure a new badge.
5
+ * This endpoint allows you to configure a new badge
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const badge = await client.loyalty.badges.create({
10
+ * conditions: [{}],
11
+ * imageUrl: 'https://example.com/image.png',
12
+ * name: 'Example Badge',
13
+ * organizationId: '123e4567-e89b-12d3-a456-426614174222',
14
+ * websiteId: '123e4567-e89b-12d3-a456-426614174111',
15
+ * });
16
+ * ```
6
17
  */
7
18
  create(body: BadgeCreateParams, options?: Core.RequestOptions): Core.APIPromise<BadgeCreateResponse>;
8
19
  /**
9
20
  * This endpoint allows you to update an existing badge.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const badge = await client.loyalty.badges.update(
25
+ * '123e4567-e89b-12d3-a456-426614174333',
26
+ * );
27
+ * ```
10
28
  */
11
29
  update(id: string, body?: BadgeUpdateParams, options?: Core.RequestOptions): Core.APIPromise<BadgeUpdateResponse>;
12
30
  update(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeUpdateResponse>;
13
31
  /**
14
32
  * This endpoint allows you to fetch badge(s) data.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const badges = await client.loyalty.badges.list();
37
+ * ```
15
38
  */
16
39
  list(query?: BadgeListParams, options?: Core.RequestOptions): Core.APIPromise<BadgeListResponse>;
17
40
  list(options?: Core.RequestOptions): Core.APIPromise<BadgeListResponse>;
18
41
  /**
19
42
  * This endpoint allows you to delete a badge.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const badge = await client.loyalty.badges.delete(
47
+ * '123e4567-e89b-12d3-a456-426614174333',
48
+ * );
49
+ * ```
20
50
  */
21
51
  delete(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeDeleteResponse>;
22
52
  /**
23
53
  * This endpoint allows you to revoke a badge from an account
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const response = await client.loyalty.badges.revoke(
58
+ * '123e4567-e89b-12d3-a456-426614174333',
59
+ * );
60
+ * ```
24
61
  */
25
62
  revoke(id: string, body?: BadgeRevokeParams, options?: Core.RequestOptions): Core.APIPromise<BadgeRevokeResponse>;
26
63
  revoke(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeRevokeResponse>;
27
64
  /**
28
65
  * This endpoint allows you to reward a badge for an account
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const response = await client.loyalty.badges.reward(
70
+ * '123e4567-e89b-12d3-a456-426614174333',
71
+ * );
72
+ * ```
29
73
  */
30
74
  reward(id: string, body?: BadgeRewardParams, options?: Core.RequestOptions): Core.APIPromise<BadgeRewardResponse>;
31
75
  reward(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeRewardResponse>;
@@ -34,99 +78,821 @@ export declare class Badges extends APIResource {
34
78
  * Response returned upon successful creation of the badge.
35
79
  */
36
80
  export interface BadgeCreateResponse {
81
+ /**
82
+ * UUID of the badge (converted to lowercase)
83
+ */
37
84
  id: string;
85
+ /**
86
+ * The description of the badge
87
+ */
88
+ description: string | null;
89
+ /**
90
+ * The URL of the badge image
91
+ */
92
+ imageUrl: string | null;
93
+ /**
94
+ * Array of conditions of the badge
95
+ */
96
+ loyaltyConditions: Array<BadgeCreateResponse.LoyaltyCondition>;
97
+ /**
98
+ * The name of the badge
99
+ */
100
+ name: string;
101
+ /**
102
+ * Array of user badges
103
+ */
104
+ loyaltyBadgeUsers?: Array<BadgeCreateResponse.LoyaltyBadgeUser>;
105
+ /**
106
+ * Array of loyalty rules associated with the badge
107
+ */
108
+ loyaltyRules?: Array<BadgeCreateResponse.LoyaltyRule>;
109
+ }
110
+ export declare namespace BadgeCreateResponse {
111
+ /**
112
+ * Schema for a loyalty condition rule.
113
+ */
114
+ interface LoyaltyCondition {
115
+ /**
116
+ * UUID of the condition (converted to lowercase)
117
+ */
118
+ id: string;
119
+ /**
120
+ * The amount of the condition
121
+ */
122
+ amount: number | null;
123
+ association: Array<LoyaltyCondition.Association>;
124
+ /**
125
+ * The URL of the CSV file
126
+ */
127
+ csvUrl: string | null;
128
+ /**
129
+ * The description of the condition
130
+ */
131
+ description: string | null;
132
+ /**
133
+ * UUID of the currency (converted to lowercase)
134
+ */
135
+ loyaltyCurrencyId: string | null;
136
+ /**
137
+ * UUID of the rule group (converted to lowercase)
138
+ */
139
+ loyaltyRuleGroupId: string | null;
140
+ /**
141
+ * The repeat count of the condition
142
+ */
143
+ repeatCount: number | null;
144
+ /**
145
+ * The required count of the condition
146
+ */
147
+ requiredCount: number | null;
148
+ /**
149
+ * The type of the condition
150
+ */
151
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
152
+ }
153
+ namespace LoyaltyCondition {
154
+ interface Association {
155
+ loyaltyBadge: Association.LoyaltyBadge | null;
156
+ loyaltyCurrency: Association.LoyaltyCurrency | null;
157
+ loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
158
+ loyaltyRule: Association.LoyaltyRule | null;
159
+ loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
160
+ }
161
+ namespace Association {
162
+ interface LoyaltyBadge {
163
+ /**
164
+ * UUID of the association (converted to lowercase)
165
+ */
166
+ id: string;
167
+ /**
168
+ * The name of the association
169
+ */
170
+ name: string;
171
+ }
172
+ interface LoyaltyCurrency {
173
+ /**
174
+ * UUID of the association (converted to lowercase)
175
+ */
176
+ id: string;
177
+ /**
178
+ * The name of the association
179
+ */
180
+ name: string;
181
+ }
182
+ interface LoyaltyLeaderboardView {
183
+ /**
184
+ * UUID of the association (converted to lowercase)
185
+ */
186
+ id: string;
187
+ /**
188
+ * The name of the association
189
+ */
190
+ name: string;
191
+ }
192
+ interface LoyaltyRule {
193
+ /**
194
+ * UUID of the association (converted to lowercase)
195
+ */
196
+ id: string;
197
+ /**
198
+ * The name of the association
199
+ */
200
+ name: string;
201
+ }
202
+ interface LoyaltyRuleGroup {
203
+ /**
204
+ * UUID of the association (converted to lowercase)
205
+ */
206
+ id: string;
207
+ /**
208
+ * The name of the association
209
+ */
210
+ name: string;
211
+ }
212
+ }
213
+ }
214
+ interface LoyaltyBadgeUser {
215
+ /**
216
+ * UUID of the user badge (converted to lowercase)
217
+ */
218
+ id: string;
219
+ /**
220
+ * The date and time the user badge was created
221
+ */
222
+ createdAt: string;
223
+ /**
224
+ * UUID of the badge (converted to lowercase)
225
+ */
226
+ loyaltyBadgeId: string;
227
+ /**
228
+ * UUID of the organization (converted to lowercase)
229
+ */
230
+ organizationId: string;
231
+ /**
232
+ * The status of the badge
233
+ */
234
+ status: 'active' | 'inactive' | 'revoked';
235
+ /**
236
+ * The date and time the user badge was updated
237
+ */
238
+ updatedAt: string;
239
+ /**
240
+ * UUID of the user (converted to lowercase)
241
+ */
242
+ userId: string;
243
+ /**
244
+ * UUID of the website (converted to lowercase)
245
+ */
246
+ websiteId: string;
247
+ /**
248
+ * Array of progress for the badge
249
+ */
250
+ progress?: unknown;
251
+ /**
252
+ * User associated with the user badge
253
+ */
254
+ user?: LoyaltyBadgeUser.User;
255
+ }
256
+ namespace LoyaltyBadgeUser {
257
+ /**
258
+ * User associated with the user badge
259
+ */
260
+ interface User {
261
+ /**
262
+ * UUID of the user (converted to lowercase)
263
+ */
264
+ id: string;
265
+ /**
266
+ * Wallet address of the user
267
+ */
268
+ walletAddress: string;
269
+ }
270
+ }
271
+ interface LoyaltyRule {
272
+ /**
273
+ * UUID of the loyalty rule (converted to lowercase)
274
+ */
275
+ id: string;
276
+ /**
277
+ * The name of the loyalty rule
278
+ */
279
+ name: string;
280
+ }
38
281
  }
39
282
  /**
40
283
  * Response returned upon successful update of the badge.
41
284
  */
42
285
  export interface BadgeUpdateResponse {
286
+ /**
287
+ * UUID of the badge (converted to lowercase)
288
+ */
43
289
  id: string;
290
+ /**
291
+ * The description of the badge
292
+ */
293
+ description: string | null;
294
+ /**
295
+ * The URL of the badge image
296
+ */
297
+ imageUrl: string | null;
298
+ /**
299
+ * Array of conditions of the badge
300
+ */
301
+ loyaltyConditions: Array<BadgeUpdateResponse.LoyaltyCondition>;
302
+ /**
303
+ * The name of the badge
304
+ */
305
+ name: string;
306
+ /**
307
+ * Array of user badges
308
+ */
309
+ loyaltyBadgeUsers?: Array<BadgeUpdateResponse.LoyaltyBadgeUser>;
310
+ /**
311
+ * Array of loyalty rules associated with the badge
312
+ */
313
+ loyaltyRules?: Array<BadgeUpdateResponse.LoyaltyRule>;
314
+ }
315
+ export declare namespace BadgeUpdateResponse {
316
+ /**
317
+ * Schema for a loyalty condition rule.
318
+ */
319
+ interface LoyaltyCondition {
320
+ /**
321
+ * UUID of the condition (converted to lowercase)
322
+ */
323
+ id: string;
324
+ /**
325
+ * The amount of the condition
326
+ */
327
+ amount: number | null;
328
+ association: Array<LoyaltyCondition.Association>;
329
+ /**
330
+ * The URL of the CSV file
331
+ */
332
+ csvUrl: string | null;
333
+ /**
334
+ * The description of the condition
335
+ */
336
+ description: string | null;
337
+ /**
338
+ * UUID of the currency (converted to lowercase)
339
+ */
340
+ loyaltyCurrencyId: string | null;
341
+ /**
342
+ * UUID of the rule group (converted to lowercase)
343
+ */
344
+ loyaltyRuleGroupId: string | null;
345
+ /**
346
+ * The repeat count of the condition
347
+ */
348
+ repeatCount: number | null;
349
+ /**
350
+ * The required count of the condition
351
+ */
352
+ requiredCount: number | null;
353
+ /**
354
+ * The type of the condition
355
+ */
356
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
357
+ }
358
+ namespace LoyaltyCondition {
359
+ interface Association {
360
+ loyaltyBadge: Association.LoyaltyBadge | null;
361
+ loyaltyCurrency: Association.LoyaltyCurrency | null;
362
+ loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
363
+ loyaltyRule: Association.LoyaltyRule | null;
364
+ loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
365
+ }
366
+ namespace Association {
367
+ interface LoyaltyBadge {
368
+ /**
369
+ * UUID of the association (converted to lowercase)
370
+ */
371
+ id: string;
372
+ /**
373
+ * The name of the association
374
+ */
375
+ name: string;
376
+ }
377
+ interface LoyaltyCurrency {
378
+ /**
379
+ * UUID of the association (converted to lowercase)
380
+ */
381
+ id: string;
382
+ /**
383
+ * The name of the association
384
+ */
385
+ name: string;
386
+ }
387
+ interface LoyaltyLeaderboardView {
388
+ /**
389
+ * UUID of the association (converted to lowercase)
390
+ */
391
+ id: string;
392
+ /**
393
+ * The name of the association
394
+ */
395
+ name: string;
396
+ }
397
+ interface LoyaltyRule {
398
+ /**
399
+ * UUID of the association (converted to lowercase)
400
+ */
401
+ id: string;
402
+ /**
403
+ * The name of the association
404
+ */
405
+ name: string;
406
+ }
407
+ interface LoyaltyRuleGroup {
408
+ /**
409
+ * UUID of the association (converted to lowercase)
410
+ */
411
+ id: string;
412
+ /**
413
+ * The name of the association
414
+ */
415
+ name: string;
416
+ }
417
+ }
418
+ }
419
+ interface LoyaltyBadgeUser {
420
+ /**
421
+ * UUID of the user badge (converted to lowercase)
422
+ */
423
+ id: string;
424
+ /**
425
+ * The date and time the user badge was created
426
+ */
427
+ createdAt: string;
428
+ /**
429
+ * UUID of the badge (converted to lowercase)
430
+ */
431
+ loyaltyBadgeId: string;
432
+ /**
433
+ * UUID of the organization (converted to lowercase)
434
+ */
435
+ organizationId: string;
436
+ /**
437
+ * The status of the badge
438
+ */
439
+ status: 'active' | 'inactive' | 'revoked';
440
+ /**
441
+ * The date and time the user badge was updated
442
+ */
443
+ updatedAt: string;
444
+ /**
445
+ * UUID of the user (converted to lowercase)
446
+ */
447
+ userId: string;
448
+ /**
449
+ * UUID of the website (converted to lowercase)
450
+ */
451
+ websiteId: string;
452
+ /**
453
+ * Array of progress for the badge
454
+ */
455
+ progress?: unknown;
456
+ /**
457
+ * User associated with the user badge
458
+ */
459
+ user?: LoyaltyBadgeUser.User;
460
+ }
461
+ namespace LoyaltyBadgeUser {
462
+ /**
463
+ * User associated with the user badge
464
+ */
465
+ interface User {
466
+ /**
467
+ * UUID of the user (converted to lowercase)
468
+ */
469
+ id: string;
470
+ /**
471
+ * Wallet address of the user
472
+ */
473
+ walletAddress: string;
474
+ }
475
+ }
476
+ interface LoyaltyRule {
477
+ /**
478
+ * UUID of the loyalty rule (converted to lowercase)
479
+ */
480
+ id: string;
481
+ /**
482
+ * The name of the loyalty rule
483
+ */
484
+ name: string;
485
+ }
44
486
  }
45
487
  /**
46
488
  * Response returned upon successful fetching of the badges.
47
489
  */
48
490
  export interface BadgeListResponse {
49
- badges: Array<BadgeListResponse.Badge>;
491
+ /**
492
+ * UUID of the badge (converted to lowercase)
493
+ */
494
+ id: string;
495
+ /**
496
+ * The description of the badge
497
+ */
498
+ description: string | null;
499
+ /**
500
+ * The URL of the badge image
501
+ */
502
+ imageUrl: string | null;
503
+ /**
504
+ * Array of conditions of the badge
505
+ */
506
+ loyaltyConditions: Array<BadgeListResponse.LoyaltyCondition>;
507
+ /**
508
+ * The name of the badge
509
+ */
510
+ name: string;
511
+ /**
512
+ * Array of user badges
513
+ */
514
+ loyaltyBadgeUsers?: Array<BadgeListResponse.LoyaltyBadgeUser>;
515
+ /**
516
+ * Array of loyalty rules associated with the badge
517
+ */
518
+ loyaltyRules?: Array<BadgeListResponse.LoyaltyRule>;
50
519
  }
51
520
  export declare namespace BadgeListResponse {
52
- interface Badge {
521
+ /**
522
+ * Schema for a loyalty condition rule.
523
+ */
524
+ interface LoyaltyCondition {
53
525
  /**
54
- * UUID of the badge (converted to lowercase)
526
+ * UUID of the condition (converted to lowercase)
55
527
  */
56
528
  id: string;
57
529
  /**
58
- * Count of rules and accounts with the badge
530
+ * The amount of the condition
59
531
  */
60
- _count: Badge._Count;
532
+ amount: number | null;
533
+ association: Array<LoyaltyCondition.Association>;
61
534
  /**
62
- * The URL of the badge image
535
+ * The URL of the CSV file
63
536
  */
64
- imageUrl: string;
537
+ csvUrl: string | null;
65
538
  /**
66
- * Array of rules for the badge
539
+ * The description of the condition
67
540
  */
68
- loyaltyConditions: Array<Badge.LoyaltyCondition>;
541
+ description: string | null;
69
542
  /**
70
- * The name of the badge
543
+ * UUID of the currency (converted to lowercase)
71
544
  */
72
- name: string;
545
+ loyaltyCurrencyId: string | null;
73
546
  /**
74
- * The description of the badge
547
+ * UUID of the rule group (converted to lowercase)
75
548
  */
76
- description?: string;
77
- }
78
- namespace Badge {
549
+ loyaltyRuleGroupId: string | null;
79
550
  /**
80
- * Count of rules and accounts with the badge
551
+ * The repeat count of the condition
81
552
  */
82
- interface _Count {
83
- /**
84
- * The number of accounts with the badge
85
- */
86
- LoyaltyBadgeUser: number;
87
- /**
88
- * The number of rules
89
- */
90
- loyaltyConditions: number;
553
+ repeatCount: number | null;
554
+ /**
555
+ * The required count of the condition
556
+ */
557
+ requiredCount: number | null;
558
+ /**
559
+ * The type of the condition
560
+ */
561
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
562
+ }
563
+ namespace LoyaltyCondition {
564
+ interface Association {
565
+ loyaltyBadge: Association.LoyaltyBadge | null;
566
+ loyaltyCurrency: Association.LoyaltyCurrency | null;
567
+ loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
568
+ loyaltyRule: Association.LoyaltyRule | null;
569
+ loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
91
570
  }
92
- interface LoyaltyCondition {
571
+ namespace Association {
572
+ interface LoyaltyBadge {
573
+ /**
574
+ * UUID of the association (converted to lowercase)
575
+ */
576
+ id: string;
577
+ /**
578
+ * The name of the association
579
+ */
580
+ name: string;
581
+ }
582
+ interface LoyaltyCurrency {
583
+ /**
584
+ * UUID of the association (converted to lowercase)
585
+ */
586
+ id: string;
587
+ /**
588
+ * The name of the association
589
+ */
590
+ name: string;
591
+ }
592
+ interface LoyaltyLeaderboardView {
593
+ /**
594
+ * UUID of the association (converted to lowercase)
595
+ */
596
+ id: string;
597
+ /**
598
+ * The name of the association
599
+ */
600
+ name: string;
601
+ }
602
+ interface LoyaltyRule {
603
+ /**
604
+ * UUID of the association (converted to lowercase)
605
+ */
606
+ id: string;
607
+ /**
608
+ * The name of the association
609
+ */
610
+ name: string;
611
+ }
612
+ interface LoyaltyRuleGroup {
613
+ /**
614
+ * UUID of the association (converted to lowercase)
615
+ */
616
+ id: string;
617
+ /**
618
+ * The name of the association
619
+ */
620
+ name: string;
621
+ }
622
+ }
623
+ }
624
+ interface LoyaltyBadgeUser {
625
+ /**
626
+ * UUID of the user badge (converted to lowercase)
627
+ */
628
+ id: string;
629
+ /**
630
+ * The date and time the user badge was created
631
+ */
632
+ createdAt: string;
633
+ /**
634
+ * UUID of the badge (converted to lowercase)
635
+ */
636
+ loyaltyBadgeId: string;
637
+ /**
638
+ * UUID of the organization (converted to lowercase)
639
+ */
640
+ organizationId: string;
641
+ /**
642
+ * The status of the badge
643
+ */
644
+ status: 'active' | 'inactive' | 'revoked';
645
+ /**
646
+ * The date and time the user badge was updated
647
+ */
648
+ updatedAt: string;
649
+ /**
650
+ * UUID of the user (converted to lowercase)
651
+ */
652
+ userId: string;
653
+ /**
654
+ * UUID of the website (converted to lowercase)
655
+ */
656
+ websiteId: string;
657
+ /**
658
+ * Array of progress for the badge
659
+ */
660
+ progress?: unknown;
661
+ /**
662
+ * User associated with the user badge
663
+ */
664
+ user?: LoyaltyBadgeUser.User;
665
+ }
666
+ namespace LoyaltyBadgeUser {
667
+ /**
668
+ * User associated with the user badge
669
+ */
670
+ interface User {
93
671
  /**
94
- * UUID of the rule (converted to lowercase)
672
+ * UUID of the user (converted to lowercase)
95
673
  */
96
674
  id: string;
97
675
  /**
98
- * The type of rule
99
- */
100
- type: 'rule' | 'section' | 'level' | 'points' | 'api' | 'badge';
101
- /**
102
- * The amount of the rule
103
- */
104
- amount?: number;
105
- /**
106
- * The description of the rule
107
- */
108
- description?: string;
109
- /**
110
- * UUID of the currency (optional, converted to lowercase)
111
- */
112
- loyaltyCurrencyId?: string;
113
- /**
114
- * UUID of the rule group (optional, converted to lowercase)
676
+ * Wallet address of the user
115
677
  */
116
- loyaltyRuleGroupId?: string;
117
- /**
118
- * UUID of the rule (optional, converted to lowercase)
119
- */
120
- loyaltyRuleId?: string;
678
+ walletAddress: string;
121
679
  }
122
680
  }
681
+ interface LoyaltyRule {
682
+ /**
683
+ * UUID of the loyalty rule (converted to lowercase)
684
+ */
685
+ id: string;
686
+ /**
687
+ * The name of the loyalty rule
688
+ */
689
+ name: string;
690
+ }
123
691
  }
124
692
  /**
125
693
  * Response returned upon successful deletion of the badge.
126
694
  */
127
695
  export interface BadgeDeleteResponse {
696
+ /**
697
+ * UUID of the badge (converted to lowercase)
698
+ */
128
699
  id: string;
129
- deletedAt: string;
700
+ /**
701
+ * The description of the badge
702
+ */
703
+ description: string | null;
704
+ /**
705
+ * The URL of the badge image
706
+ */
707
+ imageUrl: string | null;
708
+ /**
709
+ * Array of conditions of the badge
710
+ */
711
+ loyaltyConditions: Array<BadgeDeleteResponse.LoyaltyCondition>;
712
+ /**
713
+ * The name of the badge
714
+ */
715
+ name: string;
716
+ /**
717
+ * Array of user badges
718
+ */
719
+ loyaltyBadgeUsers?: Array<BadgeDeleteResponse.LoyaltyBadgeUser>;
720
+ /**
721
+ * Array of loyalty rules associated with the badge
722
+ */
723
+ loyaltyRules?: Array<BadgeDeleteResponse.LoyaltyRule>;
724
+ }
725
+ export declare namespace BadgeDeleteResponse {
726
+ /**
727
+ * Schema for a loyalty condition rule.
728
+ */
729
+ interface LoyaltyCondition {
730
+ /**
731
+ * UUID of the condition (converted to lowercase)
732
+ */
733
+ id: string;
734
+ /**
735
+ * The amount of the condition
736
+ */
737
+ amount: number | null;
738
+ association: Array<LoyaltyCondition.Association>;
739
+ /**
740
+ * The URL of the CSV file
741
+ */
742
+ csvUrl: string | null;
743
+ /**
744
+ * The description of the condition
745
+ */
746
+ description: string | null;
747
+ /**
748
+ * UUID of the currency (converted to lowercase)
749
+ */
750
+ loyaltyCurrencyId: string | null;
751
+ /**
752
+ * UUID of the rule group (converted to lowercase)
753
+ */
754
+ loyaltyRuleGroupId: string | null;
755
+ /**
756
+ * The repeat count of the condition
757
+ */
758
+ repeatCount: number | null;
759
+ /**
760
+ * The required count of the condition
761
+ */
762
+ requiredCount: number | null;
763
+ /**
764
+ * The type of the condition
765
+ */
766
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
767
+ }
768
+ namespace LoyaltyCondition {
769
+ interface Association {
770
+ loyaltyBadge: Association.LoyaltyBadge | null;
771
+ loyaltyCurrency: Association.LoyaltyCurrency | null;
772
+ loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
773
+ loyaltyRule: Association.LoyaltyRule | null;
774
+ loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
775
+ }
776
+ namespace Association {
777
+ interface LoyaltyBadge {
778
+ /**
779
+ * UUID of the association (converted to lowercase)
780
+ */
781
+ id: string;
782
+ /**
783
+ * The name of the association
784
+ */
785
+ name: string;
786
+ }
787
+ interface LoyaltyCurrency {
788
+ /**
789
+ * UUID of the association (converted to lowercase)
790
+ */
791
+ id: string;
792
+ /**
793
+ * The name of the association
794
+ */
795
+ name: string;
796
+ }
797
+ interface LoyaltyLeaderboardView {
798
+ /**
799
+ * UUID of the association (converted to lowercase)
800
+ */
801
+ id: string;
802
+ /**
803
+ * The name of the association
804
+ */
805
+ name: string;
806
+ }
807
+ interface LoyaltyRule {
808
+ /**
809
+ * UUID of the association (converted to lowercase)
810
+ */
811
+ id: string;
812
+ /**
813
+ * The name of the association
814
+ */
815
+ name: string;
816
+ }
817
+ interface LoyaltyRuleGroup {
818
+ /**
819
+ * UUID of the association (converted to lowercase)
820
+ */
821
+ id: string;
822
+ /**
823
+ * The name of the association
824
+ */
825
+ name: string;
826
+ }
827
+ }
828
+ }
829
+ interface LoyaltyBadgeUser {
830
+ /**
831
+ * UUID of the user badge (converted to lowercase)
832
+ */
833
+ id: string;
834
+ /**
835
+ * The date and time the user badge was created
836
+ */
837
+ createdAt: string;
838
+ /**
839
+ * UUID of the badge (converted to lowercase)
840
+ */
841
+ loyaltyBadgeId: string;
842
+ /**
843
+ * UUID of the organization (converted to lowercase)
844
+ */
845
+ organizationId: string;
846
+ /**
847
+ * The status of the badge
848
+ */
849
+ status: 'active' | 'inactive' | 'revoked';
850
+ /**
851
+ * The date and time the user badge was updated
852
+ */
853
+ updatedAt: string;
854
+ /**
855
+ * UUID of the user (converted to lowercase)
856
+ */
857
+ userId: string;
858
+ /**
859
+ * UUID of the website (converted to lowercase)
860
+ */
861
+ websiteId: string;
862
+ /**
863
+ * Array of progress for the badge
864
+ */
865
+ progress?: unknown;
866
+ /**
867
+ * User associated with the user badge
868
+ */
869
+ user?: LoyaltyBadgeUser.User;
870
+ }
871
+ namespace LoyaltyBadgeUser {
872
+ /**
873
+ * User associated with the user badge
874
+ */
875
+ interface User {
876
+ /**
877
+ * UUID of the user (converted to lowercase)
878
+ */
879
+ id: string;
880
+ /**
881
+ * Wallet address of the user
882
+ */
883
+ walletAddress: string;
884
+ }
885
+ }
886
+ interface LoyaltyRule {
887
+ /**
888
+ * UUID of the loyalty rule (converted to lowercase)
889
+ */
890
+ id: string;
891
+ /**
892
+ * The name of the loyalty rule
893
+ */
894
+ name: string;
895
+ }
130
896
  }
131
897
  /**
132
898
  * Response returned upon successful update of the user badge
@@ -165,6 +931,10 @@ export declare namespace BadgeRewardResponse {
165
931
  }
166
932
  }
167
933
  export interface BadgeCreateParams {
934
+ /**
935
+ * Array of conditions for the badge
936
+ */
937
+ conditions: Array<BadgeCreateParams.Condition>;
168
938
  /**
169
939
  * The URL of the badge image
170
940
  */
@@ -177,10 +947,6 @@ export interface BadgeCreateParams {
177
947
  * UUID of the organization (optional, converted to lowercase)
178
948
  */
179
949
  organizationId: string;
180
- /**
181
- * Array of rules for the badge
182
- */
183
- rules: Array<BadgeCreateParams.Rule>;
184
950
  /**
185
951
  * UUID of the website (optional, converted to lowercase)
186
952
  */
@@ -191,42 +957,55 @@ export interface BadgeCreateParams {
191
957
  description?: string;
192
958
  }
193
959
  export declare namespace BadgeCreateParams {
194
- /**
195
- * Schema for a loyalty condition rule.
196
- */
197
- interface Rule {
198
- /**
199
- * The type of rule
200
- */
201
- type: 'rule' | 'section' | 'level' | 'points' | 'api' | 'badge';
960
+ interface Condition {
202
961
  /**
203
962
  * The amount of the rule
204
963
  */
205
964
  amount?: number | null;
965
+ /**
966
+ * URL of the CSV file (optional)
967
+ */
968
+ csvUrl?: string | null;
206
969
  /**
207
970
  * The description of the rule
208
971
  */
209
- description?: string;
972
+ description?: string | null;
973
+ /**
974
+ * Array of UUIDs of the badge (optional, converted to lowercase)
975
+ */
976
+ loyaltyBadgeIds?: Array<string>;
977
+ /**
978
+ * Array of UUIDs of the currency (optional, converted to lowercase)
979
+ */
980
+ loyaltyCurrencyIds?: Array<string>;
981
+ /**
982
+ * Array of UUIDs of the Loyalty Leaderboard (optional, converted to lowercase)
983
+ */
984
+ loyaltyLeaderboardViewIds?: Array<string>;
210
985
  /**
211
- * UUID of the badge (optional, converted to lowercase)
986
+ * UUID of the loyalty rule chain (optional, converted to lowercase)
212
987
  */
213
- loyaltyBadgeId?: string | null;
988
+ loyaltyRuleChainId?: string;
214
989
  /**
215
- * UUID of the currency (optional, converted to lowercase)
990
+ * Array of UUIDs of the rule group (optional, converted to lowercase)
216
991
  */
217
- loyaltyCurrencyId?: string | null;
992
+ loyaltyRuleGroupIds?: Array<string>;
218
993
  /**
219
- * UUID of the Loyalty Leaderboard (optional, converted to lowercase)
994
+ * Array of UUIDs of the rules (optional, converted to lowercase)
220
995
  */
221
- loyaltyLeaderboardViewId?: string | null;
996
+ loyaltyRuleIds?: Array<string>;
222
997
  /**
223
- * UUID of the rule group (optional, converted to lowercase)
998
+ * The number of times the rule should be repeated to fulfill the condition
224
999
  */
225
- loyaltyRuleGroupId?: string | null;
1000
+ repeatCount?: number | null;
226
1001
  /**
227
- * UUID of the rule (optional, converted to lowercase)
1002
+ * The number of rules that need to be fulfilled to satisfy the condition
1003
+ */
1004
+ requiredCount?: number | null;
1005
+ /**
1006
+ * The type of rule
228
1007
  */
229
- loyaltyRuleId?: string | null;
1008
+ type?: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
230
1009
  }
231
1010
  }
232
1011
  export interface BadgeUpdateParams {
@@ -255,7 +1034,7 @@ export interface BadgeListParams {
255
1034
  /**
256
1035
  * Number of badges to fetch
257
1036
  */
258
- limit?: number | null;
1037
+ limit?: number;
259
1038
  /**
260
1039
  * UUID of the organization (optional, converted to lowercase)
261
1040
  */
@@ -265,15 +1044,31 @@ export interface BadgeListParams {
265
1044
  */
266
1045
  startingAfter?: string;
267
1046
  /**
268
- * UUID of the user (optional, converted to lowercase)
1047
+ * External identifier of the user group
269
1048
  */
270
- userId?: string;
1049
+ userGroupExternalIdentifier?: string;
1050
+ /**
1051
+ * UUID of the user group
1052
+ */
1053
+ userGroupId?: string;
1054
+ /**
1055
+ * UUID of the user, or array of UUID.
1056
+ */
1057
+ userId?: string | Array<string>;
1058
+ /**
1059
+ * Wallet Address of the user, or array of wallet addresses.
1060
+ */
1061
+ walletAddress?: string | Array<string>;
271
1062
  /**
272
1063
  * UUID of the website (optional, converted to lowercase)
273
1064
  */
274
1065
  websiteId?: string;
275
1066
  }
276
1067
  export interface BadgeRevokeParams {
1068
+ /**
1069
+ * Status of the badge
1070
+ */
1071
+ status?: 'active' | 'inactive' | 'revoked';
277
1072
  /**
278
1073
  * UUID of the user (converted to lowercase)
279
1074
  */
@@ -284,6 +1079,10 @@ export interface BadgeRevokeParams {
284
1079
  walletAddress?: string;
285
1080
  }
286
1081
  export interface BadgeRewardParams {
1082
+ /**
1083
+ * Status of the badge
1084
+ */
1085
+ status?: 'active' | 'inactive' | 'revoked';
287
1086
  /**
288
1087
  * UUID of the user (converted to lowercase)
289
1088
  */