@snagsolutions/sdk 0.1.0-alpha.13 → 0.1.0-alpha.14

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 (241) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +1 -1
  3. package/core.d.ts.map +1 -1
  4. package/core.js +12 -6
  5. package/core.js.map +1 -1
  6. package/core.mjs +12 -6
  7. package/core.mjs.map +1 -1
  8. package/index.d.mts +9 -9
  9. package/index.d.ts +9 -9
  10. package/index.d.ts.map +1 -1
  11. package/index.js +1 -1
  12. package/index.js.map +1 -1
  13. package/index.mjs +1 -1
  14. package/index.mjs.map +1 -1
  15. package/package.json +29 -8
  16. package/resources/assets/assets.d.ts +153 -0
  17. package/resources/assets/assets.d.ts.map +1 -0
  18. package/resources/assets/assets.js +69 -0
  19. package/resources/assets/assets.js.map +1 -0
  20. package/resources/assets/assets.mjs +42 -0
  21. package/resources/assets/assets.mjs.map +1 -0
  22. package/resources/assets/index.d.ts +7 -0
  23. package/resources/assets/index.d.ts.map +1 -0
  24. package/resources/assets/index.js +17 -0
  25. package/resources/assets/index.js.map +1 -0
  26. package/resources/assets/index.mjs +8 -0
  27. package/resources/assets/index.mjs.map +1 -0
  28. package/resources/assets/minting.d.ts +95 -0
  29. package/resources/assets/minting.d.ts.map +1 -0
  30. package/resources/assets/minting.js +15 -0
  31. package/resources/assets/minting.js.map +1 -0
  32. package/resources/assets/minting.mjs +11 -0
  33. package/resources/assets/minting.mjs.map +1 -0
  34. package/resources/assets/referral/index.d.ts +3 -0
  35. package/resources/assets/referral/index.d.ts.map +1 -0
  36. package/resources/assets/referral/index.js +9 -0
  37. package/resources/assets/referral/index.js.map +1 -0
  38. package/resources/assets/referral/index.mjs +4 -0
  39. package/resources/assets/referral/index.mjs.map +1 -0
  40. package/resources/assets/referral/referral.d.ts +30 -0
  41. package/resources/assets/referral/referral.d.ts.map +1 -0
  42. package/resources/assets/referral/referral.js +46 -0
  43. package/resources/assets/referral/referral.js.map +1 -0
  44. package/resources/assets/referral/referral.mjs +19 -0
  45. package/resources/assets/referral/referral.mjs.map +1 -0
  46. package/resources/assets/referral/users.d.ts +57 -0
  47. package/resources/assets/referral/users.d.ts.map +1 -0
  48. package/resources/assets/referral/users.js +21 -0
  49. package/resources/assets/referral/users.js.map +1 -0
  50. package/resources/assets/referral/users.mjs +17 -0
  51. package/resources/assets/referral/users.mjs.map +1 -0
  52. package/resources/assets/users.d.ts +285 -0
  53. package/resources/assets/users.d.ts.map +1 -0
  54. package/resources/assets/users.js +34 -0
  55. package/resources/assets/users.js.map +1 -0
  56. package/resources/assets/users.mjs +30 -0
  57. package/resources/assets/users.mjs.map +1 -0
  58. package/resources/assets/website-collections.d.ts +73 -0
  59. package/resources/assets/website-collections.d.ts.map +1 -0
  60. package/resources/assets/website-collections.js +25 -0
  61. package/resources/assets/website-collections.js.map +1 -0
  62. package/resources/assets/website-collections.mjs +21 -0
  63. package/resources/assets/website-collections.mjs.map +1 -0
  64. package/resources/assets/website-user-roles.d.ts +73 -0
  65. package/resources/assets/website-user-roles.d.ts.map +1 -0
  66. package/resources/assets/website-user-roles.js +22 -0
  67. package/resources/assets/website-user-roles.js.map +1 -0
  68. package/resources/assets/website-user-roles.mjs +18 -0
  69. package/resources/assets/website-user-roles.mjs.map +1 -0
  70. package/resources/auction-bids.d.ts +2 -32
  71. package/resources/auction-bids.d.ts.map +1 -1
  72. package/resources/auction-bids.js +0 -10
  73. package/resources/auction-bids.js.map +1 -1
  74. package/resources/auction-bids.mjs +0 -10
  75. package/resources/auction-bids.mjs.map +1 -1
  76. package/resources/drip/drip.d.ts +4 -4
  77. package/resources/drip/drip.d.ts.map +1 -1
  78. package/resources/drip/drip.js.map +1 -1
  79. package/resources/drip/drip.mjs.map +1 -1
  80. package/resources/drip/index.d.ts +2 -2
  81. package/resources/drip/index.d.ts.map +1 -1
  82. package/resources/drip/index.js.map +1 -1
  83. package/resources/drip/index.mjs.map +1 -1
  84. package/resources/drip/quests.d.ts +0 -164
  85. package/resources/drip/quests.d.ts.map +1 -1
  86. package/resources/drip/quests.js +0 -8
  87. package/resources/drip/quests.js.map +1 -1
  88. package/resources/drip/quests.mjs +0 -8
  89. package/resources/drip/quests.mjs.map +1 -1
  90. package/resources/drip/status.d.ts +0 -22
  91. package/resources/drip/status.d.ts.map +1 -1
  92. package/resources/drip/status.js +0 -7
  93. package/resources/drip/status.js.map +1 -1
  94. package/resources/drip/status.mjs +0 -7
  95. package/resources/drip/status.mjs.map +1 -1
  96. package/resources/index.d.ts +2 -2
  97. package/resources/index.d.ts.map +1 -1
  98. package/resources/index.js +1 -1
  99. package/resources/index.js.map +1 -1
  100. package/resources/index.mjs +1 -1
  101. package/resources/index.mjs.map +1 -1
  102. package/resources/loyalty/accounts.d.ts +0 -153
  103. package/resources/loyalty/accounts.d.ts.map +1 -1
  104. package/resources/loyalty/accounts.js +0 -7
  105. package/resources/loyalty/accounts.js.map +1 -1
  106. package/resources/loyalty/accounts.mjs +0 -7
  107. package/resources/loyalty/accounts.mjs.map +1 -1
  108. package/resources/loyalty/badges.d.ts +639 -72
  109. package/resources/loyalty/badges.d.ts.map +1 -1
  110. package/resources/loyalty/currencies.d.ts +1 -7
  111. package/resources/loyalty/currencies.d.ts.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 +2 -2
  115. package/resources/loyalty/index.js.map +1 -1
  116. package/resources/loyalty/index.mjs +1 -1
  117. package/resources/loyalty/index.mjs.map +1 -1
  118. package/resources/loyalty/loyalty.d.ts +7 -7
  119. package/resources/loyalty/loyalty.d.ts.map +1 -1
  120. package/resources/loyalty/loyalty.js +2 -2
  121. package/resources/loyalty/loyalty.js.map +1 -1
  122. package/resources/loyalty/loyalty.mjs +2 -2
  123. package/resources/loyalty/loyalty.mjs.map +1 -1
  124. package/resources/loyalty/multipliers.d.ts +29 -4
  125. package/resources/loyalty/multipliers.d.ts.map +1 -1
  126. package/resources/loyalty/multipliers.js +3 -3
  127. package/resources/loyalty/multipliers.js.map +1 -1
  128. package/resources/loyalty/multipliers.mjs +3 -3
  129. package/resources/loyalty/multipliers.mjs.map +1 -1
  130. package/resources/loyalty/rule-edits.d.ts +1 -1
  131. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  132. package/resources/loyalty/rule-edits.js +1 -1
  133. package/resources/loyalty/rule-edits.js.map +1 -1
  134. package/resources/loyalty/rule-edits.mjs +1 -1
  135. package/resources/loyalty/rule-edits.mjs.map +1 -1
  136. package/resources/loyalty/rules.d.ts +132 -71
  137. package/resources/loyalty/rules.d.ts.map +1 -1
  138. package/resources/loyalty/transaction-entries/accounts.d.ts +191 -0
  139. package/resources/loyalty/transaction-entries/accounts.d.ts.map +1 -0
  140. package/resources/loyalty/transaction-entries/accounts.js +24 -0
  141. package/resources/loyalty/transaction-entries/accounts.js.map +1 -0
  142. package/resources/loyalty/transaction-entries/accounts.mjs +20 -0
  143. package/resources/loyalty/transaction-entries/accounts.mjs.map +1 -0
  144. package/resources/loyalty/transaction-entries/index.d.ts +5 -0
  145. package/resources/loyalty/transaction-entries/index.d.ts.map +1 -0
  146. package/resources/loyalty/transaction-entries/index.js +13 -0
  147. package/resources/loyalty/transaction-entries/index.js.map +1 -0
  148. package/resources/loyalty/transaction-entries/index.mjs +6 -0
  149. package/resources/loyalty/transaction-entries/index.mjs.map +1 -0
  150. package/resources/loyalty/transaction-entries/questions-responses.d.ts +97 -0
  151. package/resources/loyalty/transaction-entries/questions-responses.d.ts.map +1 -0
  152. package/resources/loyalty/transaction-entries/questions-responses.js +22 -0
  153. package/resources/loyalty/transaction-entries/questions-responses.js.map +1 -0
  154. package/resources/loyalty/transaction-entries/questions-responses.mjs +18 -0
  155. package/resources/loyalty/transaction-entries/questions-responses.mjs.map +1 -0
  156. package/resources/loyalty/transaction-entries/questions.d.ts +150 -0
  157. package/resources/loyalty/transaction-entries/questions.d.ts.map +1 -0
  158. package/resources/loyalty/transaction-entries/questions.js +27 -0
  159. package/resources/loyalty/transaction-entries/questions.js.map +1 -0
  160. package/resources/loyalty/transaction-entries/questions.mjs +23 -0
  161. package/resources/loyalty/transaction-entries/questions.mjs.map +1 -0
  162. package/resources/loyalty/transaction-entries/transaction-entries.d.ts +300 -0
  163. package/resources/loyalty/transaction-entries/transaction-entries.d.ts.map +1 -0
  164. package/resources/loyalty/transaction-entries/transaction-entries.js +66 -0
  165. package/resources/loyalty/transaction-entries/transaction-entries.js.map +1 -0
  166. package/resources/loyalty/transaction-entries/transaction-entries.mjs +39 -0
  167. package/resources/loyalty/transaction-entries/transaction-entries.mjs.map +1 -0
  168. package/resources/users/index.d.ts +2 -2
  169. package/resources/users/index.d.ts.map +1 -1
  170. package/resources/users/index.js.map +1 -1
  171. package/resources/users/index.mjs +2 -2
  172. package/resources/users/index.mjs.map +1 -1
  173. package/resources/users/metadatas.d.ts +79 -11
  174. package/resources/users/metadatas.d.ts.map +1 -1
  175. package/resources/users/metadatas.js +6 -0
  176. package/resources/users/metadatas.js.map +1 -1
  177. package/resources/users/metadatas.mjs +6 -0
  178. package/resources/users/metadatas.mjs.map +1 -1
  179. package/resources/users/users.d.ts +4 -4
  180. package/resources/users/users.d.ts.map +1 -1
  181. package/resources/users/users.js.map +1 -1
  182. package/resources/users/users.mjs +2 -2
  183. package/resources/users/users.mjs.map +1 -1
  184. package/resources/users/wallets.d.ts +0 -189
  185. package/resources/users/wallets.d.ts.map +1 -1
  186. package/resources/users/wallets.js +0 -19
  187. package/resources/users/wallets.js.map +1 -1
  188. package/resources/users/wallets.mjs +0 -19
  189. package/resources/users/wallets.mjs.map +1 -1
  190. package/src/core.ts +14 -6
  191. package/src/index.ts +14 -12
  192. package/src/resources/assets/assets.ts +294 -0
  193. package/src/resources/assets/index.ts +38 -0
  194. package/src/resources/assets/minting.ts +153 -0
  195. package/src/resources/assets/referral/index.ts +14 -0
  196. package/src/resources/assets/referral/referral.ts +74 -0
  197. package/src/resources/assets/referral/users.ts +99 -0
  198. package/src/resources/assets/users.ts +415 -0
  199. package/src/resources/assets/website-collections.ts +147 -0
  200. package/src/resources/assets/website-user-roles.ts +107 -0
  201. package/src/resources/auction-bids.ts +2 -48
  202. package/src/resources/drip/drip.ts +4 -8
  203. package/src/resources/drip/index.ts +2 -2
  204. package/src/resources/drip/quests.ts +1 -206
  205. package/src/resources/drip/status.ts +1 -29
  206. package/src/resources/index.ts +7 -2
  207. package/src/resources/loyalty/accounts.ts +1 -195
  208. package/src/resources/loyalty/badges.ts +779 -77
  209. package/src/resources/loyalty/currencies.ts +1 -7
  210. package/src/resources/loyalty/index.ts +7 -2
  211. package/src/resources/loyalty/loyalty.ts +14 -8
  212. package/src/resources/loyalty/multipliers.ts +49 -4
  213. package/src/resources/loyalty/rule-edits.ts +2 -2
  214. package/src/resources/loyalty/rules.ts +247 -159
  215. package/src/resources/loyalty/transaction-entries/accounts.ts +251 -0
  216. package/src/resources/loyalty/transaction-entries/index.ts +34 -0
  217. package/src/resources/loyalty/transaction-entries/questions-responses.ts +146 -0
  218. package/src/resources/loyalty/transaction-entries/questions.ts +208 -0
  219. package/src/resources/loyalty/transaction-entries/transaction-entries.ts +525 -0
  220. package/src/resources/users/index.ts +8 -9
  221. package/src/resources/users/metadatas.ts +109 -10
  222. package/src/resources/users/users.ts +11 -17
  223. package/src/resources/users/wallets.ts +1 -267
  224. package/src/version.ts +1 -1
  225. package/version.d.ts +1 -1
  226. package/version.js +1 -1
  227. package/version.mjs +1 -1
  228. package/resources/assets.d.ts +0 -50
  229. package/resources/assets.d.ts.map +0 -1
  230. package/resources/assets.js +0 -17
  231. package/resources/assets.js.map +0 -1
  232. package/resources/assets.mjs +0 -13
  233. package/resources/assets.mjs.map +0 -1
  234. package/resources/loyalty/transaction-entries.d.ts +0 -175
  235. package/resources/loyalty/transaction-entries.d.ts.map +0 -1
  236. package/resources/loyalty/transaction-entries.js +0 -16
  237. package/resources/loyalty/transaction-entries.js.map +0 -1
  238. package/resources/loyalty/transaction-entries.mjs +0 -12
  239. package/resources/loyalty/transaction-entries.mjs.map +0 -1
  240. package/src/resources/assets.ts +0 -71
  241. package/src/resources/loyalty/transaction-entries.ts +0 -229
