@snagsolutions/sdk 0.1.0-alpha.26 → 0.1.0-alpha.261

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 (341) hide show
  1. package/CHANGELOG.md +151 -151
  2. package/LICENSE +1 -1
  3. package/README.md +15 -23
  4. package/core.d.ts +9 -6
  5. package/core.d.ts.map +1 -1
  6. package/core.js +36 -33
  7. package/core.js.map +1 -1
  8. package/core.mjs +36 -33
  9. package/core.mjs.map +1 -1
  10. package/index.d.mts +15 -9
  11. package/index.d.ts +15 -9
  12. package/index.d.ts.map +1 -1
  13. package/index.js +13 -6
  14. package/index.js.map +1 -1
  15. package/index.mjs +14 -7
  16. package/index.mjs.map +1 -1
  17. package/internal/utils/query.d.ts +2 -0
  18. package/internal/utils/query.d.ts.map +1 -0
  19. package/internal/utils/query.js +33 -0
  20. package/internal/utils/query.js.map +1 -0
  21. package/internal/utils/query.mjs +6 -0
  22. package/internal/utils/query.mjs.map +1 -0
  23. package/package.json +4 -5
  24. package/resource.d.ts +1 -1
  25. package/resource.d.ts.map +1 -1
  26. package/resource.js.map +1 -1
  27. package/resource.mjs.map +1 -1
  28. package/resources/assets.d.ts +16 -2
  29. package/resources/assets.d.ts.map +1 -1
  30. package/resources/assets.js +8 -0
  31. package/resources/assets.js.map +1 -1
  32. package/resources/assets.mjs +8 -0
  33. package/resources/assets.mjs.map +1 -1
  34. package/resources/auctions/auctions.d.ts +341 -0
  35. package/resources/auctions/auctions.d.ts.map +1 -0
  36. package/resources/auctions/auctions.js +72 -0
  37. package/resources/auctions/auctions.js.map +1 -0
  38. package/resources/auctions/auctions.mjs +45 -0
  39. package/resources/auctions/auctions.mjs.map +1 -0
  40. package/resources/auctions/index.d.ts +3 -0
  41. package/resources/auctions/index.d.ts.map +1 -0
  42. package/resources/auctions/index.js +9 -0
  43. package/resources/auctions/index.js.map +1 -0
  44. package/resources/auctions/index.mjs +4 -0
  45. package/resources/auctions/index.mjs.map +1 -0
  46. package/resources/auctions/website-user-attributes/index.d.ts +3 -0
  47. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
  48. package/resources/auctions/website-user-attributes/index.js +9 -0
  49. package/resources/auctions/website-user-attributes/index.js.map +1 -0
  50. package/resources/auctions/website-user-attributes/index.mjs +4 -0
  51. package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
  52. package/resources/auctions/website-user-attributes/values.d.ts +126 -0
  53. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  54. package/resources/auctions/website-user-attributes/values.js +49 -0
  55. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  56. package/resources/auctions/website-user-attributes/values.mjs +45 -0
  57. package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
  58. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +136 -0
  59. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
  60. package/resources/auctions/website-user-attributes/website-user-attributes.js +76 -0
  61. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
  62. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +49 -0
  63. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
  64. package/resources/auctions/website-user-attributes.d.ts +2 -0
  65. package/resources/auctions/website-user-attributes.d.ts.map +1 -0
  66. package/resources/auctions/website-user-attributes.js +19 -0
  67. package/resources/auctions/website-user-attributes.js.map +1 -0
  68. package/resources/auctions/website-user-attributes.mjs +3 -0
  69. package/resources/auctions/website-user-attributes.mjs.map +1 -0
  70. package/resources/auctions.d.ts +1 -133
  71. package/resources/auctions.d.ts.map +1 -1
  72. package/resources/auctions.js +15 -22
  73. package/resources/auctions.js.map +1 -1
  74. package/resources/auctions.mjs +1 -20
  75. package/resources/auctions.mjs.map +1 -1
  76. package/resources/auth.d.ts +66 -6
  77. package/resources/auth.d.ts.map +1 -1
  78. package/resources/auth.js +6 -0
  79. package/resources/auth.js.map +1 -1
  80. package/resources/auth.mjs +6 -0
  81. package/resources/auth.mjs.map +1 -1
  82. package/resources/index.d.ts +5 -4
  83. package/resources/index.d.ts.map +1 -1
  84. package/resources/index.js +5 -3
  85. package/resources/index.js.map +1 -1
  86. package/resources/index.mjs +4 -3
  87. package/resources/index.mjs.map +1 -1
  88. package/resources/loyalty/account-streaks.d.ts +96 -0
  89. package/resources/loyalty/account-streaks.d.ts.map +1 -0
  90. package/resources/loyalty/account-streaks.js +24 -0
  91. package/resources/loyalty/account-streaks.js.map +1 -0
  92. package/resources/loyalty/account-streaks.mjs +20 -0
  93. package/resources/loyalty/account-streaks.mjs.map +1 -0
  94. package/resources/loyalty/accounts.d.ts +60 -16
  95. package/resources/loyalty/accounts.d.ts.map +1 -1
  96. package/resources/loyalty/accounts.js +14 -0
  97. package/resources/loyalty/accounts.js.map +1 -1
  98. package/resources/loyalty/accounts.mjs +14 -0
  99. package/resources/loyalty/accounts.mjs.map +1 -1
  100. package/resources/loyalty/badges.d.ts +885 -136
  101. package/resources/loyalty/badges.d.ts.map +1 -1
  102. package/resources/loyalty/badges.js +19 -1
  103. package/resources/loyalty/badges.js.map +1 -1
  104. package/resources/loyalty/badges.mjs +19 -1
  105. package/resources/loyalty/badges.mjs.map +1 -1
  106. package/resources/loyalty/currencies.d.ts +19 -0
  107. package/resources/loyalty/currencies.d.ts.map +1 -1
  108. package/resources/loyalty/currencies.js +19 -0
  109. package/resources/loyalty/currencies.js.map +1 -1
  110. package/resources/loyalty/currencies.mjs +19 -0
  111. package/resources/loyalty/currencies.mjs.map +1 -1
  112. package/resources/loyalty/index.d.ts +3 -3
  113. package/resources/loyalty/index.d.ts.map +1 -1
  114. package/resources/loyalty/index.js +5 -5
  115. package/resources/loyalty/index.js.map +1 -1
  116. package/resources/loyalty/index.mjs +2 -2
  117. package/resources/loyalty/index.mjs.map +1 -1
  118. package/resources/loyalty/loyalty.d.ts +9 -9
  119. package/resources/loyalty/loyalty.d.ts.map +1 -1
  120. package/resources/loyalty/loyalty.js +6 -6
  121. package/resources/loyalty/loyalty.js.map +1 -1
  122. package/resources/loyalty/loyalty.mjs +6 -6
  123. package/resources/loyalty/loyalty.mjs.map +1 -1
  124. package/resources/loyalty/multipliers.d.ts +39 -2
  125. package/resources/loyalty/multipliers.d.ts.map +1 -1
  126. package/resources/loyalty/multipliers.js +23 -0
  127. package/resources/loyalty/multipliers.js.map +1 -1
  128. package/resources/loyalty/multipliers.mjs +23 -0
  129. package/resources/loyalty/multipliers.mjs.map +1 -1
  130. package/resources/loyalty/questions-responses.d.ts +55 -4
  131. package/resources/loyalty/questions-responses.d.ts.map +1 -1
  132. package/resources/loyalty/questions-responses.js +9 -0
  133. package/resources/loyalty/questions-responses.js.map +1 -1
  134. package/resources/loyalty/questions-responses.mjs +9 -0
  135. package/resources/loyalty/questions-responses.mjs.map +1 -1
  136. package/resources/loyalty/questions.d.ts +60 -6
  137. package/resources/loyalty/questions.d.ts.map +1 -1
  138. package/resources/loyalty/questions.js +39 -0
  139. package/resources/loyalty/questions.js.map +1 -1
  140. package/resources/loyalty/questions.mjs +39 -0
  141. package/resources/loyalty/questions.mjs.map +1 -1
  142. package/resources/loyalty/rule-edits.d.ts +2898 -8
  143. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  144. package/resources/loyalty/rule-edits.js +14 -0
  145. package/resources/loyalty/rule-edits.js.map +1 -1
  146. package/resources/loyalty/rule-edits.mjs +14 -0
  147. package/resources/loyalty/rule-edits.mjs.map +1 -1
  148. package/resources/loyalty/rule-groups.d.ts +284 -56
  149. package/resources/loyalty/rule-groups.d.ts.map +1 -1
  150. package/resources/loyalty/rule-groups.js +18 -0
  151. package/resources/loyalty/rule-groups.js.map +1 -1
  152. package/resources/loyalty/rule-groups.mjs +18 -0
  153. package/resources/loyalty/rule-groups.mjs.map +1 -1
  154. package/resources/loyalty/rules.d.ts +2368 -346
  155. package/resources/loyalty/rules.d.ts.map +1 -1
  156. package/resources/loyalty/rules.js +40 -9
  157. package/resources/loyalty/rules.js.map +1 -1
  158. package/resources/loyalty/rules.mjs +40 -9
  159. package/resources/loyalty/rules.mjs.map +1 -1
  160. package/resources/loyalty/transactions/index.d.ts +4 -0
  161. package/resources/loyalty/transactions/index.d.ts.map +1 -0
  162. package/resources/loyalty/transactions/index.js +11 -0
  163. package/resources/loyalty/transactions/index.js.map +1 -0
  164. package/resources/loyalty/transactions/index.mjs +5 -0
  165. package/resources/loyalty/transactions/index.mjs.map +1 -0
  166. package/resources/loyalty/transactions/posts.d.ts +145 -0
  167. package/resources/loyalty/transactions/posts.d.ts.map +1 -0
  168. package/resources/loyalty/transactions/posts.js +32 -0
  169. package/resources/loyalty/transactions/posts.js.map +1 -0
  170. package/resources/loyalty/transactions/posts.mjs +28 -0
  171. package/resources/loyalty/transactions/posts.mjs.map +1 -0
  172. package/resources/loyalty/transactions/rule-statuses.d.ts +121 -0
  173. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  174. package/resources/loyalty/transactions/rule-statuses.js +30 -0
  175. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  176. package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
  177. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  178. package/resources/loyalty/transactions/transactions.d.ts +566 -0
  179. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  180. package/resources/loyalty/transactions/transactions.js +110 -0
  181. package/resources/loyalty/transactions/transactions.js.map +1 -0
  182. package/resources/loyalty/transactions/transactions.mjs +83 -0
  183. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  184. package/resources/loyalty/transactions.d.ts +1 -253
  185. package/resources/loyalty/transactions.d.ts.map +1 -1
  186. package/resources/loyalty/transactions.js +15 -18
  187. package/resources/loyalty/transactions.js.map +1 -1
  188. package/resources/loyalty/transactions.mjs +1 -16
  189. package/resources/loyalty/transactions.mjs.map +1 -1
  190. package/resources/minting/allowlist.d.ts +84 -0
  191. package/resources/minting/allowlist.d.ts.map +1 -0
  192. package/resources/minting/allowlist.js +42 -0
  193. package/resources/minting/allowlist.js.map +1 -0
  194. package/resources/minting/allowlist.mjs +38 -0
  195. package/resources/minting/allowlist.mjs.map +1 -0
  196. package/resources/minting/contracts.d.ts +165 -0
  197. package/resources/minting/contracts.d.ts.map +1 -0
  198. package/resources/minting/contracts.js +30 -0
  199. package/resources/minting/contracts.js.map +1 -0
  200. package/resources/minting/contracts.mjs +26 -0
  201. package/resources/minting/contracts.mjs.map +1 -0
  202. package/resources/minting/index.d.ts +5 -0
  203. package/resources/minting/index.d.ts.map +1 -0
  204. package/resources/minting/index.js +13 -0
  205. package/resources/minting/index.js.map +1 -0
  206. package/resources/minting/index.mjs +6 -0
  207. package/resources/minting/index.mjs.map +1 -0
  208. package/resources/minting/minting.d.ts +146 -0
  209. package/resources/minting/minting.d.ts.map +1 -0
  210. package/resources/minting/minting.js +79 -0
  211. package/resources/minting/minting.js.map +1 -0
  212. package/resources/minting/minting.mjs +52 -0
  213. package/resources/minting/minting.mjs.map +1 -0
  214. package/resources/minting/status.d.ts +44 -0
  215. package/resources/minting/status.d.ts.map +1 -0
  216. package/resources/minting/status.js +33 -0
  217. package/resources/minting/status.js.map +1 -0
  218. package/resources/minting/status.mjs +29 -0
  219. package/resources/minting/status.mjs.map +1 -0
  220. package/resources/minting.d.ts +1 -94
  221. package/resources/minting.d.ts.map +1 -1
  222. package/resources/minting.js +15 -11
  223. package/resources/minting.js.map +1 -1
  224. package/resources/minting.mjs +1 -9
  225. package/resources/minting.mjs.map +1 -1
  226. package/resources/referral/referral.d.ts +12 -3
  227. package/resources/referral/referral.d.ts.map +1 -1
  228. package/resources/referral/referral.js +11 -5
  229. package/resources/referral/referral.js.map +1 -1
  230. package/resources/referral/referral.mjs +11 -5
  231. package/resources/referral/referral.mjs.map +1 -1
  232. package/resources/referral/users.d.ts +30 -3
  233. package/resources/referral/users.d.ts.map +1 -1
  234. package/resources/referral/users.js +12 -4
  235. package/resources/referral/users.js.map +1 -1
  236. package/resources/referral/users.mjs +12 -4
  237. package/resources/referral/users.mjs.map +1 -1
  238. package/resources/token-claims.d.ts +162 -0
  239. package/resources/token-claims.d.ts.map +1 -0
  240. package/resources/token-claims.js +46 -0
  241. package/resources/token-claims.js.map +1 -0
  242. package/resources/token-claims.mjs +42 -0
  243. package/resources/token-claims.mjs.map +1 -0
  244. package/resources/users/index.d.ts +1 -1
  245. package/resources/users/index.d.ts.map +1 -1
  246. package/resources/users/index.js.map +1 -1
  247. package/resources/users/index.mjs.map +1 -1
  248. package/resources/users/metadatas.d.ts +40 -3
  249. package/resources/users/metadatas.d.ts.map +1 -1
  250. package/resources/users/metadatas.js.map +1 -1
  251. package/resources/users/metadatas.mjs.map +1 -1
  252. package/resources/users/users.d.ts +203 -36
  253. package/resources/users/users.d.ts.map +1 -1
  254. package/resources/users/users.js +58 -1
  255. package/resources/users/users.js.map +1 -1
  256. package/resources/users/users.mjs +58 -1
  257. package/resources/users/users.mjs.map +1 -1
  258. package/resources/websites/index.d.ts +1 -1
  259. package/resources/websites/index.d.ts.map +1 -1
  260. package/resources/websites/index.js.map +1 -1
  261. package/resources/websites/index.mjs +1 -1
  262. package/resources/websites/index.mjs.map +1 -1
  263. package/resources/websites/website-collections.d.ts +0 -69
  264. package/resources/websites/website-collections.d.ts.map +1 -1
  265. package/resources/websites/website-collections.js +0 -16
  266. package/resources/websites/website-collections.js.map +1 -1
  267. package/resources/websites/website-collections.mjs +0 -16
  268. package/resources/websites/website-collections.mjs.map +1 -1
  269. package/resources/websites/website-user-roles.d.ts +24 -1
  270. package/resources/websites/website-user-roles.d.ts.map +1 -1
  271. package/resources/websites/website-user-roles.js +23 -0
  272. package/resources/websites/website-user-roles.js.map +1 -1
  273. package/resources/websites/website-user-roles.mjs +23 -0
  274. package/resources/websites/website-user-roles.mjs.map +1 -1
  275. package/resources/websites/websites.d.ts +21 -99
  276. package/resources/websites/websites.d.ts.map +1 -1
  277. package/resources/websites/websites.js +9 -1
  278. package/resources/websites/websites.js.map +1 -1
  279. package/resources/websites/websites.mjs +10 -2
  280. package/resources/websites/websites.mjs.map +1 -1
  281. package/src/core.ts +40 -36
  282. package/src/index.ts +84 -6
  283. package/src/internal/utils/query.ts +7 -0
  284. package/src/resource.ts +1 -1
  285. package/src/resources/assets.ts +18 -3
  286. package/src/resources/auctions/auctions.ts +523 -0
  287. package/src/resources/auctions/index.ts +19 -0
  288. package/src/resources/auctions/website-user-attributes/index.ts +18 -0
  289. package/src/resources/auctions/website-user-attributes/values.ts +170 -0
  290. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +212 -0
  291. package/src/resources/auctions/website-user-attributes.ts +3 -0
  292. package/src/resources/auctions.ts +1 -207
  293. package/src/resources/auth.ts +124 -6
  294. package/src/resources/index.ts +41 -3
  295. package/src/resources/loyalty/account-streaks.ts +128 -0
  296. package/src/resources/loyalty/accounts.ts +65 -18
  297. package/src/resources/loyalty/badges.ts +1058 -146
  298. package/src/resources/loyalty/currencies.ts +19 -0
  299. package/src/resources/loyalty/index.ts +13 -2
  300. package/src/resources/loyalty/loyalty.ts +30 -12
  301. package/src/resources/loyalty/multipliers.ts +43 -4
  302. package/src/resources/loyalty/questions-responses.ts +64 -4
  303. package/src/resources/loyalty/questions.ts +64 -6
  304. package/src/resources/loyalty/rule-edits.ts +4208 -94
  305. package/src/resources/loyalty/rule-groups.ts +474 -64
  306. package/src/resources/loyalty/rules.ts +3708 -403
  307. package/src/resources/loyalty/transactions/index.ts +29 -0
  308. package/src/resources/loyalty/transactions/posts.ts +221 -0
  309. package/src/resources/loyalty/transactions/rule-statuses.ts +179 -0
  310. package/src/resources/loyalty/transactions/transactions.ts +932 -0
  311. package/src/resources/loyalty/transactions.ts +1 -446
  312. package/src/resources/minting/allowlist.ts +116 -0
  313. package/src/resources/minting/contracts.ts +415 -0
  314. package/src/resources/minting/index.ts +29 -0
  315. package/src/resources/minting/minting.ts +285 -0
  316. package/src/resources/minting/status.ts +70 -0
  317. package/src/resources/minting.ts +1 -157
  318. package/src/resources/referral/referral.ts +15 -11
  319. package/src/resources/referral/users.ts +45 -5
  320. package/src/resources/token-claims.ts +311 -0
  321. package/src/resources/users/index.ts +4 -0
  322. package/src/resources/users/metadatas.ts +66 -3
  323. package/src/resources/users/users.ts +277 -39
  324. package/src/resources/websites/index.ts +1 -6
  325. package/src/resources/websites/website-collections.ts +1 -146
  326. package/src/resources/websites/website-user-roles.ts +26 -1
  327. package/src/resources/websites/websites.ts +22 -127
  328. package/src/version.ts +1 -1
  329. package/version.d.ts +1 -1
  330. package/version.d.ts.map +1 -1
  331. package/version.js +1 -1
  332. package/version.js.map +1 -1
  333. package/version.mjs +1 -1
  334. package/version.mjs.map +1 -1
  335. package/resources/loyalty/rule-chains.d.ts +0 -34
  336. package/resources/loyalty/rule-chains.d.ts.map +0 -1
  337. package/resources/loyalty/rule-chains.js +0 -15
  338. package/resources/loyalty/rule-chains.js.map +0 -1
  339. package/resources/loyalty/rule-chains.mjs +0 -11
  340. package/resources/loyalty/rule-chains.mjs.map +0 -1
  341. package/src/resources/loyalty/rule-chains.ts +0 -45
