@snagsolutions/sdk 0.1.0-alpha.19 → 0.1.0-alpha.190

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 (272) hide show
  1. package/CHANGELOG.md +1544 -0
  2. package/README.md +13 -23
  3. package/core.d.ts +19 -5
  4. package/core.d.ts.map +1 -1
  5. package/core.js +24 -17
  6. package/core.js.map +1 -1
  7. package/core.mjs +24 -17
  8. package/core.mjs.map +1 -1
  9. package/index.d.mts +7 -4
  10. package/index.d.ts +7 -4
  11. package/index.d.ts.map +1 -1
  12. package/index.js +8 -4
  13. package/index.js.map +1 -1
  14. package/index.mjs +8 -4
  15. package/index.mjs.map +1 -1
  16. package/package.json +4 -5
  17. package/resource.d.ts +1 -1
  18. package/resource.d.ts.map +1 -1
  19. package/resource.js.map +1 -1
  20. package/resource.mjs.map +1 -1
  21. package/resources/assets.d.ts +16 -2
  22. package/resources/assets.d.ts.map +1 -1
  23. package/resources/assets.js +8 -0
  24. package/resources/assets.js.map +1 -1
  25. package/resources/assets.mjs +8 -0
  26. package/resources/assets.mjs.map +1 -1
  27. package/resources/auctions/auctions.d.ts +343 -0
  28. package/resources/auctions/auctions.d.ts.map +1 -0
  29. package/resources/auctions/auctions.js +72 -0
  30. package/resources/auctions/auctions.js.map +1 -0
  31. package/resources/auctions/auctions.mjs +45 -0
  32. package/resources/auctions/auctions.mjs.map +1 -0
  33. package/resources/auctions/index.d.ts +3 -0
  34. package/resources/auctions/index.d.ts.map +1 -0
  35. package/resources/auctions/index.js +9 -0
  36. package/resources/auctions/index.js.map +1 -0
  37. package/resources/auctions/index.mjs +4 -0
  38. package/resources/auctions/index.mjs.map +1 -0
  39. package/resources/auctions/website-user-attributes/index.d.ts +3 -0
  40. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
  41. package/resources/auctions/website-user-attributes/index.js +9 -0
  42. package/resources/auctions/website-user-attributes/index.js.map +1 -0
  43. package/resources/auctions/website-user-attributes/index.mjs +4 -0
  44. package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
  45. package/resources/auctions/website-user-attributes/values.d.ts +126 -0
  46. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  47. package/resources/auctions/website-user-attributes/values.js +49 -0
  48. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  49. package/resources/auctions/website-user-attributes/values.mjs +45 -0
  50. package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
  51. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +136 -0
  52. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
  53. package/resources/auctions/website-user-attributes/website-user-attributes.js +76 -0
  54. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
  55. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +49 -0
  56. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
  57. package/resources/auctions/website-user-attributes.d.ts +2 -0
  58. package/resources/auctions/website-user-attributes.d.ts.map +1 -0
  59. package/resources/auctions/website-user-attributes.js +19 -0
  60. package/resources/auctions/website-user-attributes.js.map +1 -0
  61. package/resources/auctions/website-user-attributes.mjs +3 -0
  62. package/resources/auctions/website-user-attributes.mjs.map +1 -0
  63. package/resources/auctions.d.ts +1 -133
  64. package/resources/auctions.d.ts.map +1 -1
  65. package/resources/auctions.js +15 -22
  66. package/resources/auctions.js.map +1 -1
  67. package/resources/auctions.mjs +1 -20
  68. package/resources/auctions.mjs.map +1 -1
  69. package/resources/auth.d.ts +17 -4
  70. package/resources/auth.d.ts.map +1 -1
  71. package/resources/auth.js.map +1 -1
  72. package/resources/auth.mjs.map +1 -1
  73. package/resources/index.d.ts +2 -2
  74. package/resources/index.d.ts.map +1 -1
  75. package/resources/index.js +1 -1
  76. package/resources/index.js.map +1 -1
  77. package/resources/index.mjs +1 -1
  78. package/resources/index.mjs.map +1 -1
  79. package/resources/loyalty/account-streaks.d.ts +81 -0
  80. package/resources/loyalty/account-streaks.d.ts.map +1 -0
  81. package/resources/loyalty/account-streaks.js +24 -0
  82. package/resources/loyalty/account-streaks.js.map +1 -0
  83. package/resources/loyalty/account-streaks.mjs +20 -0
  84. package/resources/loyalty/account-streaks.mjs.map +1 -0
  85. package/resources/loyalty/accounts.d.ts +60 -16
  86. package/resources/loyalty/accounts.d.ts.map +1 -1
  87. package/resources/loyalty/accounts.js +14 -0
  88. package/resources/loyalty/accounts.js.map +1 -1
  89. package/resources/loyalty/accounts.mjs +14 -0
  90. package/resources/loyalty/accounts.mjs.map +1 -1
  91. package/resources/loyalty/badges.d.ts +666 -135
  92. package/resources/loyalty/badges.d.ts.map +1 -1
  93. package/resources/loyalty/badges.js +19 -1
  94. package/resources/loyalty/badges.js.map +1 -1
  95. package/resources/loyalty/badges.mjs +19 -1
  96. package/resources/loyalty/badges.mjs.map +1 -1
  97. package/resources/loyalty/currencies.d.ts +19 -0
  98. package/resources/loyalty/currencies.d.ts.map +1 -1
  99. package/resources/loyalty/currencies.js +19 -0
  100. package/resources/loyalty/currencies.js.map +1 -1
  101. package/resources/loyalty/currencies.mjs +19 -0
  102. package/resources/loyalty/currencies.mjs.map +1 -1
  103. package/resources/loyalty/index.d.ts +4 -4
  104. package/resources/loyalty/index.d.ts.map +1 -1
  105. package/resources/loyalty/index.js +5 -5
  106. package/resources/loyalty/index.js.map +1 -1
  107. package/resources/loyalty/index.mjs +3 -3
  108. package/resources/loyalty/index.mjs.map +1 -1
  109. package/resources/loyalty/loyalty.d.ts +11 -11
  110. package/resources/loyalty/loyalty.d.ts.map +1 -1
  111. package/resources/loyalty/loyalty.js +6 -6
  112. package/resources/loyalty/loyalty.js.map +1 -1
  113. package/resources/loyalty/loyalty.mjs +7 -7
  114. package/resources/loyalty/loyalty.mjs.map +1 -1
  115. package/resources/loyalty/multipliers.d.ts +39 -2
  116. package/resources/loyalty/multipliers.d.ts.map +1 -1
  117. package/resources/loyalty/multipliers.js +23 -0
  118. package/resources/loyalty/multipliers.js.map +1 -1
  119. package/resources/loyalty/multipliers.mjs +23 -0
  120. package/resources/loyalty/multipliers.mjs.map +1 -1
  121. package/resources/loyalty/questions-responses.d.ts +55 -4
  122. package/resources/loyalty/questions-responses.d.ts.map +1 -1
  123. package/resources/loyalty/questions-responses.js +9 -0
  124. package/resources/loyalty/questions-responses.js.map +1 -1
  125. package/resources/loyalty/questions-responses.mjs +9 -0
  126. package/resources/loyalty/questions-responses.mjs.map +1 -1
  127. package/resources/loyalty/questions.d.ts +52 -6
  128. package/resources/loyalty/questions.d.ts.map +1 -1
  129. package/resources/loyalty/questions.js +31 -0
  130. package/resources/loyalty/questions.js.map +1 -1
  131. package/resources/loyalty/questions.mjs +31 -0
  132. package/resources/loyalty/questions.mjs.map +1 -1
  133. package/resources/loyalty/rule-edits.d.ts +2630 -8
  134. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  135. package/resources/loyalty/rule-edits.js +14 -0
  136. package/resources/loyalty/rule-edits.js.map +1 -1
  137. package/resources/loyalty/rule-edits.mjs +14 -0
  138. package/resources/loyalty/rule-edits.mjs.map +1 -1
  139. package/resources/loyalty/rule-groups.d.ts +279 -64
  140. package/resources/loyalty/rule-groups.d.ts.map +1 -1
  141. package/resources/loyalty/rule-groups.js +38 -2
  142. package/resources/loyalty/rule-groups.js.map +1 -1
  143. package/resources/loyalty/rule-groups.mjs +38 -2
  144. package/resources/loyalty/rule-groups.mjs.map +1 -1
  145. package/resources/loyalty/rules.d.ts +1902 -269
  146. package/resources/loyalty/rules.d.ts.map +1 -1
  147. package/resources/loyalty/rules.js +40 -9
  148. package/resources/loyalty/rules.js.map +1 -1
  149. package/resources/loyalty/rules.mjs +40 -9
  150. package/resources/loyalty/rules.mjs.map +1 -1
  151. package/resources/loyalty/transactions/index.d.ts +3 -0
  152. package/resources/loyalty/transactions/index.d.ts.map +1 -0
  153. package/resources/loyalty/transactions/index.js +9 -0
  154. package/resources/loyalty/transactions/index.js.map +1 -0
  155. package/resources/loyalty/transactions/index.mjs +4 -0
  156. package/resources/loyalty/transactions/index.mjs.map +1 -0
  157. package/resources/loyalty/transactions/rule-statuses.d.ts +120 -0
  158. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  159. package/resources/loyalty/transactions/rule-statuses.js +30 -0
  160. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  161. package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
  162. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  163. package/resources/loyalty/transactions/transactions.d.ts +410 -0
  164. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  165. package/resources/loyalty/transactions/transactions.js +76 -0
  166. package/resources/loyalty/transactions/transactions.js.map +1 -0
  167. package/resources/loyalty/transactions/transactions.mjs +49 -0
  168. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  169. package/resources/loyalty/transactions.d.ts +1 -248
  170. package/resources/loyalty/transactions.d.ts.map +1 -1
  171. package/resources/loyalty/transactions.js +15 -18
  172. package/resources/loyalty/transactions.js.map +1 -1
  173. package/resources/loyalty/transactions.mjs +1 -16
  174. package/resources/loyalty/transactions.mjs.map +1 -1
  175. package/resources/minting.d.ts +5 -5
  176. package/resources/minting.d.ts.map +1 -1
  177. package/resources/referral/referral.d.ts +11 -3
  178. package/resources/referral/referral.d.ts.map +1 -1
  179. package/resources/referral/referral.js +11 -5
  180. package/resources/referral/referral.js.map +1 -1
  181. package/resources/referral/referral.mjs +11 -5
  182. package/resources/referral/referral.mjs.map +1 -1
  183. package/resources/referral/users.d.ts +29 -3
  184. package/resources/referral/users.d.ts.map +1 -1
  185. package/resources/referral/users.js +12 -4
  186. package/resources/referral/users.js.map +1 -1
  187. package/resources/referral/users.mjs +12 -4
  188. package/resources/referral/users.mjs.map +1 -1
  189. package/resources/users/index.d.ts +1 -1
  190. package/resources/users/index.d.ts.map +1 -1
  191. package/resources/users/index.js.map +1 -1
  192. package/resources/users/index.mjs.map +1 -1
  193. package/resources/users/metadatas.d.ts +34 -3
  194. package/resources/users/metadatas.d.ts.map +1 -1
  195. package/resources/users/metadatas.js.map +1 -1
  196. package/resources/users/metadatas.mjs.map +1 -1
  197. package/resources/users/users.d.ts +184 -35
  198. package/resources/users/users.d.ts.map +1 -1
  199. package/resources/users/users.js +58 -1
  200. package/resources/users/users.js.map +1 -1
  201. package/resources/users/users.mjs +58 -1
  202. package/resources/users/users.mjs.map +1 -1
  203. package/resources/websites/website-collections.d.ts +22 -1
  204. package/resources/websites/website-collections.d.ts.map +1 -1
  205. package/resources/websites/website-collections.js +21 -0
  206. package/resources/websites/website-collections.js.map +1 -1
  207. package/resources/websites/website-collections.mjs +21 -0
  208. package/resources/websites/website-collections.mjs.map +1 -1
  209. package/resources/websites/website-user-roles.d.ts +24 -1
  210. package/resources/websites/website-user-roles.d.ts.map +1 -1
  211. package/resources/websites/website-user-roles.js +23 -0
  212. package/resources/websites/website-user-roles.js.map +1 -1
  213. package/resources/websites/website-user-roles.mjs +23 -0
  214. package/resources/websites/website-user-roles.mjs.map +1 -1
  215. package/resources/websites/websites.d.ts +12 -0
  216. package/resources/websites/websites.d.ts.map +1 -1
  217. package/resources/websites/websites.js +7 -0
  218. package/resources/websites/websites.js.map +1 -1
  219. package/resources/websites/websites.mjs +7 -0
  220. package/resources/websites/websites.mjs.map +1 -1
  221. package/src/core.ts +39 -16
  222. package/src/index.ts +31 -2
  223. package/src/resource.ts +1 -1
  224. package/src/resources/assets.ts +18 -3
  225. package/src/resources/auctions/auctions.ts +528 -0
  226. package/src/resources/auctions/index.ts +19 -0
  227. package/src/resources/auctions/website-user-attributes/index.ts +18 -0
  228. package/src/resources/auctions/website-user-attributes/values.ts +170 -0
  229. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +212 -0
  230. package/src/resources/auctions/website-user-attributes.ts +3 -0
  231. package/src/resources/auctions.ts +1 -207
  232. package/src/resources/auth.ts +21 -5
  233. package/src/resources/index.ts +12 -1
  234. package/src/resources/loyalty/account-streaks.ts +110 -0
  235. package/src/resources/loyalty/accounts.ts +65 -18
  236. package/src/resources/loyalty/badges.ts +790 -146
  237. package/src/resources/loyalty/currencies.ts +19 -0
  238. package/src/resources/loyalty/index.ts +19 -3
  239. package/src/resources/loyalty/loyalty.ts +39 -15
  240. package/src/resources/loyalty/multipliers.ts +43 -4
  241. package/src/resources/loyalty/questions-responses.ts +64 -4
  242. package/src/resources/loyalty/questions.ts +56 -6
  243. package/src/resources/loyalty/rule-edits.ts +3822 -100
  244. package/src/resources/loyalty/rule-groups.ts +489 -76
  245. package/src/resources/loyalty/rules.ts +2968 -310
  246. package/src/resources/loyalty/transactions/index.ts +18 -0
  247. package/src/resources/loyalty/transactions/rule-statuses.ts +178 -0
  248. package/src/resources/loyalty/transactions/transactions.ts +683 -0
  249. package/src/resources/loyalty/transactions.ts +1 -440
  250. package/src/resources/minting.ts +24 -5
  251. package/src/resources/referral/referral.ts +13 -11
  252. package/src/resources/referral/users.ts +43 -5
  253. package/src/resources/users/index.ts +4 -0
  254. package/src/resources/users/metadatas.ts +57 -3
  255. package/src/resources/users/users.ts +249 -38
  256. package/src/resources/websites/website-collections.ts +41 -1
  257. package/src/resources/websites/website-user-roles.ts +25 -1
  258. package/src/resources/websites/websites.ts +12 -0
  259. package/src/version.ts +1 -1
  260. package/version.d.ts +1 -1
  261. package/version.d.ts.map +1 -1
  262. package/version.js +1 -1
  263. package/version.js.map +1 -1
  264. package/version.mjs +1 -1
  265. package/version.mjs.map +1 -1
  266. package/resources/loyalty/rule-chains.d.ts +0 -34
  267. package/resources/loyalty/rule-chains.d.ts.map +0 -1
  268. package/resources/loyalty/rule-chains.js +0 -15
  269. package/resources/loyalty/rule-chains.js.map +0 -1
  270. package/resources/loyalty/rule-chains.mjs +0 -11
  271. package/resources/loyalty/rule-chains.mjs.map +0 -1
  272. 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,26 @@ 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>;