@@ -34,99 +34,657 @@ export declare class Badges extends APIResource {
34
34
  * Response returned upon successful creation of the badge.
35
35
  */
36
36
  export interface BadgeCreateResponse {
37
+ /**
38
+ * UUID of the badge (converted to lowercase)
39
+ */
37
40
  id: string;
41
+ /**
42
+ * The description of the badge
43
+ */
44
+ description: string | null;
45
+ /**
46
+ * The URL of the badge image
47
+ */
48
+ imageUrl: string | null;
49
+ /**
50
+ * Array of conditions of the badge
51
+ */
52
+ loyaltyConditions: Array<BadgeCreateResponse.LoyaltyCondition>;
53
+ /**
54
+ * The name of the badge
55
+ */
56
+ name: string;
57
+ /**
58
+ * Array of user badges
59
+ */
60
+ LoyaltyBadgeUser?: Array<BadgeCreateResponse.LoyaltyBadgeUser>;
61
+ }
62
+ export declare namespace BadgeCreateResponse {
63
+ /**
64
+ * Schema for a loyalty condition rule.
65
+ */
66
+ interface LoyaltyCondition {
67
+ /**
68
+ * UUID of the condition (converted to lowercase)
69
+ */
70
+ id: string;
71
+ /**
72
+ * The amount of the condition
73
+ */
74
+ amount: number | null;
75
+ association: Array<LoyaltyCondition.Association>;
76
+ /**
77
+ * The URL of the CSV file
78
+ */
79
+ csvUrl: string | null;
80
+ /**
81
+ * The description of the condition
82
+ */
83
+ description: string | null;
84
+ /**
85
+ * UUID of the currency (converted to lowercase)
86
+ */
87
+ loyaltyCurrencyId: string | null;
88
+ /**
89
+ * UUID of the rule group (converted to lowercase)
90
+ */
91
+ loyaltyRuleGroupId: string | null;
92
+ /**
93
+ * The repeat count of the condition
94
+ */
95
+ repeatCount: number | null;
96
+ /**
97
+ * The required count of the condition
98
+ */
99
+ requiredCount: number | null;
100
+ /**
101
+ * The type of the condition
102
+ */
103
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
104
+ }
105
+ namespace LoyaltyCondition {
106
+ interface Association {
107
+ loyaltyBadge: Association.LoyaltyBadge | null;
108
+ loyaltyCurrency: Association.LoyaltyCurrency | null;
109
+ loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
110
+ loyaltyRule: Association.LoyaltyRule | null;
111
+ loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
112
+ }
113
+ namespace Association {
114
+ interface LoyaltyBadge {
115
+ /**
116
+ * UUID of the association (converted to lowercase)
117
+ */
118
+ id: string;
119
+ /**
120
+ * The name of the association
121
+ */
122
+ name: string;
123
+ }
124
+ interface LoyaltyCurrency {
125
+ /**
126
+ * UUID of the association (converted to lowercase)
127
+ */
128
+ id: string;
129
+ /**
130
+ * The name of the association
131
+ */
132
+ name: string;
133
+ }
134
+ interface LoyaltyLeaderboardView {
135
+ /**
136
+ * UUID of the association (converted to lowercase)
137
+ */
138
+ id: string;
139
+ /**
140
+ * The name of the association
141
+ */
142
+ name: string;
143
+ }
144
+ interface LoyaltyRule {
145
+ /**
146
+ * UUID of the association (converted to lowercase)
147
+ */
148
+ id: string;
149
+ /**
150
+ * The name of the association
151
+ */
152
+ name: string;
153
+ }
154
+ interface LoyaltyRuleGroup {
155
+ /**
156
+ * UUID of the association (converted to lowercase)
157
+ */
158
+ id: string;
159
+ /**
160
+ * The name of the association
161
+ */
162
+ name: string;
163
+ }
164
+ }
165
+ }
166
+ interface LoyaltyBadgeUser {
167
+ /**
168
+ * UUID of the user badge (converted to lowercase)
169
+ */
170
+ id: string;
171
+ /**
172
+ * UUID of the badge (converted to lowercase)
173
+ */
174
+ loyaltyBadgeId: string;
175
+ /**
176
+ * UUID of the organization (converted to lowercase)
177
+ */
178
+ organizationId: string;
179
+ /**
180
+ * The status of the badge
181
+ */
182
+ status: 'active' | 'inactive' | 'revoked';
183
+ /**
184
+ * UUID of the user (converted to lowercase)
185
+ */
186
+ userId: string;
187
+ /**
188
+ * UUID of the website (converted to lowercase)
189
+ */
190
+ websiteId: string;
191
+ /**
192
+ * Array of progress for the badge
193
+ */
194
+ progress?: unknown;
195
+ }
38
196
  }
39
197
  /**
40
198
  * Response returned upon successful update of the badge.
41
199
  */
42
200
  export interface BadgeUpdateResponse {
201
+ /**
202
+ * UUID of the badge (converted to lowercase)
203
+ */
43
204
  id: string;
205
+ /**
206
+ * The description of the badge
207
+ */
208
+ description: string | null;
209
+ /**
210
+ * The URL of the badge image
211
+ */
212
+ imageUrl: string | null;
213
+ /**
214
+ * Array of conditions of the badge
215
+ */
216
+ loyaltyConditions: Array<BadgeUpdateResponse.LoyaltyCondition>;
217
+ /**
218
+ * The name of the badge
219
+ */
220
+ name: string;
221
+ /**
222
+ * Array of user badges
223
+ */
224
+ LoyaltyBadgeUser?: Array<BadgeUpdateResponse.LoyaltyBadgeUser>;
225
+ }
226
+ export declare namespace BadgeUpdateResponse {
227
+ /**
228
+ * Schema for a loyalty condition rule.
229
+ */
230
+ interface LoyaltyCondition {
231
+ /**
232
+ * UUID of the condition (converted to lowercase)
233
+ */
234
+ id: string;
235
+ /**
236
+ * The amount of the condition
237
+ */
238
+ amount: number | null;
239
+ association: Array<LoyaltyCondition.Association>;
240
+ /**
241
+ * The URL of the CSV file
242
+ */
243
+ csvUrl: string | null;
244
+ /**
245
+ * The description of the condition
246
+ */
247
+ description: string | null;
248
+ /**
249
+ * UUID of the currency (converted to lowercase)
250
+ */
251
+ loyaltyCurrencyId: string | null;
252
+ /**
253
+ * UUID of the rule group (converted to lowercase)
254
+ */
255
+ loyaltyRuleGroupId: string | null;
256
+ /**
257
+ * The repeat count of the condition
258
+ */
259
+ repeatCount: number | null;
260
+ /**
261
+ * The required count of the condition
262
+ */
263
+ requiredCount: number | null;
264
+ /**
265
+ * The type of the condition
266
+ */
267
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
268
+ }
269
+ namespace LoyaltyCondition {
270
+ interface Association {
271
+ loyaltyBadge: Association.LoyaltyBadge | null;
272
+ loyaltyCurrency: Association.LoyaltyCurrency | null;
273
+ loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
274
+ loyaltyRule: Association.LoyaltyRule | null;
275
+ loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
276
+ }
277
+ namespace Association {
278
+ interface LoyaltyBadge {
279
+ /**
280
+ * UUID of the association (converted to lowercase)
281
+ */
282
+ id: string;
283
+ /**
284
+ * The name of the association
285
+ */
286
+ name: string;
287
+ }
288
+ interface LoyaltyCurrency {
289
+ /**
290
+ * UUID of the association (converted to lowercase)
291
+ */
292
+ id: string;
293
+ /**
294
+ * The name of the association
295
+ */
296
+ name: string;
297
+ }
298
+ interface LoyaltyLeaderboardView {
299
+ /**
300
+ * UUID of the association (converted to lowercase)
301
+ */
302
+ id: string;
303
+ /**
304
+ * The name of the association
305
+ */
306
+ name: string;
307
+ }
308
+ interface LoyaltyRule {
309
+ /**
310
+ * UUID of the association (converted to lowercase)
311
+ */
312
+ id: string;
313
+ /**
314
+ * The name of the association
315
+ */
316
+ name: string;
317
+ }
318
+ interface LoyaltyRuleGroup {
319
+ /**
320
+ * UUID of the association (converted to lowercase)
321
+ */
322
+ id: string;
323
+ /**
324
+ * The name of the association
325
+ */
326
+ name: string;
327
+ }
328
+ }
329
+ }
330
+ interface LoyaltyBadgeUser {
331
+ /**
332
+ * UUID of the user badge (converted to lowercase)
333
+ */
334
+ id: string;
335
+ /**
336
+ * UUID of the badge (converted to lowercase)
337
+ */
338
+ loyaltyBadgeId: string;
339
+ /**
340
+ * UUID of the organization (converted to lowercase)
341
+ */
342
+ organizationId: string;
343
+ /**
344
+ * The status of the badge
345
+ */
346
+ status: 'active' | 'inactive' | 'revoked';
347
+ /**
348
+ * UUID of the user (converted to lowercase)
349
+ */
350
+ userId: string;
351
+ /**
352
+ * UUID of the website (converted to lowercase)
353
+ */
354
+ websiteId: string;
355
+ /**
356
+ * Array of progress for the badge
357
+ */
358
+ progress?: unknown;
359
+ }
44
360
  }
45
361
  /**
46
362
  * Response returned upon successful fetching of the badges.
47
363
  */
48
364
  export interface BadgeListResponse {
49
- badges: Array<BadgeListResponse.Badge>;
365
+ /**
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
387
+ */
388
+ LoyaltyBadgeUser?: Array<BadgeListResponse.LoyaltyBadgeUser>;
50
389
  }
51
390
  export declare namespace BadgeListResponse {
52
- interface Badge {
391
+ /**
392
+ * Schema for a loyalty condition rule.
393
+ */
394
+ interface LoyaltyCondition {
53
395
  /**
54
- * UUID of the badge (converted to lowercase)
396
+ * UUID of the condition (converted to lowercase)
55
397
  */
56
398
  id: string;
57
399
  /**
58
- * Count of rules and accounts with the badge
400
+ * The amount of the condition
59
401
  */
60
- _count: Badge._Count;
402
+ amount: number | null;
403
+ association: Array<LoyaltyCondition.Association>;
61
404
  /**
62
- * The URL of the badge image
405
+ * The URL of the CSV file
63
406
  */
64
- imageUrl: string;
407
+ csvUrl: string | null;
65
408
  /**
66
- * Array of rules for the badge
409
+ * The description of the condition
67
410
  */
68
- loyaltyConditions: Array<Badge.LoyaltyCondition>;
411
+ description: string | null;
69
412
  /**
70
- * The name of the badge
413
+ * UUID of the currency (converted to lowercase)
71
414
  */
72
- name: string;
415
+ loyaltyCurrencyId: string | null;
73
416
  /**
74
- * The description of the badge
417
+ * UUID of the rule group (converted to lowercase)
75
418
  */
76
- description?: string;
419
+ loyaltyRuleGroupId: string | null;
420
+ /**
421
+ * The repeat count of the condition
422
+ */
423
+ repeatCount: number | null;
424
+ /**
425
+ * The required count of the condition
426
+ */
427
+ requiredCount: number | null;
428
+ /**
429
+ * The type of the condition
430
+ */
431
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
77
432
  }
78
- namespace Badge {
79
- /**
80
- * Count of rules and accounts with the badge
81
- */
82
- interface _Count {
83
- /**
84
- * The number of accounts with the badge
85
- */
86
- LoyaltyBadgeUser: number;
87
- /**
88
- * The number of rules
89
- */
90
- loyaltyConditions: number;
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;
91
440
  }
92
- interface LoyaltyCondition {
93
- /**
94
- * UUID of the rule (converted to lowercase)
95
- */
96
- id: string;
97
- /**
98
- * The type of rule
99
- */
100
- type: 'rule' | 'section' | 'level' | 'points' | 'api' | 'badge';
101
- /**
102
- * The amount of the rule
103
- */
104
- amount?: number;
105
- /**
106
- * The description of the rule
107
- */
108
- description?: string;
109
- /**
110
- * UUID of the currency (optional, converted to lowercase)
111
- */
112
- loyaltyCurrencyId?: string;
113
- /**
114
- * UUID of the rule group (optional, converted to lowercase)
115
- */
116
- loyaltyRuleGroupId?: string;
117
- /**
118
- * UUID of the rule (optional, converted to lowercase)
119
- */
120
- loyaltyRuleId?: string;
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;
451
+ }
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;
461
+ }
462
+ interface LoyaltyLeaderboardView {
463
+ /**
464
+ * UUID of the association (converted to lowercase)
465
+ */
466
+ id: string;
467
+ /**
468
+ * The name of the association
469
+ */
470
+ name: string;
471
+ }
472
+ interface LoyaltyRule {
473
+ /**
474
+ * UUID of the association (converted to lowercase)
475
+ */
476
+ id: string;
477
+ /**
478
+ * The name of the association
479
+ */
480
+ name: string;
481
+ }
482
+ interface LoyaltyRuleGroup {
483
+ /**
484
+ * UUID of the association (converted to lowercase)
485
+ */
486
+ id: string;
487
+ /**
488
+ * The name of the association
489
+ */
490
+ name: string;
491
+ }
121
492
  }
122
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;
523
+ }
123
524
  }
