@snagsolutions/sdk 0.1.0-alpha.20 → 0.1.0-alpha.200

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 +1626 -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 +368 -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 +2646 -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 +283 -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 +1930 -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 -247
  170. package/resources/loyalty/transactions.d.ts.map +1 -1
  171. package/resources/loyalty/transactions.js +15 -18
  172. package/resources/loyalty/transactions.js.map +1 -1
  173. package/resources/loyalty/transactions.mjs +1 -16
  174. package/resources/loyalty/transactions.mjs.map +1 -1
  175. package/resources/minting.d.ts +5 -5
  176. package/resources/minting.d.ts.map +1 -1
  177. package/resources/referral/referral.d.ts +11 -3
  178. package/resources/referral/referral.d.ts.map +1 -1
  179. package/resources/referral/referral.js +11 -5
  180. package/resources/referral/referral.js.map +1 -1
  181. package/resources/referral/referral.mjs +11 -5
  182. package/resources/referral/referral.mjs.map +1 -1
  183. package/resources/referral/users.d.ts +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 +36 -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 +561 -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 +3854 -100
  244. package/src/resources/loyalty/rule-groups.ts +499 -76
  245. package/src/resources/loyalty/rules.ts +3038 -318
  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 +687 -0
  249. package/src/resources/loyalty/transactions.ts +1 -330
  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 +61 -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
  }