61
125
  }
62
126
  export declare namespace BadgeCreateResponse {
63
127
  /**
@@ -74,7 +138,7 @@ export declare namespace BadgeCreateResponse {
74
138
  amount: number | null;
75
139
  association: Array<LoyaltyCondition.Association>;
76
140
  /**
77
- * The URL of the CSV file
141
+ * URL of the CSV file
78
142
  */
79
143
  csvUrl: string | null;
80
144
  /**
@@ -101,6 +165,10 @@ export declare namespace BadgeCreateResponse {
101
165
  * The type of the condition
102
166
  */
103
167
  type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
168
+ /**
169
+ * Array of CSV files associated with the condition
170
+ */
171
+ csvFiles?: Array<LoyaltyCondition.CsvFile>;
104
172
  }
105
173
  namespace LoyaltyCondition {
106
174
  interface Association {
@@ -162,12 +230,56 @@ export declare namespace BadgeCreateResponse {
162
230
  name: string;
163
231
  }
164
232
  }
233
+ interface CsvFile {
234
+ /**
235
+ * UUID of the CSV file (converted to lowercase)
236
+ */
237
+ id: string;
238
+ /**
239
+ * The description of the CSV file
240
+ */
241
+ description: string | null;
242
+ /**
243
+ * The name of the CSV file
244
+ */
245
+ name: string | null;
246
+ /**
247
+ * The URL of the CSV file
248
+ */
249
+ url: string | null;
250
+ }
251
+ }
252
+ interface DataJob {
253
+ /**
254
+ * UUID of the data job (converted to lowercase)
255
+ */
256
+ id: string;
257
+ /**
258
+ * The date and time the data job was created
259
+ */
260
+ createdAt: string;
261
+ /**
262
+ * The status of the data job
263
+ */
264
+ status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
265
+ /**
266
+ * The date and time the data job was updated
267
+ */
268
+ updatedAt: string;
269
+ /**
270
+ * The message associated with the data job
271
+ */
272
+ message?: string | null;
165
273
  }