124
525
  /**
125
526
  * Response returned upon successful deletion of the badge.
126
527
  */
127
528
  export interface BadgeDeleteResponse {
529
+ /**
530
+ * UUID of the badge (converted to lowercase)
531
+ */
128
532
  id: string;
129
- deletedAt: string;
533
+ /**
534
+ * The description of the badge
535
+ */
536
+ description: string | null;
537
+ /**
538
+ * The URL of the badge image
539
+ */
540
+ imageUrl: string | null;
541
+ /**
542
+ * Array of conditions of the badge
543
+ */
544
+ loyaltyConditions: Array<BadgeDeleteResponse.LoyaltyCondition>;
545
+ /**
546
+ * The name of the badge
547
+ */
548
+ name: string;
549
+ /**
550
+ * Array of user badges
551
+ */
552
+ LoyaltyBadgeUser?: Array<BadgeDeleteResponse.LoyaltyBadgeUser>;
553
+ }
554
+ export declare namespace BadgeDeleteResponse {
555
+ /**
556
+ * Schema for a loyalty condition rule.
557
+ */
558
+ interface LoyaltyCondition {
559
+ /**
560
+ * UUID of the condition (converted to lowercase)
561
+ */
562
+ id: string;
563
+ /**
564
+ * The amount of the condition
565
+ */
566
+ amount: number | null;
567
+ association: Array<LoyaltyCondition.Association>;
568
+ /**
569
+ * The URL of the CSV file
570
+ */
571
+ csvUrl: string | null;
572
+ /**
573
+ * The description of the condition
574
+ */
575
+ description: string | null;
576
+ /**
577
+ * UUID of the currency (converted to lowercase)
578
+ */
579
+ loyaltyCurrencyId: string | null;
580
+ /**
581
+ * UUID of the rule group (converted to lowercase)
582
+ */
583
+ loyaltyRuleGroupId: string | null;
584
+ /**
585
+ * The repeat count of the condition
586
+ */
587
+ repeatCount: number | null;
588
+ /**
589
+ * The required count of the condition
590
+ */
591
+ requiredCount: number | null;
592
+ /**
593
+ * The type of the condition
594
+ */
595
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
596
+ }
597
+ namespace LoyaltyCondition {
598
+ interface Association {
599
+ loyaltyBadge: Association.LoyaltyBadge | null;
600
+ loyaltyCurrency: Association.LoyaltyCurrency | null;
601
+ loyaltyLeaderboardView: Association.LoyaltyLeaderboardView | null;
602
+ loyaltyRule: Association.LoyaltyRule | null;
603
+ loyaltyRuleGroup: Association.LoyaltyRuleGroup | null;
604
+ }
605
+ namespace Association {
606
+ interface LoyaltyBadge {
607
+ /**
608
+ * UUID of the association (converted to lowercase)
609
+ */
610
+ id: string;
611
+ /**
612
+ * The name of the association
613
+ */
614
+ name: string;
615
+ }
616
+ interface LoyaltyCurrency {
617
+ /**
618
+ * UUID of the association (converted to lowercase)
619
+ */
620
+ id: string;
621
+ /**
622
+ * The name of the association
623
+ */
624
+ name: string;
625
+ }
626
+ interface LoyaltyLeaderboardView {
627
+ /**
628
+ * UUID of the association (converted to lowercase)
629
+ */
630
+ id: string;
631
+ /**
632
+ * The name of the association
633
+ */
634
+ name: string;
635
+ }
636
+ interface LoyaltyRule {
637
+ /**
638
+ * UUID of the association (converted to lowercase)
639
+ */
640
+ id: string;
641
+ /**
642
+ * The name of the association
643
+ */
644
+ name: string;
645
+ }
646
+ interface LoyaltyRuleGroup {
647
+ /**
648
+ * UUID of the association (converted to lowercase)
649
+ */
650
+ id: string;
651
+ /**
652
+ * The name of the association
653
+ */
654
+ name: string;
655
+ }
656
+ }
657
+ }
658
+ interface LoyaltyBadgeUser {
659
+ /**
660
+ * UUID of the user badge (converted to lowercase)
661
+ */
662
+ id: string;
663
+ /**
664
+ * UUID of the badge (converted to lowercase)
665
+ */
666
+ loyaltyBadgeId: string;
667
+ /**
668
+ * UUID of the organization (converted to lowercase)
669
+ */
670
+ organizationId: string;
671
+ /**
672
+ * The status of the badge
673
+ */
674
+ status: 'active' | 'inactive' | 'revoked';
675
+ /**
676
+ * UUID of the user (converted to lowercase)
677
+ */
678
+ userId: string;
679
+ /**
680
+ * UUID of the website (converted to lowercase)
681
+ */
682
+ websiteId: string;
683
+ /**
684
+ * Array of progress for the badge
685
+ */
686
+ progress?: unknown;
687
+ }
130
688
  }