@@ -160,6 +238,7 @@ export interface RuleCreateResponse {
160
238
  | 'connected_discord'
161
239
  | 'connected_email'
162
240
  | 'connected_epic'
241
+ | 'connected_github'
163
242
  | 'connected_steam'
164
243
  | 'connected_telegram'
165
244
  | 'connected_twitter'
@@ -189,7 +268,23 @@ export interface RuleCreateResponse {
189
268
  | 'twitter_like'
190
269
  | 'twitter_post_hashtag'
191
270
  | 'quiz'
192
- | 'poll';
271
+ | 'poll'
272
+ | 'steam_wishlist'
273
+ | 'liquidity_uniswap_v2'
274
+ | 'liquidity_uniswap_v3'
275
+ | 'points_airdrop'
276
+ | 'youtube_subscribers'
277
+ | 'youtube_comment'
278
+ | 'shopify_spend'
279
+ | 'swap'
280
+ | 'tiktok_post'
281
+ | 'post_impressions'
282
+ | 'discord_join'
283
+ | 'connected_youtube'
284
+ | 'stratus_function'
285
+ | 'connected_tiktok'
286
+ | 'tiktok_follow'
287
+ | 'github_repo_star';
193
288
 
194
289
  /**
195
290
  * Unique identifier for the associated website
@@ -201,6 +296,11 @@ export interface RuleCreateResponse {
201
296
  */
202
297
  backgroundAssetUrl?: string;
203
298
 
299
+ /**
300
+ * The type of claim for the reward
301
+ */
302
+ claimType?: 'manual' | 'auto' | null;
303
+
204
304
  /**
205
305
  * Blockchain address of the associated collection
206
306
  */
@@ -226,6 +326,18 @@ export interface RuleCreateResponse {
226
326
  */
227
327
  description?: string;
228
328
 
329
+ duplicatedFromId?: string | null;
330
+
331
+ /**
332
+ * ID of the external integration
333
+ */
334
+ externalIntegrationId?: string | null;
335
+
336
+ /**
337
+ * Optional stratus function id for the rule
338
+ */
339
+ functionId?: string | null;
340
+
229
341
  /**
230
342
  * Whether to hide this rule in the user interface
231
343
  */
@@ -234,18 +346,40 @@ export interface RuleCreateResponse {
234
346
  /**
235
347
  * Interval between rule executions
236
348
  */
237
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
349
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
238
350
 
239
351
  /**
240
352
  * Whether this rule is mandatory
241
353
  */
242
354
  isRequired?: boolean;
243
355
 
356
+ /**
357
+ * Unique identifier for the loyalty badge
358
+ */
359
+ loyaltyBadgeId?: string | null;
360
+
244
361
  /**
245
362
  * Unique identifier for the loyalty rule group
246
363
  */
247
364
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
248
365
 
366
+ /**
367
+ * URL for uploading loyalty user allotment via CSV
368
+ */
369
+ loyaltyUserAllotmentCsvUrl?: string;
370
+
371
+ /**
372
+ * The interval for the max amount. Available for the smart contract and external
373
+ * rules.
374
+ */
375
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
376
+
377
+ /**
378
+ * The maximum amount of points a user can earn per interval. Available for the
379
+ * smart contract and external rules.
380
+ */
381
+ maxAmountPerInterval?: number | null;
382
+
249
383
  /**
250
384
  * URL of the media to be displayed
251
385
  */
@@ -255,13 +389,17 @@ export interface RuleCreateResponse {
255
389
  * Blockchain network where the rule will apply
256
390
  */
257
391
  network?:
392
+ | 'abstract'
393
+ | 'abstractTestnet'
258
394
  | 'apechain'
259
395
  | 'arbitrum'
260
396
  | 'avalanche'
261
397
  | 'avalancheFuji'
262
398
  | 'base'
263
399
  | 'baseSepolia'
400
+ | 'berachain'
264
401
  | 'berachainArtio'
402
+ | 'berachainBepolia'
265
403
  | 'binance'
266
404
  | 'bscTestnet'
267
405
  | 'campTestnet'
@@ -269,18 +407,30 @@ export interface RuleCreateResponse {
269
407
  | 'fantomTestnet'
270
408
  | 'flowMainnet'
271
409
  | 'mainnet'
410
+ | 'nexusTestnet'
272
411
  | 'optimism'
273
412
  | 'polygon'
274
413
  | 'polygon_mumbai'
275
414
  | 'skaleNebula'
415
+ | 'skaleEuropa'
416
+ | 'skaleCalypso'
276
417
  | 'solana'
277
418
  | 'sophon'
419
+ | 'sophonTestnet'
278
420
  | 'sui'
279
421
  | 'superseed'
280
422
  | 'superseedSepolia'
281
423
  | 'vanar'
282
424
  | 'xai'
283
425
  | 'zksync'
426
+ | 'coti'
427
+ | 'cotiTestnet'
428
+ | 'morph'
429
+ | 'morphTestnet'
430
+ | 'morphHolesky'
431
+ | 'ultra'
432
+ | 'ultraTestnet'
433
+ | 'nitrograph'
284
434
  | 'sepolia'
285
435
  | 'optimism_sepolia'
286
436
  | 'arbitrumSepolia'
@@ -288,22 +438,41 @@ export interface RuleCreateResponse {
288
438
  | 'optimism_goerli'
289
439
  | 'arbitrumGoerli'
290
440
  | 'basecamp'
291
- | 'abstract';
441
+ | 'somnia'
442
+ | 'zkverify'
443
+ | 'polkadot'
444
+ | 'kusama'
445
+ | 'flow_cadence';
292
446
 
293
447
  /**
294
448
  * OAuth credentials associated with the rule
295
449
  */
296
450
  oauthCredentialsId?: string | null;
297
451
 
452
+ /**
453
+ * The lifetime of the reward
454
+ */
455
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
456
+
298
457
  /**
299
458
  * Type of reward issued by the rule
300
459
  */
301
- rewardType?: 'points' | 'multiplier';
460
+ rewardType?: 'points' | 'multiplier' | 'badge';
461
+
462
+ /**
463
+ * URL of the Shopify store
464
+ */
465
+ shopifyStoreUrl?: string | null;
466
+
467
+ /**
468
+ * Whether to show this rule before the start time
469
+ */
470
+ showBeforeStart?: boolean;
302
471
 
303
472
  /**
304
- * Identifier for associated subscriptions
473
+ * Optional stratus subscription id for the rule
305
474
  */
306
- subscriptionIdentifier?: string | null;
475
+ subscriptionId?: string | null;
307
476
  }
308
477
 
309
478
  export namespace RuleCreateResponse {
@@ -311,6 +480,11 @@ export namespace RuleCreateResponse {
311
480
  * Additional metadata for the loyalty rule
312
481
  */
313
482
  export interface Metadata {
483
+ /**
484
+ * Number of tokens per batch.
485
+ */
486
+ batchSize?: number | null;
487
+
314
488
  /**
315
489
  * Text displayed on the action button.
316
490
  */
@@ -334,7 +508,7 @@ export namespace RuleCreateResponse {
334
508
  /**
335
509
  * Text to check in the Twitter post, username, or bio.
336
510
  */
337
- checkText?: string | null;
511
+ checkText?: string | Array<string> | null;
338
512
 
339
513
  /**
340
514
  * Array of collections associated with the rule.
@@ -344,7 +518,12 @@ export namespace RuleCreateResponse {
344
518
  /**
345
519
  * Conditions for completing the profile.
346
520
  */
347
- completeProfileConditions?: Record<string, boolean> | null;
521
+ completeProfileConditions?: { [key: string]: boolean } | null;
522
+
523
+ /**
524
+ * Description of the external rule condition (only for external rules)
525
+ */
526
+ conditionDescription?: string;
348
527
 
349
528
  /**
350
529
  * Object containing details for the call-to-action.
@@ -356,6 +535,11 @@ export namespace RuleCreateResponse {
356
535
  */
357
536
  customRewardsApiKey?: string;
358
537
 
538
+ /**
539
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
540
+ */
541
+ directRpc?: boolean;
542
+
359
543
  /**
360
544
  * Array of Discord servers, channels, and roles to join.
361
545
  */
@@ -381,6 +565,11 @@ export namespace RuleCreateResponse {
381
565
  */
382
566
  enableVerifiedMultiplier?: boolean;
383
567
 
568
+ /**
569
+ * Type of ERC20 token for the loyalty rule.
570
+ */
571
+ erc20Type?: 'erc20' | 'native';
572
+
384
573
  /**
385
574
  * Fill source of the order for the token sale
386
575
  */
@@ -391,6 +580,11 @@ export namespace RuleCreateResponse {
391
580
  */
392
581
  firstReferralReward?: number | null;
393
582
 
583
+ /**
584
+ * URL of the GitHub repository to check for star.
585
+ */
586
+ githubRepoUrl?: string | null;
587
+
394
588
  /**
395
589
  * Flag indicating whether the fill source is included.
396
590
  */
@@ -401,11 +595,6 @@ export namespace RuleCreateResponse {
401
595
  */
402
596
  hasNeverSold?: boolean;
403
597
 
404
- /**
405
- * Flag indicating whether the order source is included.
406
- */
407
- hasOrderSource?: boolean;
408
-
409
598
  /**
410
599
  * Indicates if the full royalty has been paid for items.
411
600
  */
@@ -426,11 +615,21 @@ export namespace RuleCreateResponse {
426
615
  */
427
616
  imageUrl?: string | null;
428
617
 
618
+ /**
619
+ * If enabled, the first transaction done on the platform will complete this rule
620
+ */
621
+ isCheckInOnEveryTxn?: boolean;
622
+
429
623
  /**
430
624
  * Indicates if the multiplier has been applied to rewards.
431
625
  */
432
626
  isMultiplierApplied?: boolean;
433
627
 
628
+ /**
629
+ * Flag indicating if the rule is restricted to new users.
630
+ */
631
+ isRestrictedToNewUsers?: boolean;
632
+
434
633
  /**
435
634
  * Flag indicating if rewards are applied retroactively.
436
635
  */
@@ -446,6 +645,11 @@ export namespace RuleCreateResponse {
446
645
  */
447
646
  link?: string | null;
448
647
 
648
+ /**
649
+ * Liquidity pool details.
650
+ */
651
+ liquidity?: Metadata.Liquidity;
652
+
449
653
  /**
450
654
  * Maximum quantity constraint for token holding.
451
655
  */
@@ -487,14 +691,24 @@ export namespace RuleCreateResponse {
487
691
  onlyRewardSingleTokenOwnership?: boolean | null;
488
692
 
489
693
  /**
490
- * Order source of the order for the token sale
694
+ * Promotional code associated with the rule.
491
695
  */
492
- orderSource?: string;
696
+ promoCode?: string;
493
697
 
494
698
  /**
495
- * Promotional code associated with the rule.
699
+ * URL of the CSV file containing promo codes.
496
700
  */
497
- promoCode?: string;
701
+ promoCodeCsvUrl?: string;
702
+
703
+ /**
704
+ * Numbers of the promotional code to be generated.
705
+ */
706
+ promoCodeLength?: number | null;
707
+
708
+ /**
709
+ * Type of the promotional code.
710
+ */
711
+ promoCodeType?: 'code' | 'csv' | 'generate';
498
712
 
499
713
  /**
500
714
  * Array defining ranges and corresponding rewards.
@@ -511,11 +725,62 @@ export namespace RuleCreateResponse {
511
725
  */
512
726
  referrerReward?: number | null;
513
727
 
728
+ /**
729
+ * Loyalty currency ID of the referrer reward.
730
+ */
731
+ referrerRewardLoyaltyCurrencyId?: string | null;
732
+
733
+ /**
734
+ * Flag indicating if the post link is required.
735
+ */
736
+ requirePostLink?: boolean | null;
737
+
738
+ /**
739
+ * Flag indicating if media metadata is required.
740
+ */
741
+ requirePostMediaLink?: boolean | null;
742
+
743
+ /**
744
+ * Flag indicating if the rule can also reward badges per range.
745
+ */
746
+ rewardBadgePerRange?: boolean;
747
+
748
+ /**
749
+ * Flag indicating if the reward is rewarded by batch.
750
+ */
751
+ rewardByBatch?: boolean | null;
752
+
753
+ /**
754
+ * Criteria to evaluate the reward.
755
+ */
756
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
757
+
758
+ /**
759
+ * Flag indicating if the reward is rewarded per action.
760
+ */
761
+ rewardPerAction?: boolean | null;
762
+
514
763
  /**
515
764
  * Flag indicating if rewards are given per impression.
516
765
  */
517
766
  rewardPerImpression?: boolean | null;
518
767
 
768
+ /**
769
+ * Flag indicating if the rule should reward based on value of traded tokens
770
+ * instead of count.
771
+ */
772
+ rewardPerValue?: boolean;
773
+
774
+ /**
775
+ * Wallet address of the user can only be used if userId is not provided
776
+ */
777
+ royaltyAddress?: string;
778
+
779
+ /**
780
+ * Royalty percentage of the item.
781
+ */
782
+ royaltyPercentage?: number;
783
+
519
784
  /**
520
785
  * Currency associated with sales.
521
786
  */
@@ -555,6 +820,8 @@ export namespace RuleCreateResponse {
555
820
  | 'Twitch'
556
821
  | 'X(Twitter)'
557
822
  | 'YouTube'
823
+ | 'Google'
824
+ | 'GitHub'
558
825
  | null;
559
826
 
560
827
  /**
@@ -567,11 +834,21 @@ export namespace RuleCreateResponse {
567
834
  */
568
835
  socialPlatformName?: string | null;
569
836
 
837
+ /**
838
+ * ID of the Steam app.
839
+ */
840
+ steamAppId?: string | null;
841
+
570
842
  /**
571
843
  * Array of streak milestones and corresponding rewards.
572
844
  */
573
845
  streakArray?: Array<Metadata.StreakArray> | null;
574
846
 
847
+ /**
848
+ * Metadata for swap loyalty rules
849
+ */
850
+ swap?: Metadata.Swap;
851
+
575
852
  /**
576
853
  * ID of the Telegram channel.
577
854
  */
@@ -587,6 +864,12 @@ export namespace RuleCreateResponse {
587
864
  */
588
865
  trackAllContracts?: boolean | null;
589
866
 
867
+ /**
868
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
869
+ * completed once the progress is 100%.
870
+ */
871
+ trackProgress?: boolean | null;
872
+
590
873
  /**
591
874
  * URL of the associated Twitter account.
592
875
  */
@@ -630,7 +913,28 @@ export namespace RuleCreateResponse {
630
913
  /**
631
914
  * Type of wallet associated with the rule.
632
915
  */
633
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
916
+ walletType?:
917
+ | 'evm'
918
+ | 'solana'
919
+ | 'imx'
920
+ | 'sui'
921
+ | 'ton'
922
+ | 'cosmos'
923
+ | 'ultra'
924
+ | 'agw'
925
+ | 'flow_cadence'
926
+ | 'substrate'
927
+ | null;
928
+
929
+ /**
930
+ * ID of the Youtube channel.
931
+ */
932
+ youtubeChannelId?: string | null;
933
+
934
+ /**
935
+ * ID of the Youtube video.
936
+ */
937
+ youtubeVideoId?: string | null;
634
938
  }
635
939
 
636
940
  export namespace Metadata {
@@ -649,13 +953,17 @@ export namespace RuleCreateResponse {
649
953
  * Blockchain network of the collection.
650
954
  */
651
955
  network?:
956
+ | 'abstract'
957
+ | 'abstractTestnet'
652
958
  | 'apechain'
653
959
  | 'arbitrum'
654
960
  | 'avalanche'
655
961
  | 'avalancheFuji'
656
962
  | 'base'
657
963
  | 'baseSepolia'
964
+ | 'berachain'
658
965
  | 'berachainArtio'
966
+ | 'berachainBepolia'
659
967
  | 'binance'
660
968
  | 'bscTestnet'
661
969
  | 'campTestnet'
@@ -663,18 +971,30 @@ export namespace RuleCreateResponse {
663
971
  | 'fantomTestnet'
664
972
  | 'flowMainnet'
665
973
  | 'mainnet'
974
+ | 'nexusTestnet'
666
975
  | 'optimism'
667
976
  | 'polygon'
668
977
  | 'polygon_mumbai'
669
978
  | 'skaleNebula'
979
+ | 'skaleEuropa'
980
+ | 'skaleCalypso'
670
981
  | 'solana'
671
982
  | 'sophon'
983
+ | 'sophonTestnet'
672
984
  | 'sui'
673
985
  | 'superseed'
674
986
  | 'superseedSepolia'
675
987
  | 'vanar'
676
988
  | 'xai'
677
989
  | 'zksync'
990
+ | 'coti'
991
+ | 'cotiTestnet'
992
+ | 'morph'
993
+ | 'morphTestnet'
994
+ | 'morphHolesky'
995
+ | 'ultra'
996
+ | 'ultraTestnet'
997
+ | 'nitrograph'
678
998
  | 'sepolia'
679
999
  | 'optimism_sepolia'
680
1000
  | 'arbitrumSepolia'
@@ -682,7 +1002,11 @@ export namespace RuleCreateResponse {
682
1002
  | 'optimism_goerli'
683
1003
  | 'arbitrumGoerli'
684
1004
  | 'basecamp'
685
- | 'abstract';
1005
+ | 'somnia'
1006
+ | 'zkverify'
1007
+ | 'polkadot'
1008
+ | 'kusama'
1009
+ | 'flow_cadence';
686
1010
  }
687
1011
 
688
1012
  /**
@@ -759,6 +1083,111 @@ export namespace RuleCreateResponse {
759
1083
  id: string;
760
1084
  }
761
1085
 
1086
+ /**
1087
+ * Liquidity pool details.
1088
+ */
1089
+ export interface Liquidity {
1090
+ /**
1091
+ * Calculation type of the liquidity pool.
1092
+ */
1093
+ calculationType?: 'fixed' | 'custom';
1094
+
1095
+ /**
1096
+ * Custom function to calculate the the reward amount based on the liquidity
1097
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
1098
+ * USD.
1099
+ */
1100
+ customFunction?: string;
1101
+
1102
+ /**
1103
+ * Liquidity provided per day in USD
1104
+ */
1105
+ liquidityPerDay?: number;
1106
+
1107
+ /**
1108
+ * Blockchain network of the liquidity pool.
1109
+ */
1110
+ network?:
1111
+ | 'abstract'
1112
+ | 'abstractTestnet'
1113
+ | 'apechain'
1114
+ | 'arbitrum'
1115
+ | 'avalanche'
1116
+ | 'avalancheFuji'
1117
+ | 'base'
1118
+ | 'baseSepolia'
1119
+ | 'berachain'
1120
+ | 'berachainArtio'
1121
+ | 'berachainBepolia'
1122
+ | 'binance'
1123
+ | 'bscTestnet'
1124
+ | 'campTestnet'
1125
+ | 'fantom'
1126
+ | 'fantomTestnet'
1127
+ | 'flowMainnet'
1128
+ | 'mainnet'
1129
+ | 'nexusTestnet'
1130
+ | 'optimism'
1131
+ | 'polygon'
1132
+ | 'polygon_mumbai'
1133
+ | 'skaleNebula'
1134
+ | 'skaleEuropa'
1135
+ | 'skaleCalypso'
1136
+ | 'solana'
1137
+ | 'sophon'
1138
+ | 'sophonTestnet'
1139
+ | 'sui'
1140
+ | 'superseed'
1141
+ | 'superseedSepolia'
1142
+ | 'vanar'
1143
+ | 'xai'
1144
+ | 'zksync'
1145
+ | 'coti'
1146
+ | 'cotiTestnet'
1147
+ | 'morph'
1148
+ | 'morphTestnet'
1149
+ | 'morphHolesky'
1150
+ | 'ultra'
1151
+ | 'ultraTestnet'
1152
+ | 'nitrograph'
1153
+ | 'sepolia'
1154
+ | 'optimism_sepolia'
1155
+ | 'arbitrumSepolia'
1156
+ | 'goerli'
1157
+ | 'optimism_goerli'
1158
+ | 'arbitrumGoerli'
1159
+ | 'basecamp'
1160
+ | 'somnia'
1161
+ | 'zkverify'
1162
+ | 'polkadot'
1163
+ | 'kusama'
1164
+ | 'flow_cadence';
1165
+
1166
+ /**
1167
+ * Indicates if only in-range liquidity is rewarded.
1168
+ */
1169
+ onlyRewardInRangeLiquidity?: boolean;
1170
+
1171
+ /**
1172
+ * Array of liquidity pools associated with the rule.
1173
+ */
1174
+ pools?: Array<Liquidity.Pool>;
1175
+
1176
+ /**
1177
+ * Protocol of the liquidity pool.
1178
+ */
1179
+ protocol?: string;
1180
+ }
1181
+
1182
+ export namespace Liquidity {
1183
+ export interface Pool {
1184
+ /**
1185
+ * Unique identifier of the liquidity pool.
1186
+ */
1187
+ id: string;
1188
+ }
1189
+ }
1190
+
762
1191
  export interface Range {
763
1192
  /**
764
1193
  * Reward amount for this range.
@@ -774,6 +1203,16 @@ export namespace RuleCreateResponse {
774
1203
  * Start value of the range.
775
1204
  */
776
1205
  startRange: number;
1206
+
1207
+ /**
1208
+ * ID of the loyalty badge for this range.
1209
+ */
1210
+ loyaltyBadgeId?: string;
1211
+
1212
+ /**
1213
+ * Amount of the loyalty multiplier for this range.
1214
+ */
1215
+ loyaltyMultiplierAmount?: number;
777
1216
  }
778
1217
 
779
1218
  /**
@@ -826,20 +1265,15 @@ export namespace RuleCreateResponse {
826
1265
  * Object containing details of the associated smart contract.
827
1266
  */
828
1267
  export interface SmartContract {
829
- /**
830
- * ABI of the smart contract.
831
- */
832
- abi?: string | null;
833
-
834
1268
  /**
835
1269
  * Mapping of addresses for the smart contract.
836
1270
  */
837
1271
  addressMapping?: string | null;
838
1272
 
839
1273
  /**
840
- * Array of bonus details applied to the rule.
1274
+ * Object containing details of the amount multiplier from the event.
841
1275
  */
842
- bonus?: Array<SmartContract.Bonus> | null;
1276
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
843
1277
 
844
1278
  /**
845
1279
  * ID of the smart contract.
@@ -851,68 +1285,31 @@ export namespace RuleCreateResponse {
851
1285
  */
852
1286
  criteria?: 'everyEvent' | 'byParameter' | null;
853
1287
 
854
- /**
855
- * Time range applied to the rule.
856
- */
857
- customRange?: SmartContract.CustomRange | null;
858
-
859
1288
  /**
860
1289
  * Event emitted by the smart contract.
861
1290
  */
862
1291
  event?: string | null;
863
1292
 
864
- /**
865
- * Maximum value allowed for the parameter.
866
- */
867
- max?: number | null;
868
-
869
1293
  /**
870
1294
  * Array of parameters for the smart contract.
871
1295
  */
872
1296
  params?: Array<SmartContract.Param> | null;
873
1297
 
874
1298
  /**
875
- * Flag indicating if a bonus is applied.
876
- */
877
- withBonus?: boolean | null;
878
-
879
- /**
880
- * Flag indicating if a custom range is applied.
881
- */
882
- withCustomRange?: boolean | null;
883
-
884
- /**
885
- * Flag indicating if a maximum limit is applied.
1299
+ * Type of the smart contract interaction.
886
1300
  */
887
- withMax?: boolean | null;
1301
+ type?: 'function' | 'event' | null;
888
1302
  }
889
1303
 
890
1304
  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
1305
  /**
904
- * Time range applied to the rule.
1306
+ * Object containing details of the amount multiplier from the event.
905
1307
  */
906
- export interface CustomRange {
907
- /**
908
- * End time of the custom range.
909
- */
910
- endsAt?: string | null;
911
-
1308
+ export interface AmountMultiplier {
912
1309
  /**
913
- * Start time of the custom range.
1310
+ * Mapping of the value for the smart contract.
914
1311
  */
915
- startsAt?: string | null;
1312
+ valueMapping?: string | null;
916
1313
  }
917
1314
 
918
1315
  export interface Param {
@@ -956,6 +1353,33 @@ export namespace RuleCreateResponse {
956
1353
  */
957
1354
  streakMilestone: number;
958
1355
  }
1356
+
1357
+ /**
1358
+ * Metadata for swap loyalty rules
1359
+ */
1360
+ export interface Swap {
1361
+ provider?: 'any' | 'relay' | 'lifi';
1362
+
1363
+ relayReferrerId?: string;
1364
+
1365
+ requireCrossChainSwap?: boolean;
1366
+
1367
+ swappedToChain?: 'any' | number | string;
1368
+
1369
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1370
+
1371
+ tokenMode?: 'any' | 'specific';
1372
+
1373
+ trackTokenAmount?: boolean;
1374
+ }
1375
+
1376
+ export namespace Swap {
1377
+ export interface SwappedToToken {
1378
+ address: string;
1379
+
1380
+ chainId: string;
1381
+ }
1382
+ }
959
1383
  }
960
1384
 
961
1385
  export interface Collection {
@@ -968,13 +1392,17 @@ export namespace RuleCreateResponse {
968
1392
  * Blockchain network for the collection
969
1393
  */
970
1394
  network:
1395
+ | 'abstract'
1396
+ | 'abstractTestnet'
971
1397
  | 'apechain'
972
1398
  | 'arbitrum'
973
1399
  | 'avalanche'
974
1400
  | 'avalancheFuji'
975
1401
  | 'base'
976
1402
  | 'baseSepolia'
1403
+ | 'berachain'
977
1404
  | 'berachainArtio'
1405
+ | 'berachainBepolia'
978
1406
  | 'binance'
979
1407
  | 'bscTestnet'
980
1408
  | 'campTestnet'
@@ -982,18 +1410,30 @@ export namespace RuleCreateResponse {
982
1410
  | 'fantomTestnet'
983
1411
  | 'flowMainnet'
984
1412
  | 'mainnet'
1413
+ | 'nexusTestnet'
985
1414
  | 'optimism'
986
1415
  | 'polygon'
987
1416
  | 'polygon_mumbai'
988
1417
  | 'skaleNebula'
1418
+ | 'skaleEuropa'
1419
+ | 'skaleCalypso'
989
1420
  | 'solana'
990
1421
  | 'sophon'
1422
+ | 'sophonTestnet'
991
1423
  | 'sui'
992
1424
  | 'superseed'
993
1425
  | 'superseedSepolia'
994
1426
  | 'vanar'
995
1427
  | 'xai'
996
1428
  | 'zksync'
1429
+ | 'coti'
1430
+ | 'cotiTestnet'
1431
+ | 'morph'
1432
+ | 'morphTestnet'
1433
+ | 'morphHolesky'
1434
+ | 'ultra'
1435
+ | 'ultraTestnet'
1436
+ | 'nitrograph'
997
1437
  | 'sepolia'
998
1438
  | 'optimism_sepolia'
999
1439
  | 'arbitrumSepolia'
@@ -1001,7 +1441,16 @@ export namespace RuleCreateResponse {
1001
1441
  | 'optimism_goerli'
1002
1442
  | 'arbitrumGoerli'
1003
1443
  | 'basecamp'
1004
- | 'abstract';
1444
+ | 'somnia'
1445
+ | 'zkverify'
1446
+ | 'polkadot'
1447
+ | 'kusama'
1448
+ | 'flow_cadence';
1449
+
1450
+ /**
1451
+ * Symbol of the collection.
1452
+ */
1453
+ symbol?: string;
1005
1454
  }
1006
1455
  }
1007
1456
 
@@ -1023,10 +1472,15 @@ export interface RuleUpdateResponse {
1023
1472
  */
1024
1473
  name: string;
1025
1474
 
1475
+ /**
1476
+ * The type of claim for the reward
1477
+ */
1478
+ claimType?: 'manual' | 'auto' | null;
1479
+
1026
1480
  /**
1027
1481
  * Blockchain address of the associated collection
1028
1482
  */
1029
- collectionAddress?: string;
1483
+ collectionAddress?: string | null;
1030
1484
 
1031
1485
  /**
1032
1486
  * List of associated collections
@@ -1058,11 +1512,21 @@ export interface RuleUpdateResponse {
1058
1512
  */
1059
1513
  effectiveStartTime?: string | null;
1060
1514
 
1515
+ /**
1516
+ * ID of the external integration
1517
+ */
1518
+ externalIntegrationId?: string | null;
1519
+
1061
1520
  /**
1062
1521
  * Frequency of the rule execution
1063
1522
  */
1064
1523
  frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
1065
1524
 
1525
+ /**
1526
+ * Optional stratus function id for the rule
1527
+ */
1528
+ functionId?: string | null;
1529
+
1066
1530
  /**
1067
1531
  * Whether to hide this rule in the user interface
1068
1532
  */
@@ -1071,7 +1535,7 @@ export interface RuleUpdateResponse {
1071
1535
  /**
1072
1536
  * Time interval for recurring rule execution
1073
1537
  */
1074
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1538
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
1075
1539
 
1076
1540
  /**
1077
1541
  * Whether this rule is required for participation
@@ -1083,6 +1547,18 @@ export interface RuleUpdateResponse {
1083
1547
  */
1084
1548
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
1085
1549
 
1550
+ /**
1551
+ * The interval for the max amount. Available for the smart contract and external
1552
+ * rules.
1553
+ */
1554
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
1555
+
1556
+ /**
1557
+ * The maximum amount of points a user can earn per interval. Available for the
1558
+ * smart contract and external rules.
1559
+ */
1560
+ maxAmountPerInterval?: number | null;
1561
+
1086
1562
  /**
1087
1563
  * URL of the media to be displayed
1088
1564
  */
@@ -1097,13 +1573,17 @@ export interface RuleUpdateResponse {
1097
1573
  * Blockchain network where the rule will apply
1098
1574
  */
1099
1575
  network?:
1576
+ | 'abstract'
1577
+ | 'abstractTestnet'
1100
1578
  | 'apechain'
1101
1579
  | 'arbitrum'
1102
1580
  | 'avalanche'
1103
1581
  | 'avalancheFuji'
1104
1582
  | 'base'
1105
1583
  | 'baseSepolia'
1584
+ | 'berachain'
1106
1585
  | 'berachainArtio'
1586
+ | 'berachainBepolia'
1107
1587
  | 'binance'
1108
1588
  | 'bscTestnet'
1109
1589
  | 'campTestnet'
@@ -1111,18 +1591,30 @@ export interface RuleUpdateResponse {
1111
1591
  | 'fantomTestnet'
1112
1592
  | 'flowMainnet'
1113
1593
  | 'mainnet'
1594
+ | 'nexusTestnet'
1114
1595
  | 'optimism'
1115
1596
  | 'polygon'
1116
1597
  | 'polygon_mumbai'
1117
1598
  | 'skaleNebula'
1599
+ | 'skaleEuropa'
1600
+ | 'skaleCalypso'
1118
1601
  | 'solana'
1119
1602
  | 'sophon'
1603
+ | 'sophonTestnet'
1120
1604
  | 'sui'
1121
1605
  | 'superseed'
1122
1606
  | 'superseedSepolia'
1123
1607
  | 'vanar'
1124
1608
  | 'xai'
1125
1609
  | 'zksync'
1610
+ | 'coti'
1611
+ | 'cotiTestnet'
1612
+ | 'morph'
1613
+ | 'morphTestnet'
1614
+ | 'morphHolesky'
1615
+ | 'ultra'
1616
+ | 'ultraTestnet'
1617
+ | 'nitrograph'
1126
1618
  | 'sepolia'
1127
1619
  | 'optimism_sepolia'
1128
1620
  | 'arbitrumSepolia'
@@ -1130,7 +1622,11 @@ export interface RuleUpdateResponse {
1130
1622
  | 'optimism_goerli'
1131
1623
  | 'arbitrumGoerli'
1132
1624
  | 'basecamp'
1133
- | 'abstract';
1625
+ | 'somnia'
1626
+ | 'zkverify'
1627
+ | 'polkadot'
1628
+ | 'kusama'
1629
+ | 'flow_cadence';
1134
1630
 
1135
1631
  /**
1136
1632
  * ID for associated OAuth credentials
@@ -1138,19 +1634,34 @@ export interface RuleUpdateResponse {
1138
1634
  oauthCredentialsId?: string | null;
1139
1635
 
1140
1636
  /**
1141
- * Type of reward issued by this rule
1637
+ * The lifetime of the reward
1142
1638
  */
1143
- rewardType?: 'points' | 'multiplier';
1639
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
1144
1640
 
1145
1641
  /**
1146
- * Start time for the loyalty rule
1642
+ * Type of reward issued by this rule
1643
+ */
1644
+ rewardType?: 'points' | 'multiplier' | 'badge';
1645
+
1646
+ /**
1647
+ * URL of the Shopify store
1648
+ */
1649
+ shopifyStoreUrl?: string | null;
1650
+
1651
+ /**
1652
+ * Whether to show this rule before the start time
1653
+ */
1654
+ showBeforeStart?: boolean;
1655
+
1656
+ /**
1657
+ * Start time for the loyalty rule
1147
1658
  */
1148
1659
  startTime?: string | null;
1149
1660
 
1150
1661
  /**
1151
- * Optional subscription identifier for the rule
1662
+ * Optional stratus subscription id for the rule
1152
1663
  */
1153
- subscriptionIdentifier?: string | null;
1664
+ subscriptionId?: string | null;
1154
1665
  }
1155
1666
 
1156
1667
  export namespace RuleUpdateResponse {
@@ -1164,13 +1675,17 @@ export namespace RuleUpdateResponse {
1164
1675
  * Blockchain network for the collection
1165
1676
  */
1166
1677
  network:
1678
+ | 'abstract'
1679
+ | 'abstractTestnet'
1167
1680
  | 'apechain'
1168
1681
  | 'arbitrum'
1169
1682
  | 'avalanche'
1170
1683
  | 'avalancheFuji'
1171
1684
  | 'base'
1172
1685
  | 'baseSepolia'
1686
+ | 'berachain'
1173
1687
  | 'berachainArtio'
1688
+ | 'berachainBepolia'
1174
1689
  | 'binance'
1175
1690
  | 'bscTestnet'
1176
1691
  | 'campTestnet'
@@ -1178,18 +1693,30 @@ export namespace RuleUpdateResponse {
1178
1693
  | 'fantomTestnet'
1179
1694
  | 'flowMainnet'
1180
1695
  | 'mainnet'
1696
+ | 'nexusTestnet'
1181
1697
  | 'optimism'
1182
1698
  | 'polygon'
1183
1699
  | 'polygon_mumbai'
1184
1700
  | 'skaleNebula'
1701
+ | 'skaleEuropa'
1702
+ | 'skaleCalypso'
1185
1703
  | 'solana'
1186
1704
  | 'sophon'
1705
+ | 'sophonTestnet'
1187
1706
  | 'sui'
1188
1707
  | 'superseed'
1189
1708
  | 'superseedSepolia'
1190
1709
  | 'vanar'
1191
1710
  | 'xai'
1192
1711
  | 'zksync'
1712
+ | 'coti'
1713
+ | 'cotiTestnet'
1714
+ | 'morph'
1715
+ | 'morphTestnet'
1716
+ | 'morphHolesky'
1717
+ | 'ultra'
1718
+ | 'ultraTestnet'
1719
+ | 'nitrograph'
1193
1720
  | 'sepolia'
1194
1721
  | 'optimism_sepolia'
1195
1722
  | 'arbitrumSepolia'
@@ -1197,13 +1724,27 @@ export namespace RuleUpdateResponse {
1197
1724
  | 'optimism_goerli'
1198
1725
  | 'arbitrumGoerli'
1199
1726
  | 'basecamp'
1200
- | 'abstract';
1727
+ | 'somnia'
1728
+ | 'zkverify'
1729
+ | 'polkadot'
1730
+ | 'kusama'
1731
+ | 'flow_cadence';
1732
+
1733
+ /**
1734
+ * Symbol of the collection.
1735
+ */
1736
+ symbol?: string;
1201
1737
  }
1202
1738
 
1203
1739
  /**
1204
1740
  * Additional metadata for the loyalty rule
1205
1741
  */
1206
1742
  export interface Metadata {
1743
+ /**
1744
+ * Number of tokens per batch.
1745
+ */
1746
+ batchSize?: number | null;
1747
+
1207
1748
  /**
1208
1749
  * Text displayed on the action button.
1209
1750
  */
@@ -1227,7 +1768,7 @@ export namespace RuleUpdateResponse {
1227
1768
  /**
1228
1769
  * Text to check in the Twitter post, username, or bio.
1229
1770
  */
1230
- checkText?: string | null;
1771
+ checkText?: string | Array<string> | null;
1231
1772
 
1232
1773
  /**
1233
1774
  * Array of collections associated with the rule.
@@ -1237,7 +1778,12 @@ export namespace RuleUpdateResponse {
1237
1778
  /**
1238
1779
  * Conditions for completing the profile.
1239
1780
  */
1240
- completeProfileConditions?: Record<string, boolean> | null;
1781
+ completeProfileConditions?: { [key: string]: boolean } | null;
1782
+
1783
+ /**
1784
+ * Description of the external rule condition (only for external rules)
1785
+ */
1786
+ conditionDescription?: string;
1241
1787
 
1242
1788
  /**
1243
1789
  * Object containing details for the call-to-action.
@@ -1249,6 +1795,11 @@ export namespace RuleUpdateResponse {
1249
1795
  */
1250
1796
  customRewardsApiKey?: string;
1251
1797
 
1798
+ /**
1799
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
1800
+ */
1801
+ directRpc?: boolean;
1802
+
1252
1803
  /**
1253
1804
  * Array of Discord servers, channels, and roles to join.
1254
1805
  */
@@ -1274,6 +1825,11 @@ export namespace RuleUpdateResponse {
1274
1825
  */
1275
1826
  enableVerifiedMultiplier?: boolean;
1276
1827
 
1828
+ /**
1829
+ * Type of ERC20 token for the loyalty rule.
1830
+ */
1831
+ erc20Type?: 'erc20' | 'native';
1832
+
1277
1833
  /**
1278
1834
  * Fill source of the order for the token sale
1279
1835
  */
@@ -1284,6 +1840,11 @@ export namespace RuleUpdateResponse {
1284
1840
  */
1285
1841
  firstReferralReward?: number | null;
1286
1842
 
1843
+ /**
1844
+ * URL of the GitHub repository to check for star.
1845
+ */
1846
+ githubRepoUrl?: string | null;
1847
+
1287
1848
  /**
1288
1849
  * Flag indicating whether the fill source is included.
1289
1850
  */
@@ -1294,11 +1855,6 @@ export namespace RuleUpdateResponse {
1294
1855
  */
1295
1856
  hasNeverSold?: boolean;
1296
1857
 
1297
- /**
1298
- * Flag indicating whether the order source is included.
1299
- */
1300
- hasOrderSource?: boolean;
1301
-
1302
1858
  /**
1303
1859
  * Indicates if the full royalty has been paid for items.
1304
1860
  */
@@ -1319,11 +1875,21 @@ export namespace RuleUpdateResponse {
1319
1875
  */
1320
1876
  imageUrl?: string | null;
1321
1877
 
1878
+ /**
1879
+ * If enabled, the first transaction done on the platform will complete this rule
1880
+ */
1881
+ isCheckInOnEveryTxn?: boolean;
1882
+
1322
1883
  /**
1323
1884
  * Indicates if the multiplier has been applied to rewards.
1324
1885
  */
1325
1886
  isMultiplierApplied?: boolean;
1326
1887
 
1888
+ /**
1889
+ * Flag indicating if the rule is restricted to new users.
1890
+ */
1891
+ isRestrictedToNewUsers?: boolean;
1892
+
1327
1893
  /**
1328
1894
  * Flag indicating if rewards are applied retroactively.
1329
1895
  */
@@ -1339,6 +1905,11 @@ export namespace RuleUpdateResponse {
1339
1905
  */
1340
1906
  link?: string | null;
1341
1907
 
1908
+ /**
1909
+ * Liquidity pool details.
1910
+ */
1911
+ liquidity?: Metadata.Liquidity;
1912
+
1342
1913
  /**
1343
1914
  * Maximum quantity constraint for token holding.
1344
1915
  */
@@ -1380,14 +1951,24 @@ export namespace RuleUpdateResponse {
1380
1951
  onlyRewardSingleTokenOwnership?: boolean | null;
1381
1952
 
1382
1953
  /**
1383
- * Order source of the order for the token sale
1954
+ * Promotional code associated with the rule.
1384
1955
  */
1385
- orderSource?: string;
1956
+ promoCode?: string;
1386
1957
 
1387
1958
  /**
1388
- * Promotional code associated with the rule.
1959
+ * URL of the CSV file containing promo codes.
1389
1960
  */
1390
- promoCode?: string;
1961
+ promoCodeCsvUrl?: string;
1962
+
1963
+ /**
1964
+ * Numbers of the promotional code to be generated.
1965
+ */
1966
+ promoCodeLength?: number | null;
1967
+
1968
+ /**
1969
+ * Type of the promotional code.
1970
+ */
1971
+ promoCodeType?: 'code' | 'csv' | 'generate';
1391
1972
 
1392
1973
  /**
1393
1974
  * Array defining ranges and corresponding rewards.
@@ -1404,11 +1985,62 @@ export namespace RuleUpdateResponse {
1404
1985
  */
1405
1986
  referrerReward?: number | null;
1406
1987
 
1988
+ /**
1989
+ * Loyalty currency ID of the referrer reward.
1990
+ */
1991
+ referrerRewardLoyaltyCurrencyId?: string | null;
1992
+
1993
+ /**
1994
+ * Flag indicating if the post link is required.
1995
+ */
1996
+ requirePostLink?: boolean | null;
1997
+
1998
+ /**
1999
+ * Flag indicating if media metadata is required.
2000
+ */
2001
+ requirePostMediaLink?: boolean | null;
2002
+
2003
+ /**
2004
+ * Flag indicating if the rule can also reward badges per range.
2005
+ */
2006
+ rewardBadgePerRange?: boolean;
2007
+
2008
+ /**
2009
+ * Flag indicating if the reward is rewarded by batch.
2010
+ */
2011
+ rewardByBatch?: boolean | null;
2012
+
2013
+ /**
2014
+ * Criteria to evaluate the reward.
2015
+ */
2016
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
2017
+
2018
+ /**
2019
+ * Flag indicating if the reward is rewarded per action.
2020
+ */
2021
+ rewardPerAction?: boolean | null;
2022
+
1407
2023
  /**
1408
2024
  * Flag indicating if rewards are given per impression.
1409
2025
  */
1410
2026
  rewardPerImpression?: boolean | null;
1411
2027
 
2028
+ /**
2029
+ * Flag indicating if the rule should reward based on value of traded tokens
2030
+ * instead of count.
2031
+ */
2032
+ rewardPerValue?: boolean;
2033
+
2034
+ /**
2035
+ * Wallet address of the user can only be used if userId is not provided
2036
+ */
2037
+ royaltyAddress?: string;
2038
+
2039
+ /**
2040
+ * Royalty percentage of the item.
2041
+ */
2042
+ royaltyPercentage?: number;
2043
+
1412
2044
  /**
1413
2045
  * Currency associated with sales.
1414
2046
  */
@@ -1448,6 +2080,8 @@ export namespace RuleUpdateResponse {
1448
2080
  | 'Twitch'
1449
2081
  | 'X(Twitter)'
1450
2082
  | 'YouTube'
2083
+ | 'Google'
2084
+ | 'GitHub'
1451
2085
  | null;
1452
2086
 
1453
2087
  /**
@@ -1460,11 +2094,21 @@ export namespace RuleUpdateResponse {
1460
2094
  */
1461
2095
  socialPlatformName?: string | null;
1462
2096
 
2097
+ /**
2098
+ * ID of the Steam app.
2099
+ */
2100
+ steamAppId?: string | null;
2101
+
1463
2102
  /**
1464
2103
  * Array of streak milestones and corresponding rewards.
1465
2104
  */
1466
2105
  streakArray?: Array<Metadata.StreakArray> | null;
1467
2106
 
2107
+ /**
2108
+ * Metadata for swap loyalty rules
2109
+ */
2110
+ swap?: Metadata.Swap;
2111
+
1468
2112
  /**
1469
2113
  * ID of the Telegram channel.
1470
2114
  */
@@ -1480,6 +2124,12 @@ export namespace RuleUpdateResponse {
1480
2124
  */
1481
2125
  trackAllContracts?: boolean | null;
1482
2126
 
2127
+ /**
2128
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2129
+ * completed once the progress is 100%.
2130
+ */
2131
+ trackProgress?: boolean | null;
2132
+
1483
2133
  /**
1484
2134
  * URL of the associated Twitter account.
1485
2135
  */
@@ -1523,7 +2173,28 @@ export namespace RuleUpdateResponse {
1523
2173
  /**
1524
2174
  * Type of wallet associated with the rule.
1525
2175
  */
1526
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
2176
+ walletType?:
2177
+ | 'evm'
2178
+ | 'solana'
2179
+ | 'imx'
2180
+ | 'sui'
2181
+ | 'ton'
2182
+ | 'cosmos'
2183
+ | 'ultra'
2184
+ | 'agw'
2185
+ | 'flow_cadence'
2186
+ | 'substrate'
2187
+ | null;
2188
+
2189
+ /**
2190
+ * ID of the Youtube channel.
2191
+ */
2192
+ youtubeChannelId?: string | null;
2193
+
2194
+ /**
2195
+ * ID of the Youtube video.
2196
+ */
2197
+ youtubeVideoId?: string | null;
1527
2198
  }
1528
2199
 
1529
2200
  export namespace Metadata {
@@ -1542,13 +2213,17 @@ export namespace RuleUpdateResponse {
1542
2213
  * Blockchain network of the collection.
1543
2214
  */
1544
2215
  network?:
2216
+ | 'abstract'
2217
+ | 'abstractTestnet'
1545
2218
  | 'apechain'
1546
2219
  | 'arbitrum'
1547
2220
  | 'avalanche'
1548
2221
  | 'avalancheFuji'
1549
2222
  | 'base'
1550
2223
  | 'baseSepolia'
2224
+ | 'berachain'
1551
2225
  | 'berachainArtio'
2226
+ | 'berachainBepolia'
1552
2227
  | 'binance'
1553
2228
  | 'bscTestnet'
1554
2229
  | 'campTestnet'
@@ -1556,18 +2231,30 @@ export namespace RuleUpdateResponse {
1556
2231
  | 'fantomTestnet'
1557
2232
  | 'flowMainnet'
1558
2233
  | 'mainnet'
2234
+ | 'nexusTestnet'
1559
2235
  | 'optimism'
1560
2236
  | 'polygon'
1561
2237
  | 'polygon_mumbai'
1562
2238
  | 'skaleNebula'
2239
+ | 'skaleEuropa'
2240
+ | 'skaleCalypso'
1563
2241
  | 'solana'
1564
2242
  | 'sophon'
2243
+ | 'sophonTestnet'
1565
2244
  | 'sui'
1566
2245
  | 'superseed'
1567
2246
  | 'superseedSepolia'
1568
2247
  | 'vanar'
1569
2248
  | 'xai'
1570
2249
  | 'zksync'
2250
+ | 'coti'
2251
+ | 'cotiTestnet'
2252
+ | 'morph'
2253
+ | 'morphTestnet'
2254
+ | 'morphHolesky'
2255
+ | 'ultra'
2256
+ | 'ultraTestnet'
2257
+ | 'nitrograph'
1571
2258
  | 'sepolia'
1572
2259
  | 'optimism_sepolia'
1573
2260
  | 'arbitrumSepolia'
@@ -1575,7 +2262,11 @@ export namespace RuleUpdateResponse {
1575
2262
  | 'optimism_goerli'
1576
2263
  | 'arbitrumGoerli'
1577
2264
  | 'basecamp'
1578
- | 'abstract';
2265
+ | 'somnia'
2266
+ | 'zkverify'
2267
+ | 'polkadot'
2268
+ | 'kusama'
2269
+ | 'flow_cadence';
1579
2270
  }
1580
2271
 
1581
2272
  /**
@@ -1652,6 +2343,111 @@ export namespace RuleUpdateResponse {
1652
2343
  id: string;
1653
2344
  }
1654
2345
 
2346
+ /**
2347
+ * Liquidity pool details.
2348
+ */
2349
+ export interface Liquidity {
2350
+ /**
2351
+ * Calculation type of the liquidity pool.
2352
+ */
2353
+ calculationType?: 'fixed' | 'custom';
2354
+
2355
+ /**
2356
+ * Custom function to calculate the the reward amount based on the liquidity
2357
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2358
+ * USD.
2359
+ */
2360
+ customFunction?: string;
2361
+
2362
+ /**
2363
+ * Liquidity provided per day in USD
2364
+ */
2365
+ liquidityPerDay?: number;
2366
+
2367
+ /**
2368
+ * Blockchain network of the liquidity pool.
2369
+ */
2370
+ network?:
2371
+ | 'abstract'
2372
+ | 'abstractTestnet'
2373
+ | 'apechain'
2374
+ | 'arbitrum'
2375
+ | 'avalanche'
2376
+ | 'avalancheFuji'
2377
+ | 'base'
2378
+ | 'baseSepolia'
2379
+ | 'berachain'
2380
+ | 'berachainArtio'
2381
+ | 'berachainBepolia'
2382
+ | 'binance'
2383
+ | 'bscTestnet'
2384
+ | 'campTestnet'
2385
+ | 'fantom'
2386
+ | 'fantomTestnet'
2387
+ | 'flowMainnet'
2388
+ | 'mainnet'
2389
+ | 'nexusTestnet'
2390
+ | 'optimism'
2391
+ | 'polygon'
2392
+ | 'polygon_mumbai'
2393
+ | 'skaleNebula'
2394
+ | 'skaleEuropa'
2395
+ | 'skaleCalypso'
2396
+ | 'solana'
2397
+ | 'sophon'
2398
+ | 'sophonTestnet'
2399
+ | 'sui'
2400
+ | 'superseed'
2401
+ | 'superseedSepolia'
2402
+ | 'vanar'
2403
+ | 'xai'
2404
+ | 'zksync'
2405
+ | 'coti'
2406
+ | 'cotiTestnet'
2407
+ | 'morph'
2408
+ | 'morphTestnet'
2409
+ | 'morphHolesky'
2410
+ | 'ultra'
2411
+ | 'ultraTestnet'
2412
+ | 'nitrograph'
2413
+ | 'sepolia'
2414
+ | 'optimism_sepolia'
2415
+ | 'arbitrumSepolia'
2416
+ | 'goerli'
2417
+ | 'optimism_goerli'
2418
+ | 'arbitrumGoerli'
2419
+ | 'basecamp'
2420
+ | 'somnia'
2421
+ | 'zkverify'
2422
+ | 'polkadot'
2423
+ | 'kusama'
2424
+ | 'flow_cadence';
2425
+
2426
+ /**
2427
+ * Indicates if only in-range liquidity is rewarded.
2428
+ */
2429
+ onlyRewardInRangeLiquidity?: boolean;
2430
+
2431
+ /**
2432
+ * Array of liquidity pools associated with the rule.
2433
+ */
2434
+ pools?: Array<Liquidity.Pool>;
2435
+
2436
+ /**
2437
+ * Protocol of the liquidity pool.
2438
+ */
2439
+ protocol?: string;
2440
+ }
2441
+
2442
+ export namespace Liquidity {
2443
+ export interface Pool {
2444
+ /**
2445
+ * Unique identifier of the liquidity pool.
2446
+ */
2447
+ id: string;
2448
+ }
2449
+ }
2450
+
1655
2451
  export interface Range {
1656
2452
  /**
1657
2453
  * Reward amount for this range.
@@ -1667,6 +2463,16 @@ export namespace RuleUpdateResponse {
1667
2463
  * Start value of the range.
1668
2464
  */
1669
2465
  startRange: number;
2466
+
2467
+ /**
2468
+ * ID of the loyalty badge for this range.
2469
+ */
2470
+ loyaltyBadgeId?: string;
2471
+
2472
+ /**
2473
+ * Amount of the loyalty multiplier for this range.
2474
+ */
2475
+ loyaltyMultiplierAmount?: number;
1670
2476
  }
1671
2477
 
1672
2478
  /**
@@ -1719,20 +2525,15 @@ export namespace RuleUpdateResponse {
1719
2525
  * Object containing details of the associated smart contract.
1720
2526
  */
1721
2527
  export interface SmartContract {
1722
- /**
1723
- * ABI of the smart contract.
1724
- */
1725
- abi?: string | null;
1726
-
1727
2528
  /**
1728
2529
  * Mapping of addresses for the smart contract.
1729
2530
  */
1730
2531
  addressMapping?: string | null;
1731
2532
 
1732
2533
  /**
1733
- * Array of bonus details applied to the rule.
2534
+ * Object containing details of the amount multiplier from the event.
1734
2535
  */
1735
- bonus?: Array<SmartContract.Bonus> | null;
2536
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1736
2537
 
1737
2538
  /**
1738
2539
  * ID of the smart contract.
@@ -1744,68 +2545,31 @@ export namespace RuleUpdateResponse {
1744
2545
  */
1745
2546
  criteria?: 'everyEvent' | 'byParameter' | null;
1746
2547
 
1747
- /**
1748
- * Time range applied to the rule.
1749
- */
1750
- customRange?: SmartContract.CustomRange | null;
1751
-
1752
2548
  /**
1753
2549
  * Event emitted by the smart contract.
1754
2550
  */
1755
2551
  event?: string | null;
1756
2552
 
1757
- /**
1758
- * Maximum value allowed for the parameter.
1759
- */
1760
- max?: number | null;
1761
-
1762
2553
  /**
1763
2554
  * Array of parameters for the smart contract.
1764
2555
  */
1765
2556
  params?: Array<SmartContract.Param> | null;
1766
2557
 
1767
2558
  /**
1768
- * Flag indicating if a bonus is applied.
1769
- */
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.
2559
+ * Type of the smart contract interaction.
1779
2560
  */
1780
- withMax?: boolean | null;
2561
+ type?: 'function' | 'event' | null;
1781
2562
  }
1782
2563
 
1783
2564
  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
2565
  /**
1797
- * Time range applied to the rule.
2566
+ * Object containing details of the amount multiplier from the event.
1798
2567
  */
1799
- export interface CustomRange {
2568
+ export interface AmountMultiplier {
1800
2569
  /**
1801
- * End time of the custom range.
2570
+ * Mapping of the value for the smart contract.
1802
2571
  */
1803
- endsAt?: string | null;
1804
-
1805
- /**
1806
- * Start time of the custom range.
1807
- */
1808
- startsAt?: string | null;
2572
+ valueMapping?: string | null;
1809
2573
  }
1810
2574
 
1811
2575
  export interface Param {
@@ -1849,6 +2613,33 @@ export namespace RuleUpdateResponse {
1849
2613
  */
1850
2614
  streakMilestone: number;
1851
2615
  }
2616
+
2617
+ /**
2618
+ * Metadata for swap loyalty rules
2619
+ */
2620
+ export interface Swap {
2621
+ provider?: 'any' | 'relay' | 'lifi';
2622
+
2623
+ relayReferrerId?: string;
2624
+
2625
+ requireCrossChainSwap?: boolean;
2626
+
2627
+ swappedToChain?: 'any' | number | string;
2628
+
2629
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2630
+
2631
+ tokenMode?: 'any' | 'specific';
2632
+
2633
+ trackTokenAmount?: boolean;
2634
+ }
2635
+
2636
+ export namespace Swap {
2637
+ export interface SwappedToToken {
2638
+ address: string;
2639
+
2640
+ chainId: string;
2641
+ }
2642
+ }
1852
2643
  }
1853
2644
  }
1854
2645
 
@@ -1859,9 +2650,6 @@ export interface RuleListResponse {
1859
2650
  }
1860
2651
 
1861
2652
  export namespace RuleListResponse {
1862
- /**
1863
- * Schema for a loyalty rule
1864
- */
1865
2653
  export interface Data {
1866
2654
  /**
1867
2655
  * Unique identifier for the loyalty rule
@@ -1871,7 +2659,7 @@ export namespace RuleListResponse {
1871
2659
  /**
1872
2660
  * Amount associated with the loyalty rule
1873
2661
  */
1874
- amount: number;
2662
+ amount: number | null;
1875
2663
 
1876
2664
  /**
1877
2665
  * Timestamp when the loyalty rule was created
@@ -1883,16 +2671,46 @@ export namespace RuleListResponse {
1883
2671
  */
1884
2672
  deletedAt: string | null;
1885
2673
 
2674
+ /**
2675
+ * Description of the loyalty rule
2676
+ */
2677
+ description: string;
2678
+
2679
+ /**
2680
+ * End time of the loyalty rule
2681
+ */
2682
+ endTime: string | null;
2683
+
1886
2684
  /**
1887
2685
  * Frequency of the loyalty rule
1888
2686
  */
1889
2687
  frequency: string;
1890
2688
 
2689
+ /**
2690
+ * Chains attached to the loyalty rule
2691
+ */
2692
+ loyaltyRuleChain: Array<Data.LoyaltyRuleChain>;
2693
+
2694
+ /**
2695
+ * Name of the loyalty rule
2696
+ */
2697
+ name: string;
2698
+
1891
2699
  /**
1892
2700
  * Unique identifier for the organization
1893
2701
  */
1894
2702
  organizationId: string;
1895
2703
 
2704
+ /**
2705
+ * Type of the reward
2706
+ */
2707
+ rewardType: 'points' | 'multiplier' | 'badge';
2708
+
2709
+ /**
2710
+ * Start time of the loyalty rule
2711
+ */
2712
+ startTime: string | null;
2713
+
1896
2714
  /**
1897
2715
  * Type of the loyalty rule
1898
2716
  */
@@ -1913,36 +2731,1156 @@ export namespace RuleListResponse {
1913
2731
  */
1914
2732
  collectionAddress?: string;
1915
2733
 
2734
+ /**
2735
+ * URL of the media associated with the loyalty rule
2736
+ */
2737
+ mediaUrl?: string | null;
2738
+
1916
2739
  /**
1917
2740
  * Optional metadata for the loyalty rule
1918
2741
  */
1919
- metadata?: Record<string, unknown>;
2742
+ metadata?: { [key: string]: Data.Metadata };
1920
2743
  }
1921
- }
1922
2744
 
1923
- export interface RuleDeleteResponse {
1924
- id: string;
2745
+ export namespace Data {
2746
+ export interface LoyaltyRuleChain {
2747
+ /**
2748
+ * Unique identifier for the rule chain
2749
+ */
2750
+ id: string;
1925
2751
 
1926
- deletedAt: string;
1927
- }
2752
+ loyaltyConditions: Array<LoyaltyRuleChain.LoyaltyCondition>;
1928
2753
 
1929
- export interface RuleCompleteResponse {
1930
- message: string;
1931
- }
2754
+ /**
2755
+ * Unique identifier for the loyalty rule
2756
+ */
2757
+ loyaltyRuleId: string;
1932
2758
 
1933
- export interface RuleGetStatusResponse {
1934
- data: Array<RuleGetStatusResponse.Data>;
1935
- }
2759
+ /**
2760
+ * Name of the rule chain
2761
+ */
2762
+ name: string;
2763
+ }
1936
2764
 
1937
- export namespace RuleGetStatusResponse {
1938
- export interface Data {
1939
- loyaltyRuleId: string;
2765
+ export namespace LoyaltyRuleChain {
2766
+ export interface LoyaltyCondition {
2767
+ /**
2768
+ * Unique identifier for the condition
2769
+ */
2770
+ id: string;
2771
+
2772
+ /**
2773
+ * Amount of the condition
2774
+ */
2775
+ amount: number | null;
2776
+
2777
+ association: Array<LoyaltyCondition.Association>;
2778
+
2779
+ /**
2780
+ * URL of the CSV file
2781
+ */
2782
+ csvUrl: string | null;
2783
+
2784
+ /**
2785
+ * Description of the condition
2786
+ */
2787
+ description: string | null;
2788
+
2789
+ /**
2790
+ * Number of times the condition must be met
2791
+ */
2792
+ repeatCount: number | null;
2793
+
2794
+ /**
2795
+ * Number of times the condition must be met
2796
+ */
2797
+ requiredCount: number | null;
2798
+
2799
+ /**
2800
+ * Type of the condition
2801
+ */
2802
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
2803
+ }
2804
+
2805
+ export namespace LoyaltyCondition {
2806
+ export interface Association {
2807
+ /**
2808
+ * Unique identifier for the association
2809
+ */
2810
+ id: string;
2811
+
2812
+ /**
2813
+ * Unique identifier for the loyalty badge
2814
+ */
2815
+ loyaltyBadgeId: string | null;
2816
+
2817
+ /**
2818
+ * Unique identifier for the loyalty currency
2819
+ */
2820
+ loyaltyCurrencyId: string | null;
2821
+
2822
+ loyaltyRule: Association.LoyaltyRule | null;
2823
+
2824
+ /**
2825
+ * Unique identifier for the loyalty rule group
2826
+ */
2827
+ loyaltyRuleGroupId: string | null;
2828
+
2829
+ /**
2830
+ * Unique identifier for the loyalty rule
2831
+ */
2832
+ loyaltyRuleId: string | null;
2833
+ }
2834
+
2835
+ export namespace Association {
2836
+ export interface LoyaltyRule {
2837
+ /**
2838
+ * Name of the loyalty rule
2839
+ */
2840
+ name: string;
2841
+ }
2842
+ }
2843
+ }
2844
+ }
2845
+
2846
+ export interface Metadata {
2847
+ /**
2848
+ * Number of tokens per batch.
2849
+ */
2850
+ batchSize?: number | null;
2851
+
2852
+ /**
2853
+ * Text displayed on the action button.
2854
+ */
2855
+ buttonText?: string | null;
2856
+
2857
+ /**
2858
+ * Flag indicating if commenting is required.
2859
+ */
2860
+ checkComment?: boolean | null;
2861
+
2862
+ /**
2863
+ * Flag indicating if liking the post is required.
2864
+ */
2865
+ checkLike?: boolean | null;
2866
+
2867
+ /**
2868
+ * Flag indicating if reposting is required.
2869
+ */
2870
+ checkRepost?: boolean | null;
2871
+
2872
+ /**
2873
+ * Text to check in the Twitter post, username, or bio.
2874
+ */
2875
+ checkText?: string | Array<string> | null;
2876
+
2877
+ /**
2878
+ * Array of collections associated with the rule.
2879
+ */
2880
+ collection?: Array<Metadata.Collection>;
2881
+
2882
+ /**
2883
+ * Conditions for completing the profile.
2884
+ */
2885
+ completeProfileConditions?: { [key: string]: boolean } | null;
2886
+
2887
+ /**
2888
+ * Description of the external rule condition (only for external rules)
2889
+ */
2890
+ conditionDescription?: string;
2891
+
2892
+ /**
2893
+ * Object containing details for the call-to-action.
2894
+ */
2895
+ cta?: Metadata.Cta | null;
2896
+
2897
+ /**
2898
+ * API key for custom rewards integration.
2899
+ */
2900
+ customRewardsApiKey?: string;
2901
+
2902
+ /**
2903
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
2904
+ */
2905
+ directRpc?: boolean;
2906
+
2907
+ /**
2908
+ * Array of Discord servers, channels, and roles to join.
2909
+ */
2910
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2911
+
2912
+ /**
2913
+ * Array of drip quests required to complete the rule.
2914
+ */
2915
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2916
+
2917
+ /**
2918
+ * Flag indicating whether joining Discord servers is required.
2919
+ */
2920
+ enableJoinDiscordServers?: boolean | null;
2921
+
2922
+ /**
2923
+ * Flag indicating whether streaks are enabled.
2924
+ */
2925
+ enableStreaks?: boolean | null;
2926
+
2927
+ /**
2928
+ * Flag indicating whether the verified multiplier is enabled.
2929
+ */
2930
+ enableVerifiedMultiplier?: boolean;
2931
+
2932
+ /**
2933
+ * Type of ERC20 token for the loyalty rule.
2934
+ */
2935
+ erc20Type?: 'erc20' | 'native';
2936
+
2937
+ /**
2938
+ * Fill source of the order for the token sale
2939
+ */
2940
+ fillSource?: string;
2941
+
2942
+ /**
2943
+ * Percentage reward given to a user for their first referral.
2944
+ */
2945
+ firstReferralReward?: number | null;
2946
+
2947
+ /**
2948
+ * URL of the GitHub repository to check for star.
2949
+ */
2950
+ githubRepoUrl?: string | null;
2951
+
2952
+ /**
2953
+ * Flag indicating whether the fill source is included.
2954
+ */
2955
+ hasFillSource?: boolean;
2956
+
2957
+ /**
2958
+ * Indicates if the item has never been sold.
2959
+ */
2960
+ hasNeverSold?: boolean;
2961
+
2962
+ /**
2963
+ * Indicates if the full royalty has been paid for items.
2964
+ */
2965
+ hasPaidFullRoyalty?: boolean;
2966
+
2967
+ /**
2968
+ * Flag indicating if the sale currency is included.
2969
+ */
2970
+ hasSaleCurrency?: boolean;
2971
+
2972
+ /**
2973
+ * Indicates if the user has a verified Twitter account.
2974
+ */
2975
+ hasVerifiedTwitter?: boolean;
2976
+
2977
+ /**
2978
+ * URL of the image associated with the rule.
2979
+ */
2980
+ imageUrl?: string | null;
2981
+
2982
+ /**
2983
+ * If enabled, the first transaction done on the platform will complete this rule
2984
+ */
2985
+ isCheckInOnEveryTxn?: boolean;
2986
+
2987
+ /**
2988
+ * Indicates if the multiplier has been applied to rewards.
2989
+ */
2990
+ isMultiplierApplied?: boolean;
2991
+
2992
+ /**
2993
+ * Flag indicating if the rule is restricted to new users.
2994
+ */
2995
+ isRestrictedToNewUsers?: boolean;
2996
+
2997
+ /**
2998
+ * Flag indicating if rewards are applied retroactively.
2999
+ */
3000
+ isRetroactive?: boolean | null;
3001
+
3002
+ /**
3003
+ * Flag indicating if the token hold multiplier is applied.
3004
+ */
3005
+ isTokenHoldMultiplier?: boolean;
3006
+
3007
+ /**
3008
+ * Optional link associated with the metadata.
3009
+ */
3010
+ link?: string | null;
3011
+
3012
+ /**
3013
+ * Liquidity pool details.
3014
+ */
3015
+ liquidity?: Metadata.Liquidity;
3016
+
3017
+ /**
3018
+ * Maximum quantity constraint for token holding.
3019
+ */
3020
+ maxQty?: number | null;
3021
+
3022
+ /**
3023
+ * Minimum quantity constraint for token holding.
3024
+ */
3025
+ minQty?: number | null;
3026
+
3027
+ /**
3028
+ * Array of loyalty currency IDs used for multipliers.
3029
+ */
3030
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
3031
+
3032
+ /**
3033
+ * Flag indicating whether to include only known users.
3034
+ */
3035
+ onlyKnownUsers?: boolean;
3036
+
3037
+ /**
3038
+ * Flag indicating whether to include only native tokens.
3039
+ */
3040
+ onlyNative?: boolean;
3041
+
3042
+ /**
3043
+ * Flag indicating whether to include only non-listed items.
3044
+ */
3045
+ onlyNonListed?: boolean;
3046
+
3047
+ /**
3048
+ * Indicates if only existing users are rewarded.
3049
+ */
3050
+ onlyRewardExistingUser?: boolean;
3051
+
3052
+ /**
3053
+ * give points for only one token ownership per contract
3054
+ */
3055
+ onlyRewardSingleTokenOwnership?: boolean | null;
3056
+
3057
+ /**
3058
+ * Promotional code associated with the rule.
3059
+ */
3060
+ promoCode?: string;
3061
+
3062
+ /**
3063
+ * URL of the CSV file containing promo codes.
3064
+ */
3065
+ promoCodeCsvUrl?: string;
3066
+
3067
+ /**
3068
+ * Numbers of the promotional code to be generated.
3069
+ */
3070
+ promoCodeLength?: number | null;
3071
+
3072
+ /**
3073
+ * Type of the promotional code.
3074
+ */
3075
+ promoCodeType?: 'code' | 'csv' | 'generate';
3076
+
3077
+ /**
3078
+ * Array defining ranges and corresponding rewards.
3079
+ */
3080
+ range?: Array<Metadata.Range>;
3081
+
3082
+ /**
3083
+ * Object defining referral requirements.
3084
+ */
3085
+ referralRequirements?: Metadata.ReferralRequirements | null;
3086
+
3087
+ /**
3088
+ * Lump sum reward given to a referrer.
3089
+ */
3090
+ referrerReward?: number | null;
3091
+
3092
+ /**
3093
+ * Loyalty currency ID of the referrer reward.
3094
+ */
3095
+ referrerRewardLoyaltyCurrencyId?: string | null;
3096
+
3097
+ /**
3098
+ * Flag indicating if the post link is required.
3099
+ */
3100
+ requirePostLink?: boolean | null;
3101
+
3102
+ /**
3103
+ * Flag indicating if media metadata is required.
3104
+ */
3105
+ requirePostMediaLink?: boolean | null;
3106
+
3107
+ /**
3108
+ * Flag indicating if the rule can also reward badges per range.
3109
+ */
3110
+ rewardBadgePerRange?: boolean;
3111
+
3112
+ /**
3113
+ * Flag indicating if the reward is rewarded by batch.
3114
+ */
3115
+ rewardByBatch?: boolean | null;
3116
+
3117
+ /**
3118
+ * Criteria to evaluate the reward.
3119
+ */
3120
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
3121
+
3122
+ /**
3123
+ * Flag indicating if the reward is rewarded per action.
3124
+ */
3125
+ rewardPerAction?: boolean | null;
3126
+
3127
+ /**
3128
+ * Flag indicating if rewards are given per impression.
3129
+ */
3130
+ rewardPerImpression?: boolean | null;
3131
+
3132
+ /**
3133
+ * Flag indicating if the rule should reward based on value of traded tokens
3134
+ * instead of count.
3135
+ */
3136
+ rewardPerValue?: boolean;
3137
+
3138
+ /**
3139
+ * Wallet address of the user can only be used if userId is not provided
3140
+ */
3141
+ royaltyAddress?: string;
3142
+
3143
+ /**
3144
+ * Royalty percentage of the item.
3145
+ */
3146
+ royaltyPercentage?: number;
3147
+
3148
+ /**
3149
+ * Currency associated with sales.
3150
+ */
3151
+ saleCurrency?: string;
3152
+
3153
+ /**
3154
+ * Percentage reward given for a second-level referral.
3155
+ */
3156
+ secondReferralReward?: number | null;
3157
+
3158
+ /**
3159
+ * Flag indicating if the multiplier is skipped.
3160
+ */
3161
+ skipMultiplier?: boolean | null;
3162
+
3163
+ /**
3164
+ * Object containing details of the associated smart contract.
3165
+ */
3166
+ smartContract?: Metadata.SmartContract;
3167
+
3168
+ /**
3169
+ * Array of snapshot proposals for the rule.
3170
+ */
3171
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
3172
+
3173
+ /**
3174
+ * Social media platform associated with the rule.
3175
+ */
3176
+ socialPlatform?:
3177
+ | 'Custom'
3178
+ | 'Discord'
3179
+ | 'EpicGames'
3180
+ | 'Instagram'
3181
+ | 'Steam'
3182
+ | 'Telegram'
3183
+ | 'TikTok'
3184
+ | 'Twitch'
3185
+ | 'X(Twitter)'
3186
+ | 'YouTube'
3187
+ | 'Google'
3188
+ | 'GitHub'
3189
+ | null;
3190
+
3191
+ /**
3192
+ * URL of the social platform's logo.
3193
+ */
3194
+ socialPlatformLogo?: string | null;
3195
+
3196
+ /**
3197
+ * Name of the social platform.
3198
+ */
3199
+ socialPlatformName?: string | null;
3200
+
3201
+ /**
3202
+ * ID of the Steam app.
3203
+ */
3204
+ steamAppId?: string | null;
3205
+
3206
+ /**
3207
+ * Array of streak milestones and corresponding rewards.
3208
+ */
3209
+ streakArray?: Array<Metadata.StreakArray> | null;
3210
+
3211
+ /**
3212
+ * Metadata for swap loyalty rules
3213
+ */
3214
+ swap?: Metadata.Swap;
3215
+
3216
+ /**
3217
+ * ID of the Telegram channel.
3218
+ */
3219
+ telegramChannelId?: string | null;
3220
+
3221
+ /**
3222
+ * Time delay in seconds to verify actions.
3223
+ */
3224
+ timeDelayToVerifySeconds?: string | number | null;
3225
+
3226
+ /**
3227
+ * Flag indicating if all contracts are tracked.
3228
+ */
3229
+ trackAllContracts?: boolean | null;
3230
+
3231
+ /**
3232
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
3233
+ * completed once the progress is 100%.
3234
+ */
3235
+ trackProgress?: boolean | null;
3236
+
3237
+ /**
3238
+ * URL of the associated Twitter account.
3239
+ */
3240
+ twitterAccountUrl?: string;
3241
+
3242
+ /**
3243
+ * Hashtag associated with the Twitter post.
3244
+ */
3245
+ twitterHashtag?: string;
3246
+
3247
+ /**
3248
+ * URL of the associated Twitter post.
3249
+ */
3250
+ twitterPostUrl?: string;
3251
+
3252
+ /**
3253
+ * Unique identifier of the Twitter user.
3254
+ */
3255
+ twitterUserId?: string;
3256
+
3257
+ /**
3258
+ * Twitter username of the user.
3259
+ */
3260
+ twitterUsername?: string;
3261
+
3262
+ /**
3263
+ * Minimum length of the verification text.
3264
+ */
3265
+ verificationTextMinimumLength?: number | null;
3266
+
3267
+ /**
3268
+ * Multiplier applied to rewards for verified users.
3269
+ */
3270
+ verifiedMultiplier?: number | null;
3271
+
3272
+ /**
3273
+ * Placeholder text for verification input fields.
3274
+ */
3275
+ verifyPlaceHolderText?: string | null;
3276
+
3277
+ /**
3278
+ * Type of wallet associated with the rule.
3279
+ */
3280
+ walletType?:
3281
+ | 'evm'
3282
+ | 'solana'
3283
+ | 'imx'
3284
+ | 'sui'
3285
+ | 'ton'
3286
+ | 'cosmos'
3287
+ | 'ultra'
3288
+ | 'agw'
3289
+ | 'flow_cadence'
3290
+ | 'substrate'
3291
+ | null;
3292
+
3293
+ /**
3294
+ * ID of the Youtube channel.
3295
+ */
3296
+ youtubeChannelId?: string | null;
3297
+
3298
+ /**
3299
+ * ID of the Youtube video.
3300
+ */
3301
+ youtubeVideoId?: string | null;
3302
+ }
3303
+
3304
+ export namespace Metadata {
3305
+ export interface Collection {
3306
+ /**
3307
+ * Blockchain address of the collection.
3308
+ */
3309
+ address?: string;
3310
+
3311
+ /**
3312
+ * Multiplier applied to the rewards for this collection.
3313
+ */
3314
+ multiplier?: number;
3315
+
3316
+ /**
3317
+ * Blockchain network of the collection.
3318
+ */
3319
+ network?:
3320
+ | 'abstract'
3321
+ | 'abstractTestnet'
3322
+ | 'apechain'
3323
+ | 'arbitrum'
3324
+ | 'avalanche'
3325
+ | 'avalancheFuji'
3326
+ | 'base'
3327
+ | 'baseSepolia'
3328
+ | 'berachain'
3329
+ | 'berachainArtio'
3330
+ | 'berachainBepolia'
3331
+ | 'binance'
3332
+ | 'bscTestnet'
3333
+ | 'campTestnet'
3334
+ | 'fantom'
3335
+ | 'fantomTestnet'
3336
+ | 'flowMainnet'
3337
+ | 'mainnet'
3338
+ | 'nexusTestnet'
3339
+ | 'optimism'
3340
+ | 'polygon'
3341
+ | 'polygon_mumbai'
3342
+ | 'skaleNebula'
3343
+ | 'skaleEuropa'
3344
+ | 'skaleCalypso'
3345
+ | 'solana'
3346
+ | 'sophon'
3347
+ | 'sophonTestnet'
3348
+ | 'sui'
3349
+ | 'superseed'
3350
+ | 'superseedSepolia'
3351
+ | 'vanar'
3352
+ | 'xai'
3353
+ | 'zksync'
3354
+ | 'coti'
3355
+ | 'cotiTestnet'
3356
+ | 'morph'
3357
+ | 'morphTestnet'
3358
+ | 'morphHolesky'
3359
+ | 'ultra'
3360
+ | 'ultraTestnet'
3361
+ | 'nitrograph'
3362
+ | 'sepolia'
3363
+ | 'optimism_sepolia'
3364
+ | 'arbitrumSepolia'
3365
+ | 'goerli'
3366
+ | 'optimism_goerli'
3367
+ | 'arbitrumGoerli'
3368
+ | 'basecamp'
3369
+ | 'somnia'
3370
+ | 'zkverify'
3371
+ | 'polkadot'
3372
+ | 'kusama'
3373
+ | 'flow_cadence';
3374
+ }
3375
+
3376
+ /**
3377
+ * Object containing details for the call-to-action.
3378
+ */
3379
+ export interface Cta {
3380
+ /**
3381
+ * Link for the call-to-action.
3382
+ */
3383
+ href?: string | null;
3384
+
3385
+ /**
3386
+ * Label for the call-to-action.
3387
+ */
3388
+ label?: string | null;
3389
+ }
3390
+
3391
+ export interface DiscordServersToJoin {
3392
+ /**
3393
+ * ID of the Discord server to join.
3394
+ */
3395
+ id?: string;
3396
+
3397
+ /**
3398
+ * Array of Discord channels to join.
3399
+ */
3400
+ channels?: Array<DiscordServersToJoin.Channel>;
3401
+
3402
+ /**
3403
+ * Array of roles to assign in the Discord server.
3404
+ */
3405
+ roles?: Array<DiscordServersToJoin.Role>;
3406
+ }
3407
+
3408
+ export namespace DiscordServersToJoin {
3409
+ export interface Channel {
3410
+ /**
3411
+ * ID of the Discord channel.
3412
+ */
3413
+ id?: string;
3414
+
3415
+ /**
3416
+ * Array of emojis used in the channel.
3417
+ */
3418
+ emojis?: Array<Channel.Emoji>;
3419
+
3420
+ /**
3421
+ * Phrase of text to be present in the discord message
3422
+ */
3423
+ text?: string;
3424
+ }
3425
+
3426
+ export namespace Channel {
3427
+ export interface Emoji {
3428
+ /**
3429
+ * ID of the emoji used in the channel.
3430
+ */
3431
+ id?: string;
3432
+ }
3433
+ }
3434
+
3435
+ export interface Role {
3436
+ /**
3437
+ * ID of the role in the Discord server.
3438
+ */
3439
+ id: string;
3440
+ }
3441
+ }
3442
+
3443
+ export interface DripQuestsToComplete {
3444
+ /**
3445
+ * ID of the drip quest to complete.
3446
+ */
3447
+ id: string;
3448
+ }
3449
+
3450
+ /**
3451
+ * Liquidity pool details.
3452
+ */
3453
+ export interface Liquidity {
3454
+ /**
3455
+ * Calculation type of the liquidity pool.
3456
+ */
3457
+ calculationType?: 'fixed' | 'custom';
3458
+
3459
+ /**
3460
+ * Custom function to calculate the the reward amount based on the liquidity
3461
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
3462
+ * USD.
3463
+ */
3464
+ customFunction?: string;
3465
+
3466
+ /**
3467
+ * Liquidity provided per day in USD
3468
+ */
3469
+ liquidityPerDay?: number;
3470
+
3471
+ /**
3472
+ * Blockchain network of the liquidity pool.
3473
+ */
3474
+ network?:
3475
+ | 'abstract'
3476
+ | 'abstractTestnet'
3477
+ | 'apechain'
3478
+ | 'arbitrum'
3479
+ | 'avalanche'
3480
+ | 'avalancheFuji'
3481
+ | 'base'
3482
+ | 'baseSepolia'
3483
+ | 'berachain'
3484
+ | 'berachainArtio'
3485
+ | 'berachainBepolia'
3486
+ | 'binance'
3487
+ | 'bscTestnet'
3488
+ | 'campTestnet'
3489
+ | 'fantom'
3490
+ | 'fantomTestnet'
3491
+ | 'flowMainnet'
3492
+ | 'mainnet'
3493
+ | 'nexusTestnet'
3494
+ | 'optimism'
3495
+ | 'polygon'
3496
+ | 'polygon_mumbai'
3497
+ | 'skaleNebula'
3498
+ | 'skaleEuropa'
3499
+ | 'skaleCalypso'
3500
+ | 'solana'
3501
+ | 'sophon'
3502
+ | 'sophonTestnet'
3503
+ | 'sui'
3504
+ | 'superseed'
3505
+ | 'superseedSepolia'
3506
+ | 'vanar'
3507
+ | 'xai'
3508
+ | 'zksync'
3509
+ | 'coti'
3510
+ | 'cotiTestnet'
3511
+ | 'morph'
3512
+ | 'morphTestnet'
3513
+ | 'morphHolesky'
3514
+ | 'ultra'
3515
+ | 'ultraTestnet'
3516
+ | 'nitrograph'
3517
+ | 'sepolia'
3518
+ | 'optimism_sepolia'
3519
+ | 'arbitrumSepolia'
3520
+ | 'goerli'
3521
+ | 'optimism_goerli'
3522
+ | 'arbitrumGoerli'
3523
+ | 'basecamp'
3524
+ | 'somnia'
3525
+ | 'zkverify'
3526
+ | 'polkadot'
3527
+ | 'kusama'
3528
+ | 'flow_cadence';
3529
+
3530
+ /**
3531
+ * Indicates if only in-range liquidity is rewarded.
3532
+ */
3533
+ onlyRewardInRangeLiquidity?: boolean;
3534
+
3535
+ /**
3536
+ * Array of liquidity pools associated with the rule.
3537
+ */
3538
+ pools?: Array<Liquidity.Pool>;
3539
+
3540
+ /**
3541
+ * Protocol of the liquidity pool.
3542
+ */
3543
+ protocol?: string;
3544
+ }
3545
+
3546
+ export namespace Liquidity {
3547
+ export interface Pool {
3548
+ /**
3549
+ * Unique identifier of the liquidity pool.
3550
+ */
3551
+ id: string;
3552
+ }
3553
+ }
3554
+
3555
+ export interface Range {
3556
+ /**
3557
+ * Reward amount for this range.
3558
+ */
3559
+ amount: number;
3560
+
3561
+ /**
3562
+ * End value of the range.
3563
+ */
3564
+ endRange: number;
3565
+
3566
+ /**
3567
+ * Start value of the range.
3568
+ */
3569
+ startRange: number;
3570
+
3571
+ /**
3572
+ * ID of the loyalty badge for this range.
3573
+ */
3574
+ loyaltyBadgeId?: string;
3575
+
3576
+ /**
3577
+ * Amount of the loyalty multiplier for this range.
3578
+ */
3579
+ loyaltyMultiplierAmount?: number;
3580
+ }
3581
+
3582
+ /**
3583
+ * Object defining referral requirements.
3584
+ */
3585
+ export interface ReferralRequirements {
3586
+ /**
3587
+ * Flag indicating if achieving points is required.
3588
+ */
3589
+ achievePoints?: boolean | null;
3590
+
3591
+ /**
3592
+ * Flag indicating if completing the profile is required.
3593
+ */
3594
+ completeProfile?: boolean | null;
3595
+
3596
+ /**
3597
+ * Flag indicating if connecting Discord is required.
3598
+ */
3599
+ connectDiscord?: boolean | null;
3600
+
3601
+ /**
3602
+ * Flag indicating if connecting email is required.
3603
+ */
3604
+ connectEmail?: boolean | null;
3605
+
3606
+ /**
3607
+ * Flag indicating if connecting Twitter is required.
3608
+ */
3609
+ connectTwitter?: boolean | null;
3610
+
3611
+ points?: ReferralRequirements.Points | null;
3612
+ }
3613
+
3614
+ export namespace ReferralRequirements {
3615
+ export interface Points {
3616
+ /**
3617
+ * Points required for referral.
3618
+ */
3619
+ amount?: number | null;
3620
+
3621
+ /**
3622
+ * ID of the loyalty currency for referral.
3623
+ */
3624
+ loyaltyCurrecyId?: string | null;
3625
+ }
3626
+ }
3627
+
3628
+ /**
3629
+ * Object containing details of the associated smart contract.
3630
+ */
3631
+ export interface SmartContract {
3632
+ /**
3633
+ * Mapping of addresses for the smart contract.
3634
+ */
3635
+ addressMapping?: string | null;
3636
+
3637
+ /**
3638
+ * Object containing details of the amount multiplier from the event.
3639
+ */
3640
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3641
+
3642
+ /**
3643
+ * ID of the smart contract.
3644
+ */
3645
+ contractId?: string | null;
3646
+
3647
+ /**
3648
+ * Criteria to evaluate the smart contract event.
3649
+ */
3650
+ criteria?: 'everyEvent' | 'byParameter' | null;
3651
+
3652
+ /**
3653
+ * Event emitted by the smart contract.
3654
+ */
3655
+ event?: string | null;
3656
+
3657
+ /**
3658
+ * Array of parameters for the smart contract.
3659
+ */
3660
+ params?: Array<SmartContract.Param> | null;
3661
+
3662
+ /**
3663
+ * Type of the smart contract interaction.
3664
+ */
3665
+ type?: 'function' | 'event' | null;
3666
+ }
3667
+
3668
+ export namespace SmartContract {
3669
+ /**
3670
+ * Object containing details of the amount multiplier from the event.
3671
+ */
3672
+ export interface AmountMultiplier {
3673
+ /**
3674
+ * Mapping of the value for the smart contract.
3675
+ */
3676
+ valueMapping?: string | null;
3677
+ }
3678
+
3679
+ export interface Param {
3680
+ /**
3681
+ * Condition to check for the parameter.
3682
+ */
3683
+ condition?: string | null;
3684
+
3685
+ /**
3686
+ * Name of the smart contract parameter.
3687
+ */
3688
+ name?: string | null;
3689
+
3690
+ /**
3691
+ * Value of the parameter.
3692
+ */
3693
+ value?: string | null;
3694
+ }
3695
+ }
3696
+
3697
+ export interface SnapshotProposal {
3698
+ /**
3699
+ * ID of the snapshot proposal.
3700
+ */
3701
+ id: string;
3702
+
3703
+ /**
3704
+ * Space associated with the snapshot proposal.
3705
+ */
3706
+ space: string;
3707
+ }
3708
+
3709
+ export interface StreakArray {
3710
+ /**
3711
+ * Reward amount for achieving the streak milestone.
3712
+ */
3713
+ streakAmount: number;
3714
+
3715
+ /**
3716
+ * Milestone required to achieve the streak.
3717
+ */
3718
+ streakMilestone: number;
3719
+ }
3720
+
3721
+ /**
3722
+ * Metadata for swap loyalty rules
3723
+ */
3724
+ export interface Swap {
3725
+ provider?: 'any' | 'relay' | 'lifi';
3726
+
3727
+ relayReferrerId?: string;
3728
+
3729
+ requireCrossChainSwap?: boolean;
3730
+
3731
+ swappedToChain?: 'any' | number | string;
3732
+
3733
+ swappedToTokens?: Array<Swap.SwappedToToken>;
3734
+
3735
+ tokenMode?: 'any' | 'specific';
3736
+
3737
+ trackTokenAmount?: boolean;
3738
+ }
3739
+
3740
+ export namespace Swap {
3741
+ export interface SwappedToToken {
3742
+ address: string;
3743
+
3744
+ chainId: string;
3745
+ }
3746
+ }
3747
+ }
3748
+ }
3749
+ }
3750
+
3751
+ export interface RuleDeleteResponse {
3752
+ id: string;
3753
+
3754
+ deletedAt: string;
3755
+ }
3756
+
3757
+ export interface RuleCompleteResponse {
3758
+ message:
3759
+ | 'Completion request added to queue'
3760
+ | 'Link click being verified, come back later to check the status';
3761
+ }
3762
+
3763
+ export interface RuleGetStatusResponse {
3764
+ data: Array<RuleGetStatusResponse.Data>;
3765
+ }
3766
+
3767
+ export namespace RuleGetStatusResponse {
3768
+ export interface Data {
3769
+ loyaltyRuleId: string;
3770
+
3771
+ userId: string;
3772
+
3773
+ /**
3774
+ * The ID of the loyalty rule status for the Progress object
3775
+ */
3776
+ id?: string;
3777
+
3778
+ createdAt?: string;
3779
+
3780
+ fulfilledAt?: string | null;
3781
+
3782
+ /**
3783
+ * Categorized examples of messages that may be returned for a loyalty rule's
3784
+ * processing result.
3785
+ *
3786
+ * User Onboarding
3787
+ *
3788
+ * - Check In: "Streak successful"
3789
+ * - Complete Profile Details: "Profile not complete"
3790
+ *
3791
+ * Connect Accounts
3792
+ *
3793
+ * - Connect TikTok: "TikTok not connected"
3794
+ * - Connect Discord: "Discord not connected", "Discord request timeout"
3795
+ * - Connect X: "Twitter not connected", "Twitter not connected or content url is
3796
+ * required"
3797
+ * - Connect Email: "Email address not connected"
3798
+ * - Connect Telegram: "Telegram not connected", "user has not setup telegram (no
3799
+ * telegramUsername), please setup username in telegram and reconnect.",
3800
+ * "Telegram request rate-limited"
3801
+ * - Connect Steam: "Steam not connected"
3802
+ * - Connect Youtube: "Youtube not connected"
3803
+ *
3804
+ * Social Quests
3805
+ *
3806
+ * - Join Telegram Group: "Telegram Channel not joined", "Telegram Channel joined
3807
+ * successfully"
3808
+ * - Post on TikTok: "TikTok post not verified"
3809
+ * - Comment on an X Post: "Quest Completed: You have commented on the tweet",
3810
+ * "Quest Not Completed: Comment not found for the specified tweet"
3811
+ * - Repost an X Post: "Quest Completed: You have retweeted the tweet", "Quest Not
3812
+ * Completed: Retweet not found for the specified tweet", "Quest Completed: You
3813
+ * have retweeted and commented on the tweet", "Quest Not Completed: You have not
3814
+ * retweeted or commented on the tweet"
3815
+ * - Follow an X Account: "Missing required parameters: twitterUserId,
3816
+ * targetUsername", "Quest Completed: You are a follower of
3817
+ * @${targetUsername}", "Quest Not Completed: Please follow @${targetUsername}
3818
+ * and try again in few minutes"
3819
+ * - React to an X Post: "Missing required parameters: texts, twitterUserId,
3820
+ * userTweetId", "No text provided", "Quest Completed: You have posted {tweetId}
3821
+ * a tweet with the text {text}", "Quest Not Completed: Your all previous {COUNT}
3822
+ * posts are already claimed. Please post a new tweet and try again in a few
3823
+ * minutes.", "Tweet is already claimed", "Tweet does not belong to the user",
3824
+ * "Text not found in tweet", "Tweet is before the quest start time", "Tweet does
3825
+ * not have media", "Text found in tweet"
3826
+ * - Add Text to X Bio: "Missing required parameters: texts, twitterUserId", "User
3827
+ * not found", "Text found in bio", "Text not found in bio"
3828
+ * - Add Text to X Username: "Missing required parameters: texts, twitterUserId",
3829
+ * "User not found", "Text found in username", "Text not found in username"
3830
+ * - Comment on an X Post with Text: "Missing required parameters: texts,
3831
+ * twitterUserId", "Comment is already claimed", "Text found in comment", "Text
3832
+ * not found in comment", "Tweet not found or could not be retrieved"
3833
+ * - Comment on a YouTube Video: "Youtube comment added", "Youtube comment not
3834
+ * added"
3835
+ * - Subscribe to a YouTube Channel: "Youtube channel subscribed", "Quest failed,
3836
+ * please make sure you have made your subscriptions public in youtube"
3837
+ * - Get X post impressions: "You've already claimed the reward for this impression
3838
+ * range."
3839
+ * - Add an Item to Steam Wishlist: "Steam Wishlist item added", "Steam Wishlist
3840
+ * item not added"
3841
+ *
3842
+ * Complex Onchain Logic
3843
+ *
3844
+ * - Token Swap: "Swap rewards calculated successfully", "Swap rule failed"
3845
+ *
3846
+ * Other
3847
+ *
3848
+ * - Answer a Quiz: "Quiz question not configured", "No question response found",
3849
+ * "Incorrect answer", "Correct answer"
3850
+ * - Answer a Poll: "Poll question not configured", "Poll response recorded"
3851
+ * - Spend in Shopify Store: "Shopify not connected"
3852
+ * - Points Airdrop: "Seems like you're not eligible for this points airdrop."
3853
+ *
3854
+ * General
3855
+ *
3856
+ * - "Quest already completed"
3857
+ * - "Quest already completed using the same social account (${socialAccountName}),
3858
+ * with the different user."
3859
+ * - "You've already claimed the reward for this quest."
3860
+ * - "Quest not achieved, please try again."
3861
+ * - "Rule is not setup"
3862
+ * - "Request aborted due to timeout"
3863
+ * - "Google account not connected"
3864
+ * - "Claim failed: Multiplier is already active"
3865
+ */
3866
+ message?: string;
1940
3867
 
1941
- status: 'pending' | 'processing' | 'completed' | 'failed';
3868
+ organizationId?: string;
1942
3869
 
1943
- userId: string;
3870
+ /**
3871
+ * The progress of the loyalty rule from 0 to 100
3872
+ */
3873
+ progress?: number;
1944
3874
 
1945
- message?: string;
3875
+ /**
3876
+ * Status of the queued job, this is only returned if the job is queued and being
3877
+ * processed, this wil be retained for 10 minutes after the job is completed
3878
+ */
3879
+ status?: 'pending' | 'processing' | 'completed' | 'failed';
3880
+
3881
+ updatedAt?: string;
3882
+
3883
+ websiteId?: string;
1946
3884
  }
1947
3885
  }
1948
3886
 
@@ -2024,6 +3962,7 @@ export interface RuleCreateParams {
2024
3962
  | 'connected_discord'
2025
3963
  | 'connected_email'
2026
3964
  | 'connected_epic'
3965
+ | 'connected_github'
2027
3966
  | 'connected_steam'
2028
3967
  | 'connected_telegram'
2029
3968
  | 'connected_twitter'
@@ -2053,7 +3992,23 @@ export interface RuleCreateParams {
2053
3992
  | 'twitter_like'
2054
3993
  | 'twitter_post_hashtag'
2055
3994
  | 'quiz'
2056
- | 'poll';
3995
+ | 'poll'
3996
+ | 'steam_wishlist'
3997
+ | 'liquidity_uniswap_v2'
3998
+ | 'liquidity_uniswap_v3'
3999
+ | 'points_airdrop'
4000
+ | 'youtube_subscribers'
4001
+ | 'youtube_comment'
4002
+ | 'shopify_spend'
4003
+ | 'swap'
4004
+ | 'tiktok_post'
4005
+ | 'post_impressions'
4006
+ | 'discord_join'
4007
+ | 'connected_youtube'
4008
+ | 'stratus_function'
4009
+ | 'connected_tiktok'
4010
+ | 'tiktok_follow'
4011
+ | 'github_repo_star';
2057
4012
 
2058
4013
  /**
2059
4014
  * Unique identifier for the associated website
@@ -2065,6 +4020,11 @@ export interface RuleCreateParams {
2065
4020
  */
2066
4021
  backgroundAssetUrl?: string;
2067
4022
 
4023
+ /**
4024
+ * The type of claim for the reward
4025
+ */
4026
+ claimType?: 'manual' | 'auto' | null;
4027
+
2068
4028
  /**
2069
4029
  * Blockchain address of the associated collection
2070
4030
  */
@@ -2090,6 +4050,18 @@ export interface RuleCreateParams {
2090
4050
  */
2091
4051
  description?: string;
2092
4052
 
4053
+ duplicatedFromId?: string | null;
4054
+
4055
+ /**
4056
+ * ID of the external integration
4057
+ */
4058
+ externalIntegrationId?: string | null;
4059
+
4060
+ /**
4061
+ * Optional stratus function id for the rule
4062
+ */
4063
+ functionId?: string | null;
4064
+
2093
4065
  /**
2094
4066
  * Whether to hide this rule in the user interface
2095
4067
  */
@@ -2098,18 +4070,40 @@ export interface RuleCreateParams {
2098
4070
  /**
2099
4071
  * Interval between rule executions
2100
4072
  */
2101
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
4073
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
2102
4074
 
2103
4075
  /**
2104
4076
  * Whether this rule is mandatory
2105
4077
  */
2106
4078
  isRequired?: boolean;
2107
4079
 
4080
+ /**
4081
+ * Unique identifier for the loyalty badge
4082
+ */
4083
+ loyaltyBadgeId?: string | null;
4084
+
2108
4085
  /**
2109
4086
  * Unique identifier for the loyalty rule group
2110
4087
  */
2111
4088
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
2112
4089
 
4090
+ /**
4091
+ * URL for uploading loyalty user allotment via CSV
4092
+ */
4093
+ loyaltyUserAllotmentCsvUrl?: string;
4094
+
4095
+ /**
4096
+ * The interval for the max amount. Available for the smart contract and external
4097
+ * rules.
4098
+ */
4099
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
4100
+
4101
+ /**
4102
+ * The maximum amount of points a user can earn per interval. Available for the
4103
+ * smart contract and external rules.
4104
+ */
4105
+ maxAmountPerInterval?: number | null;
4106
+
2113
4107
  /**
2114
4108
  * URL of the media to be displayed
2115
4109
  */
@@ -2119,13 +4113,17 @@ export interface RuleCreateParams {
2119
4113
  * Blockchain network where the rule will apply
2120
4114
  */
2121
4115
  network?:
4116
+ | 'abstract'
4117
+ | 'abstractTestnet'
2122
4118
  | 'apechain'
2123
4119
  | 'arbitrum'
2124
4120
  | 'avalanche'
2125
4121
  | 'avalancheFuji'
2126
4122
  | 'base'
2127
4123
  | 'baseSepolia'
4124
+ | 'berachain'
2128
4125
  | 'berachainArtio'
4126
+ | 'berachainBepolia'
2129
4127
  | 'binance'
2130
4128
  | 'bscTestnet'
2131
4129
  | 'campTestnet'
@@ -2133,18 +4131,30 @@ export interface RuleCreateParams {
2133
4131
  | 'fantomTestnet'
2134
4132
  | 'flowMainnet'
2135
4133
  | 'mainnet'
4134
+ | 'nexusTestnet'
2136
4135
  | 'optimism'
2137
4136
  | 'polygon'
2138
4137
  | 'polygon_mumbai'
2139
4138
  | 'skaleNebula'
4139
+ | 'skaleEuropa'
4140
+ | 'skaleCalypso'
2140
4141
  | 'solana'
2141
4142
  | 'sophon'
4143
+ | 'sophonTestnet'
2142
4144
  | 'sui'
2143
4145
  | 'superseed'
2144
4146
  | 'superseedSepolia'
2145
4147
  | 'vanar'
2146
4148
  | 'xai'
2147
4149
  | 'zksync'
4150
+ | 'coti'
4151
+ | 'cotiTestnet'
4152
+ | 'morph'
4153
+ | 'morphTestnet'
4154
+ | 'morphHolesky'
4155
+ | 'ultra'
4156
+ | 'ultraTestnet'
4157
+ | 'nitrograph'
2148
4158
  | 'sepolia'
2149
4159
  | 'optimism_sepolia'
2150
4160
  | 'arbitrumSepolia'
@@ -2152,22 +4162,41 @@ export interface RuleCreateParams {
2152
4162
  | 'optimism_goerli'
2153
4163
  | 'arbitrumGoerli'
2154
4164
  | 'basecamp'
2155
- | 'abstract';
4165
+ | 'somnia'
4166
+ | 'zkverify'
4167
+ | 'polkadot'
4168
+ | 'kusama'
4169
+ | 'flow_cadence';
2156
4170
 
2157
4171
  /**
2158
4172
  * OAuth credentials associated with the rule
2159
4173
  */
2160
4174
  oauthCredentialsId?: string | null;
2161
4175
 
4176
+ /**
4177
+ * The lifetime of the reward
4178
+ */
4179
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
4180
+
2162
4181
  /**
2163
4182
  * Type of reward issued by the rule
2164
4183
  */
2165
- rewardType?: 'points' | 'multiplier';
4184
+ rewardType?: 'points' | 'multiplier' | 'badge';
4185
+
4186
+ /**
4187
+ * URL of the Shopify store
4188
+ */
4189
+ shopifyStoreUrl?: string | null;
2166
4190
 
2167
4191
  /**
2168
- * Identifier for associated subscriptions
4192
+ * Whether to show this rule before the start time
2169
4193
  */
2170
- subscriptionIdentifier?: string | null;
4194
+ showBeforeStart?: boolean;
4195
+
4196
+ /**
4197
+ * Optional stratus subscription id for the rule
4198
+ */
4199
+ subscriptionId?: string | null;
2171
4200
  }
2172
4201
 
2173
4202
  export namespace RuleCreateParams {
@@ -2175,6 +4204,11 @@ export namespace RuleCreateParams {
2175
4204
  * Additional metadata for the loyalty rule
2176
4205
  */
2177
4206
  export interface Metadata {
4207
+ /**
4208
+ * Number of tokens per batch.
4209
+ */
4210
+ batchSize?: number | null;
4211
+
2178
4212
  /**
2179
4213
  * Text displayed on the action button.
2180
4214
  */
@@ -2198,7 +4232,7 @@ export namespace RuleCreateParams {
2198
4232
  /**
2199
4233
  * Text to check in the Twitter post, username, or bio.
2200
4234
  */
2201
- checkText?: string | null;
4235
+ checkText?: string | Array<string> | null;
2202
4236
 
2203
4237
  /**
2204
4238
  * Array of collections associated with the rule.
@@ -2208,7 +4242,12 @@ export namespace RuleCreateParams {
2208
4242
  /**
2209
4243
  * Conditions for completing the profile.
2210
4244
  */
2211
- completeProfileConditions?: Record<string, boolean> | null;
4245
+ completeProfileConditions?: { [key: string]: boolean } | null;
4246
+
4247
+ /**
4248
+ * Description of the external rule condition (only for external rules)
4249
+ */
4250
+ conditionDescription?: string;
2212
4251
 
2213
4252
  /**
2214
4253
  * Object containing details for the call-to-action.
@@ -2220,6 +4259,11 @@ export namespace RuleCreateParams {
2220
4259
  */
2221
4260
  customRewardsApiKey?: string;
2222
4261
 
4262
+ /**
4263
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
4264
+ */
4265
+ directRpc?: boolean;
4266
+
2223
4267
  /**
2224
4268
  * Array of Discord servers, channels, and roles to join.
2225
4269
  */
@@ -2245,6 +4289,11 @@ export namespace RuleCreateParams {
2245
4289
  */
2246
4290
  enableVerifiedMultiplier?: boolean;
2247
4291
 
4292
+ /**
4293
+ * Type of ERC20 token for the loyalty rule.
4294
+ */
4295
+ erc20Type?: 'erc20' | 'native';
4296
+
2248
4297
  /**
2249
4298
  * Fill source of the order for the token sale
2250
4299
  */
@@ -2255,6 +4304,11 @@ export namespace RuleCreateParams {
2255
4304
  */
2256
4305
  firstReferralReward?: number | null;
2257
4306
 
4307
+ /**
4308
+ * URL of the GitHub repository to check for star.
4309
+ */
4310
+ githubRepoUrl?: string | null;
4311
+
2258
4312
  /**
2259
4313
  * Flag indicating whether the fill source is included.
2260
4314
  */
@@ -2265,11 +4319,6 @@ export namespace RuleCreateParams {
2265
4319
  */
2266
4320
  hasNeverSold?: boolean;
2267
4321
 
2268
- /**
2269
- * Flag indicating whether the order source is included.
2270
- */
2271
- hasOrderSource?: boolean;
2272
-
2273
4322
  /**
2274
4323
  * Indicates if the full royalty has been paid for items.
2275
4324
  */
@@ -2290,11 +4339,21 @@ export namespace RuleCreateParams {
2290
4339
  */
2291
4340
  imageUrl?: string | null;
2292
4341
 
4342
+ /**
4343
+ * If enabled, the first transaction done on the platform will complete this rule
4344
+ */
4345
+ isCheckInOnEveryTxn?: boolean;
4346
+
2293
4347
  /**
2294
4348
  * Indicates if the multiplier has been applied to rewards.
2295
4349
  */
2296
4350
  isMultiplierApplied?: boolean;
2297
4351
 
4352
+ /**
4353
+ * Flag indicating if the rule is restricted to new users.
4354
+ */
4355
+ isRestrictedToNewUsers?: boolean;
4356
+
2298
4357
  /**
2299
4358
  * Flag indicating if rewards are applied retroactively.
2300
4359
  */
@@ -2310,6 +4369,11 @@ export namespace RuleCreateParams {
2310
4369
  */
2311
4370
  link?: string | null;
2312
4371
 
4372
+ /**
4373
+ * Liquidity pool details.
4374
+ */
4375
+ liquidity?: Metadata.Liquidity;
4376
+
2313
4377
  /**
2314
4378
  * Maximum quantity constraint for token holding.
2315
4379
  */
@@ -2351,14 +4415,24 @@ export namespace RuleCreateParams {
2351
4415
  onlyRewardSingleTokenOwnership?: boolean | null;
2352
4416
 
2353
4417
  /**
2354
- * Order source of the order for the token sale
4418
+ * Promotional code associated with the rule.
2355
4419
  */
2356
- orderSource?: string;
4420
+ promoCode?: string;
2357
4421
 
2358
4422
  /**
2359
- * Promotional code associated with the rule.
4423
+ * URL of the CSV file containing promo codes.
2360
4424
  */
2361
- promoCode?: string;
4425
+ promoCodeCsvUrl?: string;
4426
+
4427
+ /**
4428
+ * Numbers of the promotional code to be generated.
4429
+ */
4430
+ promoCodeLength?: number | null;
4431
+
4432
+ /**
4433
+ * Type of the promotional code.
4434
+ */
4435
+ promoCodeType?: 'code' | 'csv' | 'generate';
2362
4436
 
2363
4437
  /**
2364
4438
  * Array defining ranges and corresponding rewards.
@@ -2375,11 +4449,62 @@ export namespace RuleCreateParams {
2375
4449
  */
2376
4450
  referrerReward?: number | null;
2377
4451
 
4452
+ /**
4453
+ * Loyalty currency ID of the referrer reward.
4454
+ */
4455
+ referrerRewardLoyaltyCurrencyId?: string | null;
4456
+
4457
+ /**
4458
+ * Flag indicating if the post link is required.
4459
+ */
4460
+ requirePostLink?: boolean | null;
4461
+
4462
+ /**
4463
+ * Flag indicating if media metadata is required.
4464
+ */
4465
+ requirePostMediaLink?: boolean | null;
4466
+
4467
+ /**
4468
+ * Flag indicating if the rule can also reward badges per range.
4469
+ */
4470
+ rewardBadgePerRange?: boolean;
4471
+
4472
+ /**
4473
+ * Flag indicating if the reward is rewarded by batch.
4474
+ */
4475
+ rewardByBatch?: boolean | null;
4476
+
4477
+ /**
4478
+ * Criteria to evaluate the reward.
4479
+ */
4480
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
4481
+
4482
+ /**
4483
+ * Flag indicating if the reward is rewarded per action.
4484
+ */
4485
+ rewardPerAction?: boolean | null;
4486
+
2378
4487
  /**
2379
4488
  * Flag indicating if rewards are given per impression.
2380
4489
  */
2381
4490
  rewardPerImpression?: boolean | null;
2382
4491
 
4492
+ /**
4493
+ * Flag indicating if the rule should reward based on value of traded tokens
4494
+ * instead of count.
4495
+ */
4496
+ rewardPerValue?: boolean;
4497
+
4498
+ /**
4499
+ * Wallet address of the user can only be used if userId is not provided
4500
+ */
4501
+ royaltyAddress?: string;
4502
+
4503
+ /**
4504
+ * Royalty percentage of the item.
4505
+ */
4506
+ royaltyPercentage?: number;
4507
+
2383
4508
  /**
2384
4509
  * Currency associated with sales.
2385
4510
  */
@@ -2419,6 +4544,8 @@ export namespace RuleCreateParams {
2419
4544
  | 'Twitch'
2420
4545
  | 'X(Twitter)'
2421
4546
  | 'YouTube'
4547
+ | 'Google'
4548
+ | 'GitHub'
2422
4549
  | null;
2423
4550
 
2424
4551
  /**
@@ -2431,11 +4558,21 @@ export namespace RuleCreateParams {
2431
4558
  */
2432
4559
  socialPlatformName?: string | null;
2433
4560
 
4561
+ /**
4562
+ * ID of the Steam app.
4563
+ */
4564
+ steamAppId?: string | null;
4565
+
2434
4566
  /**
2435
4567
  * Array of streak milestones and corresponding rewards.
2436
4568
  */
2437
4569
  streakArray?: Array<Metadata.StreakArray> | null;
2438
4570
 
4571
+ /**
4572
+ * Metadata for swap loyalty rules
4573
+ */
4574
+ swap?: Metadata.Swap;
4575
+
2439
4576
  /**
2440
4577
  * ID of the Telegram channel.
2441
4578
  */
@@ -2451,6 +4588,12 @@ export namespace RuleCreateParams {
2451
4588
  */
2452
4589
  trackAllContracts?: boolean | null;
2453
4590
 
4591
+ /**
4592
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
4593
+ * completed once the progress is 100%.
4594
+ */
4595
+ trackProgress?: boolean | null;
4596
+
2454
4597
  /**
2455
4598
  * URL of the associated Twitter account.
2456
4599
  */
@@ -2494,7 +4637,28 @@ export namespace RuleCreateParams {
2494
4637
  /**
2495
4638
  * Type of wallet associated with the rule.
2496
4639
  */
2497
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
4640
+ walletType?:
4641
+ | 'evm'
4642
+ | 'solana'
4643
+ | 'imx'
4644
+ | 'sui'
4645
+ | 'ton'
4646
+ | 'cosmos'
4647
+ | 'ultra'
4648
+ | 'agw'
4649
+ | 'flow_cadence'
4650
+ | 'substrate'
4651
+ | null;
4652
+
4653
+ /**
4654
+ * ID of the Youtube channel.
4655
+ */
4656
+ youtubeChannelId?: string | null;
4657
+
4658
+ /**
4659
+ * ID of the Youtube video.
4660
+ */
4661
+ youtubeVideoId?: string | null;
2498
4662
  }
2499
4663
 
2500
4664
  export namespace Metadata {
@@ -2513,13 +4677,17 @@ export namespace RuleCreateParams {
2513
4677
  * Blockchain network of the collection.
2514
4678
  */
2515
4679
  network?:
4680
+ | 'abstract'
4681
+ | 'abstractTestnet'
2516
4682
  | 'apechain'
2517
4683
  | 'arbitrum'
2518
4684
  | 'avalanche'
2519
4685
  | 'avalancheFuji'
2520
4686
  | 'base'
2521
4687
  | 'baseSepolia'
4688
+ | 'berachain'
2522
4689
  | 'berachainArtio'
4690
+ | 'berachainBepolia'
2523
4691
  | 'binance'
2524
4692
  | 'bscTestnet'
2525
4693
  | 'campTestnet'
@@ -2527,18 +4695,30 @@ export namespace RuleCreateParams {
2527
4695
  | 'fantomTestnet'
2528
4696
  | 'flowMainnet'
2529
4697
  | 'mainnet'
4698
+ | 'nexusTestnet'
2530
4699
  | 'optimism'
2531
4700
  | 'polygon'
2532
4701
  | 'polygon_mumbai'
2533
4702
  | 'skaleNebula'
4703
+ | 'skaleEuropa'
4704
+ | 'skaleCalypso'
2534
4705
  | 'solana'
2535
4706
  | 'sophon'
4707
+ | 'sophonTestnet'
2536
4708
  | 'sui'
2537
4709
  | 'superseed'
2538
4710
  | 'superseedSepolia'
2539
4711
  | 'vanar'
2540
4712
  | 'xai'
2541
4713
  | 'zksync'
4714
+ | 'coti'
4715
+ | 'cotiTestnet'
4716
+ | 'morph'
4717
+ | 'morphTestnet'
4718
+ | 'morphHolesky'
4719
+ | 'ultra'
4720
+ | 'ultraTestnet'
4721
+ | 'nitrograph'
2542
4722
  | 'sepolia'
2543
4723
  | 'optimism_sepolia'
2544
4724
  | 'arbitrumSepolia'
@@ -2546,7 +4726,11 @@ export namespace RuleCreateParams {
2546
4726
  | 'optimism_goerli'
2547
4727
  | 'arbitrumGoerli'
2548
4728
  | 'basecamp'
2549
- | 'abstract';
4729
+ | 'somnia'
4730
+ | 'zkverify'
4731
+ | 'polkadot'
4732
+ | 'kusama'
4733
+ | 'flow_cadence';
2550
4734
  }
2551
4735
 
2552
4736
  /**
@@ -2623,6 +4807,111 @@ export namespace RuleCreateParams {
2623
4807
  id: string;
2624
4808
  }
2625
4809
 
4810
+ /**
4811
+ * Liquidity pool details.
4812
+ */
4813
+ export interface Liquidity {
4814
+ /**
4815
+ * Calculation type of the liquidity pool.
4816
+ */
4817
+ calculationType?: 'fixed' | 'custom';
4818
+
4819
+ /**
4820
+ * Custom function to calculate the the reward amount based on the liquidity
4821
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
4822
+ * USD.
4823
+ */
4824
+ customFunction?: string;
4825
+
4826
+ /**
4827
+ * Liquidity provided per day in USD
4828
+ */
4829
+ liquidityPerDay?: number;
4830
+
4831
+ /**
4832
+ * Blockchain network of the liquidity pool.
4833
+ */
4834
+ network?:
4835
+ | 'abstract'
4836
+ | 'abstractTestnet'
4837
+ | 'apechain'
4838
+ | 'arbitrum'
4839
+ | 'avalanche'
4840
+ | 'avalancheFuji'
4841
+ | 'base'
4842
+ | 'baseSepolia'
4843
+ | 'berachain'
4844
+ | 'berachainArtio'
4845
+ | 'berachainBepolia'
4846
+ | 'binance'
4847
+ | 'bscTestnet'
4848
+ | 'campTestnet'
4849
+ | 'fantom'
4850
+ | 'fantomTestnet'
4851
+ | 'flowMainnet'
4852
+ | 'mainnet'
4853
+ | 'nexusTestnet'
4854
+ | 'optimism'
4855
+ | 'polygon'
4856
+ | 'polygon_mumbai'
4857
+ | 'skaleNebula'
4858
+ | 'skaleEuropa'
4859
+ | 'skaleCalypso'
4860
+ | 'solana'
4861
+ | 'sophon'
4862
+ | 'sophonTestnet'
4863
+ | 'sui'
4864
+ | 'superseed'
4865
+ | 'superseedSepolia'
4866
+ | 'vanar'
4867
+ | 'xai'
4868
+ | 'zksync'
4869
+ | 'coti'
4870
+ | 'cotiTestnet'
4871
+ | 'morph'
4872
+ | 'morphTestnet'
4873
+ | 'morphHolesky'
4874
+ | 'ultra'
4875
+ | 'ultraTestnet'
4876
+ | 'nitrograph'
4877
+ | 'sepolia'
4878
+ | 'optimism_sepolia'
4879
+ | 'arbitrumSepolia'
4880
+ | 'goerli'
4881
+ | 'optimism_goerli'
4882
+ | 'arbitrumGoerli'
4883
+ | 'basecamp'
4884
+ | 'somnia'
4885
+ | 'zkverify'
4886
+ | 'polkadot'
4887
+ | 'kusama'
4888
+ | 'flow_cadence';
4889
+
4890
+ /**
4891
+ * Indicates if only in-range liquidity is rewarded.
4892
+ */
4893
+ onlyRewardInRangeLiquidity?: boolean;
4894
+
4895
+ /**
4896
+ * Array of liquidity pools associated with the rule.
4897
+ */
4898
+ pools?: Array<Liquidity.Pool>;
4899
+
4900
+ /**
4901
+ * Protocol of the liquidity pool.
4902
+ */
4903
+ protocol?: string;
4904
+ }
4905
+
4906
+ export namespace Liquidity {
4907
+ export interface Pool {
4908
+ /**
4909
+ * Unique identifier of the liquidity pool.
4910
+ */
4911
+ id: string;
4912
+ }
4913
+ }
4914
+
2626
4915
  export interface Range {
2627
4916
  /**
2628
4917
  * Reward amount for this range.
@@ -2638,6 +4927,16 @@ export namespace RuleCreateParams {
2638
4927
  * Start value of the range.
2639
4928
  */
2640
4929
  startRange: number;
4930
+
4931
+ /**
4932
+ * ID of the loyalty badge for this range.
4933
+ */
4934
+ loyaltyBadgeId?: string;
4935
+
4936
+ /**
4937
+ * Amount of the loyalty multiplier for this range.
4938
+ */
4939
+ loyaltyMultiplierAmount?: number;
2641
4940
  }
2642
4941
 
2643
4942
  /**
@@ -2690,20 +4989,15 @@ export namespace RuleCreateParams {
2690
4989
  * Object containing details of the associated smart contract.
2691
4990
  */
2692
4991
  export interface SmartContract {
2693
- /**
2694
- * ABI of the smart contract.
2695
- */
2696
- abi?: string | null;
2697
-
2698
4992
  /**
2699
4993
  * Mapping of addresses for the smart contract.
2700
4994
  */
2701
4995
  addressMapping?: string | null;
2702
4996
 
2703
4997
  /**
2704
- * Array of bonus details applied to the rule.
4998
+ * Object containing details of the amount multiplier from the event.
2705
4999
  */
2706
- bonus?: Array<SmartContract.Bonus> | null;
5000
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2707
5001
 
2708
5002
  /**
2709
5003
  * ID of the smart contract.
@@ -2715,68 +5009,31 @@ export namespace RuleCreateParams {
2715
5009
  */
2716
5010
  criteria?: 'everyEvent' | 'byParameter' | null;
2717
5011
 
2718
- /**
2719
- * Time range applied to the rule.
2720
- */
2721
- customRange?: SmartContract.CustomRange | null;
2722
-
2723
5012
  /**
2724
5013
  * Event emitted by the smart contract.
2725
5014
  */
2726
5015
  event?: string | null;
2727
5016
 
2728
- /**
2729
- * Maximum value allowed for the parameter.
2730
- */
2731
- max?: number | null;
2732
-
2733
5017
  /**
2734
5018
  * Array of parameters for the smart contract.
2735
5019
  */
2736
5020
  params?: Array<SmartContract.Param> | null;
2737
5021
 
2738
5022
  /**
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.
5023
+ * Type of the smart contract interaction.
2750
5024
  */
2751
- withMax?: boolean | null;
5025
+ type?: 'function' | 'event' | null;
2752
5026
  }
2753
5027
 
2754
5028
  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
5029
  /**
2768
- * Time range applied to the rule.
5030
+ * Object containing details of the amount multiplier from the event.
2769
5031
  */
2770
- export interface CustomRange {
2771
- /**
2772
- * End time of the custom range.
2773
- */
2774
- endsAt?: string | null;
2775
-
5032
+ export interface AmountMultiplier {
2776
5033
  /**
2777
- * Start time of the custom range.
5034
+ * Mapping of the value for the smart contract.
2778
5035
  */
2779
- startsAt?: string | null;
5036
+ valueMapping?: string | null;
2780
5037
  }
2781
5038
 
2782
5039
  export interface Param {
@@ -2820,6 +5077,33 @@ export namespace RuleCreateParams {
2820
5077
  */
2821
5078
  streakMilestone: number;
2822
5079
  }
5080
+
5081
+ /**
5082
+ * Metadata for swap loyalty rules
5083
+ */
5084
+ export interface Swap {
5085
+ provider?: 'any' | 'relay' | 'lifi';
5086
+
5087
+ relayReferrerId?: string;
5088
+
5089
+ requireCrossChainSwap?: boolean;
5090
+
5091
+ swappedToChain?: 'any' | number | string;
5092
+
5093
+ swappedToTokens?: Array<Swap.SwappedToToken>;
5094
+
5095
+ tokenMode?: 'any' | 'specific';
5096
+
5097
+ trackTokenAmount?: boolean;
5098
+ }
5099
+
5100
+ export namespace Swap {
5101
+ export interface SwappedToToken {
5102
+ address: string;
5103
+
5104
+ chainId: string;
5105
+ }
5106
+ }
2823
5107
  }
2824
5108
 
2825
5109
  export interface Collection {
@@ -2832,13 +5116,17 @@ export namespace RuleCreateParams {
2832
5116
  * Blockchain network for the collection
2833
5117
  */
2834
5118
  network:
5119
+ | 'abstract'
5120
+ | 'abstractTestnet'
2835
5121
  | 'apechain'
2836
5122
  | 'arbitrum'
2837
5123
  | 'avalanche'
2838
5124
  | 'avalancheFuji'
2839
5125
  | 'base'
2840
5126
  | 'baseSepolia'
5127
+ | 'berachain'
2841
5128
  | 'berachainArtio'
5129
+ | 'berachainBepolia'
2842
5130
  | 'binance'
2843
5131
  | 'bscTestnet'
2844
5132
  | 'campTestnet'
@@ -2846,18 +5134,30 @@ export namespace RuleCreateParams {
2846
5134
  | 'fantomTestnet'
2847
5135
  | 'flowMainnet'
2848
5136
  | 'mainnet'
5137
+ | 'nexusTestnet'
2849
5138
  | 'optimism'
2850
5139
  | 'polygon'
2851
5140
  | 'polygon_mumbai'
2852
5141
  | 'skaleNebula'
5142
+ | 'skaleEuropa'
5143
+ | 'skaleCalypso'
2853
5144
  | 'solana'
2854
5145
  | 'sophon'
5146
+ | 'sophonTestnet'
2855
5147
  | 'sui'
2856
5148
  | 'superseed'
2857
5149
  | 'superseedSepolia'
2858
5150
  | 'vanar'
2859
5151
  | 'xai'
2860
5152
  | 'zksync'
5153
+ | 'coti'
5154
+ | 'cotiTestnet'
5155
+ | 'morph'
5156
+ | 'morphTestnet'
5157
+ | 'morphHolesky'
5158
+ | 'ultra'
5159
+ | 'ultraTestnet'
5160
+ | 'nitrograph'
2861
5161
  | 'sepolia'
2862
5162
  | 'optimism_sepolia'
2863
5163
  | 'arbitrumSepolia'
@@ -2865,7 +5165,16 @@ export namespace RuleCreateParams {
2865
5165
  | 'optimism_goerli'
2866
5166
  | 'arbitrumGoerli'
2867
5167
  | 'basecamp'
2868
- | 'abstract';
5168
+ | 'somnia'
5169
+ | 'zkverify'
5170
+ | 'polkadot'
5171
+ | 'kusama'
5172
+ | 'flow_cadence';
5173
+
5174
+ /**
5175
+ * Symbol of the collection.
5176
+ */
5177
+ symbol?: string;
2869
5178
  }
2870
5179
  }
2871
5180
 
@@ -2885,10 +5194,15 @@ export interface RuleUpdateParams {
2885
5194
  */
2886
5195
  name: string;
2887
5196
 
5197
+ /**
5198
+ * The type of claim for the reward
5199
+ */
5200
+ claimType?: 'manual' | 'auto' | null;
5201
+
2888
5202
  /**
2889
5203
  * Blockchain address of the associated collection
2890
5204
  */
2891
- collectionAddress?: string;
5205
+ collectionAddress?: string | null;
2892
5206
 
2893
5207
  /**
2894
5208
  * List of associated collections
@@ -2920,11 +5234,21 @@ export interface RuleUpdateParams {
2920
5234
  */
2921
5235
  effectiveStartTime?: string | null;
2922
5236
 
5237
+ /**
5238
+ * ID of the external integration
5239
+ */
5240
+ externalIntegrationId?: string | null;
5241
+
2923
5242
  /**
2924
5243
  * Frequency of the rule execution
2925
5244
  */
2926
5245
  frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
2927
5246
 
5247
+ /**
5248
+ * Optional stratus function id for the rule
5249
+ */
5250
+ functionId?: string | null;
5251
+
2928
5252
  /**
2929
5253
  * Whether to hide this rule in the user interface
2930
5254
  */
@@ -2933,17 +5257,29 @@ export interface RuleUpdateParams {
2933
5257
  /**
2934
5258
  * Time interval for recurring rule execution
2935
5259
  */
2936
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
5260
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
2937
5261
 
2938
5262
  /**
2939
5263
  * Whether this rule is required for participation
2940
5264
  */
2941
- isRequired?: boolean;
5265
+ isRequired?: boolean;
5266
+
5267
+ /**
5268
+ * ID of the rule group section to associate with the rule
5269
+ */
5270
+ loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
5271
+
5272
+ /**
5273
+ * The interval for the max amount. Available for the smart contract and external
5274
+ * rules.
5275
+ */
5276
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
2942
5277
 
2943
5278
  /**
2944
- * ID of the rule group section to associate with the rule
5279
+ * The maximum amount of points a user can earn per interval. Available for the
5280
+ * smart contract and external rules.
2945
5281
  */
2946
- loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
5282
+ maxAmountPerInterval?: number | null;
2947
5283
 
2948
5284
  /**
2949
5285
  * URL of the media to be displayed
@@ -2959,13 +5295,17 @@ export interface RuleUpdateParams {
2959
5295
  * Blockchain network where the rule will apply
2960
5296
  */
2961
5297
  network?:
5298
+ | 'abstract'
5299
+ | 'abstractTestnet'
2962
5300
  | 'apechain'
2963
5301
  | 'arbitrum'
2964
5302
  | 'avalanche'
2965
5303
  | 'avalancheFuji'
2966
5304
  | 'base'
2967
5305
  | 'baseSepolia'
5306
+ | 'berachain'
2968
5307
  | 'berachainArtio'
5308
+ | 'berachainBepolia'
2969
5309
  | 'binance'
2970
5310
  | 'bscTestnet'
2971
5311
  | 'campTestnet'
@@ -2973,18 +5313,30 @@ export interface RuleUpdateParams {
2973
5313
  | 'fantomTestnet'
2974
5314
  | 'flowMainnet'
2975
5315
  | 'mainnet'
5316
+ | 'nexusTestnet'
2976
5317
  | 'optimism'
2977
5318
  | 'polygon'
2978
5319
  | 'polygon_mumbai'
2979
5320
  | 'skaleNebula'
5321
+ | 'skaleEuropa'
5322
+ | 'skaleCalypso'
2980
5323
  | 'solana'
2981
5324
  | 'sophon'
5325
+ | 'sophonTestnet'
2982
5326
  | 'sui'
2983
5327
  | 'superseed'
2984
5328
  | 'superseedSepolia'
2985
5329
  | 'vanar'
2986
5330
  | 'xai'
2987
5331
  | 'zksync'
5332
+ | 'coti'
5333
+ | 'cotiTestnet'
5334
+ | 'morph'
5335
+ | 'morphTestnet'
5336
+ | 'morphHolesky'
5337
+ | 'ultra'
5338
+ | 'ultraTestnet'
5339
+ | 'nitrograph'
2988
5340
  | 'sepolia'
2989
5341
  | 'optimism_sepolia'
2990
5342
  | 'arbitrumSepolia'
@@ -2992,17 +5344,36 @@ export interface RuleUpdateParams {
2992
5344
  | 'optimism_goerli'
2993
5345
  | 'arbitrumGoerli'
2994
5346
  | 'basecamp'
2995
- | 'abstract';
5347
+ | 'somnia'
5348
+ | 'zkverify'
5349
+ | 'polkadot'
5350
+ | 'kusama'
5351
+ | 'flow_cadence';
2996
5352
 
2997
5353
  /**
2998
5354
  * ID for associated OAuth credentials
2999
5355
  */
3000
5356
  oauthCredentialsId?: string | null;
3001
5357
 
5358
+ /**
5359
+ * The lifetime of the reward
5360
+ */
5361
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
5362
+
3002
5363
  /**
3003
5364
  * Type of reward issued by this rule
3004
5365
  */
3005
- rewardType?: 'points' | 'multiplier';
5366
+ rewardType?: 'points' | 'multiplier' | 'badge';
5367
+
5368
+ /**
5369
+ * URL of the Shopify store
5370
+ */
5371
+ shopifyStoreUrl?: string | null;
5372
+
5373
+ /**
5374
+ * Whether to show this rule before the start time
5375
+ */
5376
+ showBeforeStart?: boolean;
3006
5377
 
3007
5378
  /**
3008
5379
  * Start time for the loyalty rule
@@ -3010,9 +5381,9 @@ export interface RuleUpdateParams {
3010
5381
  startTime?: string | null;
3011
5382
 
3012
5383
  /**
3013
- * Optional subscription identifier for the rule
5384
+ * Optional stratus subscription id for the rule
3014
5385
  */
3015
- subscriptionIdentifier?: string | null;
5386
+ subscriptionId?: string | null;
3016
5387
  }
3017
5388
 
3018
5389
  export namespace RuleUpdateParams {
@@ -3026,13 +5397,17 @@ export namespace RuleUpdateParams {
3026
5397
  * Blockchain network for the collection
3027
5398
  */
3028
5399
  network:
5400
+ | 'abstract'
5401
+ | 'abstractTestnet'
3029
5402
  | 'apechain'
3030
5403
  | 'arbitrum'
3031
5404
  | 'avalanche'
3032
5405
  | 'avalancheFuji'
3033
5406
  | 'base'
3034
5407
  | 'baseSepolia'
5408
+ | 'berachain'
3035
5409
  | 'berachainArtio'
5410
+ | 'berachainBepolia'
3036
5411
  | 'binance'
3037
5412
  | 'bscTestnet'
3038
5413
  | 'campTestnet'
@@ -3040,18 +5415,30 @@ export namespace RuleUpdateParams {
3040
5415
  | 'fantomTestnet'
3041
5416
  | 'flowMainnet'
3042
5417
  | 'mainnet'
5418
+ | 'nexusTestnet'
3043
5419
  | 'optimism'
3044
5420
  | 'polygon'
3045
5421
  | 'polygon_mumbai'
3046
5422
  | 'skaleNebula'
5423
+ | 'skaleEuropa'
5424
+ | 'skaleCalypso'
3047
5425
  | 'solana'
3048
5426
  | 'sophon'
5427
+ | 'sophonTestnet'
3049
5428
  | 'sui'
3050
5429
  | 'superseed'
3051
5430
  | 'superseedSepolia'
3052
5431
  | 'vanar'
3053
5432
  | 'xai'
3054
5433
  | 'zksync'
5434
+ | 'coti'
5435
+ | 'cotiTestnet'
5436
+ | 'morph'
5437
+ | 'morphTestnet'
5438
+ | 'morphHolesky'
5439
+ | 'ultra'
5440
+ | 'ultraTestnet'
5441
+ | 'nitrograph'
3055
5442
  | 'sepolia'
3056
5443
  | 'optimism_sepolia'
3057
5444
  | 'arbitrumSepolia'
@@ -3059,13 +5446,27 @@ export namespace RuleUpdateParams {
3059
5446
  | 'optimism_goerli'
3060
5447
  | 'arbitrumGoerli'
3061
5448
  | 'basecamp'
3062
- | 'abstract';
5449
+ | 'somnia'
5450
+ | 'zkverify'
5451
+ | 'polkadot'
5452
+ | 'kusama'
5453
+ | 'flow_cadence';
5454
+
5455
+ /**
5456
+ * Symbol of the collection.
5457
+ */
5458
+ symbol?: string;
3063
5459
  }
3064
5460
 
3065
5461
  /**
3066
5462
  * Additional metadata for the loyalty rule
3067
5463
  */
3068
5464
  export interface Metadata {
5465
+ /**
5466
+ * Number of tokens per batch.
5467
+ */
5468
+ batchSize?: number | null;
5469
+
3069
5470
  /**
3070
5471
  * Text displayed on the action button.
3071
5472
  */
@@ -3089,7 +5490,7 @@ export namespace RuleUpdateParams {
3089
5490
  /**
3090
5491
  * Text to check in the Twitter post, username, or bio.
3091
5492
  */
3092
- checkText?: string | null;
5493
+ checkText?: string | Array<string> | null;
3093
5494
 
3094
5495
  /**
3095
5496
  * Array of collections associated with the rule.
@@ -3099,7 +5500,12 @@ export namespace RuleUpdateParams {
3099
5500
  /**
3100
5501
  * Conditions for completing the profile.
3101
5502
  */
3102
- completeProfileConditions?: Record<string, boolean> | null;
5503
+ completeProfileConditions?: { [key: string]: boolean } | null;
5504
+
5505
+ /**
5506
+ * Description of the external rule condition (only for external rules)
5507
+ */
5508
+ conditionDescription?: string;
3103
5509
 
3104
5510
  /**
3105
5511
  * Object containing details for the call-to-action.
@@ -3111,6 +5517,11 @@ export namespace RuleUpdateParams {
3111
5517
  */
3112
5518
  customRewardsApiKey?: string;
3113
5519
 
5520
+ /**
5521
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
5522
+ */
5523
+ directRpc?: boolean;
5524
+
3114
5525
  /**
3115
5526
  * Array of Discord servers, channels, and roles to join.
3116
5527
  */
@@ -3136,6 +5547,11 @@ export namespace RuleUpdateParams {
3136
5547
  */
3137
5548
  enableVerifiedMultiplier?: boolean;
3138
5549
 
5550
+ /**
5551
+ * Type of ERC20 token for the loyalty rule.
5552
+ */
5553
+ erc20Type?: 'erc20' | 'native';
5554
+
3139
5555
  /**
3140
5556
  * Fill source of the order for the token sale
3141
5557
  */
@@ -3146,6 +5562,11 @@ export namespace RuleUpdateParams {
3146
5562
  */
3147
5563
  firstReferralReward?: number | null;
3148
5564
 
5565
+ /**
5566
+ * URL of the GitHub repository to check for star.
5567
+ */
5568
+ githubRepoUrl?: string | null;
5569
+
3149
5570
  /**
3150
5571
  * Flag indicating whether the fill source is included.
3151
5572
  */
@@ -3156,11 +5577,6 @@ export namespace RuleUpdateParams {
3156
5577
  */
3157
5578
  hasNeverSold?: boolean;
3158
5579
 
3159
- /**
3160
- * Flag indicating whether the order source is included.
3161
- */
3162
- hasOrderSource?: boolean;
3163
-
3164
5580
  /**
3165
5581
  * Indicates if the full royalty has been paid for items.
3166
5582
  */
@@ -3181,11 +5597,21 @@ export namespace RuleUpdateParams {
3181
5597
  */
3182
5598
  imageUrl?: string | null;
3183
5599
 
5600
+ /**
5601
+ * If enabled, the first transaction done on the platform will complete this rule
5602
+ */
5603
+ isCheckInOnEveryTxn?: boolean;
5604
+
3184
5605
  /**
3185
5606
  * Indicates if the multiplier has been applied to rewards.
3186
5607
  */
3187
5608
  isMultiplierApplied?: boolean;
3188
5609
 
5610
+ /**
5611
+ * Flag indicating if the rule is restricted to new users.
5612
+ */
5613
+ isRestrictedToNewUsers?: boolean;
5614
+
3189
5615
  /**
3190
5616
  * Flag indicating if rewards are applied retroactively.
3191
5617
  */
@@ -3201,6 +5627,11 @@ export namespace RuleUpdateParams {
3201
5627
  */
3202
5628
  link?: string | null;
3203
5629
 
5630
+ /**
5631
+ * Liquidity pool details.
5632
+ */
5633
+ liquidity?: Metadata.Liquidity;
5634
+
3204
5635
  /**
3205
5636
  * Maximum quantity constraint for token holding.
3206
5637
  */
@@ -3242,14 +5673,24 @@ export namespace RuleUpdateParams {
3242
5673
  onlyRewardSingleTokenOwnership?: boolean | null;
3243
5674
 
3244
5675
  /**
3245
- * Order source of the order for the token sale
5676
+ * Promotional code associated with the rule.
3246
5677
  */
3247
- orderSource?: string;
5678
+ promoCode?: string;
3248
5679
 
3249
5680
  /**
3250
- * Promotional code associated with the rule.
5681
+ * URL of the CSV file containing promo codes.
3251
5682
  */
3252
- promoCode?: string;
5683
+ promoCodeCsvUrl?: string;
5684
+
5685
+ /**
5686
+ * Numbers of the promotional code to be generated.
5687
+ */
5688
+ promoCodeLength?: number | null;
5689
+
5690
+ /**
5691
+ * Type of the promotional code.
5692
+ */
5693
+ promoCodeType?: 'code' | 'csv' | 'generate';
3253
5694
 
3254
5695
  /**
3255
5696
  * Array defining ranges and corresponding rewards.
@@ -3266,11 +5707,62 @@ export namespace RuleUpdateParams {
3266
5707
  */
3267
5708
  referrerReward?: number | null;
3268
5709
 
5710
+ /**
5711
+ * Loyalty currency ID of the referrer reward.
5712
+ */
5713
+ referrerRewardLoyaltyCurrencyId?: string | null;
5714
+
5715
+ /**
5716
+ * Flag indicating if the post link is required.
5717
+ */
5718
+ requirePostLink?: boolean | null;
5719
+
5720
+ /**
5721
+ * Flag indicating if media metadata is required.
5722
+ */
5723
+ requirePostMediaLink?: boolean | null;
5724
+
5725
+ /**
5726
+ * Flag indicating if the rule can also reward badges per range.
5727
+ */
5728
+ rewardBadgePerRange?: boolean;
5729
+
5730
+ /**
5731
+ * Flag indicating if the reward is rewarded by batch.
5732
+ */
5733
+ rewardByBatch?: boolean | null;
5734
+
5735
+ /**
5736
+ * Criteria to evaluate the reward.
5737
+ */
5738
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
5739
+
5740
+ /**
5741
+ * Flag indicating if the reward is rewarded per action.
5742
+ */
5743
+ rewardPerAction?: boolean | null;
5744
+
3269
5745
  /**
3270
5746
  * Flag indicating if rewards are given per impression.
3271
5747
  */
3272
5748
  rewardPerImpression?: boolean | null;
3273
5749
 
5750
+ /**
5751
+ * Flag indicating if the rule should reward based on value of traded tokens
5752
+ * instead of count.
5753
+ */
5754
+ rewardPerValue?: boolean;
5755
+
5756
+ /**
5757
+ * Wallet address of the user can only be used if userId is not provided
5758
+ */
5759
+ royaltyAddress?: string;
5760
+
5761
+ /**
5762
+ * Royalty percentage of the item.
5763
+ */
5764
+ royaltyPercentage?: number;
5765
+
3274
5766
  /**
3275
5767
  * Currency associated with sales.
3276
5768
  */
@@ -3310,6 +5802,8 @@ export namespace RuleUpdateParams {
3310
5802
  | 'Twitch'
3311
5803
  | 'X(Twitter)'
3312
5804
  | 'YouTube'
5805
+ | 'Google'
5806
+ | 'GitHub'
3313
5807
  | null;
3314
5808
 
3315
5809
  /**
@@ -3322,11 +5816,21 @@ export namespace RuleUpdateParams {
3322
5816
  */
3323
5817
  socialPlatformName?: string | null;
3324
5818
 
5819
+ /**
5820
+ * ID of the Steam app.
5821
+ */
5822
+ steamAppId?: string | null;
5823
+
3325
5824
  /**
3326
5825
  * Array of streak milestones and corresponding rewards.
3327
5826
  */
3328
5827
  streakArray?: Array<Metadata.StreakArray> | null;
3329
5828
 
5829
+ /**
5830
+ * Metadata for swap loyalty rules
5831
+ */
5832
+ swap?: Metadata.Swap;
5833
+
3330
5834
  /**
3331
5835
  * ID of the Telegram channel.
3332
5836
  */
@@ -3342,6 +5846,12 @@ export namespace RuleUpdateParams {
3342
5846
  */
3343
5847
  trackAllContracts?: boolean | null;
3344
5848
 
5849
+ /**
5850
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
5851
+ * completed once the progress is 100%.
5852
+ */
5853
+ trackProgress?: boolean | null;
5854
+
3345
5855
  /**
3346
5856
  * URL of the associated Twitter account.
3347
5857
  */
@@ -3385,7 +5895,28 @@ export namespace RuleUpdateParams {
3385
5895
  /**
3386
5896
  * Type of wallet associated with the rule.
3387
5897
  */
3388
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
5898
+ walletType?:
5899
+ | 'evm'
5900
+ | 'solana'
5901
+ | 'imx'
5902
+ | 'sui'
5903
+ | 'ton'
5904
+ | 'cosmos'
5905
+ | 'ultra'
5906
+ | 'agw'
5907
+ | 'flow_cadence'
5908
+ | 'substrate'
5909
+ | null;
5910
+
5911
+ /**
5912
+ * ID of the Youtube channel.
5913
+ */
5914
+ youtubeChannelId?: string | null;
5915
+
5916
+ /**
5917
+ * ID of the Youtube video.
5918
+ */
5919
+ youtubeVideoId?: string | null;
3389
5920
  }
3390
5921
 
3391
5922
  export namespace Metadata {
@@ -3404,13 +5935,17 @@ export namespace RuleUpdateParams {
3404
5935
  * Blockchain network of the collection.
3405
5936
  */
3406
5937
  network?:
5938
+ | 'abstract'
5939
+ | 'abstractTestnet'
3407
5940
  | 'apechain'
3408
5941
  | 'arbitrum'
3409
5942
  | 'avalanche'
3410
5943
  | 'avalancheFuji'
3411
5944
  | 'base'
3412
5945
  | 'baseSepolia'
5946
+ | 'berachain'
3413
5947
  | 'berachainArtio'
5948
+ | 'berachainBepolia'
3414
5949
  | 'binance'
3415
5950
  | 'bscTestnet'
3416
5951
  | 'campTestnet'
@@ -3418,18 +5953,30 @@ export namespace RuleUpdateParams {
3418
5953
  | 'fantomTestnet'
3419
5954
  | 'flowMainnet'
3420
5955
  | 'mainnet'
5956
+ | 'nexusTestnet'
3421
5957
  | 'optimism'
3422
5958
  | 'polygon'
3423
5959
  | 'polygon_mumbai'
3424
5960
  | 'skaleNebula'
5961
+ | 'skaleEuropa'
5962
+ | 'skaleCalypso'
3425
5963
  | 'solana'
3426
5964
  | 'sophon'
5965
+ | 'sophonTestnet'
3427
5966
  | 'sui'
3428
5967
  | 'superseed'
3429
5968
  | 'superseedSepolia'
3430
5969
  | 'vanar'
3431
5970
  | 'xai'
3432
5971
  | 'zksync'
5972
+ | 'coti'
5973
+ | 'cotiTestnet'
5974
+ | 'morph'
5975
+ | 'morphTestnet'
5976
+ | 'morphHolesky'
5977
+ | 'ultra'
5978
+ | 'ultraTestnet'
5979
+ | 'nitrograph'
3433
5980
  | 'sepolia'
3434
5981
  | 'optimism_sepolia'
3435
5982
  | 'arbitrumSepolia'
@@ -3437,7 +5984,11 @@ export namespace RuleUpdateParams {
3437
5984
  | 'optimism_goerli'
3438
5985
  | 'arbitrumGoerli'
3439
5986
  | 'basecamp'
3440
- | 'abstract';
5987
+ | 'somnia'
5988
+ | 'zkverify'
5989
+ | 'polkadot'
5990
+ | 'kusama'
5991
+ | 'flow_cadence';
3441
5992
  }
3442
5993
 
3443
5994
  /**
@@ -3514,6 +6065,111 @@ export namespace RuleUpdateParams {
3514
6065
  id: string;
3515
6066
  }
3516
6067
 
6068
+ /**
6069
+ * Liquidity pool details.
6070
+ */
6071
+ export interface Liquidity {
6072
+ /**
6073
+ * Calculation type of the liquidity pool.
6074
+ */
6075
+ calculationType?: 'fixed' | 'custom';
6076
+
6077
+ /**
6078
+ * Custom function to calculate the the reward amount based on the liquidity
6079
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
6080
+ * USD.
6081
+ */
6082
+ customFunction?: string;
6083
+
6084
+ /**
6085
+ * Liquidity provided per day in USD
6086
+ */
6087
+ liquidityPerDay?: number;
6088
+
6089
+ /**
6090
+ * Blockchain network of the liquidity pool.
6091
+ */
6092
+ network?:
6093
+ | 'abstract'
6094
+ | 'abstractTestnet'
6095
+ | 'apechain'
6096
+ | 'arbitrum'
6097
+ | 'avalanche'
6098
+ | 'avalancheFuji'
6099
+ | 'base'
6100
+ | 'baseSepolia'
6101
+ | 'berachain'
6102
+ | 'berachainArtio'
6103
+ | 'berachainBepolia'
6104
+ | 'binance'
6105
+ | 'bscTestnet'
6106
+ | 'campTestnet'
6107
+ | 'fantom'
6108
+ | 'fantomTestnet'
6109
+ | 'flowMainnet'
6110
+ | 'mainnet'
6111
+ | 'nexusTestnet'
6112
+ | 'optimism'
6113
+ | 'polygon'
6114
+ | 'polygon_mumbai'
6115
+ | 'skaleNebula'
6116
+ | 'skaleEuropa'
6117
+ | 'skaleCalypso'
6118
+ | 'solana'
6119
+ | 'sophon'
6120
+ | 'sophonTestnet'
6121
+ | 'sui'
6122
+ | 'superseed'
6123
+ | 'superseedSepolia'
6124
+ | 'vanar'
6125
+ | 'xai'
6126
+ | 'zksync'
6127
+ | 'coti'
6128
+ | 'cotiTestnet'
6129
+ | 'morph'
6130
+ | 'morphTestnet'
6131
+ | 'morphHolesky'
6132
+ | 'ultra'
6133
+ | 'ultraTestnet'
6134
+ | 'nitrograph'
6135
+ | 'sepolia'
6136
+ | 'optimism_sepolia'
6137
+ | 'arbitrumSepolia'
6138
+ | 'goerli'
6139
+ | 'optimism_goerli'
6140
+ | 'arbitrumGoerli'
6141
+ | 'basecamp'
6142
+ | 'somnia'
6143
+ | 'zkverify'
6144
+ | 'polkadot'
6145
+ | 'kusama'
6146
+ | 'flow_cadence';
6147
+
6148
+ /**
6149
+ * Indicates if only in-range liquidity is rewarded.
6150
+ */
6151
+ onlyRewardInRangeLiquidity?: boolean;
6152
+
6153
+ /**
6154
+ * Array of liquidity pools associated with the rule.
6155
+ */
6156
+ pools?: Array<Liquidity.Pool>;
6157
+
6158
+ /**
6159
+ * Protocol of the liquidity pool.
6160
+ */
6161
+ protocol?: string;
6162
+ }
6163
+
6164
+ export namespace Liquidity {
6165
+ export interface Pool {
6166
+ /**
6167
+ * Unique identifier of the liquidity pool.
6168
+ */
6169
+ id: string;
6170
+ }
6171
+ }
6172
+
3517
6173
  export interface Range {
3518
6174
  /**
3519
6175
  * Reward amount for this range.
@@ -3529,6 +6185,16 @@ export namespace RuleUpdateParams {
3529
6185
  * Start value of the range.
3530
6186
  */
3531
6187
  startRange: number;
6188
+
6189
+ /**
6190
+ * ID of the loyalty badge for this range.
6191
+ */
6192
+ loyaltyBadgeId?: string;
6193
+
6194
+ /**
6195
+ * Amount of the loyalty multiplier for this range.
6196
+ */
6197
+ loyaltyMultiplierAmount?: number;
3532
6198
  }
3533
6199
 
3534
6200
  /**
@@ -3581,20 +6247,15 @@ export namespace RuleUpdateParams {
3581
6247
  * Object containing details of the associated smart contract.
3582
6248
  */
3583
6249
  export interface SmartContract {
3584
- /**
3585
- * ABI of the smart contract.
3586
- */
3587
- abi?: string | null;
3588
-
3589
6250
  /**
3590
6251
  * Mapping of addresses for the smart contract.
3591
6252
  */
3592
6253
  addressMapping?: string | null;
3593
6254
 
3594
6255
  /**
3595
- * Array of bonus details applied to the rule.
6256
+ * Object containing details of the amount multiplier from the event.
3596
6257
  */
3597
- bonus?: Array<SmartContract.Bonus> | null;
6258
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3598
6259
 
3599
6260
  /**
3600
6261
  * ID of the smart contract.
@@ -3606,68 +6267,31 @@ export namespace RuleUpdateParams {
3606
6267
  */
3607
6268
  criteria?: 'everyEvent' | 'byParameter' | null;
3608
6269
 
3609
- /**
3610
- * Time range applied to the rule.
3611
- */
3612
- customRange?: SmartContract.CustomRange | null;
3613
-
3614
6270
  /**
3615
6271
  * Event emitted by the smart contract.
3616
6272
  */
3617
6273
  event?: string | null;
3618
6274
 
3619
- /**
3620
- * Maximum value allowed for the parameter.
3621
- */
3622
- max?: number | null;
3623
-
3624
6275
  /**
3625
6276
  * Array of parameters for the smart contract.
3626
6277
  */
3627
6278
  params?: Array<SmartContract.Param> | null;
3628
6279
 
3629
6280
  /**
3630
- * Flag indicating if a bonus is applied.
3631
- */
3632
- withBonus?: boolean | null;
3633
-
3634
- /**
3635
- * Flag indicating if a custom range is applied.
3636
- */
3637
- withCustomRange?: boolean | null;
3638
-
3639
- /**
3640
- * Flag indicating if a maximum limit is applied.
6281
+ * Type of the smart contract interaction.
3641
6282
  */
3642
- withMax?: boolean | null;
6283
+ type?: 'function' | 'event' | null;
3643
6284
  }
3644
6285
 
3645
6286
  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
6287
  /**
3659
- * Time range applied to the rule.
6288
+ * Object containing details of the amount multiplier from the event.
3660
6289
  */
3661
- export interface CustomRange {
3662
- /**
3663
- * End time of the custom range.
3664
- */
3665
- endsAt?: string | null;
3666
-
6290
+ export interface AmountMultiplier {
3667
6291
  /**
3668
- * Start time of the custom range.
6292
+ * Mapping of the value for the smart contract.
3669
6293
  */
3670
- startsAt?: string | null;
6294
+ valueMapping?: string | null;
3671
6295
  }
3672
6296
 
3673
6297
  export interface Param {
@@ -3711,17 +6335,71 @@ export namespace RuleUpdateParams {
3711
6335
  */
3712
6336
  streakMilestone: number;
3713
6337
  }
6338
+
6339
+ /**
6340
+ * Metadata for swap loyalty rules
6341
+ */
6342
+ export interface Swap {
6343
+ provider?: 'any' | 'relay' | 'lifi';
6344
+
6345
+ relayReferrerId?: string;
6346
+
6347
+ requireCrossChainSwap?: boolean;
6348
+
6349
+ swappedToChain?: 'any' | number | string;
6350
+
6351
+ swappedToTokens?: Array<Swap.SwappedToToken>;
6352
+
6353
+ tokenMode?: 'any' | 'specific';
6354
+
6355
+ trackTokenAmount?: boolean;
6356
+ }
6357
+
6358
+ export namespace Swap {
6359
+ export interface SwappedToToken {
6360
+ address: string;
6361
+
6362
+ chainId: string;
6363
+ }
6364
+ }
3714
6365
  }
3715
6366
  }
3716
6367
 
3717
6368
  export interface RuleListParams {
6369
+ /**
6370
+ * IDs of the users to filter results by
6371
+ */
6372
+ allotedToUserId?: string | Array<string>;
6373
+
6374
+ /**
6375
+ * ID of the user group to filter results by
6376
+ */
6377
+ allotedUserGroupId?: string;
6378
+
3718
6379
  /**
3719
6380
  * Address of the collection to filter by
3720
6381
  */
3721
6382
  collectionAddress?: string;
3722
6383
 
3723
6384
  /**
3724
- * Maximum number of records to return (max 1000)
6385
+ * Whether to include deleted/archived records
6386
+ */
6387
+ includeDeleted?: boolean | null;
6388
+
6389
+ /**
6390
+ * If true this will only return active rules, the rules for which the startTime is
6391
+ * in the past and the endTime is in the future
6392
+ */
6393
+ isActive?: 'true' | 'false';
6394
+
6395
+ /**
6396
+ * If true this will only return special rules, special rules are the rules that
6397
+ * are used for anti sybil as honey pot
6398
+ */
6399
+ isSpecial?: 'true' | 'false';
6400
+
6401
+ /**
6402
+ * Maximum number of records to return (max 100)
3725
6403
  */
3726
6404
  limit?: number;
3727
6405
 
@@ -3751,6 +6429,13 @@ export interface RuleListParams {
3751
6429
  websiteId?: string;
3752
6430
  }
3753
6431
 
6432
+ export interface RuleDeleteParams {
6433
+ /**
6434
+ * Whether to debit loyalty points
6435
+ */
6436
+ debitLoyaltyPoints?: string;
6437
+ }
6438
+
3754
6439
  export interface RuleCompleteParams {
3755
6440
  /**
3756
6441
  * Override amount for the reward (rounded to nearest whole number). This will
@@ -3759,15 +6444,30 @@ export interface RuleCompleteParams {
3759
6444
  amount?: number | null;
3760
6445
 
3761
6446
  /**
3762
- * Link to the comment made by user
6447
+ * Link to the post/comment made by user
6448
+ */
6449
+ contentUrl?: string;
6450
+
6451
+ /**
6452
+ * Unique key to ensure idempotent requests.
3763
6453
  */
3764
- commentLink?: string;
6454
+ idempotencyKey?: string;
3765
6455
 
3766
6456
  /**
3767
6457
  * ID of the choice selected by the user
3768
6458
  */
3769
6459
  loyaltyQuestionChoiceId?: string;
3770
6460
 
6461
+ /**
6462
+ * Value to compare with the range
6463
+ */
6464
+ rangeValue?: number | null;
6465
+
6466
+ /**
6467
+ * Flag indicating if the chain or required check should be skipped.
6468
+ */
6469
+ skipChainOrRequiredCheck?: boolean;
6470
+
3771
6471
  /**
3772
6472
  * Unique identifier for the user
3773
6473
  */
@@ -3780,7 +6480,7 @@ export interface RuleCompleteParams {
3780
6480
 
3781
6481
  /**
3782
6482
  * Flag indicating if only verification is required, this will not create a
3783
- * transaction and reward the user
6483
+ * transaction and reward the user.
3784
6484
  */
3785
6485
  verifyOnly?: string;
3786
6486
 
@@ -3791,11 +6491,30 @@ export interface RuleCompleteParams {
3791
6491
  }
3792
6492
 
3793
6493
  export interface RuleGetStatusParams {
3794
- organizationId: string;
6494
+ /**
6495
+ * Number of items to return
6496
+ */
6497
+ limit?: number | null;
3795
6498
 
3796
- websiteId: string;
6499
+ /**
6500
+ * Unique identifier for the loyalty rule[s]
6501
+ */
6502
+ loyaltyRuleId?: string | Array<string>;
6503
+
6504
+ organizationId?: string;
6505
+
6506
+ /**
6507
+ * Starting after item
6508
+ */
6509
+ startingAfter?: string;
6510
+
6511
+ userGroupId?: string;
3797
6512
 
3798
6513
  userId?: string;
6514
+
6515
+ walletAddress?: string;
6516
+
6517
+ websiteId?: string;
3799
6518
  }
3800
6519
 
3801
6520
  export declare namespace Rules {
@@ -3809,6 +6528,7 @@ export declare namespace Rules {
3809
6528
  type RuleCreateParams as RuleCreateParams,
3810
6529
  type RuleUpdateParams as RuleUpdateParams,
3811
6530
  type RuleListParams as RuleListParams,
6531
+ type RuleDeleteParams as RuleDeleteParams,
3812
6532
  type RuleCompleteParams as RuleCompleteParams,
3813
6533
  type RuleGetStatusParams as RuleGetStatusParams,
3814
6534
  };