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

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 +1552 -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 +3830 -100
  244. package/src/resources/loyalty/rule-groups.ts +491 -76
  245. package/src/resources/loyalty/rules.ts +2986 -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 +25 -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 +42 -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,41 @@ export interface RuleCreateResponse {
288
436
  | 'optimism_goerli'
289
437
  | 'arbitrumGoerli'
290
438
  | 'basecamp'
291
- | 'abstract';
439
+ | 'somnia'
440
+ | 'zkverify'
441
+ | 'polkadot'
442
+ | 'kusama'
443
+ | 'flow_cadence';
292
444
 
293
445
  /**
294
446
  * OAuth credentials associated with the rule
295
447
  */
296
448
  oauthCredentialsId?: string | null;
297
449
 
450
+ /**
451
+ * The lifetime of the reward
452
+ */
453
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
454
+
298
455
  /**
299
456
  * Type of reward issued by the rule
300
457
  */
301
- rewardType?: 'points' | 'multiplier';
458
+ rewardType?: 'points' | 'multiplier' | 'badge';
459
+
460
+ /**
461
+ * URL of the Shopify store
462
+ */
463
+ shopifyStoreUrl?: string | null;
464
+
465
+ /**
466
+ * Whether to show this rule before the start time
467
+ */
468
+ showBeforeStart?: boolean;
302
469
 
303
470
  /**
304
- * Identifier for associated subscriptions
471
+ * Optional stratus subscription id for the rule
305
472
  */
306
- subscriptionIdentifier?: string | null;
473
+ subscriptionId?: string | null;
307
474
  }
308
475
 
