@snagsolutions/sdk 0.1.0-alpha.21 → 0.1.0-alpha.210

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 (273) hide show
  1. package/CHANGELOG.md +1703 -0
  2. package/LICENSE +1 -1
  3. package/README.md +15 -23
  4. package/core.d.ts +19 -5
  5. package/core.d.ts.map +1 -1
  6. package/core.js +24 -17
  7. package/core.js.map +1 -1
  8. package/core.mjs +24 -17
  9. package/core.mjs.map +1 -1
  10. package/index.d.mts +7 -4
  11. package/index.d.ts +7 -4
  12. package/index.d.ts.map +1 -1
  13. package/index.js +8 -4
  14. package/index.js.map +1 -1
  15. package/index.mjs +8 -4
  16. package/index.mjs.map +1 -1
  17. package/package.json +4 -5
  18. package/resource.d.ts +1 -1
  19. package/resource.d.ts.map +1 -1
  20. package/resource.js.map +1 -1
  21. package/resource.mjs.map +1 -1
  22. package/resources/assets.d.ts +16 -2
  23. package/resources/assets.d.ts.map +1 -1
  24. package/resources/assets.js +8 -0
  25. package/resources/assets.js.map +1 -1
  26. package/resources/assets.mjs +8 -0
  27. package/resources/assets.mjs.map +1 -1
  28. package/resources/auctions/auctions.d.ts +368 -0
  29. package/resources/auctions/auctions.d.ts.map +1 -0
  30. package/resources/auctions/auctions.js +72 -0
  31. package/resources/auctions/auctions.js.map +1 -0
  32. package/resources/auctions/auctions.mjs +45 -0
  33. package/resources/auctions/auctions.mjs.map +1 -0
  34. package/resources/auctions/index.d.ts +3 -0
  35. package/resources/auctions/index.d.ts.map +1 -0
  36. package/resources/auctions/index.js +9 -0
  37. package/resources/auctions/index.js.map +1 -0
  38. package/resources/auctions/index.mjs +4 -0
  39. package/resources/auctions/index.mjs.map +1 -0
  40. package/resources/auctions/website-user-attributes/index.d.ts +3 -0
  41. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
  42. package/resources/auctions/website-user-attributes/index.js +9 -0
  43. package/resources/auctions/website-user-attributes/index.js.map +1 -0
  44. package/resources/auctions/website-user-attributes/index.mjs +4 -0
  45. package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
  46. package/resources/auctions/website-user-attributes/values.d.ts +126 -0
  47. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  48. package/resources/auctions/website-user-attributes/values.js +49 -0
  49. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  50. package/resources/auctions/website-user-attributes/values.mjs +45 -0
  51. package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
  52. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +136 -0
  53. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
  54. package/resources/auctions/website-user-attributes/website-user-attributes.js +76 -0
  55. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
  56. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +49 -0
  57. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
  58. package/resources/auctions/website-user-attributes.d.ts +2 -0
  59. package/resources/auctions/website-user-attributes.d.ts.map +1 -0
  60. package/resources/auctions/website-user-attributes.js +19 -0
  61. package/resources/auctions/website-user-attributes.js.map +1 -0
  62. package/resources/auctions/website-user-attributes.mjs +3 -0
  63. package/resources/auctions/website-user-attributes.mjs.map +1 -0
  64. package/resources/auctions.d.ts +1 -133
  65. package/resources/auctions.d.ts.map +1 -1
  66. package/resources/auctions.js +15 -22
  67. package/resources/auctions.js.map +1 -1
  68. package/resources/auctions.mjs +1 -20
  69. package/resources/auctions.mjs.map +1 -1
  70. package/resources/auth.d.ts +17 -4
  71. package/resources/auth.d.ts.map +1 -1
  72. package/resources/auth.js.map +1 -1
  73. package/resources/auth.mjs.map +1 -1
  74. package/resources/index.d.ts +2 -2
  75. package/resources/index.d.ts.map +1 -1
  76. package/resources/index.js +1 -1
  77. package/resources/index.js.map +1 -1
  78. package/resources/index.mjs +1 -1
  79. package/resources/index.mjs.map +1 -1
  80. package/resources/loyalty/account-streaks.d.ts +96 -0
  81. package/resources/loyalty/account-streaks.d.ts.map +1 -0
  82. package/resources/loyalty/account-streaks.js +24 -0
  83. package/resources/loyalty/account-streaks.js.map +1 -0
  84. package/resources/loyalty/account-streaks.mjs +20 -0
  85. package/resources/loyalty/account-streaks.mjs.map +1 -0
  86. package/resources/loyalty/accounts.d.ts +60 -16
  87. package/resources/loyalty/accounts.d.ts.map +1 -1
  88. package/resources/loyalty/accounts.js +14 -0
  89. package/resources/loyalty/accounts.js.map +1 -1
  90. package/resources/loyalty/accounts.mjs +14 -0
  91. package/resources/loyalty/accounts.mjs.map +1 -1
  92. package/resources/loyalty/badges.d.ts +666 -135
  93. package/resources/loyalty/badges.d.ts.map +1 -1
  94. package/resources/loyalty/badges.js +19 -1
  95. package/resources/loyalty/badges.js.map +1 -1
  96. package/resources/loyalty/badges.mjs +19 -1
  97. package/resources/loyalty/badges.mjs.map +1 -1
  98. package/resources/loyalty/currencies.d.ts +19 -0
  99. package/resources/loyalty/currencies.d.ts.map +1 -1
  100. package/resources/loyalty/currencies.js +19 -0
  101. package/resources/loyalty/currencies.js.map +1 -1
  102. package/resources/loyalty/currencies.mjs +19 -0
  103. package/resources/loyalty/currencies.mjs.map +1 -1
  104. package/resources/loyalty/index.d.ts +4 -4
  105. package/resources/loyalty/index.d.ts.map +1 -1
  106. package/resources/loyalty/index.js +5 -5
  107. package/resources/loyalty/index.js.map +1 -1
  108. package/resources/loyalty/index.mjs +3 -3
  109. package/resources/loyalty/index.mjs.map +1 -1
  110. package/resources/loyalty/loyalty.d.ts +11 -11
  111. package/resources/loyalty/loyalty.d.ts.map +1 -1
  112. package/resources/loyalty/loyalty.js +6 -6
  113. package/resources/loyalty/loyalty.js.map +1 -1
  114. package/resources/loyalty/loyalty.mjs +7 -7
  115. package/resources/loyalty/loyalty.mjs.map +1 -1
  116. package/resources/loyalty/multipliers.d.ts +39 -2
  117. package/resources/loyalty/multipliers.d.ts.map +1 -1
  118. package/resources/loyalty/multipliers.js +23 -0
  119. package/resources/loyalty/multipliers.js.map +1 -1
  120. package/resources/loyalty/multipliers.mjs +23 -0
  121. package/resources/loyalty/multipliers.mjs.map +1 -1
  122. package/resources/loyalty/questions-responses.d.ts +55 -4
  123. package/resources/loyalty/questions-responses.d.ts.map +1 -1
  124. package/resources/loyalty/questions-responses.js +9 -0
  125. package/resources/loyalty/questions-responses.js.map +1 -1
  126. package/resources/loyalty/questions-responses.mjs +9 -0
  127. package/resources/loyalty/questions-responses.mjs.map +1 -1
  128. package/resources/loyalty/questions.d.ts +60 -6
  129. package/resources/loyalty/questions.d.ts.map +1 -1
  130. package/resources/loyalty/questions.js +39 -0
  131. package/resources/loyalty/questions.js.map +1 -1
  132. package/resources/loyalty/questions.mjs +39 -0
  133. package/resources/loyalty/questions.mjs.map +1 -1
  134. package/resources/loyalty/rule-edits.d.ts +2714 -8
  135. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  136. package/resources/loyalty/rule-edits.js +14 -0
  137. package/resources/loyalty/rule-edits.js.map +1 -1
  138. package/resources/loyalty/rule-edits.mjs +14 -0
  139. package/resources/loyalty/rule-edits.mjs.map +1 -1
  140. package/resources/loyalty/rule-groups.d.ts +300 -64
  141. package/resources/loyalty/rule-groups.d.ts.map +1 -1
  142. package/resources/loyalty/rule-groups.js +38 -2
  143. package/resources/loyalty/rule-groups.js.map +1 -1
  144. package/resources/loyalty/rule-groups.mjs +38 -2
  145. package/resources/loyalty/rule-groups.mjs.map +1 -1
  146. package/resources/loyalty/rules.d.ts +2036 -290
  147. package/resources/loyalty/rules.d.ts.map +1 -1
  148. package/resources/loyalty/rules.js +40 -9
  149. package/resources/loyalty/rules.js.map +1 -1
  150. package/resources/loyalty/rules.mjs +40 -9
  151. package/resources/loyalty/rules.mjs.map +1 -1
  152. package/resources/loyalty/transactions/index.d.ts +3 -0
  153. package/resources/loyalty/transactions/index.d.ts.map +1 -0
  154. package/resources/loyalty/transactions/index.js +9 -0
  155. package/resources/loyalty/transactions/index.js.map +1 -0
  156. package/resources/loyalty/transactions/index.mjs +4 -0
  157. package/resources/loyalty/transactions/index.mjs.map +1 -0
  158. package/resources/loyalty/transactions/rule-statuses.d.ts +120 -0
  159. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  160. package/resources/loyalty/transactions/rule-statuses.js +30 -0
  161. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  162. package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
  163. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  164. package/resources/loyalty/transactions/transactions.d.ts +410 -0
  165. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  166. package/resources/loyalty/transactions/transactions.js +76 -0
  167. package/resources/loyalty/transactions/transactions.js.map +1 -0
  168. package/resources/loyalty/transactions/transactions.mjs +49 -0
  169. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  170. package/resources/loyalty/transactions.d.ts +1 -248
  171. package/resources/loyalty/transactions.d.ts.map +1 -1
  172. package/resources/loyalty/transactions.js +15 -18
  173. package/resources/loyalty/transactions.js.map +1 -1
  174. package/resources/loyalty/transactions.mjs +1 -16
  175. package/resources/loyalty/transactions.mjs.map +1 -1
  176. package/resources/minting.d.ts +5 -5
  177. package/resources/minting.d.ts.map +1 -1
  178. package/resources/referral/referral.d.ts +12 -3
  179. package/resources/referral/referral.d.ts.map +1 -1
  180. package/resources/referral/referral.js +11 -5
  181. package/resources/referral/referral.js.map +1 -1
  182. package/resources/referral/referral.mjs +11 -5
  183. package/resources/referral/referral.mjs.map +1 -1
  184. package/resources/referral/users.d.ts +30 -3
  185. package/resources/referral/users.d.ts.map +1 -1
  186. package/resources/referral/users.js +12 -4
  187. package/resources/referral/users.js.map +1 -1
  188. package/resources/referral/users.mjs +12 -4
  189. package/resources/referral/users.mjs.map +1 -1
  190. package/resources/users/index.d.ts +1 -1
  191. package/resources/users/index.d.ts.map +1 -1
  192. package/resources/users/index.js.map +1 -1
  193. package/resources/users/index.mjs.map +1 -1
  194. package/resources/users/metadatas.d.ts +36 -3
  195. package/resources/users/metadatas.d.ts.map +1 -1
  196. package/resources/users/metadatas.js.map +1 -1
  197. package/resources/users/metadatas.mjs.map +1 -1
  198. package/resources/users/users.d.ts +192 -35
  199. package/resources/users/users.d.ts.map +1 -1
  200. package/resources/users/users.js +58 -1
  201. package/resources/users/users.js.map +1 -1
  202. package/resources/users/users.mjs +58 -1
  203. package/resources/users/users.mjs.map +1 -1
  204. package/resources/websites/website-collections.d.ts +22 -1
  205. package/resources/websites/website-collections.d.ts.map +1 -1
  206. package/resources/websites/website-collections.js +21 -0
  207. package/resources/websites/website-collections.js.map +1 -1
  208. package/resources/websites/website-collections.mjs +21 -0
  209. package/resources/websites/website-collections.mjs.map +1 -1
  210. package/resources/websites/website-user-roles.d.ts +24 -1
  211. package/resources/websites/website-user-roles.d.ts.map +1 -1
  212. package/resources/websites/website-user-roles.js +23 -0
  213. package/resources/websites/website-user-roles.js.map +1 -1
  214. package/resources/websites/website-user-roles.mjs +23 -0
  215. package/resources/websites/website-user-roles.mjs.map +1 -1
  216. package/resources/websites/websites.d.ts +12 -0
  217. package/resources/websites/websites.d.ts.map +1 -1
  218. package/resources/websites/websites.js +7 -0
  219. package/resources/websites/websites.js.map +1 -1
  220. package/resources/websites/websites.mjs +7 -0
  221. package/resources/websites/websites.mjs.map +1 -1
  222. package/src/core.ts +39 -16
  223. package/src/index.ts +31 -2
  224. package/src/resource.ts +1 -1
  225. package/src/resources/assets.ts +18 -3
  226. package/src/resources/auctions/auctions.ts +561 -0
  227. package/src/resources/auctions/index.ts +19 -0
  228. package/src/resources/auctions/website-user-attributes/index.ts +18 -0
  229. package/src/resources/auctions/website-user-attributes/values.ts +170 -0
  230. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +212 -0
  231. package/src/resources/auctions/website-user-attributes.ts +3 -0
  232. package/src/resources/auctions.ts +1 -207
  233. package/src/resources/auth.ts +21 -5
  234. package/src/resources/index.ts +12 -1
  235. package/src/resources/loyalty/account-streaks.ts +128 -0
  236. package/src/resources/loyalty/accounts.ts +65 -18
  237. package/src/resources/loyalty/badges.ts +790 -146
  238. package/src/resources/loyalty/currencies.ts +19 -0
  239. package/src/resources/loyalty/index.ts +19 -3
  240. package/src/resources/loyalty/loyalty.ts +39 -15
  241. package/src/resources/loyalty/multipliers.ts +43 -4
  242. package/src/resources/loyalty/questions-responses.ts +64 -4
  243. package/src/resources/loyalty/questions.ts +64 -6
  244. package/src/resources/loyalty/rule-edits.ts +3942 -100
  245. package/src/resources/loyalty/rule-groups.ts +527 -76
  246. package/src/resources/loyalty/rules.ts +3143 -301
  247. package/src/resources/loyalty/transactions/index.ts +18 -0
  248. package/src/resources/loyalty/transactions/rule-statuses.ts +178 -0
  249. package/src/resources/loyalty/transactions/transactions.ts +699 -0
  250. package/src/resources/loyalty/transactions.ts +1 -440
  251. package/src/resources/minting.ts +25 -5
  252. package/src/resources/referral/referral.ts +15 -11
  253. package/src/resources/referral/users.ts +45 -5
  254. package/src/resources/users/index.ts +4 -0
  255. package/src/resources/users/metadatas.ts +61 -3
  256. package/src/resources/users/users.ts +259 -38
  257. package/src/resources/websites/website-collections.ts +42 -1
  258. package/src/resources/websites/website-user-roles.ts +25 -1
  259. package/src/resources/websites/websites.ts +12 -0
  260. package/src/version.ts +1 -1
  261. package/version.d.ts +1 -1
  262. package/version.d.ts.map +1 -1
  263. package/version.js +1 -1
  264. package/version.js.map +1 -1
  265. package/version.mjs +1 -1
  266. package/version.mjs.map +1 -1
  267. package/resources/loyalty/rule-chains.d.ts +0 -34
  268. package/resources/loyalty/rule-chains.d.ts.map +0 -1
  269. package/resources/loyalty/rule-chains.js +0 -15
  270. package/resources/loyalty/rule-chains.js.map +0 -1
  271. package/resources/loyalty/rule-chains.mjs +0 -11
  272. package/resources/loyalty/rule-chains.mjs.map +0 -1
  273. 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, discord_role_grant
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,29 @@ 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'
288
+ | 'github_repo_fork'
289
+ | 'github_repo_collaborator'
290
+ | 'github_merge_PR'
291
+ | 'discord_role_grant'
292
+ | 'connected_reddit'
293
+ | 'reddit_comment';
193
294
 
194
295
  /**
195
296
  * Unique identifier for the associated website
@@ -201,6 +302,11 @@ export interface RuleCreateResponse {
201
302
  */
202
303
  backgroundAssetUrl?: string;
203
304
 
305
+ /**
306
+ * The type of claim for the reward
307
+ */
308
+ claimType?: 'manual' | 'auto' | null;
309
+
204
310
  /**
205
311
  * Blockchain address of the associated collection
206
312
  */
