@snagsolutions/sdk 0.1.0-alpha.16 → 0.1.0-alpha.161

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 (271) hide show
  1. package/CHANGELOG.md +1336 -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 +9 -6
  10. package/index.d.ts +9 -6
  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 +9 -5
  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 +285 -0
  28. package/resources/auctions/auctions.d.ts.map +1 -0
  29. package/resources/auctions/auctions.js +76 -0
  30. package/resources/auctions/auctions.js.map +1 -0
  31. package/resources/auctions/auctions.mjs +49 -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 +76 -0
  46. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  47. package/resources/auctions/website-user-attributes/values.js +35 -0
  48. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  49. package/resources/auctions/website-user-attributes/values.mjs +31 -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 +92 -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 +69 -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 +42 -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 +11 -3
  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 +3 -3
  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 +2 -2
  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 +58 -16
  86. package/resources/loyalty/accounts.d.ts.map +1 -1
  87. package/resources/loyalty/accounts.js +13 -0
  88. package/resources/loyalty/accounts.js.map +1 -1
  89. package/resources/loyalty/accounts.mjs +13 -0
  90. package/resources/loyalty/accounts.mjs.map +1 -1
  91. package/resources/loyalty/badges.d.ts +472 -22
  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 -3
  104. package/resources/loyalty/index.d.ts.map +1 -1
  105. package/resources/loyalty/index.js +5 -3
  106. package/resources/loyalty/index.js.map +1 -1
  107. package/resources/loyalty/index.mjs +2 -1
  108. package/resources/loyalty/index.mjs.map +1 -1
  109. package/resources/loyalty/loyalty.d.ts +10 -6
  110. package/resources/loyalty/loyalty.d.ts.map +1 -1
  111. package/resources/loyalty/loyalty.js +6 -2
  112. package/resources/loyalty/loyalty.js.map +1 -1
  113. package/resources/loyalty/loyalty.mjs +7 -3
  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 +39 -0
  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 +37 -2
  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 +2610 -4
  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 +269 -58
  140. package/resources/loyalty/rule-groups.d.ts.map +1 -1
  141. package/resources/loyalty/rule-groups.js +36 -0
  142. package/resources/loyalty/rule-groups.js.map +1 -1
  143. package/resources/loyalty/rule-groups.mjs +36 -0
  144. package/resources/loyalty/rule-groups.mjs.map +1 -1
  145. package/resources/loyalty/rules.d.ts +1848 -265
  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 +61 -0
  158. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  159. package/resources/loyalty/transactions/rule-statuses.js +23 -0
  160. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  161. package/resources/loyalty/transactions/rule-statuses.mjs +19 -0
  162. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  163. package/resources/loyalty/transactions/transactions.d.ts +292 -0
  164. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  165. package/resources/loyalty/transactions/transactions.js +61 -0
  166. package/resources/loyalty/transactions/transactions.js.map +1 -0
  167. package/resources/loyalty/transactions/transactions.mjs +34 -0
  168. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  169. package/resources/loyalty/transactions.d.ts +1 -247
  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 +28 -1
  184. package/resources/referral/users.d.ts.map +1 -1
  185. package/resources/referral/users.js +14 -0
  186. package/resources/referral/users.js.map +1 -1
  187. package/resources/referral/users.mjs +14 -0
  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 +27 -0
  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 +144 -6
  198. package/resources/users/users.d.ts.map +1 -1
  199. package/resources/users/users.js +53 -1
  200. package/resources/users/users.js.map +1 -1
  201. package/resources/users/users.mjs +53 -1
  202. package/resources/users/users.mjs.map +1 -1
  203. package/resources/websites/index.d.ts +2 -2
  204. package/resources/websites/index.d.ts.map +1 -1
  205. package/resources/websites/index.js.map +1 -1
  206. package/resources/websites/index.mjs +2 -2
  207. package/resources/websites/index.mjs.map +1 -1
  208. package/resources/websites/website-collections.d.ts +0 -69
  209. package/resources/websites/website-collections.d.ts.map +1 -1
  210. package/resources/websites/website-collections.js +0 -16
  211. package/resources/websites/website-collections.js.map +1 -1
  212. package/resources/websites/website-collections.mjs +0 -16
  213. package/resources/websites/website-collections.mjs.map +1 -1
  214. package/resources/websites/website-user-roles.d.ts +23 -0
  215. package/resources/websites/website-user-roles.d.ts.map +1 -1
  216. package/resources/websites/website-user-roles.js +23 -0
  217. package/resources/websites/website-user-roles.js.map +1 -1
  218. package/resources/websites/website-user-roles.mjs +23 -0
  219. package/resources/websites/website-user-roles.mjs.map +1 -1
  220. package/resources/websites/websites.d.ts +8 -98
  221. package/resources/websites/websites.d.ts.map +1 -1
  222. package/resources/websites/websites.js +0 -6
  223. package/resources/websites/websites.js.map +1 -1
  224. package/resources/websites/websites.mjs +1 -7
  225. package/resources/websites/websites.mjs.map +1 -1
  226. package/src/core.ts +39 -16
  227. package/src/index.ts +30 -11
  228. package/src/resource.ts +1 -1
  229. package/src/resources/assets.ts +18 -2
  230. package/src/resources/auctions/auctions.ts +432 -0
  231. package/src/resources/auctions/index.ts +16 -0
  232. package/src/resources/auctions/website-user-attributes/index.ts +10 -0
  233. package/src/resources/auctions/website-user-attributes/values.ts +97 -0
  234. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +137 -0
  235. package/src/resources/auctions/website-user-attributes.ts +3 -0
  236. package/src/resources/auctions.ts +1 -207
  237. package/src/resources/auth.ts +14 -4
  238. package/src/resources/index.ts +12 -8
  239. package/src/resources/loyalty/account-streaks.ts +110 -0
  240. package/src/resources/loyalty/accounts.ts +63 -18
  241. package/src/resources/loyalty/badges.ts +567 -24
  242. package/src/resources/loyalty/currencies.ts +19 -0
  243. package/src/resources/loyalty/index.ts +12 -1
  244. package/src/resources/loyalty/loyalty.ts +33 -3
  245. package/src/resources/loyalty/multipliers.ts +43 -4
  246. package/src/resources/loyalty/questions-responses.ts +45 -0
  247. package/src/resources/loyalty/questions.ts +38 -2
  248. package/src/resources/loyalty/rule-edits.ts +3669 -51
  249. package/src/resources/loyalty/rule-groups.ts +444 -65
  250. package/src/resources/loyalty/rules.ts +2769 -326
  251. package/src/resources/loyalty/transactions/index.ts +10 -0
  252. package/src/resources/loyalty/transactions/rule-statuses.ts +87 -0
  253. package/src/resources/loyalty/transactions/transactions.ts +520 -0
  254. package/src/resources/loyalty/transactions.ts +1 -330
  255. package/src/resources/minting.ts +19 -5
  256. package/src/resources/referral/referral.ts +13 -11
  257. package/src/resources/referral/users.ts +33 -2
  258. package/src/resources/users/index.ts +4 -0
  259. package/src/resources/users/metadatas.ts +52 -0
  260. package/src/resources/users/users.ts +192 -5
  261. package/src/resources/websites/index.ts +2 -13
  262. package/src/resources/websites/website-collections.ts +1 -145
  263. package/src/resources/websites/website-user-roles.ts +23 -0
  264. package/src/resources/websites/websites.ts +8 -134
  265. package/src/version.ts +1 -1
  266. package/version.d.ts +1 -1
  267. package/version.d.ts.map +1 -1
  268. package/version.js +1 -1
  269. package/version.js.map +1 -1
  270. package/version.mjs +1 -1
  271. package/version.mjs.map +1 -1