@@ -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>;
@@ -38,6 +82,10 @@ export interface BadgeCreateResponse {
38
82
  * UUID of the badge (converted to lowercase)
39
83
  */
40
84
  id: string;
85
+ /**
86
+ * The date and time the badge was created
87
+ */
88
+ createdAt: string;
41
89
  /**
42
90
  * The description of the badge
43
91
  */
@@ -54,10 +102,30 @@ export interface BadgeCreateResponse {
54
102
  * The name of the badge
55
103
  */
56
104
  name: string;
105
+ /**
106
+ * The date and time the badge was updated
107
+ */
108
+ updatedAt: string;
109
+ /**
110
+ * Array of data jobs associated with the badge
111
+ */
112
+ dataJobs?: Array<BadgeCreateResponse.DataJob>;
113
+ /**
114
+ * Whether to hide this badge in the user interface
115
+ */
116
+ hideInUi?: boolean;
57
117
  /**
58
118
  * Array of user badges
59
119
  */
60
- LoyaltyBadgeUser?: Array<BadgeCreateResponse.LoyaltyBadgeUser>;
120
+ loyaltyBadgeUsers?: Array<BadgeCreateResponse.LoyaltyBadgeUser>;
121
+ /**
122
+ * Array of loyalty rules associated with the badge
123
+ */
124
+ loyaltyRules?: Array<BadgeCreateResponse.LoyaltyRule>;
125
+ /**
126
+ * Array of rewards granted when the badge is achieved
127
+ */
128
+ rewards?: Array<BadgeCreateResponse.Reward>;
61
129
  }
62
130
  export declare namespace BadgeCreateResponse {
63
131
  /**
@@ -74,7 +142,7 @@ export declare namespace BadgeCreateResponse {
74
142
  amount: number | null;
75
143
  association: Array<LoyaltyCondition.Association>;
76
144
  /**
77
- * The URL of the CSV file
145
+ * URL of the CSV file
78
146
  */
79
147
  csvUrl: string | null;
80
148
  /**
@@ -101,6 +169,10 @@ export declare namespace BadgeCreateResponse {
101
169
  * The type of the condition
102
170
  */
103
171
  type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
172
+ /**
173
+ * Array of CSV files associated with the condition
174
+ */
175
+ csvFiles?: Array<LoyaltyCondition.CsvFile>;
104
176
  }
105
177
  namespace LoyaltyCondition {
106
178
  interface Association {
@@ -162,12 +234,56 @@ export declare namespace BadgeCreateResponse {
162
234
  name: string;
163
235
  }
164
236
  }
237
+ interface CsvFile {
238
+ /**
239
+ * UUID of the CSV file (converted to lowercase)
240
+ */
241
+ id: string;
242
+ /**
243
+ * The description of the CSV file
244
+ */
245
+ description: string | null;
246
+ /**
247
+ * The name of the CSV file
248
+ */
249
+ name: string | null;
250
+ /**
251
+ * The URL of the CSV file
252
+ */
253
+ url: string | null;
254
+ }
255
+ }
256
+ interface DataJob {
257
+ /**
258
+ * UUID of the data job (converted to lowercase)
259
+ */
260
+ id: string;
261
+ /**
262
+ * The date and time the data job was created
263
+ */
264
+ createdAt: string;
265
+ /**
266
+ * The status of the data job
267
+ */
268
+ status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
269
+ /**
270
+ * The date and time the data job was updated
271
+ */
272
+ updatedAt: string;
273
+ /**
274
+ * The message associated with the data job
275
+ */
276
+ message?: string | null;
165
277
  }
166
278
  interface LoyaltyBadgeUser {
167
279
  /**
168
280
  * UUID of the user badge (converted to lowercase)
169
281
  */
170
282
  id: string;
283
+ /**
284
+ * The date and time the user badge was created
285
+ */
286
+ createdAt: string;
171
287
  /**
172
288
  * UUID of the badge (converted to lowercase)
173
289
  */
@@ -180,6 +296,10 @@ export declare namespace BadgeCreateResponse {
180
296
  * The status of the badge
181
297
  */
182
298
  status: 'active' | 'inactive' | 'revoked';
299
+ /**
300
+ * The date and time the user badge was updated
301
+ */
302
+ updatedAt: string;
183
303
  /**
184
304
  * UUID of the user (converted to lowercase)
185
305
  */
@@ -188,10 +308,82 @@ export declare namespace BadgeCreateResponse {
188
308
  * UUID of the website (converted to lowercase)
189
309
  */
190
310
  websiteId: string;
311
+ /**
312
+ * The date and time the user badge was granted
313
+ */
314
+ completedAt?: string | null;
315
+ /**
316
+ * Whether the user has dismissed the badge in the UI
317
+ */
318
+ dismissedInUi?: boolean;
319
+ /**
320
+ * Whether to hide this badge in the user interface
321
+ */
322
+ hideInUi?: boolean;
191
323
  /**
192
324
  * Array of progress for the badge
193
325
  */
194
326
  progress?: unknown;
327
+ /**
328
+ * User associated with the user badge
329
+ */
330
+ user?: LoyaltyBadgeUser.User;
331
+ }
332
+ namespace LoyaltyBadgeUser {
333
+ /**
334
+ * User associated with the user badge
335
+ */
336
+ interface User {
337
+ /**
338
+ * UUID of the user (converted to lowercase)
339
+ */
340
+ id: string;
341
+ /**
342
+ * Wallet address of the user
343
+ */
344
+ walletAddress: string;
345
+ }
346
+ }
347
+ interface LoyaltyRule {
348
+ /**
349
+ * UUID of the loyalty rule (converted to lowercase)
350
+ */
351
+ id: string;
352
+ /**
353
+ * The name of the loyalty rule
354
+ */
355
+ name: string;
356
+ }
357
+ interface Reward {
358
+ /**
359
+ * UUID of the badge reward
360
+ */
361
+ id: string;
362
+ /**
363
+ * Points amount to reward (for points reward type)
364
+ */
365
+ amount: number | null;
366
+ /**
367
+ * Whether the multiplier should be applied to the user's existing balance
368
+ */
369
+ isRetroactive: boolean;
370
+ /**
371
+ * UUID of the loyalty currency for this reward
372
+ */
373
+ loyaltyCurrencyId: string | null;
374
+ /**
375
+ * Multiplier to reward (for multiplier reward type)
376
+ */
377
+ multiplier: number | null;
378
+ /**
379
+ * Type of reward (points or multiplier)
380
+ */
381
+ rewardType: 'points' | 'multiplier' | 'badge';
382
+ /**
383
+ * Array of loyalty currency IDs for multiplier rewards (empty means all
384
+ * currencies)
385
+ */
386
+ loyaltyCurrencyIds?: Array<string>;
195
387
  }
196
388
  }
197
389
  /**
@@ -202,6 +394,10 @@ export interface BadgeUpdateResponse {
202
394
  * UUID of the badge (converted to lowercase)
203
395
  */
204
396
  id: string;
397
+ /**
398
+ * The date and time the badge was created
399
+ */
400
+ createdAt: string;
205
401
  /**
206
402
  * The description of the badge
207
403
  */
@@ -218,10 +414,30 @@ export interface BadgeUpdateResponse {
218
414
  * The name of the badge
219
415
  */
220
416
  name: string;
417
+ /**
418
+ * The date and time the badge was updated
419
+ */
420
+ updatedAt: string;
421
+ /**
422
+ * Array of data jobs associated with the badge
423
+ */
424
+ dataJobs?: Array<BadgeUpdateResponse.DataJob>;
425
+ /**
426
+ * Whether to hide this badge in the user interface
427
+ */
428
+ hideInUi?: boolean;
221
429
  /**
222
430
  * Array of user badges
223
431
  */
224
- LoyaltyBadgeUser?: Array<BadgeUpdateResponse.LoyaltyBadgeUser>;
432
+ loyaltyBadgeUsers?: Array<BadgeUpdateResponse.LoyaltyBadgeUser>;
433
+ /**
434
+ * Array of loyalty rules associated with the badge
435
+ */
436
+ loyaltyRules?: Array<BadgeUpdateResponse.LoyaltyRule>;
437
+ /**
438
+ * Array of rewards granted when the badge is achieved
439
+ */
440
+ rewards?: Array<BadgeUpdateResponse.Reward>;
225
441
  }
226
442
  export declare namespace BadgeUpdateResponse {
227
443
  /**
@@ -238,7 +454,7 @@ export declare namespace BadgeUpdateResponse {
238
454
  amount: number | null;
239
455
  association: Array<LoyaltyCondition.Association>;
240
456
  /**
241
- * The URL of the CSV file
457
+ * URL of the CSV file
242
458
  */
243
459
  csvUrl: string | null;
244
460
  /**
@@ -265,6 +481,10 @@ export declare namespace BadgeUpdateResponse {
265
481
  * The type of the condition
266
482
  */
267
483
  type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
484
+ /**
485
+ * Array of CSV files associated with the condition
486
+ */
487
+ csvFiles?: Array<LoyaltyCondition.CsvFile>;
268
488
  }
269
489
  namespace LoyaltyCondition {
270
490
  interface Association {
@@ -326,12 +546,56 @@ export declare namespace BadgeUpdateResponse {
326
546
  name: string;
327
547
  }
328
548
  }
549
+ interface CsvFile {
550
+ /**
551
+ * UUID of the CSV file (converted to lowercase)
552
+ */
553
+ id: string;
554
+ /**
555
+ * The description of the CSV file
556
+ */
557
+ description: string | null;
558
+ /**
559
+ * The name of the CSV file
560
+ */
561
+ name: string | null;
562
+ /**
563
+ * The URL of the CSV file
564
+ */
565
+ url: string | null;
566
+ }
567
+ }
568
+ interface DataJob {
569
+ /**
570
+ * UUID of the data job (converted to lowercase)
571
+ */
572
+ id: string;
573
+ /**
574
+ * The date and time the data job was created
575
+ */
576
+ createdAt: string;
577
+ /**
578
+ * The status of the data job
579
+ */
580
+ status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
581
+ /**
582
+ * The date and time the data job was updated
583
+ */
584
+ updatedAt: string;
585
+ /**
586
+ * The message associated with the data job
587
+ */
588
+ message?: string | null;
329
589
  }
330
590
  interface LoyaltyBadgeUser {
331
591
  /**
332
592
  * UUID of the user badge (converted to lowercase)
333
593
  */
334
594
  id: string;
595
+ /**
596
+ * The date and time the user badge was created
597
+ */
598
+ createdAt: string;
335
599
  /**
336
600
  * UUID of the badge (converted to lowercase)
337
601
  */
@@ -344,6 +608,10 @@ export declare namespace BadgeUpdateResponse {
344
608
  * The status of the badge
345
609
  */
346
610
  status: 'active' | 'inactive' | 'revoked';
611
+ /**
612
+ * The date and time the user badge was updated
613
+ */
614
+ updatedAt: string;
347
615
  /**
348
616
  * UUID of the user (converted to lowercase)
349
617
  */
@@ -352,174 +620,403 @@ export declare namespace BadgeUpdateResponse {
352
620
  * UUID of the website (converted to lowercase)
353
621
  */
354
622
  websiteId: string;
623
+ /**
624
+ * The date and time the user badge was granted
625
+ */
626
+ completedAt?: string | null;
627
+ /**
628
+ * Whether the user has dismissed the badge in the UI
629
+ */
630
+ dismissedInUi?: boolean;
631
+ /**
632
+ * Whether to hide this badge in the user interface
633
+ */
634
+ hideInUi?: boolean;
355
635
  /**
356
636
  * Array of progress for the badge
357
637
  */
358
638
  progress?: unknown;
639
+ /**
640
+ * User associated with the user badge
641
+ */
642
+ user?: LoyaltyBadgeUser.User;
643
+ }
644
+ namespace LoyaltyBadgeUser {
645
+ /**
646
+ * User associated with the user badge
647
+ */
648
+ interface User {
649
+ /**
650
+ * UUID of the user (converted to lowercase)
651
+ */
652
+ id: string;
653
+ /**
654
+ * Wallet address of the user
655
+ */
656
+ walletAddress: string;
657
+ }
658
+ }
659
+ interface LoyaltyRule {
660
+ /**
661
+ * UUID of the loyalty rule (converted to lowercase)
662
+ */
663
+ id: string;
664
+ /**
665
+ * The name of the loyalty rule
666
+ */
667
+ name: string;
668
+ }
669
+ interface Reward {
670
+ /**
671
+ * UUID of the badge reward
672
+ */
673
+ id: string;
674
+ /**
675
+ * Points amount to reward (for points reward type)
676
+ */
677
+ amount: number | null;
678
+ /**
679
+ * Whether the multiplier should be applied to the user's existing balance
680
+ */
681
+ isRetroactive: boolean;
682
+ /**
683
+ * UUID of the loyalty currency for this reward
684
+ */
685
+ loyaltyCurrencyId: string | null;
686
+ /**
687
+ * Multiplier to reward (for multiplier reward type)
688
+ */
689
+ multiplier: number | null;
690
+ /**
691
+ * Type of reward (points or multiplier)
692
+ */
693
+ rewardType: 'points' | 'multiplier' | 'badge';
694
+ /**
695
+ * Array of loyalty currency IDs for multiplier rewards (empty means all
696
+ * currencies)
697
+ */
698
+ loyaltyCurrencyIds?: Array<string>;
359
699
  }
360
700
  }
361
- /**
362
- * Response returned upon successful fetching of the badges.
363
- */
364
701
  export interface BadgeListResponse {
702
+ data: Array<BadgeListResponse.Data>;
365
703
  /**
366
- * UUID of the badge (converted to lowercase)
367
- */
368
- id: string;
369
- /**
370
- * The description of the badge
371
- */
372
- description: string | null;
373
- /**
374
- * The URL of the badge image
375
- */
376
- imageUrl: string | null;
377
- /**
378
- * Array of conditions of the badge
379
- */
380
- loyaltyConditions: Array<BadgeListResponse.LoyaltyCondition>;
381
- /**
382
- * The name of the badge
383
- */
384
- name: string;
385
- /**
386
- * Array of user badges
704
+ * Indicates if there is a next page of results
387
705
  */
388
- LoyaltyBadgeUser?: Array<BadgeListResponse.LoyaltyBadgeUser>;
706
+ hasNextPage: boolean;
389
707
  }
390
708
  export declare namespace BadgeListResponse {
391
709
  /**
392
- * Schema for a loyalty condition rule.
710
+ * Response returned upon successful fetching of the badges.
393
711
  */
394
- interface LoyaltyCondition {
712
+ interface Data {
395
713
  /**
396
- * UUID of the condition (converted to lowercase)
714
+ * UUID of the badge (converted to lowercase)
397
715
  */
398
716
  id: string;
399
717
  /**
400
- * The amount of the condition
718
+ * The date and time the badge was created
401
719
  */
402
- amount: number | null;
403
- association: Array<LoyaltyCondition.Association>;
720
+ createdAt: string;
404
721
  /**
405
- * The URL of the CSV file
722
+ * The description of the badge
406
723
  */
407
- csvUrl: string | null;
724
+ description: string | null;
408
725
  /**
409
- * The description of the condition
726
+ * The URL of the badge image
410
727
  */
411
- description: string | null;
728
+ imageUrl: string | null;
412
729
  /**
413
- * UUID of the currency (converted to lowercase)
730
+ * Array of conditions of the badge
414
731
  */
415
- loyaltyCurrencyId: string | null;
732
+ loyaltyConditions: Array<Data.LoyaltyCondition>;
416
733
  /**
417
- * UUID of the rule group (converted to lowercase)
734
+ * The name of the badge
418
735
  */
419
- loyaltyRuleGroupId: string | null;
736
+ name: string;
420
737
  /**
421
- * The repeat count of the condition
738
+ * The date and time the badge was updated
422
739
  */
423
- repeatCount: number | null;
740
+ updatedAt: string;
424
741
  /**
425
- * The required count of the condition
742
+ * Array of data jobs associated with the badge
426
743
  */
427
- requiredCount: number | null;
744
+ dataJobs?: Array<Data.DataJob>;
428
745
  /**
429
- * The type of the condition
746
+ * Whether to hide this badge in the user interface
430
747
  */
431
- type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
748
+ hideInUi?: boolean;
749
+ /**
750
+ * Array of user badges
751
+ */
752
+ loyaltyBadgeUsers?: Array<Data.LoyaltyBadgeUser>;
753
+ /**
754
+ * Array of loyalty rules associated with the badge
755
+ */
756
+ loyaltyRules?: Array<Data.LoyaltyRule>;
757
+ /**
758
+ * Array of rewards granted when the badge is achieved
759
+ */
760
+ rewards?: Array<Data.Reward>;
432
761
  }
433
- namespace LoyaltyCondition {
434
- interface Association {
435
- loyaltyBadge: Association.LoyaltyBadge | null;
436
- loyaltyCurrency: Association.LoyaltyCurrency | null;
437
- loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
438
- loyaltyRule: Association.LoyaltyRule | null;
439
- loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
762
+ namespace Data {
763
+ /**
764
+ * Schema for a loyalty condition rule.
765
+ */
766
+ interface LoyaltyCondition {
767
+ /**
768
+ * UUID of the condition (converted to lowercase)
769
+ */
770
+ id: string;
771
+ /**
772
+ * The amount of the condition
773
+ */
774
+ amount: number | null;
775
+ association: Array<LoyaltyCondition.Association>;
776
+ /**
777
+ * URL of the CSV file
778
+ */
779
+ csvUrl: string | null;
780
+ /**
781
+ * The description of the condition
782
+ */
783
+ description: string | null;
784
+ /**
785
+ * UUID of the currency (converted to lowercase)
786
+ */
787
+ loyaltyCurrencyId: string | null;
788
+ /**
789
+ * UUID of the rule group (converted to lowercase)
790
+ */
791
+ loyaltyRuleGroupId: string | null;
792
+ /**
793
+ * The repeat count of the condition
794
+ */
795
+ repeatCount: number | null;
796
+ /**
797
+ * The required count of the condition
798
+ */
799
+ requiredCount: number | null;
800
+ /**
801
+ * The type of the condition
802
+ */
803
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
804
+ /**
805
+ * Array of CSV files associated with the condition
806
+ */
807
+ csvFiles?: Array<LoyaltyCondition.CsvFile>;
440
808
  }
441
- namespace Association {
442
- interface LoyaltyBadge {
443
- /**
444
- * UUID of the association (converted to lowercase)
445
- */
446
- id: string;
447
- /**
448
- * The name of the association
449
- */
450
- name: string;
809
+ namespace LoyaltyCondition {
810
+ interface Association {
811
+ loyaltyBadge: Association.LoyaltyBadge | null;
812
+ loyaltyCurrency: Association.LoyaltyCurrency | null;
813
+ loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
814
+ loyaltyRule: Association.LoyaltyRule | null;
815
+ loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
451
816
  }
452
- interface LoyaltyCurrency {
453
- /**
454
- * UUID of the association (converted to lowercase)
455
- */
456
- id: string;
457
- /**
458
- * The name of the association
459
- */
460
- name: string;
817
+ namespace Association {
818
+ interface LoyaltyBadge {
819
+ /**
820
+ * UUID of the association (converted to lowercase)
821
+ */
822
+ id: string;
823
+ /**
824
+ * The name of the association
825
+ */
826
+ name: string;
827
+ }
828
+ interface LoyaltyCurrency {
829
+ /**
830
+ * UUID of the association (converted to lowercase)
831
+ */
832
+ id: string;
833
+ /**
834
+ * The name of the association
835
+ */
836
+ name: string;
837
+ }
838
+ interface LoyaltyLeaderboardView {
839
+ /**
840
+ * UUID of the association (converted to lowercase)
841
+ */
842
+ id: string;
843
+ /**
844
+ * The name of the association
845
+ */
846
+ name: string;
847
+ }
848
+ interface LoyaltyRule {
849
+ /**
850
+ * UUID of the association (converted to lowercase)
851
+ */
852
+ id: string;
853
+ /**
854
+ * The name of the association
855
+ */
856
+ name: string;
857
+ }
858
+ interface LoyaltyRuleGroup {
859
+ /**
860
+ * UUID of the association (converted to lowercase)
861
+ */
862
+ id: string;
863
+ /**
864
+ * The name of the association
865
+ */
866
+ name: string;
867
+ }
461
868
  }
462
- interface LoyaltyLeaderboardView {
869
+ interface CsvFile {
463
870
  /**
464
- * UUID of the association (converted to lowercase)
871
+ * UUID of the CSV file (converted to lowercase)
465
872
  */
466
873
  id: string;
467
874
  /**
468
- * The name of the association
875
+ * The description of the CSV file
469
876
  */
470
- name: string;
471
- }
472
- interface LoyaltyRule {
877
+ description: string | null;
473
878
  /**
474
- * UUID of the association (converted to lowercase)
879
+ * The name of the CSV file
475
880
  */
476
- id: string;
881
+ name: string | null;
477
882
  /**
478
- * The name of the association
883
+ * The URL of the CSV file
479
884
  */
480
- name: string;
885
+ url: string | null;
481
886
  }
482
- interface LoyaltyRuleGroup {
887
+ }
888
+ interface DataJob {
889
+ /**
890
+ * UUID of the data job (converted to lowercase)
891
+ */
892
+ id: string;
893
+ /**
894
+ * The date and time the data job was created
895
+ */
896
+ createdAt: string;
897
+ /**
898
+ * The status of the data job
899
+ */
900
+ status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
901
+ /**
902
+ * The date and time the data job was updated
903
+ */
904
+ updatedAt: string;
905
+ /**
906
+ * The message associated with the data job
907
+ */
908
+ message?: string | null;
909
+ }
910
+ interface LoyaltyBadgeUser {
911
+ /**
912
+ * UUID of the user badge (converted to lowercase)
913
+ */
914
+ id: string;
915
+ /**
916
+ * The date and time the user badge was created
917
+ */
918
+ createdAt: string;
919
+ /**
920
+ * UUID of the badge (converted to lowercase)
921
+ */
922
+ loyaltyBadgeId: string;
923
+ /**
924
+ * UUID of the organization (converted to lowercase)
925
+ */
926
+ organizationId: string;
927
+ /**
928
+ * The status of the badge
929
+ */
930
+ status: 'active' | 'inactive' | 'revoked';
931
+ /**
932
+ * The date and time the user badge was updated
933
+ */
934
+ updatedAt: string;
935
+ /**
936
+ * UUID of the user (converted to lowercase)
937
+ */
938
+ userId: string;
939
+ /**
940
+ * UUID of the website (converted to lowercase)
941
+ */
942
+ websiteId: string;
943
+ /**
944
+ * The date and time the user badge was granted
945
+ */
946
+ completedAt?: string | null;
947
+ /**
948
+ * Whether the user has dismissed the badge in the UI
949
+ */
950
+ dismissedInUi?: boolean;
951
+ /**
952
+ * Whether to hide this badge in the user interface
953
+ */
954
+ hideInUi?: boolean;
955
+ /**
956
+ * Array of progress for the badge
957
+ */
958
+ progress?: unknown;
959
+ /**
960
+ * User associated with the user badge
961
+ */
962
+ user?: LoyaltyBadgeUser.User;
963
+ }
964
+ namespace LoyaltyBadgeUser {
965
+ /**
966
+ * User associated with the user badge
967
+ */
968
+ interface User {
483
969
  /**
484
- * UUID of the association (converted to lowercase)
970
+ * UUID of the user (converted to lowercase)
485
971
  */
486
972
  id: string;
487
973
  /**
488
- * The name of the association
974
+ * Wallet address of the user
489
975
  */
490
- name: string;
976
+ walletAddress: string;
491
977
  }
492
978
  }
493
- }
494
- interface LoyaltyBadgeUser {
495
- /**
496
- * UUID of the user badge (converted to lowercase)
497
- */
498
- id: string;
499
- /**
500
- * UUID of the badge (converted to lowercase)
501
- */
502
- loyaltyBadgeId: string;
503
- /**
504
- * UUID of the organization (converted to lowercase)
505
- */
506
- organizationId: string;
507
- /**
508
- * The status of the badge
509
- */
510
- status: 'active' | 'inactive' | 'revoked';
511
- /**
512
- * UUID of the user (converted to lowercase)
513
- */
514
- userId: string;
515
- /**
516
- * UUID of the website (converted to lowercase)
517
- */
518
- websiteId: string;
519
- /**
520
- * Array of progress for the badge
521
- */
522
- progress?: unknown;
979
+ interface LoyaltyRule {
980
+ /**
981
+ * UUID of the loyalty rule (converted to lowercase)
982
+ */
983
+ id: string;
984
+ /**
985
+ * The name of the loyalty rule
986
+ */
987
+ name: string;
988
+ }
989
+ interface Reward {
990
+ /**
991
+ * UUID of the badge reward
992
+ */
993
+ id: string;
994
+ /**
995
+ * Points amount to reward (for points reward type)
996
+ */
997
+ amount: number | null;
998
+ /**
999
+ * Whether the multiplier should be applied to the user's existing balance
1000
+ */
1001
+ isRetroactive: boolean;
1002
+ /**
1003
+ * UUID of the loyalty currency for this reward
1004
+ */
1005
+ loyaltyCurrencyId: string | null;
1006
+ /**
1007
+ * Multiplier to reward (for multiplier reward type)
1008
+ */
1009
+ multiplier: number | null;
1010
+ /**
1011
+ * Type of reward (points or multiplier)
1012
+ */
1013
+ rewardType: 'points' | 'multiplier' | 'badge';
1014
+ /**
1015
+ * Array of loyalty currency IDs for multiplier rewards (empty means all
1016
+ * currencies)
1017
+ */
1018
+ loyaltyCurrencyIds?: Array<string>;
1019
+ }
523
1020
  }
524
1021
  }
525
1022
  /**
@@ -530,6 +1027,10 @@ export interface BadgeDeleteResponse {
530
1027
  * UUID of the badge (converted to lowercase)
531
1028
  */
532
1029
  id: string;
1030
+ /**
1031
+ * The date and time the badge was created
1032
+ */
1033
+ createdAt: string;
533
1034
  /**
534
1035
  * The description of the badge
535
1036
  */
@@ -546,10 +1047,30 @@ export interface BadgeDeleteResponse {
546
1047
  * The name of the badge
547
1048
  */
548
1049
  name: string;
1050
+ /**
1051
+ * The date and time the badge was updated
1052
+ */
1053
+ updatedAt: string;
1054
+ /**
1055
+ * Array of data jobs associated with the badge
1056
+ */
1057
+ dataJobs?: Array<BadgeDeleteResponse.DataJob>;
1058
+ /**
1059
+ * Whether to hide this badge in the user interface
1060
+ */
1061
+ hideInUi?: boolean;
549
1062
  /**
550
1063
  * Array of user badges
551
1064
  */
552
- LoyaltyBadgeUser?: Array<BadgeDeleteResponse.LoyaltyBadgeUser>;
1065
+ loyaltyBadgeUsers?: Array<BadgeDeleteResponse.LoyaltyBadgeUser>;
1066
+ /**
1067
+ * Array of loyalty rules associated with the badge
1068
+ */
1069
+ loyaltyRules?: Array<BadgeDeleteResponse.LoyaltyRule>;
1070
+ /**
1071
+ * Array of rewards granted when the badge is achieved
1072
+ */
1073
+ rewards?: Array<BadgeDeleteResponse.Reward>;
553
1074
  }
554
1075
  export declare namespace BadgeDeleteResponse {
555
1076
  /**
@@ -566,7 +1087,7 @@ export declare namespace BadgeDeleteResponse {
566
1087
  amount: number | null;
567
1088
  association: Array<LoyaltyCondition.Association>;
568
1089
  /**
569
- * The URL of the CSV file
1090
+ * URL of the CSV file
570
1091
  */
571
1092
  csvUrl: string | null;
572
1093
  /**
@@ -593,6 +1114,10 @@ export declare namespace BadgeDeleteResponse {
593
1114
  * The type of the condition
594
1115
  */
595
1116
  type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
1117
+ /**
1118
+ * Array of CSV files associated with the condition
1119
+ */
1120
+ csvFiles?: Array<LoyaltyCondition.CsvFile>;
596
1121
  }
597
1122
  namespace LoyaltyCondition {
598
1123
  interface Association {
@@ -654,12 +1179,56 @@ export declare namespace BadgeDeleteResponse {
654
1179
  name: string;
655
1180
  }
656
1181
  }
1182
+ interface CsvFile {
1183
+ /**
1184
+ * UUID of the CSV file (converted to lowercase)
1185
+ */
1186
+ id: string;
1187
+ /**
1188
+ * The description of the CSV file
1189
+ */
1190
+ description: string | null;
1191
+ /**
1192
+ * The name of the CSV file
1193
+ */
1194
+ name: string | null;
1195
+ /**
1196
+ * The URL of the CSV file
1197
+ */
1198
+ url: string | null;
1199
+ }
1200
+ }
1201
+ interface DataJob {
1202
+ /**
1203
+ * UUID of the data job (converted to lowercase)
1204
+ */
1205
+ id: string;
1206
+ /**
1207
+ * The date and time the data job was created
1208
+ */
1209
+ createdAt: string;
1210
+ /**
1211
+ * The status of the data job
1212
+ */
1213
+ status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
1214
+ /**
1215
+ * The date and time the data job was updated
1216
+ */
1217
+ updatedAt: string;
1218
+ /**
1219
+ * The message associated with the data job
1220
+ */
1221
+ message?: string | null;
657
1222
  }
658
1223
  interface LoyaltyBadgeUser {
659
1224
  /**
660
1225
  * UUID of the user badge (converted to lowercase)
661
1226
  */
662
1227
  id: string;
1228
+ /**
1229
+ * The date and time the user badge was created
1230
+ */
1231
+ createdAt: string;
663
1232
  /**
664
1233
  * UUID of the badge (converted to lowercase)
665
1234
  */
@@ -672,6 +1241,10 @@ export declare namespace BadgeDeleteResponse {
672
1241
  * The status of the badge
673
1242
  */
674
1243
  status: 'active' | 'inactive' | 'revoked';
1244
+ /**
1245
+ * The date and time the user badge was updated
1246
+ */
1247
+ updatedAt: string;
675
1248
  /**
676
1249
  * UUID of the user (converted to lowercase)
677
1250
  */
@@ -680,10 +1253,82 @@ export declare namespace BadgeDeleteResponse {
680
1253
  * UUID of the website (converted to lowercase)
681
1254
  */
682
1255
  websiteId: string;
1256
+ /**
1257
+ * The date and time the user badge was granted
1258
+ */
1259
+ completedAt?: string | null;
1260
+ /**
1261
+ * Whether the user has dismissed the badge in the UI
1262
+ */
1263
+ dismissedInUi?: boolean;
1264
+ /**
1265
+ * Whether to hide this badge in the user interface
1266
+ */
1267
+ hideInUi?: boolean;
683
1268
  /**
684
1269
  * Array of progress for the badge
685
1270
  */
686
1271
  progress?: unknown;
1272
+ /**
1273
+ * User associated with the user badge
1274
+ */
1275
+ user?: LoyaltyBadgeUser.User;
1276
+ }
1277
+ namespace LoyaltyBadgeUser {
1278
+ /**
1279
+ * User associated with the user badge
1280
+ */
1281
+ interface User {
1282
+ /**
1283
+ * UUID of the user (converted to lowercase)
1284
+ */
1285
+ id: string;
1286
+ /**
1287
+ * Wallet address of the user
1288
+ */
1289
+ walletAddress: string;
1290
+ }
1291
+ }
1292
+ interface LoyaltyRule {
1293
+ /**
1294
+ * UUID of the loyalty rule (converted to lowercase)
1295
+ */
1296
+ id: string;
1297
+ /**
1298
+ * The name of the loyalty rule
1299
+ */
1300
+ name: string;
1301
+ }
1302
+ interface Reward {
1303
+ /**
1304
+ * UUID of the badge reward
1305
+ */
1306
+ id: string;
1307
+ /**
1308
+ * Points amount to reward (for points reward type)
1309
+ */
1310
+ amount: number | null;
1311
+ /**
1312
+ * Whether the multiplier should be applied to the user's existing balance
1313
+ */
1314
+ isRetroactive: boolean;
1315
+ /**
1316
+ * UUID of the loyalty currency for this reward
1317
+ */
1318
+ loyaltyCurrencyId: string | null;
1319
+ /**
1320
+ * Multiplier to reward (for multiplier reward type)
1321
+ */
1322
+ multiplier: number | null;
1323
+ /**
1324
+ * Type of reward (points or multiplier)
1325
+ */
1326
+ rewardType: 'points' | 'multiplier' | 'badge';
1327
+ /**
1328
+ * Array of loyalty currency IDs for multiplier rewards (empty means all
1329
+ * currencies)
1330
+ */
1331
+ loyaltyCurrencyIds?: Array<string>;
687
1332
  }
688
1333
  }
689
1334
  /**
@@ -723,6 +1368,10 @@ export declare namespace BadgeRewardResponse {
723
1368
  }
724
1369
  }
725
1370
  export interface BadgeCreateParams {
1371
+ /**
1372
+ * Array of conditions for the badge
1373
+ */
1374
+ conditions: Array<BadgeCreateParams.Condition>;
726
1375
  /**
727
1376
  * The URL of the badge image
728
1377
  */
@@ -735,25 +1384,26 @@ export interface BadgeCreateParams {
735
1384
  * UUID of the organization (optional, converted to lowercase)
736
1385
  */
737
1386
  organizationId: string;
738
- /**
739
- * Array of rules for the badge
740
- */
741
- rules: Array<BadgeCreateParams.Rule>;
742
1387
  /**
743
1388
  * UUID of the website (optional, converted to lowercase)
744
1389
  */
745
1390
  websiteId: string;
1391
+ csvFiles?: Array<BadgeCreateParams.CsvFile>;
746
1392
  /**
747
1393
  * The description of the badge
748
1394
  */
749
1395
  description?: string;
1396
+ /**
1397
+ * Whether to hide this badge in the user interface
1398
+ */
1399
+ hideInUi?: boolean;
1400
+ /**
1401
+ * Array of rewards granted when the badge is achieved
1402
+ */
1403
+ rewards?: Array<BadgeCreateParams.Reward>;
750
1404
  }
751
1405
  export declare namespace BadgeCreateParams {
752
- interface Rule {
753
- /**
754
- * The type of rule
755
- */
756
- type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
1406
+ interface Condition {
757
1407
  /**
758
1408
  * The amount of the rule
759
1409
  */
@@ -781,7 +1431,7 @@ export declare namespace BadgeCreateParams {
781
1431
  /**
782
1432
  * UUID of the loyalty rule chain (optional, converted to lowercase)
783
1433
  */
784
- loyaltyRuleChainId?: string;
1434
+ loyaltyRuleChainId?: string | null;
785
1435
  /**
786
1436
  * Array of UUIDs of the rule group (optional, converted to lowercase)
787
1437
  */
@@ -798,13 +1448,54 @@ export declare namespace BadgeCreateParams {
798
1448
  * The number of rules that need to be fulfilled to satisfy the condition
799
1449
  */
800
1450
  requiredCount?: number | null;
1451
+ /**
1452
+ * The type of rule
1453
+ */
1454
+ type?: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
1455
+ }
1456
+ interface CsvFile {
1457
+ src: string;
1458
+ description?: string;
1459
+ name?: string;
1460
+ }
1461
+ interface Reward {
1462
+ /**
1463
+ * Type of reward (points or multiplier)
1464
+ */
1465
+ rewardType: 'points' | 'multiplier' | 'badge';
1466
+ /**
1467
+ * Points amount to reward (for points reward type)
1468
+ */
1469
+ amount?: number;
1470
+ /**
1471
+ * Whether the multiplier should be applied to the user's existing balance
1472
+ */
1473
+ isRetroactive?: boolean;
1474
+ /**
1475
+ * UUID of the loyalty currency for this reward
1476
+ */
1477
+ loyaltyCurrencyId?: string;
1478
+ /**
1479
+ * Array of loyalty currency IDs for multiplier rewards (empty means all
1480
+ * currencies)
1481
+ */
1482
+ loyaltyCurrencyIds?: Array<string>;
1483
+ /**
1484
+ * Multiplier to reward (for multiplier reward type)
1485
+ */
1486
+ multiplier?: number;
801
1487
  }
802
1488
  }
803
1489
  export interface BadgeUpdateParams {
1490
+ csvFiles?: Array<BadgeUpdateParams.CsvFile>;
804
1491
  /**
805
1492
  * The description of the badge
806
1493
  */
807
1494
  description?: string;
1495
+ /**
1496
+ * Whether to hide this badge in the user interface
1497
+ */
1498
+ hideInUi?: boolean;
808
1499
  /**
809
1500
  * The URL of the badge image
810
1501
  */
@@ -813,16 +1504,54 @@ export interface BadgeUpdateParams {
813
1504
  * The name of the badge
814
1505
  */
815
1506
  name?: string;
1507
+ /**
1508
+ * Array of rewards granted when the badge is achieved
1509
+ */
1510
+ rewards?: Array<BadgeUpdateParams.Reward>;
1511
+ }
1512
+ export declare namespace BadgeUpdateParams {
1513
+ interface CsvFile {
1514
+ src: string;
1515
+ description?: string;
1516
+ name?: string;
1517
+ }
1518
+ interface Reward {
1519
+ /**
1520
+ * Type of reward (points or multiplier)
1521
+ */
1522
+ rewardType: 'points' | 'multiplier' | 'badge';
1523
+ /**
1524
+ * Points amount to reward (for points reward type)
1525
+ */
1526
+ amount?: number;
1527
+ /**
1528
+ * Whether the multiplier should be applied to the user's existing balance
1529
+ */
1530
+ isRetroactive?: boolean;
1531
+ /**
1532
+ * UUID of the loyalty currency for this reward
1533
+ */
1534
+ loyaltyCurrencyId?: string;
1535
+ /**
1536
+ * Array of loyalty currency IDs for multiplier rewards (empty means all
1537
+ * currencies)
1538
+ */
1539
+ loyaltyCurrencyIds?: Array<string>;
1540
+ /**
1541
+ * Multiplier to reward (for multiplier reward type)
1542
+ */
1543
+ multiplier?: number;
1544
+ }
816
1545
  }
817
1546
  export interface BadgeListParams {
818
1547
  /**
819
1548
  * Array of badge IDs (converted to lowercase) to fetch
820
1549
  */
821
- badgeIds?: Array<string>;
1550
+ badgeIds?: string | Array<string>;
822
1551
  /**
823
1552
  * Include deleted badges in the response
824
1553
  */
825
- includeDeleted?: boolean | null;
1554
+ includeDeleted?: boolean;
826
1555
  /**
827
1556
  * Number of badges to fetch
828
1557
  */
@@ -836,15 +1565,31 @@ export interface BadgeListParams {
836
1565
  */
837
1566
  startingAfter?: string;
838
1567
  /**
839
- * UUID of the user (optional, converted to lowercase)
1568
+ * External identifier of the user group
840
1569
  */
841
- userId?: string;
1570
+ userGroupExternalIdentifier?: string;
1571
+ /**
1572
+ * UUID of the user group
1573
+ */
1574
+ userGroupId?: string;
1575
+ /**
1576
+ * UUID of the user, or array of UUID.
1577
+ */
1578
+ userId?: string | Array<string>;
1579
+ /**
1580
+ * Wallet Address of the user, or array of wallet addresses.
1581
+ */
1582
+ walletAddress?: string | Array<string>;
842
1583
  /**
843
1584
  * UUID of the website (optional, converted to lowercase)
844
1585
  */
845
1586
  websiteId?: string;
846
1587
  }
847
1588
  export interface BadgeRevokeParams {
1589
+ /**
1590
+ * Status of the badge
1591
+ */
1592
+ status?: 'active' | 'inactive' | 'revoked';
848
1593
  /**
849
1594
  * UUID of the user (converted to lowercase)
850
1595
  */
@@ -855,6 +1600,10 @@ export interface BadgeRevokeParams {
855
1600
  walletAddress?: string;
856
1601
  }
857
1602
  export interface BadgeRewardParams {
1603
+ /**
1604
+ * Status of the badge
1605
+ */
1606
+ status?: 'active' | 'inactive' | 'revoked';
858
1607
  /**
859
1608
  * UUID of the user (converted to lowercase)
860
1609
  */