@@ -226,6 +332,18 @@ export interface RuleCreateResponse {
226
332
  */
227
333
  description?: string;
228
334
 
335
+ duplicatedFromId?: string | null;
336
+
337
+ /**
338
+ * ID of the external integration
339
+ */
340
+ externalIntegrationId?: string | null;
341
+
342
+ /**
343
+ * Optional stratus function id for the rule
344
+ */
345
+ functionId?: string | null;
346
+
229
347
  /**
230
348
  * Whether to hide this rule in the user interface
231
349
  */
@@ -234,18 +352,40 @@ export interface RuleCreateResponse {
234
352
  /**
235
353
  * Interval between rule executions
236
354
  */
237
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
355
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
238
356
 
239
357
  /**
240
358
  * Whether this rule is mandatory
241
359
  */
242
360
  isRequired?: boolean;
243
361
 
362
+ /**
363
+ * Unique identifier for the loyalty badge
364
+ */
365
+ loyaltyBadgeId?: string | null;
366
+
244
367
  /**
245
368
  * Unique identifier for the loyalty rule group
246
369
  */
247
370
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
248
371
 
372
+ /**
373
+ * URL for uploading loyalty user allotment via CSV
374
+ */
375
+ loyaltyUserAllotmentCsvUrl?: string;
376
+
377
+ /**
378
+ * The interval for the max amount. Available for the smart contract and external
379
+ * rules.
380
+ */
381
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
382
+
383
+ /**
384
+ * The maximum amount of points a user can earn per interval. Available for the
385
+ * smart contract and external rules.
386
+ */
387
+ maxAmountPerInterval?: number | null;
388
+
249
389
  /**
250
390
  * URL of the media to be displayed
251
391
  */
@@ -255,13 +395,17 @@ export interface RuleCreateResponse {
255
395
  * Blockchain network where the rule will apply
256
396
  */
257
397
  network?:
398
+ | 'abstract'
399
+ | 'abstractTestnet'
258
400
  | 'apechain'
259
401
  | 'arbitrum'
260
402
  | 'avalanche'
261
403
  | 'avalancheFuji'
262
404
  | 'base'
263
405
  | 'baseSepolia'
406
+ | 'berachain'
264
407
  | 'berachainArtio'
408
+ | 'berachainBepolia'
265
409
  | 'binance'
266
410
  | 'bscTestnet'
267
411
  | 'campTestnet'
@@ -269,18 +413,30 @@ export interface RuleCreateResponse {
269
413
  | 'fantomTestnet'
270
414
  | 'flowMainnet'
271
415
  | 'mainnet'
416
+ | 'nexusTestnet'
272
417
  | 'optimism'
273
418
  | 'polygon'
274
419
  | 'polygon_mumbai'
275
420
  | 'skaleNebula'
421
+ | 'skaleEuropa'
422
+ | 'skaleCalypso'
276
423
  | 'solana'
277
424
  | 'sophon'
425
+ | 'sophonTestnet'
278
426
  | 'sui'
279
427
  | 'superseed'
280
428
  | 'superseedSepolia'
281
429
  | 'vanar'
282
430
  | 'xai'
283
431
  | 'zksync'
432
+ | 'coti'
433
+ | 'cotiTestnet'
434
+ | 'morph'
435
+ | 'morphTestnet'
436
+ | 'morphHolesky'
437
+ | 'ultra'
438
+ | 'ultraTestnet'
439
+ | 'nitrograph'
284
440
  | 'sepolia'
285
441
  | 'optimism_sepolia'
286
442
  | 'arbitrumSepolia'
@@ -288,22 +444,41 @@ export interface RuleCreateResponse {
288
444
  | 'optimism_goerli'
289
445
  | 'arbitrumGoerli'
290
446
  | 'basecamp'
291
- | 'abstract';
447
+ | 'somnia'
448
+ | 'zkverify'
449
+ | 'polkadot'
450
+ | 'kusama'
451
+ | 'flow_cadence';
292
452
 
293
453
  /**
294
454
  * OAuth credentials associated with the rule
295
455
  */
296
456
  oauthCredentialsId?: string | null;
297
457
 
458
+ /**
459
+ * The lifetime of the reward
460
+ */
461
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
462
+
298
463
  /**
299
464
  * Type of reward issued by the rule
300
465
  */
301
- rewardType?: 'points' | 'multiplier';
466
+ rewardType?: 'points' | 'multiplier' | 'badge';
467
+
468
+ /**
469
+ * URL of the Shopify store
470
+ */
471
+ shopifyStoreUrl?: string | null;
472
+
473
+ /**
474
+ * Whether to show this rule before the start time
475
+ */
476
+ showBeforeStart?: boolean;
302
477
 
303
478
  /**
304
- * Identifier for associated subscriptions
479
+ * Optional stratus subscription id for the rule
305
480
  */
306
- subscriptionIdentifier?: string | null;
481
+ subscriptionId?: string | null;
307
482
  }
308
483
 
309
484
  export namespace RuleCreateResponse {
@@ -311,6 +486,17 @@ export namespace RuleCreateResponse {
311
486
  * Additional metadata for the loyalty rule
312
487
  */
313
488
  export interface Metadata {
489
+ /**
490
+ * Array of loyalty rule IDs that count as check-in when completed. If ["any"] then
491
+ * any rule completions count as check-in.
492
+ */
493
+ autoCheckInRuleIds?: Array<(string & {}) | 'any'> | null;
494
+
495
+ /**
496
+ * Number of tokens per batch.
497
+ */
498
+ batchSize?: number | null;
499
+
314
500
  /**
315
501
  * Text displayed on the action button.
316
502
  */
@@ -334,7 +520,7 @@ export namespace RuleCreateResponse {
334
520
  /**
335
521
  * Text to check in the Twitter post, username, or bio.
336
522
  */
337
- checkText?: string | null;
523
+ checkText?: string | Array<string> | null;
338
524
 
339
525
  /**
340
526
  * Array of collections associated with the rule.
@@ -344,7 +530,12 @@ export namespace RuleCreateResponse {
344
530
  /**
345
531
  * Conditions for completing the profile.
346
532
  */
347
- completeProfileConditions?: Record<string, boolean> | null;
533
+ completeProfileConditions?: { [key: string]: boolean } | null;
534
+
535
+ /**
536
+ * Description of the external rule condition (only for external rules)
537
+ */
538
+ conditionDescription?: string;
348
539
 
349
540
  /**
350
541
  * Object containing details for the call-to-action.
@@ -356,6 +547,11 @@ export namespace RuleCreateResponse {
356
547
  */
357
548
  customRewardsApiKey?: string;
358
549
 
550
+ /**
551
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
552
+ */
553
+ directRpc?: boolean;
554
+
359
555
  /**
360
556
  * Array of Discord servers, channels, and roles to join.
361
557
  */
@@ -381,6 +577,11 @@ export namespace RuleCreateResponse {
381
577
  */
382
578
  enableVerifiedMultiplier?: boolean;
383
579
 
580
+ /**
581
+ * Type of ERC20 token for the loyalty rule.
582
+ */
583
+ erc20Type?: 'erc20' | 'native';
584
+
384
585
  /**
385
586
  * Fill source of the order for the token sale
386
587
  */
@@ -391,6 +592,16 @@ export namespace RuleCreateResponse {
391
592
  */
392
593
  firstReferralReward?: number | null;
393
594
 
595
+ /**
596
+ * Name of the GitHub branch to check for PR merge.
597
+ */
598
+ githubBranchName?: string | null;
599
+
600
+ /**
601
+ * URL of the GitHub repository to check for star.
602
+ */
603
+ githubRepoUrl?: string | null;
604
+
394
605
  /**
395
606
  * Flag indicating whether the fill source is included.
396
607
  */
@@ -401,11 +612,6 @@ export namespace RuleCreateResponse {
401
612
  */
402
613
  hasNeverSold?: boolean;
403
614
 
404
- /**
405
- * Flag indicating whether the order source is included.
406
- */
407
- hasOrderSource?: boolean;
408
-
409
615
  /**
410
616
  * Indicates if the full royalty has been paid for items.
411
617
  */
@@ -426,11 +632,21 @@ export namespace RuleCreateResponse {
426
632
  */
427
633
  imageUrl?: string | null;
428
634
 
635
+ /**
636
+ * If enabled, the first transaction done on the platform will complete this rule
637
+ */
638
+ isCheckInOnEveryTxn?: boolean;
639
+
429
640
  /**
430
641
  * Indicates if the multiplier has been applied to rewards.
431
642
  */
432
643
  isMultiplierApplied?: boolean;
433
644
 
645
+ /**
646
+ * Flag indicating if the rule is restricted to new users.
647
+ */
648
+ isRestrictedToNewUsers?: boolean;
649
+
434
650
  /**
435
651
  * Flag indicating if rewards are applied retroactively.
436
652
  */
@@ -446,6 +662,11 @@ export namespace RuleCreateResponse {
446
662
  */
447
663
  link?: string | null;
448
664
 
665
+ /**
666
+ * Liquidity pool details.
667
+ */
668
+ liquidity?: Metadata.Liquidity;
669
+
449
670
  /**
450
671
  * Maximum quantity constraint for token holding.
451
672
  */
@@ -487,20 +708,35 @@ export namespace RuleCreateResponse {
487
708
  onlyRewardSingleTokenOwnership?: boolean | null;
488
709
 
489
710
  /**
490
- * Order source of the order for the token sale
711
+ * Promotional code associated with the rule.
491
712
  */
492
- orderSource?: string;
713
+ promoCode?: string;
493
714
 
494
715
  /**
495
- * Promotional code associated with the rule.
716
+ * URL of the CSV file containing promo codes.
496
717
  */
497
- promoCode?: string;
718
+ promoCodeCsvUrl?: string;
719
+
720
+ /**
721
+ * Numbers of the promotional code to be generated.
722
+ */
723
+ promoCodeLength?: number | null;
724
+
725
+ /**
726
+ * Type of the promotional code.
727
+ */
728
+ promoCodeType?: 'code' | 'csv' | 'generate';
498
729
 
499
730
  /**
500
731
  * Array defining ranges and corresponding rewards.
501
732
  */
502
733
  range?: Array<Metadata.Range>;
503
734
 
735
+ /**
736
+ * ID of the Reddit post.
737
+ */
738
+ redditPostId?: string | null;
739
+
504
740
  /**
505
741
  * Object defining referral requirements.
506
742
  */
@@ -511,11 +747,67 @@ export namespace RuleCreateResponse {
511
747
  */
512
748
  referrerReward?: number | null;
513
749
 
750
+ /**
751
+ * Loyalty currency ID of the referrer reward.
752
+ */
753
+ referrerRewardLoyaltyCurrencyId?: string | null;
754
+
755
+ /**
756
+ * Flag indicating if the post link is required.
757
+ */
758
+ requirePostLink?: boolean | null;
759
+
760
+ /**
761
+ * Flag indicating if media metadata is required.
762
+ */
763
+ requirePostMediaLink?: boolean | null;
764
+
765
+ /**
766
+ * Flag indicating if the rule can also reward badges per range.
767
+ */
768
+ rewardBadgePerRange?: boolean;
769
+
770
+ /**
771
+ * Flag indicating if the reward is rewarded by batch.
772
+ */
773
+ rewardByBatch?: boolean | null;
774
+
775
+ /**
776
+ * Criteria to evaluate the reward.
777
+ */
778
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
779
+
780
+ /**
781
+ * Flag indicating if the reward is rewarded per action.
782
+ */
783
+ rewardPerAction?: boolean | null;
784
+
514
785
  /**
515
786
  * Flag indicating if rewards are given per impression.
516
787
  */
517
788
  rewardPerImpression?: boolean | null;
518
789
 
790
+ /**
791
+ * Flag indicating if the rule should reward based on value of traded tokens
792
+ * instead of count.
793
+ */
794
+ rewardPerValue?: boolean;
795
+
796
+ /**
797
+ * Flag indicating if the rule should reward quality posts.
798
+ */
799
+ rewardQualityPosts?: boolean;
800
+
801
+ /**
802
+ * Wallet address of the user can only be used if userId is not provided
803
+ */
804
+ royaltyAddress?: string;
805
+
806
+ /**
807
+ * Royalty percentage of the item.
808
+ */
809
+ royaltyPercentage?: number;
810
+
519
811
  /**
520
812
  * Currency associated with sales.
521
813
  */
@@ -555,6 +847,9 @@ export namespace RuleCreateResponse {
555
847
  | 'Twitch'
556
848
  | 'X(Twitter)'
557
849
  | 'YouTube'
850
+ | 'Google'
851
+ | 'GitHub'
852
+ | 'Reddit'
558
853
  | null;
559
854
 
560
855
  /**
@@ -567,11 +862,21 @@ export namespace RuleCreateResponse {
567
862
  */
568
863
  socialPlatformName?: string | null;
569
864
 
865
+ /**
866
+ * ID of the Steam app.
867
+ */
868
+ steamAppId?: string | null;
869
+
570
870
  /**
571
871
  * Array of streak milestones and corresponding rewards.
572
872
  */
573
873
  streakArray?: Array<Metadata.StreakArray> | null;
574
874
 
875
+ /**
876
+ * Metadata for swap loyalty rules
877
+ */
878
+ swap?: Metadata.Swap;
879
+
575
880
  /**
576
881
  * ID of the Telegram channel.
577
882
  */
@@ -587,6 +892,12 @@ export namespace RuleCreateResponse {
587
892
  */
588
893
  trackAllContracts?: boolean | null;
589
894
 
895
+ /**
896
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
897
+ * completed once the progress is 100%.
898
+ */
899
+ trackProgress?: boolean | null;
900
+
590
901
  /**
591
902
  * URL of the associated Twitter account.
592
903
  */
@@ -630,7 +941,28 @@ export namespace RuleCreateResponse {
630
941
  /**
631
942
  * Type of wallet associated with the rule.
632
943
  */
633
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
944
+ walletType?:
945
+ | 'evm'
946
+ | 'solana'
947
+ | 'imx'
948
+ | 'sui'
949
+ | 'ton'
950
+ | 'cosmos'
951
+ | 'ultra'
952
+ | 'agw'
953
+ | 'flow_cadence'
954
+ | 'substrate'
955
+ | null;
956
+
957
+ /**
958
+ * ID of the Youtube channel.
959
+ */
960
+ youtubeChannelId?: string | null;
961
+
962
+ /**
963
+ * ID of the Youtube video.
964
+ */
965
+ youtubeVideoId?: string | null;
634
966
  }
635
967
 
636
968
  export namespace Metadata {
@@ -649,13 +981,17 @@ export namespace RuleCreateResponse {
649
981
  * Blockchain network of the collection.
650
982
  */
651
983
  network?:
984
+ | 'abstract'
985
+ | 'abstractTestnet'
652
986
  | 'apechain'
653
987
  | 'arbitrum'
654
988
  | 'avalanche'
655
989
  | 'avalancheFuji'
656
990
  | 'base'
657
991
  | 'baseSepolia'
992
+ | 'berachain'
658
993
  | 'berachainArtio'
994
+ | 'berachainBepolia'
659
995
  | 'binance'
660
996
  | 'bscTestnet'
661
997
  | 'campTestnet'
@@ -663,18 +999,30 @@ export namespace RuleCreateResponse {
663
999
  | 'fantomTestnet'
664
1000
  | 'flowMainnet'
665
1001
  | 'mainnet'
1002
+ | 'nexusTestnet'
666
1003
  | 'optimism'
667
1004
  | 'polygon'
668
1005
  | 'polygon_mumbai'
669
1006
  | 'skaleNebula'
1007
+ | 'skaleEuropa'
1008
+ | 'skaleCalypso'
670
1009
  | 'solana'
671
1010
  | 'sophon'
1011
+ | 'sophonTestnet'
672
1012
  | 'sui'
673
1013
  | 'superseed'
674
1014
  | 'superseedSepolia'
675
1015
  | 'vanar'
676
1016
  | 'xai'
677
1017
  | 'zksync'
1018
+ | 'coti'
1019
+ | 'cotiTestnet'
1020
+ | 'morph'
1021
+ | 'morphTestnet'
1022
+ | 'morphHolesky'
1023
+ | 'ultra'
1024
+ | 'ultraTestnet'
1025
+ | 'nitrograph'
678
1026
  | 'sepolia'
679
1027
  | 'optimism_sepolia'
680
1028
  | 'arbitrumSepolia'
@@ -682,7 +1030,11 @@ export namespace RuleCreateResponse {
682
1030
  | 'optimism_goerli'
683
1031
  | 'arbitrumGoerli'
684
1032
  | 'basecamp'
685
- | 'abstract';
1033
+ | 'somnia'
1034
+ | 'zkverify'
1035
+ | 'polkadot'
1036
+ | 'kusama'
1037
+ | 'flow_cadence';
686
1038
  }
687
1039
 
688
1040
  /**
@@ -759,6 +1111,111 @@ export namespace RuleCreateResponse {
759
1111
  id: string;
760
1112
  }
761
1113
 
1114
+ /**
1115
+ * Liquidity pool details.
1116
+ */
1117
+ export interface Liquidity {
1118
+ /**
1119
+ * Calculation type of the liquidity pool.
1120
+ */
1121
+ calculationType?: 'fixed' | 'custom';
1122
+
1123
+ /**
1124
+ * Custom function to calculate the the reward amount based on the liquidity
1125
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
1126
+ * USD.
1127
+ */
1128
+ customFunction?: string;
1129
+
1130
+ /**
1131
+ * Liquidity provided per day in USD
1132
+ */
1133
+ liquidityPerDay?: number;
1134
+
1135
+ /**
1136
+ * Blockchain network of the liquidity pool.
1137
+ */
1138
+ network?:
1139
+ | 'abstract'
1140
+ | 'abstractTestnet'
1141
+ | 'apechain'
1142
+ | 'arbitrum'
1143
+ | 'avalanche'
1144
+ | 'avalancheFuji'
1145
+ | 'base'
1146
+ | 'baseSepolia'
1147
+ | 'berachain'
1148
+ | 'berachainArtio'
1149
+ | 'berachainBepolia'
1150
+ | 'binance'
1151
+ | 'bscTestnet'
1152
+ | 'campTestnet'
1153
+ | 'fantom'
1154
+ | 'fantomTestnet'
1155
+ | 'flowMainnet'
1156
+ | 'mainnet'
1157
+ | 'nexusTestnet'
1158
+ | 'optimism'
1159
+ | 'polygon'
1160
+ | 'polygon_mumbai'
1161
+ | 'skaleNebula'
1162
+ | 'skaleEuropa'
1163
+ | 'skaleCalypso'
1164
+ | 'solana'
1165
+ | 'sophon'
1166
+ | 'sophonTestnet'
1167
+ | 'sui'
1168
+ | 'superseed'
1169
+ | 'superseedSepolia'
1170
+ | 'vanar'
1171
+ | 'xai'
1172
+ | 'zksync'
1173
+ | 'coti'
1174
+ | 'cotiTestnet'
1175
+ | 'morph'
1176
+ | 'morphTestnet'
1177
+ | 'morphHolesky'
1178
+ | 'ultra'
1179
+ | 'ultraTestnet'
1180
+ | 'nitrograph'
1181
+ | 'sepolia'
1182
+ | 'optimism_sepolia'
1183
+ | 'arbitrumSepolia'
1184
+ | 'goerli'
1185
+ | 'optimism_goerli'
1186
+ | 'arbitrumGoerli'
1187
+ | 'basecamp'
1188
+ | 'somnia'
1189
+ | 'zkverify'
1190
+ | 'polkadot'
1191
+ | 'kusama'
1192
+ | 'flow_cadence';
1193
+
1194
+ /**
1195
+ * Indicates if only in-range liquidity is rewarded.
1196
+ */
1197
+ onlyRewardInRangeLiquidity?: boolean;
1198
+
1199
+ /**
1200
+ * Array of liquidity pools associated with the rule.
1201
+ */
1202
+ pools?: Array<Liquidity.Pool>;
1203
+
1204
+ /**
1205
+ * Protocol of the liquidity pool.
1206
+ */
1207
+ protocol?: string;
1208
+ }
1209
+
1210
+ export namespace Liquidity {
1211
+ export interface Pool {
1212
+ /**
1213
+ * Unique identifier of the liquidity pool.
1214
+ */
1215
+ id: string;
1216
+ }
1217
+ }
1218
+
762
1219
  export interface Range {
763
1220
  /**
764
1221
  * Reward amount for this range.
@@ -774,6 +1231,16 @@ export namespace RuleCreateResponse {
774
1231
  * Start value of the range.
775
1232
  */
776
1233
  startRange: number;
1234
+
1235
+ /**
1236
+ * ID of the loyalty badge for this range.
1237
+ */
1238
+ loyaltyBadgeId?: string;
1239
+
1240
+ /**
1241
+ * Amount of the loyalty multiplier for this range.
1242
+ */
1243
+ loyaltyMultiplierAmount?: number;
777
1244
  }
778
1245
 
779
1246
  /**
@@ -826,20 +1293,15 @@ export namespace RuleCreateResponse {
826
1293
  * Object containing details of the associated smart contract.
827
1294
  */
828
1295
  export interface SmartContract {
829
- /**
830
- * ABI of the smart contract.
831
- */
832
- abi?: string | null;
833
-
834
1296
  /**
835
1297
  * Mapping of addresses for the smart contract.
836
1298
  */
837
1299
  addressMapping?: string | null;
838
1300
 
839
1301
  /**
840
- * Array of bonus details applied to the rule.
1302
+ * Object containing details of the amount multiplier from the event.
841
1303
  */
842
- bonus?: Array<SmartContract.Bonus> | null;
1304
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
843
1305
 
844
1306
  /**
845
1307
  * ID of the smart contract.
@@ -851,68 +1313,31 @@ export namespace RuleCreateResponse {
851
1313
  */
852
1314
  criteria?: 'everyEvent' | 'byParameter' | null;
853
1315
 
854
- /**
855
- * Time range applied to the rule.
856
- */
857
- customRange?: SmartContract.CustomRange | null;
858
-
859
1316
  /**
860
1317
  * Event emitted by the smart contract.
861
1318
  */
862
1319
  event?: string | null;
863
1320
 
864
- /**
865
- * Maximum value allowed for the parameter.
866
- */
867
- max?: number | null;
868
-
869
1321
  /**
870
1322
  * Array of parameters for the smart contract.
871
1323
  */
872
1324
  params?: Array<SmartContract.Param> | null;
873
1325
 
874
1326
  /**
875
- * Flag indicating if a bonus is applied.
1327
+ * Type of the smart contract interaction.
876
1328
  */
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.
886
- */
887
- withMax?: boolean | null;
1329
+ type?: 'function' | 'event' | null;
888
1330
  }
889
1331
 
890
1332
  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
1333
  /**
904
- * Time range applied to the rule.
1334
+ * Object containing details of the amount multiplier from the event.
905
1335
  */
906
- export interface CustomRange {
907
- /**
908
- * End time of the custom range.
909
- */
910
- endsAt?: string | null;
911
-
1336
+ export interface AmountMultiplier {
912
1337
  /**
913
- * Start time of the custom range.
1338
+ * Mapping of the value for the smart contract.
914
1339
  */
915
- startsAt?: string | null;
1340
+ valueMapping?: string | null;
916
1341
  }
917
1342
 
918
1343
  export interface Param {
@@ -956,6 +1381,33 @@ export namespace RuleCreateResponse {
956
1381
  */
957
1382
  streakMilestone: number;
958
1383
  }
1384
+
1385
+ /**
1386
+ * Metadata for swap loyalty rules
1387
+ */
1388
+ export interface Swap {
1389
+ provider?: 'any' | 'relay' | 'lifi';
1390
+
1391
+ relayReferrerId?: string;
1392
+
1393
+ requireCrossChainSwap?: boolean;
1394
+
1395
+ swappedToChain?: 'any' | number | string;
1396
+
1397
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1398
+
1399
+ tokenMode?: 'any' | 'specific';
1400
+
1401
+ trackTokenAmount?: boolean;
1402
+ }
1403
+
1404
+ export namespace Swap {
1405
+ export interface SwappedToToken {
1406
+ address: string;
1407
+
1408
+ chainId: string;
1409
+ }
1410
+ }
959
1411
  }
960
1412
 
961
1413
  export interface Collection {
@@ -968,13 +1420,17 @@ export namespace RuleCreateResponse {
968
1420
  * Blockchain network for the collection
969
1421
  */
970
1422
  network:
1423
+ | 'abstract'
1424
+ | 'abstractTestnet'
971
1425
  | 'apechain'
972
1426
  | 'arbitrum'
973
1427
  | 'avalanche'
974
1428
  | 'avalancheFuji'
975
1429
  | 'base'
976
1430
  | 'baseSepolia'
1431
+ | 'berachain'
977
1432
  | 'berachainArtio'
1433
+ | 'berachainBepolia'
978
1434
  | 'binance'
979
1435
  | 'bscTestnet'
980
1436
  | 'campTestnet'
@@ -982,18 +1438,30 @@ export namespace RuleCreateResponse {
982
1438
  | 'fantomTestnet'
983
1439
  | 'flowMainnet'
984
1440
  | 'mainnet'
1441
+ | 'nexusTestnet'
985
1442
  | 'optimism'
986
1443
  | 'polygon'
987
1444
  | 'polygon_mumbai'
988
1445
  | 'skaleNebula'
1446
+ | 'skaleEuropa'
1447
+ | 'skaleCalypso'
989
1448
  | 'solana'
990
1449
  | 'sophon'
1450
+ | 'sophonTestnet'
991
1451
  | 'sui'
992
1452
  | 'superseed'
993
1453
  | 'superseedSepolia'
994
1454
  | 'vanar'
995
1455
  | 'xai'
996
1456
  | 'zksync'
1457
+ | 'coti'
1458
+ | 'cotiTestnet'
1459
+ | 'morph'
1460
+ | 'morphTestnet'
1461
+ | 'morphHolesky'
1462
+ | 'ultra'
1463
+ | 'ultraTestnet'
1464
+ | 'nitrograph'
997
1465
  | 'sepolia'
998
1466
  | 'optimism_sepolia'
999
1467
  | 'arbitrumSepolia'
@@ -1001,7 +1469,16 @@ export namespace RuleCreateResponse {
1001
1469
  | 'optimism_goerli'
1002
1470
  | 'arbitrumGoerli'
1003
1471
  | 'basecamp'
1004
- | 'abstract';
1472
+ | 'somnia'
1473
+ | 'zkverify'
1474
+ | 'polkadot'
1475
+ | 'kusama'
1476
+ | 'flow_cadence';
1477
+
1478
+ /**
1479
+ * Symbol of the collection.
1480
+ */
1481
+ symbol?: string;
1005
1482
  }
1006
1483
  }
1007
1484
 
@@ -1023,10 +1500,15 @@ export interface RuleUpdateResponse {
1023
1500
  */
1024
1501
  name: string;
1025
1502
 
1503
+ /**
1504
+ * The type of claim for the reward
1505
+ */
1506
+ claimType?: 'manual' | 'auto' | null;
1507
+
1026
1508
  /**
1027
1509
  * Blockchain address of the associated collection
1028
1510
  */
1029
- collectionAddress?: string;
1511
+ collectionAddress?: string | null;
1030
1512
 
1031
1513
  /**
1032
1514
  * List of associated collections
@@ -1059,9 +1541,19 @@ export interface RuleUpdateResponse {
1059
1541
  effectiveStartTime?: string | null;
1060
1542
 
1061
1543
  /**
1062
- * Frequency of the rule execution
1544
+ * ID of the external integration
1063
1545
  */
1064
- frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
1546
+ externalIntegrationId?: string | null;
1547
+
1548
+ /**
1549
+ * Frequency of the rule execution
1550
+ */
1551
+ frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
1552
+
1553
+ /**
1554
+ * Optional stratus function id for the rule
1555
+ */
1556
+ functionId?: string | null;
1065
1557
 
1066
1558
  /**
1067
1559
  * Whether to hide this rule in the user interface
@@ -1071,7 +1563,7 @@ export interface RuleUpdateResponse {
1071
1563
  /**
1072
1564
  * Time interval for recurring rule execution
1073
1565
  */
1074
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1566
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
1075
1567
 
1076
1568
  /**
1077
1569
  * Whether this rule is required for participation
@@ -1083,6 +1575,18 @@ export interface RuleUpdateResponse {
1083
1575
  */
1084
1576
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
1085
1577
 
1578
+ /**
1579
+ * The interval for the max amount. Available for the smart contract and external
1580
+ * rules.
1581
+ */
1582
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
1583
+
1584
+ /**
1585
+ * The maximum amount of points a user can earn per interval. Available for the
1586
+ * smart contract and external rules.
1587
+ */
1588
+ maxAmountPerInterval?: number | null;
1589
+
1086
1590
  /**
1087
1591
  * URL of the media to be displayed
1088
1592
  */
@@ -1097,13 +1601,17 @@ export interface RuleUpdateResponse {
1097
1601
  * Blockchain network where the rule will apply
1098
1602
  */
1099
1603
  network?:
1604
+ | 'abstract'
1605
+ | 'abstractTestnet'
1100
1606
  | 'apechain'
1101
1607
  | 'arbitrum'
1102
1608
  | 'avalanche'
1103
1609
  | 'avalancheFuji'
1104
1610
  | 'base'
1105
1611
  | 'baseSepolia'
1612
+ | 'berachain'
1106
1613
  | 'berachainArtio'
1614
+ | 'berachainBepolia'
1107
1615
  | 'binance'
1108
1616
  | 'bscTestnet'
1109
1617
  | 'campTestnet'
@@ -1111,18 +1619,30 @@ export interface RuleUpdateResponse {
1111
1619
  | 'fantomTestnet'
1112
1620
  | 'flowMainnet'
1113
1621
  | 'mainnet'
1622
+ | 'nexusTestnet'
1114
1623
  | 'optimism'
1115
1624
  | 'polygon'
1116
1625
  | 'polygon_mumbai'
1117
1626
  | 'skaleNebula'
1627
+ | 'skaleEuropa'
1628
+ | 'skaleCalypso'
1118
1629
  | 'solana'
1119
1630
  | 'sophon'
1631
+ | 'sophonTestnet'
1120
1632
  | 'sui'
1121
1633
  | 'superseed'
1122
1634
  | 'superseedSepolia'
1123
1635
  | 'vanar'
1124
1636
  | 'xai'
1125
1637
  | 'zksync'
1638
+ | 'coti'
1639
+ | 'cotiTestnet'
1640
+ | 'morph'
1641
+ | 'morphTestnet'
1642
+ | 'morphHolesky'
1643
+ | 'ultra'
1644
+ | 'ultraTestnet'
1645
+ | 'nitrograph'
1126
1646
  | 'sepolia'
1127
1647
  | 'optimism_sepolia'
1128
1648
  | 'arbitrumSepolia'
@@ -1130,17 +1650,36 @@ export interface RuleUpdateResponse {
1130
1650
  | 'optimism_goerli'
1131
1651
  | 'arbitrumGoerli'
1132
1652
  | 'basecamp'
1133
- | 'abstract';
1653
+ | 'somnia'
1654
+ | 'zkverify'
1655
+ | 'polkadot'
1656
+ | 'kusama'
1657
+ | 'flow_cadence';
1134
1658
 
1135
1659
  /**
1136
1660
  * ID for associated OAuth credentials
1137
1661
  */
1138
1662
  oauthCredentialsId?: string | null;
1139
1663
 
1664
+ /**
1665
+ * The lifetime of the reward
1666
+ */
1667
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
1668
+
1140
1669
  /**
1141
1670
  * Type of reward issued by this rule
1142
1671
  */
1143
- rewardType?: 'points' | 'multiplier';
1672
+ rewardType?: 'points' | 'multiplier' | 'badge';
1673
+
1674
+ /**
1675
+ * URL of the Shopify store
1676
+ */
1677
+ shopifyStoreUrl?: string | null;
1678
+
1679
+ /**
1680
+ * Whether to show this rule before the start time
1681
+ */
1682
+ showBeforeStart?: boolean;
1144
1683
 
1145
1684
  /**
1146
1685
  * Start time for the loyalty rule
@@ -1148,9 +1687,9 @@ export interface RuleUpdateResponse {
1148
1687
  startTime?: string | null;
1149
1688
 
1150
1689
  /**
1151
- * Optional subscription identifier for the rule
1690
+ * Optional stratus subscription id for the rule
1152
1691
  */
1153
- subscriptionIdentifier?: string | null;
1692
+ subscriptionId?: string | null;
1154
1693
  }
1155
1694
 
1156
1695
  export namespace RuleUpdateResponse {
@@ -1164,13 +1703,17 @@ export namespace RuleUpdateResponse {
1164
1703
  * Blockchain network for the collection
1165
1704
  */
1166
1705
  network:
1706
+ | 'abstract'
1707
+ | 'abstractTestnet'
1167
1708
  | 'apechain'
1168
1709
  | 'arbitrum'
1169
1710
  | 'avalanche'
1170
1711
  | 'avalancheFuji'
1171
1712
  | 'base'
1172
1713
  | 'baseSepolia'
1714
+ | 'berachain'
1173
1715
  | 'berachainArtio'
1716
+ | 'berachainBepolia'
1174
1717
  | 'binance'
1175
1718
  | 'bscTestnet'
1176
1719
  | 'campTestnet'
@@ -1178,18 +1721,30 @@ export namespace RuleUpdateResponse {
1178
1721
  | 'fantomTestnet'
1179
1722
  | 'flowMainnet'
1180
1723
  | 'mainnet'
1724
+ | 'nexusTestnet'
1181
1725
  | 'optimism'
1182
1726
  | 'polygon'
1183
1727
  | 'polygon_mumbai'
1184
1728
  | 'skaleNebula'
1729
+ | 'skaleEuropa'
1730
+ | 'skaleCalypso'
1185
1731
  | 'solana'
1186
1732
  | 'sophon'
1733
+ | 'sophonTestnet'
1187
1734
  | 'sui'
1188
1735
  | 'superseed'
1189
1736
  | 'superseedSepolia'
1190
1737
  | 'vanar'
1191
1738
  | 'xai'
1192
1739
  | 'zksync'
1740
+ | 'coti'
1741
+ | 'cotiTestnet'
1742
+ | 'morph'
1743
+ | 'morphTestnet'
1744
+ | 'morphHolesky'
1745
+ | 'ultra'
1746
+ | 'ultraTestnet'
1747
+ | 'nitrograph'
1193
1748
  | 'sepolia'
1194
1749
  | 'optimism_sepolia'
1195
1750
  | 'arbitrumSepolia'
@@ -1197,13 +1752,33 @@ export namespace RuleUpdateResponse {
1197
1752
  | 'optimism_goerli'
1198
1753
  | 'arbitrumGoerli'
1199
1754
  | 'basecamp'
1200
- | 'abstract';
1755
+ | 'somnia'
1756
+ | 'zkverify'
1757
+ | 'polkadot'
1758
+ | 'kusama'
1759
+ | 'flow_cadence';
1760
+
1761
+ /**
1762
+ * Symbol of the collection.
1763
+ */
1764
+ symbol?: string;
1201
1765
  }
1202
1766
 
1203
1767
  /**
1204
1768
  * Additional metadata for the loyalty rule
1205
1769
  */
1206
1770
  export interface Metadata {
1771
+ /**
1772
+ * Array of loyalty rule IDs that count as check-in when completed. If ["any"] then
1773
+ * any rule completions count as check-in.
1774
+ */
1775
+ autoCheckInRuleIds?: Array<(string & {}) | 'any'> | null;
1776
+
1777
+ /**
1778
+ * Number of tokens per batch.
1779
+ */
1780
+ batchSize?: number | null;
1781
+
1207
1782
  /**
1208
1783
  * Text displayed on the action button.
1209
1784
  */
@@ -1227,7 +1802,7 @@ export namespace RuleUpdateResponse {
1227
1802
  /**
1228
1803
  * Text to check in the Twitter post, username, or bio.
1229
1804
  */
1230
- checkText?: string | null;
1805
+ checkText?: string | Array<string> | null;
1231
1806
 
1232
1807
  /**
1233
1808
  * Array of collections associated with the rule.
@@ -1237,7 +1812,12 @@ export namespace RuleUpdateResponse {
1237
1812
  /**
1238
1813
  * Conditions for completing the profile.
1239
1814
  */
1240
- completeProfileConditions?: Record<string, boolean> | null;
1815
+ completeProfileConditions?: { [key: string]: boolean } | null;
1816
+
1817
+ /**
1818
+ * Description of the external rule condition (only for external rules)
1819
+ */
1820
+ conditionDescription?: string;
1241
1821
 
1242
1822
  /**
1243
1823
  * Object containing details for the call-to-action.
@@ -1249,6 +1829,11 @@ export namespace RuleUpdateResponse {
1249
1829
  */
1250
1830
  customRewardsApiKey?: string;
1251
1831
 
1832
+ /**
1833
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
1834
+ */
1835
+ directRpc?: boolean;
1836
+
1252
1837
  /**
1253
1838
  * Array of Discord servers, channels, and roles to join.
1254
1839
  */
@@ -1274,6 +1859,11 @@ export namespace RuleUpdateResponse {
1274
1859
  */
1275
1860
  enableVerifiedMultiplier?: boolean;
1276
1861
 
1862
+ /**
1863
+ * Type of ERC20 token for the loyalty rule.
1864
+ */
1865
+ erc20Type?: 'erc20' | 'native';
1866
+
1277
1867
  /**
1278
1868
  * Fill source of the order for the token sale
1279
1869
  */
@@ -1284,6 +1874,16 @@ export namespace RuleUpdateResponse {
1284
1874
  */
1285
1875
  firstReferralReward?: number | null;
1286
1876
 
1877
+ /**
1878
+ * Name of the GitHub branch to check for PR merge.
1879
+ */
1880
+ githubBranchName?: string | null;
1881
+
1882
+ /**
1883
+ * URL of the GitHub repository to check for star.
1884
+ */
1885
+ githubRepoUrl?: string | null;
1886
+
1287
1887
  /**
1288
1888
  * Flag indicating whether the fill source is included.
1289
1889
  */
@@ -1294,11 +1894,6 @@ export namespace RuleUpdateResponse {
1294
1894
  */
1295
1895
  hasNeverSold?: boolean;
1296
1896
 
1297
- /**
1298
- * Flag indicating whether the order source is included.
1299
- */
1300
- hasOrderSource?: boolean;
1301
-
1302
1897
  /**
1303
1898
  * Indicates if the full royalty has been paid for items.
1304
1899
  */
@@ -1319,11 +1914,21 @@ export namespace RuleUpdateResponse {
1319
1914
  */
1320
1915
  imageUrl?: string | null;
1321
1916
 
1917
+ /**
1918
+ * If enabled, the first transaction done on the platform will complete this rule
1919
+ */
1920
+ isCheckInOnEveryTxn?: boolean;
1921
+
1322
1922
  /**
1323
1923
  * Indicates if the multiplier has been applied to rewards.
1324
1924
  */
1325
1925
  isMultiplierApplied?: boolean;
1326
1926
 
1927
+ /**
1928
+ * Flag indicating if the rule is restricted to new users.
1929
+ */
1930
+ isRestrictedToNewUsers?: boolean;
1931
+
1327
1932
  /**
1328
1933
  * Flag indicating if rewards are applied retroactively.
1329
1934
  */
@@ -1339,6 +1944,11 @@ export namespace RuleUpdateResponse {
1339
1944
  */
1340
1945
  link?: string | null;
1341
1946
 
1947
+ /**
1948
+ * Liquidity pool details.
1949
+ */
1950
+ liquidity?: Metadata.Liquidity;
1951
+
1342
1952
  /**
1343
1953
  * Maximum quantity constraint for token holding.
1344
1954
  */
@@ -1380,20 +1990,35 @@ export namespace RuleUpdateResponse {
1380
1990
  onlyRewardSingleTokenOwnership?: boolean | null;
1381
1991
 
1382
1992
  /**
1383
- * Order source of the order for the token sale
1993
+ * Promotional code associated with the rule.
1384
1994
  */
1385
- orderSource?: string;
1995
+ promoCode?: string;
1386
1996
 
1387
1997
  /**
1388
- * Promotional code associated with the rule.
1998
+ * URL of the CSV file containing promo codes.
1389
1999
  */
1390
- promoCode?: string;
2000
+ promoCodeCsvUrl?: string;
2001
+
2002
+ /**
2003
+ * Numbers of the promotional code to be generated.
2004
+ */
2005
+ promoCodeLength?: number | null;
2006
+
2007
+ /**
2008
+ * Type of the promotional code.
2009
+ */
2010
+ promoCodeType?: 'code' | 'csv' | 'generate';
1391
2011
 
1392
2012
  /**
1393
2013
  * Array defining ranges and corresponding rewards.
1394
2014
  */
1395
2015
  range?: Array<Metadata.Range>;
1396
2016
 
2017
+ /**
2018
+ * ID of the Reddit post.
2019
+ */
2020
+ redditPostId?: string | null;
2021
+
1397
2022
  /**
1398
2023
  * Object defining referral requirements.
1399
2024
  */
@@ -1404,11 +2029,67 @@ export namespace RuleUpdateResponse {
1404
2029
  */
1405
2030
  referrerReward?: number | null;
1406
2031
 
2032
+ /**
2033
+ * Loyalty currency ID of the referrer reward.
2034
+ */
2035
+ referrerRewardLoyaltyCurrencyId?: string | null;
2036
+
2037
+ /**
2038
+ * Flag indicating if the post link is required.
2039
+ */
2040
+ requirePostLink?: boolean | null;
2041
+
2042
+ /**
2043
+ * Flag indicating if media metadata is required.
2044
+ */
2045
+ requirePostMediaLink?: boolean | null;
2046
+
2047
+ /**
2048
+ * Flag indicating if the rule can also reward badges per range.
2049
+ */
2050
+ rewardBadgePerRange?: boolean;
2051
+
2052
+ /**
2053
+ * Flag indicating if the reward is rewarded by batch.
2054
+ */
2055
+ rewardByBatch?: boolean | null;
2056
+
2057
+ /**
2058
+ * Criteria to evaluate the reward.
2059
+ */
2060
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
2061
+
2062
+ /**
2063
+ * Flag indicating if the reward is rewarded per action.
2064
+ */
2065
+ rewardPerAction?: boolean | null;
2066
+
1407
2067
  /**
1408
2068
  * Flag indicating if rewards are given per impression.
1409
2069
  */
1410
2070
  rewardPerImpression?: boolean | null;
1411
2071
 
2072
+ /**
2073
+ * Flag indicating if the rule should reward based on value of traded tokens
2074
+ * instead of count.
2075
+ */
2076
+ rewardPerValue?: boolean;
2077
+
2078
+ /**
2079
+ * Flag indicating if the rule should reward quality posts.
2080
+ */
2081
+ rewardQualityPosts?: boolean;
2082
+
2083
+ /**
2084
+ * Wallet address of the user can only be used if userId is not provided
2085
+ */
2086
+ royaltyAddress?: string;
2087
+
2088
+ /**
2089
+ * Royalty percentage of the item.
2090
+ */
2091
+ royaltyPercentage?: number;
2092
+
1412
2093
  /**
1413
2094
  * Currency associated with sales.
1414
2095
  */
@@ -1448,6 +2129,9 @@ export namespace RuleUpdateResponse {
1448
2129
  | 'Twitch'
1449
2130
  | 'X(Twitter)'
1450
2131
  | 'YouTube'
2132
+ | 'Google'
2133
+ | 'GitHub'
2134
+ | 'Reddit'
1451
2135
  | null;
1452
2136
 
1453
2137
  /**
@@ -1460,11 +2144,21 @@ export namespace RuleUpdateResponse {
1460
2144
  */
1461
2145
  socialPlatformName?: string | null;
1462
2146
 
2147
+ /**
2148
+ * ID of the Steam app.
2149
+ */
2150
+ steamAppId?: string | null;
2151
+
1463
2152
  /**
1464
2153
  * Array of streak milestones and corresponding rewards.
1465
2154
  */
1466
2155
  streakArray?: Array<Metadata.StreakArray> | null;
1467
2156
 
2157
+ /**
2158
+ * Metadata for swap loyalty rules
2159
+ */
2160
+ swap?: Metadata.Swap;
2161
+
1468
2162
  /**
1469
2163
  * ID of the Telegram channel.
1470
2164
  */
@@ -1480,6 +2174,12 @@ export namespace RuleUpdateResponse {
1480
2174
  */
1481
2175
  trackAllContracts?: boolean | null;
1482
2176
 
2177
+ /**
2178
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2179
+ * completed once the progress is 100%.
2180
+ */
2181
+ trackProgress?: boolean | null;
2182
+
1483
2183
  /**
1484
2184
  * URL of the associated Twitter account.
1485
2185
  */
@@ -1523,7 +2223,28 @@ export namespace RuleUpdateResponse {
1523
2223
  /**
1524
2224
  * Type of wallet associated with the rule.
1525
2225
  */
1526
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
2226
+ walletType?:
2227
+ | 'evm'
2228
+ | 'solana'
2229
+ | 'imx'
2230
+ | 'sui'
2231
+ | 'ton'
2232
+ | 'cosmos'
2233
+ | 'ultra'
2234
+ | 'agw'
2235
+ | 'flow_cadence'
2236
+ | 'substrate'
2237
+ | null;
2238
+
2239
+ /**
2240
+ * ID of the Youtube channel.
2241
+ */
2242
+ youtubeChannelId?: string | null;
2243
+
2244
+ /**
2245
+ * ID of the Youtube video.
2246
+ */
2247
+ youtubeVideoId?: string | null;
1527
2248
  }
1528
2249
 
1529
2250
  export namespace Metadata {
@@ -1542,13 +2263,17 @@ export namespace RuleUpdateResponse {
1542
2263
  * Blockchain network of the collection.
1543
2264
  */
1544
2265
  network?:
2266
+ | 'abstract'
2267
+ | 'abstractTestnet'
1545
2268
  | 'apechain'
1546
2269
  | 'arbitrum'
1547
2270
  | 'avalanche'
1548
2271
  | 'avalancheFuji'
1549
2272
  | 'base'
1550
2273
  | 'baseSepolia'
2274
+ | 'berachain'
1551
2275
  | 'berachainArtio'
2276
+ | 'berachainBepolia'
1552
2277
  | 'binance'
1553
2278
  | 'bscTestnet'
1554
2279
  | 'campTestnet'
@@ -1556,18 +2281,30 @@ export namespace RuleUpdateResponse {
1556
2281
  | 'fantomTestnet'
1557
2282
  | 'flowMainnet'
1558
2283
  | 'mainnet'
2284
+ | 'nexusTestnet'
1559
2285
  | 'optimism'
1560
2286
  | 'polygon'
1561
2287
  | 'polygon_mumbai'
1562
2288
  | 'skaleNebula'
2289
+ | 'skaleEuropa'
2290
+ | 'skaleCalypso'
1563
2291
  | 'solana'
1564
2292
  | 'sophon'
2293
+ | 'sophonTestnet'
1565
2294
  | 'sui'
1566
2295
  | 'superseed'
1567
2296
  | 'superseedSepolia'
1568
2297
  | 'vanar'
1569
2298
  | 'xai'
1570
2299
  | 'zksync'
2300
+ | 'coti'
2301
+ | 'cotiTestnet'
2302
+ | 'morph'
2303
+ | 'morphTestnet'
2304
+ | 'morphHolesky'
2305
+ | 'ultra'
2306
+ | 'ultraTestnet'
2307
+ | 'nitrograph'
1571
2308
  | 'sepolia'
1572
2309
  | 'optimism_sepolia'
1573
2310
  | 'arbitrumSepolia'
@@ -1575,7 +2312,11 @@ export namespace RuleUpdateResponse {
1575
2312
  | 'optimism_goerli'
1576
2313
  | 'arbitrumGoerli'
1577
2314
  | 'basecamp'
1578
- | 'abstract';
2315
+ | 'somnia'
2316
+ | 'zkverify'
2317
+ | 'polkadot'
2318
+ | 'kusama'
2319
+ | 'flow_cadence';
1579
2320
  }
1580
2321
 
1581
2322
  /**
@@ -1652,6 +2393,111 @@ export namespace RuleUpdateResponse {
1652
2393
  id: string;
1653
2394
  }
1654
2395
 
2396
+ /**
2397
+ * Liquidity pool details.
2398
+ */
2399
+ export interface Liquidity {
2400
+ /**
2401
+ * Calculation type of the liquidity pool.
2402
+ */
2403
+ calculationType?: 'fixed' | 'custom';
2404
+
2405
+ /**
2406
+ * Custom function to calculate the the reward amount based on the liquidity
2407
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2408
+ * USD.
2409
+ */
2410
+ customFunction?: string;
2411
+
2412
+ /**
2413
+ * Liquidity provided per day in USD
2414
+ */
2415
+ liquidityPerDay?: number;
2416
+
2417
+ /**
2418
+ * Blockchain network of the liquidity pool.
2419
+ */
2420
+ network?:
2421
+ | 'abstract'
2422
+ | 'abstractTestnet'
2423
+ | 'apechain'
2424
+ | 'arbitrum'
2425
+ | 'avalanche'
2426
+ | 'avalancheFuji'
2427
+ | 'base'
2428
+ | 'baseSepolia'
2429
+ | 'berachain'
2430
+ | 'berachainArtio'
2431
+ | 'berachainBepolia'
2432
+ | 'binance'
2433
+ | 'bscTestnet'
2434
+ | 'campTestnet'
2435
+ | 'fantom'
2436
+ | 'fantomTestnet'
2437
+ | 'flowMainnet'
2438
+ | 'mainnet'
2439
+ | 'nexusTestnet'
2440
+ | 'optimism'
2441
+ | 'polygon'
2442
+ | 'polygon_mumbai'
2443
+ | 'skaleNebula'
2444
+ | 'skaleEuropa'
2445
+ | 'skaleCalypso'
2446
+ | 'solana'
2447
+ | 'sophon'
2448
+ | 'sophonTestnet'
2449
+ | 'sui'
2450
+ | 'superseed'
2451
+ | 'superseedSepolia'
2452
+ | 'vanar'
2453
+ | 'xai'
2454
+ | 'zksync'
2455
+ | 'coti'
2456
+ | 'cotiTestnet'
2457
+ | 'morph'
2458
+ | 'morphTestnet'
2459
+ | 'morphHolesky'
2460
+ | 'ultra'
2461
+ | 'ultraTestnet'
2462
+ | 'nitrograph'
2463
+ | 'sepolia'
2464
+ | 'optimism_sepolia'
2465
+ | 'arbitrumSepolia'
2466
+ | 'goerli'
2467
+ | 'optimism_goerli'
2468
+ | 'arbitrumGoerli'
2469
+ | 'basecamp'
2470
+ | 'somnia'
2471
+ | 'zkverify'
2472
+ | 'polkadot'
2473
+ | 'kusama'
2474
+ | 'flow_cadence';
2475
+
2476
+ /**
2477
+ * Indicates if only in-range liquidity is rewarded.
2478
+ */
2479
+ onlyRewardInRangeLiquidity?: boolean;
2480
+
2481
+ /**
2482
+ * Array of liquidity pools associated with the rule.
2483
+ */
2484
+ pools?: Array<Liquidity.Pool>;
2485
+
2486
+ /**
2487
+ * Protocol of the liquidity pool.
2488
+ */
2489
+ protocol?: string;
2490
+ }
2491
+
2492
+ export namespace Liquidity {
2493
+ export interface Pool {
2494
+ /**
2495
+ * Unique identifier of the liquidity pool.
2496
+ */
2497
+ id: string;
2498
+ }
2499
+ }
2500
+
1655
2501
  export interface Range {
1656
2502
  /**
1657
2503
  * Reward amount for this range.
@@ -1667,6 +2513,16 @@ export namespace RuleUpdateResponse {
1667
2513
  * Start value of the range.
1668
2514
  */
1669
2515
  startRange: number;
2516
+
2517
+ /**
2518
+ * ID of the loyalty badge for this range.
2519
+ */
2520
+ loyaltyBadgeId?: string;
2521
+
2522
+ /**
2523
+ * Amount of the loyalty multiplier for this range.
2524
+ */
2525
+ loyaltyMultiplierAmount?: number;
1670
2526
  }
1671
2527
 
1672
2528
  /**
@@ -1719,20 +2575,15 @@ export namespace RuleUpdateResponse {
1719
2575
  * Object containing details of the associated smart contract.
1720
2576
  */
1721
2577
  export interface SmartContract {
1722
- /**
1723
- * ABI of the smart contract.
1724
- */
1725
- abi?: string | null;
1726
-
1727
2578
  /**
1728
2579
  * Mapping of addresses for the smart contract.
1729
2580
  */
1730
2581
  addressMapping?: string | null;
1731
2582
 
1732
2583
  /**
1733
- * Array of bonus details applied to the rule.
2584
+ * Object containing details of the amount multiplier from the event.
1734
2585
  */
1735
- bonus?: Array<SmartContract.Bonus> | null;
2586
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1736
2587
 
1737
2588
  /**
1738
2589
  * ID of the smart contract.
@@ -1744,68 +2595,31 @@ export namespace RuleUpdateResponse {
1744
2595
  */
1745
2596
  criteria?: 'everyEvent' | 'byParameter' | null;
1746
2597
 
1747
- /**
1748
- * Time range applied to the rule.
1749
- */
1750
- customRange?: SmartContract.CustomRange | null;
1751
-
1752
2598
  /**
1753
2599
  * Event emitted by the smart contract.
1754
2600
  */
1755
2601
  event?: string | null;
1756
2602
 
1757
- /**
1758
- * Maximum value allowed for the parameter.
1759
- */
1760
- max?: number | null;
1761
-
1762
2603
  /**
1763
2604
  * Array of parameters for the smart contract.
1764
2605
  */
1765
2606
  params?: Array<SmartContract.Param> | null;
1766
2607
 
1767
2608
  /**
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.
2609
+ * Type of the smart contract interaction.
1779
2610
  */
1780
- withMax?: boolean | null;
2611
+ type?: 'function' | 'event' | null;
1781
2612
  }
1782
2613
 
1783
2614
  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
2615
  /**
1797
- * Time range applied to the rule.
2616
+ * Object containing details of the amount multiplier from the event.
1798
2617
  */
1799
- export interface CustomRange {
2618
+ export interface AmountMultiplier {
1800
2619
  /**
1801
- * End time of the custom range.
2620
+ * Mapping of the value for the smart contract.
1802
2621
  */
1803
- endsAt?: string | null;
1804
-
1805
- /**
1806
- * Start time of the custom range.
1807
- */
1808
- startsAt?: string | null;
2622
+ valueMapping?: string | null;
1809
2623
  }
1810
2624
 
1811
2625
  export interface Param {
@@ -1849,6 +2663,33 @@ export namespace RuleUpdateResponse {
1849
2663
  */
1850
2664
  streakMilestone: number;
1851
2665
  }
2666
+
2667
+ /**
2668
+ * Metadata for swap loyalty rules
2669
+ */
2670
+ export interface Swap {
2671
+ provider?: 'any' | 'relay' | 'lifi';
2672
+
2673
+ relayReferrerId?: string;
2674
+
2675
+ requireCrossChainSwap?: boolean;
2676
+
2677
+ swappedToChain?: 'any' | number | string;
2678
+
2679
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2680
+
2681
+ tokenMode?: 'any' | 'specific';
2682
+
2683
+ trackTokenAmount?: boolean;
2684
+ }
2685
+
2686
+ export namespace Swap {
2687
+ export interface SwappedToToken {
2688
+ address: string;
2689
+
2690
+ chainId: string;
2691
+ }
2692
+ }
1852
2693
  }
1853
2694
  }
1854
2695
 
@@ -1859,9 +2700,6 @@ export interface RuleListResponse {
1859
2700
  }
1860
2701
 
1861
2702
  export namespace RuleListResponse {
1862
- /**
1863
- * Schema for a loyalty rule
1864
- */
1865
2703
  export interface Data {
1866
2704
  /**
1867
2705
  * Unique identifier for the loyalty rule
@@ -1871,7 +2709,7 @@ export namespace RuleListResponse {
1871
2709
  /**
1872
2710
  * Amount associated with the loyalty rule
1873
2711
  */
1874
- amount: number;
2712
+ amount: number | null;
1875
2713
 
1876
2714
  /**
1877
2715
  * Timestamp when the loyalty rule was created
@@ -1883,16 +2721,46 @@ export namespace RuleListResponse {
1883
2721
  */
1884
2722
  deletedAt: string | null;
1885
2723
 
2724
+ /**
2725
+ * Description of the loyalty rule
2726
+ */
2727
+ description: string;
2728
+
2729
+ /**
2730
+ * End time of the loyalty rule
2731
+ */
2732
+ endTime: string | null;
2733
+
1886
2734
  /**
1887
2735
  * Frequency of the loyalty rule
1888
2736
  */
1889
2737
  frequency: string;
1890
2738
 
2739
+ /**
2740
+ * Chains attached to the loyalty rule
2741
+ */
2742
+ loyaltyRuleChain: Array<Data.LoyaltyRuleChain>;
2743
+
2744
+ /**
2745
+ * Name of the loyalty rule
2746
+ */
2747
+ name: string;
2748
+
1891
2749
  /**
1892
2750
  * Unique identifier for the organization
1893
2751
  */
1894
2752
  organizationId: string;
1895
2753
 
2754
+ /**
2755
+ * Type of the reward
2756
+ */
2757
+ rewardType: 'points' | 'multiplier' | 'badge';
2758
+
2759
+ /**
2760
+ * Start time of the loyalty rule
2761
+ */
2762
+ startTime: string | null;
2763
+
1896
2764
  /**
1897
2765
  * Type of the loyalty rule
1898
2766
  */
@@ -1913,10 +2781,1042 @@ export namespace RuleListResponse {
1913
2781
  */
1914
2782
  collectionAddress?: string;
1915
2783
 
2784
+ /**
2785
+ * URL of the media associated with the loyalty rule
2786
+ */
2787
+ mediaUrl?: string | null;
2788
+
1916
2789
  /**
1917
2790
  * Optional metadata for the loyalty rule
1918
2791
  */
1919
- metadata?: Record<string, unknown>;
2792
+ metadata?: { [key: string]: Data.Metadata };
2793
+ }
2794
+
2795
+ export namespace Data {
2796
+ export interface LoyaltyRuleChain {
2797
+ /**
2798
+ * Unique identifier for the rule chain
2799
+ */
2800
+ id: string;
2801
+
2802
+ loyaltyConditions: Array<LoyaltyRuleChain.LoyaltyCondition>;
2803
+
2804
+ /**
2805
+ * Unique identifier for the loyalty rule
2806
+ */
2807
+ loyaltyRuleId: string;
2808
+
2809
+ /**
2810
+ * Name of the rule chain
2811
+ */
2812
+ name: string;
2813
+ }
2814
+
2815
+ export namespace LoyaltyRuleChain {
2816
+ export interface LoyaltyCondition {
2817
+ /**
2818
+ * Unique identifier for the condition
2819
+ */
2820
+ id: string;
2821
+
2822
+ /**
2823
+ * Amount of the condition
2824
+ */
2825
+ amount: number | null;
2826
+
2827
+ association: Array<LoyaltyCondition.Association>;
2828
+
2829
+ /**
2830
+ * URL of the CSV file
2831
+ */
2832
+ csvUrl: string | null;
2833
+
2834
+ /**
2835
+ * Description of the condition
2836
+ */
2837
+ description: string | null;
2838
+
2839
+ /**
2840
+ * Number of times the condition must be met
2841
+ */
2842
+ repeatCount: number | null;
2843
+
2844
+ /**
2845
+ * Number of times the condition must be met
2846
+ */
2847
+ requiredCount: number | null;
2848
+
2849
+ /**
2850
+ * Type of the condition
2851
+ */
2852
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
2853
+ }
2854
+
2855
+ export namespace LoyaltyCondition {
2856
+ export interface Association {
2857
+ /**
2858
+ * Unique identifier for the association
2859
+ */
2860
+ id: string;
2861
+
2862
+ /**
2863
+ * Unique identifier for the loyalty badge
2864
+ */
2865
+ loyaltyBadgeId: string | null;
2866
+
2867
+ /**
2868
+ * Unique identifier for the loyalty currency
2869
+ */
2870
+ loyaltyCurrencyId: string | null;
2871
+
2872
+ loyaltyRule: Association.LoyaltyRule | null;
2873
+
2874
+ /**
2875
+ * Unique identifier for the loyalty rule group
2876
+ */
2877
+ loyaltyRuleGroupId: string | null;
2878
+
2879
+ /**
2880
+ * Unique identifier for the loyalty rule
2881
+ */
2882
+ loyaltyRuleId: string | null;
2883
+ }
2884
+
2885
+ export namespace Association {
2886
+ export interface LoyaltyRule {
2887
+ /**
2888
+ * Name of the loyalty rule
2889
+ */
2890
+ name: string;
2891
+ }
2892
+ }
2893
+ }
2894
+ }
2895
+
2896
+ export interface Metadata {
2897
+ /**
2898
+ * Array of loyalty rule IDs that count as check-in when completed. If ["any"] then
2899
+ * any rule completions count as check-in.
2900
+ */
2901
+ autoCheckInRuleIds?: Array<(string & {}) | 'any'> | null;
2902
+
2903
+ /**
2904
+ * Number of tokens per batch.
2905
+ */
2906
+ batchSize?: number | null;
2907
+
2908
+ /**
2909
+ * Text displayed on the action button.
2910
+ */
2911
+ buttonText?: string | null;
2912
+
2913
+ /**
2914
+ * Flag indicating if commenting is required.
2915
+ */
2916
+ checkComment?: boolean | null;
2917
+
2918
+ /**
2919
+ * Flag indicating if liking the post is required.
2920
+ */
2921
+ checkLike?: boolean | null;
2922
+
2923
+ /**
2924
+ * Flag indicating if reposting is required.
2925
+ */
2926
+ checkRepost?: boolean | null;
2927
+
2928
+ /**
2929
+ * Text to check in the Twitter post, username, or bio.
2930
+ */
2931
+ checkText?: string | Array<string> | null;
2932
+
2933
+ /**
2934
+ * Array of collections associated with the rule.
2935
+ */
2936
+ collection?: Array<Metadata.Collection>;
2937
+
2938
+ /**
2939
+ * Conditions for completing the profile.
2940
+ */
2941
+ completeProfileConditions?: { [key: string]: boolean } | null;
2942
+
2943
+ /**
2944
+ * Description of the external rule condition (only for external rules)
2945
+ */
2946
+ conditionDescription?: string;
2947
+
2948
+ /**
2949
+ * Object containing details for the call-to-action.
2950
+ */
2951
+ cta?: Metadata.Cta | null;
2952
+
2953
+ /**
2954
+ * API key for custom rewards integration.
2955
+ */
2956
+ customRewardsApiKey?: string;
2957
+
2958
+ /**
2959
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
2960
+ */
2961
+ directRpc?: boolean;
2962
+
2963
+ /**
2964
+ * Array of Discord servers, channels, and roles to join.
2965
+ */
2966
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2967
+
2968
+ /**
2969
+ * Array of drip quests required to complete the rule.
2970
+ */
2971
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2972
+
2973
+ /**
2974
+ * Flag indicating whether joining Discord servers is required.
2975
+ */
2976
+ enableJoinDiscordServers?: boolean | null;
2977
+
2978
+ /**
2979
+ * Flag indicating whether streaks are enabled.
2980
+ */
2981
+ enableStreaks?: boolean | null;
2982
+
2983
+ /**
2984
+ * Flag indicating whether the verified multiplier is enabled.
2985
+ */
2986
+ enableVerifiedMultiplier?: boolean;
2987
+
2988
+ /**
2989
+ * Type of ERC20 token for the loyalty rule.
2990
+ */
2991
+ erc20Type?: 'erc20' | 'native';
2992
+
2993
+ /**
2994
+ * Fill source of the order for the token sale
2995
+ */
2996
+ fillSource?: string;
2997
+
2998
+ /**
2999
+ * Percentage reward given to a user for their first referral.
3000
+ */
3001
+ firstReferralReward?: number | null;
3002
+
3003
+ /**
3004
+ * Name of the GitHub branch to check for PR merge.
3005
+ */
3006
+ githubBranchName?: string | null;
3007
+
3008
+ /**
3009
+ * URL of the GitHub repository to check for star.
3010
+ */
3011
+ githubRepoUrl?: string | null;
3012
+
3013
+ /**
3014
+ * Flag indicating whether the fill source is included.
3015
+ */
3016
+ hasFillSource?: boolean;
3017
+
3018
+ /**
3019
+ * Indicates if the item has never been sold.
3020
+ */
3021
+ hasNeverSold?: boolean;
3022
+
3023
+ /**
3024
+ * Indicates if the full royalty has been paid for items.
3025
+ */
3026
+ hasPaidFullRoyalty?: boolean;
3027
+
3028
+ /**
3029
+ * Flag indicating if the sale currency is included.
3030
+ */
3031
+ hasSaleCurrency?: boolean;
3032
+
3033
+ /**
3034
+ * Indicates if the user has a verified Twitter account.
3035
+ */
3036
+ hasVerifiedTwitter?: boolean;
3037
+
3038
+ /**
3039
+ * URL of the image associated with the rule.
3040
+ */
3041
+ imageUrl?: string | null;
3042
+
3043
+ /**
3044
+ * If enabled, the first transaction done on the platform will complete this rule
3045
+ */
3046
+ isCheckInOnEveryTxn?: boolean;
3047
+
3048
+ /**
3049
+ * Indicates if the multiplier has been applied to rewards.
3050
+ */
3051
+ isMultiplierApplied?: boolean;
3052
+
3053
+ /**
3054
+ * Flag indicating if the rule is restricted to new users.
3055
+ */
3056
+ isRestrictedToNewUsers?: boolean;
3057
+
3058
+ /**
3059
+ * Flag indicating if rewards are applied retroactively.
3060
+ */
3061
+ isRetroactive?: boolean | null;
3062
+
3063
+ /**
3064
+ * Flag indicating if the token hold multiplier is applied.
3065
+ */
3066
+ isTokenHoldMultiplier?: boolean;
3067
+
3068
+ /**
3069
+ * Optional link associated with the metadata.
3070
+ */
3071
+ link?: string | null;
3072
+
3073
+ /**
3074
+ * Liquidity pool details.
3075
+ */
3076
+ liquidity?: Metadata.Liquidity;
3077
+
3078
+ /**
3079
+ * Maximum quantity constraint for token holding.
3080
+ */
3081
+ maxQty?: number | null;
3082
+
3083
+ /**
3084
+ * Minimum quantity constraint for token holding.
3085
+ */
3086
+ minQty?: number | null;
3087
+
3088
+ /**
3089
+ * Array of loyalty currency IDs used for multipliers.
3090
+ */
3091
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
3092
+
3093
+ /**
3094
+ * Flag indicating whether to include only known users.
3095
+ */
3096
+ onlyKnownUsers?: boolean;
3097
+
3098
+ /**
3099
+ * Flag indicating whether to include only native tokens.
3100
+ */
3101
+ onlyNative?: boolean;
3102
+
3103
+ /**
3104
+ * Flag indicating whether to include only non-listed items.
3105
+ */
3106
+ onlyNonListed?: boolean;
3107
+
3108
+ /**
3109
+ * Indicates if only existing users are rewarded.
3110
+ */
3111
+ onlyRewardExistingUser?: boolean;
3112
+
3113
+ /**
3114
+ * give points for only one token ownership per contract
3115
+ */
3116
+ onlyRewardSingleTokenOwnership?: boolean | null;
3117
+
3118
+ /**
3119
+ * Promotional code associated with the rule.
3120
+ */
3121
+ promoCode?: string;
3122
+
3123
+ /**
3124
+ * URL of the CSV file containing promo codes.
3125
+ */
3126
+ promoCodeCsvUrl?: string;
3127
+
3128
+ /**
3129
+ * Numbers of the promotional code to be generated.
3130
+ */
3131
+ promoCodeLength?: number | null;
3132
+
3133
+ /**
3134
+ * Type of the promotional code.
3135
+ */
3136
+ promoCodeType?: 'code' | 'csv' | 'generate';
3137
+
3138
+ /**
3139
+ * Array defining ranges and corresponding rewards.
3140
+ */
3141
+ range?: Array<Metadata.Range>;
3142
+
3143
+ /**
3144
+ * ID of the Reddit post.
3145
+ */
3146
+ redditPostId?: string | null;
3147
+
3148
+ /**
3149
+ * Object defining referral requirements.
3150
+ */
3151
+ referralRequirements?: Metadata.ReferralRequirements | null;
3152
+
3153
+ /**
3154
+ * Lump sum reward given to a referrer.
3155
+ */
3156
+ referrerReward?: number | null;
3157
+
3158
+ /**
3159
+ * Loyalty currency ID of the referrer reward.
3160
+ */
3161
+ referrerRewardLoyaltyCurrencyId?: string | null;
3162
+
3163
+ /**
3164
+ * Flag indicating if the post link is required.
3165
+ */
3166
+ requirePostLink?: boolean | null;
3167
+
3168
+ /**
3169
+ * Flag indicating if media metadata is required.
3170
+ */
3171
+ requirePostMediaLink?: boolean | null;
3172
+
3173
+ /**
3174
+ * Flag indicating if the rule can also reward badges per range.
3175
+ */
3176
+ rewardBadgePerRange?: boolean;
3177
+
3178
+ /**
3179
+ * Flag indicating if the reward is rewarded by batch.
3180
+ */
3181
+ rewardByBatch?: boolean | null;
3182
+
3183
+ /**
3184
+ * Criteria to evaluate the reward.
3185
+ */
3186
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
3187
+
3188
+ /**
3189
+ * Flag indicating if the reward is rewarded per action.
3190
+ */
3191
+ rewardPerAction?: boolean | null;
3192
+
3193
+ /**
3194
+ * Flag indicating if rewards are given per impression.
3195
+ */
3196
+ rewardPerImpression?: boolean | null;
3197
+
3198
+ /**
3199
+ * Flag indicating if the rule should reward based on value of traded tokens
3200
+ * instead of count.
3201
+ */
3202
+ rewardPerValue?: boolean;
3203
+
3204
+ /**
3205
+ * Flag indicating if the rule should reward quality posts.
3206
+ */
3207
+ rewardQualityPosts?: boolean;
3208
+
3209
+ /**
3210
+ * Wallet address of the user can only be used if userId is not provided
3211
+ */
3212
+ royaltyAddress?: string;
3213
+
3214
+ /**
3215
+ * Royalty percentage of the item.
3216
+ */
3217
+ royaltyPercentage?: number;
3218
+
3219
+ /**
3220
+ * Currency associated with sales.
3221
+ */
3222
+ saleCurrency?: string;
3223
+
3224
+ /**
3225
+ * Percentage reward given for a second-level referral.
3226
+ */
3227
+ secondReferralReward?: number | null;
3228
+
3229
+ /**
3230
+ * Flag indicating if the multiplier is skipped.
3231
+ */
3232
+ skipMultiplier?: boolean | null;
3233
+
3234
+ /**
3235
+ * Object containing details of the associated smart contract.
3236
+ */
3237
+ smartContract?: Metadata.SmartContract;
3238
+
3239
+ /**
3240
+ * Array of snapshot proposals for the rule.
3241
+ */
3242
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
3243
+
3244
+ /**
3245
+ * Social media platform associated with the rule.
3246
+ */
3247
+ socialPlatform?:
3248
+ | 'Custom'
3249
+ | 'Discord'
3250
+ | 'EpicGames'
3251
+ | 'Instagram'
3252
+ | 'Steam'
3253
+ | 'Telegram'
3254
+ | 'TikTok'
3255
+ | 'Twitch'
3256
+ | 'X(Twitter)'
3257
+ | 'YouTube'
3258
+ | 'Google'
3259
+ | 'GitHub'
3260
+ | 'Reddit'
3261
+ | null;
3262
+
3263
+ /**
3264
+ * URL of the social platform's logo.
3265
+ */
3266
+ socialPlatformLogo?: string | null;
3267
+
3268
+ /**
3269
+ * Name of the social platform.
3270
+ */
3271
+ socialPlatformName?: string | null;
3272
+
3273
+ /**
3274
+ * ID of the Steam app.
3275
+ */
3276
+ steamAppId?: string | null;
3277
+
3278
+ /**
3279
+ * Array of streak milestones and corresponding rewards.
3280
+ */
3281
+ streakArray?: Array<Metadata.StreakArray> | null;
3282
+
3283
+ /**
3284
+ * Metadata for swap loyalty rules
3285
+ */
3286
+ swap?: Metadata.Swap;
3287
+
3288
+ /**
3289
+ * ID of the Telegram channel.
3290
+ */
3291
+ telegramChannelId?: string | null;
3292
+
3293
+ /**
3294
+ * Time delay in seconds to verify actions.
3295
+ */
3296
+ timeDelayToVerifySeconds?: string | number | null;
3297
+
3298
+ /**
3299
+ * Flag indicating if all contracts are tracked.
3300
+ */
3301
+ trackAllContracts?: boolean | null;
3302
+
3303
+ /**
3304
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
3305
+ * completed once the progress is 100%.
3306
+ */
3307
+ trackProgress?: boolean | null;
3308
+
3309
+ /**
3310
+ * URL of the associated Twitter account.
3311
+ */
3312
+ twitterAccountUrl?: string;
3313
+
3314
+ /**
3315
+ * Hashtag associated with the Twitter post.
3316
+ */
3317
+ twitterHashtag?: string;
3318
+
3319
+ /**
3320
+ * URL of the associated Twitter post.
3321
+ */
3322
+ twitterPostUrl?: string;
3323
+
3324
+ /**
3325
+ * Unique identifier of the Twitter user.
3326
+ */
3327
+ twitterUserId?: string;
3328
+
3329
+ /**
3330
+ * Twitter username of the user.
3331
+ */
3332
+ twitterUsername?: string;
3333
+
3334
+ /**
3335
+ * Minimum length of the verification text.
3336
+ */
3337
+ verificationTextMinimumLength?: number | null;
3338
+
3339
+ /**
3340
+ * Multiplier applied to rewards for verified users.
3341
+ */
3342
+ verifiedMultiplier?: number | null;
3343
+
3344
+ /**
3345
+ * Placeholder text for verification input fields.
3346
+ */
3347
+ verifyPlaceHolderText?: string | null;
3348
+
3349
+ /**
3350
+ * Type of wallet associated with the rule.
3351
+ */
3352
+ walletType?:
3353
+ | 'evm'
3354
+ | 'solana'
3355
+ | 'imx'
3356
+ | 'sui'
3357
+ | 'ton'
3358
+ | 'cosmos'
3359
+ | 'ultra'
3360
+ | 'agw'
3361
+ | 'flow_cadence'
3362
+ | 'substrate'
3363
+ | null;
3364
+
3365
+ /**
3366
+ * ID of the Youtube channel.
3367
+ */
3368
+ youtubeChannelId?: string | null;
3369
+
3370
+ /**
3371
+ * ID of the Youtube video.
3372
+ */
3373
+ youtubeVideoId?: string | null;
3374
+ }
3375
+
3376
+ export namespace Metadata {
3377
+ export interface Collection {
3378
+ /**
3379
+ * Blockchain address of the collection.
3380
+ */
3381
+ address?: string;
3382
+
3383
+ /**
3384
+ * Multiplier applied to the rewards for this collection.
3385
+ */
3386
+ multiplier?: number;
3387
+
3388
+ /**
3389
+ * Blockchain network of the collection.
3390
+ */
3391
+ network?:
3392
+ | 'abstract'
3393
+ | 'abstractTestnet'
3394
+ | 'apechain'
3395
+ | 'arbitrum'
3396
+ | 'avalanche'
3397
+ | 'avalancheFuji'
3398
+ | 'base'
3399
+ | 'baseSepolia'
3400
+ | 'berachain'
3401
+ | 'berachainArtio'
3402
+ | 'berachainBepolia'
3403
+ | 'binance'
3404
+ | 'bscTestnet'
3405
+ | 'campTestnet'
3406
+ | 'fantom'
3407
+ | 'fantomTestnet'
3408
+ | 'flowMainnet'
3409
+ | 'mainnet'
3410
+ | 'nexusTestnet'
3411
+ | 'optimism'
3412
+ | 'polygon'
3413
+ | 'polygon_mumbai'
3414
+ | 'skaleNebula'
3415
+ | 'skaleEuropa'
3416
+ | 'skaleCalypso'
3417
+ | 'solana'
3418
+ | 'sophon'
3419
+ | 'sophonTestnet'
3420
+ | 'sui'
3421
+ | 'superseed'
3422
+ | 'superseedSepolia'
3423
+ | 'vanar'
3424
+ | 'xai'
3425
+ | 'zksync'
3426
+ | 'coti'
3427
+ | 'cotiTestnet'
3428
+ | 'morph'
3429
+ | 'morphTestnet'
3430
+ | 'morphHolesky'
3431
+ | 'ultra'
3432
+ | 'ultraTestnet'
3433
+ | 'nitrograph'
3434
+ | 'sepolia'
3435
+ | 'optimism_sepolia'
3436
+ | 'arbitrumSepolia'
3437
+ | 'goerli'
3438
+ | 'optimism_goerli'
3439
+ | 'arbitrumGoerli'
3440
+ | 'basecamp'
3441
+ | 'somnia'
3442
+ | 'zkverify'
3443
+ | 'polkadot'
3444
+ | 'kusama'
3445
+ | 'flow_cadence';
3446
+ }
3447
+
3448
+ /**
3449
+ * Object containing details for the call-to-action.
3450
+ */
3451
+ export interface Cta {
3452
+ /**
3453
+ * Link for the call-to-action.
3454
+ */
3455
+ href?: string | null;
3456
+
3457
+ /**
3458
+ * Label for the call-to-action.
3459
+ */
3460
+ label?: string | null;
3461
+ }
3462
+
3463
+ export interface DiscordServersToJoin {
3464
+ /**
3465
+ * ID of the Discord server to join.
3466
+ */
3467
+ id?: string;
3468
+
3469
+ /**
3470
+ * Array of Discord channels to join.
3471
+ */
3472
+ channels?: Array<DiscordServersToJoin.Channel>;
3473
+
3474
+ /**
3475
+ * Array of roles to assign in the Discord server.
3476
+ */
3477
+ roles?: Array<DiscordServersToJoin.Role>;
3478
+ }
3479
+
3480
+ export namespace DiscordServersToJoin {
3481
+ export interface Channel {
3482
+ /**
3483
+ * ID of the Discord channel.
3484
+ */
3485
+ id?: string;
3486
+
3487
+ /**
3488
+ * Array of emojis used in the channel.
3489
+ */
3490
+ emojis?: Array<Channel.Emoji>;
3491
+
3492
+ /**
3493
+ * Phrase of text to be present in the discord message
3494
+ */
3495
+ text?: string;
3496
+ }
3497
+
3498
+ export namespace Channel {
3499
+ export interface Emoji {
3500
+ /**
3501
+ * ID of the emoji used in the channel.
3502
+ */
3503
+ id?: string;
3504
+ }
3505
+ }
3506
+
3507
+ export interface Role {
3508
+ /**
3509
+ * ID of the role in the Discord server.
3510
+ */
3511
+ id: string;
3512
+ }
3513
+ }
3514
+
3515
+ export interface DripQuestsToComplete {
3516
+ /**
3517
+ * ID of the drip quest to complete.
3518
+ */
3519
+ id: string;
3520
+ }
3521
+
3522
+ /**
3523
+ * Liquidity pool details.
3524
+ */
3525
+ export interface Liquidity {
3526
+ /**
3527
+ * Calculation type of the liquidity pool.
3528
+ */
3529
+ calculationType?: 'fixed' | 'custom';
3530
+
3531
+ /**
3532
+ * Custom function to calculate the the reward amount based on the liquidity
3533
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
3534
+ * USD.
3535
+ */
3536
+ customFunction?: string;
3537
+
3538
+ /**
3539
+ * Liquidity provided per day in USD
3540
+ */
3541
+ liquidityPerDay?: number;
3542
+
3543
+ /**
3544
+ * Blockchain network of the liquidity pool.
3545
+ */
3546
+ network?:
3547
+ | 'abstract'
3548
+ | 'abstractTestnet'
3549
+ | 'apechain'
3550
+ | 'arbitrum'
3551
+ | 'avalanche'
3552
+ | 'avalancheFuji'
3553
+ | 'base'
3554
+ | 'baseSepolia'
3555
+ | 'berachain'
3556
+ | 'berachainArtio'
3557
+ | 'berachainBepolia'
3558
+ | 'binance'
3559
+ | 'bscTestnet'
3560
+ | 'campTestnet'
3561
+ | 'fantom'
3562
+ | 'fantomTestnet'
3563
+ | 'flowMainnet'
3564
+ | 'mainnet'
3565
+ | 'nexusTestnet'
3566
+ | 'optimism'
3567
+ | 'polygon'
3568
+ | 'polygon_mumbai'
3569
+ | 'skaleNebula'
3570
+ | 'skaleEuropa'
3571
+ | 'skaleCalypso'
3572
+ | 'solana'
3573
+ | 'sophon'
3574
+ | 'sophonTestnet'
3575
+ | 'sui'
3576
+ | 'superseed'
3577
+ | 'superseedSepolia'
3578
+ | 'vanar'
3579
+ | 'xai'
3580
+ | 'zksync'
3581
+ | 'coti'
3582
+ | 'cotiTestnet'
3583
+ | 'morph'
3584
+ | 'morphTestnet'
3585
+ | 'morphHolesky'
3586
+ | 'ultra'
3587
+ | 'ultraTestnet'
3588
+ | 'nitrograph'
3589
+ | 'sepolia'
3590
+ | 'optimism_sepolia'
3591
+ | 'arbitrumSepolia'
3592
+ | 'goerli'
3593
+ | 'optimism_goerli'
3594
+ | 'arbitrumGoerli'
3595
+ | 'basecamp'
3596
+ | 'somnia'
3597
+ | 'zkverify'
3598
+ | 'polkadot'
3599
+ | 'kusama'
3600
+ | 'flow_cadence';
3601
+
3602
+ /**
3603
+ * Indicates if only in-range liquidity is rewarded.
3604
+ */
3605
+ onlyRewardInRangeLiquidity?: boolean;
3606
+
3607
+ /**
3608
+ * Array of liquidity pools associated with the rule.
3609
+ */
3610
+ pools?: Array<Liquidity.Pool>;
3611
+
3612
+ /**
3613
+ * Protocol of the liquidity pool.
3614
+ */
3615
+ protocol?: string;
3616
+ }
3617
+
3618
+ export namespace Liquidity {
3619
+ export interface Pool {
3620
+ /**
3621
+ * Unique identifier of the liquidity pool.
3622
+ */
3623
+ id: string;
3624
+ }
3625
+ }
3626
+
3627
+ export interface Range {
3628
+ /**
3629
+ * Reward amount for this range.
3630
+ */
3631
+ amount: number;
3632
+
3633
+ /**
3634
+ * End value of the range.
3635
+ */
3636
+ endRange: number;
3637
+
3638
+ /**
3639
+ * Start value of the range.
3640
+ */
3641
+ startRange: number;
3642
+
3643
+ /**
3644
+ * ID of the loyalty badge for this range.
3645
+ */
3646
+ loyaltyBadgeId?: string;
3647
+
3648
+ /**
3649
+ * Amount of the loyalty multiplier for this range.
3650
+ */
3651
+ loyaltyMultiplierAmount?: number;
3652
+ }
3653
+
3654
+ /**
3655
+ * Object defining referral requirements.
3656
+ */
3657
+ export interface ReferralRequirements {
3658
+ /**
3659
+ * Flag indicating if achieving points is required.
3660
+ */
3661
+ achievePoints?: boolean | null;
3662
+
3663
+ /**
3664
+ * Flag indicating if completing the profile is required.
3665
+ */
3666
+ completeProfile?: boolean | null;
3667
+
3668
+ /**
3669
+ * Flag indicating if connecting Discord is required.
3670
+ */
3671
+ connectDiscord?: boolean | null;
3672
+
3673
+ /**
3674
+ * Flag indicating if connecting email is required.
3675
+ */
3676
+ connectEmail?: boolean | null;
3677
+
3678
+ /**
3679
+ * Flag indicating if connecting Twitter is required.
3680
+ */
3681
+ connectTwitter?: boolean | null;
3682
+
3683
+ points?: ReferralRequirements.Points | null;
3684
+ }
3685
+
3686
+ export namespace ReferralRequirements {
3687
+ export interface Points {
3688
+ /**
3689
+ * Points required for referral.
3690
+ */
3691
+ amount?: number | null;
3692
+
3693
+ /**
3694
+ * ID of the loyalty currency for referral.
3695
+ */
3696
+ loyaltyCurrecyId?: string | null;
3697
+ }
3698
+ }
3699
+
3700
+ /**
3701
+ * Object containing details of the associated smart contract.
3702
+ */
3703
+ export interface SmartContract {
3704
+ /**
3705
+ * Mapping of addresses for the smart contract.
3706
+ */
3707
+ addressMapping?: string | null;
3708
+
3709
+ /**
3710
+ * Object containing details of the amount multiplier from the event.
3711
+ */
3712
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3713
+
3714
+ /**
3715
+ * ID of the smart contract.
3716
+ */
3717
+ contractId?: string | null;
3718
+
3719
+ /**
3720
+ * Criteria to evaluate the smart contract event.
3721
+ */
3722
+ criteria?: 'everyEvent' | 'byParameter' | null;
3723
+
3724
+ /**
3725
+ * Event emitted by the smart contract.
3726
+ */
3727
+ event?: string | null;
3728
+
3729
+ /**
3730
+ * Array of parameters for the smart contract.
3731
+ */
3732
+ params?: Array<SmartContract.Param> | null;
3733
+
3734
+ /**
3735
+ * Type of the smart contract interaction.
3736
+ */
3737
+ type?: 'function' | 'event' | null;
3738
+ }
3739
+
3740
+ export namespace SmartContract {
3741
+ /**
3742
+ * Object containing details of the amount multiplier from the event.
3743
+ */
3744
+ export interface AmountMultiplier {
3745
+ /**
3746
+ * Mapping of the value for the smart contract.
3747
+ */
3748
+ valueMapping?: string | null;
3749
+ }
3750
+
3751
+ export interface Param {
3752
+ /**
3753
+ * Condition to check for the parameter.
3754
+ */
3755
+ condition?: string | null;
3756
+
3757
+ /**
3758
+ * Name of the smart contract parameter.
3759
+ */
3760
+ name?: string | null;
3761
+
3762
+ /**
3763
+ * Value of the parameter.
3764
+ */
3765
+ value?: string | null;
3766
+ }
3767
+ }
3768
+
3769
+ export interface SnapshotProposal {
3770
+ /**
3771
+ * ID of the snapshot proposal.
3772
+ */
3773
+ id: string;
3774
+
3775
+ /**
3776
+ * Space associated with the snapshot proposal.
3777
+ */
3778
+ space: string;
3779
+ }
3780
+
3781
+ export interface StreakArray {
3782
+ /**
3783
+ * Reward amount for achieving the streak milestone.
3784
+ */
3785
+ streakAmount: number;
3786
+
3787
+ /**
3788
+ * Milestone required to achieve the streak.
3789
+ */
3790
+ streakMilestone: number;
3791
+ }
3792
+
3793
+ /**
3794
+ * Metadata for swap loyalty rules
3795
+ */
3796
+ export interface Swap {
3797
+ provider?: 'any' | 'relay' | 'lifi';
3798
+
3799
+ relayReferrerId?: string;
3800
+
3801
+ requireCrossChainSwap?: boolean;
3802
+
3803
+ swappedToChain?: 'any' | number | string;
3804
+
3805
+ swappedToTokens?: Array<Swap.SwappedToToken>;
3806
+
3807
+ tokenMode?: 'any' | 'specific';
3808
+
3809
+ trackTokenAmount?: boolean;
3810
+ }
3811
+
3812
+ export namespace Swap {
3813
+ export interface SwappedToToken {
3814
+ address: string;
3815
+
3816
+ chainId: string;
3817
+ }
3818
+ }
3819
+ }
1920
3820
  }
1921
3821
  }
1922
3822
 
@@ -1927,7 +3827,9 @@ export interface RuleDeleteResponse {
1927
3827
  }
1928
3828
 
1929
3829
  export interface RuleCompleteResponse {
1930
- message: string;
3830
+ message:
3831
+ | 'Completion request added to queue'
3832
+ | 'Link click being verified, come back later to check the status';
1931
3833
  }
1932
3834
 
1933
3835
  export interface RuleGetStatusResponse {
@@ -1938,11 +3840,119 @@ export namespace RuleGetStatusResponse {
1938
3840
  export interface Data {
1939
3841
  loyaltyRuleId: string;
1940
3842
 
1941
- status: 'pending' | 'processing' | 'completed' | 'failed';
1942
-
1943
3843
  userId: string;
1944
3844
 
3845
+ /**
3846
+ * The ID of the loyalty rule status for the Progress object
3847
+ */
3848
+ id?: string;
3849
+
3850
+ createdAt?: string;
3851
+
3852
+ fulfilledAt?: string | null;
3853
+
3854
+ /**
3855
+ * Categorized examples of messages that may be returned for a loyalty rule's
3856
+ * processing result.
3857
+ *
3858
+ * User Onboarding
3859
+ *
3860
+ * - Check In: "Streak successful"
3861
+ * - Complete Profile Details: "Profile not complete"
3862
+ *
3863
+ * Connect Accounts
3864
+ *
3865
+ * - Connect TikTok: "TikTok not connected"
3866
+ * - Connect Discord: "Discord not connected", "Discord request timeout"
3867
+ * - Connect X: "Twitter not connected", "Twitter not connected or content url is
3868
+ * required"
3869
+ * - Connect Email: "Email address not connected"
3870
+ * - Connect Telegram: "Telegram not connected", "user has not setup telegram (no
3871
+ * telegramUsername), please setup username in telegram and reconnect.",
3872
+ * "Telegram request rate-limited"
3873
+ * - Connect Steam: "Steam not connected"
3874
+ * - Connect Youtube: "Youtube not connected"
3875
+ *
3876
+ * Social Quests
3877
+ *
3878
+ * - Join Telegram Group: "Telegram Channel not joined", "Telegram Channel joined
3879
+ * successfully"
3880
+ * - Post on TikTok: "TikTok post not verified"
3881
+ * - Comment on an X Post: "Quest Completed: You have commented on the tweet",
3882
+ * "Quest Not Completed: Comment not found for the specified tweet"
3883
+ * - Repost an X Post: "Quest Completed: You have retweeted the tweet", "Quest Not
3884
+ * Completed: Retweet not found for the specified tweet", "Quest Completed: You
3885
+ * have retweeted and commented on the tweet", "Quest Not Completed: You have not
3886
+ * retweeted or commented on the tweet"
3887
+ * - Follow an X Account: "Missing required parameters: twitterUserId,
3888
+ * targetUsername", "Quest Completed: You are a follower of
3889
+ * @${targetUsername}", "Quest Not Completed: Please follow @${targetUsername}
3890
+ * and try again in few minutes"
3891
+ * - React to an X Post: "Missing required parameters: texts, twitterUserId,
3892
+ * userTweetId", "No text provided", "Quest Completed: You have posted {tweetId}
3893
+ * a tweet with the text {text}", "Quest Not Completed: Your all previous {COUNT}
3894
+ * posts are already claimed. Please post a new tweet and try again in a few
3895
+ * minutes.", "Tweet is already claimed", "Tweet does not belong to the user",
3896
+ * "Text not found in tweet", "Tweet is before the quest start time", "Tweet does
3897
+ * not have media", "Text found in tweet"
3898
+ * - Add Text to X Bio: "Missing required parameters: texts, twitterUserId", "User
3899
+ * not found", "Text found in bio", "Text not found in bio"
3900
+ * - Add Text to X Username: "Missing required parameters: texts, twitterUserId",
3901
+ * "User not found", "Text found in username", "Text not found in username"
3902
+ * - Comment on an X Post with Text: "Missing required parameters: texts,
3903
+ * twitterUserId", "Comment is already claimed", "Text found in comment", "Text
3904
+ * not found in comment", "Tweet not found or could not be retrieved"
3905
+ * - Comment on a YouTube Video: "Youtube comment added", "Youtube comment not
3906
+ * added"
3907
+ * - Subscribe to a YouTube Channel: "Youtube channel subscribed", "Quest failed,
3908
+ * please make sure you have made your subscriptions public in youtube"
3909
+ * - Get X post impressions: "You've already claimed the reward for this impression
3910
+ * range."
3911
+ * - Add an Item to Steam Wishlist: "Steam Wishlist item added", "Steam Wishlist
3912
+ * item not added"
3913
+ *
3914
+ * Complex Onchain Logic
3915
+ *
3916
+ * - Token Swap: "Swap rewards calculated successfully", "Swap rule failed"
3917
+ *
3918
+ * Other
3919
+ *
3920
+ * - Answer a Quiz: "Quiz question not configured", "No question response found",
3921
+ * "Incorrect answer", "Correct answer"
3922
+ * - Answer a Poll: "Poll question not configured", "Poll response recorded"
3923
+ * - Spend in Shopify Store: "Shopify not connected"
3924
+ * - Points Airdrop: "Seems like you're not eligible for this points airdrop."
3925
+ *
3926
+ * General
3927
+ *
3928
+ * - "Quest already completed"
3929
+ * - "Quest already completed using the same social account (${socialAccountName}),
3930
+ * with the different user."
3931
+ * - "You've already claimed the reward for this quest."
3932
+ * - "Quest not achieved, please try again."
3933
+ * - "Rule is not setup"
3934
+ * - "Request aborted due to timeout"
3935
+ * - "Google account not connected"
3936
+ * - "Claim failed: Multiplier is already active"
3937
+ */
1945
3938
  message?: string;
3939
+
3940
+ organizationId?: string;
3941
+
3942
+ /**
3943
+ * The progress of the loyalty rule from 0 to 100
3944
+ */
3945
+ progress?: number;
3946
+
3947
+ /**
3948
+ * Status of the queued job, this is only returned if the job is queued and being
3949
+ * processed, this wil be retained for 10 minutes after the job is completed
3950
+ */
3951
+ status?: 'pending' | 'processing' | 'completed' | 'failed';
3952
+
3953
+ updatedAt?: string;
3954
+
3955
+ websiteId?: string;
1946
3956
  }
1947
3957
  }
1948
3958
 
@@ -2024,6 +4034,7 @@ export interface RuleCreateParams {
2024
4034
  | 'connected_discord'
2025
4035
  | 'connected_email'
2026
4036
  | 'connected_epic'
4037
+ | 'connected_github'
2027
4038
  | 'connected_steam'
2028
4039
  | 'connected_telegram'
2029
4040
  | 'connected_twitter'
@@ -2053,7 +4064,29 @@ export interface RuleCreateParams {
2053
4064
  | 'twitter_like'
2054
4065
  | 'twitter_post_hashtag'
2055
4066
  | 'quiz'
2056
- | 'poll';
4067
+ | 'poll'
4068
+ | 'steam_wishlist'
4069
+ | 'liquidity_uniswap_v2'
4070
+ | 'liquidity_uniswap_v3'
4071
+ | 'points_airdrop'
4072
+ | 'youtube_subscribers'
4073
+ | 'youtube_comment'
4074
+ | 'shopify_spend'
4075
+ | 'swap'
4076
+ | 'tiktok_post'
4077
+ | 'post_impressions'
4078
+ | 'discord_join'
4079
+ | 'connected_youtube'
4080
+ | 'stratus_function'
4081
+ | 'connected_tiktok'
4082
+ | 'tiktok_follow'
4083
+ | 'github_repo_star'
4084
+ | 'github_repo_fork'
4085
+ | 'github_repo_collaborator'
4086
+ | 'github_merge_PR'
4087
+ | 'discord_role_grant'
4088
+ | 'connected_reddit'
4089
+ | 'reddit_comment';
2057
4090
 
2058
4091
  /**
2059
4092
  * Unique identifier for the associated website
@@ -2065,6 +4098,11 @@ export interface RuleCreateParams {
2065
4098
  */
2066
4099
  backgroundAssetUrl?: string;
2067
4100
 
4101
+ /**
4102
+ * The type of claim for the reward
4103
+ */
4104
+ claimType?: 'manual' | 'auto' | null;
4105
+
2068
4106
  /**
2069
4107
  * Blockchain address of the associated collection
2070
4108
  */
@@ -2090,6 +4128,18 @@ export interface RuleCreateParams {
2090
4128
  */
2091
4129
  description?: string;
2092
4130
 
4131
+ duplicatedFromId?: string | null;
4132
+
4133
+ /**
4134
+ * ID of the external integration
4135
+ */
4136
+ externalIntegrationId?: string | null;
4137
+
4138
+ /**
4139
+ * Optional stratus function id for the rule
4140
+ */
4141
+ functionId?: string | null;
4142
+
2093
4143
  /**
2094
4144
  * Whether to hide this rule in the user interface
2095
4145
  */
@@ -2098,18 +4148,40 @@ export interface RuleCreateParams {
2098
4148
  /**
2099
4149
  * Interval between rule executions
2100
4150
  */
2101
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
4151
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
2102
4152
 
2103
4153
  /**
2104
4154
  * Whether this rule is mandatory
2105
4155
  */
2106
4156
  isRequired?: boolean;
2107
4157
 
4158
+ /**
4159
+ * Unique identifier for the loyalty badge
4160
+ */
4161
+ loyaltyBadgeId?: string | null;
4162
+
2108
4163
  /**
2109
4164
  * Unique identifier for the loyalty rule group
2110
4165
  */
2111
4166
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
2112
4167
 
4168
+ /**
4169
+ * URL for uploading loyalty user allotment via CSV
4170
+ */
4171
+ loyaltyUserAllotmentCsvUrl?: string;
4172
+
4173
+ /**
4174
+ * The interval for the max amount. Available for the smart contract and external
4175
+ * rules.
4176
+ */
4177
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
4178
+
4179
+ /**
4180
+ * The maximum amount of points a user can earn per interval. Available for the
4181
+ * smart contract and external rules.
4182
+ */
4183
+ maxAmountPerInterval?: number | null;
4184
+
2113
4185
  /**
2114
4186
  * URL of the media to be displayed
2115
4187
  */
@@ -2119,13 +4191,17 @@ export interface RuleCreateParams {
2119
4191
  * Blockchain network where the rule will apply
2120
4192
  */
2121
4193
  network?:
4194
+ | 'abstract'
4195
+ | 'abstractTestnet'
2122
4196
  | 'apechain'
2123
4197
  | 'arbitrum'
2124
4198
  | 'avalanche'
2125
4199
  | 'avalancheFuji'
2126
4200
  | 'base'
2127
4201
  | 'baseSepolia'
4202
+ | 'berachain'
2128
4203
  | 'berachainArtio'
4204
+ | 'berachainBepolia'
2129
4205
  | 'binance'
2130
4206
  | 'bscTestnet'
2131
4207
  | 'campTestnet'
@@ -2133,18 +4209,30 @@ export interface RuleCreateParams {
2133
4209
  | 'fantomTestnet'
2134
4210
  | 'flowMainnet'
2135
4211
  | 'mainnet'
4212
+ | 'nexusTestnet'
2136
4213
  | 'optimism'
2137
4214
  | 'polygon'
2138
4215
  | 'polygon_mumbai'
2139
4216
  | 'skaleNebula'
4217
+ | 'skaleEuropa'
4218
+ | 'skaleCalypso'
2140
4219
  | 'solana'
2141
4220
  | 'sophon'
4221
+ | 'sophonTestnet'
2142
4222
  | 'sui'
2143
4223
  | 'superseed'
2144
4224
  | 'superseedSepolia'
2145
4225
  | 'vanar'
2146
4226
  | 'xai'
2147
4227
  | 'zksync'
4228
+ | 'coti'
4229
+ | 'cotiTestnet'
4230
+ | 'morph'
4231
+ | 'morphTestnet'
4232
+ | 'morphHolesky'
4233
+ | 'ultra'
4234
+ | 'ultraTestnet'
4235
+ | 'nitrograph'
2148
4236
  | 'sepolia'
2149
4237
  | 'optimism_sepolia'
2150
4238
  | 'arbitrumSepolia'
@@ -2152,22 +4240,41 @@ export interface RuleCreateParams {
2152
4240
  | 'optimism_goerli'
2153
4241
  | 'arbitrumGoerli'
2154
4242
  | 'basecamp'
2155
- | 'abstract';
4243
+ | 'somnia'
4244
+ | 'zkverify'
4245
+ | 'polkadot'
4246
+ | 'kusama'
4247
+ | 'flow_cadence';
2156
4248
 
2157
4249
  /**
2158
4250
  * OAuth credentials associated with the rule
2159
4251
  */
2160
4252
  oauthCredentialsId?: string | null;
2161
4253
 
4254
+ /**
4255
+ * The lifetime of the reward
4256
+ */
4257
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
4258
+
2162
4259
  /**
2163
4260
  * Type of reward issued by the rule
2164
4261
  */
2165
- rewardType?: 'points' | 'multiplier';
4262
+ rewardType?: 'points' | 'multiplier' | 'badge';
4263
+
4264
+ /**
4265
+ * URL of the Shopify store
4266
+ */
4267
+ shopifyStoreUrl?: string | null;
4268
+
4269
+ /**
4270
+ * Whether to show this rule before the start time
4271
+ */
4272
+ showBeforeStart?: boolean;
2166
4273
 
2167
4274
  /**
2168
- * Identifier for associated subscriptions
4275
+ * Optional stratus subscription id for the rule
2169
4276
  */
2170
- subscriptionIdentifier?: string | null;
4277
+ subscriptionId?: string | null;
2171
4278
  }
2172
4279
 
2173
4280
  export namespace RuleCreateParams {
@@ -2175,6 +4282,17 @@ export namespace RuleCreateParams {
2175
4282
  * Additional metadata for the loyalty rule
2176
4283
  */
2177
4284
  export interface Metadata {
4285
+ /**
4286
+ * Array of loyalty rule IDs that count as check-in when completed. If ["any"] then
4287
+ * any rule completions count as check-in.
4288
+ */
4289
+ autoCheckInRuleIds?: Array<(string & {}) | 'any'> | null;
4290
+
4291
+ /**
4292
+ * Number of tokens per batch.
4293
+ */
4294
+ batchSize?: number | null;
4295
+
2178
4296
  /**
2179
4297
  * Text displayed on the action button.
2180
4298
  */
@@ -2198,7 +4316,7 @@ export namespace RuleCreateParams {
2198
4316
  /**
2199
4317
  * Text to check in the Twitter post, username, or bio.
2200
4318
  */
2201
- checkText?: string | null;
4319
+ checkText?: string | Array<string> | null;
2202
4320
 
2203
4321
  /**
2204
4322
  * Array of collections associated with the rule.
@@ -2208,7 +4326,12 @@ export namespace RuleCreateParams {
2208
4326
  /**
2209
4327
  * Conditions for completing the profile.
2210
4328
  */
2211
- completeProfileConditions?: Record<string, boolean> | null;
4329
+ completeProfileConditions?: { [key: string]: boolean } | null;
4330
+
4331
+ /**
4332
+ * Description of the external rule condition (only for external rules)
4333
+ */
4334
+ conditionDescription?: string;
2212
4335
 
2213
4336
  /**
2214
4337
  * Object containing details for the call-to-action.
@@ -2220,6 +4343,11 @@ export namespace RuleCreateParams {
2220
4343
  */
2221
4344
  customRewardsApiKey?: string;
2222
4345
 
4346
+ /**
4347
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
4348
+ */
4349
+ directRpc?: boolean;
4350
+
2223
4351
  /**
2224
4352
  * Array of Discord servers, channels, and roles to join.
2225
4353
  */
@@ -2245,6 +4373,11 @@ export namespace RuleCreateParams {
2245
4373
  */
2246
4374
  enableVerifiedMultiplier?: boolean;
2247
4375
 
4376
+ /**
4377
+ * Type of ERC20 token for the loyalty rule.
4378
+ */
4379
+ erc20Type?: 'erc20' | 'native';
4380
+
2248
4381
  /**
2249
4382
  * Fill source of the order for the token sale
2250
4383
  */
@@ -2255,6 +4388,16 @@ export namespace RuleCreateParams {
2255
4388
  */
2256
4389
  firstReferralReward?: number | null;
2257
4390
 
4391
+ /**
4392
+ * Name of the GitHub branch to check for PR merge.
4393
+ */
4394
+ githubBranchName?: string | null;
4395
+
4396
+ /**
4397
+ * URL of the GitHub repository to check for star.
4398
+ */
4399
+ githubRepoUrl?: string | null;
4400
+
2258
4401
  /**
2259
4402
  * Flag indicating whether the fill source is included.
2260
4403
  */
@@ -2265,11 +4408,6 @@ export namespace RuleCreateParams {
2265
4408
  */
2266
4409
  hasNeverSold?: boolean;
2267
4410
 
2268
- /**
2269
- * Flag indicating whether the order source is included.
2270
- */
2271
- hasOrderSource?: boolean;
2272
-
2273
4411
  /**
2274
4412
  * Indicates if the full royalty has been paid for items.
2275
4413
  */
@@ -2290,11 +4428,21 @@ export namespace RuleCreateParams {
2290
4428
  */
2291
4429
  imageUrl?: string | null;
2292
4430
 
4431
+ /**
4432
+ * If enabled, the first transaction done on the platform will complete this rule
4433
+ */
4434
+ isCheckInOnEveryTxn?: boolean;
4435
+
2293
4436
  /**
2294
4437
  * Indicates if the multiplier has been applied to rewards.
2295
4438
  */
2296
4439
  isMultiplierApplied?: boolean;
2297
4440
 
4441
+ /**
4442
+ * Flag indicating if the rule is restricted to new users.
4443
+ */
4444
+ isRestrictedToNewUsers?: boolean;
4445
+
2298
4446
  /**
2299
4447
  * Flag indicating if rewards are applied retroactively.
2300
4448
  */
@@ -2310,6 +4458,11 @@ export namespace RuleCreateParams {
2310
4458
  */
2311
4459
  link?: string | null;
2312
4460
 
4461
+ /**
4462
+ * Liquidity pool details.
4463
+ */
4464
+ liquidity?: Metadata.Liquidity;
4465
+
2313
4466
  /**
2314
4467
  * Maximum quantity constraint for token holding.
2315
4468
  */
@@ -2351,20 +4504,35 @@ export namespace RuleCreateParams {
2351
4504
  onlyRewardSingleTokenOwnership?: boolean | null;
2352
4505
 
2353
4506
  /**
2354
- * Order source of the order for the token sale
4507
+ * Promotional code associated with the rule.
4508
+ */
4509
+ promoCode?: string;
4510
+
4511
+ /**
4512
+ * URL of the CSV file containing promo codes.
2355
4513
  */
2356
- orderSource?: string;
4514
+ promoCodeCsvUrl?: string;
2357
4515
 
2358
4516
  /**
2359
- * Promotional code associated with the rule.
4517
+ * Numbers of the promotional code to be generated.
2360
4518
  */
2361
- promoCode?: string;
4519
+ promoCodeLength?: number | null;
4520
+
4521
+ /**
4522
+ * Type of the promotional code.
4523
+ */
4524
+ promoCodeType?: 'code' | 'csv' | 'generate';
2362
4525
 
2363
4526
  /**
2364
4527
  * Array defining ranges and corresponding rewards.
2365
4528
  */
2366
4529
  range?: Array<Metadata.Range>;
2367
4530
 
4531
+ /**
4532
+ * ID of the Reddit post.
4533
+ */
4534
+ redditPostId?: string | null;
4535
+
2368
4536
  /**
2369
4537
  * Object defining referral requirements.
2370
4538
  */
@@ -2375,11 +4543,67 @@ export namespace RuleCreateParams {
2375
4543
  */
2376
4544
  referrerReward?: number | null;
2377
4545
 
4546
+ /**
4547
+ * Loyalty currency ID of the referrer reward.
4548
+ */
4549
+ referrerRewardLoyaltyCurrencyId?: string | null;
4550
+
4551
+ /**
4552
+ * Flag indicating if the post link is required.
4553
+ */
4554
+ requirePostLink?: boolean | null;
4555
+
4556
+ /**
4557
+ * Flag indicating if media metadata is required.
4558
+ */
4559
+ requirePostMediaLink?: boolean | null;
4560
+
4561
+ /**
4562
+ * Flag indicating if the rule can also reward badges per range.
4563
+ */
4564
+ rewardBadgePerRange?: boolean;
4565
+
4566
+ /**
4567
+ * Flag indicating if the reward is rewarded by batch.
4568
+ */
4569
+ rewardByBatch?: boolean | null;
4570
+
4571
+ /**
4572
+ * Criteria to evaluate the reward.
4573
+ */
4574
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
4575
+
4576
+ /**
4577
+ * Flag indicating if the reward is rewarded per action.
4578
+ */
4579
+ rewardPerAction?: boolean | null;
4580
+
2378
4581
  /**
2379
4582
  * Flag indicating if rewards are given per impression.
2380
4583
  */
2381
4584
  rewardPerImpression?: boolean | null;
2382
4585
 
4586
+ /**
4587
+ * Flag indicating if the rule should reward based on value of traded tokens
4588
+ * instead of count.
4589
+ */
4590
+ rewardPerValue?: boolean;
4591
+
4592
+ /**
4593
+ * Flag indicating if the rule should reward quality posts.
4594
+ */
4595
+ rewardQualityPosts?: boolean;
4596
+
4597
+ /**
4598
+ * Wallet address of the user can only be used if userId is not provided
4599
+ */
4600
+ royaltyAddress?: string;
4601
+
4602
+ /**
4603
+ * Royalty percentage of the item.
4604
+ */
4605
+ royaltyPercentage?: number;
4606
+
2383
4607
  /**
2384
4608
  * Currency associated with sales.
2385
4609
  */
@@ -2419,6 +4643,9 @@ export namespace RuleCreateParams {
2419
4643
  | 'Twitch'
2420
4644
  | 'X(Twitter)'
2421
4645
  | 'YouTube'
4646
+ | 'Google'
4647
+ | 'GitHub'
4648
+ | 'Reddit'
2422
4649
  | null;
2423
4650
 
2424
4651
  /**
@@ -2431,11 +4658,21 @@ export namespace RuleCreateParams {
2431
4658
  */
2432
4659
  socialPlatformName?: string | null;
2433
4660
 
4661
+ /**
4662
+ * ID of the Steam app.
4663
+ */
4664
+ steamAppId?: string | null;
4665
+
2434
4666
  /**
2435
4667
  * Array of streak milestones and corresponding rewards.
2436
4668
  */
2437
4669
  streakArray?: Array<Metadata.StreakArray> | null;
2438
4670
 
4671
+ /**
4672
+ * Metadata for swap loyalty rules
4673
+ */
4674
+ swap?: Metadata.Swap;
4675
+
2439
4676
  /**
2440
4677
  * ID of the Telegram channel.
2441
4678
  */
@@ -2451,6 +4688,12 @@ export namespace RuleCreateParams {
2451
4688
  */
2452
4689
  trackAllContracts?: boolean | null;
2453
4690
 
4691
+ /**
4692
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
4693
+ * completed once the progress is 100%.
4694
+ */
4695
+ trackProgress?: boolean | null;
4696
+
2454
4697
  /**
2455
4698
  * URL of the associated Twitter account.
2456
4699
  */
@@ -2494,7 +4737,28 @@ export namespace RuleCreateParams {
2494
4737
  /**
2495
4738
  * Type of wallet associated with the rule.
2496
4739
  */
2497
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
4740
+ walletType?:
4741
+ | 'evm'
4742
+ | 'solana'
4743
+ | 'imx'
4744
+ | 'sui'
4745
+ | 'ton'
4746
+ | 'cosmos'
4747
+ | 'ultra'
4748
+ | 'agw'
4749
+ | 'flow_cadence'
4750
+ | 'substrate'
4751
+ | null;
4752
+
4753
+ /**
4754
+ * ID of the Youtube channel.
4755
+ */
4756
+ youtubeChannelId?: string | null;
4757
+
4758
+ /**
4759
+ * ID of the Youtube video.
4760
+ */
4761
+ youtubeVideoId?: string | null;
2498
4762
  }
2499
4763
 
2500
4764
  export namespace Metadata {
@@ -2513,13 +4777,17 @@ export namespace RuleCreateParams {
2513
4777
  * Blockchain network of the collection.
2514
4778
  */
2515
4779
  network?:
4780
+ | 'abstract'
4781
+ | 'abstractTestnet'
2516
4782
  | 'apechain'
2517
4783
  | 'arbitrum'
2518
4784
  | 'avalanche'
2519
4785
  | 'avalancheFuji'
2520
4786
  | 'base'
2521
4787
  | 'baseSepolia'
4788
+ | 'berachain'
2522
4789
  | 'berachainArtio'
4790
+ | 'berachainBepolia'
2523
4791
  | 'binance'
2524
4792
  | 'bscTestnet'
2525
4793
  | 'campTestnet'
@@ -2527,18 +4795,30 @@ export namespace RuleCreateParams {
2527
4795
  | 'fantomTestnet'
2528
4796
  | 'flowMainnet'
2529
4797
  | 'mainnet'
4798
+ | 'nexusTestnet'
2530
4799
  | 'optimism'
2531
4800
  | 'polygon'
2532
4801
  | 'polygon_mumbai'
2533
4802
  | 'skaleNebula'
4803
+ | 'skaleEuropa'
4804
+ | 'skaleCalypso'
2534
4805
  | 'solana'
2535
4806
  | 'sophon'
4807
+ | 'sophonTestnet'
2536
4808
  | 'sui'
2537
4809
  | 'superseed'
2538
4810
  | 'superseedSepolia'
2539
4811
  | 'vanar'
2540
4812
  | 'xai'
2541
4813
  | 'zksync'
4814
+ | 'coti'
4815
+ | 'cotiTestnet'
4816
+ | 'morph'
4817
+ | 'morphTestnet'
4818
+ | 'morphHolesky'
4819
+ | 'ultra'
4820
+ | 'ultraTestnet'
4821
+ | 'nitrograph'
2542
4822
  | 'sepolia'
2543
4823
  | 'optimism_sepolia'
2544
4824
  | 'arbitrumSepolia'
@@ -2546,7 +4826,11 @@ export namespace RuleCreateParams {
2546
4826
  | 'optimism_goerli'
2547
4827
  | 'arbitrumGoerli'
2548
4828
  | 'basecamp'
2549
- | 'abstract';
4829
+ | 'somnia'
4830
+ | 'zkverify'
4831
+ | 'polkadot'
4832
+ | 'kusama'
4833
+ | 'flow_cadence';
2550
4834
  }
2551
4835
 
2552
4836
  /**
@@ -2623,6 +4907,111 @@ export namespace RuleCreateParams {
2623
4907
  id: string;
2624
4908
  }
2625
4909
 
4910
+ /**
4911
+ * Liquidity pool details.
4912
+ */
4913
+ export interface Liquidity {
4914
+ /**
4915
+ * Calculation type of the liquidity pool.
4916
+ */
4917
+ calculationType?: 'fixed' | 'custom';
4918
+
4919
+ /**
4920
+ * Custom function to calculate the the reward amount based on the liquidity
4921
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
4922
+ * USD.
4923
+ */
4924
+ customFunction?: string;
4925
+
4926
+ /**
4927
+ * Liquidity provided per day in USD
4928
+ */
4929
+ liquidityPerDay?: number;
4930
+
4931
+ /**
4932
+ * Blockchain network of the liquidity pool.
4933
+ */
4934
+ network?:
4935
+ | 'abstract'
4936
+ | 'abstractTestnet'
4937
+ | 'apechain'
4938
+ | 'arbitrum'
4939
+ | 'avalanche'
4940
+ | 'avalancheFuji'
4941
+ | 'base'
4942
+ | 'baseSepolia'
4943
+ | 'berachain'
4944
+ | 'berachainArtio'
4945
+ | 'berachainBepolia'
4946
+ | 'binance'
4947
+ | 'bscTestnet'
4948
+ | 'campTestnet'
4949
+ | 'fantom'
4950
+ | 'fantomTestnet'
4951
+ | 'flowMainnet'
4952
+ | 'mainnet'
4953
+ | 'nexusTestnet'
4954
+ | 'optimism'
4955
+ | 'polygon'
4956
+ | 'polygon_mumbai'
4957
+ | 'skaleNebula'
4958
+ | 'skaleEuropa'
4959
+ | 'skaleCalypso'
4960
+ | 'solana'
4961
+ | 'sophon'
4962
+ | 'sophonTestnet'
4963
+ | 'sui'
4964
+ | 'superseed'
4965
+ | 'superseedSepolia'
4966
+ | 'vanar'
4967
+ | 'xai'
4968
+ | 'zksync'
4969
+ | 'coti'
4970
+ | 'cotiTestnet'
4971
+ | 'morph'
4972
+ | 'morphTestnet'
4973
+ | 'morphHolesky'
4974
+ | 'ultra'
4975
+ | 'ultraTestnet'
4976
+ | 'nitrograph'
4977
+ | 'sepolia'
4978
+ | 'optimism_sepolia'
4979
+ | 'arbitrumSepolia'
4980
+ | 'goerli'
4981
+ | 'optimism_goerli'
4982
+ | 'arbitrumGoerli'
4983
+ | 'basecamp'
4984
+ | 'somnia'
4985
+ | 'zkverify'
4986
+ | 'polkadot'
4987
+ | 'kusama'
4988
+ | 'flow_cadence';
4989
+
4990
+ /**
4991
+ * Indicates if only in-range liquidity is rewarded.
4992
+ */
4993
+ onlyRewardInRangeLiquidity?: boolean;
4994
+
4995
+ /**
4996
+ * Array of liquidity pools associated with the rule.
4997
+ */
4998
+ pools?: Array<Liquidity.Pool>;
4999
+
5000
+ /**
5001
+ * Protocol of the liquidity pool.
5002
+ */
5003
+ protocol?: string;
5004
+ }
5005
+
5006
+ export namespace Liquidity {
5007
+ export interface Pool {
5008
+ /**
5009
+ * Unique identifier of the liquidity pool.
5010
+ */
5011
+ id: string;
5012
+ }
5013
+ }
5014
+
2626
5015
  export interface Range {
2627
5016
  /**
2628
5017
  * Reward amount for this range.
@@ -2638,6 +5027,16 @@ export namespace RuleCreateParams {
2638
5027
  * Start value of the range.
2639
5028
  */
2640
5029
  startRange: number;
5030
+
5031
+ /**
5032
+ * ID of the loyalty badge for this range.
5033
+ */
5034
+ loyaltyBadgeId?: string;
5035
+
5036
+ /**
5037
+ * Amount of the loyalty multiplier for this range.
5038
+ */
5039
+ loyaltyMultiplierAmount?: number;
2641
5040
  }
2642
5041
 
2643
5042
  /**
@@ -2690,20 +5089,15 @@ export namespace RuleCreateParams {
2690
5089
  * Object containing details of the associated smart contract.
2691
5090
  */
2692
5091
  export interface SmartContract {
2693
- /**
2694
- * ABI of the smart contract.
2695
- */
2696
- abi?: string | null;
2697
-
2698
5092
  /**
2699
5093
  * Mapping of addresses for the smart contract.
2700
5094
  */
2701
5095
  addressMapping?: string | null;
2702
5096
 
2703
5097
  /**
2704
- * Array of bonus details applied to the rule.
5098
+ * Object containing details of the amount multiplier from the event.
2705
5099
  */
2706
- bonus?: Array<SmartContract.Bonus> | null;
5100
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2707
5101
 
2708
5102
  /**
2709
5103
  * ID of the smart contract.
@@ -2715,68 +5109,31 @@ export namespace RuleCreateParams {
2715
5109
  */
2716
5110
  criteria?: 'everyEvent' | 'byParameter' | null;
2717
5111
 
2718
- /**
2719
- * Time range applied to the rule.
2720
- */
2721
- customRange?: SmartContract.CustomRange | null;
2722
-
2723
5112
  /**
2724
5113
  * Event emitted by the smart contract.
2725
5114
  */
2726
5115
  event?: string | null;
2727
5116
 
2728
- /**
2729
- * Maximum value allowed for the parameter.
2730
- */
2731
- max?: number | null;
2732
-
2733
5117
  /**
2734
5118
  * Array of parameters for the smart contract.
2735
5119
  */
2736
5120
  params?: Array<SmartContract.Param> | null;
2737
5121
 
2738
5122
  /**
2739
- * Flag indicating if a bonus is applied.
2740
- */
2741
- withBonus?: boolean | null;
2742
-
2743
- /**
2744
- * Flag indicating if a custom range is applied.
5123
+ * Type of the smart contract interaction.
2745
5124
  */
2746
- withCustomRange?: boolean | null;
2747
-
2748
- /**
2749
- * Flag indicating if a maximum limit is applied.
2750
- */
2751
- withMax?: boolean | null;
5125
+ type?: 'function' | 'event' | null;
2752
5126
  }
2753
5127
 
2754
5128
  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
5129
  /**
2768
- * Time range applied to the rule.
5130
+ * Object containing details of the amount multiplier from the event.
2769
5131
  */
2770
- export interface CustomRange {
2771
- /**
2772
- * End time of the custom range.
2773
- */
2774
- endsAt?: string | null;
2775
-
5132
+ export interface AmountMultiplier {
2776
5133
  /**
2777
- * Start time of the custom range.
5134
+ * Mapping of the value for the smart contract.
2778
5135
  */
2779
- startsAt?: string | null;
5136
+ valueMapping?: string | null;
2780
5137
  }
2781
5138
 
2782
5139
  export interface Param {
@@ -2820,6 +5177,33 @@ export namespace RuleCreateParams {
2820
5177
  */
2821
5178
  streakMilestone: number;
2822
5179
  }
5180
+
5181
+ /**
5182
+ * Metadata for swap loyalty rules
5183
+ */
5184
+ export interface Swap {
5185
+ provider?: 'any' | 'relay' | 'lifi';
5186
+
5187
+ relayReferrerId?: string;
5188
+
5189
+ requireCrossChainSwap?: boolean;
5190
+
5191
+ swappedToChain?: 'any' | number | string;
5192
+
5193
+ swappedToTokens?: Array<Swap.SwappedToToken>;
5194
+
5195
+ tokenMode?: 'any' | 'specific';
5196
+
5197
+ trackTokenAmount?: boolean;
5198
+ }
5199
+
5200
+ export namespace Swap {
5201
+ export interface SwappedToToken {
5202
+ address: string;
5203
+
5204
+ chainId: string;
5205
+ }
5206
+ }
2823
5207
  }
2824
5208
 
2825
5209
  export interface Collection {
@@ -2832,13 +5216,17 @@ export namespace RuleCreateParams {
2832
5216
  * Blockchain network for the collection
2833
5217
  */
2834
5218
  network:
5219
+ | 'abstract'
5220
+ | 'abstractTestnet'
2835
5221
  | 'apechain'
2836
5222
  | 'arbitrum'
2837
5223
  | 'avalanche'
2838
5224
  | 'avalancheFuji'
2839
5225
  | 'base'
2840
5226
  | 'baseSepolia'
5227
+ | 'berachain'
2841
5228
  | 'berachainArtio'
5229
+ | 'berachainBepolia'
2842
5230
  | 'binance'
2843
5231
  | 'bscTestnet'
2844
5232
  | 'campTestnet'
@@ -2846,18 +5234,30 @@ export namespace RuleCreateParams {
2846
5234
  | 'fantomTestnet'
2847
5235
  | 'flowMainnet'
2848
5236
  | 'mainnet'
5237
+ | 'nexusTestnet'
2849
5238
  | 'optimism'
2850
5239
  | 'polygon'
2851
5240
  | 'polygon_mumbai'
2852
5241
  | 'skaleNebula'
5242
+ | 'skaleEuropa'
5243
+ | 'skaleCalypso'
2853
5244
  | 'solana'
2854
5245
  | 'sophon'
5246
+ | 'sophonTestnet'
2855
5247
  | 'sui'
2856
5248
  | 'superseed'
2857
5249
  | 'superseedSepolia'
2858
5250
  | 'vanar'
2859
5251
  | 'xai'
2860
5252
  | 'zksync'
5253
+ | 'coti'
5254
+ | 'cotiTestnet'
5255
+ | 'morph'
5256
+ | 'morphTestnet'
5257
+ | 'morphHolesky'
5258
+ | 'ultra'
5259
+ | 'ultraTestnet'
5260
+ | 'nitrograph'
2861
5261
  | 'sepolia'
2862
5262
  | 'optimism_sepolia'
2863
5263
  | 'arbitrumSepolia'
@@ -2865,7 +5265,16 @@ export namespace RuleCreateParams {
2865
5265
  | 'optimism_goerli'
2866
5266
  | 'arbitrumGoerli'
2867
5267
  | 'basecamp'
2868
- | 'abstract';
5268
+ | 'somnia'
5269
+ | 'zkverify'
5270
+ | 'polkadot'
5271
+ | 'kusama'
5272
+ | 'flow_cadence';
5273
+
5274
+ /**
5275
+ * Symbol of the collection.
5276
+ */
5277
+ symbol?: string;
2869
5278
  }
2870
5279
  }
2871
5280
 
@@ -2885,10 +5294,15 @@ export interface RuleUpdateParams {
2885
5294
  */
2886
5295
  name: string;
2887
5296
 
5297
+ /**
5298
+ * The type of claim for the reward
5299
+ */
5300
+ claimType?: 'manual' | 'auto' | null;
5301
+
2888
5302
  /**
2889
5303
  * Blockchain address of the associated collection
2890
5304
  */
2891
- collectionAddress?: string;
5305
+ collectionAddress?: string | null;
2892
5306
 
2893
5307
  /**
2894
5308
  * List of associated collections
@@ -2920,11 +5334,21 @@ export interface RuleUpdateParams {
2920
5334
  */
2921
5335
  effectiveStartTime?: string | null;
2922
5336
 
5337
+ /**
5338
+ * ID of the external integration
5339
+ */
5340
+ externalIntegrationId?: string | null;
5341
+
2923
5342
  /**
2924
5343
  * Frequency of the rule execution
2925
5344
  */
2926
5345
  frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
2927
5346
 
5347
+ /**
5348
+ * Optional stratus function id for the rule
5349
+ */
5350
+ functionId?: string | null;
5351
+
2928
5352
  /**
2929
5353
  * Whether to hide this rule in the user interface
2930
5354
  */
@@ -2933,7 +5357,7 @@ export interface RuleUpdateParams {
2933
5357
  /**
2934
5358
  * Time interval for recurring rule execution
2935
5359
  */
2936
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
5360
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
2937
5361
 
2938
5362
  /**
2939
5363
  * Whether this rule is required for participation
@@ -2945,6 +5369,18 @@ export interface RuleUpdateParams {
2945
5369
  */
2946
5370
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
2947
5371
 
5372
+ /**
5373
+ * The interval for the max amount. Available for the smart contract and external
5374
+ * rules.
5375
+ */
5376
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
5377
+
5378
+ /**
5379
+ * The maximum amount of points a user can earn per interval. Available for the
5380
+ * smart contract and external rules.
5381
+ */
5382
+ maxAmountPerInterval?: number | null;
5383
+
2948
5384
  /**
2949
5385
  * URL of the media to be displayed
2950
5386
  */
@@ -2959,13 +5395,17 @@ export interface RuleUpdateParams {
2959
5395
  * Blockchain network where the rule will apply
2960
5396
  */
2961
5397
  network?:
5398
+ | 'abstract'
5399
+ | 'abstractTestnet'
2962
5400
  | 'apechain'
2963
5401
  | 'arbitrum'
2964
5402
  | 'avalanche'
2965
5403
  | 'avalancheFuji'
2966
5404
  | 'base'
2967
5405
  | 'baseSepolia'
5406
+ | 'berachain'
2968
5407
  | 'berachainArtio'
5408
+ | 'berachainBepolia'
2969
5409
  | 'binance'
2970
5410
  | 'bscTestnet'
2971
5411
  | 'campTestnet'
@@ -2973,18 +5413,30 @@ export interface RuleUpdateParams {
2973
5413
  | 'fantomTestnet'
2974
5414
  | 'flowMainnet'
2975
5415
  | 'mainnet'
5416
+ | 'nexusTestnet'
2976
5417
  | 'optimism'
2977
5418
  | 'polygon'
2978
5419
  | 'polygon_mumbai'
2979
5420
  | 'skaleNebula'
5421
+ | 'skaleEuropa'
5422
+ | 'skaleCalypso'
2980
5423
  | 'solana'
2981
5424
  | 'sophon'
5425
+ | 'sophonTestnet'
2982
5426
  | 'sui'
2983
5427
  | 'superseed'
2984
5428
  | 'superseedSepolia'
2985
5429
  | 'vanar'
2986
5430
  | 'xai'
2987
5431
  | 'zksync'
5432
+ | 'coti'
5433
+ | 'cotiTestnet'
5434
+ | 'morph'
5435
+ | 'morphTestnet'
5436
+ | 'morphHolesky'
5437
+ | 'ultra'
5438
+ | 'ultraTestnet'
5439
+ | 'nitrograph'
2988
5440
  | 'sepolia'
2989
5441
  | 'optimism_sepolia'
2990
5442
  | 'arbitrumSepolia'
@@ -2992,17 +5444,36 @@ export interface RuleUpdateParams {
2992
5444
  | 'optimism_goerli'
2993
5445
  | 'arbitrumGoerli'
2994
5446
  | 'basecamp'
2995
- | 'abstract';
5447
+ | 'somnia'
5448
+ | 'zkverify'
5449
+ | 'polkadot'
5450
+ | 'kusama'
5451
+ | 'flow_cadence';
2996
5452
 
2997
5453
  /**
2998
5454
  * ID for associated OAuth credentials
2999
5455
  */
3000
5456
  oauthCredentialsId?: string | null;
3001
5457
 
5458
+ /**
5459
+ * The lifetime of the reward
5460
+ */
5461
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
5462
+
3002
5463
  /**
3003
5464
  * Type of reward issued by this rule
3004
5465
  */
3005
- rewardType?: 'points' | 'multiplier';
5466
+ rewardType?: 'points' | 'multiplier' | 'badge';
5467
+
5468
+ /**
5469
+ * URL of the Shopify store
5470
+ */
5471
+ shopifyStoreUrl?: string | null;
5472
+
5473
+ /**
5474
+ * Whether to show this rule before the start time
5475
+ */
5476
+ showBeforeStart?: boolean;
3006
5477
 
3007
5478
  /**
3008
5479
  * Start time for the loyalty rule
@@ -3010,9 +5481,9 @@ export interface RuleUpdateParams {
3010
5481
  startTime?: string | null;
3011
5482
 
3012
5483
  /**
3013
- * Optional subscription identifier for the rule
5484
+ * Optional stratus subscription id for the rule
3014
5485
  */
3015
- subscriptionIdentifier?: string | null;
5486
+ subscriptionId?: string | null;
3016
5487
  }
3017
5488
 
3018
5489
  export namespace RuleUpdateParams {
@@ -3026,13 +5497,17 @@ export namespace RuleUpdateParams {
3026
5497
  * Blockchain network for the collection
3027
5498
  */
3028
5499
  network:
5500
+ | 'abstract'
5501
+ | 'abstractTestnet'
3029
5502
  | 'apechain'
3030
5503
  | 'arbitrum'
3031
5504
  | 'avalanche'
3032
5505
  | 'avalancheFuji'
3033
5506
  | 'base'
3034
5507
  | 'baseSepolia'
5508
+ | 'berachain'
3035
5509
  | 'berachainArtio'
5510
+ | 'berachainBepolia'
3036
5511
  | 'binance'
3037
5512
  | 'bscTestnet'
3038
5513
  | 'campTestnet'
@@ -3040,18 +5515,30 @@ export namespace RuleUpdateParams {
3040
5515
  | 'fantomTestnet'
3041
5516
  | 'flowMainnet'
3042
5517
  | 'mainnet'
5518
+ | 'nexusTestnet'
3043
5519
  | 'optimism'
3044
5520
  | 'polygon'
3045
5521
  | 'polygon_mumbai'
3046
5522
  | 'skaleNebula'
5523
+ | 'skaleEuropa'
5524
+ | 'skaleCalypso'
3047
5525
  | 'solana'
3048
5526
  | 'sophon'
5527
+ | 'sophonTestnet'
3049
5528
  | 'sui'
3050
5529
  | 'superseed'
3051
5530
  | 'superseedSepolia'
3052
5531
  | 'vanar'
3053
5532
  | 'xai'
3054
5533
  | 'zksync'
5534
+ | 'coti'
5535
+ | 'cotiTestnet'
5536
+ | 'morph'
5537
+ | 'morphTestnet'
5538
+ | 'morphHolesky'
5539
+ | 'ultra'
5540
+ | 'ultraTestnet'
5541
+ | 'nitrograph'
3055
5542
  | 'sepolia'
3056
5543
  | 'optimism_sepolia'
3057
5544
  | 'arbitrumSepolia'
@@ -3059,13 +5546,33 @@ export namespace RuleUpdateParams {
3059
5546
  | 'optimism_goerli'
3060
5547
  | 'arbitrumGoerli'
3061
5548
  | 'basecamp'
3062
- | 'abstract';
5549
+ | 'somnia'
5550
+ | 'zkverify'
5551
+ | 'polkadot'
5552
+ | 'kusama'
5553
+ | 'flow_cadence';
5554
+
5555
+ /**
5556
+ * Symbol of the collection.
5557
+ */
5558
+ symbol?: string;
3063
5559
  }
3064
5560
 
3065
5561
  /**
3066
5562
  * Additional metadata for the loyalty rule
3067
5563
  */
3068
5564
  export interface Metadata {
5565
+ /**
5566
+ * Array of loyalty rule IDs that count as check-in when completed. If ["any"] then
5567
+ * any rule completions count as check-in.
5568
+ */
5569
+ autoCheckInRuleIds?: Array<(string & {}) | 'any'> | null;
5570
+
5571
+ /**
5572
+ * Number of tokens per batch.
5573
+ */
5574
+ batchSize?: number | null;
5575
+
3069
5576
  /**
3070
5577
  * Text displayed on the action button.
3071
5578
  */
@@ -3089,7 +5596,7 @@ export namespace RuleUpdateParams {
3089
5596
  /**
3090
5597
  * Text to check in the Twitter post, username, or bio.
3091
5598
  */
3092
- checkText?: string | null;
5599
+ checkText?: string | Array<string> | null;
3093
5600
 
3094
5601
  /**
3095
5602
  * Array of collections associated with the rule.
@@ -3099,7 +5606,12 @@ export namespace RuleUpdateParams {
3099
5606
  /**
3100
5607
  * Conditions for completing the profile.
3101
5608
  */
3102
- completeProfileConditions?: Record<string, boolean> | null;
5609
+ completeProfileConditions?: { [key: string]: boolean } | null;
5610
+
5611
+ /**
5612
+ * Description of the external rule condition (only for external rules)
5613
+ */
5614
+ conditionDescription?: string;
3103
5615
 
3104
5616
  /**
3105
5617
  * Object containing details for the call-to-action.
@@ -3111,6 +5623,11 @@ export namespace RuleUpdateParams {
3111
5623
  */
3112
5624
  customRewardsApiKey?: string;
3113
5625
 
5626
+ /**
5627
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
5628
+ */
5629
+ directRpc?: boolean;
5630
+
3114
5631
  /**
3115
5632
  * Array of Discord servers, channels, and roles to join.
3116
5633
  */
@@ -3136,6 +5653,11 @@ export namespace RuleUpdateParams {
3136
5653
  */
3137
5654
  enableVerifiedMultiplier?: boolean;
3138
5655
 
5656
+ /**
5657
+ * Type of ERC20 token for the loyalty rule.
5658
+ */
5659
+ erc20Type?: 'erc20' | 'native';
5660
+
3139
5661
  /**
3140
5662
  * Fill source of the order for the token sale
3141
5663
  */
@@ -3146,6 +5668,16 @@ export namespace RuleUpdateParams {
3146
5668
  */
3147
5669
  firstReferralReward?: number | null;
3148
5670
 
5671
+ /**
5672
+ * Name of the GitHub branch to check for PR merge.
5673
+ */
5674
+ githubBranchName?: string | null;
5675
+
5676
+ /**
5677
+ * URL of the GitHub repository to check for star.
5678
+ */
5679
+ githubRepoUrl?: string | null;
5680
+
3149
5681
  /**
3150
5682
  * Flag indicating whether the fill source is included.
3151
5683
  */
@@ -3156,11 +5688,6 @@ export namespace RuleUpdateParams {
3156
5688
  */
3157
5689
  hasNeverSold?: boolean;
3158
5690
 
3159
- /**
3160
- * Flag indicating whether the order source is included.
3161
- */
3162
- hasOrderSource?: boolean;
3163
-
3164
5691
  /**
3165
5692
  * Indicates if the full royalty has been paid for items.
3166
5693
  */
@@ -3181,11 +5708,21 @@ export namespace RuleUpdateParams {
3181
5708
  */
3182
5709
  imageUrl?: string | null;
3183
5710
 
5711
+ /**
5712
+ * If enabled, the first transaction done on the platform will complete this rule
5713
+ */
5714
+ isCheckInOnEveryTxn?: boolean;
5715
+
3184
5716
  /**
3185
5717
  * Indicates if the multiplier has been applied to rewards.
3186
5718
  */
3187
5719
  isMultiplierApplied?: boolean;
3188
5720
 
5721
+ /**
5722
+ * Flag indicating if the rule is restricted to new users.
5723
+ */
5724
+ isRestrictedToNewUsers?: boolean;
5725
+
3189
5726
  /**
3190
5727
  * Flag indicating if rewards are applied retroactively.
3191
5728
  */
@@ -3201,6 +5738,11 @@ export namespace RuleUpdateParams {
3201
5738
  */
3202
5739
  link?: string | null;
3203
5740
 
5741
+ /**
5742
+ * Liquidity pool details.
5743
+ */
5744
+ liquidity?: Metadata.Liquidity;
5745
+
3204
5746
  /**
3205
5747
  * Maximum quantity constraint for token holding.
3206
5748
  */
@@ -3242,20 +5784,35 @@ export namespace RuleUpdateParams {
3242
5784
  onlyRewardSingleTokenOwnership?: boolean | null;
3243
5785
 
3244
5786
  /**
3245
- * Order source of the order for the token sale
5787
+ * Promotional code associated with the rule.
3246
5788
  */
3247
- orderSource?: string;
5789
+ promoCode?: string;
3248
5790
 
3249
5791
  /**
3250
- * Promotional code associated with the rule.
5792
+ * URL of the CSV file containing promo codes.
3251
5793
  */
3252
- promoCode?: string;
5794
+ promoCodeCsvUrl?: string;
5795
+
5796
+ /**
5797
+ * Numbers of the promotional code to be generated.
5798
+ */
5799
+ promoCodeLength?: number | null;
5800
+
5801
+ /**
5802
+ * Type of the promotional code.
5803
+ */
5804
+ promoCodeType?: 'code' | 'csv' | 'generate';
3253
5805
 
3254
5806
  /**
3255
5807
  * Array defining ranges and corresponding rewards.
3256
5808
  */
3257
5809
  range?: Array<Metadata.Range>;
3258
5810
 
5811
+ /**
5812
+ * ID of the Reddit post.
5813
+ */
5814
+ redditPostId?: string | null;
5815
+
3259
5816
  /**
3260
5817
  * Object defining referral requirements.
3261
5818
  */
@@ -3266,11 +5823,67 @@ export namespace RuleUpdateParams {
3266
5823
  */
3267
5824
  referrerReward?: number | null;
3268
5825
 
5826
+ /**
5827
+ * Loyalty currency ID of the referrer reward.
5828
+ */
5829
+ referrerRewardLoyaltyCurrencyId?: string | null;
5830
+
5831
+ /**
5832
+ * Flag indicating if the post link is required.
5833
+ */
5834
+ requirePostLink?: boolean | null;
5835
+
5836
+ /**
5837
+ * Flag indicating if media metadata is required.
5838
+ */
5839
+ requirePostMediaLink?: boolean | null;
5840
+
5841
+ /**
5842
+ * Flag indicating if the rule can also reward badges per range.
5843
+ */
5844
+ rewardBadgePerRange?: boolean;
5845
+
5846
+ /**
5847
+ * Flag indicating if the reward is rewarded by batch.
5848
+ */
5849
+ rewardByBatch?: boolean | null;
5850
+
5851
+ /**
5852
+ * Criteria to evaluate the reward.
5853
+ */
5854
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
5855
+
5856
+ /**
5857
+ * Flag indicating if the reward is rewarded per action.
5858
+ */
5859
+ rewardPerAction?: boolean | null;
5860
+
3269
5861
  /**
3270
5862
  * Flag indicating if rewards are given per impression.
3271
5863
  */
3272
5864
  rewardPerImpression?: boolean | null;
3273
5865
 
5866
+ /**
5867
+ * Flag indicating if the rule should reward based on value of traded tokens
5868
+ * instead of count.
5869
+ */
5870
+ rewardPerValue?: boolean;
5871
+
5872
+ /**
5873
+ * Flag indicating if the rule should reward quality posts.
5874
+ */
5875
+ rewardQualityPosts?: boolean;
5876
+
5877
+ /**
5878
+ * Wallet address of the user can only be used if userId is not provided
5879
+ */
5880
+ royaltyAddress?: string;
5881
+
5882
+ /**
5883
+ * Royalty percentage of the item.
5884
+ */
5885
+ royaltyPercentage?: number;
5886
+
3274
5887
  /**
3275
5888
  * Currency associated with sales.
3276
5889
  */
@@ -3310,6 +5923,9 @@ export namespace RuleUpdateParams {
3310
5923
  | 'Twitch'
3311
5924
  | 'X(Twitter)'
3312
5925
  | 'YouTube'
5926
+ | 'Google'
5927
+ | 'GitHub'
5928
+ | 'Reddit'
3313
5929
  | null;
3314
5930
 
3315
5931
  /**
@@ -3322,11 +5938,21 @@ export namespace RuleUpdateParams {
3322
5938
  */
3323
5939
  socialPlatformName?: string | null;
3324
5940
 
5941
+ /**
5942
+ * ID of the Steam app.
5943
+ */
5944
+ steamAppId?: string | null;
5945
+
3325
5946
  /**
3326
5947
  * Array of streak milestones and corresponding rewards.
3327
5948
  */
3328
5949
  streakArray?: Array<Metadata.StreakArray> | null;
3329
5950
 
5951
+ /**
5952
+ * Metadata for swap loyalty rules
5953
+ */
5954
+ swap?: Metadata.Swap;
5955
+
3330
5956
  /**
3331
5957
  * ID of the Telegram channel.
3332
5958
  */
@@ -3342,6 +5968,12 @@ export namespace RuleUpdateParams {
3342
5968
  */
3343
5969
  trackAllContracts?: boolean | null;
3344
5970
 
5971
+ /**
5972
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
5973
+ * completed once the progress is 100%.
5974
+ */
5975
+ trackProgress?: boolean | null;
5976
+
3345
5977
  /**
3346
5978
  * URL of the associated Twitter account.
3347
5979
  */
@@ -3385,7 +6017,28 @@ export namespace RuleUpdateParams {
3385
6017
  /**
3386
6018
  * Type of wallet associated with the rule.
3387
6019
  */
3388
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
6020
+ walletType?:
6021
+ | 'evm'
6022
+ | 'solana'
6023
+ | 'imx'
6024
+ | 'sui'
6025
+ | 'ton'
6026
+ | 'cosmos'
6027
+ | 'ultra'
6028
+ | 'agw'
6029
+ | 'flow_cadence'
6030
+ | 'substrate'
6031
+ | null;
6032
+
6033
+ /**
6034
+ * ID of the Youtube channel.
6035
+ */
6036
+ youtubeChannelId?: string | null;
6037
+
6038
+ /**
6039
+ * ID of the Youtube video.
6040
+ */
6041
+ youtubeVideoId?: string | null;
3389
6042
  }
3390
6043
 
3391
6044
  export namespace Metadata {
@@ -3404,13 +6057,17 @@ export namespace RuleUpdateParams {
3404
6057
  * Blockchain network of the collection.
3405
6058
  */
3406
6059
  network?:
6060
+ | 'abstract'
6061
+ | 'abstractTestnet'
3407
6062
  | 'apechain'
3408
6063
  | 'arbitrum'
3409
6064
  | 'avalanche'
3410
6065
  | 'avalancheFuji'
3411
6066
  | 'base'
3412
6067
  | 'baseSepolia'
6068
+ | 'berachain'
3413
6069
  | 'berachainArtio'
6070
+ | 'berachainBepolia'
3414
6071
  | 'binance'
3415
6072
  | 'bscTestnet'
3416
6073
  | 'campTestnet'
@@ -3418,18 +6075,30 @@ export namespace RuleUpdateParams {
3418
6075
  | 'fantomTestnet'
3419
6076
  | 'flowMainnet'
3420
6077
  | 'mainnet'
6078
+ | 'nexusTestnet'
3421
6079
  | 'optimism'
3422
6080
  | 'polygon'
3423
6081
  | 'polygon_mumbai'
3424
6082
  | 'skaleNebula'
6083
+ | 'skaleEuropa'
6084
+ | 'skaleCalypso'
3425
6085
  | 'solana'
3426
6086
  | 'sophon'
6087
+ | 'sophonTestnet'
3427
6088
  | 'sui'
3428
6089
  | 'superseed'
3429
6090
  | 'superseedSepolia'
3430
6091
  | 'vanar'
3431
6092
  | 'xai'
3432
6093
  | 'zksync'
6094
+ | 'coti'
6095
+ | 'cotiTestnet'
6096
+ | 'morph'
6097
+ | 'morphTestnet'
6098
+ | 'morphHolesky'
6099
+ | 'ultra'
6100
+ | 'ultraTestnet'
6101
+ | 'nitrograph'
3433
6102
  | 'sepolia'
3434
6103
  | 'optimism_sepolia'
3435
6104
  | 'arbitrumSepolia'
@@ -3437,7 +6106,11 @@ export namespace RuleUpdateParams {
3437
6106
  | 'optimism_goerli'
3438
6107
  | 'arbitrumGoerli'
3439
6108
  | 'basecamp'
3440
- | 'abstract';
6109
+ | 'somnia'
6110
+ | 'zkverify'
6111
+ | 'polkadot'
6112
+ | 'kusama'
6113
+ | 'flow_cadence';
3441
6114
  }
3442
6115
 
3443
6116
  /**
@@ -3514,6 +6187,111 @@ export namespace RuleUpdateParams {
3514
6187
  id: string;
3515
6188
  }
3516
6189
 
6190
+ /**
6191
+ * Liquidity pool details.
6192
+ */
6193
+ export interface Liquidity {
6194
+ /**
6195
+ * Calculation type of the liquidity pool.
6196
+ */
6197
+ calculationType?: 'fixed' | 'custom';
6198
+
6199
+ /**
6200
+ * Custom function to calculate the the reward amount based on the liquidity
6201
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
6202
+ * USD.
6203
+ */
6204
+ customFunction?: string;
6205
+
6206
+ /**
6207
+ * Liquidity provided per day in USD
6208
+ */
6209
+ liquidityPerDay?: number;
6210
+
6211
+ /**
6212
+ * Blockchain network of the liquidity pool.
6213
+ */
6214
+ network?:
6215
+ | 'abstract'
6216
+ | 'abstractTestnet'
6217
+ | 'apechain'
6218
+ | 'arbitrum'
6219
+ | 'avalanche'
6220
+ | 'avalancheFuji'
6221
+ | 'base'
6222
+ | 'baseSepolia'
6223
+ | 'berachain'
6224
+ | 'berachainArtio'
6225
+ | 'berachainBepolia'
6226
+ | 'binance'
6227
+ | 'bscTestnet'
6228
+ | 'campTestnet'
6229
+ | 'fantom'
6230
+ | 'fantomTestnet'
6231
+ | 'flowMainnet'
6232
+ | 'mainnet'
6233
+ | 'nexusTestnet'
6234
+ | 'optimism'
6235
+ | 'polygon'
6236
+ | 'polygon_mumbai'
6237
+ | 'skaleNebula'
6238
+ | 'skaleEuropa'
6239
+ | 'skaleCalypso'
6240
+ | 'solana'
6241
+ | 'sophon'
6242
+ | 'sophonTestnet'
6243
+ | 'sui'
6244
+ | 'superseed'
6245
+ | 'superseedSepolia'
6246
+ | 'vanar'
6247
+ | 'xai'
6248
+ | 'zksync'
6249
+ | 'coti'
6250
+ | 'cotiTestnet'
6251
+ | 'morph'
6252
+ | 'morphTestnet'
6253
+ | 'morphHolesky'
6254
+ | 'ultra'
6255
+ | 'ultraTestnet'
6256
+ | 'nitrograph'
6257
+ | 'sepolia'
6258
+ | 'optimism_sepolia'
6259
+ | 'arbitrumSepolia'
6260
+ | 'goerli'
6261
+ | 'optimism_goerli'
6262
+ | 'arbitrumGoerli'
6263
+ | 'basecamp'
6264
+ | 'somnia'
6265
+ | 'zkverify'
6266
+ | 'polkadot'
6267
+ | 'kusama'
6268
+ | 'flow_cadence';
6269
+
6270
+ /**
6271
+ * Indicates if only in-range liquidity is rewarded.
6272
+ */
6273
+ onlyRewardInRangeLiquidity?: boolean;
6274
+
6275
+ /**
6276
+ * Array of liquidity pools associated with the rule.
6277
+ */
6278
+ pools?: Array<Liquidity.Pool>;
6279
+
6280
+ /**
6281
+ * Protocol of the liquidity pool.
6282
+ */
6283
+ protocol?: string;
6284
+ }
6285
+
6286
+ export namespace Liquidity {
6287
+ export interface Pool {
6288
+ /**
6289
+ * Unique identifier of the liquidity pool.
6290
+ */
6291
+ id: string;
6292
+ }
6293
+ }
6294
+
3517
6295
  export interface Range {
3518
6296
  /**
3519
6297
  * Reward amount for this range.
@@ -3529,6 +6307,16 @@ export namespace RuleUpdateParams {
3529
6307
  * Start value of the range.
3530
6308
  */
3531
6309
  startRange: number;
6310
+
6311
+ /**
6312
+ * ID of the loyalty badge for this range.
6313
+ */
6314
+ loyaltyBadgeId?: string;
6315
+
6316
+ /**
6317
+ * Amount of the loyalty multiplier for this range.
6318
+ */
6319
+ loyaltyMultiplierAmount?: number;
3532
6320
  }
3533
6321
 
3534
6322
  /**
@@ -3581,20 +6369,15 @@ export namespace RuleUpdateParams {
3581
6369
  * Object containing details of the associated smart contract.
3582
6370
  */
3583
6371
  export interface SmartContract {
3584
- /**
3585
- * ABI of the smart contract.
3586
- */
3587
- abi?: string | null;
3588
-
3589
6372
  /**
3590
6373
  * Mapping of addresses for the smart contract.
3591
6374
  */
3592
6375
  addressMapping?: string | null;
3593
6376
 
3594
6377
  /**
3595
- * Array of bonus details applied to the rule.
6378
+ * Object containing details of the amount multiplier from the event.
3596
6379
  */
3597
- bonus?: Array<SmartContract.Bonus> | null;
6380
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3598
6381
 
3599
6382
  /**
3600
6383
  * ID of the smart contract.
@@ -3606,68 +6389,31 @@ export namespace RuleUpdateParams {
3606
6389
  */
3607
6390
  criteria?: 'everyEvent' | 'byParameter' | null;
3608
6391
 
3609
- /**
3610
- * Time range applied to the rule.
3611
- */
3612
- customRange?: SmartContract.CustomRange | null;
3613
-
3614
6392
  /**
3615
6393
  * Event emitted by the smart contract.
3616
6394
  */
3617
6395
  event?: string | null;
3618
6396
 
3619
- /**
3620
- * Maximum value allowed for the parameter.
3621
- */
3622
- max?: number | null;
3623
-
3624
6397
  /**
3625
6398
  * Array of parameters for the smart contract.
3626
6399
  */
3627
6400
  params?: Array<SmartContract.Param> | null;
3628
6401
 
3629
6402
  /**
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.
6403
+ * Type of the smart contract interaction.
3641
6404
  */
3642
- withMax?: boolean | null;
6405
+ type?: 'function' | 'event' | null;
3643
6406
  }
3644
6407
 
3645
6408
  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
6409
  /**
3659
- * Time range applied to the rule.
6410
+ * Object containing details of the amount multiplier from the event.
3660
6411
  */
3661
- export interface CustomRange {
3662
- /**
3663
- * End time of the custom range.
3664
- */
3665
- endsAt?: string | null;
3666
-
6412
+ export interface AmountMultiplier {
3667
6413
  /**
3668
- * Start time of the custom range.
6414
+ * Mapping of the value for the smart contract.
3669
6415
  */
3670
- startsAt?: string | null;
6416
+ valueMapping?: string | null;
3671
6417
  }
3672
6418
 
3673
6419
  export interface Param {
@@ -3711,17 +6457,71 @@ export namespace RuleUpdateParams {
3711
6457
  */
3712
6458
  streakMilestone: number;
3713
6459
  }
6460
+
6461
+ /**
6462
+ * Metadata for swap loyalty rules
6463
+ */
6464
+ export interface Swap {
6465
+ provider?: 'any' | 'relay' | 'lifi';
6466
+
6467
+ relayReferrerId?: string;
6468
+
6469
+ requireCrossChainSwap?: boolean;
6470
+
6471
+ swappedToChain?: 'any' | number | string;
6472
+
6473
+ swappedToTokens?: Array<Swap.SwappedToToken>;
6474
+
6475
+ tokenMode?: 'any' | 'specific';
6476
+
6477
+ trackTokenAmount?: boolean;
6478
+ }
6479
+
6480
+ export namespace Swap {
6481
+ export interface SwappedToToken {
6482
+ address: string;
6483
+
6484
+ chainId: string;
6485
+ }
6486
+ }
3714
6487
  }
3715
6488
  }
3716
6489
 
3717
6490
  export interface RuleListParams {
6491
+ /**
6492
+ * IDs of the users to filter results by
6493
+ */
6494
+ allotedToUserId?: string | Array<string>;
6495
+
6496
+ /**
6497
+ * ID of the user group to filter results by
6498
+ */
6499
+ allotedUserGroupId?: string;
6500
+
3718
6501
  /**
3719
6502
  * Address of the collection to filter by
3720
6503
  */
3721
6504
  collectionAddress?: string;
3722
6505
 
3723
6506
  /**
3724
- * Maximum number of records to return (max 1000)
6507
+ * Whether to include deleted/archived records
6508
+ */
6509
+ includeDeleted?: boolean | null;
6510
+
6511
+ /**
6512
+ * If true this will only return active rules, the rules for which the startTime is
6513
+ * in the past and the endTime is in the future
6514
+ */
6515
+ isActive?: 'true' | 'false';
6516
+
6517
+ /**
6518
+ * If true this will only return special rules, special rules are the rules that
6519
+ * are used for anti sybil as honey pot
6520
+ */
6521
+ isSpecial?: 'true' | 'false';
6522
+
6523
+ /**
6524
+ * Maximum number of records to return (max 100)
3725
6525
  */
3726
6526
  limit?: number;
3727
6527
 
@@ -3751,6 +6551,13 @@ export interface RuleListParams {
3751
6551
  websiteId?: string;
3752
6552
  }
3753
6553
 
6554
+ export interface RuleDeleteParams {
6555
+ /**
6556
+ * Whether to debit loyalty points
6557
+ */
6558
+ debitLoyaltyPoints?: string;
6559
+ }
6560
+
3754
6561
  export interface RuleCompleteParams {
3755
6562
  /**
3756
6563
  * Override amount for the reward (rounded to nearest whole number). This will
@@ -3759,15 +6566,30 @@ export interface RuleCompleteParams {
3759
6566
  amount?: number | null;
3760
6567
 
3761
6568
  /**
3762
- * Link to the comment made by user
6569
+ * Link to the post/comment made by user
6570
+ */
6571
+ contentUrl?: string;
6572
+
6573
+ /**
6574
+ * Unique key to ensure idempotent requests.
3763
6575
  */
3764
- commentLink?: string;
6576
+ idempotencyKey?: string;
3765
6577
 
3766
6578
  /**
3767
6579
  * ID of the choice selected by the user
3768
6580
  */
3769
6581
  loyaltyQuestionChoiceId?: string;
3770
6582
 
6583
+ /**
6584
+ * Value to compare with the range
6585
+ */
6586
+ rangeValue?: number | null;
6587
+
6588
+ /**
6589
+ * Flag indicating if the chain or required check should be skipped.
6590
+ */
6591
+ skipChainOrRequiredCheck?: boolean;
6592
+
3771
6593
  /**
3772
6594
  * Unique identifier for the user
3773
6595
  */
@@ -3780,7 +6602,7 @@ export interface RuleCompleteParams {
3780
6602
 
3781
6603
  /**
3782
6604
  * Flag indicating if only verification is required, this will not create a
3783
- * transaction and reward the user
6605
+ * transaction and reward the user.
3784
6606
  */
3785
6607
  verifyOnly?: string;
3786
6608
 
@@ -3791,11 +6613,30 @@ export interface RuleCompleteParams {
3791
6613
  }
3792
6614
 
3793
6615
  export interface RuleGetStatusParams {
3794
- organizationId: string;
6616
+ /**
6617
+ * Number of items to return
6618
+ */
6619
+ limit?: number | null;
3795
6620
 
3796
- websiteId: string;
6621
+ /**
6622
+ * Unique identifier for the loyalty rule[s]
6623
+ */
6624
+ loyaltyRuleId?: string | Array<string>;
6625
+
6626
+ organizationId?: string;
6627
+
6628
+ /**
6629
+ * Starting after item
6630
+ */
6631
+ startingAfter?: string;
6632
+
6633
+ userGroupId?: string;
3797
6634
 
3798
6635
  userId?: string;
6636
+
6637
+ walletAddress?: string;
6638
+
6639
+ websiteId?: string;
3799
6640
  }
3800
6641
 
3801
6642
  export declare namespace Rules {
@@ -3809,6 +6650,7 @@ export declare namespace Rules {
3809
6650
  type RuleCreateParams as RuleCreateParams,
3810
6651
  type RuleUpdateParams as RuleUpdateParams,
3811
6652
  type RuleListParams as RuleListParams,
6653
+ type RuleDeleteParams as RuleDeleteParams,
3812
6654
  type RuleCompleteParams as RuleCompleteParams,
3813
6655
  type RuleGetStatusParams as RuleGetStatusParams,
3814
6656
  };