@@ -5,8 +5,49 @@ import { isRequestOptions } from '../../core';
5
5
  import * as Core from '../../core';
6
6
 
7
7
  export class RuleGroups extends APIResource {
8
+ /**
9
+ * Create a new loyalty rule groups
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const response =
14
+ * await client.loyalty.ruleGroups.createRuleGroup({
15
+ * name: 'name',
16
+ * organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
17
+ * websiteId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
18
+ * });
19
+ * ```
20
+ */
21
+ createRuleGroup(
22
+ body: RuleGroupCreateRuleGroupParams,
23
+ options?: Core.RequestOptions,
24
+ ): Core.APIPromise<RuleGroupCreateRuleGroupResponse> {
25
+ return this._client.post('/api/loyalty/rule_groups/create', { body, ...options });
26
+ }
27
+
28
+ /**
29
+ * Delete loyalty rule group by ID
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const response =
34
+ * await client.loyalty.ruleGroups.deleteRuleGroup(
35
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
36
+ * );
37
+ * ```
38
+ */
39
+ deleteRuleGroup(id: string, options?: Core.RequestOptions): Core.APIPromise<unknown> {
40
+ return this._client.delete(`/api/loyalty/rule_groups/${id}`, options);
41
+ }
42
+
8
43
  /**
9
44
  * Retrieve configured loyalty rule groups
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const response =
49
+ * await client.loyalty.ruleGroups.getRuleGroups();
50
+ * ```
10
51
  */
11
52
  getRuleGroups(
12
53
  query?: RuleGroupGetRuleGroupsParams,
@@ -22,8 +63,63 @@ export class RuleGroups extends APIResource {
22
63
  }
23
64
  return this._client.get('/api/loyalty/rule_groups', { query, ...options });
24
65
  }
66
+
67
+ /**
68
+ * Update loyalty rule group by ID
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * const response =
73
+ * await client.loyalty.ruleGroups.updateRuleGroup(
74
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
75
+ * );
76
+ * ```
77
+ */
78
+ updateRuleGroup(
79
+ id: string,
80
+ body?: RuleGroupUpdateRuleGroupParams,
81
+ options?: Core.RequestOptions,
82
+ ): Core.APIPromise<RuleGroupUpdateRuleGroupResponse>;
83
+ updateRuleGroup(
84
+ id: string,
85
+ options?: Core.RequestOptions,
86
+ ): Core.APIPromise<RuleGroupUpdateRuleGroupResponse>;
87
+ updateRuleGroup(
88
+ id: string,
89
+ body: RuleGroupUpdateRuleGroupParams | Core.RequestOptions = {},
90
+ options?: Core.RequestOptions,
91
+ ): Core.APIPromise<RuleGroupUpdateRuleGroupResponse> {
92
+ if (isRequestOptions(body)) {
93
+ return this.updateRuleGroup(id, {}, body);
94
+ }
95
+ return this._client.post(`/api/loyalty/rule_groups/${id}`, { body, ...options });
96
+ }
25
97
  }