131
689
  /**
132
690
  * Response returned upon successful update of the user badge
@@ -191,42 +749,51 @@ export interface BadgeCreateParams {
191
749
  description?: string;
192
750
  }
193
751
  export declare namespace BadgeCreateParams {
194
- /**
195
- * Schema for a loyalty condition rule.
196
- */
197
752
  interface Rule {
198
753
  /**
199
754
  * The type of rule
200
755
  */
201
- type: 'rule' | 'section' | 'level' | 'points' | 'api' | 'badge';
756
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
202
757
  /**
203
758
  * The amount of the rule
204
759
  */
205
760
  amount?: number | null;
761
+ /**
762
+ * URL of the CSV file (optional)
763
+ */
764
+ csvUrl?: string | null;
206
765
  /**
207
766
  * The description of the rule
208
767
  */
209
- description?: string;
768
+ description?: string | null;
769
+ /**
770
+ * Array of UUIDs of the badge (optional, converted to lowercase)
771
+ */
772
+ loyaltyBadgeIds?: Array<string>;
773
+ /**
774
+ * Array of UUIDs of the currency (optional, converted to lowercase)
775
+ */
776
+ loyaltyCurrencyIds?: Array<string>;
210
777
  /**
211
- * UUID of the badge (optional, converted to lowercase)
778
+ * Array of UUIDs of the Loyalty Leaderboard (optional, converted to lowercase)
212
779
  */
213
- loyaltyBadgeId?: string | null;
780
+ loyaltyLeaderboardViewIds?: Array<string>;
214
781
  /**
215
- * UUID of the currency (optional, converted to lowercase)
782
+ * Array of UUIDs of the rule group (optional, converted to lowercase)
216
783
  */
217
- loyaltyCurrencyId?: string | null;
784
+ loyaltyRuleGroupIds?: Array<string>;
218
785
  /**
219
- * UUID of the Loyalty Leaderboard (optional, converted to lowercase)
786
+ * Array of UUIDs of the rules (optional, converted to lowercase)
220
787
  */
221
- loyaltyLeaderboardViewId?: string | null;
788
+ loyaltyRuleIds?: Array<string>;
222
789
  /**
223
- * UUID of the rule group (optional, converted to lowercase)
790
+ * The number of times the rule should be repeated to fulfill the condition
224
791
  */
225
- loyaltyRuleGroupId?: string | null;
792
+ repeatCount?: number | null;
226
793
  /**
227
- * UUID of the rule (optional, converted to lowercase)
794
+ * The number of rules that need to be fulfilled to satisfy the condition
228
795
  */
229
- loyaltyRuleId?: string | null;
796
+ requiredCount?: number | null;
230
797
  }
231
798
  }
232
799
  export interface BadgeUpdateParams {
@@ -255,7 +822,7 @@ export interface BadgeListParams {
255
822
  /**
256
823
  * Number of badges to fetch
257
824
  */
258
- limit?: number | null;
825
+ limit?: number;
259
826
  /**
260
827
  * UUID of the organization (optional, converted to lowercase)
261
828
  */