166
274
  interface LoyaltyBadgeUser {
167
275
  /**
168
276
  * UUID of the user badge (converted to lowercase)
169
277
  */
170
278
  id: string;
279
+ /**
280
+ * The date and time the user badge was created
281
+ */
282
+ createdAt: string;
171
283
  /**
172
284
  * UUID of the badge (converted to lowercase)
173
285
  */
@@ -180,6 +292,10 @@ export declare namespace BadgeCreateResponse {
180
292
  * The status of the badge
181
293
  */
182
294
  status: 'active' | 'inactive' | 'revoked';
295
+ /**
296
+ * The date and time the user badge was updated
297
+ */
298
+ updatedAt: string;
183
299
  /**
184
300
  * UUID of the user (converted to lowercase)
185
301
  */
@@ -188,10 +304,47 @@ export declare namespace BadgeCreateResponse {
188
304
  * UUID of the website (converted to lowercase)
189
305
  */
190
306
  websiteId: string;
307
+ /**
308
+ * Whether the user has dismissed the badge in the UI
309
+ */
310
+ dismissedInUi?: boolean;
311
+ /**
312
+ * Whether to hide this badge in the user interface
313
+ */
314
+ hideInUi?: boolean;
191
315
  /**
192
316
  * Array of progress for the badge
193
317
  */
194
318
  progress?: unknown;
319
+ /**
320
+ * User associated with the user badge
321
+ */
322
+ user?: LoyaltyBadgeUser.User;
323
+ }
324
+ namespace LoyaltyBadgeUser {
325
+ /**
326
+ * User associated with the user badge
327
+ */
328
+ interface User {
329
+ /**
330
+ * UUID of the user (converted to lowercase)
331
+ */
332
+ id: string;
333
+ /**
334
+ * Wallet address of the user
335
+ */
336
+ walletAddress: string;
337
+ }
338
+ }
339
+ interface LoyaltyRule {
340
+ /**
341
+ * UUID of the loyalty rule (converted to lowercase)
342
+ */
343
+ id: string;
344
+ /**
345
+ * The name of the loyalty rule
346
+ */
347
+ name: string;
195
348
  }
196
349
  }
197
350
  /**
@@ -202,6 +355,10 @@ export interface BadgeUpdateResponse {
202
355
  * UUID of the badge (converted to lowercase)
203
356
  */
204
357
  id: string;
358
+ /**
359
+ * The date and time the badge was created
360
+ */
361
+ createdAt: string;
205
362
  /**
206
363
  * The description of the badge
207
364
  */
@@ -218,10 +375,26 @@ export interface BadgeUpdateResponse {
218
375
  * The name of the badge
219
376
  */
220
377
  name: string;
378
+ /**
379
+ * The date and time the badge was updated
380
+ */
381
+ updatedAt: string;
382
+ /**
383
+ * Array of data jobs associated with the badge
384
+ */
385
+ dataJobs?: Array<BadgeUpdateResponse.DataJob>;
386
+ /**
387
+ * Whether to hide this badge in the user interface
388
+ */
389
+ hideInUi?: boolean;
221
390
  /**
222
391
  * Array of user badges
223
392
  */
224
- LoyaltyBadgeUser?: Array<BadgeUpdateResponse.LoyaltyBadgeUser>;
393
+ loyaltyBadgeUsers?: Array<BadgeUpdateResponse.LoyaltyBadgeUser>;
394
+ /**
395
+ * Array of loyalty rules associated with the badge
396
+ */
397
+ loyaltyRules?: Array<BadgeUpdateResponse.LoyaltyRule>;
225
398
  }
226
399
  export declare namespace BadgeUpdateResponse {
227
400
  /**
@@ -238,7 +411,7 @@ export declare namespace BadgeUpdateResponse {
238
411
  amount: number | null;
239
412
  association: Array<LoyaltyCondition.Association>;
240
413
  /**
241
- * The URL of the CSV file
414
+ * URL of the CSV file
242
415
  */
243
416
  csvUrl: string | null;
244
417
  /**
@@ -265,6 +438,10 @@ export declare namespace BadgeUpdateResponse {
265
438
  * The type of the condition
266
439
  */
267
440
  type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
441
+ /**
442
+ * Array of CSV files associated with the condition
443
+ */
444
+ csvFiles?: Array<LoyaltyCondition.CsvFile>;
268
445
  }
269
446
  namespace LoyaltyCondition {
270
447
  interface Association {
@@ -326,12 +503,56 @@ export declare namespace BadgeUpdateResponse {
326
503
  name: string;
327
504
  }
328
505
  }
506
+ interface CsvFile {
507
+ /**
508
+ * UUID of the CSV file (converted to lowercase)
509
+ */
510
+ id: string;
511
+ /**
512
+ * The description of the CSV file
513
+ */
514
+ description: string | null;
515
+ /**
516
+ * The name of the CSV file
517
+ */
518
+ name: string | null;
519
+ /**
520
+ * The URL of the CSV file
521
+ */
522
+ url: string | null;
523
+ }
524
+ }
525
+ interface DataJob {
526
+ /**
527
+ * UUID of the data job (converted to lowercase)
528
+ */
529
+ id: string;
530
+ /**
531
+ * The date and time the data job was created
532
+ */
533
+ createdAt: string;
534
+ /**
535
+ * The status of the data job
536
+ */
537
+ status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
538
+ /**
539
+ * The date and time the data job was updated
540
+ */
541
+ updatedAt: string;
542
+ /**
543
+ * The message associated with the data job
544
+ */
545
+ message?: string | null;
329
546
  }
330
547
  interface LoyaltyBadgeUser {
331
548
  /**
332
549
  * UUID of the user badge (converted to lowercase)
333
550
  */
334
551
  id: string;
552
+ /**
553
+ * The date and time the user badge was created
554
+ */
555
+ createdAt: string;
335
556
  /**
336
557
  * UUID of the badge (converted to lowercase)
337
558
  */
@@ -344,6 +565,10 @@ export declare namespace BadgeUpdateResponse {
344
565
  * The status of the badge
345
566
  */
346
567
  status: 'active' | 'inactive' | 'revoked';
568
+ /**
569
+ * The date and time the user badge was updated
570
+ */
571
+ updatedAt: string;
347
572
  /**
348
573
  * UUID of the user (converted to lowercase)
349
574
  */
@@ -352,174 +577,329 @@ export declare namespace BadgeUpdateResponse {
352
577
  * UUID of the website (converted to lowercase)
353
578
  */
354
579
  websiteId: string;
580
+ /**
581
+ * Whether the user has dismissed the badge in the UI
582
+ */
583
+ dismissedInUi?: boolean;
584
+ /**
585
+ * Whether to hide this badge in the user interface
586
+ */
587
+ hideInUi?: boolean;
355
588
  /**
356
589
  * Array of progress for the badge
357
590
  */
358
591
  progress?: unknown;
592
+ /**
593
+ * User associated with the user badge
594
+ */
595
+ user?: LoyaltyBadgeUser.User;
596
+ }
597
+ namespace LoyaltyBadgeUser {
598
+ /**
599
+ * User associated with the user badge
600
+ */
601
+ interface User {
602
+ /**
603
+ * UUID of the user (converted to lowercase)
604
+ */
605
+ id: string;
606
+ /**
607
+ * Wallet address of the user
608
+ */
609
+ walletAddress: string;
610
+ }
611
+ }
612
+ interface LoyaltyRule {
613
+ /**
614
+ * UUID of the loyalty rule (converted to lowercase)
615
+ */
616
+ id: string;
617
+ /**
618
+ * The name of the loyalty rule
619
+ */
620
+ name: string;
359
621
  }
360
622
  }
361
- /**
362
- * Response returned upon successful fetching of the badges.
363
- */
364
623
  export interface BadgeListResponse {
624
+ data: Array<BadgeListResponse.Data>;
365
625
  /**
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
626
+ * Indicates if there is a next page of results
387
627
  */
388
- LoyaltyBadgeUser?: Array<BadgeListResponse.LoyaltyBadgeUser>;
628
+ hasNextPage: boolean;
389
629
  }
390
630
  export declare namespace BadgeListResponse {
391
631
  /**
392
- * Schema for a loyalty condition rule.
632
+ * Response returned upon successful fetching of the badges.
393
633
  */
394
- interface LoyaltyCondition {
634
+ interface Data {
395
635
  /**
396
- * UUID of the condition (converted to lowercase)
636
+ * UUID of the badge (converted to lowercase)
397
637
  */
398
638
  id: string;
399
639
  /**
400
- * The amount of the condition
640
+ * The date and time the badge was created
401
641
  */
402
- amount: number | null;
403
- association: Array<LoyaltyCondition.Association>;
642
+ createdAt: string;
404
643
  /**
405
- * The URL of the CSV file
644
+ * The description of the badge
406
645
  */
407
- csvUrl: string | null;
646
+ description: string | null;
408
647
  /**
409
- * The description of the condition
648
+ * The URL of the badge image
410
649
  */
411
- description: string | null;
650
+ imageUrl: string | null;
412
651
  /**
413
- * UUID of the currency (converted to lowercase)
652
+ * Array of conditions of the badge
414
653
  */
415
- loyaltyCurrencyId: string | null;
654
+ loyaltyConditions: Array<Data.LoyaltyCondition>;
416
655
  /**
417
- * UUID of the rule group (converted to lowercase)
656
+ * The name of the badge
418
657
  */
419
- loyaltyRuleGroupId: string | null;
658
+ name: string;
420
659
  /**
421
- * The repeat count of the condition
660
+ * The date and time the badge was updated
422
661
  */
423
- repeatCount: number | null;
662
+ updatedAt: string;
424
663
  /**
425
- * The required count of the condition
664
+ * Array of data jobs associated with the badge
426
665
  */
427
- requiredCount: number | null;
666
+ dataJobs?: Array<Data.DataJob>;
428
667
  /**
429
- * The type of the condition
668
+ * Whether to hide this badge in the user interface
430
669
  */
431
- type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
670
+ hideInUi?: boolean;
671
+ /**
672
+ * Array of user badges
673
+ */
674
+ loyaltyBadgeUsers?: Array<Data.LoyaltyBadgeUser>;
675
+ /**
676
+ * Array of loyalty rules associated with the badge
677
+ */
678
+ loyaltyRules?: Array<Data.LoyaltyRule>;
432
679
  }
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;
680
+ namespace Data {
681
+ /**
682
+ * Schema for a loyalty condition rule.
683
+ */
684
+ interface LoyaltyCondition {
685
+ /**
686
+ * UUID of the condition (converted to lowercase)
687
+ */
688
+ id: string;
689
+ /**
690
+ * The amount of the condition
691
+ */
692
+ amount: number | null;
693
+ association: Array<LoyaltyCondition.Association>;
694
+ /**
695
+ * URL of the CSV file
696
+ */
697
+ csvUrl: string | null;
698
+ /**
699
+ * The description of the condition
700
+ */
701
+ description: string | null;
702
+ /**
703
+ * UUID of the currency (converted to lowercase)
704
+ */
705
+ loyaltyCurrencyId: string | null;
706
+ /**
707
+ * UUID of the rule group (converted to lowercase)
708
+ */
709
+ loyaltyRuleGroupId: string | null;
710
+ /**
711
+ * The repeat count of the condition
712
+ */
713
+ repeatCount: number | null;
714
+ /**
715
+ * The required count of the condition
716
+ */
717
+ requiredCount: number | null;
718
+ /**
719
+ * The type of the condition
720
+ */
721
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
722
+ /**
723
+ * Array of CSV files associated with the condition
724
+ */
725
+ csvFiles?: Array<LoyaltyCondition.CsvFile>;
440
726
  }
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;
727
+ namespace LoyaltyCondition {
728
+ interface Association {
729
+ loyaltyBadge: Association.LoyaltyBadge | null;
730
+ loyaltyCurrency: Association.LoyaltyCurrency | null;
731
+ loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
732
+ loyaltyRule: Association.LoyaltyRule | null;
733
+ loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
451
734
  }
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;
735
+ namespace Association {
736
+ interface LoyaltyBadge {
737
+ /**
738
+ * UUID of the association (converted to lowercase)
739
+ */
740
+ id: string;
741
+ /**
742
+ * The name of the association
743
+ */
744
+ name: string;
745
+ }
746
+ interface LoyaltyCurrency {
747
+ /**
748
+ * UUID of the association (converted to lowercase)
749
+ */
750
+ id: string;
751
+ /**
752
+ * The name of the association
753
+ */
754
+ name: string;
755
+ }
756
+ interface LoyaltyLeaderboardView {
757
+ /**
758
+ * UUID of the association (converted to lowercase)
759
+ */
760
+ id: string;
761
+ /**
762
+ * The name of the association
763
+ */
764
+ name: string;
765
+ }
766
+ interface LoyaltyRule {
767
+ /**
768
+ * UUID of the association (converted to lowercase)
769
+ */
770
+ id: string;
771
+ /**
772
+ * The name of the association
773
+ */
774
+ name: string;
775
+ }
776
+ interface LoyaltyRuleGroup {
777
+ /**
778
+ * UUID of the association (converted to lowercase)
779
+ */
780
+ id: string;
781
+ /**
782
+ * The name of the association
783
+ */
784
+ name: string;
785
+ }
461
786
  }
462
- interface LoyaltyLeaderboardView {
787
+ interface CsvFile {
463
788
  /**
464
- * UUID of the association (converted to lowercase)
789
+ * UUID of the CSV file (converted to lowercase)
465
790
  */
466
791
  id: string;
467
792
  /**
468
- * The name of the association
793
+ * The description of the CSV file
469
794
  */
470
- name: string;
471
- }
472
- interface LoyaltyRule {
795
+ description: string | null;
473
796
  /**
474
- * UUID of the association (converted to lowercase)
797
+ * The name of the CSV file
475
798
  */
476
- id: string;
799
+ name: string | null;
477
800
  /**
478
- * The name of the association
801
+ * The URL of the CSV file
479
802
  */
480
- name: string;
803
+ url: string | null;
481
804
  }
482
- interface LoyaltyRuleGroup {
805
+ }
806
+ interface DataJob {
807
+ /**
808
+ * UUID of the data job (converted to lowercase)
809
+ */
810
+ id: string;
811
+ /**
812
+ * The date and time the data job was created
813
+ */
814
+ createdAt: string;
815
+ /**
816
+ * The status of the data job
817
+ */
818
+ status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
819
+ /**
820
+ * The date and time the data job was updated
821
+ */
822
+ updatedAt: string;
823
+ /**
824
+ * The message associated with the data job
825
+ */
826
+ message?: string | null;
827
+ }
828
+ interface LoyaltyBadgeUser {
829
+ /**
830
+ * UUID of the user badge (converted to lowercase)
831
+ */
832
+ id: string;
833
+ /**
834
+ * The date and time the user badge was created
835
+ */
836
+ createdAt: string;
837
+ /**
838
+ * UUID of the badge (converted to lowercase)
839
+ */
840
+ loyaltyBadgeId: string;
841
+ /**
842
+ * UUID of the organization (converted to lowercase)
843
+ */
844
+ organizationId: string;
845
+ /**
846
+ * The status of the badge
847
+ */
848
+ status: 'active' | 'inactive' | 'revoked';
849
+ /**
850
+ * The date and time the user badge was updated
851
+ */
852
+ updatedAt: string;
853
+ /**
854
+ * UUID of the user (converted to lowercase)
855
+ */
856
+ userId: string;
857
+ /**
858
+ * UUID of the website (converted to lowercase)
859
+ */
860
+ websiteId: string;
861
+ /**
862
+ * Whether the user has dismissed the badge in the UI
863
+ */
864
+ dismissedInUi?: boolean;
865
+ /**
866
+ * Whether to hide this badge in the user interface
867
+ */
868
+ hideInUi?: boolean;
869
+ /**
870
+ * Array of progress for the badge
871
+ */
872
+ progress?: unknown;
873
+ /**
874
+ * User associated with the user badge
875
+ */
876
+ user?: LoyaltyBadgeUser.User;
877
+ }
878
+ namespace LoyaltyBadgeUser {
879
+ /**
880
+ * User associated with the user badge
881
+ */
882
+ interface User {
483
883
  /**
484
- * UUID of the association (converted to lowercase)
884
+ * UUID of the user (converted to lowercase)
485
885
  */
486
886
  id: string;
487
887
  /**
488
- * The name of the association
888
+ * Wallet address of the user
489
889
  */
490
- name: string;
890
+ walletAddress: string;
491
891
  }
492
892
  }
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;
893
+ interface LoyaltyRule {
894
+ /**
895
+ * UUID of the loyalty rule (converted to lowercase)
896
+ */
897
+ id: string;
898
+ /**
899
+ * The name of the loyalty rule
900
+ */
901
+ name: string;
902
+ }
523
903
  }
524
904
  }
525
905
  /**
@@ -530,6 +910,10 @@ export interface BadgeDeleteResponse {
530
910
  * UUID of the badge (converted to lowercase)
531
911
  */
532
912
  id: string;
913
+ /**
914
+ * The date and time the badge was created
915
+ */
916
+ createdAt: string;
533
917
  /**
534
918
  * The description of the badge
535
919
  */
@@ -546,10 +930,26 @@ export interface BadgeDeleteResponse {
546
930
  * The name of the badge
547
931
  */
548
932
  name: string;
933
+ /**
934
+ * The date and time the badge was updated
935
+ */
936
+ updatedAt: string;
937
+ /**
938
+ * Array of data jobs associated with the badge
939
+ */
940
+ dataJobs?: Array<BadgeDeleteResponse.DataJob>;
941
+ /**
942
+ * Whether to hide this badge in the user interface
943
+ */
944
+ hideInUi?: boolean;
549
945
  /**
550
946
  * Array of user badges
551
947
  */
552
- LoyaltyBadgeUser?: Array<BadgeDeleteResponse.LoyaltyBadgeUser>;
948
+ loyaltyBadgeUsers?: Array<BadgeDeleteResponse.LoyaltyBadgeUser>;
949
+ /**
950
+ * Array of loyalty rules associated with the badge
951
+ */
952
+ loyaltyRules?: Array<BadgeDeleteResponse.LoyaltyRule>;
553
953
  }
554
954
  export declare namespace BadgeDeleteResponse {
555
955
  /**
@@ -566,7 +966,7 @@ export declare namespace BadgeDeleteResponse {
566
966
  amount: number | null;
567
967
  association: Array<LoyaltyCondition.Association>;
568
968
  /**
569
- * The URL of the CSV file
969
+ * URL of the CSV file
570
970
  */
571
971
  csvUrl: string | null;
572
972
  /**
@@ -593,6 +993,10 @@ export declare namespace BadgeDeleteResponse {
593
993
  * The type of the condition
594
994
  */
595
995
  type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
996
+ /**
997
+ * Array of CSV files associated with the condition
998
+ */
999
+ csvFiles?: Array<LoyaltyCondition.CsvFile>;
596
1000
  }
597
1001
  namespace LoyaltyCondition {
598
1002
  interface Association {
@@ -654,12 +1058,56 @@ export declare namespace BadgeDeleteResponse {
654
1058
  name: string;
655
1059
  }
656
1060
  }
1061
+ interface CsvFile {
1062
+ /**
1063
+ * UUID of the CSV file (converted to lowercase)
1064
+ */
1065
+ id: string;
1066
+ /**
1067
+ * The description of the CSV file
1068
+ */
1069
+ description: string | null;
1070
+ /**
1071
+ * The name of the CSV file
1072
+ */
1073
+ name: string | null;
1074
+ /**
1075
+ * The URL of the CSV file
1076
+ */
1077
+ url: string | null;
1078
+ }
1079
+ }
1080
+ interface DataJob {
1081
+ /**
1082
+ * UUID of the data job (converted to lowercase)
1083
+ */
1084
+ id: string;
1085
+ /**
1086
+ * The date and time the data job was created
1087
+ */
1088
+ createdAt: string;
1089
+ /**
1090
+ * The status of the data job
1091
+ */
1092
+ status: 'pending' | 'processing' | 'complete' | 'failed' | 'cancelled';
1093
+ /**
1094
+ * The date and time the data job was updated
1095
+ */
1096
+ updatedAt: string;
1097
+ /**
1098
+ * The message associated with the data job
1099
+ */
1100
+ message?: string | null;
657
1101
  }
658
1102
  interface LoyaltyBadgeUser {
659
1103
  /**
660
1104
  * UUID of the user badge (converted to lowercase)
661
1105
  */
662
1106
  id: string;
1107
+ /**
1108
+ * The date and time the user badge was created
1109
+ */
1110
+ createdAt: string;
663
1111
  /**
664
1112
  * UUID of the badge (converted to lowercase)
665
1113
  */
@@ -672,6 +1120,10 @@ export declare namespace BadgeDeleteResponse {
672
1120
  * The status of the badge
673
1121
  */
674
1122
  status: 'active' | 'inactive' | 'revoked';
1123
+ /**
1124
+ * The date and time the user badge was updated
1125
+ */
1126
+ updatedAt: string;
675
1127
  /**
676
1128
  * UUID of the user (converted to lowercase)
677
1129
  */
@@ -680,10 +1132,47 @@ export declare namespace BadgeDeleteResponse {
680
1132
  * UUID of the website (converted to lowercase)
681
1133
  */
682
1134
  websiteId: string;
1135
+ /**
1136
+ * Whether the user has dismissed the badge in the UI
1137
+ */
1138
+ dismissedInUi?: boolean;
1139
+ /**
1140
+ * Whether to hide this badge in the user interface
1141
+ */
1142
+ hideInUi?: boolean;
683
1143
  /**
684
1144
  * Array of progress for the badge
685
1145
  */
686
1146
  progress?: unknown;
1147
+ /**
1148
+ * User associated with the user badge
1149
+ */
1150
+ user?: LoyaltyBadgeUser.User;
1151
+ }
1152
+ namespace LoyaltyBadgeUser {
1153
+ /**
1154
+ * User associated with the user badge
1155
+ */
1156
+ interface User {
1157
+ /**
1158
+ * UUID of the user (converted to lowercase)
1159
+ */
1160
+ id: string;
1161
+ /**
1162
+ * Wallet address of the user
1163
+ */
1164
+ walletAddress: string;
1165
+ }
1166
+ }
1167
+ interface LoyaltyRule {
1168
+ /**
1169
+ * UUID of the loyalty rule (converted to lowercase)
1170
+ */
1171
+ id: string;
1172
+ /**
1173
+ * The name of the loyalty rule
1174
+ */
1175
+ name: string;
687
1176
  }
688
1177
  }
689
1178
  /**
@@ -723,6 +1212,10 @@ export declare namespace BadgeRewardResponse {
723
1212
  }
724
1213
  }
725
1214
  export interface BadgeCreateParams {
1215
+ /**
1216
+ * Array of conditions for the badge
1217
+ */
1218
+ conditions: Array<BadgeCreateParams.Condition>;
726
1219
  /**
727
1220
  * The URL of the badge image
728
1221
  */
@@ -735,25 +1228,22 @@ export interface BadgeCreateParams {
735
1228
  * UUID of the organization (optional, converted to lowercase)
736
1229
  */
737
1230
  organizationId: string;
738
- /**
739
- * Array of rules for the badge
740
- */
741
- rules: Array<BadgeCreateParams.Rule>;
742
1231
  /**
743
1232
  * UUID of the website (optional, converted to lowercase)
744
1233
  */
745
1234
  websiteId: string;
1235
+ csvFiles?: Array<BadgeCreateParams.CsvFile>;
746
1236
  /**
747
1237
  * The description of the badge
748
1238
  */
749
1239
  description?: string;
1240
+ /**
1241
+ * Whether to hide this badge in the user interface
1242
+ */
1243
+ hideInUi?: boolean;
750
1244
  }
751
1245
  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';
1246
+ interface Condition {
757
1247
  /**
758
1248
  * The amount of the rule
759
1249
  */
@@ -781,7 +1271,7 @@ export declare namespace BadgeCreateParams {
781
1271
  /**
782
1272
  * UUID of the loyalty rule chain (optional, converted to lowercase)
783
1273
  */
784
- loyaltyRuleChainId?: string;
1274
+ loyaltyRuleChainId?: string | null;
785
1275
  /**
786
1276
  * Array of UUIDs of the rule group (optional, converted to lowercase)
787
1277
  */
@@ -798,13 +1288,27 @@ export declare namespace BadgeCreateParams {
798
1288
  * The number of rules that need to be fulfilled to satisfy the condition
799
1289
  */
800
1290
  requiredCount?: number | null;
1291
+ /**
1292
+ * The type of rule
1293
+ */
1294
+ type?: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
1295
+ }
1296
+ interface CsvFile {
1297
+ src: string;
1298
+ description?: string;
1299
+ name?: string;
801
1300
  }
802
1301
  }
803
1302
  export interface BadgeUpdateParams {
1303
+ csvFiles?: Array<BadgeUpdateParams.CsvFile>;
804
1304
  /**
805
1305
  * The description of the badge
806
1306
  */
807
1307
  description?: string;
1308
+ /**
1309
+ * Whether to hide this badge in the user interface
1310
+ */
1311
+ hideInUi?: boolean;
808
1312
  /**
809
1313
  * The URL of the badge image
810
1314
  */
@@ -814,11 +1318,18 @@ export interface BadgeUpdateParams {
814
1318
  */
815
1319
  name?: string;
816
1320
  }
1321
+ export declare namespace BadgeUpdateParams {
1322
+ interface CsvFile {
1323
+ src: string;
1324
+ description?: string;
1325
+ name?: string;
1326
+ }
1327
+ }
817
1328
  export interface BadgeListParams {
818
1329
  /**
819
1330
  * Array of badge IDs (converted to lowercase) to fetch
820
1331
  */
821
- badgeIds?: Array<string>;
1332
+ badgeIds?: string | Array<string>;
822
1333
  /**
823
1334
  * Include deleted badges in the response
824
1335
  */
@@ -836,15 +1347,31 @@ export interface BadgeListParams {
836
1347
  */
837
1348
  startingAfter?: string;
838
1349
  /**
839
- * UUID of the user (optional, converted to lowercase)
1350
+ * External identifier of the user group
840
1351
  */
841
- userId?: string;
1352
+ userGroupExternalIdentifier?: string;
1353
+ /**
1354
+ * UUID of the user group
1355
+ */
1356
+ userGroupId?: string;
1357
+ /**
1358
+ * UUID of the user, or array of UUID.
1359
+ */
1360
+ userId?: string | Array<string>;
1361
+ /**
1362
+ * Wallet Address of the user, or array of wallet addresses.
1363
+ */
1364
+ walletAddress?: string | Array<string>;
842
1365
  /**
843
1366
  * UUID of the website (optional, converted to lowercase)
844
1367
  */
845
1368
  websiteId?: string;
846
1369
  }
847
1370
  export interface BadgeRevokeParams {
1371
+ /**
1372
+ * Status of the badge
1373
+ */
1374
+ status?: 'active' | 'inactive' | 'revoked';
848
1375
  /**
849
1376
  * UUID of the user (converted to lowercase)
850
1377
  */
@@ -855,6 +1382,10 @@ export interface BadgeRevokeParams {
855
1382
  walletAddress?: string;
856
1383
  }
857
1384
  export interface BadgeRewardParams {
1385
+ /**
1386
+ * Status of the badge
1387
+ */
1388
+ status?: 'active' | 'inactive' | 'revoked';
858
1389
  /**
859
1390
  * UUID of the user (converted to lowercase)
860
1391
  */