@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
@@ -7,6 +7,24 @@ import * as Core from '../../core';
7
7
  export class Rules extends APIResource {
8
8
  /**
9
9
  * Create a new Loyalty Rule
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const rule = await client.loyalty.rules.create({
14
+ * amount: '10.5',
15
+ * effectiveEndTime: '2024-12-31T23:59:00Z',
16
+ * effectiveStartTime: '2024-01-01T00:00:00Z',
17
+ * endTime: '2024-12-31T23:59:00Z',
18
+ * frequency: 'daily',
19
+ * loyaltyCurrencyId: '456e1234-e89b-12d3-a456-426614174003',
20
+ * metadata: {},
21
+ * name: 'Referral Bonus Rule',
22
+ * organizationId: '123e4567-e89b-12d3-a456-426614174001',
23
+ * startTime: '2024-01-01T00:00:00Z',
24
+ * type: 'Bonus',
25
+ * websiteId: '123e4567-e89b-12d3-a456-426614174002',
26
+ * });
27
+ * ```
10
28
  */
11
29
  create(body: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse> {
12
30
  return this._client.post('/api/loyalty/rules', { body, ...options });
@@ -14,6 +32,18 @@ export class Rules extends APIResource {
14
32
 
15
33
  /**
16
34
  * Update an existing Loyalty Rule
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const rule = await client.loyalty.rules.update(
39
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
40
+ * {
41
+ * amount: '10.5',
42
+ * endTime: '2024-12-31T23:59:00Z',
43
+ * name: 'Daily Rewards Program',
44
+ * },
45
+ * );
46
+ * ```
17
47
  */
18
48
  update(
19
49
  id: string,
@@ -25,6 +55,11 @@ export class Rules extends APIResource {
25
55
 
26
56
  /**
27
57
  * Retrieve configured loyalty rules with optional pagination and filters
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const rules = await client.loyalty.rules.list();
62
+ * ```
28
63
  */
29
64
  list(query?: RuleListParams, options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
30
65
  list(options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
@@ -40,9 +75,30 @@ export class Rules extends APIResource {
40
75
 
41
76
  /**
42
77
  * Delete an existing Loyalty Rule
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * const rule = await client.loyalty.rules.delete(
82
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
83
+ * );
84
+ * ```
43
85
  */
44
- delete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse> {
45
- return this._client.delete(`/api/loyalty/rules/${id}`, options);
86
+ delete(
87
+ id: string,
88
+ params?: RuleDeleteParams,
89
+ options?: Core.RequestOptions,
90
+ ): Core.APIPromise<RuleDeleteResponse>;
91
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse>;
92
+ delete(
93
+ id: string,
94
+ params: RuleDeleteParams | Core.RequestOptions = {},
95
+ options?: Core.RequestOptions,
96
+ ): Core.APIPromise<RuleDeleteResponse> {
97
+ if (isRequestOptions(params)) {
98
+ return this.delete(id, {}, params);
99
+ }
100
+ const { debitLoyaltyPoints } = params;
101
+ return this._client.delete(`/api/loyalty/rules/${id}`, { query: { debitLoyaltyPoints }, ...options });
46
102
  }
47
103
 
48
104
  /**
@@ -50,7 +106,15 @@ export class Rules extends APIResource {
50
106
  * endpoint currently only supports following rule types code_entry, text_input,
51
107
  * link_click, discord_member, connect_wallet, check_in, external_rule,
52
108
  * drip_x_follow, drip_x_new_tweet, drip_x_text_in_bio, drip_x_text_in_name,
53
- * drip_x_text_in_comment, drip_x_tweet, telegram_join, DiscordMessages
109
+ * drip_x_text_in_comment, drip_x_tweet, telegram_join, DiscordMessages,
110
+ * youtube_subscribers, youtube_comment, steam_wishlist
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * const response = await client.loyalty.rules.complete(
115
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
116
+ * );
117
+ * ```
54
118
  */
55
119
  complete(
56
120
  id: string,
@@ -70,12 +134,26 @@ export class Rules extends APIResource {
70
134
  }
71
135
 
72
136
  /**
73
- * This will return the processing status of quests for a specific user
137
+ * This will return the processing status of quests for a specific user and also
138
+ * the progress of the loyalty rule
139
+ *
140
+ * @example
141
+ * ```ts
142
+ * const response = await client.loyalty.rules.getStatus();
143
+ * ```
74
144
  */
75
145
  getStatus(
76
- query: RuleGetStatusParams,
146
+ query?: RuleGetStatusParams,
147
+ options?: Core.RequestOptions,
148
+ ): Core.APIPromise<RuleGetStatusResponse>;
149
+ getStatus(options?: Core.RequestOptions): Core.APIPromise<RuleGetStatusResponse>;
150
+ getStatus(
151
+ query: RuleGetStatusParams | Core.RequestOptions = {},
77
152
  options?: Core.RequestOptions,
78
153
  ): Core.APIPromise<RuleGetStatusResponse> {
154
+ if (isRequestOptions(query)) {
155
+ return this.getStatus({}, query);
156
+ }
79
157
  return this._client.get('/api/loyalty/rules/status', { query, ...options });
80
158
  }
81
159
  }
@@ -189,7 +267,22 @@ export interface RuleCreateResponse {
189
267
  | 'twitter_like'
190
268
  | 'twitter_post_hashtag'
191
269
  | 'quiz'
192
- | 'poll';
270
+ | 'poll'
271
+ | 'steam_wishlist'
272
+ | 'liquidity_uniswap_v2'
273
+ | 'liquidity_uniswap_v3'
274
+ | 'points_airdrop'
275
+ | 'youtube_subscribers'
276
+ | 'youtube_comment'
277
+ | 'shopify_spend'
278
+ | 'swap'
279
+ | 'tiktok_post'
280
+ | 'post_impressions'
281
+ | 'discord_join'
282
+ | 'connected_youtube'
283
+ | 'stratus_function'
284
+ | 'connected_tiktok'
285
+ | 'tiktok_follow';
193
286
 
194
287
  /**
195
288
  * Unique identifier for the associated website
@@ -201,6 +294,11 @@ export interface RuleCreateResponse {
201
294
  */
202
295
  backgroundAssetUrl?: string;
203
296
 
297
+ /**
298
+ * The type of claim for the reward
299
+ */
300
+ claimType?: 'manual' | 'auto' | null;
301
+
204
302
  /**
205
303
  * Blockchain address of the associated collection
206
304
  */
@@ -226,6 +324,18 @@ export interface RuleCreateResponse {
226
324
  */
227
325
  description?: string;
228
326
 
327
+ duplicatedFromId?: string | null;
328
+
329
+ /**
330
+ * ID of the external integration
331
+ */
332
+ externalIntegrationId?: string | null;
333
+
334
+ /**
335
+ * Optional stratus function id for the rule
336
+ */
337
+ functionId?: string | null;
338
+
229
339
  /**
230
340
  * Whether to hide this rule in the user interface
231
341
  */
@@ -234,18 +344,40 @@ export interface RuleCreateResponse {
234
344
  /**
235
345
  * Interval between rule executions
236
346
  */
237
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
347
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
238
348
 
239
349
  /**
240
350
  * Whether this rule is mandatory
241
351
  */
242
352
  isRequired?: boolean;
243
353
 
354
+ /**
355
+ * Unique identifier for the loyalty badge
356
+ */
357
+ loyaltyBadgeId?: string | null;
358
+
244
359
  /**
245
360
  * Unique identifier for the loyalty rule group
246
361
  */
247
362
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
248
363
 
364
+ /**
365
+ * URL for uploading loyalty user allotment via CSV
366
+ */
367
+ loyaltyUserAllotmentCsvUrl?: string;
368
+
369
+ /**
370
+ * The interval for the max amount. Available for the smart contract and external
371
+ * rules.
372
+ */
373
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
374
+
375
+ /**
376
+ * The maximum amount of points a user can earn per interval. Available for the
377
+ * smart contract and external rules.
378
+ */
379
+ maxAmountPerInterval?: number | null;
380
+
249
381
  /**
250
382
  * URL of the media to be displayed
251
383
  */
@@ -255,13 +387,17 @@ export interface RuleCreateResponse {
255
387
  * Blockchain network where the rule will apply
256
388
  */
257
389
  network?:
390
+ | 'abstract'
391
+ | 'abstractTestnet'
258
392
  | 'apechain'
259
393
  | 'arbitrum'
260
394
  | 'avalanche'
261
395
  | 'avalancheFuji'
262
396
  | 'base'
263
397
  | 'baseSepolia'
398
+ | 'berachain'
264
399
  | 'berachainArtio'
400
+ | 'berachainBepolia'
265
401
  | 'binance'
266
402
  | 'bscTestnet'
267
403
  | 'campTestnet'
@@ -269,18 +405,30 @@ export interface RuleCreateResponse {
269
405
  | 'fantomTestnet'
270
406
  | 'flowMainnet'
271
407
  | 'mainnet'
408
+ | 'nexusTestnet'
272
409
  | 'optimism'
273
410
  | 'polygon'
274
411
  | 'polygon_mumbai'
275
412
  | 'skaleNebula'
413
+ | 'skaleEuropa'
414
+ | 'skaleCalypso'
276
415
  | 'solana'
277
416
  | 'sophon'
417
+ | 'sophonTestnet'
278
418
  | 'sui'
279
419
  | 'superseed'
280
420
  | 'superseedSepolia'
281
421
  | 'vanar'
282
422
  | 'xai'
283
423
  | 'zksync'
424
+ | 'coti'
425
+ | 'cotiTestnet'
426
+ | 'morph'
427
+ | 'morphTestnet'
428
+ | 'morphHolesky'
429
+ | 'ultra'
430
+ | 'ultraTestnet'
431
+ | 'nitrograph'
284
432
  | 'sepolia'
285
433
  | 'optimism_sepolia'
286
434
  | 'arbitrumSepolia'
@@ -288,22 +436,40 @@ export interface RuleCreateResponse {
288
436
  | 'optimism_goerli'
289
437
  | 'arbitrumGoerli'
290
438
  | 'basecamp'
291
- | 'abstract';
439
+ | 'somnia'
440
+ | 'polkadot'
441
+ | 'kusama'
442
+ | 'flow_cadence';
292
443
 
293
444
  /**
294
445
  * OAuth credentials associated with the rule
295
446
  */
296
447
  oauthCredentialsId?: string | null;
297
448
 
449
+ /**
450
+ * The lifetime of the reward
451
+ */
452
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
453
+
298
454
  /**
299
455
  * Type of reward issued by the rule
300
456
  */
301
- rewardType?: 'points' | 'multiplier';
457
+ rewardType?: 'points' | 'multiplier' | 'badge';
458
+
459
+ /**
460
+ * URL of the Shopify store
461
+ */
462
+ shopifyStoreUrl?: string | null;
463
+
464
+ /**
465
+ * Whether to show this rule before the start time
466
+ */
467
+ showBeforeStart?: boolean;
302
468
 
303
469
  /**
304
- * Identifier for associated subscriptions
470
+ * Optional stratus subscription id for the rule
305
471
  */
306
- subscriptionIdentifier?: string | null;
472
+ subscriptionId?: string | null;
307
473
  }
308
474
 
309
475
  export namespace RuleCreateResponse {
@@ -311,6 +477,11 @@ export namespace RuleCreateResponse {
311
477
  * Additional metadata for the loyalty rule
312
478
  */
313
479
  export interface Metadata {
480
+ /**
481
+ * Number of tokens per batch.
482
+ */
483
+ batchSize?: number | null;
484
+
314
485
  /**
315
486
  * Text displayed on the action button.
316
487
  */
@@ -334,7 +505,7 @@ export namespace RuleCreateResponse {
334
505
  /**
335
506
  * Text to check in the Twitter post, username, or bio.
336
507
  */
337
- checkText?: string | null;
508
+ checkText?: string | Array<string> | null;
338
509
 
339
510
  /**
340
511
  * Array of collections associated with the rule.
@@ -344,7 +515,12 @@ export namespace RuleCreateResponse {
344
515
  /**
345
516
  * Conditions for completing the profile.
346
517
  */
347
- completeProfileConditions?: Record<string, boolean> | null;
518
+ completeProfileConditions?: { [key: string]: boolean } | null;
519
+
520
+ /**
521
+ * Description of the external rule condition (only for external rules)
522
+ */
523
+ conditionDescription?: string;
348
524
 
349
525
  /**
350
526
  * Object containing details for the call-to-action.
@@ -356,6 +532,11 @@ export namespace RuleCreateResponse {
356
532
  */
357
533
  customRewardsApiKey?: string;
358
534
 
535
+ /**
536
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
537
+ */
538
+ directRpc?: boolean;
539
+
359
540
  /**
360
541
  * Array of Discord servers, channels, and roles to join.
361
542
  */
@@ -381,6 +562,11 @@ export namespace RuleCreateResponse {
381
562
  */
382
563
  enableVerifiedMultiplier?: boolean;
383
564
 
565
+ /**
566
+ * Type of ERC20 token for the loyalty rule.
567
+ */
568
+ erc20Type?: 'erc20' | 'native';
569
+
384
570
  /**
385
571
  * Fill source of the order for the token sale
386
572
  */
@@ -401,11 +587,6 @@ export namespace RuleCreateResponse {
401
587
  */
402
588
  hasNeverSold?: boolean;
403
589
 
404
- /**
405
- * Flag indicating whether the order source is included.
406
- */
407
- hasOrderSource?: boolean;
408
-
409
590
  /**
410
591
  * Indicates if the full royalty has been paid for items.
411
592
  */
@@ -426,11 +607,21 @@ export namespace RuleCreateResponse {
426
607
  */
427
608
  imageUrl?: string | null;
428
609
 
610
+ /**
611
+ * If enabled, the first transaction done on the platform will complete this rule
612
+ */
613
+ isCheckInOnEveryTxn?: boolean;
614
+
429
615
  /**
430
616
  * Indicates if the multiplier has been applied to rewards.
431
617
  */
432
618
  isMultiplierApplied?: boolean;
433
619
 
620
+ /**
621
+ * Flag indicating if the rule is restricted to new users.
622
+ */
623
+ isRestrictedToNewUsers?: boolean;
624
+
434
625
  /**
435
626
  * Flag indicating if rewards are applied retroactively.
436
627
  */
@@ -446,6 +637,11 @@ export namespace RuleCreateResponse {
446
637
  */
447
638
  link?: string | null;
448
639
 
640
+ /**
641
+ * Liquidity pool details.
642
+ */
643
+ liquidity?: Metadata.Liquidity;
644
+
449
645
  /**
450
646
  * Maximum quantity constraint for token holding.
451
647
  */
@@ -487,14 +683,24 @@ export namespace RuleCreateResponse {
487
683
  onlyRewardSingleTokenOwnership?: boolean | null;
488
684
 
489
685
  /**
490
- * Order source of the order for the token sale
686
+ * Promotional code associated with the rule.
491
687
  */
492
- orderSource?: string;
688
+ promoCode?: string;
493
689
 
494
690
  /**
495
- * Promotional code associated with the rule.
691
+ * URL of the CSV file containing promo codes.
496
692
  */
497
- promoCode?: string;
693
+ promoCodeCsvUrl?: string;
694
+
695
+ /**
696
+ * Numbers of the promotional code to be generated.
697
+ */
698
+ promoCodeLength?: number | null;
699
+
700
+ /**
701
+ * Type of the promotional code.
702
+ */
703
+ promoCodeType?: 'code' | 'csv' | 'generate';
498
704
 
499
705
  /**
500
706
  * Array defining ranges and corresponding rewards.
@@ -511,11 +717,62 @@ export namespace RuleCreateResponse {
511
717
  */
512
718
  referrerReward?: number | null;
513
719
 
720
+ /**
721
+ * Loyalty currency ID of the referrer reward.
722
+ */
723
+ referrerRewardLoyaltyCurrencyId?: string | null;
724
+
725
+ /**
726
+ * Flag indicating if the post link is required.
727
+ */
728
+ requirePostLink?: boolean | null;
729
+
730
+ /**
731
+ * Flag indicating if media metadata is required.
732
+ */
733
+ requirePostMediaLink?: boolean | null;
734
+
735
+ /**
736
+ * Flag indicating if the rule can also reward badges per range.
737
+ */
738
+ rewardBadgePerRange?: boolean;
739
+
740
+ /**
741
+ * Flag indicating if the reward is rewarded by batch.
742
+ */
743
+ rewardByBatch?: boolean | null;
744
+
745
+ /**
746
+ * Criteria to evaluate the reward.
747
+ */
748
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
749
+
750
+ /**
751
+ * Flag indicating if the reward is rewarded per action.
752
+ */
753
+ rewardPerAction?: boolean | null;
754
+
514
755
  /**
515
756
  * Flag indicating if rewards are given per impression.
516
757
  */
517
758
  rewardPerImpression?: boolean | null;
518
759
 
760
+ /**
761
+ * Flag indicating if the rule should reward based on value of traded tokens
762
+ * instead of count.
763
+ */
764
+ rewardPerValue?: boolean;
765
+
766
+ /**
767
+ * Wallet address of the user can only be used if userId is not provided
768
+ */
769
+ royaltyAddress?: string;
770
+
771
+ /**
772
+ * Royalty percentage of the item.
773
+ */
774
+ royaltyPercentage?: number;
775
+
519
776
  /**
520
777
  * Currency associated with sales.
521
778
  */
@@ -555,6 +812,7 @@ export namespace RuleCreateResponse {
555
812
  | 'Twitch'
556
813
  | 'X(Twitter)'
557
814
  | 'YouTube'
815
+ | 'Google'
558
816
  | null;
559
817
 
560
818
  /**
@@ -567,11 +825,21 @@ export namespace RuleCreateResponse {
567
825
  */
568
826
  socialPlatformName?: string | null;
569
827
 
828
+ /**
829
+ * ID of the Steam app.
830
+ */
831
+ steamAppId?: string | null;
832
+
570
833
  /**
571
834
  * Array of streak milestones and corresponding rewards.
572
835
  */
573
836
  streakArray?: Array<Metadata.StreakArray> | null;
574
837
 
838
+ /**
839
+ * Metadata for swap loyalty rules
840
+ */
841
+ swap?: Metadata.Swap;
842
+
575
843
  /**
576
844
  * ID of the Telegram channel.
577
845
  */
@@ -587,6 +855,12 @@ export namespace RuleCreateResponse {
587
855
  */
588
856
  trackAllContracts?: boolean | null;
589
857
 
858
+ /**
859
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
860
+ * completed once the progress is 100%.
861
+ */
862
+ trackProgress?: boolean | null;
863
+
590
864
  /**
591
865
  * URL of the associated Twitter account.
592
866
  */
@@ -630,7 +904,28 @@ export namespace RuleCreateResponse {
630
904
  /**
631
905
  * Type of wallet associated with the rule.
632
906
  */
633
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
907
+ walletType?:
908
+ | 'evm'
909
+ | 'solana'
910
+ | 'imx'
911
+ | 'sui'
912
+ | 'ton'
913
+ | 'cosmos'
914
+ | 'ultra'
915
+ | 'agw'
916
+ | 'flow_cadence'
917
+ | 'substrate'
918
+ | null;
919
+
920
+ /**
921
+ * ID of the Youtube channel.
922
+ */
923
+ youtubeChannelId?: string | null;
924
+
925
+ /**
926
+ * ID of the Youtube video.
927
+ */
928
+ youtubeVideoId?: string | null;
634
929
  }
635
930
 
636
931
  export namespace Metadata {
@@ -649,13 +944,17 @@ export namespace RuleCreateResponse {
649
944
  * Blockchain network of the collection.
650
945
  */
651
946
  network?:
947
+ | 'abstract'
948
+ | 'abstractTestnet'
652
949
  | 'apechain'
653
950
  | 'arbitrum'
654
951
  | 'avalanche'
655
952
  | 'avalancheFuji'
656
953
  | 'base'
657
954
  | 'baseSepolia'
955
+ | 'berachain'
658
956
  | 'berachainArtio'
957
+ | 'berachainBepolia'
659
958
  | 'binance'
660
959
  | 'bscTestnet'
661
960
  | 'campTestnet'
@@ -663,18 +962,30 @@ export namespace RuleCreateResponse {
663
962
  | 'fantomTestnet'
664
963
  | 'flowMainnet'
665
964
  | 'mainnet'
965
+ | 'nexusTestnet'
666
966
  | 'optimism'
667
967
  | 'polygon'
668
968
  | 'polygon_mumbai'
669
969
  | 'skaleNebula'
970
+ | 'skaleEuropa'
971
+ | 'skaleCalypso'
670
972
  | 'solana'
671
973
  | 'sophon'
974
+ | 'sophonTestnet'
672
975
  | 'sui'
673
976
  | 'superseed'
674
977
  | 'superseedSepolia'
675
978
  | 'vanar'
676
979
  | 'xai'
677
980
  | 'zksync'
981
+ | 'coti'
982
+ | 'cotiTestnet'
983
+ | 'morph'
984
+ | 'morphTestnet'
985
+ | 'morphHolesky'
986
+ | 'ultra'
987
+ | 'ultraTestnet'
988
+ | 'nitrograph'
678
989
  | 'sepolia'
679
990
  | 'optimism_sepolia'
680
991
  | 'arbitrumSepolia'
@@ -682,7 +993,10 @@ export namespace RuleCreateResponse {
682
993
  | 'optimism_goerli'
683
994
  | 'arbitrumGoerli'
684
995
  | 'basecamp'
685
- | 'abstract';
996
+ | 'somnia'
997
+ | 'polkadot'
998
+ | 'kusama'
999
+ | 'flow_cadence';
686
1000
  }
687
1001
 
688
1002
  /**
@@ -759,6 +1073,110 @@ export namespace RuleCreateResponse {
759
1073
  id: string;
760
1074
  }
761
1075
 
1076
+ /**
1077
+ * Liquidity pool details.
1078
+ */
1079
+ export interface Liquidity {
1080
+ /**
1081
+ * Calculation type of the liquidity pool.
1082
+ */
1083
+ calculationType?: 'fixed' | 'custom';
1084
+
1085
+ /**
1086
+ * Custom function to calculate the the reward amount based on the liquidity
1087
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
1088
+ * USD.
1089
+ */
1090
+ customFunction?: string;
1091
+
1092
+ /**
1093
+ * Liquidity provided per day in USD
1094
+ */
1095
+ liquidityPerDay?: number;
1096
+
1097
+ /**
1098
+ * Blockchain network of the liquidity pool.
1099
+ */
1100
+ network?:
1101
+ | 'abstract'
1102
+ | 'abstractTestnet'
1103
+ | 'apechain'
1104
+ | 'arbitrum'
1105
+ | 'avalanche'
1106
+ | 'avalancheFuji'
1107
+ | 'base'
1108
+ | 'baseSepolia'
1109
+ | 'berachain'
1110
+ | 'berachainArtio'
1111
+ | 'berachainBepolia'
1112
+ | 'binance'
1113
+ | 'bscTestnet'
1114
+ | 'campTestnet'
1115
+ | 'fantom'
1116
+ | 'fantomTestnet'
1117
+ | 'flowMainnet'
1118
+ | 'mainnet'
1119
+ | 'nexusTestnet'
1120
+ | 'optimism'
1121
+ | 'polygon'
1122
+ | 'polygon_mumbai'
1123
+ | 'skaleNebula'
1124
+ | 'skaleEuropa'
1125
+ | 'skaleCalypso'
1126
+ | 'solana'
1127
+ | 'sophon'
1128
+ | 'sophonTestnet'
1129
+ | 'sui'
1130
+ | 'superseed'
1131
+ | 'superseedSepolia'
1132
+ | 'vanar'
1133
+ | 'xai'
1134
+ | 'zksync'
1135
+ | 'coti'
1136
+ | 'cotiTestnet'
1137
+ | 'morph'
1138
+ | 'morphTestnet'
1139
+ | 'morphHolesky'
1140
+ | 'ultra'
1141
+ | 'ultraTestnet'
1142
+ | 'nitrograph'
1143
+ | 'sepolia'
1144
+ | 'optimism_sepolia'
1145
+ | 'arbitrumSepolia'
1146
+ | 'goerli'
1147
+ | 'optimism_goerli'
1148
+ | 'arbitrumGoerli'
1149
+ | 'basecamp'
1150
+ | 'somnia'
1151
+ | 'polkadot'
1152
+ | 'kusama'
1153
+ | 'flow_cadence';
1154
+
1155
+ /**
1156
+ * Indicates if only in-range liquidity is rewarded.
1157
+ */
1158
+ onlyRewardInRangeLiquidity?: boolean;
1159
+
1160
+ /**
1161
+ * Array of liquidity pools associated with the rule.
1162
+ */
1163
+ pools?: Array<Liquidity.Pool>;
1164
+
1165
+ /**
1166
+ * Protocol of the liquidity pool.
1167
+ */
1168
+ protocol?: string;
1169
+ }
1170
+
1171
+ export namespace Liquidity {
1172
+ export interface Pool {
1173
+ /**
1174
+ * Unique identifier of the liquidity pool.
1175
+ */
1176
+ id: string;
1177
+ }
1178
+ }
1179
+
762
1180
  export interface Range {
763
1181
  /**
764
1182
  * Reward amount for this range.
@@ -774,6 +1192,16 @@ export namespace RuleCreateResponse {
774
1192
  * Start value of the range.
775
1193
  */
776
1194
  startRange: number;
1195
+
1196
+ /**
1197
+ * ID of the loyalty badge for this range.
1198
+ */
1199
+ loyaltyBadgeId?: string;
1200
+
1201
+ /**
1202
+ * Amount of the loyalty multiplier for this range.
1203
+ */
1204
+ loyaltyMultiplierAmount?: number;
777
1205
  }
778
1206
 
779
1207
  /**
@@ -826,20 +1254,15 @@ export namespace RuleCreateResponse {
826
1254
  * Object containing details of the associated smart contract.
827
1255
  */
828
1256
  export interface SmartContract {
829
- /**
830
- * ABI of the smart contract.
831
- */
832
- abi?: string | null;
833
-
834
1257
  /**
835
1258
  * Mapping of addresses for the smart contract.
836
1259
  */
837
1260
  addressMapping?: string | null;
838
1261
 
839
1262
  /**
840
- * Array of bonus details applied to the rule.
1263
+ * Object containing details of the amount multiplier from the event.
841
1264
  */
842
- bonus?: Array<SmartContract.Bonus> | null;
1265
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
843
1266
 
844
1267
  /**
845
1268
  * ID of the smart contract.
@@ -851,68 +1274,31 @@ export namespace RuleCreateResponse {
851
1274
  */
852
1275
  criteria?: 'everyEvent' | 'byParameter' | null;
853
1276
 
854
- /**
855
- * Time range applied to the rule.
856
- */
857
- customRange?: SmartContract.CustomRange | null;
858
-
859
1277
  /**
860
1278
  * Event emitted by the smart contract.
861
1279
  */
862
1280
  event?: string | null;
863
1281
 
864
- /**
865
- * Maximum value allowed for the parameter.
866
- */
867
- max?: number | null;
868
-
869
1282
  /**
870
1283
  * Array of parameters for the smart contract.
871
1284
  */
872
1285
  params?: Array<SmartContract.Param> | null;
873
1286
 
874
1287
  /**
875
- * Flag indicating if a bonus is applied.
876
- */
877
- withBonus?: boolean | null;
878
-
879
- /**
880
- * Flag indicating if a custom range is applied.
1288
+ * Type of the smart contract interaction.
881
1289
  */
882
- withCustomRange?: boolean | null;
883
-
884
- /**
885
- * Flag indicating if a maximum limit is applied.
886
- */
887
- withMax?: boolean | null;
1290
+ type?: 'function' | 'event' | null;
888
1291
  }
889
1292
 
890
1293
  export namespace SmartContract {
891
- export interface Bonus {
892
- /**
893
- * Amount of the bonus.
894
- */
895
- amount?: number | null;
896
-
897
- /**
898
- * Number of times the bonus is applied.
899
- */
900
- count?: number | null;
901
- }
902
-
903
1294
  /**
904
- * Time range applied to the rule.
1295
+ * Object containing details of the amount multiplier from the event.
905
1296
  */
906
- export interface CustomRange {
907
- /**
908
- * End time of the custom range.
909
- */
910
- endsAt?: string | null;
911
-
1297
+ export interface AmountMultiplier {
912
1298
  /**
913
- * Start time of the custom range.
1299
+ * Mapping of the value for the smart contract.
914
1300
  */
915
- startsAt?: string | null;
1301
+ valueMapping?: string | null;
916
1302
  }
917
1303
 
918
1304
  export interface Param {
@@ -956,6 +1342,33 @@ export namespace RuleCreateResponse {
956
1342
  */
957
1343
  streakMilestone: number;
958
1344
  }
1345
+
1346
+ /**
1347
+ * Metadata for swap loyalty rules
1348
+ */
1349
+ export interface Swap {
1350
+ provider?: 'any' | 'relay' | 'lifi';
1351
+
1352
+ relayReferrerId?: string;
1353
+
1354
+ requireCrossChainSwap?: boolean;
1355
+
1356
+ swappedToChain?: 'any' | number | string;
1357
+
1358
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1359
+
1360
+ tokenMode?: 'any' | 'specific';
1361
+
1362
+ trackTokenAmount?: boolean;
1363
+ }
1364
+
1365
+ export namespace Swap {
1366
+ export interface SwappedToToken {
1367
+ address: string;
1368
+
1369
+ chainId: string;
1370
+ }
1371
+ }
959
1372
  }
960
1373
 
961
1374
  export interface Collection {
@@ -968,13 +1381,17 @@ export namespace RuleCreateResponse {
968
1381
  * Blockchain network for the collection
969
1382
  */
970
1383
  network:
1384
+ | 'abstract'
1385
+ | 'abstractTestnet'
971
1386
  | 'apechain'
972
1387
  | 'arbitrum'
973
1388
  | 'avalanche'
974
1389
  | 'avalancheFuji'
975
1390
  | 'base'
976
1391
  | 'baseSepolia'
1392
+ | 'berachain'
977
1393
  | 'berachainArtio'
1394
+ | 'berachainBepolia'
978
1395
  | 'binance'
979
1396
  | 'bscTestnet'
980
1397
  | 'campTestnet'
@@ -982,18 +1399,30 @@ export namespace RuleCreateResponse {
982
1399
  | 'fantomTestnet'
983
1400
  | 'flowMainnet'
984
1401
  | 'mainnet'
1402
+ | 'nexusTestnet'
985
1403
  | 'optimism'
986
1404
  | 'polygon'
987
1405
  | 'polygon_mumbai'
988
1406
  | 'skaleNebula'
1407
+ | 'skaleEuropa'
1408
+ | 'skaleCalypso'
989
1409
  | 'solana'
990
1410
  | 'sophon'
1411
+ | 'sophonTestnet'
991
1412
  | 'sui'
992
1413
  | 'superseed'
993
1414
  | 'superseedSepolia'
994
1415
  | 'vanar'
995
1416
  | 'xai'
996
1417
  | 'zksync'
1418
+ | 'coti'
1419
+ | 'cotiTestnet'
1420
+ | 'morph'
1421
+ | 'morphTestnet'
1422
+ | 'morphHolesky'
1423
+ | 'ultra'
1424
+ | 'ultraTestnet'
1425
+ | 'nitrograph'
997
1426
  | 'sepolia'
998
1427
  | 'optimism_sepolia'
999
1428
  | 'arbitrumSepolia'
@@ -1001,7 +1430,15 @@ export namespace RuleCreateResponse {
1001
1430
  | 'optimism_goerli'
1002
1431
  | 'arbitrumGoerli'
1003
1432
  | 'basecamp'
1004
- | 'abstract';
1433
+ | 'somnia'
1434
+ | 'polkadot'
1435
+ | 'kusama'
1436
+ | 'flow_cadence';
1437
+
1438
+ /**
1439
+ * Symbol of the collection.
1440
+ */
1441
+ symbol?: string;
1005
1442
  }
1006
1443
  }
1007
1444
 
@@ -1023,10 +1460,15 @@ export interface RuleUpdateResponse {
1023
1460
  */
1024
1461
  name: string;
1025
1462
 
1463
+ /**
1464
+ * The type of claim for the reward
1465
+ */
1466
+ claimType?: 'manual' | 'auto' | null;
1467
+
1026
1468
  /**
1027
1469
  * Blockchain address of the associated collection
1028
1470
  */
1029
- collectionAddress?: string;
1471
+ collectionAddress?: string | null;
1030
1472
 
1031
1473
  /**
1032
1474
  * List of associated collections
@@ -1058,11 +1500,21 @@ export interface RuleUpdateResponse {
1058
1500
  */
1059
1501
  effectiveStartTime?: string | null;
1060
1502
 
1503
+ /**
1504
+ * ID of the external integration
1505
+ */
1506
+ externalIntegrationId?: string | null;
1507
+
1061
1508
  /**
1062
1509
  * Frequency of the rule execution
1063
1510
  */
1064
1511
  frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
1065
1512
 
1513
+ /**
1514
+ * Optional stratus function id for the rule
1515
+ */
1516
+ functionId?: string | null;
1517
+
1066
1518
  /**
1067
1519
  * Whether to hide this rule in the user interface
1068
1520
  */
@@ -1071,7 +1523,7 @@ export interface RuleUpdateResponse {
1071
1523
  /**
1072
1524
  * Time interval for recurring rule execution
1073
1525
  */
1074
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1526
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
1075
1527
 
1076
1528
  /**
1077
1529
  * Whether this rule is required for participation
@@ -1083,6 +1535,18 @@ export interface RuleUpdateResponse {
1083
1535
  */
1084
1536
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
1085
1537
 
1538
+ /**
1539
+ * The interval for the max amount. Available for the smart contract and external
1540
+ * rules.
1541
+ */
1542
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
1543
+
1544
+ /**
1545
+ * The maximum amount of points a user can earn per interval. Available for the
1546
+ * smart contract and external rules.
1547
+ */
1548
+ maxAmountPerInterval?: number | null;
1549
+
1086
1550
  /**
1087
1551
  * URL of the media to be displayed
1088
1552
  */
@@ -1097,13 +1561,17 @@ export interface RuleUpdateResponse {
1097
1561
  * Blockchain network where the rule will apply
1098
1562
  */
1099
1563
  network?:
1564
+ | 'abstract'
1565
+ | 'abstractTestnet'
1100
1566
  | 'apechain'
1101
1567
  | 'arbitrum'
1102
1568
  | 'avalanche'
1103
1569
  | 'avalancheFuji'
1104
1570
  | 'base'
1105
1571
  | 'baseSepolia'
1572
+ | 'berachain'
1106
1573
  | 'berachainArtio'
1574
+ | 'berachainBepolia'
1107
1575
  | 'binance'
1108
1576
  | 'bscTestnet'
1109
1577
  | 'campTestnet'
@@ -1111,18 +1579,30 @@ export interface RuleUpdateResponse {
1111
1579
  | 'fantomTestnet'
1112
1580
  | 'flowMainnet'
1113
1581
  | 'mainnet'
1582
+ | 'nexusTestnet'
1114
1583
  | 'optimism'
1115
1584
  | 'polygon'
1116
1585
  | 'polygon_mumbai'
1117
1586
  | 'skaleNebula'
1587
+ | 'skaleEuropa'
1588
+ | 'skaleCalypso'
1118
1589
  | 'solana'
1119
1590
  | 'sophon'
1591
+ | 'sophonTestnet'
1120
1592
  | 'sui'
1121
1593
  | 'superseed'
1122
1594
  | 'superseedSepolia'
1123
1595
  | 'vanar'
1124
1596
  | 'xai'
1125
1597
  | 'zksync'
1598
+ | 'coti'
1599
+ | 'cotiTestnet'
1600
+ | 'morph'
1601
+ | 'morphTestnet'
1602
+ | 'morphHolesky'
1603
+ | 'ultra'
1604
+ | 'ultraTestnet'
1605
+ | 'nitrograph'
1126
1606
  | 'sepolia'
1127
1607
  | 'optimism_sepolia'
1128
1608
  | 'arbitrumSepolia'
@@ -1130,7 +1610,10 @@ export interface RuleUpdateResponse {
1130
1610
  | 'optimism_goerli'
1131
1611
  | 'arbitrumGoerli'
1132
1612
  | 'basecamp'
1133
- | 'abstract';
1613
+ | 'somnia'
1614
+ | 'polkadot'
1615
+ | 'kusama'
1616
+ | 'flow_cadence';
1134
1617
 
1135
1618
  /**
1136
1619
  * ID for associated OAuth credentials
@@ -1138,20 +1621,35 @@ export interface RuleUpdateResponse {
1138
1621
  oauthCredentialsId?: string | null;
1139
1622
 
1140
1623
  /**
1141
- * Type of reward issued by this rule
1624
+ * The lifetime of the reward
1142
1625
  */
1143
- rewardType?: 'points' | 'multiplier';
1626
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
1144
1627
 
1145
1628
  /**
1146
- * Start time for the loyalty rule
1629
+ * Type of reward issued by this rule
1147
1630
  */
1148
- startTime?: string | null;
1631
+ rewardType?: 'points' | 'multiplier' | 'badge';
1149
1632
 
1150
1633
  /**
1151
- * Optional subscription identifier for the rule
1634
+ * URL of the Shopify store
1152
1635
  */
1153
- subscriptionIdentifier?: string | null;
1154
- }
1636
+ shopifyStoreUrl?: string | null;
1637
+
1638
+ /**
1639
+ * Whether to show this rule before the start time
1640
+ */
1641
+ showBeforeStart?: boolean;
1642
+
1643
+ /**
1644
+ * Start time for the loyalty rule
1645
+ */
1646
+ startTime?: string | null;
1647
+
1648
+ /**
1649
+ * Optional stratus subscription id for the rule
1650
+ */
1651
+ subscriptionId?: string | null;
1652
+ }
1155
1653
 
1156
1654
  export namespace RuleUpdateResponse {
1157
1655
  export interface Collection {
@@ -1164,13 +1662,17 @@ export namespace RuleUpdateResponse {
1164
1662
  * Blockchain network for the collection
1165
1663
  */
1166
1664
  network:
1665
+ | 'abstract'
1666
+ | 'abstractTestnet'
1167
1667
  | 'apechain'
1168
1668
  | 'arbitrum'
1169
1669
  | 'avalanche'
1170
1670
  | 'avalancheFuji'
1171
1671
  | 'base'
1172
1672
  | 'baseSepolia'
1673
+ | 'berachain'
1173
1674
  | 'berachainArtio'
1675
+ | 'berachainBepolia'
1174
1676
  | 'binance'
1175
1677
  | 'bscTestnet'
1176
1678
  | 'campTestnet'
@@ -1178,18 +1680,30 @@ export namespace RuleUpdateResponse {
1178
1680
  | 'fantomTestnet'
1179
1681
  | 'flowMainnet'
1180
1682
  | 'mainnet'
1683
+ | 'nexusTestnet'
1181
1684
  | 'optimism'
1182
1685
  | 'polygon'
1183
1686
  | 'polygon_mumbai'
1184
1687
  | 'skaleNebula'
1688
+ | 'skaleEuropa'
1689
+ | 'skaleCalypso'
1185
1690
  | 'solana'
1186
1691
  | 'sophon'
1692
+ | 'sophonTestnet'
1187
1693
  | 'sui'
1188
1694
  | 'superseed'
1189
1695
  | 'superseedSepolia'
1190
1696
  | 'vanar'
1191
1697
  | 'xai'
1192
1698
  | 'zksync'
1699
+ | 'coti'
1700
+ | 'cotiTestnet'
1701
+ | 'morph'
1702
+ | 'morphTestnet'
1703
+ | 'morphHolesky'
1704
+ | 'ultra'
1705
+ | 'ultraTestnet'
1706
+ | 'nitrograph'
1193
1707
  | 'sepolia'
1194
1708
  | 'optimism_sepolia'
1195
1709
  | 'arbitrumSepolia'
@@ -1197,13 +1711,26 @@ export namespace RuleUpdateResponse {
1197
1711
  | 'optimism_goerli'
1198
1712
  | 'arbitrumGoerli'
1199
1713
  | 'basecamp'
1200
- | 'abstract';
1714
+ | 'somnia'
1715
+ | 'polkadot'
1716
+ | 'kusama'
1717
+ | 'flow_cadence';
1718
+
1719
+ /**
1720
+ * Symbol of the collection.
1721
+ */
1722
+ symbol?: string;
1201
1723
  }
1202
1724
 
1203
1725
  /**
1204
1726
  * Additional metadata for the loyalty rule
1205
1727
  */
1206
1728
  export interface Metadata {
1729
+ /**
1730
+ * Number of tokens per batch.
1731
+ */
1732
+ batchSize?: number | null;
1733
+
1207
1734
  /**
1208
1735
  * Text displayed on the action button.
1209
1736
  */
@@ -1227,7 +1754,7 @@ export namespace RuleUpdateResponse {
1227
1754
  /**
1228
1755
  * Text to check in the Twitter post, username, or bio.
1229
1756
  */
1230
- checkText?: string | null;
1757
+ checkText?: string | Array<string> | null;
1231
1758
 
1232
1759
  /**
1233
1760
  * Array of collections associated with the rule.
@@ -1237,7 +1764,12 @@ export namespace RuleUpdateResponse {
1237
1764
  /**
1238
1765
  * Conditions for completing the profile.
1239
1766
  */
1240
- completeProfileConditions?: Record<string, boolean> | null;
1767
+ completeProfileConditions?: { [key: string]: boolean } | null;
1768
+
1769
+ /**
1770
+ * Description of the external rule condition (only for external rules)
1771
+ */
1772
+ conditionDescription?: string;
1241
1773
 
1242
1774
  /**
1243
1775
  * Object containing details for the call-to-action.
@@ -1249,6 +1781,11 @@ export namespace RuleUpdateResponse {
1249
1781
  */
1250
1782
  customRewardsApiKey?: string;
1251
1783
 
1784
+ /**
1785
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
1786
+ */
1787
+ directRpc?: boolean;
1788
+
1252
1789
  /**
1253
1790
  * Array of Discord servers, channels, and roles to join.
1254
1791
  */
@@ -1274,6 +1811,11 @@ export namespace RuleUpdateResponse {
1274
1811
  */
1275
1812
  enableVerifiedMultiplier?: boolean;
1276
1813
 
1814
+ /**
1815
+ * Type of ERC20 token for the loyalty rule.
1816
+ */
1817
+ erc20Type?: 'erc20' | 'native';
1818
+
1277
1819
  /**
1278
1820
  * Fill source of the order for the token sale
1279
1821
  */
@@ -1294,11 +1836,6 @@ export namespace RuleUpdateResponse {
1294
1836
  */
1295
1837
  hasNeverSold?: boolean;
1296
1838
 
1297
- /**
1298
- * Flag indicating whether the order source is included.
1299
- */
1300
- hasOrderSource?: boolean;
1301
-
1302
1839
  /**
1303
1840
  * Indicates if the full royalty has been paid for items.
1304
1841
  */
@@ -1319,11 +1856,21 @@ export namespace RuleUpdateResponse {
1319
1856
  */
1320
1857
  imageUrl?: string | null;
1321
1858
 
1859
+ /**
1860
+ * If enabled, the first transaction done on the platform will complete this rule
1861
+ */
1862
+ isCheckInOnEveryTxn?: boolean;
1863
+
1322
1864
  /**
1323
1865
  * Indicates if the multiplier has been applied to rewards.
1324
1866
  */
1325
1867
  isMultiplierApplied?: boolean;
1326
1868
 
1869
+ /**
1870
+ * Flag indicating if the rule is restricted to new users.
1871
+ */
1872
+ isRestrictedToNewUsers?: boolean;
1873
+
1327
1874
  /**
1328
1875
  * Flag indicating if rewards are applied retroactively.
1329
1876
  */
@@ -1339,6 +1886,11 @@ export namespace RuleUpdateResponse {
1339
1886
  */
1340
1887
  link?: string | null;
1341
1888
 
1889
+ /**
1890
+ * Liquidity pool details.
1891
+ */
1892
+ liquidity?: Metadata.Liquidity;
1893
+
1342
1894
  /**
1343
1895
  * Maximum quantity constraint for token holding.
1344
1896
  */
@@ -1380,14 +1932,24 @@ export namespace RuleUpdateResponse {
1380
1932
  onlyRewardSingleTokenOwnership?: boolean | null;
1381
1933
 
1382
1934
  /**
1383
- * Order source of the order for the token sale
1935
+ * Promotional code associated with the rule.
1936
+ */
1937
+ promoCode?: string;
1938
+
1939
+ /**
1940
+ * URL of the CSV file containing promo codes.
1384
1941
  */
1385
- orderSource?: string;
1942
+ promoCodeCsvUrl?: string;
1386
1943
 
1387
1944
  /**
1388
- * Promotional code associated with the rule.
1945
+ * Numbers of the promotional code to be generated.
1389
1946
  */
1390
- promoCode?: string;
1947
+ promoCodeLength?: number | null;
1948
+
1949
+ /**
1950
+ * Type of the promotional code.
1951
+ */
1952
+ promoCodeType?: 'code' | 'csv' | 'generate';
1391
1953
 
1392
1954
  /**
1393
1955
  * Array defining ranges and corresponding rewards.
@@ -1404,11 +1966,62 @@ export namespace RuleUpdateResponse {
1404
1966
  */
1405
1967
  referrerReward?: number | null;
1406
1968
 
1969
+ /**
1970
+ * Loyalty currency ID of the referrer reward.
1971
+ */
1972
+ referrerRewardLoyaltyCurrencyId?: string | null;
1973
+
1974
+ /**
1975
+ * Flag indicating if the post link is required.
1976
+ */
1977
+ requirePostLink?: boolean | null;
1978
+
1979
+ /**
1980
+ * Flag indicating if media metadata is required.
1981
+ */
1982
+ requirePostMediaLink?: boolean | null;
1983
+
1984
+ /**
1985
+ * Flag indicating if the rule can also reward badges per range.
1986
+ */
1987
+ rewardBadgePerRange?: boolean;
1988
+
1989
+ /**
1990
+ * Flag indicating if the reward is rewarded by batch.
1991
+ */
1992
+ rewardByBatch?: boolean | null;
1993
+
1994
+ /**
1995
+ * Criteria to evaluate the reward.
1996
+ */
1997
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
1998
+
1999
+ /**
2000
+ * Flag indicating if the reward is rewarded per action.
2001
+ */
2002
+ rewardPerAction?: boolean | null;
2003
+
1407
2004
  /**
1408
2005
  * Flag indicating if rewards are given per impression.
1409
2006
  */
1410
2007
  rewardPerImpression?: boolean | null;
1411
2008
 
2009
+ /**
2010
+ * Flag indicating if the rule should reward based on value of traded tokens
2011
+ * instead of count.
2012
+ */
2013
+ rewardPerValue?: boolean;
2014
+
2015
+ /**
2016
+ * Wallet address of the user can only be used if userId is not provided
2017
+ */
2018
+ royaltyAddress?: string;
2019
+
2020
+ /**
2021
+ * Royalty percentage of the item.
2022
+ */
2023
+ royaltyPercentage?: number;
2024
+
1412
2025
  /**
1413
2026
  * Currency associated with sales.
1414
2027
  */
@@ -1448,6 +2061,7 @@ export namespace RuleUpdateResponse {
1448
2061
  | 'Twitch'
1449
2062
  | 'X(Twitter)'
1450
2063
  | 'YouTube'
2064
+ | 'Google'
1451
2065
  | null;
1452
2066
 
1453
2067
  /**
@@ -1460,11 +2074,21 @@ export namespace RuleUpdateResponse {
1460
2074
  */
1461
2075
  socialPlatformName?: string | null;
1462
2076
 
2077
+ /**
2078
+ * ID of the Steam app.
2079
+ */
2080
+ steamAppId?: string | null;
2081
+
1463
2082
  /**
1464
2083
  * Array of streak milestones and corresponding rewards.
1465
2084
  */
1466
2085
  streakArray?: Array<Metadata.StreakArray> | null;
1467
2086
 
2087
+ /**
2088
+ * Metadata for swap loyalty rules
2089
+ */
2090
+ swap?: Metadata.Swap;
2091
+
1468
2092
  /**
1469
2093
  * ID of the Telegram channel.
1470
2094
  */
@@ -1480,6 +2104,12 @@ export namespace RuleUpdateResponse {
1480
2104
  */
1481
2105
  trackAllContracts?: boolean | null;
1482
2106
 
2107
+ /**
2108
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2109
+ * completed once the progress is 100%.
2110
+ */
2111
+ trackProgress?: boolean | null;
2112
+
1483
2113
  /**
1484
2114
  * URL of the associated Twitter account.
1485
2115
  */
@@ -1523,7 +2153,28 @@ export namespace RuleUpdateResponse {
1523
2153
  /**
1524
2154
  * Type of wallet associated with the rule.
1525
2155
  */
1526
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
2156
+ walletType?:
2157
+ | 'evm'
2158
+ | 'solana'
2159
+ | 'imx'
2160
+ | 'sui'
2161
+ | 'ton'
2162
+ | 'cosmos'
2163
+ | 'ultra'
2164
+ | 'agw'
2165
+ | 'flow_cadence'
2166
+ | 'substrate'
2167
+ | null;
2168
+
2169
+ /**
2170
+ * ID of the Youtube channel.
2171
+ */
2172
+ youtubeChannelId?: string | null;
2173
+
2174
+ /**
2175
+ * ID of the Youtube video.
2176
+ */
2177
+ youtubeVideoId?: string | null;
1527
2178
  }
1528
2179
 
1529
2180
  export namespace Metadata {
@@ -1542,13 +2193,17 @@ export namespace RuleUpdateResponse {
1542
2193
  * Blockchain network of the collection.
1543
2194
  */
1544
2195
  network?:
2196
+ | 'abstract'
2197
+ | 'abstractTestnet'
1545
2198
  | 'apechain'
1546
2199
  | 'arbitrum'
1547
2200
  | 'avalanche'
1548
2201
  | 'avalancheFuji'
1549
2202
  | 'base'
1550
2203
  | 'baseSepolia'
2204
+ | 'berachain'
1551
2205
  | 'berachainArtio'
2206
+ | 'berachainBepolia'
1552
2207
  | 'binance'
1553
2208
  | 'bscTestnet'
1554
2209
  | 'campTestnet'
@@ -1556,18 +2211,30 @@ export namespace RuleUpdateResponse {
1556
2211
  | 'fantomTestnet'
1557
2212
  | 'flowMainnet'
1558
2213
  | 'mainnet'
2214
+ | 'nexusTestnet'
1559
2215
  | 'optimism'
1560
2216
  | 'polygon'
1561
2217
  | 'polygon_mumbai'
1562
2218
  | 'skaleNebula'
2219
+ | 'skaleEuropa'
2220
+ | 'skaleCalypso'
1563
2221
  | 'solana'
1564
2222
  | 'sophon'
2223
+ | 'sophonTestnet'
1565
2224
  | 'sui'
1566
2225
  | 'superseed'
1567
2226
  | 'superseedSepolia'
1568
2227
  | 'vanar'
1569
2228
  | 'xai'
1570
2229
  | 'zksync'
2230
+ | 'coti'
2231
+ | 'cotiTestnet'
2232
+ | 'morph'
2233
+ | 'morphTestnet'
2234
+ | 'morphHolesky'
2235
+ | 'ultra'
2236
+ | 'ultraTestnet'
2237
+ | 'nitrograph'
1571
2238
  | 'sepolia'
1572
2239
  | 'optimism_sepolia'
1573
2240
  | 'arbitrumSepolia'
@@ -1575,7 +2242,10 @@ export namespace RuleUpdateResponse {
1575
2242
  | 'optimism_goerli'
1576
2243
  | 'arbitrumGoerli'
1577
2244
  | 'basecamp'
1578
- | 'abstract';
2245
+ | 'somnia'
2246
+ | 'polkadot'
2247
+ | 'kusama'
2248
+ | 'flow_cadence';
1579
2249
  }
1580
2250
 
1581
2251
  /**
@@ -1652,6 +2322,110 @@ export namespace RuleUpdateResponse {
1652
2322
  id: string;
1653
2323
  }
1654
2324
 
2325
+ /**
2326
+ * Liquidity pool details.
2327
+ */
2328
+ export interface Liquidity {
2329
+ /**
2330
+ * Calculation type of the liquidity pool.
2331
+ */
2332
+ calculationType?: 'fixed' | 'custom';
2333
+
2334
+ /**
2335
+ * Custom function to calculate the the reward amount based on the liquidity
2336
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2337
+ * USD.
2338
+ */
2339
+ customFunction?: string;
2340
+
2341
+ /**
2342
+ * Liquidity provided per day in USD
2343
+ */
2344
+ liquidityPerDay?: number;
2345
+
2346
+ /**
2347
+ * Blockchain network of the liquidity pool.
2348
+ */
2349
+ network?:
2350
+ | 'abstract'
2351
+ | 'abstractTestnet'
2352
+ | 'apechain'
2353
+ | 'arbitrum'
2354
+ | 'avalanche'
2355
+ | 'avalancheFuji'
2356
+ | 'base'
2357
+ | 'baseSepolia'
2358
+ | 'berachain'
2359
+ | 'berachainArtio'
2360
+ | 'berachainBepolia'
2361
+ | 'binance'
2362
+ | 'bscTestnet'
2363
+ | 'campTestnet'
2364
+ | 'fantom'
2365
+ | 'fantomTestnet'
2366
+ | 'flowMainnet'
2367
+ | 'mainnet'
2368
+ | 'nexusTestnet'
2369
+ | 'optimism'
2370
+ | 'polygon'
2371
+ | 'polygon_mumbai'
2372
+ | 'skaleNebula'
2373
+ | 'skaleEuropa'
2374
+ | 'skaleCalypso'
2375
+ | 'solana'
2376
+ | 'sophon'
2377
+ | 'sophonTestnet'
2378
+ | 'sui'
2379
+ | 'superseed'
2380
+ | 'superseedSepolia'
2381
+ | 'vanar'
2382
+ | 'xai'
2383
+ | 'zksync'
2384
+ | 'coti'
2385
+ | 'cotiTestnet'
2386
+ | 'morph'
2387
+ | 'morphTestnet'
2388
+ | 'morphHolesky'
2389
+ | 'ultra'
2390
+ | 'ultraTestnet'
2391
+ | 'nitrograph'
2392
+ | 'sepolia'
2393
+ | 'optimism_sepolia'
2394
+ | 'arbitrumSepolia'
2395
+ | 'goerli'
2396
+ | 'optimism_goerli'
2397
+ | 'arbitrumGoerli'
2398
+ | 'basecamp'
2399
+ | 'somnia'
2400
+ | 'polkadot'
2401
+ | 'kusama'
2402
+ | 'flow_cadence';
2403
+
2404
+ /**
2405
+ * Indicates if only in-range liquidity is rewarded.
2406
+ */
2407
+ onlyRewardInRangeLiquidity?: boolean;
2408
+
2409
+ /**
2410
+ * Array of liquidity pools associated with the rule.
2411
+ */
2412
+ pools?: Array<Liquidity.Pool>;
2413
+
2414
+ /**
2415
+ * Protocol of the liquidity pool.
2416
+ */
2417
+ protocol?: string;
2418
+ }
2419
+
2420
+ export namespace Liquidity {
2421
+ export interface Pool {
2422
+ /**
2423
+ * Unique identifier of the liquidity pool.
2424
+ */
2425
+ id: string;
2426
+ }
2427
+ }
2428
+
1655
2429
  export interface Range {
1656
2430
  /**
1657
2431
  * Reward amount for this range.
@@ -1667,6 +2441,16 @@ export namespace RuleUpdateResponse {
1667
2441
  * Start value of the range.
1668
2442
  */
1669
2443
  startRange: number;
2444
+
2445
+ /**
2446
+ * ID of the loyalty badge for this range.
2447
+ */
2448
+ loyaltyBadgeId?: string;
2449
+
2450
+ /**
2451
+ * Amount of the loyalty multiplier for this range.
2452
+ */
2453
+ loyaltyMultiplierAmount?: number;
1670
2454
  }
1671
2455
 
1672
2456
  /**
@@ -1719,20 +2503,15 @@ export namespace RuleUpdateResponse {
1719
2503
  * Object containing details of the associated smart contract.
1720
2504
  */
1721
2505
  export interface SmartContract {
1722
- /**
1723
- * ABI of the smart contract.
1724
- */
1725
- abi?: string | null;
1726
-
1727
2506
  /**
1728
2507
  * Mapping of addresses for the smart contract.
1729
2508
  */
1730
2509
  addressMapping?: string | null;
1731
2510
 
1732
2511
  /**
1733
- * Array of bonus details applied to the rule.
2512
+ * Object containing details of the amount multiplier from the event.
1734
2513
  */
1735
- bonus?: Array<SmartContract.Bonus> | null;
2514
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1736
2515
 
1737
2516
  /**
1738
2517
  * ID of the smart contract.
@@ -1744,68 +2523,31 @@ export namespace RuleUpdateResponse {
1744
2523
  */
1745
2524
  criteria?: 'everyEvent' | 'byParameter' | null;
1746
2525
 
1747
- /**
1748
- * Time range applied to the rule.
1749
- */
1750
- customRange?: SmartContract.CustomRange | null;
1751
-
1752
2526
  /**
1753
2527
  * Event emitted by the smart contract.
1754
2528
  */
1755
2529
  event?: string | null;
1756
2530
 
1757
- /**
1758
- * Maximum value allowed for the parameter.
1759
- */
1760
- max?: number | null;
1761
-
1762
2531
  /**
1763
2532
  * Array of parameters for the smart contract.
1764
2533
  */
1765
2534
  params?: Array<SmartContract.Param> | null;
1766
2535
 
1767
2536
  /**
1768
- * Flag indicating if a bonus is applied.
2537
+ * Type of the smart contract interaction.
1769
2538
  */
1770
- withBonus?: boolean | null;
1771
-
1772
- /**
1773
- * Flag indicating if a custom range is applied.
1774
- */
1775
- withCustomRange?: boolean | null;
1776
-
1777
- /**
1778
- * Flag indicating if a maximum limit is applied.
1779
- */
1780
- withMax?: boolean | null;
2539
+ type?: 'function' | 'event' | null;
1781
2540
  }
1782
2541
 
1783
2542
  export namespace SmartContract {
1784
- export interface Bonus {
1785
- /**
1786
- * Amount of the bonus.
1787
- */
1788
- amount?: number | null;
1789
-
1790
- /**
1791
- * Number of times the bonus is applied.
1792
- */
1793
- count?: number | null;
1794
- }
1795
-
1796
2543
  /**
1797
- * Time range applied to the rule.
2544
+ * Object containing details of the amount multiplier from the event.
1798
2545
  */
1799
- export interface CustomRange {
1800
- /**
1801
- * End time of the custom range.
1802
- */
1803
- endsAt?: string | null;
1804
-
2546
+ export interface AmountMultiplier {
1805
2547
  /**
1806
- * Start time of the custom range.
2548
+ * Mapping of the value for the smart contract.
1807
2549
  */
1808
- startsAt?: string | null;
2550
+ valueMapping?: string | null;
1809
2551
  }
1810
2552
 
1811
2553
  export interface Param {
@@ -1849,6 +2591,33 @@ export namespace RuleUpdateResponse {
1849
2591
  */
1850
2592
  streakMilestone: number;
1851
2593
  }
2594
+
2595
+ /**
2596
+ * Metadata for swap loyalty rules
2597
+ */
2598
+ export interface Swap {
2599
+ provider?: 'any' | 'relay' | 'lifi';
2600
+
2601
+ relayReferrerId?: string;
2602
+
2603
+ requireCrossChainSwap?: boolean;
2604
+
2605
+ swappedToChain?: 'any' | number | string;
2606
+
2607
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2608
+
2609
+ tokenMode?: 'any' | 'specific';
2610
+
2611
+ trackTokenAmount?: boolean;
2612
+ }
2613
+
2614
+ export namespace Swap {
2615
+ export interface SwappedToToken {
2616
+ address: string;
2617
+
2618
+ chainId: string;
2619
+ }
2620
+ }
1852
2621
  }
1853
2622
  }
1854
2623
 
@@ -1859,9 +2628,6 @@ export interface RuleListResponse {
1859
2628
  }
1860
2629
 
1861
2630
  export namespace RuleListResponse {
1862
- /**
1863
- * Schema for a loyalty rule
1864
- */
1865
2631
  export interface Data {
1866
2632
  /**
1867
2633
  * Unique identifier for the loyalty rule
@@ -1871,7 +2637,7 @@ export namespace RuleListResponse {
1871
2637
  /**
1872
2638
  * Amount associated with the loyalty rule
1873
2639
  */
1874
- amount: number;
2640
+ amount: number | null;
1875
2641
 
1876
2642
  /**
1877
2643
  * Timestamp when the loyalty rule was created
@@ -1883,16 +2649,46 @@ export namespace RuleListResponse {
1883
2649
  */
1884
2650
  deletedAt: string | null;
1885
2651
 
2652
+ /**
2653
+ * Description of the loyalty rule
2654
+ */
2655
+ description: string;
2656
+
2657
+ /**
2658
+ * End time of the loyalty rule
2659
+ */
2660
+ endTime: string | null;
2661
+
1886
2662
  /**
1887
2663
  * Frequency of the loyalty rule
1888
2664
  */
1889
2665
  frequency: string;
1890
2666
 
2667
+ /**
2668
+ * Chains attached to the loyalty rule
2669
+ */
2670
+ loyaltyRuleChain: Array<Data.LoyaltyRuleChain>;
2671
+
2672
+ /**
2673
+ * Name of the loyalty rule
2674
+ */
2675
+ name: string;
2676
+
1891
2677
  /**
1892
2678
  * Unique identifier for the organization
1893
2679
  */
1894
2680
  organizationId: string;
1895
2681
 
2682
+ /**
2683
+ * Type of the reward
2684
+ */
2685
+ rewardType: 'points' | 'multiplier' | 'badge';
2686
+
2687
+ /**
2688
+ * Start time of the loyalty rule
2689
+ */
2690
+ startTime: string | null;
2691
+
1896
2692
  /**
1897
2693
  * Type of the loyalty rule
1898
2694
  */
@@ -1908,15 +2704,1017 @@ export namespace RuleListResponse {
1908
2704
  */
1909
2705
  websiteId: string;
1910
2706
 
1911
- /**
1912
- * Optional address of the collection
1913
- */
1914
- collectionAddress?: string;
2707
+ /**
2708
+ * Optional address of the collection
2709
+ */
2710
+ collectionAddress?: string;
2711
+
2712
+ /**
2713
+ * URL of the media associated with the loyalty rule
2714
+ */
2715
+ mediaUrl?: string | null;
2716
+
2717
+ /**
2718
+ * Optional metadata for the loyalty rule
2719
+ */
2720
+ metadata?: { [key: string]: Data.Metadata };
2721
+ }
2722
+
2723
+ export namespace Data {
2724
+ export interface LoyaltyRuleChain {
2725
+ /**
2726
+ * Unique identifier for the rule chain
2727
+ */
2728
+ id: string;
2729
+
2730
+ loyaltyConditions: Array<LoyaltyRuleChain.LoyaltyCondition>;
2731
+
2732
+ /**
2733
+ * Unique identifier for the loyalty rule
2734
+ */
2735
+ loyaltyRuleId: string;
2736
+
2737
+ /**
2738
+ * Name of the rule chain
2739
+ */
2740
+ name: string;
2741
+ }
2742
+
2743
+ export namespace LoyaltyRuleChain {
2744
+ export interface LoyaltyCondition {
2745
+ /**
2746
+ * Unique identifier for the condition
2747
+ */
2748
+ id: string;
2749
+
2750
+ /**
2751
+ * Amount of the condition
2752
+ */
2753
+ amount: number | null;
2754
+
2755
+ association: Array<LoyaltyCondition.Association>;
2756
+
2757
+ /**
2758
+ * URL of the CSV file
2759
+ */
2760
+ csvUrl: string | null;
2761
+
2762
+ /**
2763
+ * Description of the condition
2764
+ */
2765
+ description: string | null;
2766
+
2767
+ /**
2768
+ * Number of times the condition must be met
2769
+ */
2770
+ repeatCount: number | null;
2771
+
2772
+ /**
2773
+ * Number of times the condition must be met
2774
+ */
2775
+ requiredCount: number | null;
2776
+
2777
+ /**
2778
+ * Type of the condition
2779
+ */
2780
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
2781
+ }
2782
+
2783
+ export namespace LoyaltyCondition {
2784
+ export interface Association {
2785
+ /**
2786
+ * Unique identifier for the association
2787
+ */
2788
+ id: string;
2789
+
2790
+ /**
2791
+ * Unique identifier for the loyalty badge
2792
+ */
2793
+ loyaltyBadgeId: string | null;
2794
+
2795
+ /**
2796
+ * Unique identifier for the loyalty currency
2797
+ */
2798
+ loyaltyCurrencyId: string | null;
2799
+
2800
+ loyaltyRule: Association.LoyaltyRule | null;
2801
+
2802
+ /**
2803
+ * Unique identifier for the loyalty rule group
2804
+ */
2805
+ loyaltyRuleGroupId: string | null;
2806
+
2807
+ /**
2808
+ * Unique identifier for the loyalty rule
2809
+ */
2810
+ loyaltyRuleId: string | null;
2811
+ }
2812
+
2813
+ export namespace Association {
2814
+ export interface LoyaltyRule {
2815
+ /**
2816
+ * Name of the loyalty rule
2817
+ */
2818
+ name: string;
2819
+ }
2820
+ }
2821
+ }
2822
+ }
2823
+
2824
+ export interface Metadata {
2825
+ /**
2826
+ * Number of tokens per batch.
2827
+ */
2828
+ batchSize?: number | null;
2829
+
2830
+ /**
2831
+ * Text displayed on the action button.
2832
+ */
2833
+ buttonText?: string | null;
2834
+
2835
+ /**
2836
+ * Flag indicating if commenting is required.
2837
+ */
2838
+ checkComment?: boolean | null;
2839
+
2840
+ /**
2841
+ * Flag indicating if liking the post is required.
2842
+ */
2843
+ checkLike?: boolean | null;
2844
+
2845
+ /**
2846
+ * Flag indicating if reposting is required.
2847
+ */
2848
+ checkRepost?: boolean | null;
2849
+
2850
+ /**
2851
+ * Text to check in the Twitter post, username, or bio.
2852
+ */
2853
+ checkText?: string | Array<string> | null;
2854
+
2855
+ /**
2856
+ * Array of collections associated with the rule.
2857
+ */
2858
+ collection?: Array<Metadata.Collection>;
2859
+
2860
+ /**
2861
+ * Conditions for completing the profile.
2862
+ */
2863
+ completeProfileConditions?: { [key: string]: boolean } | null;
2864
+
2865
+ /**
2866
+ * Description of the external rule condition (only for external rules)
2867
+ */
2868
+ conditionDescription?: string;
2869
+
2870
+ /**
2871
+ * Object containing details for the call-to-action.
2872
+ */
2873
+ cta?: Metadata.Cta | null;
2874
+
2875
+ /**
2876
+ * API key for custom rewards integration.
2877
+ */
2878
+ customRewardsApiKey?: string;
2879
+
2880
+ /**
2881
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
2882
+ */
2883
+ directRpc?: boolean;
2884
+
2885
+ /**
2886
+ * Array of Discord servers, channels, and roles to join.
2887
+ */
2888
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2889
+
2890
+ /**
2891
+ * Array of drip quests required to complete the rule.
2892
+ */
2893
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2894
+
2895
+ /**
2896
+ * Flag indicating whether joining Discord servers is required.
2897
+ */
2898
+ enableJoinDiscordServers?: boolean | null;
2899
+
2900
+ /**
2901
+ * Flag indicating whether streaks are enabled.
2902
+ */
2903
+ enableStreaks?: boolean | null;
2904
+
2905
+ /**
2906
+ * Flag indicating whether the verified multiplier is enabled.
2907
+ */
2908
+ enableVerifiedMultiplier?: boolean;
2909
+
2910
+ /**
2911
+ * Type of ERC20 token for the loyalty rule.
2912
+ */
2913
+ erc20Type?: 'erc20' | 'native';
2914
+
2915
+ /**
2916
+ * Fill source of the order for the token sale
2917
+ */
2918
+ fillSource?: string;
2919
+
2920
+ /**
2921
+ * Percentage reward given to a user for their first referral.
2922
+ */
2923
+ firstReferralReward?: number | null;
2924
+
2925
+ /**
2926
+ * Flag indicating whether the fill source is included.
2927
+ */
2928
+ hasFillSource?: boolean;
2929
+
2930
+ /**
2931
+ * Indicates if the item has never been sold.
2932
+ */
2933
+ hasNeverSold?: boolean;
2934
+
2935
+ /**
2936
+ * Indicates if the full royalty has been paid for items.
2937
+ */
2938
+ hasPaidFullRoyalty?: boolean;
2939
+
2940
+ /**
2941
+ * Flag indicating if the sale currency is included.
2942
+ */
2943
+ hasSaleCurrency?: boolean;
2944
+
2945
+ /**
2946
+ * Indicates if the user has a verified Twitter account.
2947
+ */
2948
+ hasVerifiedTwitter?: boolean;
2949
+
2950
+ /**
2951
+ * URL of the image associated with the rule.
2952
+ */
2953
+ imageUrl?: string | null;
2954
+
2955
+ /**
2956
+ * If enabled, the first transaction done on the platform will complete this rule
2957
+ */
2958
+ isCheckInOnEveryTxn?: boolean;
2959
+
2960
+ /**
2961
+ * Indicates if the multiplier has been applied to rewards.
2962
+ */
2963
+ isMultiplierApplied?: boolean;
2964
+
2965
+ /**
2966
+ * Flag indicating if the rule is restricted to new users.
2967
+ */
2968
+ isRestrictedToNewUsers?: boolean;
2969
+
2970
+ /**
2971
+ * Flag indicating if rewards are applied retroactively.
2972
+ */
2973
+ isRetroactive?: boolean | null;
2974
+
2975
+ /**
2976
+ * Flag indicating if the token hold multiplier is applied.
2977
+ */
2978
+ isTokenHoldMultiplier?: boolean;
2979
+
2980
+ /**
2981
+ * Optional link associated with the metadata.
2982
+ */
2983
+ link?: string | null;
2984
+
2985
+ /**
2986
+ * Liquidity pool details.
2987
+ */
2988
+ liquidity?: Metadata.Liquidity;
2989
+
2990
+ /**
2991
+ * Maximum quantity constraint for token holding.
2992
+ */
2993
+ maxQty?: number | null;
2994
+
2995
+ /**
2996
+ * Minimum quantity constraint for token holding.
2997
+ */
2998
+ minQty?: number | null;
2999
+
3000
+ /**
3001
+ * Array of loyalty currency IDs used for multipliers.
3002
+ */
3003
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
3004
+
3005
+ /**
3006
+ * Flag indicating whether to include only known users.
3007
+ */
3008
+ onlyKnownUsers?: boolean;
3009
+
3010
+ /**
3011
+ * Flag indicating whether to include only native tokens.
3012
+ */
3013
+ onlyNative?: boolean;
3014
+
3015
+ /**
3016
+ * Flag indicating whether to include only non-listed items.
3017
+ */
3018
+ onlyNonListed?: boolean;
3019
+
3020
+ /**
3021
+ * Indicates if only existing users are rewarded.
3022
+ */
3023
+ onlyRewardExistingUser?: boolean;
3024
+
3025
+ /**
3026
+ * give points for only one token ownership per contract
3027
+ */
3028
+ onlyRewardSingleTokenOwnership?: boolean | null;
3029
+
3030
+ /**
3031
+ * Promotional code associated with the rule.
3032
+ */
3033
+ promoCode?: string;
3034
+
3035
+ /**
3036
+ * URL of the CSV file containing promo codes.
3037
+ */
3038
+ promoCodeCsvUrl?: string;
3039
+
3040
+ /**
3041
+ * Numbers of the promotional code to be generated.
3042
+ */
3043
+ promoCodeLength?: number | null;
3044
+
3045
+ /**
3046
+ * Type of the promotional code.
3047
+ */
3048
+ promoCodeType?: 'code' | 'csv' | 'generate';
3049
+
3050
+ /**
3051
+ * Array defining ranges and corresponding rewards.
3052
+ */
3053
+ range?: Array<Metadata.Range>;
3054
+
3055
+ /**
3056
+ * Object defining referral requirements.
3057
+ */
3058
+ referralRequirements?: Metadata.ReferralRequirements | null;
3059
+
3060
+ /**
3061
+ * Lump sum reward given to a referrer.
3062
+ */
3063
+ referrerReward?: number | null;
3064
+
3065
+ /**
3066
+ * Loyalty currency ID of the referrer reward.
3067
+ */
3068
+ referrerRewardLoyaltyCurrencyId?: string | null;
3069
+
3070
+ /**
3071
+ * Flag indicating if the post link is required.
3072
+ */
3073
+ requirePostLink?: boolean | null;
3074
+
3075
+ /**
3076
+ * Flag indicating if media metadata is required.
3077
+ */
3078
+ requirePostMediaLink?: boolean | null;
3079
+
3080
+ /**
3081
+ * Flag indicating if the rule can also reward badges per range.
3082
+ */
3083
+ rewardBadgePerRange?: boolean;
3084
+
3085
+ /**
3086
+ * Flag indicating if the reward is rewarded by batch.
3087
+ */
3088
+ rewardByBatch?: boolean | null;
3089
+
3090
+ /**
3091
+ * Criteria to evaluate the reward.
3092
+ */
3093
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
3094
+
3095
+ /**
3096
+ * Flag indicating if the reward is rewarded per action.
3097
+ */
3098
+ rewardPerAction?: boolean | null;
3099
+
3100
+ /**
3101
+ * Flag indicating if rewards are given per impression.
3102
+ */
3103
+ rewardPerImpression?: boolean | null;
3104
+
3105
+ /**
3106
+ * Flag indicating if the rule should reward based on value of traded tokens
3107
+ * instead of count.
3108
+ */
3109
+ rewardPerValue?: boolean;
3110
+
3111
+ /**
3112
+ * Wallet address of the user can only be used if userId is not provided
3113
+ */
3114
+ royaltyAddress?: string;
3115
+
3116
+ /**
3117
+ * Royalty percentage of the item.
3118
+ */
3119
+ royaltyPercentage?: number;
3120
+
3121
+ /**
3122
+ * Currency associated with sales.
3123
+ */
3124
+ saleCurrency?: string;
3125
+
3126
+ /**
3127
+ * Percentage reward given for a second-level referral.
3128
+ */
3129
+ secondReferralReward?: number | null;
3130
+
3131
+ /**
3132
+ * Flag indicating if the multiplier is skipped.
3133
+ */
3134
+ skipMultiplier?: boolean | null;
3135
+
3136
+ /**
3137
+ * Object containing details of the associated smart contract.
3138
+ */
3139
+ smartContract?: Metadata.SmartContract;
3140
+
3141
+ /**
3142
+ * Array of snapshot proposals for the rule.
3143
+ */
3144
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
3145
+
3146
+ /**
3147
+ * Social media platform associated with the rule.
3148
+ */
3149
+ socialPlatform?:
3150
+ | 'Custom'
3151
+ | 'Discord'
3152
+ | 'EpicGames'
3153
+ | 'Instagram'
3154
+ | 'Steam'
3155
+ | 'Telegram'
3156
+ | 'TikTok'
3157
+ | 'Twitch'
3158
+ | 'X(Twitter)'
3159
+ | 'YouTube'
3160
+ | 'Google'
3161
+ | null;
3162
+
3163
+ /**
3164
+ * URL of the social platform's logo.
3165
+ */
3166
+ socialPlatformLogo?: string | null;
3167
+
3168
+ /**
3169
+ * Name of the social platform.
3170
+ */
3171
+ socialPlatformName?: string | null;
3172
+
3173
+ /**
3174
+ * ID of the Steam app.
3175
+ */
3176
+ steamAppId?: string | null;
3177
+
3178
+ /**
3179
+ * Array of streak milestones and corresponding rewards.
3180
+ */
3181
+ streakArray?: Array<Metadata.StreakArray> | null;
3182
+
3183
+ /**
3184
+ * Metadata for swap loyalty rules
3185
+ */
3186
+ swap?: Metadata.Swap;
3187
+
3188
+ /**
3189
+ * ID of the Telegram channel.
3190
+ */
3191
+ telegramChannelId?: string | null;
3192
+
3193
+ /**
3194
+ * Time delay in seconds to verify actions.
3195
+ */
3196
+ timeDelayToVerifySeconds?: string | number | null;
3197
+
3198
+ /**
3199
+ * Flag indicating if all contracts are tracked.
3200
+ */
3201
+ trackAllContracts?: boolean | null;
3202
+
3203
+ /**
3204
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
3205
+ * completed once the progress is 100%.
3206
+ */
3207
+ trackProgress?: boolean | null;
3208
+
3209
+ /**
3210
+ * URL of the associated Twitter account.
3211
+ */
3212
+ twitterAccountUrl?: string;
3213
+
3214
+ /**
3215
+ * Hashtag associated with the Twitter post.
3216
+ */
3217
+ twitterHashtag?: string;
3218
+
3219
+ /**
3220
+ * URL of the associated Twitter post.
3221
+ */
3222
+ twitterPostUrl?: string;
3223
+
3224
+ /**
3225
+ * Unique identifier of the Twitter user.
3226
+ */
3227
+ twitterUserId?: string;
3228
+
3229
+ /**
3230
+ * Twitter username of the user.
3231
+ */
3232
+ twitterUsername?: string;
3233
+
3234
+ /**
3235
+ * Minimum length of the verification text.
3236
+ */
3237
+ verificationTextMinimumLength?: number | null;
3238
+
3239
+ /**
3240
+ * Multiplier applied to rewards for verified users.
3241
+ */
3242
+ verifiedMultiplier?: number | null;
3243
+
3244
+ /**
3245
+ * Placeholder text for verification input fields.
3246
+ */
3247
+ verifyPlaceHolderText?: string | null;
3248
+
3249
+ /**
3250
+ * Type of wallet associated with the rule.
3251
+ */
3252
+ walletType?:
3253
+ | 'evm'
3254
+ | 'solana'
3255
+ | 'imx'
3256
+ | 'sui'
3257
+ | 'ton'
3258
+ | 'cosmos'
3259
+ | 'ultra'
3260
+ | 'agw'
3261
+ | 'flow_cadence'
3262
+ | 'substrate'
3263
+ | null;
3264
+
3265
+ /**
3266
+ * ID of the Youtube channel.
3267
+ */
3268
+ youtubeChannelId?: string | null;
3269
+
3270
+ /**
3271
+ * ID of the Youtube video.
3272
+ */
3273
+ youtubeVideoId?: string | null;
3274
+ }
3275
+
3276
+ export namespace Metadata {
3277
+ export interface Collection {
3278
+ /**
3279
+ * Blockchain address of the collection.
3280
+ */
3281
+ address?: string;
3282
+
3283
+ /**
3284
+ * Multiplier applied to the rewards for this collection.
3285
+ */
3286
+ multiplier?: number;
3287
+
3288
+ /**
3289
+ * Blockchain network of the collection.
3290
+ */
3291
+ network?:
3292
+ | 'abstract'
3293
+ | 'abstractTestnet'
3294
+ | 'apechain'
3295
+ | 'arbitrum'
3296
+ | 'avalanche'
3297
+ | 'avalancheFuji'
3298
+ | 'base'
3299
+ | 'baseSepolia'
3300
+ | 'berachain'
3301
+ | 'berachainArtio'
3302
+ | 'berachainBepolia'
3303
+ | 'binance'
3304
+ | 'bscTestnet'
3305
+ | 'campTestnet'
3306
+ | 'fantom'
3307
+ | 'fantomTestnet'
3308
+ | 'flowMainnet'
3309
+ | 'mainnet'
3310
+ | 'nexusTestnet'
3311
+ | 'optimism'
3312
+ | 'polygon'
3313
+ | 'polygon_mumbai'
3314
+ | 'skaleNebula'
3315
+ | 'skaleEuropa'
3316
+ | 'skaleCalypso'
3317
+ | 'solana'
3318
+ | 'sophon'
3319
+ | 'sophonTestnet'
3320
+ | 'sui'
3321
+ | 'superseed'
3322
+ | 'superseedSepolia'
3323
+ | 'vanar'
3324
+ | 'xai'
3325
+ | 'zksync'
3326
+ | 'coti'
3327
+ | 'cotiTestnet'
3328
+ | 'morph'
3329
+ | 'morphTestnet'
3330
+ | 'morphHolesky'
3331
+ | 'ultra'
3332
+ | 'ultraTestnet'
3333
+ | 'nitrograph'
3334
+ | 'sepolia'
3335
+ | 'optimism_sepolia'
3336
+ | 'arbitrumSepolia'
3337
+ | 'goerli'
3338
+ | 'optimism_goerli'
3339
+ | 'arbitrumGoerli'
3340
+ | 'basecamp'
3341
+ | 'somnia'
3342
+ | 'polkadot'
3343
+ | 'kusama'
3344
+ | 'flow_cadence';
3345
+ }
3346
+
3347
+ /**
3348
+ * Object containing details for the call-to-action.
3349
+ */
3350
+ export interface Cta {
3351
+ /**
3352
+ * Link for the call-to-action.
3353
+ */
3354
+ href?: string | null;
3355
+
3356
+ /**
3357
+ * Label for the call-to-action.
3358
+ */
3359
+ label?: string | null;
3360
+ }
3361
+
3362
+ export interface DiscordServersToJoin {
3363
+ /**
3364
+ * ID of the Discord server to join.
3365
+ */
3366
+ id?: string;
3367
+
3368
+ /**
3369
+ * Array of Discord channels to join.
3370
+ */
3371
+ channels?: Array<DiscordServersToJoin.Channel>;
3372
+
3373
+ /**
3374
+ * Array of roles to assign in the Discord server.
3375
+ */
3376
+ roles?: Array<DiscordServersToJoin.Role>;
3377
+ }
3378
+
3379
+ export namespace DiscordServersToJoin {
3380
+ export interface Channel {
3381
+ /**
3382
+ * ID of the Discord channel.
3383
+ */
3384
+ id?: string;
3385
+
3386
+ /**
3387
+ * Array of emojis used in the channel.
3388
+ */
3389
+ emojis?: Array<Channel.Emoji>;
3390
+
3391
+ /**
3392
+ * Phrase of text to be present in the discord message
3393
+ */
3394
+ text?: string;
3395
+ }
3396
+
3397
+ export namespace Channel {
3398
+ export interface Emoji {
3399
+ /**
3400
+ * ID of the emoji used in the channel.
3401
+ */
3402
+ id?: string;
3403
+ }
3404
+ }
3405
+
3406
+ export interface Role {
3407
+ /**
3408
+ * ID of the role in the Discord server.
3409
+ */
3410
+ id: string;
3411
+ }
3412
+ }
3413
+
3414
+ export interface DripQuestsToComplete {
3415
+ /**
3416
+ * ID of the drip quest to complete.
3417
+ */
3418
+ id: string;
3419
+ }
3420
+
3421
+ /**
3422
+ * Liquidity pool details.
3423
+ */
3424
+ export interface Liquidity {
3425
+ /**
3426
+ * Calculation type of the liquidity pool.
3427
+ */
3428
+ calculationType?: 'fixed' | 'custom';
3429
+
3430
+ /**
3431
+ * Custom function to calculate the the reward amount based on the liquidity
3432
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
3433
+ * USD.
3434
+ */
3435
+ customFunction?: string;
3436
+
3437
+ /**
3438
+ * Liquidity provided per day in USD
3439
+ */
3440
+ liquidityPerDay?: number;
3441
+
3442
+ /**
3443
+ * Blockchain network of the liquidity pool.
3444
+ */
3445
+ network?:
3446
+ | 'abstract'
3447
+ | 'abstractTestnet'
3448
+ | 'apechain'
3449
+ | 'arbitrum'
3450
+ | 'avalanche'
3451
+ | 'avalancheFuji'
3452
+ | 'base'
3453
+ | 'baseSepolia'
3454
+ | 'berachain'
3455
+ | 'berachainArtio'
3456
+ | 'berachainBepolia'
3457
+ | 'binance'
3458
+ | 'bscTestnet'
3459
+ | 'campTestnet'
3460
+ | 'fantom'
3461
+ | 'fantomTestnet'
3462
+ | 'flowMainnet'
3463
+ | 'mainnet'
3464
+ | 'nexusTestnet'
3465
+ | 'optimism'
3466
+ | 'polygon'
3467
+ | 'polygon_mumbai'
3468
+ | 'skaleNebula'
3469
+ | 'skaleEuropa'
3470
+ | 'skaleCalypso'
3471
+ | 'solana'
3472
+ | 'sophon'
3473
+ | 'sophonTestnet'
3474
+ | 'sui'
3475
+ | 'superseed'
3476
+ | 'superseedSepolia'
3477
+ | 'vanar'
3478
+ | 'xai'
3479
+ | 'zksync'
3480
+ | 'coti'
3481
+ | 'cotiTestnet'
3482
+ | 'morph'
3483
+ | 'morphTestnet'
3484
+ | 'morphHolesky'
3485
+ | 'ultra'
3486
+ | 'ultraTestnet'
3487
+ | 'nitrograph'
3488
+ | 'sepolia'
3489
+ | 'optimism_sepolia'
3490
+ | 'arbitrumSepolia'
3491
+ | 'goerli'
3492
+ | 'optimism_goerli'
3493
+ | 'arbitrumGoerli'
3494
+ | 'basecamp'
3495
+ | 'somnia'
3496
+ | 'polkadot'
3497
+ | 'kusama'
3498
+ | 'flow_cadence';
3499
+
3500
+ /**
3501
+ * Indicates if only in-range liquidity is rewarded.
3502
+ */
3503
+ onlyRewardInRangeLiquidity?: boolean;
3504
+
3505
+ /**
3506
+ * Array of liquidity pools associated with the rule.
3507
+ */
3508
+ pools?: Array<Liquidity.Pool>;
3509
+
3510
+ /**
3511
+ * Protocol of the liquidity pool.
3512
+ */
3513
+ protocol?: string;
3514
+ }
3515
+
3516
+ export namespace Liquidity {
3517
+ export interface Pool {
3518
+ /**
3519
+ * Unique identifier of the liquidity pool.
3520
+ */
3521
+ id: string;
3522
+ }
3523
+ }
3524
+
3525
+ export interface Range {
3526
+ /**
3527
+ * Reward amount for this range.
3528
+ */
3529
+ amount: number;
3530
+
3531
+ /**
3532
+ * End value of the range.
3533
+ */
3534
+ endRange: number;
3535
+
3536
+ /**
3537
+ * Start value of the range.
3538
+ */
3539
+ startRange: number;
3540
+
3541
+ /**
3542
+ * ID of the loyalty badge for this range.
3543
+ */
3544
+ loyaltyBadgeId?: string;
3545
+
3546
+ /**
3547
+ * Amount of the loyalty multiplier for this range.
3548
+ */
3549
+ loyaltyMultiplierAmount?: number;
3550
+ }
3551
+
3552
+ /**
3553
+ * Object defining referral requirements.
3554
+ */
3555
+ export interface ReferralRequirements {
3556
+ /**
3557
+ * Flag indicating if achieving points is required.
3558
+ */
3559
+ achievePoints?: boolean | null;
3560
+
3561
+ /**
3562
+ * Flag indicating if completing the profile is required.
3563
+ */
3564
+ completeProfile?: boolean | null;
3565
+
3566
+ /**
3567
+ * Flag indicating if connecting Discord is required.
3568
+ */
3569
+ connectDiscord?: boolean | null;
3570
+
3571
+ /**
3572
+ * Flag indicating if connecting email is required.
3573
+ */
3574
+ connectEmail?: boolean | null;
3575
+
3576
+ /**
3577
+ * Flag indicating if connecting Twitter is required.
3578
+ */
3579
+ connectTwitter?: boolean | null;
3580
+
3581
+ points?: ReferralRequirements.Points | null;
3582
+ }
3583
+
3584
+ export namespace ReferralRequirements {
3585
+ export interface Points {
3586
+ /**
3587
+ * Points required for referral.
3588
+ */
3589
+ amount?: number | null;
3590
+
3591
+ /**
3592
+ * ID of the loyalty currency for referral.
3593
+ */
3594
+ loyaltyCurrecyId?: string | null;
3595
+ }
3596
+ }
3597
+
3598
+ /**
3599
+ * Object containing details of the associated smart contract.
3600
+ */
3601
+ export interface SmartContract {
3602
+ /**
3603
+ * Mapping of addresses for the smart contract.
3604
+ */
3605
+ addressMapping?: string | null;
3606
+
3607
+ /**
3608
+ * Object containing details of the amount multiplier from the event.
3609
+ */
3610
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3611
+
3612
+ /**
3613
+ * ID of the smart contract.
3614
+ */
3615
+ contractId?: string | null;
3616
+
3617
+ /**
3618
+ * Criteria to evaluate the smart contract event.
3619
+ */
3620
+ criteria?: 'everyEvent' | 'byParameter' | null;
3621
+
3622
+ /**
3623
+ * Event emitted by the smart contract.
3624
+ */
3625
+ event?: string | null;
3626
+
3627
+ /**
3628
+ * Array of parameters for the smart contract.
3629
+ */
3630
+ params?: Array<SmartContract.Param> | null;
3631
+
3632
+ /**
3633
+ * Type of the smart contract interaction.
3634
+ */
3635
+ type?: 'function' | 'event' | null;
3636
+ }
3637
+
3638
+ export namespace SmartContract {
3639
+ /**
3640
+ * Object containing details of the amount multiplier from the event.
3641
+ */
3642
+ export interface AmountMultiplier {
3643
+ /**
3644
+ * Mapping of the value for the smart contract.
3645
+ */
3646
+ valueMapping?: string | null;
3647
+ }
3648
+
3649
+ export interface Param {
3650
+ /**
3651
+ * Condition to check for the parameter.
3652
+ */
3653
+ condition?: string | null;
3654
+
3655
+ /**
3656
+ * Name of the smart contract parameter.
3657
+ */
3658
+ name?: string | null;
3659
+
3660
+ /**
3661
+ * Value of the parameter.
3662
+ */
3663
+ value?: string | null;
3664
+ }
3665
+ }
3666
+
3667
+ export interface SnapshotProposal {
3668
+ /**
3669
+ * ID of the snapshot proposal.
3670
+ */
3671
+ id: string;
3672
+
3673
+ /**
3674
+ * Space associated with the snapshot proposal.
3675
+ */
3676
+ space: string;
3677
+ }
3678
+
3679
+ export interface StreakArray {
3680
+ /**
3681
+ * Reward amount for achieving the streak milestone.
3682
+ */
3683
+ streakAmount: number;
3684
+
3685
+ /**
3686
+ * Milestone required to achieve the streak.
3687
+ */
3688
+ streakMilestone: number;
3689
+ }
3690
+
3691
+ /**
3692
+ * Metadata for swap loyalty rules
3693
+ */
3694
+ export interface Swap {
3695
+ provider?: 'any' | 'relay' | 'lifi';
3696
+
3697
+ relayReferrerId?: string;
3698
+
3699
+ requireCrossChainSwap?: boolean;
3700
+
3701
+ swappedToChain?: 'any' | number | string;
3702
+
3703
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1915
3704
 
1916
- /**
1917
- * Optional metadata for the loyalty rule
1918
- */
1919
- metadata?: Record<string, unknown>;
3705
+ tokenMode?: 'any' | 'specific';
3706
+
3707
+ trackTokenAmount?: boolean;
3708
+ }
3709
+
3710
+ export namespace Swap {
3711
+ export interface SwappedToToken {
3712
+ address: string;
3713
+
3714
+ chainId: string;
3715
+ }
3716
+ }
3717
+ }
1920
3718
  }
1921
3719
  }
1922
3720
 
@@ -1927,7 +3725,9 @@ export interface RuleDeleteResponse {
1927
3725
  }
1928
3726
 
1929
3727
  export interface RuleCompleteResponse {
1930
- message: string;
3728
+ message:
3729
+ | 'Completion request added to queue'
3730
+ | 'Link click being verified, come back later to check the status';
1931
3731
  }
1932
3732
 
1933
3733
  export interface RuleGetStatusResponse {
@@ -1938,11 +3738,119 @@ export namespace RuleGetStatusResponse {
1938
3738
  export interface Data {
1939
3739
  loyaltyRuleId: string;
1940
3740
 
1941
- status: 'pending' | 'processing' | 'completed' | 'failed';
1942
-
1943
3741
  userId: string;
1944
3742
 
3743
+ /**
3744
+ * The ID of the loyalty rule status for the Progress object
3745
+ */
3746
+ id?: string;
3747
+
3748
+ createdAt?: string;
3749
+
3750
+ fulfilledAt?: string | null;
3751
+
3752
+ /**
3753
+ * Categorized examples of messages that may be returned for a loyalty rule's
3754
+ * processing result.
3755
+ *
3756
+ * User Onboarding
3757
+ *
3758
+ * - Check In: "Streak successful"
3759
+ * - Complete Profile Details: "Profile not complete"
3760
+ *
3761
+ * Connect Accounts
3762
+ *
3763
+ * - Connect TikTok: "TikTok not connected"
3764
+ * - Connect Discord: "Discord not connected", "Discord request timeout"
3765
+ * - Connect X: "Twitter not connected", "Twitter not connected or content url is
3766
+ * required"
3767
+ * - Connect Email: "Email address not connected"
3768
+ * - Connect Telegram: "Telegram not connected", "user has not setup telegram (no
3769
+ * telegramUsername), please setup username in telegram and reconnect.",
3770
+ * "Telegram request rate-limited"
3771
+ * - Connect Steam: "Steam not connected"
3772
+ * - Connect Youtube: "Youtube not connected"
3773
+ *
3774
+ * Social Quests
3775
+ *
3776
+ * - Join Telegram Group: "Telegram Channel not joined", "Telegram Channel joined
3777
+ * successfully"
3778
+ * - Post on TikTok: "TikTok post not verified"
3779
+ * - Comment on an X Post: "Quest Completed: You have commented on the tweet",
3780
+ * "Quest Not Completed: Comment not found for the specified tweet"
3781
+ * - Repost an X Post: "Quest Completed: You have retweeted the tweet", "Quest Not
3782
+ * Completed: Retweet not found for the specified tweet", "Quest Completed: You
3783
+ * have retweeted and commented on the tweet", "Quest Not Completed: You have not
3784
+ * retweeted or commented on the tweet"
3785
+ * - Follow an X Account: "Missing required parameters: twitterUserId,
3786
+ * targetUsername", "Quest Completed: You are a follower of
3787
+ * @${targetUsername}", "Quest Not Completed: Please follow @${targetUsername}
3788
+ * and try again in few minutes"
3789
+ * - React to an X Post: "Missing required parameters: texts, twitterUserId,
3790
+ * userTweetId", "No text provided", "Quest Completed: You have posted {tweetId}
3791
+ * a tweet with the text {text}", "Quest Not Completed: Your all previous {COUNT}
3792
+ * posts are already claimed. Please post a new tweet and try again in a few
3793
+ * minutes.", "Tweet is already claimed", "Tweet does not belong to the user",
3794
+ * "Text not found in tweet", "Tweet is before the quest start time", "Tweet does
3795
+ * not have media", "Text found in tweet"
3796
+ * - Add Text to X Bio: "Missing required parameters: texts, twitterUserId", "User
3797
+ * not found", "Text found in bio", "Text not found in bio"
3798
+ * - Add Text to X Username: "Missing required parameters: texts, twitterUserId",
3799
+ * "User not found", "Text found in username", "Text not found in username"
3800
+ * - Comment on an X Post with Text: "Missing required parameters: texts,
3801
+ * twitterUserId", "Comment is already claimed", "Text found in comment", "Text
3802
+ * not found in comment", "Tweet not found or could not be retrieved"
3803
+ * - Comment on a YouTube Video: "Youtube comment added", "Youtube comment not
3804
+ * added"
3805
+ * - Subscribe to a YouTube Channel: "Youtube channel subscribed", "Quest failed,
3806
+ * please make sure you have made your subscriptions public in youtube"
3807
+ * - Get X post impressions: "You've already claimed the reward for this impression
3808
+ * range."
3809
+ * - Add an Item to Steam Wishlist: "Steam Wishlist item added", "Steam Wishlist
3810
+ * item not added"
3811
+ *
3812
+ * Complex Onchain Logic
3813
+ *
3814
+ * - Token Swap: "Swap rewards calculated successfully", "Swap rule failed"
3815
+ *
3816
+ * Other
3817
+ *
3818
+ * - Answer a Quiz: "Quiz question not configured", "No question response found",
3819
+ * "Incorrect answer", "Correct answer"
3820
+ * - Answer a Poll: "Poll question not configured", "Poll response recorded"
3821
+ * - Spend in Shopify Store: "Shopify not connected"
3822
+ * - Points Airdrop: "Seems like you're not eligible for this points airdrop."
3823
+ *
3824
+ * General
3825
+ *
3826
+ * - "Quest already completed"
3827
+ * - "Quest already completed using the same social account (${socialAccountName}),
3828
+ * with the different user."
3829
+ * - "You've already claimed the reward for this quest."
3830
+ * - "Quest not achieved, please try again."
3831
+ * - "Rule is not setup"
3832
+ * - "Request aborted due to timeout"
3833
+ * - "Google account not connected"
3834
+ * - "Claim failed: Multiplier is already active"
3835
+ */
1945
3836
  message?: string;
3837
+
3838
+ organizationId?: string;
3839
+
3840
+ /**
3841
+ * The progress of the loyalty rule from 0 to 100
3842
+ */
3843
+ progress?: number;
3844
+
3845
+ /**
3846
+ * Status of the queued job, this is only returned if the job is queued and being
3847
+ * processed, this wil be retained for 10 minutes after the job is completed
3848
+ */
3849
+ status?: 'pending' | 'processing' | 'completed' | 'failed';
3850
+
3851
+ updatedAt?: string;
3852
+
3853
+ websiteId?: string;
1946
3854
  }
1947
3855
  }
1948
3856
 
@@ -2053,7 +3961,22 @@ export interface RuleCreateParams {
2053
3961
  | 'twitter_like'
2054
3962
  | 'twitter_post_hashtag'
2055
3963
  | 'quiz'
2056
- | 'poll';
3964
+ | 'poll'
3965
+ | 'steam_wishlist'
3966
+ | 'liquidity_uniswap_v2'
3967
+ | 'liquidity_uniswap_v3'
3968
+ | 'points_airdrop'
3969
+ | 'youtube_subscribers'
3970
+ | 'youtube_comment'
3971
+ | 'shopify_spend'
3972
+ | 'swap'
3973
+ | 'tiktok_post'
3974
+ | 'post_impressions'
3975
+ | 'discord_join'
3976
+ | 'connected_youtube'
3977
+ | 'stratus_function'
3978
+ | 'connected_tiktok'
3979
+ | 'tiktok_follow';
2057
3980
 
2058
3981
  /**
2059
3982
  * Unique identifier for the associated website
@@ -2065,6 +3988,11 @@ export interface RuleCreateParams {
2065
3988
  */
2066
3989
  backgroundAssetUrl?: string;
2067
3990
 
3991
+ /**
3992
+ * The type of claim for the reward
3993
+ */
3994
+ claimType?: 'manual' | 'auto' | null;
3995
+
2068
3996
  /**
2069
3997
  * Blockchain address of the associated collection
2070
3998
  */
@@ -2090,6 +4018,18 @@ export interface RuleCreateParams {
2090
4018
  */
2091
4019
  description?: string;
2092
4020
 
4021
+ duplicatedFromId?: string | null;
4022
+
4023
+ /**
4024
+ * ID of the external integration
4025
+ */
4026
+ externalIntegrationId?: string | null;
4027
+
4028
+ /**
4029
+ * Optional stratus function id for the rule
4030
+ */
4031
+ functionId?: string | null;
4032
+
2093
4033
  /**
2094
4034
  * Whether to hide this rule in the user interface
2095
4035
  */
@@ -2098,18 +4038,40 @@ export interface RuleCreateParams {
2098
4038
  /**
2099
4039
  * Interval between rule executions
2100
4040
  */
2101
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
4041
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
2102
4042
 
2103
4043
  /**
2104
4044
  * Whether this rule is mandatory
2105
4045
  */
2106
4046
  isRequired?: boolean;
2107
4047
 
4048
+ /**
4049
+ * Unique identifier for the loyalty badge
4050
+ */
4051
+ loyaltyBadgeId?: string | null;
4052
+
2108
4053
  /**
2109
4054
  * Unique identifier for the loyalty rule group
2110
4055
  */
2111
4056
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
2112
4057
 
4058
+ /**
4059
+ * URL for uploading loyalty user allotment via CSV
4060
+ */
4061
+ loyaltyUserAllotmentCsvUrl?: string;
4062
+
4063
+ /**
4064
+ * The interval for the max amount. Available for the smart contract and external
4065
+ * rules.
4066
+ */
4067
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
4068
+
4069
+ /**
4070
+ * The maximum amount of points a user can earn per interval. Available for the
4071
+ * smart contract and external rules.
4072
+ */
4073
+ maxAmountPerInterval?: number | null;
4074
+
2113
4075
  /**
2114
4076
  * URL of the media to be displayed
2115
4077
  */
@@ -2119,13 +4081,17 @@ export interface RuleCreateParams {
2119
4081
  * Blockchain network where the rule will apply
2120
4082
  */
2121
4083
  network?:
4084
+ | 'abstract'
4085
+ | 'abstractTestnet'
2122
4086
  | 'apechain'
2123
4087
  | 'arbitrum'
2124
4088
  | 'avalanche'
2125
4089
  | 'avalancheFuji'
2126
4090
  | 'base'
2127
4091
  | 'baseSepolia'
4092
+ | 'berachain'
2128
4093
  | 'berachainArtio'
4094
+ | 'berachainBepolia'
2129
4095
  | 'binance'
2130
4096
  | 'bscTestnet'
2131
4097
  | 'campTestnet'
@@ -2133,18 +4099,30 @@ export interface RuleCreateParams {
2133
4099
  | 'fantomTestnet'
2134
4100
  | 'flowMainnet'
2135
4101
  | 'mainnet'
4102
+ | 'nexusTestnet'
2136
4103
  | 'optimism'
2137
4104
  | 'polygon'
2138
4105
  | 'polygon_mumbai'
2139
4106
  | 'skaleNebula'
4107
+ | 'skaleEuropa'
4108
+ | 'skaleCalypso'
2140
4109
  | 'solana'
2141
4110
  | 'sophon'
4111
+ | 'sophonTestnet'
2142
4112
  | 'sui'
2143
4113
  | 'superseed'
2144
4114
  | 'superseedSepolia'
2145
4115
  | 'vanar'
2146
4116
  | 'xai'
2147
4117
  | 'zksync'
4118
+ | 'coti'
4119
+ | 'cotiTestnet'
4120
+ | 'morph'
4121
+ | 'morphTestnet'
4122
+ | 'morphHolesky'
4123
+ | 'ultra'
4124
+ | 'ultraTestnet'
4125
+ | 'nitrograph'
2148
4126
  | 'sepolia'
2149
4127
  | 'optimism_sepolia'
2150
4128
  | 'arbitrumSepolia'
@@ -2152,22 +4130,40 @@ export interface RuleCreateParams {
2152
4130
  | 'optimism_goerli'
2153
4131
  | 'arbitrumGoerli'
2154
4132
  | 'basecamp'
2155
- | 'abstract';
4133
+ | 'somnia'
4134
+ | 'polkadot'
4135
+ | 'kusama'
4136
+ | 'flow_cadence';
2156
4137
 
2157
4138
  /**
2158
4139
  * OAuth credentials associated with the rule
2159
4140
  */
2160
4141
  oauthCredentialsId?: string | null;
2161
4142
 
4143
+ /**
4144
+ * The lifetime of the reward
4145
+ */
4146
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
4147
+
2162
4148
  /**
2163
4149
  * Type of reward issued by the rule
2164
4150
  */
2165
- rewardType?: 'points' | 'multiplier';
4151
+ rewardType?: 'points' | 'multiplier' | 'badge';
4152
+
4153
+ /**
4154
+ * URL of the Shopify store
4155
+ */
4156
+ shopifyStoreUrl?: string | null;
4157
+
4158
+ /**
4159
+ * Whether to show this rule before the start time
4160
+ */
4161
+ showBeforeStart?: boolean;
2166
4162
 
2167
4163
  /**
2168
- * Identifier for associated subscriptions
4164
+ * Optional stratus subscription id for the rule
2169
4165
  */
2170
- subscriptionIdentifier?: string | null;
4166
+ subscriptionId?: string | null;
2171
4167
  }
2172
4168
 
2173
4169
  export namespace RuleCreateParams {
@@ -2175,6 +4171,11 @@ export namespace RuleCreateParams {
2175
4171
  * Additional metadata for the loyalty rule
2176
4172
  */
2177
4173
  export interface Metadata {
4174
+ /**
4175
+ * Number of tokens per batch.
4176
+ */
4177
+ batchSize?: number | null;
4178
+
2178
4179
  /**
2179
4180
  * Text displayed on the action button.
2180
4181
  */
@@ -2198,7 +4199,7 @@ export namespace RuleCreateParams {
2198
4199
  /**
2199
4200
  * Text to check in the Twitter post, username, or bio.
2200
4201
  */
2201
- checkText?: string | null;
4202
+ checkText?: string | Array<string> | null;
2202
4203
 
2203
4204
  /**
2204
4205
  * Array of collections associated with the rule.
@@ -2208,7 +4209,12 @@ export namespace RuleCreateParams {
2208
4209
  /**
2209
4210
  * Conditions for completing the profile.
2210
4211
  */
2211
- completeProfileConditions?: Record<string, boolean> | null;
4212
+ completeProfileConditions?: { [key: string]: boolean } | null;
4213
+
4214
+ /**
4215
+ * Description of the external rule condition (only for external rules)
4216
+ */
4217
+ conditionDescription?: string;
2212
4218
 
2213
4219
  /**
2214
4220
  * Object containing details for the call-to-action.
@@ -2220,6 +4226,11 @@ export namespace RuleCreateParams {
2220
4226
  */
2221
4227
  customRewardsApiKey?: string;
2222
4228
 
4229
+ /**
4230
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
4231
+ */
4232
+ directRpc?: boolean;
4233
+
2223
4234
  /**
2224
4235
  * Array of Discord servers, channels, and roles to join.
2225
4236
  */
@@ -2245,6 +4256,11 @@ export namespace RuleCreateParams {
2245
4256
  */
2246
4257
  enableVerifiedMultiplier?: boolean;
2247
4258
 
4259
+ /**
4260
+ * Type of ERC20 token for the loyalty rule.
4261
+ */
4262
+ erc20Type?: 'erc20' | 'native';
4263
+
2248
4264
  /**
2249
4265
  * Fill source of the order for the token sale
2250
4266
  */
@@ -2265,11 +4281,6 @@ export namespace RuleCreateParams {
2265
4281
  */
2266
4282
  hasNeverSold?: boolean;
2267
4283
 
2268
- /**
2269
- * Flag indicating whether the order source is included.
2270
- */
2271
- hasOrderSource?: boolean;
2272
-
2273
4284
  /**
2274
4285
  * Indicates if the full royalty has been paid for items.
2275
4286
  */
@@ -2290,11 +4301,21 @@ export namespace RuleCreateParams {
2290
4301
  */
2291
4302
  imageUrl?: string | null;
2292
4303
 
4304
+ /**
4305
+ * If enabled, the first transaction done on the platform will complete this rule
4306
+ */
4307
+ isCheckInOnEveryTxn?: boolean;
4308
+
2293
4309
  /**
2294
4310
  * Indicates if the multiplier has been applied to rewards.
2295
4311
  */
2296
4312
  isMultiplierApplied?: boolean;
2297
4313
 
4314
+ /**
4315
+ * Flag indicating if the rule is restricted to new users.
4316
+ */
4317
+ isRestrictedToNewUsers?: boolean;
4318
+
2298
4319
  /**
2299
4320
  * Flag indicating if rewards are applied retroactively.
2300
4321
  */
@@ -2310,6 +4331,11 @@ export namespace RuleCreateParams {
2310
4331
  */
2311
4332
  link?: string | null;
2312
4333
 
4334
+ /**
4335
+ * Liquidity pool details.
4336
+ */
4337
+ liquidity?: Metadata.Liquidity;
4338
+
2313
4339
  /**
2314
4340
  * Maximum quantity constraint for token holding.
2315
4341
  */
@@ -2351,14 +4377,24 @@ export namespace RuleCreateParams {
2351
4377
  onlyRewardSingleTokenOwnership?: boolean | null;
2352
4378
 
2353
4379
  /**
2354
- * Order source of the order for the token sale
4380
+ * Promotional code associated with the rule.
2355
4381
  */
2356
- orderSource?: string;
4382
+ promoCode?: string;
2357
4383
 
2358
4384
  /**
2359
- * Promotional code associated with the rule.
4385
+ * URL of the CSV file containing promo codes.
2360
4386
  */
2361
- promoCode?: string;
4387
+ promoCodeCsvUrl?: string;
4388
+
4389
+ /**
4390
+ * Numbers of the promotional code to be generated.
4391
+ */
4392
+ promoCodeLength?: number | null;
4393
+
4394
+ /**
4395
+ * Type of the promotional code.
4396
+ */
4397
+ promoCodeType?: 'code' | 'csv' | 'generate';
2362
4398
 
2363
4399
  /**
2364
4400
  * Array defining ranges and corresponding rewards.
@@ -2375,11 +4411,62 @@ export namespace RuleCreateParams {
2375
4411
  */
2376
4412
  referrerReward?: number | null;
2377
4413
 
4414
+ /**
4415
+ * Loyalty currency ID of the referrer reward.
4416
+ */
4417
+ referrerRewardLoyaltyCurrencyId?: string | null;
4418
+
4419
+ /**
4420
+ * Flag indicating if the post link is required.
4421
+ */
4422
+ requirePostLink?: boolean | null;
4423
+
4424
+ /**
4425
+ * Flag indicating if media metadata is required.
4426
+ */
4427
+ requirePostMediaLink?: boolean | null;
4428
+
4429
+ /**
4430
+ * Flag indicating if the rule can also reward badges per range.
4431
+ */
4432
+ rewardBadgePerRange?: boolean;
4433
+
4434
+ /**
4435
+ * Flag indicating if the reward is rewarded by batch.
4436
+ */
4437
+ rewardByBatch?: boolean | null;
4438
+
4439
+ /**
4440
+ * Criteria to evaluate the reward.
4441
+ */
4442
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
4443
+
4444
+ /**
4445
+ * Flag indicating if the reward is rewarded per action.
4446
+ */
4447
+ rewardPerAction?: boolean | null;
4448
+
2378
4449
  /**
2379
4450
  * Flag indicating if rewards are given per impression.
2380
4451
  */
2381
4452
  rewardPerImpression?: boolean | null;
2382
4453
 
4454
+ /**
4455
+ * Flag indicating if the rule should reward based on value of traded tokens
4456
+ * instead of count.
4457
+ */
4458
+ rewardPerValue?: boolean;
4459
+
4460
+ /**
4461
+ * Wallet address of the user can only be used if userId is not provided
4462
+ */
4463
+ royaltyAddress?: string;
4464
+
4465
+ /**
4466
+ * Royalty percentage of the item.
4467
+ */
4468
+ royaltyPercentage?: number;
4469
+
2383
4470
  /**
2384
4471
  * Currency associated with sales.
2385
4472
  */
@@ -2419,6 +4506,7 @@ export namespace RuleCreateParams {
2419
4506
  | 'Twitch'
2420
4507
  | 'X(Twitter)'
2421
4508
  | 'YouTube'
4509
+ | 'Google'
2422
4510
  | null;
2423
4511
 
2424
4512
  /**
@@ -2431,11 +4519,21 @@ export namespace RuleCreateParams {
2431
4519
  */
2432
4520
  socialPlatformName?: string | null;
2433
4521
 
4522
+ /**
4523
+ * ID of the Steam app.
4524
+ */
4525
+ steamAppId?: string | null;
4526
+
2434
4527
  /**
2435
4528
  * Array of streak milestones and corresponding rewards.
2436
4529
  */
2437
4530
  streakArray?: Array<Metadata.StreakArray> | null;
2438
4531
 
4532
+ /**
4533
+ * Metadata for swap loyalty rules
4534
+ */
4535
+ swap?: Metadata.Swap;
4536
+
2439
4537
  /**
2440
4538
  * ID of the Telegram channel.
2441
4539
  */
@@ -2451,6 +4549,12 @@ export namespace RuleCreateParams {
2451
4549
  */
2452
4550
  trackAllContracts?: boolean | null;
2453
4551
 
4552
+ /**
4553
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
4554
+ * completed once the progress is 100%.
4555
+ */
4556
+ trackProgress?: boolean | null;
4557
+
2454
4558
  /**
2455
4559
  * URL of the associated Twitter account.
2456
4560
  */
@@ -2494,7 +4598,28 @@ export namespace RuleCreateParams {
2494
4598
  /**
2495
4599
  * Type of wallet associated with the rule.
2496
4600
  */
2497
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
4601
+ walletType?:
4602
+ | 'evm'
4603
+ | 'solana'
4604
+ | 'imx'
4605
+ | 'sui'
4606
+ | 'ton'
4607
+ | 'cosmos'
4608
+ | 'ultra'
4609
+ | 'agw'
4610
+ | 'flow_cadence'
4611
+ | 'substrate'
4612
+ | null;
4613
+
4614
+ /**
4615
+ * ID of the Youtube channel.
4616
+ */
4617
+ youtubeChannelId?: string | null;
4618
+
4619
+ /**
4620
+ * ID of the Youtube video.
4621
+ */
4622
+ youtubeVideoId?: string | null;
2498
4623
  }
2499
4624
 
2500
4625
  export namespace Metadata {
@@ -2513,13 +4638,17 @@ export namespace RuleCreateParams {
2513
4638
  * Blockchain network of the collection.
2514
4639
  */
2515
4640
  network?:
4641
+ | 'abstract'
4642
+ | 'abstractTestnet'
2516
4643
  | 'apechain'
2517
4644
  | 'arbitrum'
2518
4645
  | 'avalanche'
2519
4646
  | 'avalancheFuji'
2520
4647
  | 'base'
2521
4648
  | 'baseSepolia'
4649
+ | 'berachain'
2522
4650
  | 'berachainArtio'
4651
+ | 'berachainBepolia'
2523
4652
  | 'binance'
2524
4653
  | 'bscTestnet'
2525
4654
  | 'campTestnet'
@@ -2527,18 +4656,30 @@ export namespace RuleCreateParams {
2527
4656
  | 'fantomTestnet'
2528
4657
  | 'flowMainnet'
2529
4658
  | 'mainnet'
4659
+ | 'nexusTestnet'
2530
4660
  | 'optimism'
2531
4661
  | 'polygon'
2532
4662
  | 'polygon_mumbai'
2533
4663
  | 'skaleNebula'
4664
+ | 'skaleEuropa'
4665
+ | 'skaleCalypso'
2534
4666
  | 'solana'
2535
4667
  | 'sophon'
4668
+ | 'sophonTestnet'
2536
4669
  | 'sui'
2537
4670
  | 'superseed'
2538
4671
  | 'superseedSepolia'
2539
4672
  | 'vanar'
2540
4673
  | 'xai'
2541
4674
  | 'zksync'
4675
+ | 'coti'
4676
+ | 'cotiTestnet'
4677
+ | 'morph'
4678
+ | 'morphTestnet'
4679
+ | 'morphHolesky'
4680
+ | 'ultra'
4681
+ | 'ultraTestnet'
4682
+ | 'nitrograph'
2542
4683
  | 'sepolia'
2543
4684
  | 'optimism_sepolia'
2544
4685
  | 'arbitrumSepolia'
@@ -2546,7 +4687,10 @@ export namespace RuleCreateParams {
2546
4687
  | 'optimism_goerli'
2547
4688
  | 'arbitrumGoerli'
2548
4689
  | 'basecamp'
2549
- | 'abstract';
4690
+ | 'somnia'
4691
+ | 'polkadot'
4692
+ | 'kusama'
4693
+ | 'flow_cadence';
2550
4694
  }
2551
4695
 
2552
4696
  /**
@@ -2623,6 +4767,110 @@ export namespace RuleCreateParams {
2623
4767
  id: string;
2624
4768
  }
2625
4769
 
4770
+ /**
4771
+ * Liquidity pool details.
4772
+ */
4773
+ export interface Liquidity {
4774
+ /**
4775
+ * Calculation type of the liquidity pool.
4776
+ */
4777
+ calculationType?: 'fixed' | 'custom';
4778
+
4779
+ /**
4780
+ * Custom function to calculate the the reward amount based on the liquidity
4781
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
4782
+ * USD.
4783
+ */
4784
+ customFunction?: string;
4785
+
4786
+ /**
4787
+ * Liquidity provided per day in USD
4788
+ */
4789
+ liquidityPerDay?: number;
4790
+
4791
+ /**
4792
+ * Blockchain network of the liquidity pool.
4793
+ */
4794
+ network?:
4795
+ | 'abstract'
4796
+ | 'abstractTestnet'
4797
+ | 'apechain'
4798
+ | 'arbitrum'
4799
+ | 'avalanche'
4800
+ | 'avalancheFuji'
4801
+ | 'base'
4802
+ | 'baseSepolia'
4803
+ | 'berachain'
4804
+ | 'berachainArtio'
4805
+ | 'berachainBepolia'
4806
+ | 'binance'
4807
+ | 'bscTestnet'
4808
+ | 'campTestnet'
4809
+ | 'fantom'
4810
+ | 'fantomTestnet'
4811
+ | 'flowMainnet'
4812
+ | 'mainnet'
4813
+ | 'nexusTestnet'
4814
+ | 'optimism'
4815
+ | 'polygon'
4816
+ | 'polygon_mumbai'
4817
+ | 'skaleNebula'
4818
+ | 'skaleEuropa'
4819
+ | 'skaleCalypso'
4820
+ | 'solana'
4821
+ | 'sophon'
4822
+ | 'sophonTestnet'
4823
+ | 'sui'
4824
+ | 'superseed'
4825
+ | 'superseedSepolia'
4826
+ | 'vanar'
4827
+ | 'xai'
4828
+ | 'zksync'
4829
+ | 'coti'
4830
+ | 'cotiTestnet'
4831
+ | 'morph'
4832
+ | 'morphTestnet'
4833
+ | 'morphHolesky'
4834
+ | 'ultra'
4835
+ | 'ultraTestnet'
4836
+ | 'nitrograph'
4837
+ | 'sepolia'
4838
+ | 'optimism_sepolia'
4839
+ | 'arbitrumSepolia'
4840
+ | 'goerli'
4841
+ | 'optimism_goerli'
4842
+ | 'arbitrumGoerli'
4843
+ | 'basecamp'
4844
+ | 'somnia'
4845
+ | 'polkadot'
4846
+ | 'kusama'
4847
+ | 'flow_cadence';
4848
+
4849
+ /**
4850
+ * Indicates if only in-range liquidity is rewarded.
4851
+ */
4852
+ onlyRewardInRangeLiquidity?: boolean;
4853
+
4854
+ /**
4855
+ * Array of liquidity pools associated with the rule.
4856
+ */
4857
+ pools?: Array<Liquidity.Pool>;
4858
+
4859
+ /**
4860
+ * Protocol of the liquidity pool.
4861
+ */
4862
+ protocol?: string;
4863
+ }
4864
+
4865
+ export namespace Liquidity {
4866
+ export interface Pool {
4867
+ /**
4868
+ * Unique identifier of the liquidity pool.
4869
+ */
4870
+ id: string;
4871
+ }
4872
+ }
4873
+
2626
4874
  export interface Range {
2627
4875
  /**
2628
4876
  * Reward amount for this range.
@@ -2638,6 +4886,16 @@ export namespace RuleCreateParams {
2638
4886
  * Start value of the range.
2639
4887
  */
2640
4888
  startRange: number;
4889
+
4890
+ /**
4891
+ * ID of the loyalty badge for this range.
4892
+ */
4893
+ loyaltyBadgeId?: string;
4894
+
4895
+ /**
4896
+ * Amount of the loyalty multiplier for this range.
4897
+ */
4898
+ loyaltyMultiplierAmount?: number;
2641
4899
  }
2642
4900
 
2643
4901
  /**
@@ -2690,20 +4948,15 @@ export namespace RuleCreateParams {
2690
4948
  * Object containing details of the associated smart contract.
2691
4949
  */
2692
4950
  export interface SmartContract {
2693
- /**
2694
- * ABI of the smart contract.
2695
- */
2696
- abi?: string | null;
2697
-
2698
4951
  /**
2699
4952
  * Mapping of addresses for the smart contract.
2700
4953
  */
2701
4954
  addressMapping?: string | null;
2702
4955
 
2703
4956
  /**
2704
- * Array of bonus details applied to the rule.
4957
+ * Object containing details of the amount multiplier from the event.
2705
4958
  */
2706
- bonus?: Array<SmartContract.Bonus> | null;
4959
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2707
4960
 
2708
4961
  /**
2709
4962
  * ID of the smart contract.
@@ -2715,68 +4968,31 @@ export namespace RuleCreateParams {
2715
4968
  */
2716
4969
  criteria?: 'everyEvent' | 'byParameter' | null;
2717
4970
 
2718
- /**
2719
- * Time range applied to the rule.
2720
- */
2721
- customRange?: SmartContract.CustomRange | null;
2722
-
2723
4971
  /**
2724
4972
  * Event emitted by the smart contract.
2725
4973
  */
2726
4974
  event?: string | null;
2727
4975
 
2728
- /**
2729
- * Maximum value allowed for the parameter.
2730
- */
2731
- max?: number | null;
2732
-
2733
4976
  /**
2734
4977
  * Array of parameters for the smart contract.
2735
4978
  */
2736
4979
  params?: Array<SmartContract.Param> | null;
2737
4980
 
2738
4981
  /**
2739
- * Flag indicating if a bonus is applied.
2740
- */
2741
- withBonus?: boolean | null;
2742
-
2743
- /**
2744
- * Flag indicating if a custom range is applied.
2745
- */
2746
- withCustomRange?: boolean | null;
2747
-
2748
- /**
2749
- * Flag indicating if a maximum limit is applied.
4982
+ * Type of the smart contract interaction.
2750
4983
  */
2751
- withMax?: boolean | null;
4984
+ type?: 'function' | 'event' | null;
2752
4985
  }
2753
4986
 
2754
4987
  export namespace SmartContract {
2755
- export interface Bonus {
2756
- /**
2757
- * Amount of the bonus.
2758
- */
2759
- amount?: number | null;
2760
-
2761
- /**
2762
- * Number of times the bonus is applied.
2763
- */
2764
- count?: number | null;
2765
- }
2766
-
2767
4988
  /**
2768
- * Time range applied to the rule.
4989
+ * Object containing details of the amount multiplier from the event.
2769
4990
  */
2770
- export interface CustomRange {
4991
+ export interface AmountMultiplier {
2771
4992
  /**
2772
- * End time of the custom range.
4993
+ * Mapping of the value for the smart contract.
2773
4994
  */
2774
- endsAt?: string | null;
2775
-
2776
- /**
2777
- * Start time of the custom range.
2778
- */
2779
- startsAt?: string | null;
4995
+ valueMapping?: string | null;
2780
4996
  }
2781
4997
 
2782
4998
  export interface Param {
@@ -2820,6 +5036,33 @@ export namespace RuleCreateParams {
2820
5036
  */
2821
5037
  streakMilestone: number;
2822
5038
  }
5039
+
5040
+ /**
5041
+ * Metadata for swap loyalty rules
5042
+ */
5043
+ export interface Swap {
5044
+ provider?: 'any' | 'relay' | 'lifi';
5045
+
5046
+ relayReferrerId?: string;
5047
+
5048
+ requireCrossChainSwap?: boolean;
5049
+
5050
+ swappedToChain?: 'any' | number | string;
5051
+
5052
+ swappedToTokens?: Array<Swap.SwappedToToken>;
5053
+
5054
+ tokenMode?: 'any' | 'specific';
5055
+
5056
+ trackTokenAmount?: boolean;
5057
+ }
5058
+
5059
+ export namespace Swap {
5060
+ export interface SwappedToToken {
5061
+ address: string;
5062
+
5063
+ chainId: string;
5064
+ }
5065
+ }
2823
5066
  }
2824
5067
 
2825
5068
  export interface Collection {
@@ -2832,13 +5075,17 @@ export namespace RuleCreateParams {
2832
5075
  * Blockchain network for the collection
2833
5076
  */
2834
5077
  network:
5078
+ | 'abstract'
5079
+ | 'abstractTestnet'
2835
5080
  | 'apechain'
2836
5081
  | 'arbitrum'
2837
5082
  | 'avalanche'
2838
5083
  | 'avalancheFuji'
2839
5084
  | 'base'
2840
5085
  | 'baseSepolia'
5086
+ | 'berachain'
2841
5087
  | 'berachainArtio'
5088
+ | 'berachainBepolia'
2842
5089
  | 'binance'
2843
5090
  | 'bscTestnet'
2844
5091
  | 'campTestnet'
@@ -2846,18 +5093,30 @@ export namespace RuleCreateParams {
2846
5093
  | 'fantomTestnet'
2847
5094
  | 'flowMainnet'
2848
5095
  | 'mainnet'
5096
+ | 'nexusTestnet'
2849
5097
  | 'optimism'
2850
5098
  | 'polygon'
2851
5099
  | 'polygon_mumbai'
2852
5100
  | 'skaleNebula'
5101
+ | 'skaleEuropa'
5102
+ | 'skaleCalypso'
2853
5103
  | 'solana'
2854
5104
  | 'sophon'
5105
+ | 'sophonTestnet'
2855
5106
  | 'sui'
2856
5107
  | 'superseed'
2857
5108
  | 'superseedSepolia'
2858
5109
  | 'vanar'
2859
5110
  | 'xai'
2860
5111
  | 'zksync'
5112
+ | 'coti'
5113
+ | 'cotiTestnet'
5114
+ | 'morph'
5115
+ | 'morphTestnet'
5116
+ | 'morphHolesky'
5117
+ | 'ultra'
5118
+ | 'ultraTestnet'
5119
+ | 'nitrograph'
2861
5120
  | 'sepolia'
2862
5121
  | 'optimism_sepolia'
2863
5122
  | 'arbitrumSepolia'
@@ -2865,7 +5124,15 @@ export namespace RuleCreateParams {
2865
5124
  | 'optimism_goerli'
2866
5125
  | 'arbitrumGoerli'
2867
5126
  | 'basecamp'
2868
- | 'abstract';
5127
+ | 'somnia'
5128
+ | 'polkadot'
5129
+ | 'kusama'
5130
+ | 'flow_cadence';
5131
+
5132
+ /**
5133
+ * Symbol of the collection.
5134
+ */
5135
+ symbol?: string;
2869
5136
  }
2870
5137
  }
2871
5138
 
@@ -2885,10 +5152,15 @@ export interface RuleUpdateParams {
2885
5152
  */
2886
5153
  name: string;
2887
5154
 
5155
+ /**
5156
+ * The type of claim for the reward
5157
+ */
5158
+ claimType?: 'manual' | 'auto' | null;
5159
+
2888
5160
  /**
2889
5161
  * Blockchain address of the associated collection
2890
5162
  */
2891
- collectionAddress?: string;
5163
+ collectionAddress?: string | null;
2892
5164
 
2893
5165
  /**
2894
5166
  * List of associated collections
@@ -2920,11 +5192,21 @@ export interface RuleUpdateParams {
2920
5192
  */
2921
5193
  effectiveStartTime?: string | null;
2922
5194
 
5195
+ /**
5196
+ * ID of the external integration
5197
+ */
5198
+ externalIntegrationId?: string | null;
5199
+
2923
5200
  /**
2924
5201
  * Frequency of the rule execution
2925
5202
  */
2926
5203
  frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
2927
5204
 
5205
+ /**
5206
+ * Optional stratus function id for the rule
5207
+ */
5208
+ functionId?: string | null;
5209
+
2928
5210
  /**
2929
5211
  * Whether to hide this rule in the user interface
2930
5212
  */
@@ -2933,7 +5215,7 @@ export interface RuleUpdateParams {
2933
5215
  /**
2934
5216
  * Time interval for recurring rule execution
2935
5217
  */
2936
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
5218
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
2937
5219
 
2938
5220
  /**
2939
5221
  * Whether this rule is required for participation
@@ -2945,6 +5227,18 @@ export interface RuleUpdateParams {
2945
5227
  */
2946
5228
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
2947
5229
 
5230
+ /**
5231
+ * The interval for the max amount. Available for the smart contract and external
5232
+ * rules.
5233
+ */
5234
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
5235
+
5236
+ /**
5237
+ * The maximum amount of points a user can earn per interval. Available for the
5238
+ * smart contract and external rules.
5239
+ */
5240
+ maxAmountPerInterval?: number | null;
5241
+
2948
5242
  /**
2949
5243
  * URL of the media to be displayed
2950
5244
  */
@@ -2959,13 +5253,17 @@ export interface RuleUpdateParams {
2959
5253
  * Blockchain network where the rule will apply
2960
5254
  */
2961
5255
  network?:
5256
+ | 'abstract'
5257
+ | 'abstractTestnet'
2962
5258
  | 'apechain'
2963
5259
  | 'arbitrum'
2964
5260
  | 'avalanche'
2965
5261
  | 'avalancheFuji'
2966
5262
  | 'base'
2967
5263
  | 'baseSepolia'
5264
+ | 'berachain'
2968
5265
  | 'berachainArtio'
5266
+ | 'berachainBepolia'
2969
5267
  | 'binance'
2970
5268
  | 'bscTestnet'
2971
5269
  | 'campTestnet'
@@ -2973,18 +5271,30 @@ export interface RuleUpdateParams {
2973
5271
  | 'fantomTestnet'
2974
5272
  | 'flowMainnet'
2975
5273
  | 'mainnet'
5274
+ | 'nexusTestnet'
2976
5275
  | 'optimism'
2977
5276
  | 'polygon'
2978
5277
  | 'polygon_mumbai'
2979
5278
  | 'skaleNebula'
5279
+ | 'skaleEuropa'
5280
+ | 'skaleCalypso'
2980
5281
  | 'solana'
2981
5282
  | 'sophon'
5283
+ | 'sophonTestnet'
2982
5284
  | 'sui'
2983
5285
  | 'superseed'
2984
5286
  | 'superseedSepolia'
2985
5287
  | 'vanar'
2986
5288
  | 'xai'
2987
5289
  | 'zksync'
5290
+ | 'coti'
5291
+ | 'cotiTestnet'
5292
+ | 'morph'
5293
+ | 'morphTestnet'
5294
+ | 'morphHolesky'
5295
+ | 'ultra'
5296
+ | 'ultraTestnet'
5297
+ | 'nitrograph'
2988
5298
  | 'sepolia'
2989
5299
  | 'optimism_sepolia'
2990
5300
  | 'arbitrumSepolia'
@@ -2992,17 +5302,35 @@ export interface RuleUpdateParams {
2992
5302
  | 'optimism_goerli'
2993
5303
  | 'arbitrumGoerli'
2994
5304
  | 'basecamp'
2995
- | 'abstract';
5305
+ | 'somnia'
5306
+ | 'polkadot'
5307
+ | 'kusama'
5308
+ | 'flow_cadence';
2996
5309
 
2997
5310
  /**
2998
5311
  * ID for associated OAuth credentials
2999
5312
  */
3000
5313
  oauthCredentialsId?: string | null;
3001
5314
 
5315
+ /**
5316
+ * The lifetime of the reward
5317
+ */
5318
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
5319
+
3002
5320
  /**
3003
5321
  * Type of reward issued by this rule
3004
5322
  */
3005
- rewardType?: 'points' | 'multiplier';
5323
+ rewardType?: 'points' | 'multiplier' | 'badge';
5324
+
5325
+ /**
5326
+ * URL of the Shopify store
5327
+ */
5328
+ shopifyStoreUrl?: string | null;
5329
+
5330
+ /**
5331
+ * Whether to show this rule before the start time
5332
+ */
5333
+ showBeforeStart?: boolean;
3006
5334
 
3007
5335
  /**
3008
5336
  * Start time for the loyalty rule
@@ -3010,9 +5338,9 @@ export interface RuleUpdateParams {
3010
5338
  startTime?: string | null;
3011
5339
 
3012
5340
  /**
3013
- * Optional subscription identifier for the rule
5341
+ * Optional stratus subscription id for the rule
3014
5342
  */
3015
- subscriptionIdentifier?: string | null;
5343
+ subscriptionId?: string | null;
3016
5344
  }
3017
5345
 
3018
5346
  export namespace RuleUpdateParams {
@@ -3026,13 +5354,17 @@ export namespace RuleUpdateParams {
3026
5354
  * Blockchain network for the collection
3027
5355
  */
3028
5356
  network:
5357
+ | 'abstract'
5358
+ | 'abstractTestnet'
3029
5359
  | 'apechain'
3030
5360
  | 'arbitrum'
3031
5361
  | 'avalanche'
3032
5362
  | 'avalancheFuji'
3033
5363
  | 'base'
3034
5364
  | 'baseSepolia'
5365
+ | 'berachain'
3035
5366
  | 'berachainArtio'
5367
+ | 'berachainBepolia'
3036
5368
  | 'binance'
3037
5369
  | 'bscTestnet'
3038
5370
  | 'campTestnet'
@@ -3040,18 +5372,30 @@ export namespace RuleUpdateParams {
3040
5372
  | 'fantomTestnet'
3041
5373
  | 'flowMainnet'
3042
5374
  | 'mainnet'
5375
+ | 'nexusTestnet'
3043
5376
  | 'optimism'
3044
5377
  | 'polygon'
3045
5378
  | 'polygon_mumbai'
3046
5379
  | 'skaleNebula'
5380
+ | 'skaleEuropa'
5381
+ | 'skaleCalypso'
3047
5382
  | 'solana'
3048
5383
  | 'sophon'
5384
+ | 'sophonTestnet'
3049
5385
  | 'sui'
3050
5386
  | 'superseed'
3051
5387
  | 'superseedSepolia'
3052
5388
  | 'vanar'
3053
5389
  | 'xai'
3054
5390
  | 'zksync'
5391
+ | 'coti'
5392
+ | 'cotiTestnet'
5393
+ | 'morph'
5394
+ | 'morphTestnet'
5395
+ | 'morphHolesky'
5396
+ | 'ultra'
5397
+ | 'ultraTestnet'
5398
+ | 'nitrograph'
3055
5399
  | 'sepolia'
3056
5400
  | 'optimism_sepolia'
3057
5401
  | 'arbitrumSepolia'
@@ -3059,13 +5403,26 @@ export namespace RuleUpdateParams {
3059
5403
  | 'optimism_goerli'
3060
5404
  | 'arbitrumGoerli'
3061
5405
  | 'basecamp'
3062
- | 'abstract';
5406
+ | 'somnia'
5407
+ | 'polkadot'
5408
+ | 'kusama'
5409
+ | 'flow_cadence';
5410
+
5411
+ /**
5412
+ * Symbol of the collection.
5413
+ */
5414
+ symbol?: string;
3063
5415
  }
3064
5416
 
3065
5417
  /**
3066
5418
  * Additional metadata for the loyalty rule
3067
5419
  */
3068
5420
  export interface Metadata {
5421
+ /**
5422
+ * Number of tokens per batch.
5423
+ */
5424
+ batchSize?: number | null;
5425
+
3069
5426
  /**
3070
5427
  * Text displayed on the action button.
3071
5428
  */
@@ -3089,7 +5446,7 @@ export namespace RuleUpdateParams {
3089
5446
  /**
3090
5447
  * Text to check in the Twitter post, username, or bio.
3091
5448
  */
3092
- checkText?: string | null;
5449
+ checkText?: string | Array<string> | null;
3093
5450
 
3094
5451
  /**
3095
5452
  * Array of collections associated with the rule.
@@ -3099,7 +5456,12 @@ export namespace RuleUpdateParams {
3099
5456
  /**
3100
5457
  * Conditions for completing the profile.
3101
5458
  */
3102
- completeProfileConditions?: Record<string, boolean> | null;
5459
+ completeProfileConditions?: { [key: string]: boolean } | null;
5460
+
5461
+ /**
5462
+ * Description of the external rule condition (only for external rules)
5463
+ */
5464
+ conditionDescription?: string;
3103
5465
 
3104
5466
  /**
3105
5467
  * Object containing details for the call-to-action.
@@ -3111,6 +5473,11 @@ export namespace RuleUpdateParams {
3111
5473
  */
3112
5474
  customRewardsApiKey?: string;
3113
5475
 
5476
+ /**
5477
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
5478
+ */
5479
+ directRpc?: boolean;
5480
+
3114
5481
  /**
3115
5482
  * Array of Discord servers, channels, and roles to join.
3116
5483
  */
@@ -3136,6 +5503,11 @@ export namespace RuleUpdateParams {
3136
5503
  */
3137
5504
  enableVerifiedMultiplier?: boolean;
3138
5505
 
5506
+ /**
5507
+ * Type of ERC20 token for the loyalty rule.
5508
+ */
5509
+ erc20Type?: 'erc20' | 'native';
5510
+
3139
5511
  /**
3140
5512
  * Fill source of the order for the token sale
3141
5513
  */
@@ -3156,11 +5528,6 @@ export namespace RuleUpdateParams {
3156
5528
  */
3157
5529
  hasNeverSold?: boolean;
3158
5530
 
3159
- /**
3160
- * Flag indicating whether the order source is included.
3161
- */
3162
- hasOrderSource?: boolean;
3163
-
3164
5531
  /**
3165
5532
  * Indicates if the full royalty has been paid for items.
3166
5533
  */
@@ -3181,11 +5548,21 @@ export namespace RuleUpdateParams {
3181
5548
  */
3182
5549
  imageUrl?: string | null;
3183
5550
 
5551
+ /**
5552
+ * If enabled, the first transaction done on the platform will complete this rule
5553
+ */
5554
+ isCheckInOnEveryTxn?: boolean;
5555
+
3184
5556
  /**
3185
5557
  * Indicates if the multiplier has been applied to rewards.
3186
5558
  */
3187
5559
  isMultiplierApplied?: boolean;
3188
5560
 
5561
+ /**
5562
+ * Flag indicating if the rule is restricted to new users.
5563
+ */
5564
+ isRestrictedToNewUsers?: boolean;
5565
+
3189
5566
  /**
3190
5567
  * Flag indicating if rewards are applied retroactively.
3191
5568
  */
@@ -3201,6 +5578,11 @@ export namespace RuleUpdateParams {
3201
5578
  */
3202
5579
  link?: string | null;
3203
5580
 
5581
+ /**
5582
+ * Liquidity pool details.
5583
+ */
5584
+ liquidity?: Metadata.Liquidity;
5585
+
3204
5586
  /**
3205
5587
  * Maximum quantity constraint for token holding.
3206
5588
  */
@@ -3242,14 +5624,24 @@ export namespace RuleUpdateParams {
3242
5624
  onlyRewardSingleTokenOwnership?: boolean | null;
3243
5625
 
3244
5626
  /**
3245
- * Order source of the order for the token sale
5627
+ * Promotional code associated with the rule.
3246
5628
  */
3247
- orderSource?: string;
5629
+ promoCode?: string;
3248
5630
 
3249
5631
  /**
3250
- * Promotional code associated with the rule.
5632
+ * URL of the CSV file containing promo codes.
3251
5633
  */
3252
- promoCode?: string;
5634
+ promoCodeCsvUrl?: string;
5635
+
5636
+ /**
5637
+ * Numbers of the promotional code to be generated.
5638
+ */
5639
+ promoCodeLength?: number | null;
5640
+
5641
+ /**
5642
+ * Type of the promotional code.
5643
+ */
5644
+ promoCodeType?: 'code' | 'csv' | 'generate';
3253
5645
 
3254
5646
  /**
3255
5647
  * Array defining ranges and corresponding rewards.
@@ -3266,11 +5658,62 @@ export namespace RuleUpdateParams {
3266
5658
  */
3267
5659
  referrerReward?: number | null;
3268
5660
 
5661
+ /**
5662
+ * Loyalty currency ID of the referrer reward.
5663
+ */
5664
+ referrerRewardLoyaltyCurrencyId?: string | null;
5665
+
5666
+ /**
5667
+ * Flag indicating if the post link is required.
5668
+ */
5669
+ requirePostLink?: boolean | null;
5670
+
5671
+ /**
5672
+ * Flag indicating if media metadata is required.
5673
+ */
5674
+ requirePostMediaLink?: boolean | null;
5675
+
5676
+ /**
5677
+ * Flag indicating if the rule can also reward badges per range.
5678
+ */
5679
+ rewardBadgePerRange?: boolean;
5680
+
5681
+ /**
5682
+ * Flag indicating if the reward is rewarded by batch.
5683
+ */
5684
+ rewardByBatch?: boolean | null;
5685
+
5686
+ /**
5687
+ * Criteria to evaluate the reward.
5688
+ */
5689
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
5690
+
5691
+ /**
5692
+ * Flag indicating if the reward is rewarded per action.
5693
+ */
5694
+ rewardPerAction?: boolean | null;
5695
+
3269
5696
  /**
3270
5697
  * Flag indicating if rewards are given per impression.
3271
5698
  */
3272
5699
  rewardPerImpression?: boolean | null;
3273
5700
 
5701
+ /**
5702
+ * Flag indicating if the rule should reward based on value of traded tokens
5703
+ * instead of count.
5704
+ */
5705
+ rewardPerValue?: boolean;
5706
+
5707
+ /**
5708
+ * Wallet address of the user can only be used if userId is not provided
5709
+ */
5710
+ royaltyAddress?: string;
5711
+
5712
+ /**
5713
+ * Royalty percentage of the item.
5714
+ */
5715
+ royaltyPercentage?: number;
5716
+
3274
5717
  /**
3275
5718
  * Currency associated with sales.
3276
5719
  */
@@ -3310,6 +5753,7 @@ export namespace RuleUpdateParams {
3310
5753
  | 'Twitch'
3311
5754
  | 'X(Twitter)'
3312
5755
  | 'YouTube'
5756
+ | 'Google'
3313
5757
  | null;
3314
5758
 
3315
5759
  /**
@@ -3322,11 +5766,21 @@ export namespace RuleUpdateParams {
3322
5766
  */
3323
5767
  socialPlatformName?: string | null;
3324
5768
 
5769
+ /**
5770
+ * ID of the Steam app.
5771
+ */
5772
+ steamAppId?: string | null;
5773
+
3325
5774
  /**
3326
5775
  * Array of streak milestones and corresponding rewards.
3327
5776
  */
3328
5777
  streakArray?: Array<Metadata.StreakArray> | null;
3329
5778
 
5779
+ /**
5780
+ * Metadata for swap loyalty rules
5781
+ */
5782
+ swap?: Metadata.Swap;
5783
+
3330
5784
  /**
3331
5785
  * ID of the Telegram channel.
3332
5786
  */
@@ -3342,6 +5796,12 @@ export namespace RuleUpdateParams {
3342
5796
  */
3343
5797
  trackAllContracts?: boolean | null;
3344
5798
 
5799
+ /**
5800
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
5801
+ * completed once the progress is 100%.
5802
+ */
5803
+ trackProgress?: boolean | null;
5804
+
3345
5805
  /**
3346
5806
  * URL of the associated Twitter account.
3347
5807
  */
@@ -3385,7 +5845,28 @@ export namespace RuleUpdateParams {
3385
5845
  /**
3386
5846
  * Type of wallet associated with the rule.
3387
5847
  */
3388
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
5848
+ walletType?:
5849
+ | 'evm'
5850
+ | 'solana'
5851
+ | 'imx'
5852
+ | 'sui'
5853
+ | 'ton'
5854
+ | 'cosmos'
5855
+ | 'ultra'
5856
+ | 'agw'
5857
+ | 'flow_cadence'
5858
+ | 'substrate'
5859
+ | null;
5860
+
5861
+ /**
5862
+ * ID of the Youtube channel.
5863
+ */
5864
+ youtubeChannelId?: string | null;
5865
+
5866
+ /**
5867
+ * ID of the Youtube video.
5868
+ */
5869
+ youtubeVideoId?: string | null;
3389
5870
  }
3390
5871
 
3391
5872
  export namespace Metadata {
@@ -3404,13 +5885,17 @@ export namespace RuleUpdateParams {
3404
5885
  * Blockchain network of the collection.
3405
5886
  */
3406
5887
  network?:
5888
+ | 'abstract'
5889
+ | 'abstractTestnet'
3407
5890
  | 'apechain'
3408
5891
  | 'arbitrum'
3409
5892
  | 'avalanche'
3410
5893
  | 'avalancheFuji'
3411
5894
  | 'base'
3412
5895
  | 'baseSepolia'
5896
+ | 'berachain'
3413
5897
  | 'berachainArtio'
5898
+ | 'berachainBepolia'
3414
5899
  | 'binance'
3415
5900
  | 'bscTestnet'
3416
5901
  | 'campTestnet'
@@ -3418,18 +5903,30 @@ export namespace RuleUpdateParams {
3418
5903
  | 'fantomTestnet'
3419
5904
  | 'flowMainnet'
3420
5905
  | 'mainnet'
5906
+ | 'nexusTestnet'
3421
5907
  | 'optimism'
3422
5908
  | 'polygon'
3423
5909
  | 'polygon_mumbai'
3424
5910
  | 'skaleNebula'
5911
+ | 'skaleEuropa'
5912
+ | 'skaleCalypso'
3425
5913
  | 'solana'
3426
5914
  | 'sophon'
5915
+ | 'sophonTestnet'
3427
5916
  | 'sui'
3428
5917
  | 'superseed'
3429
5918
  | 'superseedSepolia'
3430
5919
  | 'vanar'
3431
5920
  | 'xai'
3432
5921
  | 'zksync'
5922
+ | 'coti'
5923
+ | 'cotiTestnet'
5924
+ | 'morph'
5925
+ | 'morphTestnet'
5926
+ | 'morphHolesky'
5927
+ | 'ultra'
5928
+ | 'ultraTestnet'
5929
+ | 'nitrograph'
3433
5930
  | 'sepolia'
3434
5931
  | 'optimism_sepolia'
3435
5932
  | 'arbitrumSepolia'
@@ -3437,7 +5934,10 @@ export namespace RuleUpdateParams {
3437
5934
  | 'optimism_goerli'
3438
5935
  | 'arbitrumGoerli'
3439
5936
  | 'basecamp'
3440
- | 'abstract';
5937
+ | 'somnia'
5938
+ | 'polkadot'
5939
+ | 'kusama'
5940
+ | 'flow_cadence';
3441
5941
  }
3442
5942
 
3443
5943
  /**
@@ -3514,6 +6014,110 @@ export namespace RuleUpdateParams {
3514
6014
  id: string;
3515
6015
  }
3516
6016
 
6017
+ /**
6018
+ * Liquidity pool details.
6019
+ */
6020
+ export interface Liquidity {
6021
+ /**
6022
+ * Calculation type of the liquidity pool.
6023
+ */
6024
+ calculationType?: 'fixed' | 'custom';
6025
+
6026
+ /**
6027
+ * Custom function to calculate the the reward amount based on the liquidity
6028
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
6029
+ * USD.
6030
+ */
6031
+ customFunction?: string;
6032
+
6033
+ /**
6034
+ * Liquidity provided per day in USD
6035
+ */
6036
+ liquidityPerDay?: number;
6037
+
6038
+ /**
6039
+ * Blockchain network of the liquidity pool.
6040
+ */
6041
+ network?:
6042
+ | 'abstract'
6043
+ | 'abstractTestnet'
6044
+ | 'apechain'
6045
+ | 'arbitrum'
6046
+ | 'avalanche'
6047
+ | 'avalancheFuji'
6048
+ | 'base'
6049
+ | 'baseSepolia'
6050
+ | 'berachain'
6051
+ | 'berachainArtio'
6052
+ | 'berachainBepolia'
6053
+ | 'binance'
6054
+ | 'bscTestnet'
6055
+ | 'campTestnet'
6056
+ | 'fantom'
6057
+ | 'fantomTestnet'
6058
+ | 'flowMainnet'
6059
+ | 'mainnet'
6060
+ | 'nexusTestnet'
6061
+ | 'optimism'
6062
+ | 'polygon'
6063
+ | 'polygon_mumbai'
6064
+ | 'skaleNebula'
6065
+ | 'skaleEuropa'
6066
+ | 'skaleCalypso'
6067
+ | 'solana'
6068
+ | 'sophon'
6069
+ | 'sophonTestnet'
6070
+ | 'sui'
6071
+ | 'superseed'
6072
+ | 'superseedSepolia'
6073
+ | 'vanar'
6074
+ | 'xai'
6075
+ | 'zksync'
6076
+ | 'coti'
6077
+ | 'cotiTestnet'
6078
+ | 'morph'
6079
+ | 'morphTestnet'
6080
+ | 'morphHolesky'
6081
+ | 'ultra'
6082
+ | 'ultraTestnet'
6083
+ | 'nitrograph'
6084
+ | 'sepolia'
6085
+ | 'optimism_sepolia'
6086
+ | 'arbitrumSepolia'
6087
+ | 'goerli'
6088
+ | 'optimism_goerli'
6089
+ | 'arbitrumGoerli'
6090
+ | 'basecamp'
6091
+ | 'somnia'
6092
+ | 'polkadot'
6093
+ | 'kusama'
6094
+ | 'flow_cadence';
6095
+
6096
+ /**
6097
+ * Indicates if only in-range liquidity is rewarded.
6098
+ */
6099
+ onlyRewardInRangeLiquidity?: boolean;
6100
+
6101
+ /**
6102
+ * Array of liquidity pools associated with the rule.
6103
+ */
6104
+ pools?: Array<Liquidity.Pool>;
6105
+
6106
+ /**
6107
+ * Protocol of the liquidity pool.
6108
+ */
6109
+ protocol?: string;
6110
+ }
6111
+
6112
+ export namespace Liquidity {
6113
+ export interface Pool {
6114
+ /**
6115
+ * Unique identifier of the liquidity pool.
6116
+ */
6117
+ id: string;
6118
+ }
6119
+ }
6120
+
3517
6121
  export interface Range {
3518
6122
  /**
3519
6123
  * Reward amount for this range.
@@ -3529,6 +6133,16 @@ export namespace RuleUpdateParams {
3529
6133
  * Start value of the range.
3530
6134
  */
3531
6135
  startRange: number;
6136
+
6137
+ /**
6138
+ * ID of the loyalty badge for this range.
6139
+ */
6140
+ loyaltyBadgeId?: string;
6141
+
6142
+ /**
6143
+ * Amount of the loyalty multiplier for this range.
6144
+ */
6145
+ loyaltyMultiplierAmount?: number;
3532
6146
  }
3533
6147
 
3534
6148
  /**
@@ -3581,20 +6195,15 @@ export namespace RuleUpdateParams {
3581
6195
  * Object containing details of the associated smart contract.
3582
6196
  */
3583
6197
  export interface SmartContract {
3584
- /**
3585
- * ABI of the smart contract.
3586
- */
3587
- abi?: string | null;
3588
-
3589
6198
  /**
3590
6199
  * Mapping of addresses for the smart contract.
3591
6200
  */
3592
6201
  addressMapping?: string | null;
3593
6202
 
3594
6203
  /**
3595
- * Array of bonus details applied to the rule.
6204
+ * Object containing details of the amount multiplier from the event.
3596
6205
  */
3597
- bonus?: Array<SmartContract.Bonus> | null;
6206
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3598
6207
 
3599
6208
  /**
3600
6209
  * ID of the smart contract.
@@ -3606,68 +6215,31 @@ export namespace RuleUpdateParams {
3606
6215
  */
3607
6216
  criteria?: 'everyEvent' | 'byParameter' | null;
3608
6217
 
3609
- /**
3610
- * Time range applied to the rule.
3611
- */
3612
- customRange?: SmartContract.CustomRange | null;
3613
-
3614
6218
  /**
3615
6219
  * Event emitted by the smart contract.
3616
6220
  */
3617
6221
  event?: string | null;
3618
6222
 
3619
- /**
3620
- * Maximum value allowed for the parameter.
3621
- */
3622
- max?: number | null;
3623
-
3624
6223
  /**
3625
6224
  * Array of parameters for the smart contract.
3626
6225
  */
3627
6226
  params?: Array<SmartContract.Param> | null;
3628
6227
 
3629
6228
  /**
3630
- * Flag indicating if a bonus is applied.
3631
- */
3632
- withBonus?: boolean | null;
3633
-
3634
- /**
3635
- * Flag indicating if a custom range is applied.
6229
+ * Type of the smart contract interaction.
3636
6230
  */
3637
- withCustomRange?: boolean | null;
3638
-
3639
- /**
3640
- * Flag indicating if a maximum limit is applied.
3641
- */
3642
- withMax?: boolean | null;
6231
+ type?: 'function' | 'event' | null;
3643
6232
  }
3644
6233
 
3645
6234
  export namespace SmartContract {
3646
- export interface Bonus {
3647
- /**
3648
- * Amount of the bonus.
3649
- */
3650
- amount?: number | null;
3651
-
3652
- /**
3653
- * Number of times the bonus is applied.
3654
- */
3655
- count?: number | null;
3656
- }
3657
-
3658
6235
  /**
3659
- * Time range applied to the rule.
6236
+ * Object containing details of the amount multiplier from the event.
3660
6237
  */
3661
- export interface CustomRange {
3662
- /**
3663
- * End time of the custom range.
3664
- */
3665
- endsAt?: string | null;
3666
-
6238
+ export interface AmountMultiplier {
3667
6239
  /**
3668
- * Start time of the custom range.
6240
+ * Mapping of the value for the smart contract.
3669
6241
  */
3670
- startsAt?: string | null;
6242
+ valueMapping?: string | null;
3671
6243
  }
3672
6244
 
3673
6245
  export interface Param {
@@ -3711,17 +6283,66 @@ export namespace RuleUpdateParams {
3711
6283
  */
3712
6284
  streakMilestone: number;
3713
6285
  }
6286
+
6287
+ /**
6288
+ * Metadata for swap loyalty rules
6289
+ */
6290
+ export interface Swap {
6291
+ provider?: 'any' | 'relay' | 'lifi';
6292
+
6293
+ relayReferrerId?: string;
6294
+
6295
+ requireCrossChainSwap?: boolean;
6296
+
6297
+ swappedToChain?: 'any' | number | string;
6298
+
6299
+ swappedToTokens?: Array<Swap.SwappedToToken>;
6300
+
6301
+ tokenMode?: 'any' | 'specific';
6302
+
6303
+ trackTokenAmount?: boolean;
6304
+ }
6305
+
6306
+ export namespace Swap {
6307
+ export interface SwappedToToken {
6308
+ address: string;
6309
+
6310
+ chainId: string;
6311
+ }
6312
+ }
3714
6313
  }
3715
6314
  }
3716
6315
 
3717
6316
  export interface RuleListParams {
6317
+ /**
6318
+ * IDs of the users to filter results by
6319
+ */
6320
+ allotedToUserId?: string | Array<string>;
6321
+
6322
+ /**
6323
+ * ID of the user group to filter results by
6324
+ */
6325
+ allotedUserGroupId?: string;
6326
+
3718
6327
  /**
3719
6328
  * Address of the collection to filter by
3720
6329
  */
3721
6330
  collectionAddress?: string;
3722
6331
 
3723
6332
  /**
3724
- * Maximum number of records to return (max 1000)
6333
+ * If true this will only return active rules, the rules for which the startTime is
6334
+ * in the past and the endTime is in the future
6335
+ */
6336
+ isActive?: 'true' | 'false';
6337
+
6338
+ /**
6339
+ * If true this will only return special rules, special rules are the rules that
6340
+ * are used for anti sybil as honey pot
6341
+ */
6342
+ isSpecial?: 'true' | 'false';
6343
+
6344
+ /**
6345
+ * Maximum number of records to return (max 100)
3725
6346
  */
3726
6347
  limit?: number;
3727
6348
 
@@ -3751,6 +6372,13 @@ export interface RuleListParams {
3751
6372
  websiteId?: string;
3752
6373
  }
3753
6374
 
6375
+ export interface RuleDeleteParams {
6376
+ /**
6377
+ * Whether to debit loyalty points
6378
+ */
6379
+ debitLoyaltyPoints?: string;
6380
+ }
6381
+
3754
6382
  export interface RuleCompleteParams {
3755
6383
  /**
3756
6384
  * Override amount for the reward (rounded to nearest whole number). This will
@@ -3759,15 +6387,25 @@ export interface RuleCompleteParams {
3759
6387
  amount?: number | null;
3760
6388
 
3761
6389
  /**
3762
- * Link to the comment made by user
6390
+ * Link to the post/comment made by user
3763
6391
  */
3764
- commentLink?: string;
6392
+ contentUrl?: string;
6393
+
6394
+ /**
6395
+ * Unique key to ensure idempotent requests.
6396
+ */
6397
+ idempotencyKey?: string;
3765
6398
 
3766
6399
  /**
3767
6400
  * ID of the choice selected by the user
3768
6401
  */
3769
6402
  loyaltyQuestionChoiceId?: string;
3770
6403
 
6404
+ /**
6405
+ * Value to compare with the range
6406
+ */
6407
+ rangeValue?: number | null;
6408
+
3771
6409
  /**
3772
6410
  * Unique identifier for the user
3773
6411
  */
@@ -3780,7 +6418,7 @@ export interface RuleCompleteParams {
3780
6418
 
3781
6419
  /**
3782
6420
  * Flag indicating if only verification is required, this will not create a
3783
- * transaction and reward the user
6421
+ * transaction and reward the user.
3784
6422
  */
3785
6423
  verifyOnly?: string;
3786
6424
 
@@ -3791,11 +6429,30 @@ export interface RuleCompleteParams {
3791
6429
  }
3792
6430
 
3793
6431
  export interface RuleGetStatusParams {
3794
- organizationId: string;
6432
+ /**
6433
+ * Number of items to return
6434
+ */
6435
+ limit?: number | null;
3795
6436
 
3796
- websiteId: string;
6437
+ /**
6438
+ * Unique identifier for the loyalty rule[s]
6439
+ */
6440
+ loyaltyRuleId?: string | Array<string>;
6441
+
6442
+ organizationId?: string;
6443
+
6444
+ /**
6445
+ * Starting after item
6446
+ */
6447
+ startingAfter?: string;
6448
+
6449
+ userGroupId?: string;
3797
6450
 
3798
6451
  userId?: string;
6452
+
6453
+ walletAddress?: string;
6454
+
6455
+ websiteId?: string;
3799
6456
  }
3800
6457
 
3801
6458
  export declare namespace Rules {
@@ -3809,6 +6466,7 @@ export declare namespace Rules {
3809
6466
  type RuleCreateParams as RuleCreateParams,
3810
6467
  type RuleUpdateParams as RuleUpdateParams,
3811
6468
  type RuleListParams as RuleListParams,
6469
+ type RuleDeleteParams as RuleDeleteParams,
3812
6470
  type RuleCompleteParams as RuleCompleteParams,
3813
6471
  type RuleGetStatusParams as RuleGetStatusParams,
3814
6472
  };