26
98
 
99
+ export interface RuleGroupCreateRuleGroupResponse {
100
+ id: string;
101
+
102
+ createdAt: string;
103
+
104
+ isCollapsible: boolean;
105
+
106
+ isRequired: boolean;
107
+
108
+ name: string;
109
+
110
+ organizationId: string;
111
+
112
+ sortId: number;
113
+
114
+ subTitle: string | null;
115
+
116
+ updatedAt: string;
117
+
118
+ websiteId: string;
119
+ }
120
+
121
+ export type RuleGroupDeleteRuleGroupResponse = unknown;
122
+
27
123
  export interface RuleGroupGetRuleGroupsResponse {
28
124
  data: Array<RuleGroupGetRuleGroupsResponse.Data>;
29
125
 
@@ -77,6 +173,8 @@ export namespace RuleGroupGetRuleGroupsResponse {
77
173
 
78
174
  isRequired: boolean;
79
175
 
176
+ loyaltyBadge: LoyaltyRule.LoyaltyBadge;
177
+
80
178
  loyaltyCurrencyId: string;
81
179
 
82
180
  mediaUrl: string | null;
@@ -85,7 +183,7 @@ export namespace RuleGroupGetRuleGroupsResponse {
85
183
 
86
184
  name: string;
87
185
 
88
- rewardType: 'points' | 'multiplier';
186
+ rewardType: 'points' | 'multiplier' | 'badge';
89
187
 
90
188
  startTime: string | null;
91
189
 
@@ -142,11 +240,39 @@ export namespace RuleGroupGetRuleGroupsResponse {
142
240
  | 'twitter_like'
143
241
  | 'twitter_post_hashtag'
144
242
  | 'quiz'
145
- | 'poll';
243
+ | 'poll'
244
+ | 'steam_wishlist'
245
+ | 'liquidity_uniswap_v2'
246
+ | 'liquidity_uniswap_v3'
247
+ | 'points_airdrop'
248
+ | 'youtube_subscribers'
249
+ | 'youtube_comment'
250
+ | 'shopify_spend'
251
+ | 'swap'
252
+ | 'tiktok_post'
253
+ | 'post_impressions'
254
+ | 'discord_join'
255
+ | 'connected_youtube'
256
+ | 'connected_tiktok';
146
257
  }
147
258
 
148
259
  export namespace LoyaltyRule {
260
+ export interface LoyaltyBadge {
261
+ id: string;
262
+
263
+ description: string | null;
264
+
265
+ imageUrl: string | null;
266
+
267
+ name: string;
268
+ }
269
+
149
270
  export interface Metadata {
271
+ /**
272
+ * Number of tokens per batch.
273
+ */
274
+ batchSize?: number | null;
275
+
150
276
  /**
151
277
  * Text displayed on the action button.
152
278
  */
@@ -170,7 +296,7 @@ export namespace RuleGroupGetRuleGroupsResponse {
170
296
  /**
171
297
  * Text to check in the Twitter post, username, or bio.
172
298
  */
173
- checkText?: string | null;
299
+ checkText?: string | Array<string> | null;
174
300
 
175
301
  /**
176
302
  * Array of collections associated with the rule.
@@ -180,7 +306,12 @@ export namespace RuleGroupGetRuleGroupsResponse {
180
306
  /**
181
307
  * Conditions for completing the profile.
182
308
  */
183
- completeProfileConditions?: Record<string, boolean> | null;
309
+ completeProfileConditions?: { [key: string]: boolean } | null;
310
+
311
+ /**
312
+ * Description of the external rule condition (only for external rules)
313
+ */
314
+ conditionDescription?: string;
184
315
 
185
316
  /**
186
317
  * Object containing details for the call-to-action.
@@ -192,6 +323,11 @@ export namespace RuleGroupGetRuleGroupsResponse {
192
323
  */
193
324
  customRewardsApiKey?: string;
194
325
 
326
+ /**
327
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
328
+ */
329
+ directRpc?: boolean;
330
+
195
331
  /**
196
332
  * Array of Discord servers, channels, and roles to join.
197
333
  */
@@ -237,11 +373,6 @@ export namespace RuleGroupGetRuleGroupsResponse {
237
373
  */
238
374
  hasNeverSold?: boolean;
239
375
 
240
- /**
241
- * Flag indicating whether the order source is included.
242
- */
243
- hasOrderSource?: boolean;
244
-
245
376
  /**
246
377
  * Indicates if the full royalty has been paid for items.
247
378
  */
@@ -262,11 +393,21 @@ export namespace RuleGroupGetRuleGroupsResponse {
262
393
  */
263
394
  imageUrl?: string | null;
264
395
 
396
+ /**
397
+ * If enabled, the first transaction done on the platform will complete this rule
398
+ */
399
+ isCheckInOnEveryTxn?: boolean;
400
+
265
401
  /**
266
402
  * Indicates if the multiplier has been applied to rewards.
267
403
  */
268
404
  isMultiplierApplied?: boolean;
269
405
 
406
+ /**
407
+ * Flag indicating if the rule is restricted to new users.
408
+ */
409
+ isRestrictedToNewUsers?: boolean;
410
+
270
411
  /**
271
412
  * Flag indicating if rewards are applied retroactively.
272
413
  */
@@ -282,6 +423,11 @@ export namespace RuleGroupGetRuleGroupsResponse {
282
423
  */
283
424
  link?: string | null;
284
425
 
426
+ /**
427
+ * Liquidity pool details.
428
+ */
429
+ liquidity?: Metadata.Liquidity;
430
+
285
431
  /**
286
432
  * Maximum quantity constraint for token holding.
287
433
  */
@@ -323,14 +469,24 @@ export namespace RuleGroupGetRuleGroupsResponse {
323
469
  onlyRewardSingleTokenOwnership?: boolean | null;
324
470
 
325
471
  /**
326
- * Order source of the order for the token sale
472
+ * Promotional code associated with the rule.
327
473
  */
328
- orderSource?: string;
474
+ promoCode?: string;
329
475
 
330
476
  /**
331
- * Promotional code associated with the rule.
477
+ * URL of the CSV file containing promo codes.
332
478
  */
333
- promoCode?: string;
479
+ promoCodeCsvUrl?: string;
480
+
481
+ /**
482
+ * Numbers of the promotional code to be generated.
483
+ */
484
+ promoCodeLength?: number | null;
485
+
486
+ /**
487
+ * Type of the promotional code.
488
+ */
489
+ promoCodeType?: 'code' | 'csv' | 'generate';
334
490
 
335
491
  /**
336
492
  * Array defining ranges and corresponding rewards.
@@ -347,11 +503,62 @@ export namespace RuleGroupGetRuleGroupsResponse {
347
503
  */
348
504
  referrerReward?: number | null;
349
505
 
506
+ /**
507
+ * Loyalty currency ID of the referrer reward.
508
+ */
509
+ referrerRewardLoyaltyCurrencyId?: string | null;
510
+
511
+ /**
512
+ * Flag indicating if the post link is required.
513
+ */
514
+ requirePostLink?: boolean | null;
515
+
516
+ /**
517
+ * Flag indicating if media metadata is required.
518
+ */
519
+ requirePostMediaLink?: boolean | null;
520
+
521
+ /**
522
+ * Flag indicating if the rule can also reward badges per range.
523
+ */
524
+ rewardBadgePerRange?: boolean;
525
+
526
+ /**
527
+ * Flag indicating if the reward is rewarded by batch.
528
+ */
529
+ rewardByBatch?: boolean | null;
530
+
531
+ /**
532
+ * Criteria to evaluate the reward.
533
+ */
534
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
535
+
536
+ /**
537
+ * Flag indicating if the reward is rewarded per action.
538
+ */
539
+ rewardPerAction?: boolean | null;
540
+
350
541
  /**
351
542
  * Flag indicating if rewards are given per impression.
352
543
  */
353
544
  rewardPerImpression?: boolean | null;
354
545
 
546
+ /**
547
+ * Flag indicating if the rule should reward based on value of traded tokens
548
+ * instead of count.
549
+ */
550
+ rewardPerValue?: boolean;
551
+
552
+ /**
553
+ * Wallet address of the user can only be used if userId is not provided
554
+ */
555
+ royaltyAddress?: string;
556
+
557
+ /**
558
+ * Royalty percentage of the item.
559
+ */
560
+ royaltyPercentage?: number;
561
+
355
562
  /**
356
563
  * Currency associated with sales.
357
564
  */
@@ -391,6 +598,7 @@ export namespace RuleGroupGetRuleGroupsResponse {
391
598
  | 'Twitch'
392
599
  | 'X(Twitter)'
393
600
  | 'YouTube'
601
+ | 'Google'
394
602
  | null;
395
603
 
396
604
  /**
@@ -403,11 +611,21 @@ export namespace RuleGroupGetRuleGroupsResponse {
403
611
  */
404
612
  socialPlatformName?: string | null;
405
613
 
614
+ /**
615
+ * ID of the Steam app.
616
+ */
617
+ steamAppId?: string | null;
618
+
406
619
  /**
407
620
  * Array of streak milestones and corresponding rewards.
408
621
  */
409
622
  streakArray?: Array<Metadata.StreakArray> | null;
410
623
 
624
+ /**
625
+ * Metadata for swap loyalty rules
626
+ */
627
+ swap?: Metadata.Swap;
628
+
411
629
  /**
412
630
  * ID of the Telegram channel.
413
631
  */
@@ -423,6 +641,12 @@ export namespace RuleGroupGetRuleGroupsResponse {
423
641
  */
424
642
  trackAllContracts?: boolean | null;
425
643
 
644
+ /**
645
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
646
+ * completed once the progress is 100%.
647
+ */
648
+ trackProgress?: boolean | null;
649
+
426
650
  /**
427
651
  * URL of the associated Twitter account.
428
652
  */
@@ -466,7 +690,17 @@ export namespace RuleGroupGetRuleGroupsResponse {
466
690
  /**
467
691
  * Type of wallet associated with the rule.
468
692
  */
469
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
693
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | null;
694
+
695
+ /**
696
+ * ID of the Youtube channel.
697
+ */
698
+ youtubeChannelId?: string | null;
699
+
700
+ /**
701
+ * ID of the Youtube video.
702
+ */
703
+ youtubeVideoId?: string | null;
470
704
  }
471
705
 
472
706
  export namespace Metadata {
@@ -485,13 +719,17 @@ export namespace RuleGroupGetRuleGroupsResponse {
485
719
  * Blockchain network of the collection.
486
720
  */
487
721
  network?:
722
+ | 'abstract'
723
+ | 'abstractTestnet'
488
724
  | 'apechain'
489
725
  | 'arbitrum'
490
726
  | 'avalanche'
491
727
  | 'avalancheFuji'
492
728
  | 'base'
493
729
  | 'baseSepolia'
730
+ | 'berachain'
494
731
  | 'berachainArtio'
732
+ | 'berachainBepolia'
495
733
  | 'binance'
496
734
  | 'bscTestnet'
497
735
  | 'campTestnet'
@@ -499,18 +737,28 @@ export namespace RuleGroupGetRuleGroupsResponse {
499
737
  | 'fantomTestnet'
500
738
  | 'flowMainnet'
501
739
  | 'mainnet'
740
+ | 'nexusTestnet'
502
741
  | 'optimism'
503
742
  | 'polygon'
504
743
  | 'polygon_mumbai'
505
744
  | 'skaleNebula'
506
745
  | 'solana'
507
746
  | 'sophon'
747
+ | 'sophonTestnet'
508
748
  | 'sui'
509
749
  | 'superseed'
510
750
  | 'superseedSepolia'
511
751
  | 'vanar'
512
752
  | 'xai'
513
753
  | 'zksync'
754
+ | 'coti'
755
+ | 'cotiTestnet'
756
+ | 'morph'
757
+ | 'morphTestnet'
758
+ | 'morphHolesky'
759
+ | 'ultra'
760
+ | 'ultraTestnet'
761
+ | 'nitrograph'
514
762
  | 'sepolia'
515
763
  | 'optimism_sepolia'
516
764
  | 'arbitrumSepolia'
@@ -518,7 +766,7 @@ export namespace RuleGroupGetRuleGroupsResponse {
518
766
  | 'optimism_goerli'
519
767
  | 'arbitrumGoerli'
520
768
  | 'basecamp'
521
- | 'abstract';
769
+ | 'somnia';
522
770
  }
523
771
 
524
772
  /**
@@ -595,6 +843,105 @@ export namespace RuleGroupGetRuleGroupsResponse {
595
843
  id: string;
596
844
  }
597
845
 
846
+ /**
847
+ * Liquidity pool details.
848
+ */
849
+ export interface Liquidity {
850
+ /**
851
+ * Calculation type of the liquidity pool.
852
+ */
853
+ calculationType?: 'fixed' | 'custom';
854
+
855
+ /**
856
+ * Custom function to calculate the the reward amount based on the liquidity
857
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
858
+ * USD.
859
+ */
860
+ customFunction?: string;
861
+
862
+ /**
863
+ * Liquidity provided per day in USD
864
+ */
865
+ liquidityPerDay?: number;
866
+
867
+ /**
868
+ * Blockchain network of the liquidity pool.
869
+ */
870
+ network?:
871
+ | 'abstract'
872
+ | 'abstractTestnet'
873
+ | 'apechain'
874
+ | 'arbitrum'
875
+ | 'avalanche'
876
+ | 'avalancheFuji'
877
+ | 'base'
878
+ | 'baseSepolia'
879
+ | 'berachain'
880
+ | 'berachainArtio'
881
+ | 'berachainBepolia'
882
+ | 'binance'
883
+ | 'bscTestnet'
884
+ | 'campTestnet'
885
+ | 'fantom'
886
+ | 'fantomTestnet'
887
+ | 'flowMainnet'
888
+ | 'mainnet'
889
+ | 'nexusTestnet'
890
+ | 'optimism'
891
+ | 'polygon'
892
+ | 'polygon_mumbai'
893
+ | 'skaleNebula'
894
+ | 'solana'
895
+ | 'sophon'
896
+ | 'sophonTestnet'
897
+ | 'sui'
898
+ | 'superseed'
899
+ | 'superseedSepolia'
900
+ | 'vanar'
901
+ | 'xai'
902
+ | 'zksync'
903
+ | 'coti'
904
+ | 'cotiTestnet'
905
+ | 'morph'
906
+ | 'morphTestnet'
907
+ | 'morphHolesky'
908
+ | 'ultra'
909
+ | 'ultraTestnet'
910
+ | 'nitrograph'
911
+ | 'sepolia'
912
+ | 'optimism_sepolia'
913
+ | 'arbitrumSepolia'
914
+ | 'goerli'
915
+ | 'optimism_goerli'
916
+ | 'arbitrumGoerli'
917
+ | 'basecamp'
918
+ | 'somnia';
919
+
920
+ /**
921
+ * Indicates if only in-range liquidity is rewarded.
922
+ */
923
+ onlyRewardInRangeLiquidity?: boolean;
924
+
925
+ /**
926
+ * Array of liquidity pools associated with the rule.
927
+ */
928
+ pools?: Array<Liquidity.Pool>;
929
+
930
+ /**
931
+ * Protocol of the liquidity pool.
932
+ */
933
+ protocol?: string;
934
+ }
935
+
936
+ export namespace Liquidity {
937
+ export interface Pool {
938
+ /**
939
+ * Unique identifier of the liquidity pool.
940
+ */
941
+ id: string;
942
+ }
943
+ }
944
+
598
945
  export interface Range {
599
946
  /**
600
947
  * Reward amount for this range.
@@ -610,6 +957,16 @@ export namespace RuleGroupGetRuleGroupsResponse {
610
957
  * Start value of the range.
611
958
  */
612
959
  startRange: number;
960
+
961
+ /**
962
+ * ID of the loyalty badge for this range.
963
+ */
964
+ loyaltyBadgeId?: string;
965
+
966
+ /**
967
+ * Amount of the loyalty multiplier for this range.
968
+ */
969
+ loyaltyMultiplierAmount?: number;
613
970
  }
614
971
 
615
972
  /**
@@ -662,20 +1019,15 @@ export namespace RuleGroupGetRuleGroupsResponse {
662
1019
  * Object containing details of the associated smart contract.
663
1020
  */
664
1021
  export interface SmartContract {
665
- /**
666
- * ABI of the smart contract.
667
- */
668
- abi?: string | null;
669
-
670
1022
  /**
671
1023
  * Mapping of addresses for the smart contract.
672
1024
  */
673
1025
  addressMapping?: string | null;
674
1026
 
675
1027
  /**
676
- * Array of bonus details applied to the rule.
1028
+ * Object containing details of the amount multiplier from the event.
677
1029
  */
678
- bonus?: Array<SmartContract.Bonus> | null;
1030
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
679
1031
 
680
1032
  /**
681
1033
  * ID of the smart contract.
@@ -687,68 +1039,31 @@ export namespace RuleGroupGetRuleGroupsResponse {
687
1039
  */
688
1040
  criteria?: 'everyEvent' | 'byParameter' | null;
689
1041
 
690
- /**
691
- * Time range applied to the rule.
692
- */
693
- customRange?: SmartContract.CustomRange | null;
694
-
695
1042
  /**
696
1043
  * Event emitted by the smart contract.
697
1044
  */
698
1045
  event?: string | null;
699
1046
 
700
- /**
701
- * Maximum value allowed for the parameter.
702
- */
703
- max?: number | null;
704
-
705
1047
  /**
706
1048
  * Array of parameters for the smart contract.
707
1049
  */
708
1050
  params?: Array<SmartContract.Param> | null;
709
1051
 
710
1052
  /**
711
- * Flag indicating if a bonus is applied.
712
- */
713
- withBonus?: boolean | null;
714
-
715
- /**
716
- * Flag indicating if a custom range is applied.
1053
+ * Type of the smart contract interaction.
717
1054
  */
718
- withCustomRange?: boolean | null;
719
-
720
- /**
721
- * Flag indicating if a maximum limit is applied.
722
- */
723
- withMax?: boolean | null;
1055
+ type?: 'function' | 'event' | null;
724
1056
  }
725
1057
 
726
1058
  export namespace SmartContract {
727
- export interface Bonus {
728
- /**
729
- * Amount of the bonus.
730
- */
731
- amount?: number | null;
732
-
733
- /**
734
- * Number of times the bonus is applied.
735
- */
736
- count?: number | null;
737
- }
738
-
739
1059
  /**
740
- * Time range applied to the rule.
1060
+ * Object containing details of the amount multiplier from the event.
741
1061
  */
742
- export interface CustomRange {
1062
+ export interface AmountMultiplier {
743
1063
  /**
744
- * End time of the custom range.
1064
+ * Mapping of the value for the smart contract.
745
1065
  */
746
- endsAt?: string | null;
747
-
748
- /**
749
- * Start time of the custom range.
750
- */
751
- startsAt?: string | null;
1066
+ valueMapping?: string | null;
752
1067
  }
753
1068
 
754
1069
  export interface Param {
@@ -792,12 +1107,63 @@ export namespace RuleGroupGetRuleGroupsResponse {
792
1107
  */
793
1108
  streakMilestone: number;
794
1109
  }
1110
+
1111
+ /**
1112
+ * Metadata for swap loyalty rules
1113
+ */
1114
+ export interface Swap {
1115
+ provider?: 'any' | 'relay' | 'lifi';
1116
+
1117
+ relayReferrerId?: string;
1118
+
1119
+ requireCrossChainSwap?: boolean;
1120
+
1121
+ swappedToChain?: 'any' | number | string;
1122
+
1123
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1124
+
1125
+ tokenMode?: 'any' | 'specific';
1126
+
1127
+ trackTokenAmount?: boolean;
1128
+ }
1129
+
1130
+ export namespace Swap {
1131
+ export interface SwappedToToken {
1132
+ address: string;
1133
+
1134
+ chainId: string;
1135
+ }
1136
+ }
795
1137
  }
796
1138
  }
797
1139
  }
798
1140
  }
799
1141
  }
800
1142
 
1143
+ export interface RuleGroupUpdateRuleGroupResponse {
1144
+ isCollapsible?: boolean;
1145
+
1146
+ name?: string;
1147
+
1148
+ subTitle?: string;
1149
+ }
1150
+
1151
+ export interface RuleGroupCreateRuleGroupParams {
1152
+ name: string;
1153
+
1154
+ organizationId: string;
1155
+
1156
+ websiteId: string;
1157
+
1158
+ isCollapsible?: boolean;
1159
+
1160
+ isRequired?: boolean;
1161
+
1162
+ sortId?: number;
1163
+
1164
+ subTitle?: string;
1165
+ }
1166
+
801
1167
  export interface RuleGroupGetRuleGroupsParams {
802
1168
  excludeHidden?: string;
803
1169
 
@@ -810,9 +1176,22 @@ export interface RuleGroupGetRuleGroupsParams {
810
1176
  websiteId?: string;
811
1177
  }
812
1178
 
1179
+ export interface RuleGroupUpdateRuleGroupParams {
1180
+ isCollapsible?: boolean;
1181
+
1182
+ name?: string | null;
1183
+
1184
+ subtitle?: string | null;
1185
+ }
1186
+
813
1187
  export declare namespace RuleGroups {
814
1188
  export {
1189
+ type RuleGroupCreateRuleGroupResponse as RuleGroupCreateRuleGroupResponse,
1190
+ type RuleGroupDeleteRuleGroupResponse as RuleGroupDeleteRuleGroupResponse,
815
1191
  type RuleGroupGetRuleGroupsResponse as RuleGroupGetRuleGroupsResponse,
1192
+ type RuleGroupUpdateRuleGroupResponse as RuleGroupUpdateRuleGroupResponse,
1193
+ type RuleGroupCreateRuleGroupParams as RuleGroupCreateRuleGroupParams,
816
1194
  type RuleGroupGetRuleGroupsParams as RuleGroupGetRuleGroupsParams,
1195
+ type RuleGroupUpdateRuleGroupParams as RuleGroupUpdateRuleGroupParams,
817
1196
  };
818
1197
  }