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

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 +140 -153
  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 +473 -64
  306. package/src/resources/loyalty/rules.ts +3706 -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 +930 -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
@@ -6,7 +6,18 @@ import * as Core from '../../core';
6
6
 
7
7
  export class Badges extends APIResource {
8
8
  /**
9
- * This endpoint allows you to configure a new badge.
9
+ * This endpoint allows you to configure a new badge
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const badge = await client.loyalty.badges.create({
14
+ * conditions: [{}],
15
+ * imageUrl: 'https://example.com/image.png',
16
+ * name: 'Example Badge',
17
+ * organizationId: '123e4567-e89b-12d3-a456-426614174222',
18
+ * websiteId: '123e4567-e89b-12d3-a456-426614174111',
19
+ * });
20
+ * ```
10
21
  */
11
22
  create(body: BadgeCreateParams, options?: Core.RequestOptions): Core.APIPromise<BadgeCreateResponse> {
12
23
  return this._client.post('/api/loyalty/badges', { body, ...options });
@@ -14,6 +25,13 @@ export class Badges extends APIResource {
14
25
 
15
26
  /**
16
27
  * This endpoint allows you to update an existing badge.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const badge = await client.loyalty.badges.update(
32
+ * '123e4567-e89b-12d3-a456-426614174333',
33
+ * );
34
+ * ```
17
35
  */
18
36
  update(
19
37
  id: string,
@@ -34,6 +52,11 @@ export class Badges extends APIResource {
34
52
 
35
53
  /**
36
54
  * This endpoint allows you to fetch badge(s) data.
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const badges = await client.loyalty.badges.list();
59
+ * ```
37
60
  */
38
61
  list(query?: BadgeListParams, options?: Core.RequestOptions): Core.APIPromise<BadgeListResponse>;
39
62
  list(options?: Core.RequestOptions): Core.APIPromise<BadgeListResponse>;
@@ -49,6 +72,13 @@ export class Badges extends APIResource {
49
72
 
50
73
  /**
51
74
  * This endpoint allows you to delete a badge.
75
+ *
76
+ * @example
77
+ * ```ts
78
+ * const badge = await client.loyalty.badges.delete(
79
+ * '123e4567-e89b-12d3-a456-426614174333',
80
+ * );
81
+ * ```
52
82
  */
53
83
  delete(id: string, options?: Core.RequestOptions): Core.APIPromise<BadgeDeleteResponse> {
54
84
  return this._client.delete(`/api/loyalty/badges/${id}`, options);
@@ -56,6 +86,13 @@ export class Badges extends APIResource {
56
86
 
57
87
  /**
58
88
  * This endpoint allows you to revoke a badge from an account
89
+ *
90
+ * @example
91
+ * ```ts
92
+ * const response = await client.loyalty.badges.revoke(
93
+ * '123e4567-e89b-12d3-a456-426614174333',
94
+ * );
95
+ * ```
59
96
  */
60
97
  revoke(
61
98
  id: string,
@@ -76,6 +113,13 @@ export class Badges extends APIResource {
76
113
 
77
114
  /**
78
115
  * This endpoint allows you to reward a badge for an account
116
+ *
117
+ * @example
118
+ * ```ts
119
+ * const response = await client.loyalty.badges.reward(
120
+ * '123e4567-e89b-12d3-a456-426614174333',
121
+ * );
122
+ * ```
79
123
  */
80
124
  reward(
81
125
  id: string,
@@ -104,6 +148,11 @@ export interface BadgeCreateResponse {
104
148
  */
105
149
  id: string;
106
150
 
151
+ /**
152
+ * The date and time the badge was created
153
+ */
154
+ createdAt: string;
155
+
107
156
  /**
108
157
  * The description of the badge
109
158
  */
@@ -124,10 +173,35 @@ export interface BadgeCreateResponse {
124
173
  */
125
174
  name: string;
126
175
 
176
+ /**
177
+ * The date and time the badge was updated
178
+ */
179
+ updatedAt: string;
180
+
181
+ /**
182
+ * Array of data jobs associated with the badge
183
+ */
184
+ dataJobs?: Array<BadgeCreateResponse.DataJob>;
185
+
186
+ /**
187
+ * Whether to hide this badge in the user interface
188
+ */
189
+ hideInUi?: boolean;
190
+
127
191
  /**
128
192
  * Array of user badges
129
193
  */
130
- LoyaltyBadgeUser?: Array<BadgeCreateResponse.LoyaltyBadgeUser>;
194
+ loyaltyBadgeUsers?: Array<BadgeCreateResponse.LoyaltyBadgeUser>;
195
+
196
+ /**
197
+ * Array of loyalty rules associated with the badge
198
+ */
199
+ loyaltyRules?: Array<BadgeCreateResponse.LoyaltyRule>;
200
+
201
+ /**
202
+ * Array of rewards granted when the badge is achieved
203
+ */
204
+ rewards?: Array<BadgeCreateResponse.Reward>;
131
205
  }
132
206
 
133
207
  export namespace BadgeCreateResponse {
@@ -148,7 +222,7 @@ export namespace BadgeCreateResponse {
148
222
  association: Array<LoyaltyCondition.Association>;
149
223
 
150
224
  /**
151
- * The URL of the CSV file
225
+ * URL of the CSV file
152
226
  */
153
227
  csvUrl: string | null;
154
228
 
@@ -181,6 +255,11 @@ export namespace BadgeCreateResponse {
181
255
  * The type of the condition
182
256
  */
183
257
  type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
258
+
259
+ /**
260
+ * Array of CSV files associated with the condition
261
+ */
262
+ csvFiles?: Array<LoyaltyCondition.CsvFile>;
184
263
  }
185
264
 
186
265
  export namespace LoyaltyCondition {
@@ -257,6 +336,55 @@ export namespace BadgeCreateResponse {
257
336
  name: string;
258
337
  }
259
338
  }
339
+
340
+ export interface CsvFile {
341
+ /**
342
+ * UUID of the CSV file (converted to lowercase)
343
+ */
344
+ id: string;
345
+
346
+ /**
347
+ * The description of the CSV file
348
+ */
349
+ description: string | null;
350
+
351
+ /**
352
+ * The name of the CSV file
353
+ */
354
+ name: string | null;
355
+
356
+ /**
357
+ * The URL of the CSV file
358
+ */
359
+ url: string | null;
360
+ }
361
+ }
362
+
363
+ export interface DataJob {
364
+ /**
365
+ * UUID of the data job (converted to lowercase)
366
+ */
367
+ id: string;
368
+
369
+ /**
370
+ * The date and time the data job was created
371
+ */
372
+ createdAt: string;
373
+
374
+ /**
375
+ * The status of the data job
376
+ */
377
+ status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
378
+
379
+ /**
380
+ * The date and time the data job was updated
381
+ */
382
+ updatedAt: string;
383
+
384
+ /**
385
+ * The message associated with the data job
386
+ */
387
+ message?: string | null;
260
388
  }
261
389
 
262
390
  export interface LoyaltyBadgeUser {
@@ -265,6 +393,11 @@ export namespace BadgeCreateResponse {
265
393
  */
266
394
  id: string;
267
395
 
396
+ /**
397
+ * The date and time the user badge was created
398
+ */
399
+ createdAt: string;
400
+
268
401
  /**
269
402
  * UUID of the badge (converted to lowercase)
270
403
  */
@@ -280,6 +413,11 @@ export namespace BadgeCreateResponse {
280
413
  */
281
414
  status: 'active' | 'inactive' | 'revoked';
282
415
 
416
+ /**
417
+ * The date and time the user badge was updated
418
+ */
419
+ updatedAt: string;
420
+
283
421
  /**
284
422
  * UUID of the user (converted to lowercase)
285
423
  */
@@ -290,10 +428,97 @@ export namespace BadgeCreateResponse {
290
428
  */
291
429
  websiteId: string;
292
430
 
431
+ /**
432
+ * The date and time the user badge was granted
433
+ */
434
+ completedAt?: string | null;
435
+
436
+ /**
437
+ * Whether the user has dismissed the badge in the UI
438
+ */
439
+ dismissedInUi?: boolean;
440
+
441
+ /**
442
+ * Whether to hide this badge in the user interface
443
+ */
444
+ hideInUi?: boolean;
445
+
293
446
  /**
294
447
  * Array of progress for the badge
295
448
  */
296
449
  progress?: unknown;
450
+
451
+ /**
452
+ * User associated with the user badge
453
+ */
454
+ user?: LoyaltyBadgeUser.User;
455
+ }
456
+
457
+ export namespace LoyaltyBadgeUser {
458
+ /**
459
+ * User associated with the user badge
460
+ */
461
+ export interface User {
462
+ /**
463
+ * UUID of the user (converted to lowercase)
464
+ */
465
+ id: string;
466
+
467
+ /**
468
+ * Wallet address of the user
469
+ */
470
+ walletAddress: string;
471
+ }
472
+ }
473
+
474
+ export interface LoyaltyRule {
475
+ /**
476
+ * UUID of the loyalty rule (converted to lowercase)
477
+ */
478
+ id: string;
479
+
480
+ /**
481
+ * The name of the loyalty rule
482
+ */
483
+ name: string;
484
+ }
485
+
486
+ export interface Reward {
487
+ /**
488
+ * UUID of the badge reward
489
+ */
490
+ id: string;
491
+
492
+ /**
493
+ * Points amount to reward (for points reward type)
494
+ */
495
+ amount: number | null;
496
+
497
+ /**
498
+ * Whether the multiplier should be applied to the user's existing balance
499
+ */
500
+ isRetroactive: boolean;
501
+
502
+ /**
503
+ * UUID of the loyalty currency for this reward
504
+ */
505
+ loyaltyCurrencyId: string | null;
506
+
507
+ /**
508
+ * Multiplier to reward (for multiplier reward type)
509
+ */
510
+ multiplier: number | null;
511
+
512
+ /**
513
+ * Type of reward (points or multiplier)
514
+ */
515
+ rewardType: 'points' | 'multiplier' | 'badge';
516
+
517
+ /**
518
+ * Array of loyalty currency IDs for multiplier rewards (empty means all
519
+ * currencies)
520
+ */
521
+ loyaltyCurrencyIds?: Array<string>;
297
522
  }
298
523
  }
299
524
 
@@ -306,6 +531,11 @@ export interface BadgeUpdateResponse {
306
531
  */
307
532
  id: string;
308
533
 
534
+ /**
535
+ * The date and time the badge was created
536
+ */
537
+ createdAt: string;
538
+
309
539
  /**
310
540
  * The description of the badge
311
541
  */
@@ -326,10 +556,35 @@ export interface BadgeUpdateResponse {
326
556
  */
327
557
  name: string;
328
558
 
559
+ /**
560
+ * The date and time the badge was updated
561
+ */
562
+ updatedAt: string;
563
+
564
+ /**
565
+ * Array of data jobs associated with the badge
566
+ */
567
+ dataJobs?: Array<BadgeUpdateResponse.DataJob>;
568
+
569
+ /**
570
+ * Whether to hide this badge in the user interface
571
+ */
572
+ hideInUi?: boolean;
573
+
329
574
  /**
330
575
  * Array of user badges
331
576
  */
332
- LoyaltyBadgeUser?: Array<BadgeUpdateResponse.LoyaltyBadgeUser>;
577
+ loyaltyBadgeUsers?: Array<BadgeUpdateResponse.LoyaltyBadgeUser>;
578
+
579
+ /**
580
+ * Array of loyalty rules associated with the badge
581
+ */
582
+ loyaltyRules?: Array<BadgeUpdateResponse.LoyaltyRule>;
583
+
584
+ /**
585
+ * Array of rewards granted when the badge is achieved
586
+ */
587
+ rewards?: Array<BadgeUpdateResponse.Reward>;
333
588
  }
334
589
 
335
590
  export namespace BadgeUpdateResponse {
@@ -350,7 +605,7 @@ export namespace BadgeUpdateResponse {
350
605
  association: Array<LoyaltyCondition.Association>;
351
606
 
352
607
  /**
353
- * The URL of the CSV file
608
+ * URL of the CSV file
354
609
  */
355
610
  csvUrl: string | null;
356
611
 
@@ -383,6 +638,11 @@ export namespace BadgeUpdateResponse {
383
638
  * The type of the condition
384
639
  */
385
640
  type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
641
+
642
+ /**
643
+ * Array of CSV files associated with the condition
644
+ */
645
+ csvFiles?: Array<LoyaltyCondition.CsvFile>;
386
646
  }
387
647
 
388
648
  export namespace LoyaltyCondition {
@@ -459,6 +719,55 @@ export namespace BadgeUpdateResponse {
459
719
  name: string;
460
720
  }
461
721
  }
722
+
723
+ export interface CsvFile {
724
+ /**
725
+ * UUID of the CSV file (converted to lowercase)
726
+ */
727
+ id: string;
728
+
729
+ /**
730
+ * The description of the CSV file
731
+ */
732
+ description: string | null;
733
+
734
+ /**
735
+ * The name of the CSV file
736
+ */
737
+ name: string | null;
738
+
739
+ /**
740
+ * The URL of the CSV file
741
+ */
742
+ url: string | null;
743
+ }
744
+ }
745
+
746
+ export interface DataJob {
747
+ /**
748
+ * UUID of the data job (converted to lowercase)
749
+ */
750
+ id: string;
751
+
752
+ /**
753
+ * The date and time the data job was created
754
+ */
755
+ createdAt: string;
756
+
757
+ /**
758
+ * The status of the data job
759
+ */
760
+ status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
761
+
762
+ /**
763
+ * The date and time the data job was updated
764
+ */
765
+ updatedAt: string;
766
+
767
+ /**
768
+ * The message associated with the data job
769
+ */
770
+ message?: string | null;
462
771
  }
463
772
 
464
773
  export interface LoyaltyBadgeUser {
@@ -467,6 +776,11 @@ export namespace BadgeUpdateResponse {
467
776
  */
468
777
  id: string;
469
778
 
779
+ /**
780
+ * The date and time the user badge was created
781
+ */
782
+ createdAt: string;
783
+
470
784
  /**
471
785
  * UUID of the badge (converted to lowercase)
472
786
  */
@@ -482,6 +796,11 @@ export namespace BadgeUpdateResponse {
482
796
  */
483
797
  status: 'active' | 'inactive' | 'revoked';
484
798
 
799
+ /**
800
+ * The date and time the user badge was updated
801
+ */
802
+ updatedAt: string;
803
+
485
804
  /**
486
805
  * UUID of the user (converted to lowercase)
487
806
  */
@@ -492,212 +811,491 @@ export namespace BadgeUpdateResponse {
492
811
  */
493
812
  websiteId: string;
494
813
 
814
+ /**
815
+ * The date and time the user badge was granted
816
+ */
817
+ completedAt?: string | null;
818
+
819
+ /**
820
+ * Whether the user has dismissed the badge in the UI
821
+ */
822
+ dismissedInUi?: boolean;
823
+
824
+ /**
825
+ * Whether to hide this badge in the user interface
826
+ */
827
+ hideInUi?: boolean;
828
+
495
829
  /**
496
830
  * Array of progress for the badge
497
831
  */
498
832
  progress?: unknown;
833
+
834
+ /**
835
+ * User associated with the user badge
836
+ */
837
+ user?: LoyaltyBadgeUser.User;
499
838
  }
500
- }
501
839
 
502
- /**
503
- * Response returned upon successful fetching of the badges.
504
- */
505
- export interface BadgeListResponse {
506
- /**
507
- * UUID of the badge (converted to lowercase)
508
- */
509
- id: string;
840
+ export namespace LoyaltyBadgeUser {
841
+ /**
842
+ * User associated with the user badge
843
+ */
844
+ export interface User {
845
+ /**
846
+ * UUID of the user (converted to lowercase)
847
+ */
848
+ id: string;
510
849
 
511
- /**
512
- * The description of the badge
513
- */
514
- description: string | null;
850
+ /**
851
+ * Wallet address of the user
852
+ */
853
+ walletAddress: string;
854
+ }
855
+ }
515
856
 
516
- /**
517
- * The URL of the badge image
518
- */
519
- imageUrl: string | null;
857
+ export interface LoyaltyRule {
858
+ /**
859
+ * UUID of the loyalty rule (converted to lowercase)
860
+ */
861
+ id: string;
520
862
 
521
- /**
522
- * Array of conditions of the badge
523
- */
524
- loyaltyConditions: Array<BadgeListResponse.LoyaltyCondition>;
863
+ /**
864
+ * The name of the loyalty rule
865
+ */
866
+ name: string;
867
+ }
525
868
 
526
- /**
527
- * The name of the badge
528
- */
529
- name: string;
869
+ export interface Reward {
870
+ /**
871
+ * UUID of the badge reward
872
+ */
873
+ id: string;
874
+
875
+ /**
876
+ * Points amount to reward (for points reward type)
877
+ */
878
+ amount: number | null;
879
+
880
+ /**
881
+ * Whether the multiplier should be applied to the user's existing balance
882
+ */
883
+ isRetroactive: boolean;
884
+
885
+ /**
886
+ * UUID of the loyalty currency for this reward
887
+ */
888
+ loyaltyCurrencyId: string | null;
889
+
890
+ /**
891
+ * Multiplier to reward (for multiplier reward type)
892
+ */
893
+ multiplier: number | null;
894
+
895
+ /**
896
+ * Type of reward (points or multiplier)
897
+ */
898
+ rewardType: 'points' | 'multiplier' | 'badge';
899
+
900
+ /**
901
+ * Array of loyalty currency IDs for multiplier rewards (empty means all
902
+ * currencies)
903
+ */
904
+ loyaltyCurrencyIds?: Array<string>;
905
+ }
906
+ }
907
+
908
+ export interface BadgeListResponse {
909
+ data: Array<BadgeListResponse.Data>;
530
910
 
531
911
  /**
532
- * Array of user badges
912
+ * Indicates if there is a next page of results
533
913
  */
534
- LoyaltyBadgeUser?: Array<BadgeListResponse.LoyaltyBadgeUser>;
914
+ hasNextPage: boolean;
535
915
  }
536
916
 
537
917
  export namespace BadgeListResponse {
538
918
  /**
539
- * Schema for a loyalty condition rule.
919
+ * Response returned upon successful fetching of the badges.
540
920
  */
541
- export interface LoyaltyCondition {
921
+ export interface Data {
542
922
  /**
543
- * UUID of the condition (converted to lowercase)
923
+ * UUID of the badge (converted to lowercase)
544
924
  */
545
925
  id: string;
546
926
 
547
927
  /**
548
- * The amount of the condition
928
+ * The date and time the badge was created
549
929
  */
550
- amount: number | null;
930
+ createdAt: string;
551
931
 
552
- association: Array<LoyaltyCondition.Association>;
932
+ /**
933
+ * The description of the badge
934
+ */
935
+ description: string | null;
553
936
 
554
937
  /**
555
- * The URL of the CSV file
938
+ * The URL of the badge image
556
939
  */
557
- csvUrl: string | null;
940
+ imageUrl: string | null;
558
941
 
559
942
  /**
560
- * The description of the condition
943
+ * Array of conditions of the badge
561
944
  */
562
- description: string | null;
945
+ loyaltyConditions: Array<Data.LoyaltyCondition>;
563
946
 
564
947
  /**
565
- * UUID of the currency (converted to lowercase)
948
+ * The name of the badge
566
949
  */
567
- loyaltyCurrencyId: string | null;
950
+ name: string;
568
951
 
569
952
  /**
570
- * UUID of the rule group (converted to lowercase)
953
+ * The date and time the badge was updated
571
954
  */
572
- loyaltyRuleGroupId: string | null;
955
+ updatedAt: string;
573
956
 
574
957
  /**
575
- * The repeat count of the condition
958
+ * Array of data jobs associated with the badge
576
959
  */
577
- repeatCount: number | null;
960
+ dataJobs?: Array<Data.DataJob>;
578
961
 
579
962
  /**
580
- * The required count of the condition
963
+ * Whether to hide this badge in the user interface
581
964
  */
582
- requiredCount: number | null;
965
+ hideInUi?: boolean;
583
966
 
584
967
  /**
585
- * The type of the condition
968
+ * Array of user badges
586
969
  */
587
- type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
970
+ loyaltyBadgeUsers?: Array<Data.LoyaltyBadgeUser>;
971
+
972
+ /**
973
+ * Array of loyalty rules associated with the badge
974
+ */
975
+ loyaltyRules?: Array<Data.LoyaltyRule>;
976
+
977
+ /**
978
+ * Array of rewards granted when the badge is achieved
979
+ */
980
+ rewards?: Array<Data.Reward>;
588
981
  }
589
982
 
590
- export namespace LoyaltyCondition {
591
- export interface Association {
592
- loyaltyBadge: Association.LoyaltyBadge | null;
983
+ export namespace Data {
984
+ /**
985
+ * Schema for a loyalty condition rule.
986
+ */
987
+ export interface LoyaltyCondition {
988
+ /**
989
+ * UUID of the condition (converted to lowercase)
990
+ */
991
+ id: string;
992
+
993
+ /**
994
+ * The amount of the condition
995
+ */
996
+ amount: number | null;
997
+
998
+ association: Array<LoyaltyCondition.Association>;
999
+
1000
+ /**
1001
+ * URL of the CSV file
1002
+ */
1003
+ csvUrl: string | null;
1004
+
1005
+ /**
1006
+ * The description of the condition
1007
+ */
1008
+ description: string | null;
1009
+
1010
+ /**
1011
+ * UUID of the currency (converted to lowercase)
1012
+ */
1013
+ loyaltyCurrencyId: string | null;
1014
+
1015
+ /**
1016
+ * UUID of the rule group (converted to lowercase)
1017
+ */
1018
+ loyaltyRuleGroupId: string | null;
1019
+
1020
+ /**
1021
+ * The repeat count of the condition
1022
+ */
1023
+ repeatCount: number | null;
1024
+
1025
+ /**
1026
+ * The required count of the condition
1027
+ */
1028
+ requiredCount: number | null;
1029
+
1030
+ /**
1031
+ * The type of the condition
1032
+ */
1033
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
1034
+
1035
+ /**
1036
+ * Array of CSV files associated with the condition
1037
+ */
1038
+ csvFiles?: Array<LoyaltyCondition.CsvFile>;
1039
+ }
593
1040
 
594
- loyaltyCurrency: Association.LoyaltyCurrency | null;
1041
+ export namespace LoyaltyCondition {
1042
+ export interface Association {
1043
+ loyaltyBadge: Association.LoyaltyBadge | null;
595
1044
 
596
- loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
1045
+ loyaltyCurrency: Association.LoyaltyCurrency | null;
597
1046
 
598
- loyaltyRule: Association.LoyaltyRule | null;
1047
+ loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
599
1048
 
600
- loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
601
- }
1049
+ loyaltyRule: Association.LoyaltyRule | null;
602
1050
 
603
- export namespace Association {
604
- export interface LoyaltyBadge {
605
- /**
606
- * UUID of the association (converted to lowercase)
607
- */
608
- id: string;
1051
+ loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
1052
+ }
609
1053
 
610
- /**
611
- * The name of the association
612
- */
613
- name: string;
1054
+ export namespace Association {
1055
+ export interface LoyaltyBadge {
1056
+ /**
1057
+ * UUID of the association (converted to lowercase)
1058
+ */
1059
+ id: string;
1060
+
1061
+ /**
1062
+ * The name of the association
1063
+ */
1064
+ name: string;
1065
+ }
1066
+
1067
+ export interface LoyaltyCurrency {
1068
+ /**
1069
+ * UUID of the association (converted to lowercase)
1070
+ */
1071
+ id: string;
1072
+
1073
+ /**
1074
+ * The name of the association
1075
+ */
1076
+ name: string;
1077
+ }
1078
+
1079
+ export interface LoyaltyLeaderboardView {
1080
+ /**
1081
+ * UUID of the association (converted to lowercase)
1082
+ */
1083
+ id: string;
1084
+
1085
+ /**
1086
+ * The name of the association
1087
+ */
1088
+ name: string;
1089
+ }
1090
+
1091
+ export interface LoyaltyRule {
1092
+ /**
1093
+ * UUID of the association (converted to lowercase)
1094
+ */
1095
+ id: string;
1096
+
1097
+ /**
1098
+ * The name of the association
1099
+ */
1100
+ name: string;
1101
+ }
1102
+
1103
+ export interface LoyaltyRuleGroup {
1104
+ /**
1105
+ * UUID of the association (converted to lowercase)
1106
+ */
1107
+ id: string;
1108
+
1109
+ /**
1110
+ * The name of the association
1111
+ */
1112
+ name: string;
1113
+ }
614
1114
  }
615
1115
 
616
- export interface LoyaltyCurrency {
1116
+ export interface CsvFile {
617
1117
  /**
618
- * UUID of the association (converted to lowercase)
1118
+ * UUID of the CSV file (converted to lowercase)
619
1119
  */
620
1120
  id: string;
621
1121
 
622
1122
  /**
623
- * The name of the association
1123
+ * The description of the CSV file
624
1124
  */
625
- name: string;
626
- }
1125
+ description: string | null;
627
1126
 
628
- export interface LoyaltyLeaderboardView {
629
1127
  /**
630
- * UUID of the association (converted to lowercase)
1128
+ * The name of the CSV file
631
1129
  */
632
- id: string;
1130
+ name: string | null;
633
1131
 
634
1132
  /**
635
- * The name of the association
1133
+ * The URL of the CSV file
636
1134
  */
637
- name: string;
1135
+ url: string | null;
638
1136
  }
1137
+ }
639
1138
 
640
- export interface LoyaltyRule {
641
- /**
642
- * UUID of the association (converted to lowercase)
643
- */
644
- id: string;
1139
+ export interface DataJob {
1140
+ /**
1141
+ * UUID of the data job (converted to lowercase)
1142
+ */
1143
+ id: string;
1144
+
1145
+ /**
1146
+ * The date and time the data job was created
1147
+ */
1148
+ createdAt: string;
1149
+
1150
+ /**
1151
+ * The status of the data job
1152
+ */
1153
+ status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
1154
+
1155
+ /**
1156
+ * The date and time the data job was updated
1157
+ */
1158
+ updatedAt: string;
1159
+
1160
+ /**
1161
+ * The message associated with the data job
1162
+ */
1163
+ message?: string | null;
1164
+ }
645
1165
 
646
- /**
647
- * The name of the association
648
- */
649
- name: string;
650
- }
1166
+ export interface LoyaltyBadgeUser {
1167
+ /**
1168
+ * UUID of the user badge (converted to lowercase)
1169
+ */
1170
+ id: string;
1171
+
1172
+ /**
1173
+ * The date and time the user badge was created
1174
+ */
1175
+ createdAt: string;
1176
+
1177
+ /**
1178
+ * UUID of the badge (converted to lowercase)
1179
+ */
1180
+ loyaltyBadgeId: string;
1181
+
1182
+ /**
1183
+ * UUID of the organization (converted to lowercase)
1184
+ */
1185
+ organizationId: string;
1186
+
1187
+ /**
1188
+ * The status of the badge
1189
+ */
1190
+ status: 'active' | 'inactive' | 'revoked';
1191
+
1192
+ /**
1193
+ * The date and time the user badge was updated
1194
+ */
1195
+ updatedAt: string;
1196
+
1197
+ /**
1198
+ * UUID of the user (converted to lowercase)
1199
+ */
1200
+ userId: string;
1201
+
1202
+ /**
1203
+ * UUID of the website (converted to lowercase)
1204
+ */
1205
+ websiteId: string;
1206
+
1207
+ /**
1208
+ * The date and time the user badge was granted
1209
+ */
1210
+ completedAt?: string | null;
1211
+
1212
+ /**
1213
+ * Whether the user has dismissed the badge in the UI
1214
+ */
1215
+ dismissedInUi?: boolean;
1216
+
1217
+ /**
1218
+ * Whether to hide this badge in the user interface
1219
+ */
1220
+ hideInUi?: boolean;
1221
+
1222
+ /**
1223
+ * Array of progress for the badge
1224
+ */
1225
+ progress?: unknown;
1226
+
1227
+ /**
1228
+ * User associated with the user badge
1229
+ */
1230
+ user?: LoyaltyBadgeUser.User;
1231
+ }
651
1232
 
652
- export interface LoyaltyRuleGroup {
1233
+ export namespace LoyaltyBadgeUser {
1234
+ /**
1235
+ * User associated with the user badge
1236
+ */
1237
+ export interface User {
653
1238
  /**
654
- * UUID of the association (converted to lowercase)
1239
+ * UUID of the user (converted to lowercase)
655
1240
  */
656
1241
  id: string;
657
1242
 
658
1243
  /**
659
- * The name of the association
1244
+ * Wallet address of the user
660
1245
  */
661
- name: string;
1246
+ walletAddress: string;
662
1247
  }
663
1248
  }
664
- }
665
1249
 
666
- export interface LoyaltyBadgeUser {
667
- /**
668
- * UUID of the user badge (converted to lowercase)
669
- */
670
- id: string;
671
-
672
- /**
673
- * UUID of the badge (converted to lowercase)
674
- */
675
- loyaltyBadgeId: string;
1250
+ export interface LoyaltyRule {
1251
+ /**
1252
+ * UUID of the loyalty rule (converted to lowercase)
1253
+ */
1254
+ id: string;
676
1255
 
677
- /**
678
- * UUID of the organization (converted to lowercase)
679
- */
680
- organizationId: string;
681
-
682
- /**
683
- * The status of the badge
684
- */
685
- status: 'active' | 'inactive' | 'revoked';
686
-
687
- /**
688
- * UUID of the user (converted to lowercase)
689
- */
690
- userId: string;
691
-
692
- /**
693
- * UUID of the website (converted to lowercase)
694
- */
695
- websiteId: string;
1256
+ /**
1257
+ * The name of the loyalty rule
1258
+ */
1259
+ name: string;
1260
+ }
696
1261
 
697
- /**
698
- * Array of progress for the badge
699
- */
700
- progress?: unknown;
1262
+ export interface Reward {
1263
+ /**
1264
+ * UUID of the badge reward
1265
+ */
1266
+ id: string;
1267
+
1268
+ /**
1269
+ * Points amount to reward (for points reward type)
1270
+ */
1271
+ amount: number | null;
1272
+
1273
+ /**
1274
+ * Whether the multiplier should be applied to the user's existing balance
1275
+ */
1276
+ isRetroactive: boolean;
1277
+
1278
+ /**
1279
+ * UUID of the loyalty currency for this reward
1280
+ */
1281
+ loyaltyCurrencyId: string | null;
1282
+
1283
+ /**
1284
+ * Multiplier to reward (for multiplier reward type)
1285
+ */
1286
+ multiplier: number | null;
1287
+
1288
+ /**
1289
+ * Type of reward (points or multiplier)
1290
+ */
1291
+ rewardType: 'points' | 'multiplier' | 'badge';
1292
+
1293
+ /**
1294
+ * Array of loyalty currency IDs for multiplier rewards (empty means all
1295
+ * currencies)
1296
+ */
1297
+ loyaltyCurrencyIds?: Array<string>;
1298
+ }
701
1299
  }
702
1300
  }
703
1301
 
@@ -710,6 +1308,11 @@ export interface BadgeDeleteResponse {
710
1308
  */
711
1309
  id: string;
712
1310
 
1311
+ /**
1312
+ * The date and time the badge was created
1313
+ */
1314
+ createdAt: string;
1315
+
713
1316
  /**
714
1317
  * The description of the badge
715
1318
  */
@@ -730,10 +1333,35 @@ export interface BadgeDeleteResponse {
730
1333
  */
731
1334
  name: string;
732
1335
 
1336
+ /**
1337
+ * The date and time the badge was updated
1338
+ */
1339
+ updatedAt: string;
1340
+
1341
+ /**
1342
+ * Array of data jobs associated with the badge
1343
+ */
1344
+ dataJobs?: Array<BadgeDeleteResponse.DataJob>;
1345
+
1346
+ /**
1347
+ * Whether to hide this badge in the user interface
1348
+ */
1349
+ hideInUi?: boolean;
1350
+
733
1351
  /**
734
1352
  * Array of user badges
735
1353
  */
736
- LoyaltyBadgeUser?: Array<BadgeDeleteResponse.LoyaltyBadgeUser>;
1354
+ loyaltyBadgeUsers?: Array<BadgeDeleteResponse.LoyaltyBadgeUser>;
1355
+
1356
+ /**
1357
+ * Array of loyalty rules associated with the badge
1358
+ */
1359
+ loyaltyRules?: Array<BadgeDeleteResponse.LoyaltyRule>;
1360
+
1361
+ /**
1362
+ * Array of rewards granted when the badge is achieved
1363
+ */
1364
+ rewards?: Array<BadgeDeleteResponse.Reward>;
737
1365
  }
738
1366
 
739
1367
  export namespace BadgeDeleteResponse {
@@ -754,7 +1382,7 @@ export namespace BadgeDeleteResponse {
754
1382
  association: Array<LoyaltyCondition.Association>;
755
1383
 
756
1384
  /**
757
- * The URL of the CSV file
1385
+ * URL of the CSV file
758
1386
  */
759
1387
  csvUrl: string | null;
760
1388
 
@@ -787,6 +1415,11 @@ export namespace BadgeDeleteResponse {
787
1415
  * The type of the condition
788
1416
  */
789
1417
  type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
1418
+
1419
+ /**
1420
+ * Array of CSV files associated with the condition
1421
+ */
1422
+ csvFiles?: Array<LoyaltyCondition.CsvFile>;
790
1423
  }
791
1424
 
792
1425
  export namespace LoyaltyCondition {
@@ -863,6 +1496,55 @@ export namespace BadgeDeleteResponse {
863
1496
  name: string;
864
1497
  }
865
1498
  }
1499
+
1500
+ export interface CsvFile {
1501
+ /**
1502
+ * UUID of the CSV file (converted to lowercase)
1503
+ */
1504
+ id: string;
1505
+
1506
+ /**
1507
+ * The description of the CSV file
1508
+ */
1509
+ description: string | null;
1510
+
1511
+ /**
1512
+ * The name of the CSV file
1513
+ */
1514
+ name: string | null;
1515
+
1516
+ /**
1517
+ * The URL of the CSV file
1518
+ */
1519
+ url: string | null;
1520
+ }
1521
+ }
1522
+
1523
+ export interface DataJob {
1524
+ /**
1525
+ * UUID of the data job (converted to lowercase)
1526
+ */
1527
+ id: string;
1528
+
1529
+ /**
1530
+ * The date and time the data job was created
1531
+ */
1532
+ createdAt: string;
1533
+
1534
+ /**
1535
+ * The status of the data job
1536
+ */
1537
+ status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
1538
+
1539
+ /**
1540
+ * The date and time the data job was updated
1541
+ */
1542
+ updatedAt: string;
1543
+
1544
+ /**
1545
+ * The message associated with the data job
1546
+ */
1547
+ message?: string | null;
866
1548
  }
867
1549
 
868
1550
  export interface LoyaltyBadgeUser {
@@ -871,6 +1553,11 @@ export namespace BadgeDeleteResponse {
871
1553
  */
872
1554
  id: string;
873
1555
 
1556
+ /**
1557
+ * The date and time the user badge was created
1558
+ */
1559
+ createdAt: string;
1560
+
874
1561
  /**
875
1562
  * UUID of the badge (converted to lowercase)
876
1563
  */
@@ -886,6 +1573,11 @@ export namespace BadgeDeleteResponse {
886
1573
  */
887
1574
  status: 'active' | 'inactive' | 'revoked';
888
1575
 
1576
+ /**
1577
+ * The date and time the user badge was updated
1578
+ */
1579
+ updatedAt: string;
1580
+
889
1581
  /**
890
1582
  * UUID of the user (converted to lowercase)
891
1583
  */
@@ -896,10 +1588,97 @@ export namespace BadgeDeleteResponse {
896
1588
  */
897
1589
  websiteId: string;
898
1590
 
1591
+ /**
1592
+ * The date and time the user badge was granted
1593
+ */
1594
+ completedAt?: string | null;
1595
+
1596
+ /**
1597
+ * Whether the user has dismissed the badge in the UI
1598
+ */
1599
+ dismissedInUi?: boolean;
1600
+
1601
+ /**
1602
+ * Whether to hide this badge in the user interface
1603
+ */
1604
+ hideInUi?: boolean;
1605
+
899
1606
  /**
900
1607
  * Array of progress for the badge
901
1608
  */
902
1609
  progress?: unknown;
1610
+
1611
+ /**
1612
+ * User associated with the user badge
1613
+ */
1614
+ user?: LoyaltyBadgeUser.User;
1615
+ }
1616
+
1617
+ export namespace LoyaltyBadgeUser {
1618
+ /**
1619
+ * User associated with the user badge
1620
+ */
1621
+ export interface User {
1622
+ /**
1623
+ * UUID of the user (converted to lowercase)
1624
+ */
1625
+ id: string;
1626
+
1627
+ /**
1628
+ * Wallet address of the user
1629
+ */
1630
+ walletAddress: string;
1631
+ }
1632
+ }
1633
+
1634
+ export interface LoyaltyRule {
1635
+ /**
1636
+ * UUID of the loyalty rule (converted to lowercase)
1637
+ */
1638
+ id: string;
1639
+
1640
+ /**
1641
+ * The name of the loyalty rule
1642
+ */
1643
+ name: string;
1644
+ }
1645
+
1646
+ export interface Reward {
1647
+ /**
1648
+ * UUID of the badge reward
1649
+ */
1650
+ id: string;
1651
+
1652
+ /**
1653
+ * Points amount to reward (for points reward type)
1654
+ */
1655
+ amount: number | null;
1656
+
1657
+ /**
1658
+ * Whether the multiplier should be applied to the user's existing balance
1659
+ */
1660
+ isRetroactive: boolean;
1661
+
1662
+ /**
1663
+ * UUID of the loyalty currency for this reward
1664
+ */
1665
+ loyaltyCurrencyId: string | null;
1666
+
1667
+ /**
1668
+ * Multiplier to reward (for multiplier reward type)
1669
+ */
1670
+ multiplier: number | null;
1671
+
1672
+ /**
1673
+ * Type of reward (points or multiplier)
1674
+ */
1675
+ rewardType: 'points' | 'multiplier' | 'badge';
1676
+
1677
+ /**
1678
+ * Array of loyalty currency IDs for multiplier rewards (empty means all
1679
+ * currencies)
1680
+ */
1681
+ loyaltyCurrencyIds?: Array<string>;
903
1682
  }
904
1683
  }
905
1684
 
@@ -952,6 +1731,11 @@ export namespace BadgeRewardResponse {
952
1731
  }
953
1732
 
954
1733
  export interface BadgeCreateParams {
1734
+ /**
1735
+ * Array of conditions for the badge
1736
+ */
1737
+ conditions: Array<BadgeCreateParams.Condition>;
1738
+
955
1739
  /**
956
1740
  * The URL of the badge image
957
1741
  */
@@ -967,29 +1751,31 @@ export interface BadgeCreateParams {
967
1751
  */
968
1752
  organizationId: string;
969
1753
 
970
- /**
971
- * Array of rules for the badge
972
- */
973
- rules: Array<BadgeCreateParams.Rule>;
974
-
975
1754
  /**
976
1755
  * UUID of the website (optional, converted to lowercase)
977
1756
  */
978
1757
  websiteId: string;
979
1758
 
1759
+ csvFiles?: Array<BadgeCreateParams.CsvFile>;
1760
+
980
1761
  /**
981
1762
  * The description of the badge
982
1763
  */
983
1764
  description?: string;
1765
+
1766
+ /**
1767
+ * Whether to hide this badge in the user interface
1768
+ */
1769
+ hideInUi?: boolean;
1770
+
1771
+ /**
1772
+ * Array of rewards granted when the badge is achieved
1773
+ */
1774
+ rewards?: Array<BadgeCreateParams.Reward>;
984
1775
  }
985
1776
 
986
1777
  export namespace BadgeCreateParams {
987
- export interface Rule {
988
- /**
989
- * The type of rule
990
- */
991
- type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
992
-
1778
+ export interface Condition {
993
1779
  /**
994
1780
  * The amount of the rule
995
1781
  */
@@ -1023,7 +1809,7 @@ export namespace BadgeCreateParams {
1023
1809
  /**
1024
1810
  * UUID of the loyalty rule chain (optional, converted to lowercase)
1025
1811
  */
1026
- loyaltyRuleChainId?: string;
1812
+ loyaltyRuleChainId?: string | null;
1027
1813
 
1028
1814
  /**
1029
1815
  * Array of UUIDs of the rule group (optional, converted to lowercase)
@@ -1044,15 +1830,68 @@ export namespace BadgeCreateParams {
1044
1830
  * The number of rules that need to be fulfilled to satisfy the condition
1045
1831
  */
1046
1832
  requiredCount?: number | null;
1833
+
1834
+ /**
1835
+ * The type of rule
1836
+ */
1837
+ type?: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
1838
+ }
1839
+
1840
+ export interface CsvFile {
1841
+ src: string;
1842
+
1843
+ description?: string;
1844
+
1845
+ name?: string;
1846
+ }
1847
+
1848
+ export interface Reward {
1849
+ /**
1850
+ * Type of reward (points or multiplier)
1851
+ */
1852
+ rewardType: 'points' | 'multiplier' | 'badge';
1853
+
1854
+ /**
1855
+ * Points amount to reward (for points reward type)
1856
+ */
1857
+ amount?: number;
1858
+
1859
+ /**
1860
+ * Whether the multiplier should be applied to the user's existing balance
1861
+ */
1862
+ isRetroactive?: boolean;
1863
+
1864
+ /**
1865
+ * UUID of the loyalty currency for this reward
1866
+ */
1867
+ loyaltyCurrencyId?: string;
1868
+
1869
+ /**
1870
+ * Array of loyalty currency IDs for multiplier rewards (empty means all
1871
+ * currencies)
1872
+ */
1873
+ loyaltyCurrencyIds?: Array<string>;
1874
+
1875
+ /**
1876
+ * Multiplier to reward (for multiplier reward type)
1877
+ */
1878
+ multiplier?: number;
1047
1879
  }
1048
1880
  }
1049
1881
 
1050
1882
  export interface BadgeUpdateParams {
1883
+ csvFiles?: Array<BadgeUpdateParams.CsvFile>;
1884
+
1051
1885
  /**
1052
1886
  * The description of the badge
1053
1887
  */
1054
1888
  description?: string;
1055
1889
 
1890
+ /**
1891
+ * Whether to hide this badge in the user interface
1892
+ */
1893
+ hideInUi?: boolean;
1894
+
1056
1895
  /**
1057
1896
  * The URL of the badge image
1058
1897
  */
@@ -1062,18 +1901,66 @@ export interface BadgeUpdateParams {
1062
1901
  * The name of the badge
1063
1902
  */
1064
1903
  name?: string;
1904
+
1905
+ /**
1906
+ * Array of rewards granted when the badge is achieved
1907
+ */
1908
+ rewards?: Array<BadgeUpdateParams.Reward>;
1909
+ }
1910
+
1911
+ export namespace BadgeUpdateParams {
1912
+ export interface CsvFile {
1913
+ src: string;
1914
+
1915
+ description?: string;
1916
+
1917
+ name?: string;
1918
+ }
1919
+
1920
+ export interface Reward {
1921
+ /**
1922
+ * Type of reward (points or multiplier)
1923
+ */
1924
+ rewardType: 'points' | 'multiplier' | 'badge';
1925
+
1926
+ /**
1927
+ * Points amount to reward (for points reward type)
1928
+ */
1929
+ amount?: number;
1930
+
1931
+ /**
1932
+ * Whether the multiplier should be applied to the user's existing balance
1933
+ */
1934
+ isRetroactive?: boolean;
1935
+
1936
+ /**
1937
+ * UUID of the loyalty currency for this reward
1938
+ */
1939
+ loyaltyCurrencyId?: string;
1940
+
1941
+ /**
1942
+ * Array of loyalty currency IDs for multiplier rewards (empty means all
1943
+ * currencies)
1944
+ */
1945
+ loyaltyCurrencyIds?: Array<string>;
1946
+
1947
+ /**
1948
+ * Multiplier to reward (for multiplier reward type)
1949
+ */
1950
+ multiplier?: number;
1951
+ }
1065
1952
  }
1066
1953
 
1067
1954
  export interface BadgeListParams {
1068
1955
  /**
1069
1956
  * Array of badge IDs (converted to lowercase) to fetch
1070
1957
  */
1071
- badgeIds?: Array<string>;
1958
+ badgeIds?: string | Array<string>;
1072
1959
 
1073
1960
  /**
1074
1961
  * Include deleted badges in the response
1075
1962
  */
1076
- includeDeleted?: boolean | null;
1963
+ includeDeleted?: boolean;
1077
1964
 
1078
1965
  /**
1079
1966
  * Number of badges to fetch
@@ -1091,9 +1978,24 @@ export interface BadgeListParams {
1091
1978
  startingAfter?: string;
1092
1979
 
1093
1980
  /**
1094
- * UUID of the user (optional, converted to lowercase)
1981
+ * External identifier of the user group
1095
1982
  */
1096
- userId?: string;
1983
+ userGroupExternalIdentifier?: string;
1984
+
1985
+ /**
1986
+ * UUID of the user group
1987
+ */
1988
+ userGroupId?: string;
1989
+
1990
+ /**
1991
+ * UUID of the user, or array of UUID.
1992
+ */
1993
+ userId?: string | Array<string>;
1994
+
1995
+ /**
1996
+ * Wallet Address of the user, or array of wallet addresses.
1997
+ */
1998
+ walletAddress?: string | Array<string>;
1097
1999
 
1098
2000
  /**
1099
2001
  * UUID of the website (optional, converted to lowercase)
@@ -1102,6 +2004,11 @@ export interface BadgeListParams {
1102
2004
  }
1103
2005
 
1104
2006
  export interface BadgeRevokeParams {
2007
+ /**
2008
+ * Status of the badge
2009
+ */
2010
+ status?: 'active' | 'inactive' | 'revoked';
2011
+
1105
2012
  /**
1106
2013
  * UUID of the user (converted to lowercase)
1107
2014
  */
@@ -1114,6 +2021,11 @@ export interface BadgeRevokeParams {
1114
2021
  }
1115
2022
 
1116
2023
  export interface BadgeRewardParams {
2024
+ /**
2025
+ * Status of the badge
2026
+ */
2027
+ status?: 'active' | 'inactive' | 'revoked';
2028
+
1117
2029
  /**
1118
2030
  * UUID of the user (converted to lowercase)
1119
2031
  */