309
476
  export namespace RuleCreateResponse {
@@ -311,6 +478,11 @@ export namespace RuleCreateResponse {
311
478
  * Additional metadata for the loyalty rule
312
479
  */
313
480
  export interface Metadata {
481
+ /**
482
+ * Number of tokens per batch.
483
+ */
484
+ batchSize?: number | null;
485
+
314
486
  /**
315
487
  * Text displayed on the action button.
316
488
  */
@@ -334,7 +506,7 @@ export namespace RuleCreateResponse {
334
506
  /**
335
507
  * Text to check in the Twitter post, username, or bio.
336
508
  */
337
- checkText?: string | null;
509
+ checkText?: string | Array<string> | null;
338
510
 
339
511
  /**
340
512
  * Array of collections associated with the rule.
@@ -344,7 +516,12 @@ export namespace RuleCreateResponse {
344
516
  /**
345
517
  * Conditions for completing the profile.
346
518
  */
347
- completeProfileConditions?: Record<string, boolean> | null;
519
+ completeProfileConditions?: { [key: string]: boolean } | null;
520
+
521
+ /**
522
+ * Description of the external rule condition (only for external rules)
523
+ */
524
+ conditionDescription?: string;
348
525
 
349
526
  /**
350
527
  * Object containing details for the call-to-action.
@@ -356,6 +533,11 @@ export namespace RuleCreateResponse {
356
533
  */
357
534
  customRewardsApiKey?: string;
358
535
 
536
+ /**
537
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
538
+ */
539
+ directRpc?: boolean;
540
+
359
541
  /**
360
542
  * Array of Discord servers, channels, and roles to join.
361
543
  */
@@ -381,6 +563,11 @@ export namespace RuleCreateResponse {
381
563
  */
382
564
  enableVerifiedMultiplier?: boolean;
383
565
 
566
+ /**
567
+ * Type of ERC20 token for the loyalty rule.
568
+ */
569
+ erc20Type?: 'erc20' | 'native';
570
+
384
571
  /**
385
572
  * Fill source of the order for the token sale
386
573
  */
@@ -401,11 +588,6 @@ export namespace RuleCreateResponse {
401
588
  */
402
589
  hasNeverSold?: boolean;
403
590
 
404
- /**
405
- * Flag indicating whether the order source is included.
406
- */
407
- hasOrderSource?: boolean;
408
-
409
591
  /**
410
592
  * Indicates if the full royalty has been paid for items.
411
593
  */
@@ -426,11 +608,21 @@ export namespace RuleCreateResponse {
426
608
  */
427
609
  imageUrl?: string | null;
428
610
 
611
+ /**
612
+ * If enabled, the first transaction done on the platform will complete this rule
613
+ */
614
+ isCheckInOnEveryTxn?: boolean;
615
+
429
616
  /**
430
617
  * Indicates if the multiplier has been applied to rewards.
431
618
  */
432
619
  isMultiplierApplied?: boolean;
433
620
 
621
+ /**
622
+ * Flag indicating if the rule is restricted to new users.
623
+ */
624
+ isRestrictedToNewUsers?: boolean;
625
+
434
626
  /**
435
627
  * Flag indicating if rewards are applied retroactively.
436
628
  */
@@ -446,6 +638,11 @@ export namespace RuleCreateResponse {
446
638
  */
447
639
  link?: string | null;
448
640
 
641
+ /**
642
+ * Liquidity pool details.
643
+ */
644
+ liquidity?: Metadata.Liquidity;
645
+
449
646
  /**
450
647
  * Maximum quantity constraint for token holding.
451
648
  */
@@ -487,14 +684,24 @@ export namespace RuleCreateResponse {
487
684
  onlyRewardSingleTokenOwnership?: boolean | null;
488
685
 
489
686
  /**
490
- * Order source of the order for the token sale
687
+ * Promotional code associated with the rule.
491
688
  */
492
- orderSource?: string;
689
+ promoCode?: string;
493
690
 
494
691
  /**
495
- * Promotional code associated with the rule.
692
+ * URL of the CSV file containing promo codes.
496
693
  */
497
- promoCode?: string;
694
+ promoCodeCsvUrl?: string;
695
+
696
+ /**
697
+ * Numbers of the promotional code to be generated.
698
+ */
699
+ promoCodeLength?: number | null;
700
+
701
+ /**
702
+ * Type of the promotional code.
703
+ */
704
+ promoCodeType?: 'code' | 'csv' | 'generate';
498
705
 
499
706
  /**
500
707
  * Array defining ranges and corresponding rewards.
@@ -511,11 +718,62 @@ export namespace RuleCreateResponse {
511
718
  */
512
719
  referrerReward?: number | null;
513
720
 
721
+ /**
722
+ * Loyalty currency ID of the referrer reward.
723
+ */
724
+ referrerRewardLoyaltyCurrencyId?: string | null;
725
+
726
+ /**
727
+ * Flag indicating if the post link is required.
728
+ */
729
+ requirePostLink?: boolean | null;
730
+
731
+ /**
732
+ * Flag indicating if media metadata is required.
733
+ */
734
+ requirePostMediaLink?: boolean | null;
735
+
736
+ /**
737
+ * Flag indicating if the rule can also reward badges per range.
738
+ */
739
+ rewardBadgePerRange?: boolean;
740
+
741
+ /**
742
+ * Flag indicating if the reward is rewarded by batch.
743
+ */
744
+ rewardByBatch?: boolean | null;
745
+
746
+ /**
747
+ * Criteria to evaluate the reward.
748
+ */
749
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
750
+
751
+ /**
752
+ * Flag indicating if the reward is rewarded per action.
753
+ */
754
+ rewardPerAction?: boolean | null;
755
+
514
756
  /**
515
757
  * Flag indicating if rewards are given per impression.
516
758
  */
517
759
  rewardPerImpression?: boolean | null;
518
760
 
761
+ /**
762
+ * Flag indicating if the rule should reward based on value of traded tokens
763
+ * instead of count.
764
+ */
765
+ rewardPerValue?: boolean;
766
+
767
+ /**
768
+ * Wallet address of the user can only be used if userId is not provided
769
+ */
770
+ royaltyAddress?: string;
771
+
772
+ /**
773
+ * Royalty percentage of the item.
774
+ */
775
+ royaltyPercentage?: number;
776
+
519
777
  /**
520
778
  * Currency associated with sales.
521
779
  */
@@ -555,6 +813,7 @@ export namespace RuleCreateResponse {
555
813
  | 'Twitch'
556
814
  | 'X(Twitter)'
557
815
  | 'YouTube'
816
+ | 'Google'
558
817
  | null;
559
818
 
560
819
  /**
@@ -567,11 +826,21 @@ export namespace RuleCreateResponse {
567
826
  */
568
827
  socialPlatformName?: string | null;
569
828
 
829
+ /**
830
+ * ID of the Steam app.
831
+ */
832
+ steamAppId?: string | null;
833
+
570
834
  /**
571
835
  * Array of streak milestones and corresponding rewards.
572
836
  */
573
837
  streakArray?: Array<Metadata.StreakArray> | null;
574
838
 
839
+ /**
840
+ * Metadata for swap loyalty rules
841
+ */
842
+ swap?: Metadata.Swap;
843
+
575
844
  /**
576
845
  * ID of the Telegram channel.
577
846
  */
@@ -587,6 +856,12 @@ export namespace RuleCreateResponse {
587
856
  */
588
857
  trackAllContracts?: boolean | null;
589
858
 
859
+ /**
860
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
861
+ * completed once the progress is 100%.
862
+ */
863
+ trackProgress?: boolean | null;
864
+
590
865
  /**
591
866
  * URL of the associated Twitter account.
592
867
  */
@@ -630,7 +905,28 @@ export namespace RuleCreateResponse {
630
905
  /**
631
906
  * Type of wallet associated with the rule.
632
907
  */
633
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
908
+ walletType?:
909
+ | 'evm'
910
+ | 'solana'
911
+ | 'imx'
912
+ | 'sui'
913
+ | 'ton'
914
+ | 'cosmos'
915
+ | 'ultra'
916
+ | 'agw'
917
+ | 'flow_cadence'
918
+ | 'substrate'
919
+ | null;
920
+
921
+ /**
922
+ * ID of the Youtube channel.
923
+ */
924
+ youtubeChannelId?: string | null;
925
+
926
+ /**
927
+ * ID of the Youtube video.
928
+ */
929
+ youtubeVideoId?: string | null;
634
930
  }
635
931
 
636
932
  export namespace Metadata {
@@ -649,13 +945,17 @@ export namespace RuleCreateResponse {
649
945
  * Blockchain network of the collection.
650
946
  */
651
947
  network?:
948
+ | 'abstract'
949
+ | 'abstractTestnet'
652
950
  | 'apechain'
653
951
  | 'arbitrum'
654
952
  | 'avalanche'
655
953
  | 'avalancheFuji'
656
954
  | 'base'
657
955
  | 'baseSepolia'
956
+ | 'berachain'
658
957
  | 'berachainArtio'
958
+ | 'berachainBepolia'
659
959
  | 'binance'
660
960
  | 'bscTestnet'
661
961
  | 'campTestnet'
@@ -663,18 +963,30 @@ export namespace RuleCreateResponse {
663
963
  | 'fantomTestnet'
664
964
  | 'flowMainnet'
665
965
  | 'mainnet'
966
+ | 'nexusTestnet'
666
967
  | 'optimism'
667
968
  | 'polygon'
668
969
  | 'polygon_mumbai'
669
970
  | 'skaleNebula'
971
+ | 'skaleEuropa'
972
+ | 'skaleCalypso'
670
973
  | 'solana'
671
974
  | 'sophon'
975
+ | 'sophonTestnet'
672
976
  | 'sui'
673
977
  | 'superseed'
674
978
  | 'superseedSepolia'
675
979
  | 'vanar'
676
980
  | 'xai'
677
981
  | 'zksync'
982
+ | 'coti'
983
+ | 'cotiTestnet'
984
+ | 'morph'
985
+ | 'morphTestnet'
986
+ | 'morphHolesky'
987
+ | 'ultra'
988
+ | 'ultraTestnet'
989
+ | 'nitrograph'
678
990
  | 'sepolia'
679
991
  | 'optimism_sepolia'
680
992
  | 'arbitrumSepolia'
@@ -682,7 +994,11 @@ export namespace RuleCreateResponse {
682
994
  | 'optimism_goerli'
683
995
  | 'arbitrumGoerli'
684
996
  | 'basecamp'
685
- | 'abstract';
997
+ | 'somnia'
998
+ | 'zkverify'
999
+ | 'polkadot'
1000
+ | 'kusama'
1001
+ | 'flow_cadence';
686
1002
  }
687
1003
 
688
1004
  /**
@@ -759,6 +1075,111 @@ export namespace RuleCreateResponse {
759
1075
  id: string;
760
1076
  }
761
1077
 
1078
+ /**
1079
+ * Liquidity pool details.
1080
+ */
1081
+ export interface Liquidity {
1082
+ /**
1083
+ * Calculation type of the liquidity pool.
1084
+ */
1085
+ calculationType?: 'fixed' | 'custom';
1086
+
1087
+ /**
1088
+ * Custom function to calculate the the reward amount based on the liquidity
1089
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
1090
+ * USD.
1091
+ */
1092
+ customFunction?: string;
1093
+
1094
+ /**
1095
+ * Liquidity provided per day in USD
1096
+ */
1097
+ liquidityPerDay?: number;
1098
+
1099
+ /**
1100
+ * Blockchain network of the liquidity pool.
1101
+ */
1102
+ network?:
1103
+ | 'abstract'
1104
+ | 'abstractTestnet'
1105
+ | 'apechain'
1106
+ | 'arbitrum'
1107
+ | 'avalanche'
1108
+ | 'avalancheFuji'
1109
+ | 'base'
1110
+ | 'baseSepolia'
1111
+ | 'berachain'
1112
+ | 'berachainArtio'
1113
+ | 'berachainBepolia'
1114
+ | 'binance'
1115
+ | 'bscTestnet'
1116
+ | 'campTestnet'
1117
+ | 'fantom'
1118
+ | 'fantomTestnet'
1119
+ | 'flowMainnet'
1120
+ | 'mainnet'
1121
+ | 'nexusTestnet'
1122
+ | 'optimism'
1123
+ | 'polygon'
1124
+ | 'polygon_mumbai'
1125
+ | 'skaleNebula'
1126
+ | 'skaleEuropa'
1127
+ | 'skaleCalypso'
1128
+ | 'solana'
1129
+ | 'sophon'
1130
+ | 'sophonTestnet'
1131
+ | 'sui'
1132
+ | 'superseed'
1133
+ | 'superseedSepolia'
1134
+ | 'vanar'
1135
+ | 'xai'
1136
+ | 'zksync'
1137
+ | 'coti'
1138
+ | 'cotiTestnet'
1139
+ | 'morph'
1140
+ | 'morphTestnet'
1141
+ | 'morphHolesky'
1142
+ | 'ultra'
1143
+ | 'ultraTestnet'
1144
+ | 'nitrograph'
1145
+ | 'sepolia'
1146
+ | 'optimism_sepolia'
1147
+ | 'arbitrumSepolia'
1148
+ | 'goerli'
1149
+ | 'optimism_goerli'
1150
+ | 'arbitrumGoerli'
1151
+ | 'basecamp'
1152
+ | 'somnia'
1153
+ | 'zkverify'
1154
+ | 'polkadot'
1155
+ | 'kusama'
1156
+ | 'flow_cadence';
1157
+
1158
+ /**
1159
+ * Indicates if only in-range liquidity is rewarded.
1160
+ */
1161
+ onlyRewardInRangeLiquidity?: boolean;
1162
+
1163
+ /**
1164
+ * Array of liquidity pools associated with the rule.
1165
+ */
1166
+ pools?: Array<Liquidity.Pool>;
1167
+
1168
+ /**
1169
+ * Protocol of the liquidity pool.
1170
+ */
1171
+ protocol?: string;
1172
+ }
1173
+
1174
+ export namespace Liquidity {
1175
+ export interface Pool {
1176
+ /**
1177
+ * Unique identifier of the liquidity pool.
1178
+ */
1179
+ id: string;
1180
+ }
1181
+ }
1182
+
762
1183
  export interface Range {
763
1184
  /**
764
1185
  * Reward amount for this range.
@@ -774,6 +1195,16 @@ export namespace RuleCreateResponse {
774
1195
  * Start value of the range.
775
1196
  */
776
1197
  startRange: number;
1198
+
1199
+ /**
1200
+ * ID of the loyalty badge for this range.
1201
+ */
1202
+ loyaltyBadgeId?: string;
1203
+
1204
+ /**
1205
+ * Amount of the loyalty multiplier for this range.
1206
+ */
1207
+ loyaltyMultiplierAmount?: number;
777
1208
  }
778
1209
 
779
1210
  /**
@@ -826,20 +1257,15 @@ export namespace RuleCreateResponse {
826
1257
  * Object containing details of the associated smart contract.
827
1258
  */
828
1259
  export interface SmartContract {
829
- /**
830
- * ABI of the smart contract.
831
- */
832
- abi?: string | null;
833
-
834
1260
  /**
835
1261
  * Mapping of addresses for the smart contract.
836
1262
  */
837
1263
  addressMapping?: string | null;
838
1264
 
839
1265
  /**
840
- * Array of bonus details applied to the rule.
1266
+ * Object containing details of the amount multiplier from the event.
841
1267
  */
842
- bonus?: Array<SmartContract.Bonus> | null;
1268
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
843
1269
 
844
1270
  /**
845
1271
  * ID of the smart contract.
@@ -851,68 +1277,31 @@ export namespace RuleCreateResponse {
851
1277
  */
852
1278
  criteria?: 'everyEvent' | 'byParameter' | null;
853
1279
 
854
- /**
855
- * Time range applied to the rule.
856
- */
857
- customRange?: SmartContract.CustomRange | null;
858
-
859
1280
  /**
860
1281
  * Event emitted by the smart contract.
861
1282
  */
862
1283
  event?: string | null;
863
1284
 
864
- /**
865
- * Maximum value allowed for the parameter.
866
- */
867
- max?: number | null;
868
-
869
1285
  /**
870
1286
  * Array of parameters for the smart contract.
871
1287
  */
872
1288
  params?: Array<SmartContract.Param> | null;
873
1289
 
874
1290
  /**
875
- * Flag indicating if a bonus is applied.
876
- */
877
- withBonus?: boolean | null;
878
-
879
- /**
880
- * Flag indicating if a custom range is applied.
1291
+ * Type of the smart contract interaction.
881
1292
  */
882
- withCustomRange?: boolean | null;
883
-
884
- /**
885
- * Flag indicating if a maximum limit is applied.
886
- */
887
- withMax?: boolean | null;
1293
+ type?: 'function' | 'event' | null;
888
1294
  }
889
1295
 
890
1296
  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
1297
  /**
904
- * Time range applied to the rule.
1298
+ * Object containing details of the amount multiplier from the event.
905
1299
  */
906
- export interface CustomRange {
907
- /**
908
- * End time of the custom range.
909
- */
910
- endsAt?: string | null;
911
-
1300
+ export interface AmountMultiplier {
912
1301
  /**
913
- * Start time of the custom range.
1302
+ * Mapping of the value for the smart contract.
914
1303
  */
915
- startsAt?: string | null;
1304
+ valueMapping?: string | null;
916
1305
  }
917
1306
 
918
1307
  export interface Param {
@@ -956,6 +1345,33 @@ export namespace RuleCreateResponse {
956
1345
  */
957
1346
  streakMilestone: number;
958
1347
  }
1348
+
1349
+ /**
1350
+ * Metadata for swap loyalty rules
1351
+ */
1352
+ export interface Swap {
1353
+ provider?: 'any' | 'relay' | 'lifi';
1354
+
1355
+ relayReferrerId?: string;
1356
+
1357
+ requireCrossChainSwap?: boolean;
1358
+
1359
+ swappedToChain?: 'any' | number | string;
1360
+
1361
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1362
+
1363
+ tokenMode?: 'any' | 'specific';
1364
+
1365
+ trackTokenAmount?: boolean;
1366
+ }
1367
+
1368
+ export namespace Swap {
1369
+ export interface SwappedToToken {
1370
+ address: string;
1371
+
1372
+ chainId: string;
1373
+ }
1374
+ }
959
1375
  }
960
1376
 
961
1377
  export interface Collection {
@@ -968,13 +1384,17 @@ export namespace RuleCreateResponse {
968
1384
  * Blockchain network for the collection
969
1385
  */
970
1386
  network:
1387
+ | 'abstract'
1388
+ | 'abstractTestnet'
971
1389
  | 'apechain'
972
1390
  | 'arbitrum'
973
1391
  | 'avalanche'
974
1392
  | 'avalancheFuji'
975
1393
  | 'base'
976
1394
  | 'baseSepolia'
1395
+ | 'berachain'
977
1396
  | 'berachainArtio'
1397
+ | 'berachainBepolia'
978
1398
  | 'binance'
979
1399
  | 'bscTestnet'
980
1400
  | 'campTestnet'
@@ -982,18 +1402,30 @@ export namespace RuleCreateResponse {
982
1402
  | 'fantomTestnet'
983
1403
  | 'flowMainnet'
984
1404
  | 'mainnet'
1405
+ | 'nexusTestnet'
985
1406
  | 'optimism'
986
1407
  | 'polygon'
987
1408
  | 'polygon_mumbai'
988
1409
  | 'skaleNebula'
1410
+ | 'skaleEuropa'
1411
+ | 'skaleCalypso'
989
1412
  | 'solana'
990
1413
  | 'sophon'
1414
+ | 'sophonTestnet'
991
1415
  | 'sui'
992
1416
  | 'superseed'
993
1417
  | 'superseedSepolia'
994
1418
  | 'vanar'
995
1419
  | 'xai'
996
1420
  | 'zksync'
1421
+ | 'coti'
1422
+ | 'cotiTestnet'
1423
+ | 'morph'
1424
+ | 'morphTestnet'
1425
+ | 'morphHolesky'
1426
+ | 'ultra'
1427
+ | 'ultraTestnet'
1428
+ | 'nitrograph'
997
1429
  | 'sepolia'
998
1430
  | 'optimism_sepolia'
999
1431
  | 'arbitrumSepolia'
@@ -1001,7 +1433,16 @@ export namespace RuleCreateResponse {
1001
1433
  | 'optimism_goerli'
1002
1434
  | 'arbitrumGoerli'
1003
1435
  | 'basecamp'
1004
- | 'abstract';
1436
+ | 'somnia'
1437
+ | 'zkverify'
1438
+ | 'polkadot'
1439
+ | 'kusama'
1440
+ | 'flow_cadence';
1441
+
1442
+ /**
1443
+ * Symbol of the collection.
1444
+ */
1445
+ symbol?: string;
1005
1446
  }
1006
1447
  }
1007
1448
 
@@ -1023,10 +1464,15 @@ export interface RuleUpdateResponse {
1023
1464
  */
1024
1465
  name: string;
1025
1466
 
1467
+ /**
1468
+ * The type of claim for the reward
1469
+ */
1470
+ claimType?: 'manual' | 'auto' | null;
1471
+
1026
1472
  /**
1027
1473
  * Blockchain address of the associated collection
1028
1474
  */
1029
- collectionAddress?: string;
1475
+ collectionAddress?: string | null;
1030
1476
 
1031
1477
  /**
1032
1478
  * List of associated collections
@@ -1058,11 +1504,21 @@ export interface RuleUpdateResponse {
1058
1504
  */
1059
1505
  effectiveStartTime?: string | null;
1060
1506
 
1507
+ /**
1508
+ * ID of the external integration
1509
+ */
1510
+ externalIntegrationId?: string | null;
1511
+
1061
1512
  /**
1062
1513
  * Frequency of the rule execution
1063
1514
  */
1064
1515
  frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
1065
1516
 
1517
+ /**
1518
+ * Optional stratus function id for the rule
1519
+ */
1520
+ functionId?: string | null;
1521
+
1066
1522
  /**
1067
1523
  * Whether to hide this rule in the user interface
1068
1524
  */
@@ -1071,7 +1527,7 @@ export interface RuleUpdateResponse {
1071
1527
  /**
1072
1528
  * Time interval for recurring rule execution
1073
1529
  */
1074
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1530
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
1075
1531
 
1076
1532
  /**
1077
1533
  * Whether this rule is required for participation
@@ -1083,6 +1539,18 @@ export interface RuleUpdateResponse {
1083
1539
  */
1084
1540
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
1085
1541
 
1542
+ /**
1543
+ * The interval for the max amount. Available for the smart contract and external
1544
+ * rules.
1545
+ */
1546
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
1547
+
1548
+ /**
1549
+ * The maximum amount of points a user can earn per interval. Available for the
1550
+ * smart contract and external rules.
1551
+ */
1552
+ maxAmountPerInterval?: number | null;
1553
+
1086
1554
  /**
1087
1555
  * URL of the media to be displayed
1088
1556
  */
@@ -1097,13 +1565,17 @@ export interface RuleUpdateResponse {
1097
1565
  * Blockchain network where the rule will apply
1098
1566
  */
1099
1567
  network?:
1568
+ | 'abstract'
1569
+ | 'abstractTestnet'
1100
1570
  | 'apechain'
1101
1571
  | 'arbitrum'
1102
1572
  | 'avalanche'
1103
1573
  | 'avalancheFuji'
1104
1574
  | 'base'
1105
1575
  | 'baseSepolia'
1576
+ | 'berachain'
1106
1577
  | 'berachainArtio'
1578
+ | 'berachainBepolia'
1107
1579
  | 'binance'
1108
1580
  | 'bscTestnet'
1109
1581
  | 'campTestnet'
@@ -1111,18 +1583,30 @@ export interface RuleUpdateResponse {
1111
1583
  | 'fantomTestnet'
1112
1584
  | 'flowMainnet'
1113
1585
  | 'mainnet'
1586
+ | 'nexusTestnet'
1114
1587
  | 'optimism'
1115
1588
  | 'polygon'
1116
1589
  | 'polygon_mumbai'
1117
1590
  | 'skaleNebula'
1591
+ | 'skaleEuropa'
1592
+ | 'skaleCalypso'
1118
1593
  | 'solana'
1119
1594
  | 'sophon'
1595
+ | 'sophonTestnet'
1120
1596
  | 'sui'
1121
1597
  | 'superseed'
1122
1598
  | 'superseedSepolia'
1123
1599
  | 'vanar'
1124
1600
  | 'xai'
1125
1601
  | 'zksync'
1602
+ | 'coti'
1603
+ | 'cotiTestnet'
1604
+ | 'morph'
1605
+ | 'morphTestnet'
1606
+ | 'morphHolesky'
1607
+ | 'ultra'
1608
+ | 'ultraTestnet'
1609
+ | 'nitrograph'
1126
1610
  | 'sepolia'
1127
1611
  | 'optimism_sepolia'
1128
1612
  | 'arbitrumSepolia'
@@ -1130,7 +1614,11 @@ export interface RuleUpdateResponse {
1130
1614
  | 'optimism_goerli'
1131
1615
  | 'arbitrumGoerli'
1132
1616
  | 'basecamp'
1133
- | 'abstract';
1617
+ | 'somnia'
1618
+ | 'zkverify'
1619
+ | 'polkadot'
1620
+ | 'kusama'
1621
+ | 'flow_cadence';
1134
1622
 
1135
1623
  /**
1136
1624
  * ID for associated OAuth credentials
@@ -1138,20 +1626,35 @@ export interface RuleUpdateResponse {
1138
1626
  oauthCredentialsId?: string | null;
1139
1627
 
1140
1628
  /**
1141
- * Type of reward issued by this rule
1629
+ * The lifetime of the reward
1142
1630
  */
1143
- rewardType?: 'points' | 'multiplier';
1631
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
1144
1632
 
1145
1633
  /**
1146
- * Start time for the loyalty rule
1634
+ * Type of reward issued by this rule
1147
1635
  */
1148
- startTime?: string | null;
1636
+ rewardType?: 'points' | 'multiplier' | 'badge';
1149
1637
 
1150
1638
  /**
1151
- * Optional subscription identifier for the rule
1639
+ * URL of the Shopify store
1152
1640
  */
1153
- subscriptionIdentifier?: string | null;
1154
- }
1641
+ shopifyStoreUrl?: string | null;
1642
+
1643
+ /**
1644
+ * Whether to show this rule before the start time
1645
+ */
1646
+ showBeforeStart?: boolean;
1647
+
1648
+ /**
1649
+ * Start time for the loyalty rule
1650
+ */
1651
+ startTime?: string | null;
1652
+
1653
+ /**
1654
+ * Optional stratus subscription id for the rule
1655
+ */
1656
+ subscriptionId?: string | null;
1657
+ }
1155
1658
 
1156
1659
  export namespace RuleUpdateResponse {
1157
1660
  export interface Collection {
@@ -1164,13 +1667,17 @@ export namespace RuleUpdateResponse {
1164
1667
  * Blockchain network for the collection
1165
1668
  */
1166
1669
  network:
1670
+ | 'abstract'
1671
+ | 'abstractTestnet'
1167
1672
  | 'apechain'
1168
1673
  | 'arbitrum'
1169
1674
  | 'avalanche'
1170
1675
  | 'avalancheFuji'
1171
1676
  | 'base'
1172
1677
  | 'baseSepolia'
1678
+ | 'berachain'
1173
1679
  | 'berachainArtio'
1680
+ | 'berachainBepolia'
1174
1681
  | 'binance'
1175
1682
  | 'bscTestnet'
1176
1683
  | 'campTestnet'
@@ -1178,18 +1685,30 @@ export namespace RuleUpdateResponse {
1178
1685
  | 'fantomTestnet'
1179
1686
  | 'flowMainnet'
1180
1687
  | 'mainnet'
1688
+ | 'nexusTestnet'
1181
1689
  | 'optimism'
1182
1690
  | 'polygon'
1183
1691
  | 'polygon_mumbai'
1184
1692
  | 'skaleNebula'
1693
+ | 'skaleEuropa'
1694
+ | 'skaleCalypso'
1185
1695
  | 'solana'
1186
1696
  | 'sophon'
1697
+ | 'sophonTestnet'
1187
1698
  | 'sui'
1188
1699
  | 'superseed'
1189
1700
  | 'superseedSepolia'
1190
1701
  | 'vanar'
1191
1702
  | 'xai'
1192
1703
  | 'zksync'
1704
+ | 'coti'
1705
+ | 'cotiTestnet'
1706
+ | 'morph'
1707
+ | 'morphTestnet'
1708
+ | 'morphHolesky'
1709
+ | 'ultra'
1710
+ | 'ultraTestnet'
1711
+ | 'nitrograph'
1193
1712
  | 'sepolia'
1194
1713
  | 'optimism_sepolia'
1195
1714
  | 'arbitrumSepolia'
@@ -1197,13 +1716,27 @@ export namespace RuleUpdateResponse {
1197
1716
  | 'optimism_goerli'
1198
1717
  | 'arbitrumGoerli'
1199
1718
  | 'basecamp'
1200
- | 'abstract';
1719
+ | 'somnia'
1720
+ | 'zkverify'
1721
+ | 'polkadot'
1722
+ | 'kusama'
1723
+ | 'flow_cadence';
1724
+
1725
+ /**
1726
+ * Symbol of the collection.
1727
+ */
1728
+ symbol?: string;
1201
1729
  }
1202
1730
 
1203
1731
  /**
1204
1732
  * Additional metadata for the loyalty rule
1205
1733
  */
1206
1734
  export interface Metadata {
1735
+ /**
1736
+ * Number of tokens per batch.
1737
+ */
1738
+ batchSize?: number | null;
1739
+
1207
1740
  /**
1208
1741
  * Text displayed on the action button.
1209
1742
  */
@@ -1227,7 +1760,7 @@ export namespace RuleUpdateResponse {
1227
1760
  /**
1228
1761
  * Text to check in the Twitter post, username, or bio.
1229
1762
  */
1230
- checkText?: string | null;
1763
+ checkText?: string | Array<string> | null;
1231
1764
 
1232
1765
  /**
1233
1766
  * Array of collections associated with the rule.
@@ -1237,7 +1770,12 @@ export namespace RuleUpdateResponse {
1237
1770
  /**
1238
1771
  * Conditions for completing the profile.
1239
1772
  */
1240
- completeProfileConditions?: Record<string, boolean> | null;
1773
+ completeProfileConditions?: { [key: string]: boolean } | null;
1774
+
1775
+ /**
1776
+ * Description of the external rule condition (only for external rules)
1777
+ */
1778
+ conditionDescription?: string;
1241
1779
 
1242
1780
  /**
1243
1781
  * Object containing details for the call-to-action.
@@ -1249,6 +1787,11 @@ export namespace RuleUpdateResponse {
1249
1787
  */
1250
1788
  customRewardsApiKey?: string;
1251
1789
 
1790
+ /**
1791
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
1792
+ */
1793
+ directRpc?: boolean;
1794
+
1252
1795
  /**
1253
1796
  * Array of Discord servers, channels, and roles to join.
1254
1797
  */
@@ -1274,6 +1817,11 @@ export namespace RuleUpdateResponse {
1274
1817
  */
1275
1818
  enableVerifiedMultiplier?: boolean;
1276
1819
 
1820
+ /**
1821
+ * Type of ERC20 token for the loyalty rule.
1822
+ */
1823
+ erc20Type?: 'erc20' | 'native';
1824
+
1277
1825
  /**
1278
1826
  * Fill source of the order for the token sale
1279
1827
  */
@@ -1294,11 +1842,6 @@ export namespace RuleUpdateResponse {
1294
1842
  */
1295
1843
  hasNeverSold?: boolean;
1296
1844
 
1297
- /**
1298
- * Flag indicating whether the order source is included.
1299
- */
1300
- hasOrderSource?: boolean;
1301
-
1302
1845
  /**
1303
1846
  * Indicates if the full royalty has been paid for items.
1304
1847
  */
@@ -1319,11 +1862,21 @@ export namespace RuleUpdateResponse {
1319
1862
  */
1320
1863
  imageUrl?: string | null;
1321
1864
 
1865
+ /**
1866
+ * If enabled, the first transaction done on the platform will complete this rule
1867
+ */
1868
+ isCheckInOnEveryTxn?: boolean;
1869
+
1322
1870
  /**
1323
1871
  * Indicates if the multiplier has been applied to rewards.
1324
1872
  */
1325
1873
  isMultiplierApplied?: boolean;
1326
1874
 
1875
+ /**
1876
+ * Flag indicating if the rule is restricted to new users.
1877
+ */
1878
+ isRestrictedToNewUsers?: boolean;
1879
+
1327
1880
  /**
1328
1881
  * Flag indicating if rewards are applied retroactively.
1329
1882
  */
@@ -1339,6 +1892,11 @@ export namespace RuleUpdateResponse {
1339
1892
  */
1340
1893
  link?: string | null;
1341
1894
 
1895
+ /**
1896
+ * Liquidity pool details.
1897
+ */
1898
+ liquidity?: Metadata.Liquidity;
1899
+
1342
1900
  /**
1343
1901
  * Maximum quantity constraint for token holding.
1344
1902
  */
@@ -1380,14 +1938,24 @@ export namespace RuleUpdateResponse {
1380
1938
  onlyRewardSingleTokenOwnership?: boolean | null;
1381
1939
 
1382
1940
  /**
1383
- * Order source of the order for the token sale
1941
+ * Promotional code associated with the rule.
1942
+ */
1943
+ promoCode?: string;
1944
+
1945
+ /**
1946
+ * URL of the CSV file containing promo codes.
1384
1947
  */
1385
- orderSource?: string;
1948
+ promoCodeCsvUrl?: string;
1386
1949
 
1387
1950
  /**
1388
- * Promotional code associated with the rule.
1951
+ * Numbers of the promotional code to be generated.
1389
1952
  */
1390
- promoCode?: string;
1953
+ promoCodeLength?: number | null;
1954
+
1955
+ /**
1956
+ * Type of the promotional code.
1957
+ */
1958
+ promoCodeType?: 'code' | 'csv' | 'generate';
1391
1959
 
1392
1960
  /**
1393
1961
  * Array defining ranges and corresponding rewards.
@@ -1404,11 +1972,62 @@ export namespace RuleUpdateResponse {
1404
1972
  */
1405
1973
  referrerReward?: number | null;
1406
1974
 
1975
+ /**
1976
+ * Loyalty currency ID of the referrer reward.
1977
+ */
1978
+ referrerRewardLoyaltyCurrencyId?: string | null;
1979
+
1980
+ /**
1981
+ * Flag indicating if the post link is required.
1982
+ */
1983
+ requirePostLink?: boolean | null;
1984
+
1985
+ /**
1986
+ * Flag indicating if media metadata is required.
1987
+ */
1988
+ requirePostMediaLink?: boolean | null;
1989
+
1990
+ /**
1991
+ * Flag indicating if the rule can also reward badges per range.
1992
+ */
1993
+ rewardBadgePerRange?: boolean;
1994
+
1995
+ /**
1996
+ * Flag indicating if the reward is rewarded by batch.
1997
+ */
1998
+ rewardByBatch?: boolean | null;
1999
+
2000
+ /**
2001
+ * Criteria to evaluate the reward.
2002
+ */
2003
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
2004
+
2005
+ /**
2006
+ * Flag indicating if the reward is rewarded per action.
2007
+ */
2008
+ rewardPerAction?: boolean | null;
2009
+
1407
2010
  /**
1408
2011
  * Flag indicating if rewards are given per impression.
1409
2012
  */
1410
2013
  rewardPerImpression?: boolean | null;
1411
2014
 
2015
+ /**
2016
+ * Flag indicating if the rule should reward based on value of traded tokens
2017
+ * instead of count.
2018
+ */
2019
+ rewardPerValue?: boolean;
2020
+
2021
+ /**
2022
+ * Wallet address of the user can only be used if userId is not provided
2023
+ */
2024
+ royaltyAddress?: string;
2025
+
2026
+ /**
2027
+ * Royalty percentage of the item.
2028
+ */
2029
+ royaltyPercentage?: number;
2030
+
1412
2031
  /**
1413
2032
  * Currency associated with sales.
1414
2033
  */
@@ -1448,6 +2067,7 @@ export namespace RuleUpdateResponse {
1448
2067
  | 'Twitch'
1449
2068
  | 'X(Twitter)'
1450
2069
  | 'YouTube'
2070
+ | 'Google'
1451
2071
  | null;
1452
2072
 
1453
2073
  /**
@@ -1460,11 +2080,21 @@ export namespace RuleUpdateResponse {
1460
2080
  */
1461
2081
  socialPlatformName?: string | null;
1462
2082
 
2083
+ /**
2084
+ * ID of the Steam app.
2085
+ */
2086
+ steamAppId?: string | null;
2087
+
1463
2088
  /**
1464
2089
  * Array of streak milestones and corresponding rewards.
1465
2090
  */
1466
2091
  streakArray?: Array<Metadata.StreakArray> | null;
1467
2092
 
2093
+ /**
2094
+ * Metadata for swap loyalty rules
2095
+ */
2096
+ swap?: Metadata.Swap;
2097
+
1468
2098
  /**
1469
2099
  * ID of the Telegram channel.
1470
2100
  */
@@ -1480,6 +2110,12 @@ export namespace RuleUpdateResponse {
1480
2110
  */
1481
2111
  trackAllContracts?: boolean | null;
1482
2112
 
2113
+ /**
2114
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2115
+ * completed once the progress is 100%.
2116
+ */
2117
+ trackProgress?: boolean | null;
2118
+
1483
2119
  /**
1484
2120
  * URL of the associated Twitter account.
1485
2121
  */
@@ -1523,7 +2159,28 @@ export namespace RuleUpdateResponse {
1523
2159
  /**
1524
2160
  * Type of wallet associated with the rule.
1525
2161
  */
1526
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
2162
+ walletType?:
2163
+ | 'evm'
2164
+ | 'solana'
2165
+ | 'imx'
2166
+ | 'sui'
2167
+ | 'ton'
2168
+ | 'cosmos'
2169
+ | 'ultra'
2170
+ | 'agw'
2171
+ | 'flow_cadence'
2172
+ | 'substrate'
2173
+ | null;
2174
+
2175
+ /**
2176
+ * ID of the Youtube channel.
2177
+ */
2178
+ youtubeChannelId?: string | null;
2179
+
2180
+ /**
2181
+ * ID of the Youtube video.
2182
+ */
2183
+ youtubeVideoId?: string | null;
1527
2184
  }
1528
2185
 
1529
2186
  export namespace Metadata {
@@ -1542,13 +2199,17 @@ export namespace RuleUpdateResponse {
1542
2199
  * Blockchain network of the collection.
1543
2200
  */
1544
2201
  network?:
2202
+ | 'abstract'
2203
+ | 'abstractTestnet'
1545
2204
  | 'apechain'
1546
2205
  | 'arbitrum'
1547
2206
  | 'avalanche'
1548
2207
  | 'avalancheFuji'
1549
2208
  | 'base'
1550
2209
  | 'baseSepolia'
2210
+ | 'berachain'
1551
2211
  | 'berachainArtio'
2212
+ | 'berachainBepolia'
1552
2213
  | 'binance'
1553
2214
  | 'bscTestnet'
1554
2215
  | 'campTestnet'
@@ -1556,18 +2217,30 @@ export namespace RuleUpdateResponse {
1556
2217
  | 'fantomTestnet'
1557
2218
  | 'flowMainnet'
1558
2219
  | 'mainnet'
2220
+ | 'nexusTestnet'
1559
2221
  | 'optimism'
1560
2222
  | 'polygon'
1561
2223
  | 'polygon_mumbai'
1562
2224
  | 'skaleNebula'
2225
+ | 'skaleEuropa'
2226
+ | 'skaleCalypso'
1563
2227
  | 'solana'
1564
2228
  | 'sophon'
2229
+ | 'sophonTestnet'
1565
2230
  | 'sui'
1566
2231
  | 'superseed'
1567
2232
  | 'superseedSepolia'
1568
2233
  | 'vanar'
1569
2234
  | 'xai'
1570
2235
  | 'zksync'
2236
+ | 'coti'
2237
+ | 'cotiTestnet'
2238
+ | 'morph'
2239
+ | 'morphTestnet'
2240
+ | 'morphHolesky'
2241
+ | 'ultra'
2242
+ | 'ultraTestnet'
2243
+ | 'nitrograph'
1571
2244
  | 'sepolia'
1572
2245
  | 'optimism_sepolia'
1573
2246
  | 'arbitrumSepolia'
@@ -1575,7 +2248,11 @@ export namespace RuleUpdateResponse {
1575
2248
  | 'optimism_goerli'
1576
2249
  | 'arbitrumGoerli'
1577
2250
  | 'basecamp'
1578
- | 'abstract';
2251
+ | 'somnia'
2252
+ | 'zkverify'
2253
+ | 'polkadot'
2254
+ | 'kusama'
2255
+ | 'flow_cadence';
1579
2256
  }
1580
2257
 
1581
2258
  /**
@@ -1652,6 +2329,111 @@ export namespace RuleUpdateResponse {
1652
2329
  id: string;
1653
2330
  }
1654
2331
 
2332
+ /**
2333
+ * Liquidity pool details.
2334
+ */
2335
+ export interface Liquidity {
2336
+ /**
2337
+ * Calculation type of the liquidity pool.
2338
+ */
2339
+ calculationType?: 'fixed' | 'custom';
2340
+
2341
+ /**
2342
+ * Custom function to calculate the the reward amount based on the liquidity
2343
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2344
+ * USD.
2345
+ */
2346
+ customFunction?: string;
2347
+
2348
+ /**
2349
+ * Liquidity provided per day in USD
2350
+ */
2351
+ liquidityPerDay?: number;
2352
+
2353
+ /**
2354
+ * Blockchain network of the liquidity pool.
2355
+ */
2356
+ network?:
2357
+ | 'abstract'
2358
+ | 'abstractTestnet'
2359
+ | 'apechain'
2360
+ | 'arbitrum'
2361
+ | 'avalanche'
2362
+ | 'avalancheFuji'
2363
+ | 'base'
2364
+ | 'baseSepolia'
2365
+ | 'berachain'
2366
+ | 'berachainArtio'
2367
+ | 'berachainBepolia'
2368
+ | 'binance'
2369
+ | 'bscTestnet'
2370
+ | 'campTestnet'
2371
+ | 'fantom'
2372
+ | 'fantomTestnet'
2373
+ | 'flowMainnet'
2374
+ | 'mainnet'
2375
+ | 'nexusTestnet'
2376
+ | 'optimism'
2377
+ | 'polygon'
2378
+ | 'polygon_mumbai'
2379
+ | 'skaleNebula'
2380
+ | 'skaleEuropa'
2381
+ | 'skaleCalypso'
2382
+ | 'solana'
2383
+ | 'sophon'
2384
+ | 'sophonTestnet'
2385
+ | 'sui'
2386
+ | 'superseed'
2387
+ | 'superseedSepolia'
2388
+ | 'vanar'
2389
+ | 'xai'
2390
+ | 'zksync'
2391
+ | 'coti'
2392
+ | 'cotiTestnet'
2393
+ | 'morph'
2394
+ | 'morphTestnet'
2395
+ | 'morphHolesky'
2396
+ | 'ultra'
2397
+ | 'ultraTestnet'
2398
+ | 'nitrograph'
2399
+ | 'sepolia'
2400
+ | 'optimism_sepolia'
2401
+ | 'arbitrumSepolia'
2402
+ | 'goerli'
2403
+ | 'optimism_goerli'
2404
+ | 'arbitrumGoerli'
2405
+ | 'basecamp'
2406
+ | 'somnia'
2407
+ | 'zkverify'
2408
+ | 'polkadot'
2409
+ | 'kusama'
2410
+ | 'flow_cadence';
2411
+
2412
+ /**
2413
+ * Indicates if only in-range liquidity is rewarded.
2414
+ */
2415
+ onlyRewardInRangeLiquidity?: boolean;
2416
+
2417
+ /**
2418
+ * Array of liquidity pools associated with the rule.
2419
+ */
2420
+ pools?: Array<Liquidity.Pool>;
2421
+
2422
+ /**
2423
+ * Protocol of the liquidity pool.
2424
+ */
2425
+ protocol?: string;
2426
+ }
2427
+
2428
+ export namespace Liquidity {
2429
+ export interface Pool {
2430
+ /**
2431
+ * Unique identifier of the liquidity pool.
2432
+ */
2433
+ id: string;
2434
+ }
2435
+ }
2436
+
1655
2437
  export interface Range {
1656
2438
  /**
1657
2439
  * Reward amount for this range.
@@ -1667,6 +2449,16 @@ export namespace RuleUpdateResponse {
1667
2449
  * Start value of the range.
1668
2450
  */
1669
2451
  startRange: number;
2452
+
2453
+ /**
2454
+ * ID of the loyalty badge for this range.
2455
+ */
2456
+ loyaltyBadgeId?: string;
2457
+
2458
+ /**
2459
+ * Amount of the loyalty multiplier for this range.
2460
+ */
2461
+ loyaltyMultiplierAmount?: number;
1670
2462
  }
1671
2463
 
1672
2464
  /**
@@ -1719,20 +2511,15 @@ export namespace RuleUpdateResponse {
1719
2511
  * Object containing details of the associated smart contract.
1720
2512
  */
1721
2513
  export interface SmartContract {
1722
- /**
1723
- * ABI of the smart contract.
1724
- */
1725
- abi?: string | null;
1726
-
1727
2514
  /**
1728
2515
  * Mapping of addresses for the smart contract.
1729
2516
  */
1730
2517
  addressMapping?: string | null;
1731
2518
 
1732
2519
  /**
1733
- * Array of bonus details applied to the rule.
2520
+ * Object containing details of the amount multiplier from the event.
1734
2521
  */
1735
- bonus?: Array<SmartContract.Bonus> | null;
2522
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1736
2523
 
1737
2524
  /**
1738
2525
  * ID of the smart contract.
@@ -1744,68 +2531,31 @@ export namespace RuleUpdateResponse {
1744
2531
  */
1745
2532
  criteria?: 'everyEvent' | 'byParameter' | null;
1746
2533
 
1747
- /**
1748
- * Time range applied to the rule.
1749
- */
1750
- customRange?: SmartContract.CustomRange | null;
1751
-
1752
2534
  /**
1753
2535
  * Event emitted by the smart contract.
1754
2536
  */
1755
2537
  event?: string | null;
1756
2538
 
1757
- /**
1758
- * Maximum value allowed for the parameter.
1759
- */
1760
- max?: number | null;
1761
-
1762
2539
  /**
1763
2540
  * Array of parameters for the smart contract.
1764
2541
  */
1765
2542
  params?: Array<SmartContract.Param> | null;
1766
2543
 
1767
2544
  /**
1768
- * Flag indicating if a bonus is applied.
2545
+ * Type of the smart contract interaction.
1769
2546
  */
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;
2547
+ type?: 'function' | 'event' | null;
1781
2548
  }
1782
2549
 
1783
2550
  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
2551
  /**
1797
- * Time range applied to the rule.
2552
+ * Object containing details of the amount multiplier from the event.
1798
2553
  */
1799
- export interface CustomRange {
1800
- /**
1801
- * End time of the custom range.
1802
- */
1803
- endsAt?: string | null;
1804
-
2554
+ export interface AmountMultiplier {
1805
2555
  /**
1806
- * Start time of the custom range.
2556
+ * Mapping of the value for the smart contract.
1807
2557
  */
1808
- startsAt?: string | null;
2558
+ valueMapping?: string | null;
1809
2559
  }
1810
2560
 
1811
2561
  export interface Param {
@@ -1849,6 +2599,33 @@ export namespace RuleUpdateResponse {
1849
2599
  */
1850
2600
  streakMilestone: number;
1851
2601
  }
2602
+
2603
+ /**
2604
+ * Metadata for swap loyalty rules
2605
+ */
2606
+ export interface Swap {
2607
+ provider?: 'any' | 'relay' | 'lifi';
2608
+
2609
+ relayReferrerId?: string;
2610
+
2611
+ requireCrossChainSwap?: boolean;
2612
+
2613
+ swappedToChain?: 'any' | number | string;
2614
+
2615
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2616
+
2617
+ tokenMode?: 'any' | 'specific';
2618
+
2619
+ trackTokenAmount?: boolean;
2620
+ }
2621
+
2622
+ export namespace Swap {
2623
+ export interface SwappedToToken {
2624
+ address: string;
2625
+
2626
+ chainId: string;
2627
+ }
2628
+ }
1852
2629
  }
1853
2630
  }
1854
2631
 
@@ -1859,9 +2636,6 @@ export interface RuleListResponse {
1859
2636
  }
1860
2637
 
1861
2638
  export namespace RuleListResponse {
1862
- /**
1863
- * Schema for a loyalty rule
1864
- */
1865
2639
  export interface Data {
1866
2640
  /**
1867
2641
  * Unique identifier for the loyalty rule
@@ -1871,7 +2645,7 @@ export namespace RuleListResponse {
1871
2645
  /**
1872
2646
  * Amount associated with the loyalty rule
1873
2647
  */
1874
- amount: number;
2648
+ amount: number | null;
1875
2649
 
1876
2650
  /**
1877
2651
  * Timestamp when the loyalty rule was created
@@ -1883,16 +2657,46 @@ export namespace RuleListResponse {
1883
2657
  */
1884
2658
  deletedAt: string | null;
1885
2659
 
2660
+ /**
2661
+ * Description of the loyalty rule
2662
+ */
2663
+ description: string;
2664
+
2665
+ /**
2666
+ * End time of the loyalty rule
2667
+ */
2668
+ endTime: string | null;
2669
+
1886
2670
  /**
1887
2671
  * Frequency of the loyalty rule
1888
2672
  */
1889
2673
  frequency: string;
1890
2674
 
2675
+ /**
2676
+ * Chains attached to the loyalty rule
2677
+ */
2678
+ loyaltyRuleChain: Array<Data.LoyaltyRuleChain>;
2679
+
2680
+ /**
2681
+ * Name of the loyalty rule
2682
+ */
2683
+ name: string;
2684
+
1891
2685
  /**
1892
2686
  * Unique identifier for the organization
1893
2687
  */
1894
2688
  organizationId: string;
1895
2689
 
2690
+ /**
2691
+ * Type of the reward
2692
+ */
2693
+ rewardType: 'points' | 'multiplier' | 'badge';
2694
+
2695
+ /**
2696
+ * Start time of the loyalty rule
2697
+ */
2698
+ startTime: string | null;
2699
+
1896
2700
  /**
1897
2701
  * Type of the loyalty rule
1898
2702
  */
@@ -1908,15 +2712,1019 @@ export namespace RuleListResponse {
1908
2712
  */
1909
2713
  websiteId: string;
1910
2714
 
1911
- /**
1912
- * Optional address of the collection
1913
- */
1914
- collectionAddress?: string;
2715
+ /**
2716
+ * Optional address of the collection
2717
+ */
2718
+ collectionAddress?: string;
2719
+
2720
+ /**
2721
+ * URL of the media associated with the loyalty rule
2722
+ */
2723
+ mediaUrl?: string | null;
2724
+
2725
+ /**
2726
+ * Optional metadata for the loyalty rule
2727
+ */
2728
+ metadata?: { [key: string]: Data.Metadata };
2729
+ }
2730
+
2731
+ export namespace Data {
2732
+ export interface LoyaltyRuleChain {
2733
+ /**
2734
+ * Unique identifier for the rule chain
2735
+ */
2736
+ id: string;
2737
+
2738
+ loyaltyConditions: Array<LoyaltyRuleChain.LoyaltyCondition>;
2739
+
2740
+ /**
2741
+ * Unique identifier for the loyalty rule
2742
+ */
2743
+ loyaltyRuleId: string;
2744
+
2745
+ /**
2746
+ * Name of the rule chain
2747
+ */
2748
+ name: string;
2749
+ }
2750
+
2751
+ export namespace LoyaltyRuleChain {
2752
+ export interface LoyaltyCondition {
2753
+ /**
2754
+ * Unique identifier for the condition
2755
+ */
2756
+ id: string;
2757
+
2758
+ /**
2759
+ * Amount of the condition
2760
+ */
2761
+ amount: number | null;
2762
+
2763
+ association: Array<LoyaltyCondition.Association>;
2764
+
2765
+ /**
2766
+ * URL of the CSV file
2767
+ */
2768
+ csvUrl: string | null;
2769
+
2770
+ /**
2771
+ * Description of the condition
2772
+ */
2773
+ description: string | null;
2774
+
2775
+ /**
2776
+ * Number of times the condition must be met
2777
+ */
2778
+ repeatCount: number | null;
2779
+
2780
+ /**
2781
+ * Number of times the condition must be met
2782
+ */
2783
+ requiredCount: number | null;
2784
+
2785
+ /**
2786
+ * Type of the condition
2787
+ */
2788
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
2789
+ }
2790
+
2791
+ export namespace LoyaltyCondition {
2792
+ export interface Association {
2793
+ /**
2794
+ * Unique identifier for the association
2795
+ */
2796
+ id: string;
2797
+
2798
+ /**
2799
+ * Unique identifier for the loyalty badge
2800
+ */
2801
+ loyaltyBadgeId: string | null;
2802
+
2803
+ /**
2804
+ * Unique identifier for the loyalty currency
2805
+ */
2806
+ loyaltyCurrencyId: string | null;
2807
+
2808
+ loyaltyRule: Association.LoyaltyRule | null;
2809
+
2810
+ /**
2811
+ * Unique identifier for the loyalty rule group
2812
+ */
2813
+ loyaltyRuleGroupId: string | null;
2814
+
2815
+ /**
2816
+ * Unique identifier for the loyalty rule
2817
+ */
2818
+ loyaltyRuleId: string | null;
2819
+ }
2820
+
2821
+ export namespace Association {
2822
+ export interface LoyaltyRule {
2823
+ /**
2824
+ * Name of the loyalty rule
2825
+ */
2826
+ name: string;
2827
+ }
2828
+ }
2829
+ }
2830
+ }
2831
+
2832
+ export interface Metadata {
2833
+ /**
2834
+ * Number of tokens per batch.
2835
+ */
2836
+ batchSize?: number | null;
2837
+
2838
+ /**
2839
+ * Text displayed on the action button.
2840
+ */
2841
+ buttonText?: string | null;
2842
+
2843
+ /**
2844
+ * Flag indicating if commenting is required.
2845
+ */
2846
+ checkComment?: boolean | null;
2847
+
2848
+ /**
2849
+ * Flag indicating if liking the post is required.
2850
+ */
2851
+ checkLike?: boolean | null;
2852
+
2853
+ /**
2854
+ * Flag indicating if reposting is required.
2855
+ */
2856
+ checkRepost?: boolean | null;
2857
+
2858
+ /**
2859
+ * Text to check in the Twitter post, username, or bio.
2860
+ */
2861
+ checkText?: string | Array<string> | null;
2862
+
2863
+ /**
2864
+ * Array of collections associated with the rule.
2865
+ */
2866
+ collection?: Array<Metadata.Collection>;
2867
+
2868
+ /**
2869
+ * Conditions for completing the profile.
2870
+ */
2871
+ completeProfileConditions?: { [key: string]: boolean } | null;
2872
+
2873
+ /**
2874
+ * Description of the external rule condition (only for external rules)
2875
+ */
2876
+ conditionDescription?: string;
2877
+
2878
+ /**
2879
+ * Object containing details for the call-to-action.
2880
+ */
2881
+ cta?: Metadata.Cta | null;
2882
+
2883
+ /**
2884
+ * API key for custom rewards integration.
2885
+ */
2886
+ customRewardsApiKey?: string;
2887
+
2888
+ /**
2889
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
2890
+ */
2891
+ directRpc?: boolean;
2892
+
2893
+ /**
2894
+ * Array of Discord servers, channels, and roles to join.
2895
+ */
2896
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2897
+
2898
+ /**
2899
+ * Array of drip quests required to complete the rule.
2900
+ */
2901
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2902
+
2903
+ /**
2904
+ * Flag indicating whether joining Discord servers is required.
2905
+ */
2906
+ enableJoinDiscordServers?: boolean | null;
2907
+
2908
+ /**
2909
+ * Flag indicating whether streaks are enabled.
2910
+ */
2911
+ enableStreaks?: boolean | null;
2912
+
2913
+ /**
2914
+ * Flag indicating whether the verified multiplier is enabled.
2915
+ */
2916
+ enableVerifiedMultiplier?: boolean;
2917
+
2918
+ /**
2919
+ * Type of ERC20 token for the loyalty rule.
2920
+ */
2921
+ erc20Type?: 'erc20' | 'native';
2922
+
2923
+ /**
2924
+ * Fill source of the order for the token sale
2925
+ */
2926
+ fillSource?: string;
2927
+
2928
+ /**
2929
+ * Percentage reward given to a user for their first referral.
2930
+ */
2931
+ firstReferralReward?: number | null;
2932
+
2933
+ /**
2934
+ * Flag indicating whether the fill source is included.
2935
+ */
2936
+ hasFillSource?: boolean;
2937
+
2938
+ /**
2939
+ * Indicates if the item has never been sold.
2940
+ */
2941
+ hasNeverSold?: boolean;
2942
+
2943
+ /**
2944
+ * Indicates if the full royalty has been paid for items.
2945
+ */
2946
+ hasPaidFullRoyalty?: boolean;
2947
+
2948
+ /**
2949
+ * Flag indicating if the sale currency is included.
2950
+ */
2951
+ hasSaleCurrency?: boolean;
2952
+
2953
+ /**
2954
+ * Indicates if the user has a verified Twitter account.
2955
+ */
2956
+ hasVerifiedTwitter?: boolean;
2957
+
2958
+ /**
2959
+ * URL of the image associated with the rule.
2960
+ */
2961
+ imageUrl?: string | null;
2962
+
2963
+ /**
2964
+ * If enabled, the first transaction done on the platform will complete this rule
2965
+ */
2966
+ isCheckInOnEveryTxn?: boolean;
2967
+
2968
+ /**
2969
+ * Indicates if the multiplier has been applied to rewards.
2970
+ */
2971
+ isMultiplierApplied?: boolean;
2972
+
2973
+ /**
2974
+ * Flag indicating if the rule is restricted to new users.
2975
+ */
2976
+ isRestrictedToNewUsers?: boolean;
2977
+
2978
+ /**
2979
+ * Flag indicating if rewards are applied retroactively.
2980
+ */
2981
+ isRetroactive?: boolean | null;
2982
+
2983
+ /**
2984
+ * Flag indicating if the token hold multiplier is applied.
2985
+ */
2986
+ isTokenHoldMultiplier?: boolean;
2987
+
2988
+ /**
2989
+ * Optional link associated with the metadata.
2990
+ */
2991
+ link?: string | null;
2992
+
2993
+ /**
2994
+ * Liquidity pool details.
2995
+ */
2996
+ liquidity?: Metadata.Liquidity;
2997
+
2998
+ /**
2999
+ * Maximum quantity constraint for token holding.
3000
+ */
3001
+ maxQty?: number | null;
3002
+
3003
+ /**
3004
+ * Minimum quantity constraint for token holding.
3005
+ */
3006
+ minQty?: number | null;
3007
+
3008
+ /**
3009
+ * Array of loyalty currency IDs used for multipliers.
3010
+ */
3011
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
3012
+
3013
+ /**
3014
+ * Flag indicating whether to include only known users.
3015
+ */
3016
+ onlyKnownUsers?: boolean;
3017
+
3018
+ /**
3019
+ * Flag indicating whether to include only native tokens.
3020
+ */
3021
+ onlyNative?: boolean;
3022
+
3023
+ /**
3024
+ * Flag indicating whether to include only non-listed items.
3025
+ */
3026
+ onlyNonListed?: boolean;
3027
+
3028
+ /**
3029
+ * Indicates if only existing users are rewarded.
3030
+ */
3031
+ onlyRewardExistingUser?: boolean;
3032
+
3033
+ /**
3034
+ * give points for only one token ownership per contract
3035
+ */
3036
+ onlyRewardSingleTokenOwnership?: boolean | null;
3037
+
3038
+ /**
3039
+ * Promotional code associated with the rule.
3040
+ */
3041
+ promoCode?: string;
3042
+
3043
+ /**
3044
+ * URL of the CSV file containing promo codes.
3045
+ */
3046
+ promoCodeCsvUrl?: string;
3047
+
3048
+ /**
3049
+ * Numbers of the promotional code to be generated.
3050
+ */
3051
+ promoCodeLength?: number | null;
3052
+
3053
+ /**
3054
+ * Type of the promotional code.
3055
+ */
3056
+ promoCodeType?: 'code' | 'csv' | 'generate';
3057
+
3058
+ /**
3059
+ * Array defining ranges and corresponding rewards.
3060
+ */
3061
+ range?: Array<Metadata.Range>;
3062
+
3063
+ /**
3064
+ * Object defining referral requirements.
3065
+ */
3066
+ referralRequirements?: Metadata.ReferralRequirements | null;
3067
+
3068
+ /**
3069
+ * Lump sum reward given to a referrer.
3070
+ */
3071
+ referrerReward?: number | null;
3072
+
3073
+ /**
3074
+ * Loyalty currency ID of the referrer reward.
3075
+ */
3076
+ referrerRewardLoyaltyCurrencyId?: string | null;
3077
+
3078
+ /**
3079
+ * Flag indicating if the post link is required.
3080
+ */
3081
+ requirePostLink?: boolean | null;
3082
+
3083
+ /**
3084
+ * Flag indicating if media metadata is required.
3085
+ */
3086
+ requirePostMediaLink?: boolean | null;
3087
+
3088
+ /**
3089
+ * Flag indicating if the rule can also reward badges per range.
3090
+ */
3091
+ rewardBadgePerRange?: boolean;
3092
+
3093
+ /**
3094
+ * Flag indicating if the reward is rewarded by batch.
3095
+ */
3096
+ rewardByBatch?: boolean | null;
3097
+
3098
+ /**
3099
+ * Criteria to evaluate the reward.
3100
+ */
3101
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
3102
+
3103
+ /**
3104
+ * Flag indicating if the reward is rewarded per action.
3105
+ */
3106
+ rewardPerAction?: boolean | null;
3107
+
3108
+ /**
3109
+ * Flag indicating if rewards are given per impression.
3110
+ */
3111
+ rewardPerImpression?: boolean | null;
3112
+
3113
+ /**
3114
+ * Flag indicating if the rule should reward based on value of traded tokens
3115
+ * instead of count.
3116
+ */
3117
+ rewardPerValue?: boolean;
3118
+
3119
+ /**
3120
+ * Wallet address of the user can only be used if userId is not provided
3121
+ */
3122
+ royaltyAddress?: string;
3123
+
3124
+ /**
3125
+ * Royalty percentage of the item.
3126
+ */
3127
+ royaltyPercentage?: number;
3128
+
3129
+ /**
3130
+ * Currency associated with sales.
3131
+ */
3132
+ saleCurrency?: string;
3133
+
3134
+ /**
3135
+ * Percentage reward given for a second-level referral.
3136
+ */
3137
+ secondReferralReward?: number | null;
3138
+
3139
+ /**
3140
+ * Flag indicating if the multiplier is skipped.
3141
+ */
3142
+ skipMultiplier?: boolean | null;
3143
+
3144
+ /**
3145
+ * Object containing details of the associated smart contract.
3146
+ */
3147
+ smartContract?: Metadata.SmartContract;
3148
+
3149
+ /**
3150
+ * Array of snapshot proposals for the rule.
3151
+ */
3152
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
3153
+
3154
+ /**
3155
+ * Social media platform associated with the rule.
3156
+ */
3157
+ socialPlatform?:
3158
+ | 'Custom'
3159
+ | 'Discord'
3160
+ | 'EpicGames'
3161
+ | 'Instagram'
3162
+ | 'Steam'
3163
+ | 'Telegram'
3164
+ | 'TikTok'
3165
+ | 'Twitch'
3166
+ | 'X(Twitter)'
3167
+ | 'YouTube'
3168
+ | 'Google'
3169
+ | null;
3170
+
3171
+ /**
3172
+ * URL of the social platform's logo.
3173
+ */
3174
+ socialPlatformLogo?: string | null;
3175
+
3176
+ /**
3177
+ * Name of the social platform.
3178
+ */
3179
+ socialPlatformName?: string | null;
3180
+
3181
+ /**
3182
+ * ID of the Steam app.
3183
+ */
3184
+ steamAppId?: string | null;
3185
+
3186
+ /**
3187
+ * Array of streak milestones and corresponding rewards.
3188
+ */
3189
+ streakArray?: Array<Metadata.StreakArray> | null;
3190
+
3191
+ /**
3192
+ * Metadata for swap loyalty rules
3193
+ */
3194
+ swap?: Metadata.Swap;
3195
+
3196
+ /**
3197
+ * ID of the Telegram channel.
3198
+ */
3199
+ telegramChannelId?: string | null;
3200
+
3201
+ /**
3202
+ * Time delay in seconds to verify actions.
3203
+ */
3204
+ timeDelayToVerifySeconds?: string | number | null;
3205
+
3206
+ /**
3207
+ * Flag indicating if all contracts are tracked.
3208
+ */
3209
+ trackAllContracts?: boolean | null;
3210
+
3211
+ /**
3212
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
3213
+ * completed once the progress is 100%.
3214
+ */
3215
+ trackProgress?: boolean | null;
3216
+
3217
+ /**
3218
+ * URL of the associated Twitter account.
3219
+ */
3220
+ twitterAccountUrl?: string;
3221
+
3222
+ /**
3223
+ * Hashtag associated with the Twitter post.
3224
+ */
3225
+ twitterHashtag?: string;
3226
+
3227
+ /**
3228
+ * URL of the associated Twitter post.
3229
+ */
3230
+ twitterPostUrl?: string;
3231
+
3232
+ /**
3233
+ * Unique identifier of the Twitter user.
3234
+ */
3235
+ twitterUserId?: string;
3236
+
3237
+ /**
3238
+ * Twitter username of the user.
3239
+ */
3240
+ twitterUsername?: string;
3241
+
3242
+ /**
3243
+ * Minimum length of the verification text.
3244
+ */
3245
+ verificationTextMinimumLength?: number | null;
3246
+
3247
+ /**
3248
+ * Multiplier applied to rewards for verified users.
3249
+ */
3250
+ verifiedMultiplier?: number | null;
3251
+
3252
+ /**
3253
+ * Placeholder text for verification input fields.
3254
+ */
3255
+ verifyPlaceHolderText?: string | null;
3256
+
3257
+ /**
3258
+ * Type of wallet associated with the rule.
3259
+ */
3260
+ walletType?:
3261
+ | 'evm'
3262
+ | 'solana'
3263
+ | 'imx'
3264
+ | 'sui'
3265
+ | 'ton'
3266
+ | 'cosmos'
3267
+ | 'ultra'
3268
+ | 'agw'
3269
+ | 'flow_cadence'
3270
+ | 'substrate'
3271
+ | null;
3272
+
3273
+ /**
3274
+ * ID of the Youtube channel.
3275
+ */
3276
+ youtubeChannelId?: string | null;
3277
+
3278
+ /**
3279
+ * ID of the Youtube video.
3280
+ */
3281
+ youtubeVideoId?: string | null;
3282
+ }
3283
+
3284
+ export namespace Metadata {
3285
+ export interface Collection {
3286
+ /**
3287
+ * Blockchain address of the collection.
3288
+ */
3289
+ address?: string;
3290
+
3291
+ /**
3292
+ * Multiplier applied to the rewards for this collection.
3293
+ */
3294
+ multiplier?: number;
3295
+
3296
+ /**
3297
+ * Blockchain network of the collection.
3298
+ */
3299
+ network?:
3300
+ | 'abstract'
3301
+ | 'abstractTestnet'
3302
+ | 'apechain'
3303
+ | 'arbitrum'
3304
+ | 'avalanche'
3305
+ | 'avalancheFuji'
3306
+ | 'base'
3307
+ | 'baseSepolia'
3308
+ | 'berachain'
3309
+ | 'berachainArtio'
3310
+ | 'berachainBepolia'
3311
+ | 'binance'
3312
+ | 'bscTestnet'
3313
+ | 'campTestnet'
3314
+ | 'fantom'
3315
+ | 'fantomTestnet'
3316
+ | 'flowMainnet'
3317
+ | 'mainnet'
3318
+ | 'nexusTestnet'
3319
+ | 'optimism'
3320
+ | 'polygon'
3321
+ | 'polygon_mumbai'
3322
+ | 'skaleNebula'
3323
+ | 'skaleEuropa'
3324
+ | 'skaleCalypso'
3325
+ | 'solana'
3326
+ | 'sophon'
3327
+ | 'sophonTestnet'
3328
+ | 'sui'
3329
+ | 'superseed'
3330
+ | 'superseedSepolia'
3331
+ | 'vanar'
3332
+ | 'xai'
3333
+ | 'zksync'
3334
+ | 'coti'
3335
+ | 'cotiTestnet'
3336
+ | 'morph'
3337
+ | 'morphTestnet'
3338
+ | 'morphHolesky'
3339
+ | 'ultra'
3340
+ | 'ultraTestnet'
3341
+ | 'nitrograph'
3342
+ | 'sepolia'
3343
+ | 'optimism_sepolia'
3344
+ | 'arbitrumSepolia'
3345
+ | 'goerli'
3346
+ | 'optimism_goerli'
3347
+ | 'arbitrumGoerli'
3348
+ | 'basecamp'
3349
+ | 'somnia'
3350
+ | 'zkverify'
3351
+ | 'polkadot'
3352
+ | 'kusama'
3353
+ | 'flow_cadence';
3354
+ }
3355
+
3356
+ /**
3357
+ * Object containing details for the call-to-action.
3358
+ */
3359
+ export interface Cta {
3360
+ /**
3361
+ * Link for the call-to-action.
3362
+ */
3363
+ href?: string | null;
3364
+
3365
+ /**
3366
+ * Label for the call-to-action.
3367
+ */
3368
+ label?: string | null;
3369
+ }
3370
+
3371
+ export interface DiscordServersToJoin {
3372
+ /**
3373
+ * ID of the Discord server to join.
3374
+ */
3375
+ id?: string;
3376
+
3377
+ /**
3378
+ * Array of Discord channels to join.
3379
+ */
3380
+ channels?: Array<DiscordServersToJoin.Channel>;
3381
+
3382
+ /**
3383
+ * Array of roles to assign in the Discord server.
3384
+ */
3385
+ roles?: Array<DiscordServersToJoin.Role>;
3386
+ }
3387
+
3388
+ export namespace DiscordServersToJoin {
3389
+ export interface Channel {
3390
+ /**
3391
+ * ID of the Discord channel.
3392
+ */
3393
+ id?: string;
3394
+
3395
+ /**
3396
+ * Array of emojis used in the channel.
3397
+ */
3398
+ emojis?: Array<Channel.Emoji>;
3399
+
3400
+ /**
3401
+ * Phrase of text to be present in the discord message
3402
+ */
3403
+ text?: string;
3404
+ }
3405
+
3406
+ export namespace Channel {
3407
+ export interface Emoji {
3408
+ /**
3409
+ * ID of the emoji used in the channel.
3410
+ */
3411
+ id?: string;
3412
+ }
3413
+ }
3414
+
3415
+ export interface Role {
3416
+ /**
3417
+ * ID of the role in the Discord server.
3418
+ */
3419
+ id: string;
3420
+ }
3421
+ }
3422
+
3423
+ export interface DripQuestsToComplete {
3424
+ /**
3425
+ * ID of the drip quest to complete.
3426
+ */
3427
+ id: string;
3428
+ }
3429
+
3430
+ /**
3431
+ * Liquidity pool details.
3432
+ */
3433
+ export interface Liquidity {
3434
+ /**
3435
+ * Calculation type of the liquidity pool.
3436
+ */
3437
+ calculationType?: 'fixed' | 'custom';
3438
+
3439
+ /**
3440
+ * Custom function to calculate the the reward amount based on the liquidity
3441
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
3442
+ * USD.
3443
+ */
3444
+ customFunction?: string;
3445
+
3446
+ /**
3447
+ * Liquidity provided per day in USD
3448
+ */
3449
+ liquidityPerDay?: number;
3450
+
3451
+ /**
3452
+ * Blockchain network of the liquidity pool.
3453
+ */
3454
+ network?:
3455
+ | 'abstract'
3456
+ | 'abstractTestnet'
3457
+ | 'apechain'
3458
+ | 'arbitrum'
3459
+ | 'avalanche'
3460
+ | 'avalancheFuji'
3461
+ | 'base'
3462
+ | 'baseSepolia'
3463
+ | 'berachain'
3464
+ | 'berachainArtio'
3465
+ | 'berachainBepolia'
3466
+ | 'binance'
3467
+ | 'bscTestnet'
3468
+ | 'campTestnet'
3469
+ | 'fantom'
3470
+ | 'fantomTestnet'
3471
+ | 'flowMainnet'
3472
+ | 'mainnet'
3473
+ | 'nexusTestnet'
3474
+ | 'optimism'
3475
+ | 'polygon'
3476
+ | 'polygon_mumbai'
3477
+ | 'skaleNebula'
3478
+ | 'skaleEuropa'
3479
+ | 'skaleCalypso'
3480
+ | 'solana'
3481
+ | 'sophon'
3482
+ | 'sophonTestnet'
3483
+ | 'sui'
3484
+ | 'superseed'
3485
+ | 'superseedSepolia'
3486
+ | 'vanar'
3487
+ | 'xai'
3488
+ | 'zksync'
3489
+ | 'coti'
3490
+ | 'cotiTestnet'
3491
+ | 'morph'
3492
+ | 'morphTestnet'
3493
+ | 'morphHolesky'
3494
+ | 'ultra'
3495
+ | 'ultraTestnet'
3496
+ | 'nitrograph'
3497
+ | 'sepolia'
3498
+ | 'optimism_sepolia'
3499
+ | 'arbitrumSepolia'
3500
+ | 'goerli'
3501
+ | 'optimism_goerli'
3502
+ | 'arbitrumGoerli'
3503
+ | 'basecamp'
3504
+ | 'somnia'
3505
+ | 'zkverify'
3506
+ | 'polkadot'
3507
+ | 'kusama'
3508
+ | 'flow_cadence';
3509
+
3510
+ /**
3511
+ * Indicates if only in-range liquidity is rewarded.
3512
+ */
3513
+ onlyRewardInRangeLiquidity?: boolean;
3514
+
3515
+ /**
3516
+ * Array of liquidity pools associated with the rule.
3517
+ */
3518
+ pools?: Array<Liquidity.Pool>;
3519
+
3520
+ /**
3521
+ * Protocol of the liquidity pool.
3522
+ */
3523
+ protocol?: string;
3524
+ }
3525
+
3526
+ export namespace Liquidity {
3527
+ export interface Pool {
3528
+ /**
3529
+ * Unique identifier of the liquidity pool.
3530
+ */
3531
+ id: string;
3532
+ }
3533
+ }
3534
+
3535
+ export interface Range {
3536
+ /**
3537
+ * Reward amount for this range.
3538
+ */
3539
+ amount: number;
3540
+
3541
+ /**
3542
+ * End value of the range.
3543
+ */
3544
+ endRange: number;
3545
+
3546
+ /**
3547
+ * Start value of the range.
3548
+ */
3549
+ startRange: number;
3550
+
3551
+ /**
3552
+ * ID of the loyalty badge for this range.
3553
+ */
3554
+ loyaltyBadgeId?: string;
3555
+
3556
+ /**
3557
+ * Amount of the loyalty multiplier for this range.
3558
+ */
3559
+ loyaltyMultiplierAmount?: number;
3560
+ }
3561
+
3562
+ /**
3563
+ * Object defining referral requirements.
3564
+ */
3565
+ export interface ReferralRequirements {
3566
+ /**
3567
+ * Flag indicating if achieving points is required.
3568
+ */
3569
+ achievePoints?: boolean | null;
3570
+
3571
+ /**
3572
+ * Flag indicating if completing the profile is required.
3573
+ */
3574
+ completeProfile?: boolean | null;
3575
+
3576
+ /**
3577
+ * Flag indicating if connecting Discord is required.
3578
+ */
3579
+ connectDiscord?: boolean | null;
3580
+
3581
+ /**
3582
+ * Flag indicating if connecting email is required.
3583
+ */
3584
+ connectEmail?: boolean | null;
3585
+
3586
+ /**
3587
+ * Flag indicating if connecting Twitter is required.
3588
+ */
3589
+ connectTwitter?: boolean | null;
3590
+
3591
+ points?: ReferralRequirements.Points | null;
3592
+ }
3593
+
3594
+ export namespace ReferralRequirements {
3595
+ export interface Points {
3596
+ /**
3597
+ * Points required for referral.
3598
+ */
3599
+ amount?: number | null;
3600
+
3601
+ /**
3602
+ * ID of the loyalty currency for referral.
3603
+ */
3604
+ loyaltyCurrecyId?: string | null;
3605
+ }
3606
+ }
3607
+
3608
+ /**
3609
+ * Object containing details of the associated smart contract.
3610
+ */
3611
+ export interface SmartContract {
3612
+ /**
3613
+ * Mapping of addresses for the smart contract.
3614
+ */
3615
+ addressMapping?: string | null;
3616
+
3617
+ /**
3618
+ * Object containing details of the amount multiplier from the event.
3619
+ */
3620
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3621
+
3622
+ /**
3623
+ * ID of the smart contract.
3624
+ */
3625
+ contractId?: string | null;
3626
+
3627
+ /**
3628
+ * Criteria to evaluate the smart contract event.
3629
+ */
3630
+ criteria?: 'everyEvent' | 'byParameter' | null;
3631
+
3632
+ /**
3633
+ * Event emitted by the smart contract.
3634
+ */
3635
+ event?: string | null;
3636
+
3637
+ /**
3638
+ * Array of parameters for the smart contract.
3639
+ */
3640
+ params?: Array<SmartContract.Param> | null;
3641
+
3642
+ /**
3643
+ * Type of the smart contract interaction.
3644
+ */
3645
+ type?: 'function' | 'event' | null;
3646
+ }
3647
+
3648
+ export namespace SmartContract {
3649
+ /**
3650
+ * Object containing details of the amount multiplier from the event.
3651
+ */
3652
+ export interface AmountMultiplier {
3653
+ /**
3654
+ * Mapping of the value for the smart contract.
3655
+ */
3656
+ valueMapping?: string | null;
3657
+ }
3658
+
3659
+ export interface Param {
3660
+ /**
3661
+ * Condition to check for the parameter.
3662
+ */
3663
+ condition?: string | null;
3664
+
3665
+ /**
3666
+ * Name of the smart contract parameter.
3667
+ */
3668
+ name?: string | null;
3669
+
3670
+ /**
3671
+ * Value of the parameter.
3672
+ */
3673
+ value?: string | null;
3674
+ }
3675
+ }
3676
+
3677
+ export interface SnapshotProposal {
3678
+ /**
3679
+ * ID of the snapshot proposal.
3680
+ */
3681
+ id: string;
3682
+
3683
+ /**
3684
+ * Space associated with the snapshot proposal.
3685
+ */
3686
+ space: string;
3687
+ }
3688
+
3689
+ export interface StreakArray {
3690
+ /**
3691
+ * Reward amount for achieving the streak milestone.
3692
+ */
3693
+ streakAmount: number;
3694
+
3695
+ /**
3696
+ * Milestone required to achieve the streak.
3697
+ */
3698
+ streakMilestone: number;
3699
+ }
3700
+
3701
+ /**
3702
+ * Metadata for swap loyalty rules
3703
+ */
3704
+ export interface Swap {
3705
+ provider?: 'any' | 'relay' | 'lifi';
3706
+
3707
+ relayReferrerId?: string;
3708
+
3709
+ requireCrossChainSwap?: boolean;
3710
+
3711
+ swappedToChain?: 'any' | number | string;
3712
+
3713
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1915
3714
 
1916
- /**
1917
- * Optional metadata for the loyalty rule
1918
- */
1919
- metadata?: Record<string, unknown>;
3715
+ tokenMode?: 'any' | 'specific';
3716
+
3717
+ trackTokenAmount?: boolean;
3718
+ }
3719
+
3720
+ export namespace Swap {
3721
+ export interface SwappedToToken {
3722
+ address: string;
3723
+
3724
+ chainId: string;
3725
+ }
3726
+ }
3727
+ }
1920
3728
  }
1921
3729
  }
1922
3730
 
@@ -1927,7 +3735,9 @@ export interface RuleDeleteResponse {
1927
3735
  }
1928
3736
 
1929
3737
  export interface RuleCompleteResponse {
1930
- message: string;
3738
+ message:
3739
+ | 'Completion request added to queue'
3740
+ | 'Link click being verified, come back later to check the status';
1931
3741
  }
1932
3742
 
1933
3743
  export interface RuleGetStatusResponse {
@@ -1938,11 +3748,119 @@ export namespace RuleGetStatusResponse {
1938
3748
  export interface Data {
1939
3749
  loyaltyRuleId: string;
1940
3750
 
1941
- status: 'pending' | 'processing' | 'completed' | 'failed';
1942
-
1943
3751
  userId: string;
1944
3752
 
3753
+ /**
3754
+ * The ID of the loyalty rule status for the Progress object
3755
+ */
3756
+ id?: string;
3757
+
3758
+ createdAt?: string;
3759
+
3760
+ fulfilledAt?: string | null;
3761
+
3762
+ /**
3763
+ * Categorized examples of messages that may be returned for a loyalty rule's
3764
+ * processing result.
3765
+ *
3766
+ * User Onboarding
3767
+ *
3768
+ * - Check In: "Streak successful"
3769
+ * - Complete Profile Details: "Profile not complete"
3770
+ *
3771
+ * Connect Accounts
3772
+ *
3773
+ * - Connect TikTok: "TikTok not connected"
3774
+ * - Connect Discord: "Discord not connected", "Discord request timeout"
3775
+ * - Connect X: "Twitter not connected", "Twitter not connected or content url is
3776
+ * required"
3777
+ * - Connect Email: "Email address not connected"
3778
+ * - Connect Telegram: "Telegram not connected", "user has not setup telegram (no
3779
+ * telegramUsername), please setup username in telegram and reconnect.",
3780
+ * "Telegram request rate-limited"
3781
+ * - Connect Steam: "Steam not connected"
3782
+ * - Connect Youtube: "Youtube not connected"
3783
+ *
3784
+ * Social Quests
3785
+ *
3786
+ * - Join Telegram Group: "Telegram Channel not joined", "Telegram Channel joined
3787
+ * successfully"
3788
+ * - Post on TikTok: "TikTok post not verified"
3789
+ * - Comment on an X Post: "Quest Completed: You have commented on the tweet",
3790
+ * "Quest Not Completed: Comment not found for the specified tweet"
3791
+ * - Repost an X Post: "Quest Completed: You have retweeted the tweet", "Quest Not
3792
+ * Completed: Retweet not found for the specified tweet", "Quest Completed: You
3793
+ * have retweeted and commented on the tweet", "Quest Not Completed: You have not
3794
+ * retweeted or commented on the tweet"
3795
+ * - Follow an X Account: "Missing required parameters: twitterUserId,
3796
+ * targetUsername", "Quest Completed: You are a follower of
3797
+ * @${targetUsername}", "Quest Not Completed: Please follow @${targetUsername}
3798
+ * and try again in few minutes"
3799
+ * - React to an X Post: "Missing required parameters: texts, twitterUserId,
3800
+ * userTweetId", "No text provided", "Quest Completed: You have posted {tweetId}
3801
+ * a tweet with the text {text}", "Quest Not Completed: Your all previous {COUNT}
3802
+ * posts are already claimed. Please post a new tweet and try again in a few
3803
+ * minutes.", "Tweet is already claimed", "Tweet does not belong to the user",
3804
+ * "Text not found in tweet", "Tweet is before the quest start time", "Tweet does
3805
+ * not have media", "Text found in tweet"
3806
+ * - Add Text to X Bio: "Missing required parameters: texts, twitterUserId", "User
3807
+ * not found", "Text found in bio", "Text not found in bio"
3808
+ * - Add Text to X Username: "Missing required parameters: texts, twitterUserId",
3809
+ * "User not found", "Text found in username", "Text not found in username"
3810
+ * - Comment on an X Post with Text: "Missing required parameters: texts,
3811
+ * twitterUserId", "Comment is already claimed", "Text found in comment", "Text
3812
+ * not found in comment", "Tweet not found or could not be retrieved"
3813
+ * - Comment on a YouTube Video: "Youtube comment added", "Youtube comment not
3814
+ * added"
3815
+ * - Subscribe to a YouTube Channel: "Youtube channel subscribed", "Quest failed,
3816
+ * please make sure you have made your subscriptions public in youtube"
3817
+ * - Get X post impressions: "You've already claimed the reward for this impression
3818
+ * range."
3819
+ * - Add an Item to Steam Wishlist: "Steam Wishlist item added", "Steam Wishlist
3820
+ * item not added"
3821
+ *
3822
+ * Complex Onchain Logic
3823
+ *
3824
+ * - Token Swap: "Swap rewards calculated successfully", "Swap rule failed"
3825
+ *
3826
+ * Other
3827
+ *
3828
+ * - Answer a Quiz: "Quiz question not configured", "No question response found",
3829
+ * "Incorrect answer", "Correct answer"
3830
+ * - Answer a Poll: "Poll question not configured", "Poll response recorded"
3831
+ * - Spend in Shopify Store: "Shopify not connected"
3832
+ * - Points Airdrop: "Seems like you're not eligible for this points airdrop."
3833
+ *
3834
+ * General
3835
+ *
3836
+ * - "Quest already completed"
3837
+ * - "Quest already completed using the same social account (${socialAccountName}),
3838
+ * with the different user."
3839
+ * - "You've already claimed the reward for this quest."
3840
+ * - "Quest not achieved, please try again."
3841
+ * - "Rule is not setup"
3842
+ * - "Request aborted due to timeout"
3843
+ * - "Google account not connected"
3844
+ * - "Claim failed: Multiplier is already active"
3845
+ */
1945
3846
  message?: string;
3847
+
3848
+ organizationId?: string;
3849
+
3850
+ /**
3851
+ * The progress of the loyalty rule from 0 to 100
3852
+ */
3853
+ progress?: number;
3854
+
3855
+ /**
3856
+ * Status of the queued job, this is only returned if the job is queued and being
3857
+ * processed, this wil be retained for 10 minutes after the job is completed
3858
+ */
3859
+ status?: 'pending' | 'processing' | 'completed' | 'failed';
3860
+
3861
+ updatedAt?: string;
3862
+
3863
+ websiteId?: string;
1946
3864
  }
1947
3865
  }
1948
3866
 
@@ -2053,7 +3971,22 @@ export interface RuleCreateParams {
2053
3971
  | 'twitter_like'
2054
3972
  | 'twitter_post_hashtag'
2055
3973
  | 'quiz'
2056
- | 'poll';
3974
+ | 'poll'
3975
+ | 'steam_wishlist'
3976
+ | 'liquidity_uniswap_v2'
3977
+ | 'liquidity_uniswap_v3'
3978
+ | 'points_airdrop'
3979
+ | 'youtube_subscribers'
3980
+ | 'youtube_comment'
3981
+ | 'shopify_spend'
3982
+ | 'swap'
3983
+ | 'tiktok_post'
3984
+ | 'post_impressions'
3985
+ | 'discord_join'
3986
+ | 'connected_youtube'
3987
+ | 'stratus_function'
3988
+ | 'connected_tiktok'
3989
+ | 'tiktok_follow';
2057
3990
 
2058
3991
  /**
2059
3992
  * Unique identifier for the associated website
@@ -2065,6 +3998,11 @@ export interface RuleCreateParams {
2065
3998
  */
2066
3999
  backgroundAssetUrl?: string;
2067
4000
 
4001
+ /**
4002
+ * The type of claim for the reward
4003
+ */
4004
+ claimType?: 'manual' | 'auto' | null;
4005
+
2068
4006
  /**
2069
4007
  * Blockchain address of the associated collection
2070
4008
  */
@@ -2090,6 +4028,18 @@ export interface RuleCreateParams {
2090
4028
  */
2091
4029
  description?: string;
2092
4030
 
4031
+ duplicatedFromId?: string | null;
4032
+
4033
+ /**
4034
+ * ID of the external integration
4035
+ */
4036
+ externalIntegrationId?: string | null;
4037
+
4038
+ /**
4039
+ * Optional stratus function id for the rule
4040
+ */
4041
+ functionId?: string | null;
4042
+
2093
4043
  /**
2094
4044
  * Whether to hide this rule in the user interface
2095
4045
  */
@@ -2098,18 +4048,40 @@ export interface RuleCreateParams {
2098
4048
  /**
2099
4049
  * Interval between rule executions
2100
4050
  */
2101
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
4051
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
2102
4052
 
2103
4053
  /**
2104
4054
  * Whether this rule is mandatory
2105
4055
  */
2106
4056
  isRequired?: boolean;
2107
4057
 
4058
+ /**
4059
+ * Unique identifier for the loyalty badge
4060
+ */
4061
+ loyaltyBadgeId?: string | null;
4062
+
2108
4063
  /**
2109
4064
  * Unique identifier for the loyalty rule group
2110
4065
  */
2111
4066
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
2112
4067
 
4068
+ /**
4069
+ * URL for uploading loyalty user allotment via CSV
4070
+ */
4071
+ loyaltyUserAllotmentCsvUrl?: string;
4072
+
4073
+ /**
4074
+ * The interval for the max amount. Available for the smart contract and external
4075
+ * rules.
4076
+ */
4077
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
4078
+
4079
+ /**
4080
+ * The maximum amount of points a user can earn per interval. Available for the
4081
+ * smart contract and external rules.
4082
+ */
4083
+ maxAmountPerInterval?: number | null;
4084
+
2113
4085
  /**
2114
4086
  * URL of the media to be displayed
2115
4087
  */
@@ -2119,13 +4091,17 @@ export interface RuleCreateParams {
2119
4091
  * Blockchain network where the rule will apply
2120
4092
  */
2121
4093
  network?:
4094
+ | 'abstract'
4095
+ | 'abstractTestnet'
2122
4096
  | 'apechain'
2123
4097
  | 'arbitrum'
2124
4098
  | 'avalanche'
2125
4099
  | 'avalancheFuji'
2126
4100
  | 'base'
2127
4101
  | 'baseSepolia'
4102
+ | 'berachain'
2128
4103
  | 'berachainArtio'
4104
+ | 'berachainBepolia'
2129
4105
  | 'binance'
2130
4106
  | 'bscTestnet'
2131
4107
  | 'campTestnet'
@@ -2133,18 +4109,30 @@ export interface RuleCreateParams {
2133
4109
  | 'fantomTestnet'
2134
4110
  | 'flowMainnet'
2135
4111
  | 'mainnet'
4112
+ | 'nexusTestnet'
2136
4113
  | 'optimism'
2137
4114
  | 'polygon'
2138
4115
  | 'polygon_mumbai'
2139
4116
  | 'skaleNebula'
4117
+ | 'skaleEuropa'
4118
+ | 'skaleCalypso'
2140
4119
  | 'solana'
2141
4120
  | 'sophon'
4121
+ | 'sophonTestnet'
2142
4122
  | 'sui'
2143
4123
  | 'superseed'
2144
4124
  | 'superseedSepolia'
2145
4125
  | 'vanar'
2146
4126
  | 'xai'
2147
4127
  | 'zksync'
4128
+ | 'coti'
4129
+ | 'cotiTestnet'
4130
+ | 'morph'
4131
+ | 'morphTestnet'
4132
+ | 'morphHolesky'
4133
+ | 'ultra'
4134
+ | 'ultraTestnet'
4135
+ | 'nitrograph'
2148
4136
  | 'sepolia'
2149
4137
  | 'optimism_sepolia'
2150
4138
  | 'arbitrumSepolia'
@@ -2152,22 +4140,41 @@ export interface RuleCreateParams {
2152
4140
  | 'optimism_goerli'
2153
4141
  | 'arbitrumGoerli'
2154
4142
  | 'basecamp'
2155
- | 'abstract';
4143
+ | 'somnia'
4144
+ | 'zkverify'
4145
+ | 'polkadot'
4146
+ | 'kusama'
4147
+ | 'flow_cadence';
2156
4148
 
2157
4149
  /**
2158
4150
  * OAuth credentials associated with the rule
2159
4151
  */
2160
4152
  oauthCredentialsId?: string | null;
2161
4153
 
4154
+ /**
4155
+ * The lifetime of the reward
4156
+ */
4157
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
4158
+
2162
4159
  /**
2163
4160
  * Type of reward issued by the rule
2164
4161
  */
2165
- rewardType?: 'points' | 'multiplier';
4162
+ rewardType?: 'points' | 'multiplier' | 'badge';
4163
+
4164
+ /**
4165
+ * URL of the Shopify store
4166
+ */
4167
+ shopifyStoreUrl?: string | null;
4168
+
4169
+ /**
4170
+ * Whether to show this rule before the start time
4171
+ */
4172
+ showBeforeStart?: boolean;
2166
4173
 
2167
4174
  /**
2168
- * Identifier for associated subscriptions
4175
+ * Optional stratus subscription id for the rule
2169
4176
  */
2170
- subscriptionIdentifier?: string | null;
4177
+ subscriptionId?: string | null;
2171
4178
  }
2172
4179
 
2173
4180
  export namespace RuleCreateParams {
@@ -2175,6 +4182,11 @@ export namespace RuleCreateParams {
2175
4182
  * Additional metadata for the loyalty rule
2176
4183
  */
2177
4184
  export interface Metadata {
4185
+ /**
4186
+ * Number of tokens per batch.
4187
+ */
4188
+ batchSize?: number | null;
4189
+
2178
4190
  /**
2179
4191
  * Text displayed on the action button.
2180
4192
  */
@@ -2198,7 +4210,7 @@ export namespace RuleCreateParams {
2198
4210
  /**
2199
4211
  * Text to check in the Twitter post, username, or bio.
2200
4212
  */
2201
- checkText?: string | null;
4213
+ checkText?: string | Array<string> | null;
2202
4214
 
2203
4215
  /**
2204
4216
  * Array of collections associated with the rule.
@@ -2208,7 +4220,12 @@ export namespace RuleCreateParams {
2208
4220
  /**
2209
4221
  * Conditions for completing the profile.
2210
4222
  */
2211
- completeProfileConditions?: Record<string, boolean> | null;
4223
+ completeProfileConditions?: { [key: string]: boolean } | null;
4224
+
4225
+ /**
4226
+ * Description of the external rule condition (only for external rules)
4227
+ */
4228
+ conditionDescription?: string;
2212
4229
 
2213
4230
  /**
2214
4231
  * Object containing details for the call-to-action.
@@ -2220,6 +4237,11 @@ export namespace RuleCreateParams {
2220
4237
  */
2221
4238
  customRewardsApiKey?: string;
2222
4239
 
4240
+ /**
4241
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
4242
+ */
4243
+ directRpc?: boolean;
4244
+
2223
4245
  /**
2224
4246
  * Array of Discord servers, channels, and roles to join.
2225
4247
  */
@@ -2245,6 +4267,11 @@ export namespace RuleCreateParams {
2245
4267
  */
2246
4268
  enableVerifiedMultiplier?: boolean;
2247
4269
 
4270
+ /**
4271
+ * Type of ERC20 token for the loyalty rule.
4272
+ */
4273
+ erc20Type?: 'erc20' | 'native';
4274
+
2248
4275
  /**
2249
4276
  * Fill source of the order for the token sale
2250
4277
  */
@@ -2265,11 +4292,6 @@ export namespace RuleCreateParams {
2265
4292
  */
2266
4293
  hasNeverSold?: boolean;
2267
4294
 
2268
- /**
2269
- * Flag indicating whether the order source is included.
2270
- */
2271
- hasOrderSource?: boolean;
2272
-
2273
4295
  /**
2274
4296
  * Indicates if the full royalty has been paid for items.
2275
4297
  */
@@ -2290,11 +4312,21 @@ export namespace RuleCreateParams {
2290
4312
  */
2291
4313
  imageUrl?: string | null;
2292
4314
 
4315
+ /**
4316
+ * If enabled, the first transaction done on the platform will complete this rule
4317
+ */
4318
+ isCheckInOnEveryTxn?: boolean;
4319
+
2293
4320
  /**
2294
4321
  * Indicates if the multiplier has been applied to rewards.
2295
4322
  */
2296
4323
  isMultiplierApplied?: boolean;
2297
4324
 
4325
+ /**
4326
+ * Flag indicating if the rule is restricted to new users.
4327
+ */
4328
+ isRestrictedToNewUsers?: boolean;
4329
+
2298
4330
  /**
2299
4331
  * Flag indicating if rewards are applied retroactively.
2300
4332
  */
@@ -2310,6 +4342,11 @@ export namespace RuleCreateParams {
2310
4342
  */
2311
4343
  link?: string | null;
2312
4344
 
4345
+ /**
4346
+ * Liquidity pool details.
4347
+ */
4348
+ liquidity?: Metadata.Liquidity;
4349
+
2313
4350
  /**
2314
4351
  * Maximum quantity constraint for token holding.
2315
4352
  */
@@ -2351,14 +4388,24 @@ export namespace RuleCreateParams {
2351
4388
  onlyRewardSingleTokenOwnership?: boolean | null;
2352
4389
 
2353
4390
  /**
2354
- * Order source of the order for the token sale
4391
+ * Promotional code associated with the rule.
2355
4392
  */
2356
- orderSource?: string;
4393
+ promoCode?: string;
2357
4394
 
2358
4395
  /**
2359
- * Promotional code associated with the rule.
4396
+ * URL of the CSV file containing promo codes.
2360
4397
  */
2361
- promoCode?: string;
4398
+ promoCodeCsvUrl?: string;
4399
+
4400
+ /**
4401
+ * Numbers of the promotional code to be generated.
4402
+ */
4403
+ promoCodeLength?: number | null;
4404
+
4405
+ /**
4406
+ * Type of the promotional code.
4407
+ */
4408
+ promoCodeType?: 'code' | 'csv' | 'generate';
2362
4409
 
2363
4410
  /**
2364
4411
  * Array defining ranges and corresponding rewards.
@@ -2375,11 +4422,62 @@ export namespace RuleCreateParams {
2375
4422
  */
2376
4423
  referrerReward?: number | null;
2377
4424
 
4425
+ /**
4426
+ * Loyalty currency ID of the referrer reward.
4427
+ */
4428
+ referrerRewardLoyaltyCurrencyId?: string | null;
4429
+
4430
+ /**
4431
+ * Flag indicating if the post link is required.
4432
+ */
4433
+ requirePostLink?: boolean | null;
4434
+
4435
+ /**
4436
+ * Flag indicating if media metadata is required.
4437
+ */
4438
+ requirePostMediaLink?: boolean | null;
4439
+
4440
+ /**
4441
+ * Flag indicating if the rule can also reward badges per range.
4442
+ */
4443
+ rewardBadgePerRange?: boolean;
4444
+
4445
+ /**
4446
+ * Flag indicating if the reward is rewarded by batch.
4447
+ */
4448
+ rewardByBatch?: boolean | null;
4449
+
4450
+ /**
4451
+ * Criteria to evaluate the reward.
4452
+ */
4453
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
4454
+
4455
+ /**
4456
+ * Flag indicating if the reward is rewarded per action.
4457
+ */
4458
+ rewardPerAction?: boolean | null;
4459
+
2378
4460
  /**
2379
4461
  * Flag indicating if rewards are given per impression.
2380
4462
  */
2381
4463
  rewardPerImpression?: boolean | null;
2382
4464
 
4465
+ /**
4466
+ * Flag indicating if the rule should reward based on value of traded tokens
4467
+ * instead of count.
4468
+ */
4469
+ rewardPerValue?: boolean;
4470
+
4471
+ /**
4472
+ * Wallet address of the user can only be used if userId is not provided
4473
+ */
4474
+ royaltyAddress?: string;
4475
+
4476
+ /**
4477
+ * Royalty percentage of the item.
4478
+ */
4479
+ royaltyPercentage?: number;
4480
+
2383
4481
  /**
2384
4482
  * Currency associated with sales.
2385
4483
  */
@@ -2419,6 +4517,7 @@ export namespace RuleCreateParams {
2419
4517
  | 'Twitch'
2420
4518
  | 'X(Twitter)'
2421
4519
  | 'YouTube'
4520
+ | 'Google'
2422
4521
  | null;
2423
4522
 
2424
4523
  /**
@@ -2431,11 +4530,21 @@ export namespace RuleCreateParams {
2431
4530
  */
2432
4531
  socialPlatformName?: string | null;
2433
4532
 
4533
+ /**
4534
+ * ID of the Steam app.
4535
+ */
4536
+ steamAppId?: string | null;
4537
+
2434
4538
  /**
2435
4539
  * Array of streak milestones and corresponding rewards.
2436
4540
  */
2437
4541
  streakArray?: Array<Metadata.StreakArray> | null;
2438
4542
 
4543
+ /**
4544
+ * Metadata for swap loyalty rules
4545
+ */
4546
+ swap?: Metadata.Swap;
4547
+
2439
4548
  /**
2440
4549
  * ID of the Telegram channel.
2441
4550
  */
@@ -2451,6 +4560,12 @@ export namespace RuleCreateParams {
2451
4560
  */
2452
4561
  trackAllContracts?: boolean | null;
2453
4562
 
4563
+ /**
4564
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
4565
+ * completed once the progress is 100%.
4566
+ */
4567
+ trackProgress?: boolean | null;
4568
+
2454
4569
  /**
2455
4570
  * URL of the associated Twitter account.
2456
4571
  */
@@ -2494,7 +4609,28 @@ export namespace RuleCreateParams {
2494
4609
  /**
2495
4610
  * Type of wallet associated with the rule.
2496
4611
  */
2497
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
4612
+ walletType?:
4613
+ | 'evm'
4614
+ | 'solana'
4615
+ | 'imx'
4616
+ | 'sui'
4617
+ | 'ton'
4618
+ | 'cosmos'
4619
+ | 'ultra'
4620
+ | 'agw'
4621
+ | 'flow_cadence'
4622
+ | 'substrate'
4623
+ | null;
4624
+
4625
+ /**
4626
+ * ID of the Youtube channel.
4627
+ */
4628
+ youtubeChannelId?: string | null;
4629
+
4630
+ /**
4631
+ * ID of the Youtube video.
4632
+ */
4633
+ youtubeVideoId?: string | null;
2498
4634
  }
2499
4635
 
2500
4636
  export namespace Metadata {
@@ -2513,13 +4649,17 @@ export namespace RuleCreateParams {
2513
4649
  * Blockchain network of the collection.
2514
4650
  */
2515
4651
  network?:
4652
+ | 'abstract'
4653
+ | 'abstractTestnet'
2516
4654
  | 'apechain'
2517
4655
  | 'arbitrum'
2518
4656
  | 'avalanche'
2519
4657
  | 'avalancheFuji'
2520
4658
  | 'base'
2521
4659
  | 'baseSepolia'
4660
+ | 'berachain'
2522
4661
  | 'berachainArtio'
4662
+ | 'berachainBepolia'
2523
4663
  | 'binance'
2524
4664
  | 'bscTestnet'
2525
4665
  | 'campTestnet'
@@ -2527,18 +4667,30 @@ export namespace RuleCreateParams {
2527
4667
  | 'fantomTestnet'
2528
4668
  | 'flowMainnet'
2529
4669
  | 'mainnet'
4670
+ | 'nexusTestnet'
2530
4671
  | 'optimism'
2531
4672
  | 'polygon'
2532
4673
  | 'polygon_mumbai'
2533
4674
  | 'skaleNebula'
4675
+ | 'skaleEuropa'
4676
+ | 'skaleCalypso'
2534
4677
  | 'solana'
2535
4678
  | 'sophon'
4679
+ | 'sophonTestnet'
2536
4680
  | 'sui'
2537
4681
  | 'superseed'
2538
4682
  | 'superseedSepolia'
2539
4683
  | 'vanar'
2540
4684
  | 'xai'
2541
4685
  | 'zksync'
4686
+ | 'coti'
4687
+ | 'cotiTestnet'
4688
+ | 'morph'
4689
+ | 'morphTestnet'
4690
+ | 'morphHolesky'
4691
+ | 'ultra'
4692
+ | 'ultraTestnet'
4693
+ | 'nitrograph'
2542
4694
  | 'sepolia'
2543
4695
  | 'optimism_sepolia'
2544
4696
  | 'arbitrumSepolia'
@@ -2546,7 +4698,11 @@ export namespace RuleCreateParams {
2546
4698
  | 'optimism_goerli'
2547
4699
  | 'arbitrumGoerli'
2548
4700
  | 'basecamp'
2549
- | 'abstract';
4701
+ | 'somnia'
4702
+ | 'zkverify'
4703
+ | 'polkadot'
4704
+ | 'kusama'
4705
+ | 'flow_cadence';
2550
4706
  }
2551
4707
 
2552
4708
  /**
@@ -2623,6 +4779,111 @@ export namespace RuleCreateParams {
2623
4779
  id: string;
2624
4780
  }
2625
4781
 
4782
+ /**
4783
+ * Liquidity pool details.
4784
+ */
4785
+ export interface Liquidity {
4786
+ /**
4787
+ * Calculation type of the liquidity pool.
4788
+ */
4789
+ calculationType?: 'fixed' | 'custom';
4790
+
4791
+ /**
4792
+ * Custom function to calculate the the reward amount based on the liquidity
4793
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
4794
+ * USD.
4795
+ */
4796
+ customFunction?: string;
4797
+
4798
+ /**
4799
+ * Liquidity provided per day in USD
4800
+ */
4801
+ liquidityPerDay?: number;
4802
+
4803
+ /**
4804
+ * Blockchain network of the liquidity pool.
4805
+ */
4806
+ network?:
4807
+ | 'abstract'
4808
+ | 'abstractTestnet'
4809
+ | 'apechain'
4810
+ | 'arbitrum'
4811
+ | 'avalanche'
4812
+ | 'avalancheFuji'
4813
+ | 'base'
4814
+ | 'baseSepolia'
4815
+ | 'berachain'
4816
+ | 'berachainArtio'
4817
+ | 'berachainBepolia'
4818
+ | 'binance'
4819
+ | 'bscTestnet'
4820
+ | 'campTestnet'
4821
+ | 'fantom'
4822
+ | 'fantomTestnet'
4823
+ | 'flowMainnet'
4824
+ | 'mainnet'
4825
+ | 'nexusTestnet'
4826
+ | 'optimism'
4827
+ | 'polygon'
4828
+ | 'polygon_mumbai'
4829
+ | 'skaleNebula'
4830
+ | 'skaleEuropa'
4831
+ | 'skaleCalypso'
4832
+ | 'solana'
4833
+ | 'sophon'
4834
+ | 'sophonTestnet'
4835
+ | 'sui'
4836
+ | 'superseed'
4837
+ | 'superseedSepolia'
4838
+ | 'vanar'
4839
+ | 'xai'
4840
+ | 'zksync'
4841
+ | 'coti'
4842
+ | 'cotiTestnet'
4843
+ | 'morph'
4844
+ | 'morphTestnet'
4845
+ | 'morphHolesky'
4846
+ | 'ultra'
4847
+ | 'ultraTestnet'
4848
+ | 'nitrograph'
4849
+ | 'sepolia'
4850
+ | 'optimism_sepolia'
4851
+ | 'arbitrumSepolia'
4852
+ | 'goerli'
4853
+ | 'optimism_goerli'
4854
+ | 'arbitrumGoerli'
4855
+ | 'basecamp'
4856
+ | 'somnia'
4857
+ | 'zkverify'
4858
+ | 'polkadot'
4859
+ | 'kusama'
4860
+ | 'flow_cadence';
4861
+
4862
+ /**
4863
+ * Indicates if only in-range liquidity is rewarded.
4864
+ */
4865
+ onlyRewardInRangeLiquidity?: boolean;
4866
+
4867
+ /**
4868
+ * Array of liquidity pools associated with the rule.
4869
+ */
4870
+ pools?: Array<Liquidity.Pool>;
4871
+
4872
+ /**
4873
+ * Protocol of the liquidity pool.
4874
+ */
4875
+ protocol?: string;
4876
+ }
4877
+
4878
+ export namespace Liquidity {
4879
+ export interface Pool {
4880
+ /**
4881
+ * Unique identifier of the liquidity pool.
4882
+ */
4883
+ id: string;
4884
+ }
4885
+ }
4886
+
2626
4887
  export interface Range {
2627
4888
  /**
2628
4889
  * Reward amount for this range.
@@ -2638,6 +4899,16 @@ export namespace RuleCreateParams {
2638
4899
  * Start value of the range.
2639
4900
  */
2640
4901
  startRange: number;
4902
+
4903
+ /**
4904
+ * ID of the loyalty badge for this range.
4905
+ */
4906
+ loyaltyBadgeId?: string;
4907
+
4908
+ /**
4909
+ * Amount of the loyalty multiplier for this range.
4910
+ */
4911
+ loyaltyMultiplierAmount?: number;
2641
4912
  }
2642
4913
 
2643
4914
  /**
@@ -2690,20 +4961,15 @@ export namespace RuleCreateParams {
2690
4961
  * Object containing details of the associated smart contract.
2691
4962
  */
2692
4963
  export interface SmartContract {
2693
- /**
2694
- * ABI of the smart contract.
2695
- */
2696
- abi?: string | null;
2697
-
2698
4964
  /**
2699
4965
  * Mapping of addresses for the smart contract.
2700
4966
  */
2701
4967
  addressMapping?: string | null;
2702
4968
 
2703
4969
  /**
2704
- * Array of bonus details applied to the rule.
4970
+ * Object containing details of the amount multiplier from the event.
2705
4971
  */
2706
- bonus?: Array<SmartContract.Bonus> | null;
4972
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2707
4973
 
2708
4974
  /**
2709
4975
  * ID of the smart contract.
@@ -2715,68 +4981,31 @@ export namespace RuleCreateParams {
2715
4981
  */
2716
4982
  criteria?: 'everyEvent' | 'byParameter' | null;
2717
4983
 
2718
- /**
2719
- * Time range applied to the rule.
2720
- */
2721
- customRange?: SmartContract.CustomRange | null;
2722
-
2723
4984
  /**
2724
4985
  * Event emitted by the smart contract.
2725
4986
  */
2726
4987
  event?: string | null;
2727
4988
 
2728
- /**
2729
- * Maximum value allowed for the parameter.
2730
- */
2731
- max?: number | null;
2732
-
2733
4989
  /**
2734
4990
  * Array of parameters for the smart contract.
2735
4991
  */
2736
4992
  params?: Array<SmartContract.Param> | null;
2737
4993
 
2738
4994
  /**
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.
4995
+ * Type of the smart contract interaction.
2750
4996
  */
2751
- withMax?: boolean | null;
4997
+ type?: 'function' | 'event' | null;
2752
4998
  }
2753
4999
 
2754
5000
  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
5001
  /**
2768
- * Time range applied to the rule.
5002
+ * Object containing details of the amount multiplier from the event.
2769
5003
  */
2770
- export interface CustomRange {
5004
+ export interface AmountMultiplier {
2771
5005
  /**
2772
- * End time of the custom range.
5006
+ * Mapping of the value for the smart contract.
2773
5007
  */
2774
- endsAt?: string | null;
2775
-
2776
- /**
2777
- * Start time of the custom range.
2778
- */
2779
- startsAt?: string | null;
5008
+ valueMapping?: string | null;
2780
5009
  }
2781
5010
 
2782
5011
  export interface Param {
@@ -2820,6 +5049,33 @@ export namespace RuleCreateParams {
2820
5049
  */
2821
5050
  streakMilestone: number;
2822
5051
  }
5052
+
5053
+ /**
5054
+ * Metadata for swap loyalty rules
5055
+ */
5056
+ export interface Swap {
5057
+ provider?: 'any' | 'relay' | 'lifi';
5058
+
5059
+ relayReferrerId?: string;
5060
+
5061
+ requireCrossChainSwap?: boolean;
5062
+
5063
+ swappedToChain?: 'any' | number | string;
5064
+
5065
+ swappedToTokens?: Array<Swap.SwappedToToken>;
5066
+
5067
+ tokenMode?: 'any' | 'specific';
5068
+
5069
+ trackTokenAmount?: boolean;
5070
+ }
5071
+
5072
+ export namespace Swap {
5073
+ export interface SwappedToToken {
5074
+ address: string;
5075
+
5076
+ chainId: string;
5077
+ }
5078
+ }
2823
5079
  }
2824
5080
 
2825
5081
  export interface Collection {
@@ -2832,13 +5088,17 @@ export namespace RuleCreateParams {
2832
5088
  * Blockchain network for the collection
2833
5089
  */
2834
5090
  network:
5091
+ | 'abstract'
5092
+ | 'abstractTestnet'
2835
5093
  | 'apechain'
2836
5094
  | 'arbitrum'
2837
5095
  | 'avalanche'
2838
5096
  | 'avalancheFuji'
2839
5097
  | 'base'
2840
5098
  | 'baseSepolia'
5099
+ | 'berachain'
2841
5100
  | 'berachainArtio'
5101
+ | 'berachainBepolia'
2842
5102
  | 'binance'
2843
5103
  | 'bscTestnet'
2844
5104
  | 'campTestnet'
@@ -2846,18 +5106,30 @@ export namespace RuleCreateParams {
2846
5106
  | 'fantomTestnet'
2847
5107
  | 'flowMainnet'
2848
5108
  | 'mainnet'
5109
+ | 'nexusTestnet'
2849
5110
  | 'optimism'
2850
5111
  | 'polygon'
2851
5112
  | 'polygon_mumbai'
2852
5113
  | 'skaleNebula'
5114
+ | 'skaleEuropa'
5115
+ | 'skaleCalypso'
2853
5116
  | 'solana'
2854
5117
  | 'sophon'
5118
+ | 'sophonTestnet'
2855
5119
  | 'sui'
2856
5120
  | 'superseed'
2857
5121
  | 'superseedSepolia'
2858
5122
  | 'vanar'
2859
5123
  | 'xai'
2860
5124
  | 'zksync'
5125
+ | 'coti'
5126
+ | 'cotiTestnet'
5127
+ | 'morph'
5128
+ | 'morphTestnet'
5129
+ | 'morphHolesky'
5130
+ | 'ultra'
5131
+ | 'ultraTestnet'
5132
+ | 'nitrograph'
2861
5133
  | 'sepolia'
2862
5134
  | 'optimism_sepolia'
2863
5135
  | 'arbitrumSepolia'
@@ -2865,7 +5137,16 @@ export namespace RuleCreateParams {
2865
5137
  | 'optimism_goerli'
2866
5138
  | 'arbitrumGoerli'
2867
5139
  | 'basecamp'
2868
- | 'abstract';
5140
+ | 'somnia'
5141
+ | 'zkverify'
5142
+ | 'polkadot'
5143
+ | 'kusama'
5144
+ | 'flow_cadence';
5145
+
5146
+ /**
5147
+ * Symbol of the collection.
5148
+ */
5149
+ symbol?: string;
2869
5150
  }
2870
5151
  }
2871
5152
 
@@ -2885,10 +5166,15 @@ export interface RuleUpdateParams {
2885
5166
  */
2886
5167
  name: string;
2887
5168
 
5169
+ /**
5170
+ * The type of claim for the reward
5171
+ */
5172
+ claimType?: 'manual' | 'auto' | null;
5173
+
2888
5174
  /**
2889
5175
  * Blockchain address of the associated collection
2890
5176
  */
2891
- collectionAddress?: string;
5177
+ collectionAddress?: string | null;
2892
5178
 
2893
5179
  /**
2894
5180
  * List of associated collections
@@ -2920,11 +5206,21 @@ export interface RuleUpdateParams {
2920
5206
  */
2921
5207
  effectiveStartTime?: string | null;
2922
5208
 
5209
+ /**
5210
+ * ID of the external integration
5211
+ */
5212
+ externalIntegrationId?: string | null;
5213
+
2923
5214
  /**
2924
5215
  * Frequency of the rule execution
2925
5216
  */
2926
5217
  frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
2927
5218
 
5219
+ /**
5220
+ * Optional stratus function id for the rule
5221
+ */
5222
+ functionId?: string | null;
5223
+
2928
5224
  /**
2929
5225
  * Whether to hide this rule in the user interface
2930
5226
  */
@@ -2933,7 +5229,7 @@ export interface RuleUpdateParams {
2933
5229
  /**
2934
5230
  * Time interval for recurring rule execution
2935
5231
  */
2936
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
5232
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
2937
5233
 
2938
5234
  /**
2939
5235
  * Whether this rule is required for participation
@@ -2945,6 +5241,18 @@ export interface RuleUpdateParams {
2945
5241
  */
2946
5242
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
2947
5243
 
5244
+ /**
5245
+ * The interval for the max amount. Available for the smart contract and external
5246
+ * rules.
5247
+ */
5248
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
5249
+
5250
+ /**
5251
+ * The maximum amount of points a user can earn per interval. Available for the
5252
+ * smart contract and external rules.
5253
+ */
5254
+ maxAmountPerInterval?: number | null;
5255
+
2948
5256
  /**
2949
5257
  * URL of the media to be displayed
2950
5258
  */
@@ -2959,13 +5267,17 @@ export interface RuleUpdateParams {
2959
5267
  * Blockchain network where the rule will apply
2960
5268
  */
2961
5269
  network?:
5270
+ | 'abstract'
5271
+ | 'abstractTestnet'
2962
5272
  | 'apechain'
2963
5273
  | 'arbitrum'
2964
5274
  | 'avalanche'
2965
5275
  | 'avalancheFuji'
2966
5276
  | 'base'
2967
5277
  | 'baseSepolia'
5278
+ | 'berachain'
2968
5279
  | 'berachainArtio'
5280
+ | 'berachainBepolia'
2969
5281
  | 'binance'
2970
5282
  | 'bscTestnet'
2971
5283
  | 'campTestnet'
@@ -2973,18 +5285,30 @@ export interface RuleUpdateParams {
2973
5285
  | 'fantomTestnet'
2974
5286
  | 'flowMainnet'
2975
5287
  | 'mainnet'
5288
+ | 'nexusTestnet'
2976
5289
  | 'optimism'
2977
5290
  | 'polygon'
2978
5291
  | 'polygon_mumbai'
2979
5292
  | 'skaleNebula'
5293
+ | 'skaleEuropa'
5294
+ | 'skaleCalypso'
2980
5295
  | 'solana'
2981
5296
  | 'sophon'
5297
+ | 'sophonTestnet'
2982
5298
  | 'sui'
2983
5299
  | 'superseed'
2984
5300
  | 'superseedSepolia'
2985
5301
  | 'vanar'
2986
5302
  | 'xai'
2987
5303
  | 'zksync'
5304
+ | 'coti'
5305
+ | 'cotiTestnet'
5306
+ | 'morph'
5307
+ | 'morphTestnet'
5308
+ | 'morphHolesky'
5309
+ | 'ultra'
5310
+ | 'ultraTestnet'
5311
+ | 'nitrograph'
2988
5312
  | 'sepolia'
2989
5313
  | 'optimism_sepolia'
2990
5314
  | 'arbitrumSepolia'
@@ -2992,17 +5316,36 @@ export interface RuleUpdateParams {
2992
5316
  | 'optimism_goerli'
2993
5317
  | 'arbitrumGoerli'
2994
5318
  | 'basecamp'
2995
- | 'abstract';
5319
+ | 'somnia'
5320
+ | 'zkverify'
5321
+ | 'polkadot'
5322
+ | 'kusama'
5323
+ | 'flow_cadence';
2996
5324
 
2997
5325
  /**
2998
5326
  * ID for associated OAuth credentials
2999
5327
  */
3000
5328
  oauthCredentialsId?: string | null;
3001
5329
 
5330
+ /**
5331
+ * The lifetime of the reward
5332
+ */
5333
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
5334
+
3002
5335
  /**
3003
5336
  * Type of reward issued by this rule
3004
5337
  */
3005
- rewardType?: 'points' | 'multiplier';
5338
+ rewardType?: 'points' | 'multiplier' | 'badge';
5339
+
5340
+ /**
5341
+ * URL of the Shopify store
5342
+ */
5343
+ shopifyStoreUrl?: string | null;
5344
+
5345
+ /**
5346
+ * Whether to show this rule before the start time
5347
+ */
5348
+ showBeforeStart?: boolean;
3006
5349
 
3007
5350
  /**
3008
5351
  * Start time for the loyalty rule
@@ -3010,9 +5353,9 @@ export interface RuleUpdateParams {
3010
5353
  startTime?: string | null;
3011
5354
 
3012
5355
  /**
3013
- * Optional subscription identifier for the rule
5356
+ * Optional stratus subscription id for the rule
3014
5357
  */
3015
- subscriptionIdentifier?: string | null;
5358
+ subscriptionId?: string | null;
3016
5359
  }
3017
5360
 
3018
5361
  export namespace RuleUpdateParams {
@@ -3026,13 +5369,17 @@ export namespace RuleUpdateParams {
3026
5369
  * Blockchain network for the collection
3027
5370
  */
3028
5371
  network:
5372
+ | 'abstract'
5373
+ | 'abstractTestnet'
3029
5374
  | 'apechain'
3030
5375
  | 'arbitrum'
3031
5376
  | 'avalanche'
3032
5377
  | 'avalancheFuji'
3033
5378
  | 'base'
3034
5379
  | 'baseSepolia'
5380
+ | 'berachain'
3035
5381
  | 'berachainArtio'
5382
+ | 'berachainBepolia'
3036
5383
  | 'binance'
3037
5384
  | 'bscTestnet'
3038
5385
  | 'campTestnet'
@@ -3040,18 +5387,30 @@ export namespace RuleUpdateParams {
3040
5387
  | 'fantomTestnet'
3041
5388
  | 'flowMainnet'
3042
5389
  | 'mainnet'
5390
+ | 'nexusTestnet'
3043
5391
  | 'optimism'
3044
5392
  | 'polygon'
3045
5393
  | 'polygon_mumbai'
3046
5394
  | 'skaleNebula'
5395
+ | 'skaleEuropa'
5396
+ | 'skaleCalypso'
3047
5397
  | 'solana'
3048
5398
  | 'sophon'
5399
+ | 'sophonTestnet'
3049
5400
  | 'sui'
3050
5401
  | 'superseed'
3051
5402
  | 'superseedSepolia'
3052
5403
  | 'vanar'
3053
5404
  | 'xai'
3054
5405
  | 'zksync'
5406
+ | 'coti'
5407
+ | 'cotiTestnet'
5408
+ | 'morph'
5409
+ | 'morphTestnet'
5410
+ | 'morphHolesky'
5411
+ | 'ultra'
5412
+ | 'ultraTestnet'
5413
+ | 'nitrograph'
3055
5414
  | 'sepolia'
3056
5415
  | 'optimism_sepolia'
3057
5416
  | 'arbitrumSepolia'
@@ -3059,13 +5418,27 @@ export namespace RuleUpdateParams {
3059
5418
  | 'optimism_goerli'
3060
5419
  | 'arbitrumGoerli'
3061
5420
  | 'basecamp'
3062
- | 'abstract';
5421
+ | 'somnia'
5422
+ | 'zkverify'
5423
+ | 'polkadot'
5424
+ | 'kusama'
5425
+ | 'flow_cadence';
5426
+
5427
+ /**
5428
+ * Symbol of the collection.
5429
+ */
5430
+ symbol?: string;
3063
5431
  }
3064
5432
 
3065
5433
  /**
3066
5434
  * Additional metadata for the loyalty rule
3067
5435
  */
3068
5436
  export interface Metadata {
5437
+ /**
5438
+ * Number of tokens per batch.
5439
+ */
5440
+ batchSize?: number | null;
5441
+
3069
5442
  /**
3070
5443
  * Text displayed on the action button.
3071
5444
  */
@@ -3089,7 +5462,7 @@ export namespace RuleUpdateParams {
3089
5462
  /**
3090
5463
  * Text to check in the Twitter post, username, or bio.
3091
5464
  */
3092
- checkText?: string | null;
5465
+ checkText?: string | Array<string> | null;
3093
5466
 
3094
5467
  /**
3095
5468
  * Array of collections associated with the rule.
@@ -3099,7 +5472,12 @@ export namespace RuleUpdateParams {
3099
5472
  /**
3100
5473
  * Conditions for completing the profile.
3101
5474
  */
3102
- completeProfileConditions?: Record<string, boolean> | null;
5475
+ completeProfileConditions?: { [key: string]: boolean } | null;
5476
+
5477
+ /**
5478
+ * Description of the external rule condition (only for external rules)
5479
+ */
5480
+ conditionDescription?: string;
3103
5481
 
3104
5482
  /**
3105
5483
  * Object containing details for the call-to-action.
@@ -3111,6 +5489,11 @@ export namespace RuleUpdateParams {
3111
5489
  */
3112
5490
  customRewardsApiKey?: string;
3113
5491
 
5492
+ /**
5493
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
5494
+ */
5495
+ directRpc?: boolean;
5496
+
3114
5497
  /**
3115
5498
  * Array of Discord servers, channels, and roles to join.
3116
5499
  */
@@ -3136,6 +5519,11 @@ export namespace RuleUpdateParams {
3136
5519
  */
3137
5520
  enableVerifiedMultiplier?: boolean;
3138
5521
 
5522
+ /**
5523
+ * Type of ERC20 token for the loyalty rule.
5524
+ */
5525
+ erc20Type?: 'erc20' | 'native';
5526
+
3139
5527
  /**
3140
5528
  * Fill source of the order for the token sale
3141
5529
  */
@@ -3156,11 +5544,6 @@ export namespace RuleUpdateParams {
3156
5544
  */
3157
5545
  hasNeverSold?: boolean;
3158
5546
 
3159
- /**
3160
- * Flag indicating whether the order source is included.
3161
- */
3162
- hasOrderSource?: boolean;
3163
-
3164
5547
  /**
3165
5548
  * Indicates if the full royalty has been paid for items.
3166
5549
  */
@@ -3181,11 +5564,21 @@ export namespace RuleUpdateParams {
3181
5564
  */
3182
5565
  imageUrl?: string | null;
3183
5566
 
5567
+ /**
5568
+ * If enabled, the first transaction done on the platform will complete this rule
5569
+ */
5570
+ isCheckInOnEveryTxn?: boolean;
5571
+
3184
5572
  /**
3185
5573
  * Indicates if the multiplier has been applied to rewards.
3186
5574
  */
3187
5575
  isMultiplierApplied?: boolean;
3188
5576
 
5577
+ /**
5578
+ * Flag indicating if the rule is restricted to new users.
5579
+ */
5580
+ isRestrictedToNewUsers?: boolean;
5581
+
3189
5582
  /**
3190
5583
  * Flag indicating if rewards are applied retroactively.
3191
5584
  */
@@ -3201,6 +5594,11 @@ export namespace RuleUpdateParams {
3201
5594
  */
3202
5595
  link?: string | null;
3203
5596
 
5597
+ /**
5598
+ * Liquidity pool details.
5599
+ */
5600
+ liquidity?: Metadata.Liquidity;
5601
+
3204
5602
  /**
3205
5603
  * Maximum quantity constraint for token holding.
3206
5604
  */
@@ -3242,14 +5640,24 @@ export namespace RuleUpdateParams {
3242
5640
  onlyRewardSingleTokenOwnership?: boolean | null;
3243
5641
 
3244
5642
  /**
3245
- * Order source of the order for the token sale
5643
+ * Promotional code associated with the rule.
3246
5644
  */
3247
- orderSource?: string;
5645
+ promoCode?: string;
3248
5646
 
3249
5647
  /**
3250
- * Promotional code associated with the rule.
5648
+ * URL of the CSV file containing promo codes.
3251
5649
  */
3252
- promoCode?: string;
5650
+ promoCodeCsvUrl?: string;
5651
+
5652
+ /**
5653
+ * Numbers of the promotional code to be generated.
5654
+ */
5655
+ promoCodeLength?: number | null;
5656
+
5657
+ /**
5658
+ * Type of the promotional code.
5659
+ */
5660
+ promoCodeType?: 'code' | 'csv' | 'generate';
3253
5661
 
3254
5662
  /**
3255
5663
  * Array defining ranges and corresponding rewards.
@@ -3266,11 +5674,62 @@ export namespace RuleUpdateParams {
3266
5674
  */
3267
5675
  referrerReward?: number | null;
3268
5676
 
5677
+ /**
5678
+ * Loyalty currency ID of the referrer reward.
5679
+ */
5680
+ referrerRewardLoyaltyCurrencyId?: string | null;
5681
+
5682
+ /**
5683
+ * Flag indicating if the post link is required.
5684
+ */
5685
+ requirePostLink?: boolean | null;
5686
+
5687
+ /**
5688
+ * Flag indicating if media metadata is required.
5689
+ */
5690
+ requirePostMediaLink?: boolean | null;
5691
+
5692
+ /**
5693
+ * Flag indicating if the rule can also reward badges per range.
5694
+ */
5695
+ rewardBadgePerRange?: boolean;
5696
+
5697
+ /**
5698
+ * Flag indicating if the reward is rewarded by batch.
5699
+ */
5700
+ rewardByBatch?: boolean | null;
5701
+
5702
+ /**
5703
+ * Criteria to evaluate the reward.
5704
+ */
5705
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
5706
+
5707
+ /**
5708
+ * Flag indicating if the reward is rewarded per action.
5709
+ */
5710
+ rewardPerAction?: boolean | null;
5711
+
3269
5712
  /**
3270
5713
  * Flag indicating if rewards are given per impression.
3271
5714
  */
3272
5715
  rewardPerImpression?: boolean | null;
3273
5716
 
5717
+ /**
5718
+ * Flag indicating if the rule should reward based on value of traded tokens
5719
+ * instead of count.
5720
+ */
5721
+ rewardPerValue?: boolean;
5722
+
5723
+ /**
5724
+ * Wallet address of the user can only be used if userId is not provided
5725
+ */
5726
+ royaltyAddress?: string;
5727
+
5728
+ /**
5729
+ * Royalty percentage of the item.
5730
+ */
5731
+ royaltyPercentage?: number;
5732
+
3274
5733
  /**
3275
5734
  * Currency associated with sales.
3276
5735
  */
@@ -3310,6 +5769,7 @@ export namespace RuleUpdateParams {
3310
5769
  | 'Twitch'
3311
5770
  | 'X(Twitter)'
3312
5771
  | 'YouTube'
5772
+ | 'Google'
3313
5773
  | null;
3314
5774
 
3315
5775
  /**
@@ -3322,11 +5782,21 @@ export namespace RuleUpdateParams {
3322
5782
  */
3323
5783
  socialPlatformName?: string | null;
3324
5784
 
5785
+ /**
5786
+ * ID of the Steam app.
5787
+ */
5788
+ steamAppId?: string | null;
5789
+
3325
5790
  /**
3326
5791
  * Array of streak milestones and corresponding rewards.
3327
5792
  */
3328
5793
  streakArray?: Array<Metadata.StreakArray> | null;
3329
5794
 
5795
+ /**
5796
+ * Metadata for swap loyalty rules
5797
+ */
5798
+ swap?: Metadata.Swap;
5799
+
3330
5800
  /**
3331
5801
  * ID of the Telegram channel.
3332
5802
  */
@@ -3342,6 +5812,12 @@ export namespace RuleUpdateParams {
3342
5812
  */
3343
5813
  trackAllContracts?: boolean | null;
3344
5814
 
5815
+ /**
5816
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
5817
+ * completed once the progress is 100%.
5818
+ */
5819
+ trackProgress?: boolean | null;
5820
+
3345
5821
  /**
3346
5822
  * URL of the associated Twitter account.
3347
5823
  */
@@ -3385,7 +5861,28 @@ export namespace RuleUpdateParams {
3385
5861
  /**
3386
5862
  * Type of wallet associated with the rule.
3387
5863
  */
3388
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
5864
+ walletType?:
5865
+ | 'evm'
5866
+ | 'solana'
5867
+ | 'imx'
5868
+ | 'sui'
5869
+ | 'ton'
5870
+ | 'cosmos'
5871
+ | 'ultra'
5872
+ | 'agw'
5873
+ | 'flow_cadence'
5874
+ | 'substrate'
5875
+ | null;
5876
+
5877
+ /**
5878
+ * ID of the Youtube channel.
5879
+ */
5880
+ youtubeChannelId?: string | null;
5881
+
5882
+ /**
5883
+ * ID of the Youtube video.
5884
+ */
5885
+ youtubeVideoId?: string | null;
3389
5886
  }
3390
5887
 
3391
5888
  export namespace Metadata {
@@ -3404,13 +5901,17 @@ export namespace RuleUpdateParams {
3404
5901
  * Blockchain network of the collection.
3405
5902
  */
3406
5903
  network?:
5904
+ | 'abstract'
5905
+ | 'abstractTestnet'
3407
5906
  | 'apechain'
3408
5907
  | 'arbitrum'
3409
5908
  | 'avalanche'
3410
5909
  | 'avalancheFuji'
3411
5910
  | 'base'
3412
5911
  | 'baseSepolia'
5912
+ | 'berachain'
3413
5913
  | 'berachainArtio'
5914
+ | 'berachainBepolia'
3414
5915
  | 'binance'
3415
5916
  | 'bscTestnet'
3416
5917
  | 'campTestnet'
@@ -3418,18 +5919,30 @@ export namespace RuleUpdateParams {
3418
5919
  | 'fantomTestnet'
3419
5920
  | 'flowMainnet'
3420
5921
  | 'mainnet'
5922
+ | 'nexusTestnet'
3421
5923
  | 'optimism'
3422
5924
  | 'polygon'
3423
5925
  | 'polygon_mumbai'
3424
5926
  | 'skaleNebula'
5927
+ | 'skaleEuropa'
5928
+ | 'skaleCalypso'
3425
5929
  | 'solana'
3426
5930
  | 'sophon'
5931
+ | 'sophonTestnet'
3427
5932
  | 'sui'
3428
5933
  | 'superseed'
3429
5934
  | 'superseedSepolia'
3430
5935
  | 'vanar'
3431
5936
  | 'xai'
3432
5937
  | 'zksync'
5938
+ | 'coti'
5939
+ | 'cotiTestnet'
5940
+ | 'morph'
5941
+ | 'morphTestnet'
5942
+ | 'morphHolesky'
5943
+ | 'ultra'
5944
+ | 'ultraTestnet'
5945
+ | 'nitrograph'
3433
5946
  | 'sepolia'
3434
5947
  | 'optimism_sepolia'
3435
5948
  | 'arbitrumSepolia'
@@ -3437,7 +5950,11 @@ export namespace RuleUpdateParams {
3437
5950
  | 'optimism_goerli'
3438
5951
  | 'arbitrumGoerli'
3439
5952
  | 'basecamp'
3440
- | 'abstract';
5953
+ | 'somnia'
5954
+ | 'zkverify'
5955
+ | 'polkadot'
5956
+ | 'kusama'
5957
+ | 'flow_cadence';
3441
5958
  }
3442
5959
 
3443
5960
  /**
@@ -3514,6 +6031,111 @@ export namespace RuleUpdateParams {
3514
6031
  id: string;
3515
6032
  }
3516
6033
 
6034
+ /**
6035
+ * Liquidity pool details.
6036
+ */
6037
+ export interface Liquidity {
6038
+ /**
6039
+ * Calculation type of the liquidity pool.
6040
+ */
6041
+ calculationType?: 'fixed' | 'custom';
6042
+
6043
+ /**
6044
+ * Custom function to calculate the the reward amount based on the liquidity
6045
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
6046
+ * USD.
6047
+ */
6048
+ customFunction?: string;
6049
+
6050
+ /**
6051
+ * Liquidity provided per day in USD
6052
+ */
6053
+ liquidityPerDay?: number;
6054
+
6055
+ /**
6056
+ * Blockchain network of the liquidity pool.
6057
+ */
6058
+ network?:
6059
+ | 'abstract'
6060
+ | 'abstractTestnet'
6061
+ | 'apechain'
6062
+ | 'arbitrum'
6063
+ | 'avalanche'
6064
+ | 'avalancheFuji'
6065
+ | 'base'
6066
+ | 'baseSepolia'
6067
+ | 'berachain'
6068
+ | 'berachainArtio'
6069
+ | 'berachainBepolia'
6070
+ | 'binance'
6071
+ | 'bscTestnet'
6072
+ | 'campTestnet'
6073
+ | 'fantom'
6074
+ | 'fantomTestnet'
6075
+ | 'flowMainnet'
6076
+ | 'mainnet'
6077
+ | 'nexusTestnet'
6078
+ | 'optimism'
6079
+ | 'polygon'
6080
+ | 'polygon_mumbai'
6081
+ | 'skaleNebula'
6082
+ | 'skaleEuropa'
6083
+ | 'skaleCalypso'
6084
+ | 'solana'
6085
+ | 'sophon'
6086
+ | 'sophonTestnet'
6087
+ | 'sui'
6088
+ | 'superseed'
6089
+ | 'superseedSepolia'
6090
+ | 'vanar'
6091
+ | 'xai'
6092
+ | 'zksync'
6093
+ | 'coti'
6094
+ | 'cotiTestnet'
6095
+ | 'morph'
6096
+ | 'morphTestnet'
6097
+ | 'morphHolesky'
6098
+ | 'ultra'
6099
+ | 'ultraTestnet'
6100
+ | 'nitrograph'
6101
+ | 'sepolia'
6102
+ | 'optimism_sepolia'
6103
+ | 'arbitrumSepolia'
6104
+ | 'goerli'
6105
+ | 'optimism_goerli'
6106
+ | 'arbitrumGoerli'
6107
+ | 'basecamp'
6108
+ | 'somnia'
6109
+ | 'zkverify'
6110
+ | 'polkadot'
6111
+ | 'kusama'
6112
+ | 'flow_cadence';
6113
+
6114
+ /**
6115
+ * Indicates if only in-range liquidity is rewarded.
6116
+ */
6117
+ onlyRewardInRangeLiquidity?: boolean;
6118
+
6119
+ /**
6120
+ * Array of liquidity pools associated with the rule.
6121
+ */
6122
+ pools?: Array<Liquidity.Pool>;
6123
+
6124
+ /**
6125
+ * Protocol of the liquidity pool.
6126
+ */
6127
+ protocol?: string;
6128
+ }
6129
+
6130
+ export namespace Liquidity {
6131
+ export interface Pool {
6132
+ /**
6133
+ * Unique identifier of the liquidity pool.
6134
+ */
6135
+ id: string;
6136
+ }
6137
+ }
6138
+
3517
6139
  export interface Range {
3518
6140
  /**
3519
6141
  * Reward amount for this range.
@@ -3529,6 +6151,16 @@ export namespace RuleUpdateParams {
3529
6151
  * Start value of the range.
3530
6152
  */
3531
6153
  startRange: number;
6154
+
6155
+ /**
6156
+ * ID of the loyalty badge for this range.
6157
+ */
6158
+ loyaltyBadgeId?: string;
6159
+
6160
+ /**
6161
+ * Amount of the loyalty multiplier for this range.
6162
+ */
6163
+ loyaltyMultiplierAmount?: number;
3532
6164
  }
3533
6165
 
3534
6166
  /**
@@ -3581,20 +6213,15 @@ export namespace RuleUpdateParams {
3581
6213
  * Object containing details of the associated smart contract.
3582
6214
  */
3583
6215
  export interface SmartContract {
3584
- /**
3585
- * ABI of the smart contract.
3586
- */
3587
- abi?: string | null;
3588
-
3589
6216
  /**
3590
6217
  * Mapping of addresses for the smart contract.
3591
6218
  */
3592
6219
  addressMapping?: string | null;
3593
6220
 
3594
6221
  /**
3595
- * Array of bonus details applied to the rule.
6222
+ * Object containing details of the amount multiplier from the event.
3596
6223
  */
3597
- bonus?: Array<SmartContract.Bonus> | null;
6224
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3598
6225
 
3599
6226
  /**
3600
6227
  * ID of the smart contract.
@@ -3606,68 +6233,31 @@ export namespace RuleUpdateParams {
3606
6233
  */
3607
6234
  criteria?: 'everyEvent' | 'byParameter' | null;
3608
6235
 
3609
- /**
3610
- * Time range applied to the rule.
3611
- */
3612
- customRange?: SmartContract.CustomRange | null;
3613
-
3614
6236
  /**
3615
6237
  * Event emitted by the smart contract.
3616
6238
  */
3617
6239
  event?: string | null;
3618
6240
 
3619
- /**
3620
- * Maximum value allowed for the parameter.
3621
- */
3622
- max?: number | null;
3623
-
3624
6241
  /**
3625
6242
  * Array of parameters for the smart contract.
3626
6243
  */
3627
6244
  params?: Array<SmartContract.Param> | null;
3628
6245
 
3629
6246
  /**
3630
- * Flag indicating if a bonus is applied.
3631
- */
3632
- withBonus?: boolean | null;
3633
-
3634
- /**
3635
- * Flag indicating if a custom range is applied.
6247
+ * Type of the smart contract interaction.
3636
6248
  */
3637
- withCustomRange?: boolean | null;
3638
-
3639
- /**
3640
- * Flag indicating if a maximum limit is applied.
3641
- */
3642
- withMax?: boolean | null;
6249
+ type?: 'function' | 'event' | null;
3643
6250
  }
3644
6251
 
3645
6252
  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
6253
  /**
3659
- * Time range applied to the rule.
6254
+ * Object containing details of the amount multiplier from the event.
3660
6255
  */
3661
- export interface CustomRange {
3662
- /**
3663
- * End time of the custom range.
3664
- */
3665
- endsAt?: string | null;
3666
-
6256
+ export interface AmountMultiplier {
3667
6257
  /**
3668
- * Start time of the custom range.
6258
+ * Mapping of the value for the smart contract.
3669
6259
  */
3670
- startsAt?: string | null;
6260
+ valueMapping?: string | null;
3671
6261
  }
3672
6262
 
3673
6263
  export interface Param {
@@ -3711,17 +6301,66 @@ export namespace RuleUpdateParams {
3711
6301
  */
3712
6302
  streakMilestone: number;
3713
6303
  }
6304
+
6305
+ /**
6306
+ * Metadata for swap loyalty rules
6307
+ */
6308
+ export interface Swap {
6309
+ provider?: 'any' | 'relay' | 'lifi';
6310
+
6311
+ relayReferrerId?: string;
6312
+
6313
+ requireCrossChainSwap?: boolean;
6314
+
6315
+ swappedToChain?: 'any' | number | string;
6316
+
6317
+ swappedToTokens?: Array<Swap.SwappedToToken>;
6318
+
6319
+ tokenMode?: 'any' | 'specific';
6320
+
6321
+ trackTokenAmount?: boolean;
6322
+ }
6323
+
6324
+ export namespace Swap {
6325
+ export interface SwappedToToken {
6326
+ address: string;
6327
+
6328
+ chainId: string;
6329
+ }
6330
+ }
3714
6331
  }
3715
6332
  }
3716
6333
 
3717
6334
  export interface RuleListParams {
6335
+ /**
6336
+ * IDs of the users to filter results by
6337
+ */
6338
+ allotedToUserId?: string | Array<string>;
6339
+
6340
+ /**
6341
+ * ID of the user group to filter results by
6342
+ */
6343
+ allotedUserGroupId?: string;
6344
+
3718
6345
  /**
3719
6346
  * Address of the collection to filter by
3720
6347
  */
3721
6348
  collectionAddress?: string;
3722
6349
 
3723
6350
  /**
3724
- * Maximum number of records to return (max 1000)
6351
+ * If true this will only return active rules, the rules for which the startTime is
6352
+ * in the past and the endTime is in the future
6353
+ */
6354
+ isActive?: 'true' | 'false';
6355
+
6356
+ /**
6357
+ * If true this will only return special rules, special rules are the rules that
6358
+ * are used for anti sybil as honey pot
6359
+ */
6360
+ isSpecial?: 'true' | 'false';
6361
+
6362
+ /**
6363
+ * Maximum number of records to return (max 100)
3725
6364
  */
3726
6365
  limit?: number;
3727
6366
 
@@ -3751,6 +6390,13 @@ export interface RuleListParams {
3751
6390
  websiteId?: string;
3752
6391
  }
3753
6392
 
6393
+ export interface RuleDeleteParams {
6394
+ /**
6395
+ * Whether to debit loyalty points
6396
+ */
6397
+ debitLoyaltyPoints?: string;
6398
+ }
6399
+
3754
6400
  export interface RuleCompleteParams {
3755
6401
  /**
3756
6402
  * Override amount for the reward (rounded to nearest whole number). This will
@@ -3759,15 +6405,25 @@ export interface RuleCompleteParams {
3759
6405
  amount?: number | null;
3760
6406
 
3761
6407
  /**
3762
- * Link to the comment made by user
6408
+ * Link to the post/comment made by user
3763
6409
  */
3764
- commentLink?: string;
6410
+ contentUrl?: string;
6411
+
6412
+ /**
6413
+ * Unique key to ensure idempotent requests.
6414
+ */
6415
+ idempotencyKey?: string;
3765
6416
 
3766
6417
  /**
3767
6418
  * ID of the choice selected by the user
3768
6419
  */
3769
6420
  loyaltyQuestionChoiceId?: string;
3770
6421
 
6422
+ /**
6423
+ * Value to compare with the range
6424
+ */
6425
+ rangeValue?: number | null;
6426
+
3771
6427
  /**
3772
6428
  * Unique identifier for the user
3773
6429
  */
@@ -3780,7 +6436,7 @@ export interface RuleCompleteParams {
3780
6436
 
3781
6437
  /**
3782
6438
  * Flag indicating if only verification is required, this will not create a
3783
- * transaction and reward the user
6439
+ * transaction and reward the user.
3784
6440
  */
3785
6441
  verifyOnly?: string;
3786
6442
 
@@ -3791,11 +6447,30 @@ export interface RuleCompleteParams {
3791
6447
  }
3792
6448
 
3793
6449
  export interface RuleGetStatusParams {
3794
- organizationId: string;
6450
+ /**
6451
+ * Number of items to return
6452
+ */
6453
+ limit?: number | null;
3795
6454
 
3796
- websiteId: string;
6455
+ /**
6456
+ * Unique identifier for the loyalty rule[s]
6457
+ */
6458
+ loyaltyRuleId?: string | Array<string>;
6459
+
6460
+ organizationId?: string;
6461
+
6462
+ /**
6463
+ * Starting after item
6464
+ */
6465
+ startingAfter?: string;
6466
+
6467
+ userGroupId?: string;
3797
6468
 
3798
6469
  userId?: string;
6470
+
6471
+ walletAddress?: string;
6472
+
6473
+ websiteId?: string;
3799
6474
  }
3800
6475
 
3801
6476
  export declare namespace Rules {
@@ -3809,6 +6484,7 @@ export declare namespace Rules {
3809
6484
  type RuleCreateParams as RuleCreateParams,
3810
6485
  type RuleUpdateParams as RuleUpdateParams,
3811
6486
  type RuleListParams as RuleListParams,
6487
+ type RuleDeleteParams as RuleDeleteParams,
3812
6488
  type RuleCompleteParams as RuleCompleteParams,
3813
6489
  type RuleGetStatusParams as RuleGetStatusParams,
3814
6490
  };