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

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 +1711 -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 +2730 -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 +302 -62
  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 +2024 -258
  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 +3962 -100
  245. package/src/resources/loyalty/rule-groups.ts +530 -74
  246. package/src/resources/loyalty/rules.ts +3162 -295
  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,40 @@ export namespace RuleCreateResponse {
487
708
  onlyRewardSingleTokenOwnership?: boolean | null;
488
709
 
489
710
  /**
490
- * Order source of the order for the token sale
711
+ * Pre-generated text template that will be used to prefill the post content.
491
712
  */
492
- orderSource?: string;
713
+ preGeneratedPostText?: string | null;
493
714
 
494
715
  /**
495
716
  * Promotional code associated with the rule.
496
717
  */
497
718
  promoCode?: string;
498
719
 
720
+ /**
721
+ * URL of the CSV file containing promo codes.
722
+ */
723
+ promoCodeCsvUrl?: string;
724
+
725
+ /**
726
+ * Numbers of the promotional code to be generated.
727
+ */
728
+ promoCodeLength?: number | null;
729
+
730
+ /**
731
+ * Type of the promotional code.
732
+ */
733
+ promoCodeType?: 'code' | 'csv' | 'generate';
734
+
499
735
  /**
500
736
  * Array defining ranges and corresponding rewards.
501
737
  */
502
738
  range?: Array<Metadata.Range>;
503
739
 
740
+ /**
741
+ * ID of the Reddit post.
742
+ */
743
+ redditPostId?: string | null;
744
+
504
745
  /**
505
746
  * Object defining referral requirements.
506
747
  */
@@ -511,11 +752,67 @@ export namespace RuleCreateResponse {
511
752
  */
512
753
  referrerReward?: number | null;
513
754
 
755
+ /**
756
+ * Loyalty currency ID of the referrer reward.
757
+ */
758
+ referrerRewardLoyaltyCurrencyId?: string | null;
759
+
760
+ /**
761
+ * Flag indicating if the post link is required.
762
+ */
763
+ requirePostLink?: boolean | null;
764
+
765
+ /**
766
+ * Flag indicating if media metadata is required.
767
+ */
768
+ requirePostMediaLink?: boolean | null;
769
+
770
+ /**
771
+ * Flag indicating if the rule can also reward badges per range.
772
+ */
773
+ rewardBadgePerRange?: boolean;
774
+
775
+ /**
776
+ * Flag indicating if the reward is rewarded by batch.
777
+ */
778
+ rewardByBatch?: boolean | null;
779
+
780
+ /**
781
+ * Criteria to evaluate the reward.
782
+ */
783
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
784
+
785
+ /**
786
+ * Flag indicating if the reward is rewarded per action.
787
+ */
788
+ rewardPerAction?: boolean | null;
789
+
514
790
  /**
515
791
  * Flag indicating if rewards are given per impression.
516
792
  */
517
793
  rewardPerImpression?: boolean | null;
518
794
 
795
+ /**
796
+ * Flag indicating if the rule should reward based on value of traded tokens
797
+ * instead of count.
798
+ */
799
+ rewardPerValue?: boolean;
800
+
801
+ /**
802
+ * Flag indicating if the rule should reward quality posts.
803
+ */
804
+ rewardQualityPosts?: boolean;
805
+
806
+ /**
807
+ * Wallet address of the user can only be used if userId is not provided
808
+ */
809
+ royaltyAddress?: string;
810
+
811
+ /**
812
+ * Royalty percentage of the item.
813
+ */
814
+ royaltyPercentage?: number;
815
+
519
816
  /**
520
817
  * Currency associated with sales.
521
818
  */
@@ -555,6 +852,9 @@ export namespace RuleCreateResponse {
555
852
  | 'Twitch'
556
853
  | 'X(Twitter)'
557
854
  | 'YouTube'
855
+ | 'Google'
856
+ | 'GitHub'
857
+ | 'Reddit'
558
858
  | null;
559
859
 
560
860
  /**
@@ -567,11 +867,21 @@ export namespace RuleCreateResponse {
567
867
  */
568
868
  socialPlatformName?: string | null;
569
869
 
870
+ /**
871
+ * ID of the Steam app.
872
+ */
873
+ steamAppId?: string | null;
874
+
570
875
  /**
571
876
  * Array of streak milestones and corresponding rewards.
572
877
  */
573
878
  streakArray?: Array<Metadata.StreakArray> | null;
574
879
 
880
+ /**
881
+ * Metadata for swap loyalty rules
882
+ */
883
+ swap?: Metadata.Swap;
884
+
575
885
  /**
576
886
  * ID of the Telegram channel.
577
887
  */
@@ -587,6 +897,12 @@ export namespace RuleCreateResponse {
587
897
  */
588
898
  trackAllContracts?: boolean | null;
589
899
 
900
+ /**
901
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
902
+ * completed once the progress is 100%.
903
+ */
904
+ trackProgress?: boolean | null;
905
+
590
906
  /**
591
907
  * URL of the associated Twitter account.
592
908
  */
@@ -630,7 +946,28 @@ export namespace RuleCreateResponse {
630
946
  /**
631
947
  * Type of wallet associated with the rule.
632
948
  */
633
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
949
+ walletType?:
950
+ | 'evm'
951
+ | 'solana'
952
+ | 'imx'
953
+ | 'sui'
954
+ | 'ton'
955
+ | 'cosmos'
956
+ | 'ultra'
957
+ | 'agw'
958
+ | 'flow_cadence'
959
+ | 'substrate'
960
+ | null;
961
+
962
+ /**
963
+ * ID of the Youtube channel.
964
+ */
965
+ youtubeChannelId?: string | null;
966
+
967
+ /**
968
+ * ID of the Youtube video.
969
+ */
970
+ youtubeVideoId?: string | null;
634
971
  }
635
972
 
636
973
  export namespace Metadata {
@@ -649,13 +986,17 @@ export namespace RuleCreateResponse {
649
986
  * Blockchain network of the collection.
650
987
  */
651
988
  network?:
989
+ | 'abstract'
990
+ | 'abstractTestnet'
652
991
  | 'apechain'
653
992
  | 'arbitrum'
654
993
  | 'avalanche'
655
994
  | 'avalancheFuji'
656
995
  | 'base'
657
996
  | 'baseSepolia'
997
+ | 'berachain'
658
998
  | 'berachainArtio'
999
+ | 'berachainBepolia'
659
1000
  | 'binance'
660
1001
  | 'bscTestnet'
661
1002
  | 'campTestnet'
@@ -663,18 +1004,30 @@ export namespace RuleCreateResponse {
663
1004
  | 'fantomTestnet'
664
1005
  | 'flowMainnet'
665
1006
  | 'mainnet'
1007
+ | 'nexusTestnet'
666
1008
  | 'optimism'
667
1009
  | 'polygon'
668
1010
  | 'polygon_mumbai'
669
1011
  | 'skaleNebula'
1012
+ | 'skaleEuropa'
1013
+ | 'skaleCalypso'
670
1014
  | 'solana'
671
1015
  | 'sophon'
1016
+ | 'sophonTestnet'
672
1017
  | 'sui'
673
1018
  | 'superseed'
674
1019
  | 'superseedSepolia'
675
1020
  | 'vanar'
676
1021
  | 'xai'
677
1022
  | 'zksync'
1023
+ | 'coti'
1024
+ | 'cotiTestnet'
1025
+ | 'morph'
1026
+ | 'morphTestnet'
1027
+ | 'morphHolesky'
1028
+ | 'ultra'
1029
+ | 'ultraTestnet'
1030
+ | 'nitrograph'
678
1031
  | 'sepolia'
679
1032
  | 'optimism_sepolia'
680
1033
  | 'arbitrumSepolia'
@@ -682,7 +1035,11 @@ export namespace RuleCreateResponse {
682
1035
  | 'optimism_goerli'
683
1036
  | 'arbitrumGoerli'
684
1037
  | 'basecamp'
685
- | 'abstract';
1038
+ | 'somnia'
1039
+ | 'zkverify'
1040
+ | 'polkadot'
1041
+ | 'kusama'
1042
+ | 'flow_cadence';
686
1043
  }
687
1044
 
688
1045
  /**
@@ -759,6 +1116,111 @@ export namespace RuleCreateResponse {
759
1116
  id: string;
760
1117
  }
761
1118
 
1119
+ /**
1120
+ * Liquidity pool details.
1121
+ */
1122
+ export interface Liquidity {
1123
+ /**
1124
+ * Calculation type of the liquidity pool.
1125
+ */
1126
+ calculationType?: 'fixed' | 'custom';
1127
+
1128
+ /**
1129
+ * Custom function to calculate the the reward amount based on the liquidity
1130
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
1131
+ * USD.
1132
+ */
1133
+ customFunction?: string;
1134
+
1135
+ /**
1136
+ * Liquidity provided per day in USD
1137
+ */
1138
+ liquidityPerDay?: number;
1139
+
1140
+ /**
1141
+ * Blockchain network of the liquidity pool.
1142
+ */
1143
+ network?:
1144
+ | 'abstract'
1145
+ | 'abstractTestnet'
1146
+ | 'apechain'
1147
+ | 'arbitrum'
1148
+ | 'avalanche'
1149
+ | 'avalancheFuji'
1150
+ | 'base'
1151
+ | 'baseSepolia'
1152
+ | 'berachain'
1153
+ | 'berachainArtio'
1154
+ | 'berachainBepolia'
1155
+ | 'binance'
1156
+ | 'bscTestnet'
1157
+ | 'campTestnet'
1158
+ | 'fantom'
1159
+ | 'fantomTestnet'
1160
+ | 'flowMainnet'
1161
+ | 'mainnet'
1162
+ | 'nexusTestnet'
1163
+ | 'optimism'
1164
+ | 'polygon'
1165
+ | 'polygon_mumbai'
1166
+ | 'skaleNebula'
1167
+ | 'skaleEuropa'
1168
+ | 'skaleCalypso'
1169
+ | 'solana'
1170
+ | 'sophon'
1171
+ | 'sophonTestnet'
1172
+ | 'sui'
1173
+ | 'superseed'
1174
+ | 'superseedSepolia'
1175
+ | 'vanar'
1176
+ | 'xai'
1177
+ | 'zksync'
1178
+ | 'coti'
1179
+ | 'cotiTestnet'
1180
+ | 'morph'
1181
+ | 'morphTestnet'
1182
+ | 'morphHolesky'
1183
+ | 'ultra'
1184
+ | 'ultraTestnet'
1185
+ | 'nitrograph'
1186
+ | 'sepolia'
1187
+ | 'optimism_sepolia'
1188
+ | 'arbitrumSepolia'
1189
+ | 'goerli'
1190
+ | 'optimism_goerli'
1191
+ | 'arbitrumGoerli'
1192
+ | 'basecamp'
1193
+ | 'somnia'
1194
+ | 'zkverify'
1195
+ | 'polkadot'
1196
+ | 'kusama'
1197
+ | 'flow_cadence';
1198
+
1199
+ /**
1200
+ * Indicates if only in-range liquidity is rewarded.
1201
+ */
1202
+ onlyRewardInRangeLiquidity?: boolean;
1203
+
1204
+ /**
1205
+ * Array of liquidity pools associated with the rule.
1206
+ */
1207
+ pools?: Array<Liquidity.Pool>;
1208
+
1209
+ /**
1210
+ * Protocol of the liquidity pool.
1211
+ */
1212
+ protocol?: string;
1213
+ }
1214
+
1215
+ export namespace Liquidity {
1216
+ export interface Pool {
1217
+ /**
1218
+ * Unique identifier of the liquidity pool.
1219
+ */
1220
+ id: string;
1221
+ }
1222
+ }
1223
+
762
1224
  export interface Range {
763
1225
  /**
764
1226
  * Reward amount for this range.
@@ -774,6 +1236,16 @@ export namespace RuleCreateResponse {
774
1236
  * Start value of the range.
775
1237
  */
776
1238
  startRange: number;
1239
+
1240
+ /**
1241
+ * ID of the loyalty badge for this range.
1242
+ */
1243
+ loyaltyBadgeId?: string;
1244
+
1245
+ /**
1246
+ * Amount of the loyalty multiplier for this range.
1247
+ */
1248
+ loyaltyMultiplierAmount?: number;
777
1249
  }
778
1250
 
779
1251
  /**
@@ -826,20 +1298,15 @@ export namespace RuleCreateResponse {
826
1298
  * Object containing details of the associated smart contract.
827
1299
  */
828
1300
  export interface SmartContract {
829
- /**
830
- * ABI of the smart contract.
831
- */
832
- abi?: string | null;
833
-
834
1301
  /**
835
1302
  * Mapping of addresses for the smart contract.
836
1303
  */
837
1304
  addressMapping?: string | null;
838
1305
 
839
1306
  /**
840
- * Array of bonus details applied to the rule.
1307
+ * Object containing details of the amount multiplier from the event.
841
1308
  */
842
- bonus?: Array<SmartContract.Bonus> | null;
1309
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
843
1310
 
844
1311
  /**
845
1312
  * ID of the smart contract.
@@ -851,68 +1318,31 @@ export namespace RuleCreateResponse {
851
1318
  */
852
1319
  criteria?: 'everyEvent' | 'byParameter' | null;
853
1320
 
854
- /**
855
- * Time range applied to the rule.
856
- */
857
- customRange?: SmartContract.CustomRange | null;
858
-
859
1321
  /**
860
1322
  * Event emitted by the smart contract.
861
1323
  */
862
1324
  event?: string | null;
863
1325
 
864
- /**
865
- * Maximum value allowed for the parameter.
866
- */
867
- max?: number | null;
868
-
869
1326
  /**
870
1327
  * Array of parameters for the smart contract.
871
1328
  */
872
1329
  params?: Array<SmartContract.Param> | null;
873
1330
 
874
1331
  /**
875
- * Flag indicating if a bonus is applied.
876
- */
877
- withBonus?: boolean | null;
878
-
879
- /**
880
- * Flag indicating if a custom range is applied.
881
- */
882
- withCustomRange?: boolean | null;
883
-
884
- /**
885
- * Flag indicating if a maximum limit is applied.
1332
+ * Type of the smart contract interaction.
886
1333
  */
887
- withMax?: boolean | null;
1334
+ type?: 'function' | 'event' | null;
888
1335
  }
889
1336
 
890
1337
  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
1338
  /**
904
- * Time range applied to the rule.
1339
+ * Object containing details of the amount multiplier from the event.
905
1340
  */
906
- export interface CustomRange {
907
- /**
908
- * End time of the custom range.
909
- */
910
- endsAt?: string | null;
911
-
1341
+ export interface AmountMultiplier {
912
1342
  /**
913
- * Start time of the custom range.
1343
+ * Mapping of the value for the smart contract.
914
1344
  */
915
- startsAt?: string | null;
1345
+ valueMapping?: string | null;
916
1346
  }
917
1347
 
918
1348
  export interface Param {
@@ -956,6 +1386,33 @@ export namespace RuleCreateResponse {
956
1386
  */
957
1387
  streakMilestone: number;
958
1388
  }
1389
+
1390
+ /**
1391
+ * Metadata for swap loyalty rules
1392
+ */
1393
+ export interface Swap {
1394
+ provider?: 'any' | 'relay' | 'lifi';
1395
+
1396
+ relayReferrerId?: string;
1397
+
1398
+ requireCrossChainSwap?: boolean;
1399
+
1400
+ swappedToChain?: 'any' | number | string;
1401
+
1402
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1403
+
1404
+ tokenMode?: 'any' | 'specific';
1405
+
1406
+ trackTokenAmount?: boolean;
1407
+ }
1408
+
1409
+ export namespace Swap {
1410
+ export interface SwappedToToken {
1411
+ address: string;
1412
+
1413
+ chainId: string;
1414
+ }
1415
+ }
959
1416
  }
960
1417
 
961
1418
  export interface Collection {
@@ -968,13 +1425,17 @@ export namespace RuleCreateResponse {
968
1425
  * Blockchain network for the collection
969
1426
  */
970
1427
  network:
1428
+ | 'abstract'
1429
+ | 'abstractTestnet'
971
1430
  | 'apechain'
972
1431
  | 'arbitrum'
973
1432
  | 'avalanche'
974
1433
  | 'avalancheFuji'
975
1434
  | 'base'
976
1435
  | 'baseSepolia'
1436
+ | 'berachain'
977
1437
  | 'berachainArtio'
1438
+ | 'berachainBepolia'
978
1439
  | 'binance'
979
1440
  | 'bscTestnet'
980
1441
  | 'campTestnet'
@@ -982,18 +1443,30 @@ export namespace RuleCreateResponse {
982
1443
  | 'fantomTestnet'
983
1444
  | 'flowMainnet'
984
1445
  | 'mainnet'
1446
+ | 'nexusTestnet'
985
1447
  | 'optimism'
986
1448
  | 'polygon'
987
1449
  | 'polygon_mumbai'
988
1450
  | 'skaleNebula'
1451
+ | 'skaleEuropa'
1452
+ | 'skaleCalypso'
989
1453
  | 'solana'
990
1454
  | 'sophon'
1455
+ | 'sophonTestnet'
991
1456
  | 'sui'
992
1457
  | 'superseed'
993
1458
  | 'superseedSepolia'
994
1459
  | 'vanar'
995
1460
  | 'xai'
996
1461
  | 'zksync'
1462
+ | 'coti'
1463
+ | 'cotiTestnet'
1464
+ | 'morph'
1465
+ | 'morphTestnet'
1466
+ | 'morphHolesky'
1467
+ | 'ultra'
1468
+ | 'ultraTestnet'
1469
+ | 'nitrograph'
997
1470
  | 'sepolia'
998
1471
  | 'optimism_sepolia'
999
1472
  | 'arbitrumSepolia'
@@ -1001,7 +1474,16 @@ export namespace RuleCreateResponse {
1001
1474
  | 'optimism_goerli'
1002
1475
  | 'arbitrumGoerli'
1003
1476
  | 'basecamp'
1004
- | 'abstract';
1477
+ | 'somnia'
1478
+ | 'zkverify'
1479
+ | 'polkadot'
1480
+ | 'kusama'
1481
+ | 'flow_cadence';
1482
+
1483
+ /**
1484
+ * Symbol of the collection.
1485
+ */
1486
+ symbol?: string;
1005
1487
  }
1006
1488
  }
1007
1489
 
@@ -1023,10 +1505,15 @@ export interface RuleUpdateResponse {
1023
1505
  */
1024
1506
  name: string;
1025
1507
 
1508
+ /**
1509
+ * The type of claim for the reward
1510
+ */
1511
+ claimType?: 'manual' | 'auto' | null;
1512
+
1026
1513
  /**
1027
1514
  * Blockchain address of the associated collection
1028
1515
  */
1029
- collectionAddress?: string;
1516
+ collectionAddress?: string | null;
1030
1517
 
1031
1518
  /**
1032
1519
  * List of associated collections
@@ -1058,11 +1545,21 @@ export interface RuleUpdateResponse {
1058
1545
  */
1059
1546
  effectiveStartTime?: string | null;
1060
1547
 
1548
+ /**
1549
+ * ID of the external integration
1550
+ */
1551
+ externalIntegrationId?: string | null;
1552
+
1061
1553
  /**
1062
1554
  * Frequency of the rule execution
1063
1555
  */
1064
1556
  frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
1065
1557
 
1558
+ /**
1559
+ * Optional stratus function id for the rule
1560
+ */
1561
+ functionId?: string | null;
1562
+
1066
1563
  /**
1067
1564
  * Whether to hide this rule in the user interface
1068
1565
  */
@@ -1071,7 +1568,7 @@ export interface RuleUpdateResponse {
1071
1568
  /**
1072
1569
  * Time interval for recurring rule execution
1073
1570
  */
1074
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1571
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
1075
1572
 
1076
1573
  /**
1077
1574
  * Whether this rule is required for participation
@@ -1083,6 +1580,18 @@ export interface RuleUpdateResponse {
1083
1580
  */
1084
1581
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
1085
1582
 
1583
+ /**
1584
+ * The interval for the max amount. Available for the smart contract and external
1585
+ * rules.
1586
+ */
1587
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
1588
+
1589
+ /**
1590
+ * The maximum amount of points a user can earn per interval. Available for the
1591
+ * smart contract and external rules.
1592
+ */
1593
+ maxAmountPerInterval?: number | null;
1594
+
1086
1595
  /**
1087
1596
  * URL of the media to be displayed
1088
1597
  */
@@ -1097,13 +1606,17 @@ export interface RuleUpdateResponse {
1097
1606
  * Blockchain network where the rule will apply
1098
1607
  */
1099
1608
  network?:
1609
+ | 'abstract'
1610
+ | 'abstractTestnet'
1100
1611
  | 'apechain'
1101
1612
  | 'arbitrum'
1102
1613
  | 'avalanche'
1103
1614
  | 'avalancheFuji'
1104
1615
  | 'base'
1105
1616
  | 'baseSepolia'
1617
+ | 'berachain'
1106
1618
  | 'berachainArtio'
1619
+ | 'berachainBepolia'
1107
1620
  | 'binance'
1108
1621
  | 'bscTestnet'
1109
1622
  | 'campTestnet'
@@ -1111,18 +1624,30 @@ export interface RuleUpdateResponse {
1111
1624
  | 'fantomTestnet'
1112
1625
  | 'flowMainnet'
1113
1626
  | 'mainnet'
1627
+ | 'nexusTestnet'
1114
1628
  | 'optimism'
1115
1629
  | 'polygon'
1116
1630
  | 'polygon_mumbai'
1117
1631
  | 'skaleNebula'
1632
+ | 'skaleEuropa'
1633
+ | 'skaleCalypso'
1118
1634
  | 'solana'
1119
1635
  | 'sophon'
1636
+ | 'sophonTestnet'
1120
1637
  | 'sui'
1121
1638
  | 'superseed'
1122
1639
  | 'superseedSepolia'
1123
1640
  | 'vanar'
1124
1641
  | 'xai'
1125
1642
  | 'zksync'
1643
+ | 'coti'
1644
+ | 'cotiTestnet'
1645
+ | 'morph'
1646
+ | 'morphTestnet'
1647
+ | 'morphHolesky'
1648
+ | 'ultra'
1649
+ | 'ultraTestnet'
1650
+ | 'nitrograph'
1126
1651
  | 'sepolia'
1127
1652
  | 'optimism_sepolia'
1128
1653
  | 'arbitrumSepolia'
@@ -1130,17 +1655,36 @@ export interface RuleUpdateResponse {
1130
1655
  | 'optimism_goerli'
1131
1656
  | 'arbitrumGoerli'
1132
1657
  | 'basecamp'
1133
- | 'abstract';
1658
+ | 'somnia'
1659
+ | 'zkverify'
1660
+ | 'polkadot'
1661
+ | 'kusama'
1662
+ | 'flow_cadence';
1134
1663
 
1135
1664
  /**
1136
1665
  * ID for associated OAuth credentials
1137
1666
  */
1138
1667
  oauthCredentialsId?: string | null;
1139
1668
 
1669
+ /**
1670
+ * The lifetime of the reward
1671
+ */
1672
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
1673
+
1140
1674
  /**
1141
1675
  * Type of reward issued by this rule
1142
1676
  */
1143
- rewardType?: 'points' | 'multiplier';
1677
+ rewardType?: 'points' | 'multiplier' | 'badge';
1678
+
1679
+ /**
1680
+ * URL of the Shopify store
1681
+ */
1682
+ shopifyStoreUrl?: string | null;
1683
+
1684
+ /**
1685
+ * Whether to show this rule before the start time
1686
+ */
1687
+ showBeforeStart?: boolean;
1144
1688
 
1145
1689
  /**
1146
1690
  * Start time for the loyalty rule
@@ -1148,9 +1692,9 @@ export interface RuleUpdateResponse {
1148
1692
  startTime?: string | null;
1149
1693
 
1150
1694
  /**
1151
- * Optional subscription identifier for the rule
1695
+ * Optional stratus subscription id for the rule
1152
1696
  */
1153
- subscriptionIdentifier?: string | null;
1697
+ subscriptionId?: string | null;
1154
1698
  }
1155
1699
 
1156
1700
  export namespace RuleUpdateResponse {
@@ -1164,13 +1708,17 @@ export namespace RuleUpdateResponse {
1164
1708
  * Blockchain network for the collection
1165
1709
  */
1166
1710
  network:
1711
+ | 'abstract'
1712
+ | 'abstractTestnet'
1167
1713
  | 'apechain'
1168
1714
  | 'arbitrum'
1169
1715
  | 'avalanche'
1170
1716
  | 'avalancheFuji'
1171
1717
  | 'base'
1172
1718
  | 'baseSepolia'
1719
+ | 'berachain'
1173
1720
  | 'berachainArtio'
1721
+ | 'berachainBepolia'
1174
1722
  | 'binance'
1175
1723
  | 'bscTestnet'
1176
1724
  | 'campTestnet'
@@ -1178,18 +1726,30 @@ export namespace RuleUpdateResponse {
1178
1726
  | 'fantomTestnet'
1179
1727
  | 'flowMainnet'
1180
1728
  | 'mainnet'
1729
+ | 'nexusTestnet'
1181
1730
  | 'optimism'
1182
1731
  | 'polygon'
1183
1732
  | 'polygon_mumbai'
1184
1733
  | 'skaleNebula'
1734
+ | 'skaleEuropa'
1735
+ | 'skaleCalypso'
1185
1736
  | 'solana'
1186
1737
  | 'sophon'
1738
+ | 'sophonTestnet'
1187
1739
  | 'sui'
1188
1740
  | 'superseed'
1189
1741
  | 'superseedSepolia'
1190
1742
  | 'vanar'
1191
1743
  | 'xai'
1192
1744
  | 'zksync'
1745
+ | 'coti'
1746
+ | 'cotiTestnet'
1747
+ | 'morph'
1748
+ | 'morphTestnet'
1749
+ | 'morphHolesky'
1750
+ | 'ultra'
1751
+ | 'ultraTestnet'
1752
+ | 'nitrograph'
1193
1753
  | 'sepolia'
1194
1754
  | 'optimism_sepolia'
1195
1755
  | 'arbitrumSepolia'
@@ -1197,13 +1757,33 @@ export namespace RuleUpdateResponse {
1197
1757
  | 'optimism_goerli'
1198
1758
  | 'arbitrumGoerli'
1199
1759
  | 'basecamp'
1200
- | 'abstract';
1760
+ | 'somnia'
1761
+ | 'zkverify'
1762
+ | 'polkadot'
1763
+ | 'kusama'
1764
+ | 'flow_cadence';
1765
+
1766
+ /**
1767
+ * Symbol of the collection.
1768
+ */
1769
+ symbol?: string;
1201
1770
  }
1202
1771
 
1203
1772
  /**
1204
1773
  * Additional metadata for the loyalty rule
1205
1774
  */
1206
1775
  export interface Metadata {
1776
+ /**
1777
+ * Array of loyalty rule IDs that count as check-in when completed. If ["any"] then
1778
+ * any rule completions count as check-in.
1779
+ */
1780
+ autoCheckInRuleIds?: Array<(string & {}) | 'any'> | null;
1781
+
1782
+ /**
1783
+ * Number of tokens per batch.
1784
+ */
1785
+ batchSize?: number | null;
1786
+
1207
1787
  /**
1208
1788
  * Text displayed on the action button.
1209
1789
  */
@@ -1227,7 +1807,7 @@ export namespace RuleUpdateResponse {
1227
1807
  /**
1228
1808
  * Text to check in the Twitter post, username, or bio.
1229
1809
  */
1230
- checkText?: string | null;
1810
+ checkText?: string | Array<string> | null;
1231
1811
 
1232
1812
  /**
1233
1813
  * Array of collections associated with the rule.
@@ -1237,7 +1817,12 @@ export namespace RuleUpdateResponse {
1237
1817
  /**
1238
1818
  * Conditions for completing the profile.
1239
1819
  */
1240
- completeProfileConditions?: Record<string, boolean> | null;
1820
+ completeProfileConditions?: { [key: string]: boolean } | null;
1821
+
1822
+ /**
1823
+ * Description of the external rule condition (only for external rules)
1824
+ */
1825
+ conditionDescription?: string;
1241
1826
 
1242
1827
  /**
1243
1828
  * Object containing details for the call-to-action.
@@ -1249,6 +1834,11 @@ export namespace RuleUpdateResponse {
1249
1834
  */
1250
1835
  customRewardsApiKey?: string;
1251
1836
 
1837
+ /**
1838
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
1839
+ */
1840
+ directRpc?: boolean;
1841
+
1252
1842
  /**
1253
1843
  * Array of Discord servers, channels, and roles to join.
1254
1844
  */
@@ -1274,6 +1864,11 @@ export namespace RuleUpdateResponse {
1274
1864
  */
1275
1865
  enableVerifiedMultiplier?: boolean;
1276
1866
 
1867
+ /**
1868
+ * Type of ERC20 token for the loyalty rule.
1869
+ */
1870
+ erc20Type?: 'erc20' | 'native';
1871
+
1277
1872
  /**
1278
1873
  * Fill source of the order for the token sale
1279
1874
  */
@@ -1284,6 +1879,16 @@ export namespace RuleUpdateResponse {
1284
1879
  */
1285
1880
  firstReferralReward?: number | null;
1286
1881
 
1882
+ /**
1883
+ * Name of the GitHub branch to check for PR merge.
1884
+ */
1885
+ githubBranchName?: string | null;
1886
+
1887
+ /**
1888
+ * URL of the GitHub repository to check for star.
1889
+ */
1890
+ githubRepoUrl?: string | null;
1891
+
1287
1892
  /**
1288
1893
  * Flag indicating whether the fill source is included.
1289
1894
  */
@@ -1294,11 +1899,6 @@ export namespace RuleUpdateResponse {
1294
1899
  */
1295
1900
  hasNeverSold?: boolean;
1296
1901
 
1297
- /**
1298
- * Flag indicating whether the order source is included.
1299
- */
1300
- hasOrderSource?: boolean;
1301
-
1302
1902
  /**
1303
1903
  * Indicates if the full royalty has been paid for items.
1304
1904
  */
@@ -1319,11 +1919,21 @@ export namespace RuleUpdateResponse {
1319
1919
  */
1320
1920
  imageUrl?: string | null;
1321
1921
 
1922
+ /**
1923
+ * If enabled, the first transaction done on the platform will complete this rule
1924
+ */
1925
+ isCheckInOnEveryTxn?: boolean;
1926
+
1322
1927
  /**
1323
1928
  * Indicates if the multiplier has been applied to rewards.
1324
1929
  */
1325
1930
  isMultiplierApplied?: boolean;
1326
1931
 
1932
+ /**
1933
+ * Flag indicating if the rule is restricted to new users.
1934
+ */
1935
+ isRestrictedToNewUsers?: boolean;
1936
+
1327
1937
  /**
1328
1938
  * Flag indicating if rewards are applied retroactively.
1329
1939
  */
@@ -1339,6 +1949,11 @@ export namespace RuleUpdateResponse {
1339
1949
  */
1340
1950
  link?: string | null;
1341
1951
 
1952
+ /**
1953
+ * Liquidity pool details.
1954
+ */
1955
+ liquidity?: Metadata.Liquidity;
1956
+
1342
1957
  /**
1343
1958
  * Maximum quantity constraint for token holding.
1344
1959
  */
@@ -1380,20 +1995,40 @@ export namespace RuleUpdateResponse {
1380
1995
  onlyRewardSingleTokenOwnership?: boolean | null;
1381
1996
 
1382
1997
  /**
1383
- * Order source of the order for the token sale
1998
+ * Pre-generated text template that will be used to prefill the post content.
1384
1999
  */
1385
- orderSource?: string;
2000
+ preGeneratedPostText?: string | null;
1386
2001
 
1387
2002
  /**
1388
2003
  * Promotional code associated with the rule.
1389
2004
  */
1390
2005
  promoCode?: string;
1391
2006
 
2007
+ /**
2008
+ * URL of the CSV file containing promo codes.
2009
+ */
2010
+ promoCodeCsvUrl?: string;
2011
+
2012
+ /**
2013
+ * Numbers of the promotional code to be generated.
2014
+ */
2015
+ promoCodeLength?: number | null;
2016
+
2017
+ /**
2018
+ * Type of the promotional code.
2019
+ */
2020
+ promoCodeType?: 'code' | 'csv' | 'generate';
2021
+
1392
2022
  /**
1393
2023
  * Array defining ranges and corresponding rewards.
1394
2024
  */
1395
2025
  range?: Array<Metadata.Range>;
1396
2026
 
2027
+ /**
2028
+ * ID of the Reddit post.
2029
+ */
2030
+ redditPostId?: string | null;
2031
+
1397
2032
  /**
1398
2033
  * Object defining referral requirements.
1399
2034
  */
@@ -1404,11 +2039,67 @@ export namespace RuleUpdateResponse {
1404
2039
  */
1405
2040
  referrerReward?: number | null;
1406
2041
 
2042
+ /**
2043
+ * Loyalty currency ID of the referrer reward.
2044
+ */
2045
+ referrerRewardLoyaltyCurrencyId?: string | null;
2046
+
2047
+ /**
2048
+ * Flag indicating if the post link is required.
2049
+ */
2050
+ requirePostLink?: boolean | null;
2051
+
2052
+ /**
2053
+ * Flag indicating if media metadata is required.
2054
+ */
2055
+ requirePostMediaLink?: boolean | null;
2056
+
2057
+ /**
2058
+ * Flag indicating if the rule can also reward badges per range.
2059
+ */
2060
+ rewardBadgePerRange?: boolean;
2061
+
2062
+ /**
2063
+ * Flag indicating if the reward is rewarded by batch.
2064
+ */
2065
+ rewardByBatch?: boolean | null;
2066
+
2067
+ /**
2068
+ * Criteria to evaluate the reward.
2069
+ */
2070
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
2071
+
2072
+ /**
2073
+ * Flag indicating if the reward is rewarded per action.
2074
+ */
2075
+ rewardPerAction?: boolean | null;
2076
+
1407
2077
  /**
1408
2078
  * Flag indicating if rewards are given per impression.
1409
2079
  */
1410
2080
  rewardPerImpression?: boolean | null;
1411
2081
 
2082
+ /**
2083
+ * Flag indicating if the rule should reward based on value of traded tokens
2084
+ * instead of count.
2085
+ */
2086
+ rewardPerValue?: boolean;
2087
+
2088
+ /**
2089
+ * Flag indicating if the rule should reward quality posts.
2090
+ */
2091
+ rewardQualityPosts?: boolean;
2092
+
2093
+ /**
2094
+ * Wallet address of the user can only be used if userId is not provided
2095
+ */
2096
+ royaltyAddress?: string;
2097
+
2098
+ /**
2099
+ * Royalty percentage of the item.
2100
+ */
2101
+ royaltyPercentage?: number;
2102
+
1412
2103
  /**
1413
2104
  * Currency associated with sales.
1414
2105
  */
@@ -1448,6 +2139,9 @@ export namespace RuleUpdateResponse {
1448
2139
  | 'Twitch'
1449
2140
  | 'X(Twitter)'
1450
2141
  | 'YouTube'
2142
+ | 'Google'
2143
+ | 'GitHub'
2144
+ | 'Reddit'
1451
2145
  | null;
1452
2146
 
1453
2147
  /**
@@ -1460,11 +2154,21 @@ export namespace RuleUpdateResponse {
1460
2154
  */
1461
2155
  socialPlatformName?: string | null;
1462
2156
 
2157
+ /**
2158
+ * ID of the Steam app.
2159
+ */
2160
+ steamAppId?: string | null;
2161
+
1463
2162
  /**
1464
2163
  * Array of streak milestones and corresponding rewards.
1465
2164
  */
1466
2165
  streakArray?: Array<Metadata.StreakArray> | null;
1467
2166
 
2167
+ /**
2168
+ * Metadata for swap loyalty rules
2169
+ */
2170
+ swap?: Metadata.Swap;
2171
+
1468
2172
  /**
1469
2173
  * ID of the Telegram channel.
1470
2174
  */
@@ -1480,6 +2184,12 @@ export namespace RuleUpdateResponse {
1480
2184
  */
1481
2185
  trackAllContracts?: boolean | null;
1482
2186
 
2187
+ /**
2188
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2189
+ * completed once the progress is 100%.
2190
+ */
2191
+ trackProgress?: boolean | null;
2192
+
1483
2193
  /**
1484
2194
  * URL of the associated Twitter account.
1485
2195
  */
@@ -1523,7 +2233,28 @@ export namespace RuleUpdateResponse {
1523
2233
  /**
1524
2234
  * Type of wallet associated with the rule.
1525
2235
  */
1526
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
2236
+ walletType?:
2237
+ | 'evm'
2238
+ | 'solana'
2239
+ | 'imx'
2240
+ | 'sui'
2241
+ | 'ton'
2242
+ | 'cosmos'
2243
+ | 'ultra'
2244
+ | 'agw'
2245
+ | 'flow_cadence'
2246
+ | 'substrate'
2247
+ | null;
2248
+
2249
+ /**
2250
+ * ID of the Youtube channel.
2251
+ */
2252
+ youtubeChannelId?: string | null;
2253
+
2254
+ /**
2255
+ * ID of the Youtube video.
2256
+ */
2257
+ youtubeVideoId?: string | null;
1527
2258
  }
1528
2259
 
1529
2260
  export namespace Metadata {
@@ -1542,13 +2273,17 @@ export namespace RuleUpdateResponse {
1542
2273
  * Blockchain network of the collection.
1543
2274
  */
1544
2275
  network?:
2276
+ | 'abstract'
2277
+ | 'abstractTestnet'
1545
2278
  | 'apechain'
1546
2279
  | 'arbitrum'
1547
2280
  | 'avalanche'
1548
2281
  | 'avalancheFuji'
1549
2282
  | 'base'
1550
2283
  | 'baseSepolia'
2284
+ | 'berachain'
1551
2285
  | 'berachainArtio'
2286
+ | 'berachainBepolia'
1552
2287
  | 'binance'
1553
2288
  | 'bscTestnet'
1554
2289
  | 'campTestnet'
@@ -1556,18 +2291,30 @@ export namespace RuleUpdateResponse {
1556
2291
  | 'fantomTestnet'
1557
2292
  | 'flowMainnet'
1558
2293
  | 'mainnet'
2294
+ | 'nexusTestnet'
1559
2295
  | 'optimism'
1560
2296
  | 'polygon'
1561
2297
  | 'polygon_mumbai'
1562
2298
  | 'skaleNebula'
2299
+ | 'skaleEuropa'
2300
+ | 'skaleCalypso'
1563
2301
  | 'solana'
1564
2302
  | 'sophon'
2303
+ | 'sophonTestnet'
1565
2304
  | 'sui'
1566
2305
  | 'superseed'
1567
2306
  | 'superseedSepolia'
1568
2307
  | 'vanar'
1569
2308
  | 'xai'
1570
2309
  | 'zksync'
2310
+ | 'coti'
2311
+ | 'cotiTestnet'
2312
+ | 'morph'
2313
+ | 'morphTestnet'
2314
+ | 'morphHolesky'
2315
+ | 'ultra'
2316
+ | 'ultraTestnet'
2317
+ | 'nitrograph'
1571
2318
  | 'sepolia'
1572
2319
  | 'optimism_sepolia'
1573
2320
  | 'arbitrumSepolia'
@@ -1575,7 +2322,11 @@ export namespace RuleUpdateResponse {
1575
2322
  | 'optimism_goerli'
1576
2323
  | 'arbitrumGoerli'
1577
2324
  | 'basecamp'
1578
- | 'abstract';
2325
+ | 'somnia'
2326
+ | 'zkverify'
2327
+ | 'polkadot'
2328
+ | 'kusama'
2329
+ | 'flow_cadence';
1579
2330
  }
1580
2331
 
1581
2332
  /**
@@ -1652,6 +2403,111 @@ export namespace RuleUpdateResponse {
1652
2403
  id: string;
1653
2404
  }
1654
2405
 
2406
+ /**
2407
+ * Liquidity pool details.
2408
+ */
2409
+ export interface Liquidity {
2410
+ /**
2411
+ * Calculation type of the liquidity pool.
2412
+ */
2413
+ calculationType?: 'fixed' | 'custom';
2414
+
2415
+ /**
2416
+ * Custom function to calculate the the reward amount based on the liquidity
2417
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2418
+ * USD.
2419
+ */
2420
+ customFunction?: string;
2421
+
2422
+ /**
2423
+ * Liquidity provided per day in USD
2424
+ */
2425
+ liquidityPerDay?: number;
2426
+
2427
+ /**
2428
+ * Blockchain network of the liquidity pool.
2429
+ */
2430
+ network?:
2431
+ | 'abstract'
2432
+ | 'abstractTestnet'
2433
+ | 'apechain'
2434
+ | 'arbitrum'
2435
+ | 'avalanche'
2436
+ | 'avalancheFuji'
2437
+ | 'base'
2438
+ | 'baseSepolia'
2439
+ | 'berachain'
2440
+ | 'berachainArtio'
2441
+ | 'berachainBepolia'
2442
+ | 'binance'
2443
+ | 'bscTestnet'
2444
+ | 'campTestnet'
2445
+ | 'fantom'
2446
+ | 'fantomTestnet'
2447
+ | 'flowMainnet'
2448
+ | 'mainnet'
2449
+ | 'nexusTestnet'
2450
+ | 'optimism'
2451
+ | 'polygon'
2452
+ | 'polygon_mumbai'
2453
+ | 'skaleNebula'
2454
+ | 'skaleEuropa'
2455
+ | 'skaleCalypso'
2456
+ | 'solana'
2457
+ | 'sophon'
2458
+ | 'sophonTestnet'
2459
+ | 'sui'
2460
+ | 'superseed'
2461
+ | 'superseedSepolia'
2462
+ | 'vanar'
2463
+ | 'xai'
2464
+ | 'zksync'
2465
+ | 'coti'
2466
+ | 'cotiTestnet'
2467
+ | 'morph'
2468
+ | 'morphTestnet'
2469
+ | 'morphHolesky'
2470
+ | 'ultra'
2471
+ | 'ultraTestnet'
2472
+ | 'nitrograph'
2473
+ | 'sepolia'
2474
+ | 'optimism_sepolia'
2475
+ | 'arbitrumSepolia'
2476
+ | 'goerli'
2477
+ | 'optimism_goerli'
2478
+ | 'arbitrumGoerli'
2479
+ | 'basecamp'
2480
+ | 'somnia'
2481
+ | 'zkverify'
2482
+ | 'polkadot'
2483
+ | 'kusama'
2484
+ | 'flow_cadence';
2485
+
2486
+ /**
2487
+ * Indicates if only in-range liquidity is rewarded.
2488
+ */
2489
+ onlyRewardInRangeLiquidity?: boolean;
2490
+
2491
+ /**
2492
+ * Array of liquidity pools associated with the rule.
2493
+ */
2494
+ pools?: Array<Liquidity.Pool>;
2495
+
2496
+ /**
2497
+ * Protocol of the liquidity pool.
2498
+ */
2499
+ protocol?: string;
2500
+ }
2501
+
2502
+ export namespace Liquidity {
2503
+ export interface Pool {
2504
+ /**
2505
+ * Unique identifier of the liquidity pool.
2506
+ */
2507
+ id: string;
2508
+ }
2509
+ }
2510
+
1655
2511
  export interface Range {
1656
2512
  /**
1657
2513
  * Reward amount for this range.
@@ -1667,6 +2523,16 @@ export namespace RuleUpdateResponse {
1667
2523
  * Start value of the range.
1668
2524
  */
1669
2525
  startRange: number;
2526
+
2527
+ /**
2528
+ * ID of the loyalty badge for this range.
2529
+ */
2530
+ loyaltyBadgeId?: string;
2531
+
2532
+ /**
2533
+ * Amount of the loyalty multiplier for this range.
2534
+ */
2535
+ loyaltyMultiplierAmount?: number;
1670
2536
  }
1671
2537
 
1672
2538
  /**
@@ -1719,20 +2585,15 @@ export namespace RuleUpdateResponse {
1719
2585
  * Object containing details of the associated smart contract.
1720
2586
  */
1721
2587
  export interface SmartContract {
1722
- /**
1723
- * ABI of the smart contract.
1724
- */
1725
- abi?: string | null;
1726
-
1727
2588
  /**
1728
2589
  * Mapping of addresses for the smart contract.
1729
2590
  */
1730
2591
  addressMapping?: string | null;
1731
2592
 
1732
2593
  /**
1733
- * Array of bonus details applied to the rule.
2594
+ * Object containing details of the amount multiplier from the event.
1734
2595
  */
1735
- bonus?: Array<SmartContract.Bonus> | null;
2596
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1736
2597
 
1737
2598
  /**
1738
2599
  * ID of the smart contract.
@@ -1744,68 +2605,31 @@ export namespace RuleUpdateResponse {
1744
2605
  */
1745
2606
  criteria?: 'everyEvent' | 'byParameter' | null;
1746
2607
 
1747
- /**
1748
- * Time range applied to the rule.
1749
- */
1750
- customRange?: SmartContract.CustomRange | null;
1751
-
1752
2608
  /**
1753
2609
  * Event emitted by the smart contract.
1754
2610
  */
1755
2611
  event?: string | null;
1756
2612
 
1757
- /**
1758
- * Maximum value allowed for the parameter.
1759
- */
1760
- max?: number | null;
1761
-
1762
2613
  /**
1763
2614
  * Array of parameters for the smart contract.
1764
2615
  */
1765
2616
  params?: Array<SmartContract.Param> | null;
1766
2617
 
1767
2618
  /**
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.
2619
+ * Type of the smart contract interaction.
1779
2620
  */
1780
- withMax?: boolean | null;
2621
+ type?: 'function' | 'event' | null;
1781
2622
  }
1782
2623
 
1783
2624
  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
2625
  /**
1797
- * Time range applied to the rule.
2626
+ * Object containing details of the amount multiplier from the event.
1798
2627
  */
1799
- export interface CustomRange {
1800
- /**
1801
- * End time of the custom range.
1802
- */
1803
- endsAt?: string | null;
1804
-
2628
+ export interface AmountMultiplier {
1805
2629
  /**
1806
- * Start time of the custom range.
2630
+ * Mapping of the value for the smart contract.
1807
2631
  */
1808
- startsAt?: string | null;
2632
+ valueMapping?: string | null;
1809
2633
  }
1810
2634
 
1811
2635
  export interface Param {
@@ -1849,6 +2673,33 @@ export namespace RuleUpdateResponse {
1849
2673
  */
1850
2674
  streakMilestone: number;
1851
2675
  }
2676
+
2677
+ /**
2678
+ * Metadata for swap loyalty rules
2679
+ */
2680
+ export interface Swap {
2681
+ provider?: 'any' | 'relay' | 'lifi';
2682
+
2683
+ relayReferrerId?: string;
2684
+
2685
+ requireCrossChainSwap?: boolean;
2686
+
2687
+ swappedToChain?: 'any' | number | string;
2688
+
2689
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2690
+
2691
+ tokenMode?: 'any' | 'specific';
2692
+
2693
+ trackTokenAmount?: boolean;
2694
+ }
2695
+
2696
+ export namespace Swap {
2697
+ export interface SwappedToToken {
2698
+ address: string;
2699
+
2700
+ chainId: string;
2701
+ }
2702
+ }
1852
2703
  }
1853
2704
  }
1854
2705
 
@@ -1859,9 +2710,6 @@ export interface RuleListResponse {
1859
2710
  }
1860
2711
 
1861
2712
  export namespace RuleListResponse {
1862
- /**
1863
- * Schema for a loyalty rule
1864
- */
1865
2713
  export interface Data {
1866
2714
  /**
1867
2715
  * Unique identifier for the loyalty rule
@@ -1871,7 +2719,7 @@ export namespace RuleListResponse {
1871
2719
  /**
1872
2720
  * Amount associated with the loyalty rule
1873
2721
  */
1874
- amount: number;
2722
+ amount: number | null;
1875
2723
 
1876
2724
  /**
1877
2725
  * Timestamp when the loyalty rule was created
@@ -1883,16 +2731,46 @@ export namespace RuleListResponse {
1883
2731
  */
1884
2732
  deletedAt: string | null;
1885
2733
 
2734
+ /**
2735
+ * Description of the loyalty rule
2736
+ */
2737
+ description: string;
2738
+
2739
+ /**
2740
+ * End time of the loyalty rule
2741
+ */
2742
+ endTime: string | null;
2743
+
1886
2744
  /**
1887
2745
  * Frequency of the loyalty rule
1888
2746
  */
1889
2747
  frequency: string;
1890
2748
 
2749
+ /**
2750
+ * Chains attached to the loyalty rule
2751
+ */
2752
+ loyaltyRuleChain: Array<Data.LoyaltyRuleChain>;
2753
+
2754
+ /**
2755
+ * Name of the loyalty rule
2756
+ */
2757
+ name: string;
2758
+
1891
2759
  /**
1892
2760
  * Unique identifier for the organization
1893
2761
  */
1894
2762
  organizationId: string;
1895
2763
 
2764
+ /**
2765
+ * Type of the reward
2766
+ */
2767
+ rewardType: 'points' | 'multiplier' | 'badge';
2768
+
2769
+ /**
2770
+ * Start time of the loyalty rule
2771
+ */
2772
+ startTime: string | null;
2773
+
1896
2774
  /**
1897
2775
  * Type of the loyalty rule
1898
2776
  */
@@ -1913,21 +2791,1060 @@ export namespace RuleListResponse {
1913
2791
  */
1914
2792
  collectionAddress?: string;
1915
2793
 
2794
+ /**
2795
+ * URL of the media associated with the loyalty rule
2796
+ */
2797
+ mediaUrl?: string | null;
2798
+
1916
2799
  /**
1917
2800
  * Optional metadata for the loyalty rule
1918
2801
  */
1919
- metadata?: Record<string, unknown>;
2802
+ metadata?: { [key: string]: Data.Metadata };
1920
2803
  }
1921
- }
1922
2804
 
1923
- export interface RuleDeleteResponse {
1924
- id: string;
2805
+ export namespace Data {
2806
+ export interface LoyaltyRuleChain {
2807
+ /**
2808
+ * Unique identifier for the rule chain
2809
+ */
2810
+ id: string;
2811
+
2812
+ loyaltyConditions: Array<LoyaltyRuleChain.LoyaltyCondition>;
2813
+
2814
+ /**
2815
+ * Unique identifier for the loyalty rule
2816
+ */
2817
+ loyaltyRuleId: string;
2818
+
2819
+ /**
2820
+ * Name of the rule chain
2821
+ */
2822
+ name: string;
2823
+ }
2824
+
2825
+ export namespace LoyaltyRuleChain {
2826
+ export interface LoyaltyCondition {
2827
+ /**
2828
+ * Unique identifier for the condition
2829
+ */
2830
+ id: string;
2831
+
2832
+ /**
2833
+ * Amount of the condition
2834
+ */
2835
+ amount: number | null;
2836
+
2837
+ association: Array<LoyaltyCondition.Association>;
2838
+
2839
+ /**
2840
+ * URL of the CSV file
2841
+ */
2842
+ csvUrl: string | null;
2843
+
2844
+ /**
2845
+ * Description of the condition
2846
+ */
2847
+ description: string | null;
2848
+
2849
+ /**
2850
+ * Number of times the condition must be met
2851
+ */
2852
+ repeatCount: number | null;
2853
+
2854
+ /**
2855
+ * Number of times the condition must be met
2856
+ */
2857
+ requiredCount: number | null;
2858
+
2859
+ /**
2860
+ * Type of the condition
2861
+ */
2862
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
2863
+ }
2864
+
2865
+ export namespace LoyaltyCondition {
2866
+ export interface Association {
2867
+ /**
2868
+ * Unique identifier for the association
2869
+ */
2870
+ id: string;
2871
+
2872
+ /**
2873
+ * Unique identifier for the loyalty badge
2874
+ */
2875
+ loyaltyBadgeId: string | null;
2876
+
2877
+ /**
2878
+ * Unique identifier for the loyalty currency
2879
+ */
2880
+ loyaltyCurrencyId: string | null;
2881
+
2882
+ loyaltyRule: Association.LoyaltyRule | null;
2883
+
2884
+ /**
2885
+ * Unique identifier for the loyalty rule group
2886
+ */
2887
+ loyaltyRuleGroupId: string | null;
2888
+
2889
+ /**
2890
+ * Unique identifier for the loyalty rule
2891
+ */
2892
+ loyaltyRuleId: string | null;
2893
+ }
2894
+
2895
+ export namespace Association {
2896
+ export interface LoyaltyRule {
2897
+ /**
2898
+ * Name of the loyalty rule
2899
+ */
2900
+ name: string;
2901
+ }
2902
+ }
2903
+ }
2904
+ }
2905
+
2906
+ export interface Metadata {
2907
+ /**
2908
+ * Array of loyalty rule IDs that count as check-in when completed. If ["any"] then
2909
+ * any rule completions count as check-in.
2910
+ */
2911
+ autoCheckInRuleIds?: Array<(string & {}) | 'any'> | null;
2912
+
2913
+ /**
2914
+ * Number of tokens per batch.
2915
+ */
2916
+ batchSize?: number | null;
2917
+
2918
+ /**
2919
+ * Text displayed on the action button.
2920
+ */
2921
+ buttonText?: string | null;
2922
+
2923
+ /**
2924
+ * Flag indicating if commenting is required.
2925
+ */
2926
+ checkComment?: boolean | null;
2927
+
2928
+ /**
2929
+ * Flag indicating if liking the post is required.
2930
+ */
2931
+ checkLike?: boolean | null;
2932
+
2933
+ /**
2934
+ * Flag indicating if reposting is required.
2935
+ */
2936
+ checkRepost?: boolean | null;
2937
+
2938
+ /**
2939
+ * Text to check in the Twitter post, username, or bio.
2940
+ */
2941
+ checkText?: string | Array<string> | null;
2942
+
2943
+ /**
2944
+ * Array of collections associated with the rule.
2945
+ */
2946
+ collection?: Array<Metadata.Collection>;
2947
+
2948
+ /**
2949
+ * Conditions for completing the profile.
2950
+ */
2951
+ completeProfileConditions?: { [key: string]: boolean } | null;
2952
+
2953
+ /**
2954
+ * Description of the external rule condition (only for external rules)
2955
+ */
2956
+ conditionDescription?: string;
2957
+
2958
+ /**
2959
+ * Object containing details for the call-to-action.
2960
+ */
2961
+ cta?: Metadata.Cta | null;
2962
+
2963
+ /**
2964
+ * API key for custom rewards integration.
2965
+ */
2966
+ customRewardsApiKey?: string;
2967
+
2968
+ /**
2969
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
2970
+ */
2971
+ directRpc?: boolean;
2972
+
2973
+ /**
2974
+ * Array of Discord servers, channels, and roles to join.
2975
+ */
2976
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2977
+
2978
+ /**
2979
+ * Array of drip quests required to complete the rule.
2980
+ */
2981
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2982
+
2983
+ /**
2984
+ * Flag indicating whether joining Discord servers is required.
2985
+ */
2986
+ enableJoinDiscordServers?: boolean | null;
2987
+
2988
+ /**
2989
+ * Flag indicating whether streaks are enabled.
2990
+ */
2991
+ enableStreaks?: boolean | null;
2992
+
2993
+ /**
2994
+ * Flag indicating whether the verified multiplier is enabled.
2995
+ */
2996
+ enableVerifiedMultiplier?: boolean;
2997
+
2998
+ /**
2999
+ * Type of ERC20 token for the loyalty rule.
3000
+ */
3001
+ erc20Type?: 'erc20' | 'native';
3002
+
3003
+ /**
3004
+ * Fill source of the order for the token sale
3005
+ */
3006
+ fillSource?: string;
3007
+
3008
+ /**
3009
+ * Percentage reward given to a user for their first referral.
3010
+ */
3011
+ firstReferralReward?: number | null;
3012
+
3013
+ /**
3014
+ * Name of the GitHub branch to check for PR merge.
3015
+ */
3016
+ githubBranchName?: string | null;
3017
+
3018
+ /**
3019
+ * URL of the GitHub repository to check for star.
3020
+ */
3021
+ githubRepoUrl?: string | null;
3022
+
3023
+ /**
3024
+ * Flag indicating whether the fill source is included.
3025
+ */
3026
+ hasFillSource?: boolean;
3027
+
3028
+ /**
3029
+ * Indicates if the item has never been sold.
3030
+ */
3031
+ hasNeverSold?: boolean;
3032
+
3033
+ /**
3034
+ * Indicates if the full royalty has been paid for items.
3035
+ */
3036
+ hasPaidFullRoyalty?: boolean;
3037
+
3038
+ /**
3039
+ * Flag indicating if the sale currency is included.
3040
+ */
3041
+ hasSaleCurrency?: boolean;
3042
+
3043
+ /**
3044
+ * Indicates if the user has a verified Twitter account.
3045
+ */
3046
+ hasVerifiedTwitter?: boolean;
3047
+
3048
+ /**
3049
+ * URL of the image associated with the rule.
3050
+ */
3051
+ imageUrl?: string | null;
3052
+
3053
+ /**
3054
+ * If enabled, the first transaction done on the platform will complete this rule
3055
+ */
3056
+ isCheckInOnEveryTxn?: boolean;
3057
+
3058
+ /**
3059
+ * Indicates if the multiplier has been applied to rewards.
3060
+ */
3061
+ isMultiplierApplied?: boolean;
3062
+
3063
+ /**
3064
+ * Flag indicating if the rule is restricted to new users.
3065
+ */
3066
+ isRestrictedToNewUsers?: boolean;
3067
+
3068
+ /**
3069
+ * Flag indicating if rewards are applied retroactively.
3070
+ */
3071
+ isRetroactive?: boolean | null;
3072
+
3073
+ /**
3074
+ * Flag indicating if the token hold multiplier is applied.
3075
+ */
3076
+ isTokenHoldMultiplier?: boolean;
3077
+
3078
+ /**
3079
+ * Optional link associated with the metadata.
3080
+ */
3081
+ link?: string | null;
3082
+
3083
+ /**
3084
+ * Liquidity pool details.
3085
+ */
3086
+ liquidity?: Metadata.Liquidity;
3087
+
3088
+ /**
3089
+ * Maximum quantity constraint for token holding.
3090
+ */
3091
+ maxQty?: number | null;
3092
+
3093
+ /**
3094
+ * Minimum quantity constraint for token holding.
3095
+ */
3096
+ minQty?: number | null;
3097
+
3098
+ /**
3099
+ * Array of loyalty currency IDs used for multipliers.
3100
+ */
3101
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
3102
+
3103
+ /**
3104
+ * Flag indicating whether to include only known users.
3105
+ */
3106
+ onlyKnownUsers?: boolean;
3107
+
3108
+ /**
3109
+ * Flag indicating whether to include only native tokens.
3110
+ */
3111
+ onlyNative?: boolean;
3112
+
3113
+ /**
3114
+ * Flag indicating whether to include only non-listed items.
3115
+ */
3116
+ onlyNonListed?: boolean;
3117
+
3118
+ /**
3119
+ * Indicates if only existing users are rewarded.
3120
+ */
3121
+ onlyRewardExistingUser?: boolean;
3122
+
3123
+ /**
3124
+ * give points for only one token ownership per contract
3125
+ */
3126
+ onlyRewardSingleTokenOwnership?: boolean | null;
3127
+
3128
+ /**
3129
+ * Pre-generated text template that will be used to prefill the post content.
3130
+ */
3131
+ preGeneratedPostText?: string | null;
3132
+
3133
+ /**
3134
+ * Promotional code associated with the rule.
3135
+ */
3136
+ promoCode?: string;
3137
+
3138
+ /**
3139
+ * URL of the CSV file containing promo codes.
3140
+ */
3141
+ promoCodeCsvUrl?: string;
3142
+
3143
+ /**
3144
+ * Numbers of the promotional code to be generated.
3145
+ */
3146
+ promoCodeLength?: number | null;
3147
+
3148
+ /**
3149
+ * Type of the promotional code.
3150
+ */
3151
+ promoCodeType?: 'code' | 'csv' | 'generate';
3152
+
3153
+ /**
3154
+ * Array defining ranges and corresponding rewards.
3155
+ */
3156
+ range?: Array<Metadata.Range>;
3157
+
3158
+ /**
3159
+ * ID of the Reddit post.
3160
+ */
3161
+ redditPostId?: string | null;
3162
+
3163
+ /**
3164
+ * Object defining referral requirements.
3165
+ */
3166
+ referralRequirements?: Metadata.ReferralRequirements | null;
3167
+
3168
+ /**
3169
+ * Lump sum reward given to a referrer.
3170
+ */
3171
+ referrerReward?: number | null;
3172
+
3173
+ /**
3174
+ * Loyalty currency ID of the referrer reward.
3175
+ */
3176
+ referrerRewardLoyaltyCurrencyId?: string | null;
3177
+
3178
+ /**
3179
+ * Flag indicating if the post link is required.
3180
+ */
3181
+ requirePostLink?: boolean | null;
3182
+
3183
+ /**
3184
+ * Flag indicating if media metadata is required.
3185
+ */
3186
+ requirePostMediaLink?: boolean | null;
3187
+
3188
+ /**
3189
+ * Flag indicating if the rule can also reward badges per range.
3190
+ */
3191
+ rewardBadgePerRange?: boolean;
3192
+
3193
+ /**
3194
+ * Flag indicating if the reward is rewarded by batch.
3195
+ */
3196
+ rewardByBatch?: boolean | null;
3197
+
3198
+ /**
3199
+ * Criteria to evaluate the reward.
3200
+ */
3201
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
3202
+
3203
+ /**
3204
+ * Flag indicating if the reward is rewarded per action.
3205
+ */
3206
+ rewardPerAction?: boolean | null;
3207
+
3208
+ /**
3209
+ * Flag indicating if rewards are given per impression.
3210
+ */
3211
+ rewardPerImpression?: boolean | null;
3212
+
3213
+ /**
3214
+ * Flag indicating if the rule should reward based on value of traded tokens
3215
+ * instead of count.
3216
+ */
3217
+ rewardPerValue?: boolean;
3218
+
3219
+ /**
3220
+ * Flag indicating if the rule should reward quality posts.
3221
+ */
3222
+ rewardQualityPosts?: boolean;
3223
+
3224
+ /**
3225
+ * Wallet address of the user can only be used if userId is not provided
3226
+ */
3227
+ royaltyAddress?: string;
3228
+
3229
+ /**
3230
+ * Royalty percentage of the item.
3231
+ */
3232
+ royaltyPercentage?: number;
3233
+
3234
+ /**
3235
+ * Currency associated with sales.
3236
+ */
3237
+ saleCurrency?: string;
3238
+
3239
+ /**
3240
+ * Percentage reward given for a second-level referral.
3241
+ */
3242
+ secondReferralReward?: number | null;
3243
+
3244
+ /**
3245
+ * Flag indicating if the multiplier is skipped.
3246
+ */
3247
+ skipMultiplier?: boolean | null;
3248
+
3249
+ /**
3250
+ * Object containing details of the associated smart contract.
3251
+ */
3252
+ smartContract?: Metadata.SmartContract;
3253
+
3254
+ /**
3255
+ * Array of snapshot proposals for the rule.
3256
+ */
3257
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
3258
+
3259
+ /**
3260
+ * Social media platform associated with the rule.
3261
+ */
3262
+ socialPlatform?:
3263
+ | 'Custom'
3264
+ | 'Discord'
3265
+ | 'EpicGames'
3266
+ | 'Instagram'
3267
+ | 'Steam'
3268
+ | 'Telegram'
3269
+ | 'TikTok'
3270
+ | 'Twitch'
3271
+ | 'X(Twitter)'
3272
+ | 'YouTube'
3273
+ | 'Google'
3274
+ | 'GitHub'
3275
+ | 'Reddit'
3276
+ | null;
3277
+
3278
+ /**
3279
+ * URL of the social platform's logo.
3280
+ */
3281
+ socialPlatformLogo?: string | null;
3282
+
3283
+ /**
3284
+ * Name of the social platform.
3285
+ */
3286
+ socialPlatformName?: string | null;
3287
+
3288
+ /**
3289
+ * ID of the Steam app.
3290
+ */
3291
+ steamAppId?: string | null;
3292
+
3293
+ /**
3294
+ * Array of streak milestones and corresponding rewards.
3295
+ */
3296
+ streakArray?: Array<Metadata.StreakArray> | null;
3297
+
3298
+ /**
3299
+ * Metadata for swap loyalty rules
3300
+ */
3301
+ swap?: Metadata.Swap;
3302
+
3303
+ /**
3304
+ * ID of the Telegram channel.
3305
+ */
3306
+ telegramChannelId?: string | null;
3307
+
3308
+ /**
3309
+ * Time delay in seconds to verify actions.
3310
+ */
3311
+ timeDelayToVerifySeconds?: string | number | null;
3312
+
3313
+ /**
3314
+ * Flag indicating if all contracts are tracked.
3315
+ */
3316
+ trackAllContracts?: boolean | null;
3317
+
3318
+ /**
3319
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
3320
+ * completed once the progress is 100%.
3321
+ */
3322
+ trackProgress?: boolean | null;
3323
+
3324
+ /**
3325
+ * URL of the associated Twitter account.
3326
+ */
3327
+ twitterAccountUrl?: string;
3328
+
3329
+ /**
3330
+ * Hashtag associated with the Twitter post.
3331
+ */
3332
+ twitterHashtag?: string;
3333
+
3334
+ /**
3335
+ * URL of the associated Twitter post.
3336
+ */
3337
+ twitterPostUrl?: string;
3338
+
3339
+ /**
3340
+ * Unique identifier of the Twitter user.
3341
+ */
3342
+ twitterUserId?: string;
3343
+
3344
+ /**
3345
+ * Twitter username of the user.
3346
+ */
3347
+ twitterUsername?: string;
3348
+
3349
+ /**
3350
+ * Minimum length of the verification text.
3351
+ */
3352
+ verificationTextMinimumLength?: number | null;
3353
+
3354
+ /**
3355
+ * Multiplier applied to rewards for verified users.
3356
+ */
3357
+ verifiedMultiplier?: number | null;
3358
+
3359
+ /**
3360
+ * Placeholder text for verification input fields.
3361
+ */
3362
+ verifyPlaceHolderText?: string | null;
3363
+
3364
+ /**
3365
+ * Type of wallet associated with the rule.
3366
+ */
3367
+ walletType?:
3368
+ | 'evm'
3369
+ | 'solana'
3370
+ | 'imx'
3371
+ | 'sui'
3372
+ | 'ton'
3373
+ | 'cosmos'
3374
+ | 'ultra'
3375
+ | 'agw'
3376
+ | 'flow_cadence'
3377
+ | 'substrate'
3378
+ | null;
3379
+
3380
+ /**
3381
+ * ID of the Youtube channel.
3382
+ */
3383
+ youtubeChannelId?: string | null;
3384
+
3385
+ /**
3386
+ * ID of the Youtube video.
3387
+ */
3388
+ youtubeVideoId?: string | null;
3389
+ }
3390
+
3391
+ export namespace Metadata {
3392
+ export interface Collection {
3393
+ /**
3394
+ * Blockchain address of the collection.
3395
+ */
3396
+ address?: string;
3397
+
3398
+ /**
3399
+ * Multiplier applied to the rewards for this collection.
3400
+ */
3401
+ multiplier?: number;
3402
+
3403
+ /**
3404
+ * Blockchain network of the collection.
3405
+ */
3406
+ network?:
3407
+ | 'abstract'
3408
+ | 'abstractTestnet'
3409
+ | 'apechain'
3410
+ | 'arbitrum'
3411
+ | 'avalanche'
3412
+ | 'avalancheFuji'
3413
+ | 'base'
3414
+ | 'baseSepolia'
3415
+ | 'berachain'
3416
+ | 'berachainArtio'
3417
+ | 'berachainBepolia'
3418
+ | 'binance'
3419
+ | 'bscTestnet'
3420
+ | 'campTestnet'
3421
+ | 'fantom'
3422
+ | 'fantomTestnet'
3423
+ | 'flowMainnet'
3424
+ | 'mainnet'
3425
+ | 'nexusTestnet'
3426
+ | 'optimism'
3427
+ | 'polygon'
3428
+ | 'polygon_mumbai'
3429
+ | 'skaleNebula'
3430
+ | 'skaleEuropa'
3431
+ | 'skaleCalypso'
3432
+ | 'solana'
3433
+ | 'sophon'
3434
+ | 'sophonTestnet'
3435
+ | 'sui'
3436
+ | 'superseed'
3437
+ | 'superseedSepolia'
3438
+ | 'vanar'
3439
+ | 'xai'
3440
+ | 'zksync'
3441
+ | 'coti'
3442
+ | 'cotiTestnet'
3443
+ | 'morph'
3444
+ | 'morphTestnet'
3445
+ | 'morphHolesky'
3446
+ | 'ultra'
3447
+ | 'ultraTestnet'
3448
+ | 'nitrograph'
3449
+ | 'sepolia'
3450
+ | 'optimism_sepolia'
3451
+ | 'arbitrumSepolia'
3452
+ | 'goerli'
3453
+ | 'optimism_goerli'
3454
+ | 'arbitrumGoerli'
3455
+ | 'basecamp'
3456
+ | 'somnia'
3457
+ | 'zkverify'
3458
+ | 'polkadot'
3459
+ | 'kusama'
3460
+ | 'flow_cadence';
3461
+ }
3462
+
3463
+ /**
3464
+ * Object containing details for the call-to-action.
3465
+ */
3466
+ export interface Cta {
3467
+ /**
3468
+ * Link for the call-to-action.
3469
+ */
3470
+ href?: string | null;
3471
+
3472
+ /**
3473
+ * Label for the call-to-action.
3474
+ */
3475
+ label?: string | null;
3476
+ }
3477
+
3478
+ export interface DiscordServersToJoin {
3479
+ /**
3480
+ * ID of the Discord server to join.
3481
+ */
3482
+ id?: string;
3483
+
3484
+ /**
3485
+ * Array of Discord channels to join.
3486
+ */
3487
+ channels?: Array<DiscordServersToJoin.Channel>;
3488
+
3489
+ /**
3490
+ * Array of roles to assign in the Discord server.
3491
+ */
3492
+ roles?: Array<DiscordServersToJoin.Role>;
3493
+ }
3494
+
3495
+ export namespace DiscordServersToJoin {
3496
+ export interface Channel {
3497
+ /**
3498
+ * ID of the Discord channel.
3499
+ */
3500
+ id?: string;
3501
+
3502
+ /**
3503
+ * Array of emojis used in the channel.
3504
+ */
3505
+ emojis?: Array<Channel.Emoji>;
3506
+
3507
+ /**
3508
+ * Phrase of text to be present in the discord message
3509
+ */
3510
+ text?: string;
3511
+ }
3512
+
3513
+ export namespace Channel {
3514
+ export interface Emoji {
3515
+ /**
3516
+ * ID of the emoji used in the channel.
3517
+ */
3518
+ id?: string;
3519
+ }
3520
+ }
3521
+
3522
+ export interface Role {
3523
+ /**
3524
+ * ID of the role in the Discord server.
3525
+ */
3526
+ id: string;
3527
+ }
3528
+ }
3529
+
3530
+ export interface DripQuestsToComplete {
3531
+ /**
3532
+ * ID of the drip quest to complete.
3533
+ */
3534
+ id: string;
3535
+ }
3536
+
3537
+ /**
3538
+ * Liquidity pool details.
3539
+ */
3540
+ export interface Liquidity {
3541
+ /**
3542
+ * Calculation type of the liquidity pool.
3543
+ */
3544
+ calculationType?: 'fixed' | 'custom';
3545
+
3546
+ /**
3547
+ * Custom function to calculate the the reward amount based on the liquidity
3548
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
3549
+ * USD.
3550
+ */
3551
+ customFunction?: string;
3552
+
3553
+ /**
3554
+ * Liquidity provided per day in USD
3555
+ */
3556
+ liquidityPerDay?: number;
3557
+
3558
+ /**
3559
+ * Blockchain network of the liquidity pool.
3560
+ */
3561
+ network?:
3562
+ | 'abstract'
3563
+ | 'abstractTestnet'
3564
+ | 'apechain'
3565
+ | 'arbitrum'
3566
+ | 'avalanche'
3567
+ | 'avalancheFuji'
3568
+ | 'base'
3569
+ | 'baseSepolia'
3570
+ | 'berachain'
3571
+ | 'berachainArtio'
3572
+ | 'berachainBepolia'
3573
+ | 'binance'
3574
+ | 'bscTestnet'
3575
+ | 'campTestnet'
3576
+ | 'fantom'
3577
+ | 'fantomTestnet'
3578
+ | 'flowMainnet'
3579
+ | 'mainnet'
3580
+ | 'nexusTestnet'
3581
+ | 'optimism'
3582
+ | 'polygon'
3583
+ | 'polygon_mumbai'
3584
+ | 'skaleNebula'
3585
+ | 'skaleEuropa'
3586
+ | 'skaleCalypso'
3587
+ | 'solana'
3588
+ | 'sophon'
3589
+ | 'sophonTestnet'
3590
+ | 'sui'
3591
+ | 'superseed'
3592
+ | 'superseedSepolia'
3593
+ | 'vanar'
3594
+ | 'xai'
3595
+ | 'zksync'
3596
+ | 'coti'
3597
+ | 'cotiTestnet'
3598
+ | 'morph'
3599
+ | 'morphTestnet'
3600
+ | 'morphHolesky'
3601
+ | 'ultra'
3602
+ | 'ultraTestnet'
3603
+ | 'nitrograph'
3604
+ | 'sepolia'
3605
+ | 'optimism_sepolia'
3606
+ | 'arbitrumSepolia'
3607
+ | 'goerli'
3608
+ | 'optimism_goerli'
3609
+ | 'arbitrumGoerli'
3610
+ | 'basecamp'
3611
+ | 'somnia'
3612
+ | 'zkverify'
3613
+ | 'polkadot'
3614
+ | 'kusama'
3615
+ | 'flow_cadence';
3616
+
3617
+ /**
3618
+ * Indicates if only in-range liquidity is rewarded.
3619
+ */
3620
+ onlyRewardInRangeLiquidity?: boolean;
3621
+
3622
+ /**
3623
+ * Array of liquidity pools associated with the rule.
3624
+ */
3625
+ pools?: Array<Liquidity.Pool>;
3626
+
3627
+ /**
3628
+ * Protocol of the liquidity pool.
3629
+ */
3630
+ protocol?: string;
3631
+ }
3632
+
3633
+ export namespace Liquidity {
3634
+ export interface Pool {
3635
+ /**
3636
+ * Unique identifier of the liquidity pool.
3637
+ */
3638
+ id: string;
3639
+ }
3640
+ }
3641
+
3642
+ export interface Range {
3643
+ /**
3644
+ * Reward amount for this range.
3645
+ */
3646
+ amount: number;
3647
+
3648
+ /**
3649
+ * End value of the range.
3650
+ */
3651
+ endRange: number;
3652
+
3653
+ /**
3654
+ * Start value of the range.
3655
+ */
3656
+ startRange: number;
3657
+
3658
+ /**
3659
+ * ID of the loyalty badge for this range.
3660
+ */
3661
+ loyaltyBadgeId?: string;
3662
+
3663
+ /**
3664
+ * Amount of the loyalty multiplier for this range.
3665
+ */
3666
+ loyaltyMultiplierAmount?: number;
3667
+ }
3668
+
3669
+ /**
3670
+ * Object defining referral requirements.
3671
+ */
3672
+ export interface ReferralRequirements {
3673
+ /**
3674
+ * Flag indicating if achieving points is required.
3675
+ */
3676
+ achievePoints?: boolean | null;
3677
+
3678
+ /**
3679
+ * Flag indicating if completing the profile is required.
3680
+ */
3681
+ completeProfile?: boolean | null;
3682
+
3683
+ /**
3684
+ * Flag indicating if connecting Discord is required.
3685
+ */
3686
+ connectDiscord?: boolean | null;
3687
+
3688
+ /**
3689
+ * Flag indicating if connecting email is required.
3690
+ */
3691
+ connectEmail?: boolean | null;
3692
+
3693
+ /**
3694
+ * Flag indicating if connecting Twitter is required.
3695
+ */
3696
+ connectTwitter?: boolean | null;
3697
+
3698
+ points?: ReferralRequirements.Points | null;
3699
+ }
3700
+
3701
+ export namespace ReferralRequirements {
3702
+ export interface Points {
3703
+ /**
3704
+ * Points required for referral.
3705
+ */
3706
+ amount?: number | null;
3707
+
3708
+ /**
3709
+ * ID of the loyalty currency for referral.
3710
+ */
3711
+ loyaltyCurrecyId?: string | null;
3712
+ }
3713
+ }
3714
+
3715
+ /**
3716
+ * Object containing details of the associated smart contract.
3717
+ */
3718
+ export interface SmartContract {
3719
+ /**
3720
+ * Mapping of addresses for the smart contract.
3721
+ */
3722
+ addressMapping?: string | null;
3723
+
3724
+ /**
3725
+ * Object containing details of the amount multiplier from the event.
3726
+ */
3727
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3728
+
3729
+ /**
3730
+ * ID of the smart contract.
3731
+ */
3732
+ contractId?: string | null;
3733
+
3734
+ /**
3735
+ * Criteria to evaluate the smart contract event.
3736
+ */
3737
+ criteria?: 'everyEvent' | 'byParameter' | null;
3738
+
3739
+ /**
3740
+ * Event emitted by the smart contract.
3741
+ */
3742
+ event?: string | null;
3743
+
3744
+ /**
3745
+ * Array of parameters for the smart contract.
3746
+ */
3747
+ params?: Array<SmartContract.Param> | null;
3748
+
3749
+ /**
3750
+ * Type of the smart contract interaction.
3751
+ */
3752
+ type?: 'function' | 'event' | null;
3753
+ }
3754
+
3755
+ export namespace SmartContract {
3756
+ /**
3757
+ * Object containing details of the amount multiplier from the event.
3758
+ */
3759
+ export interface AmountMultiplier {
3760
+ /**
3761
+ * Mapping of the value for the smart contract.
3762
+ */
3763
+ valueMapping?: string | null;
3764
+ }
3765
+
3766
+ export interface Param {
3767
+ /**
3768
+ * Condition to check for the parameter.
3769
+ */
3770
+ condition?: string | null;
3771
+
3772
+ /**
3773
+ * Name of the smart contract parameter.
3774
+ */
3775
+ name?: string | null;
3776
+
3777
+ /**
3778
+ * Value of the parameter.
3779
+ */
3780
+ value?: string | null;
3781
+ }
3782
+ }
3783
+
3784
+ export interface SnapshotProposal {
3785
+ /**
3786
+ * ID of the snapshot proposal.
3787
+ */
3788
+ id: string;
3789
+
3790
+ /**
3791
+ * Space associated with the snapshot proposal.
3792
+ */
3793
+ space: string;
3794
+ }
3795
+
3796
+ export interface StreakArray {
3797
+ /**
3798
+ * Reward amount for achieving the streak milestone.
3799
+ */
3800
+ streakAmount: number;
3801
+
3802
+ /**
3803
+ * Milestone required to achieve the streak.
3804
+ */
3805
+ streakMilestone: number;
3806
+ }
3807
+
3808
+ /**
3809
+ * Metadata for swap loyalty rules
3810
+ */
3811
+ export interface Swap {
3812
+ provider?: 'any' | 'relay' | 'lifi';
3813
+
3814
+ relayReferrerId?: string;
3815
+
3816
+ requireCrossChainSwap?: boolean;
3817
+
3818
+ swappedToChain?: 'any' | number | string;
3819
+
3820
+ swappedToTokens?: Array<Swap.SwappedToToken>;
3821
+
3822
+ tokenMode?: 'any' | 'specific';
3823
+
3824
+ trackTokenAmount?: boolean;
3825
+ }
3826
+
3827
+ export namespace Swap {
3828
+ export interface SwappedToToken {
3829
+ address: string;
3830
+
3831
+ chainId: string;
3832
+ }
3833
+ }
3834
+ }
3835
+ }
3836
+ }
3837
+
3838
+ export interface RuleDeleteResponse {
3839
+ id: string;
1925
3840
 
1926
3841
  deletedAt: string;
1927
3842
  }
1928
3843
 
1929
3844
  export interface RuleCompleteResponse {
1930
- message: string;
3845
+ message:
3846
+ | 'Completion request added to queue'
3847
+ | 'Link click being verified, come back later to check the status';
1931
3848
  }
1932
3849
 
1933
3850
  export interface RuleGetStatusResponse {
@@ -1938,11 +3855,119 @@ export namespace RuleGetStatusResponse {
1938
3855
  export interface Data {
1939
3856
  loyaltyRuleId: string;
1940
3857
 
1941
- status: 'pending' | 'processing' | 'completed' | 'failed';
1942
-
1943
3858
  userId: string;
1944
3859
 
3860
+ /**
3861
+ * The ID of the loyalty rule status for the Progress object
3862
+ */
3863
+ id?: string;
3864
+
3865
+ createdAt?: string;
3866
+
3867
+ fulfilledAt?: string | null;
3868
+
3869
+ /**
3870
+ * Categorized examples of messages that may be returned for a loyalty rule's
3871
+ * processing result.
3872
+ *
3873
+ * User Onboarding
3874
+ *
3875
+ * - Check In: "Streak successful"
3876
+ * - Complete Profile Details: "Profile not complete"
3877
+ *
3878
+ * Connect Accounts
3879
+ *
3880
+ * - Connect TikTok: "TikTok not connected"
3881
+ * - Connect Discord: "Discord not connected", "Discord request timeout"
3882
+ * - Connect X: "Twitter not connected", "Twitter not connected or content url is
3883
+ * required"
3884
+ * - Connect Email: "Email address not connected"
3885
+ * - Connect Telegram: "Telegram not connected", "user has not setup telegram (no
3886
+ * telegramUsername), please setup username in telegram and reconnect.",
3887
+ * "Telegram request rate-limited"
3888
+ * - Connect Steam: "Steam not connected"
3889
+ * - Connect Youtube: "Youtube not connected"
3890
+ *
3891
+ * Social Quests
3892
+ *
3893
+ * - Join Telegram Group: "Telegram Channel not joined", "Telegram Channel joined
3894
+ * successfully"
3895
+ * - Post on TikTok: "TikTok post not verified"
3896
+ * - Comment on an X Post: "Quest Completed: You have commented on the tweet",
3897
+ * "Quest Not Completed: Comment not found for the specified tweet"
3898
+ * - Repost an X Post: "Quest Completed: You have retweeted the tweet", "Quest Not
3899
+ * Completed: Retweet not found for the specified tweet", "Quest Completed: You
3900
+ * have retweeted and commented on the tweet", "Quest Not Completed: You have not
3901
+ * retweeted or commented on the tweet"
3902
+ * - Follow an X Account: "Missing required parameters: twitterUserId,
3903
+ * targetUsername", "Quest Completed: You are a follower of
3904
+ * @${targetUsername}", "Quest Not Completed: Please follow @${targetUsername}
3905
+ * and try again in few minutes"
3906
+ * - React to an X Post: "Missing required parameters: texts, twitterUserId,
3907
+ * userTweetId", "No text provided", "Quest Completed: You have posted {tweetId}
3908
+ * a tweet with the text {text}", "Quest Not Completed: Your all previous {COUNT}
3909
+ * posts are already claimed. Please post a new tweet and try again in a few
3910
+ * minutes.", "Tweet is already claimed", "Tweet does not belong to the user",
3911
+ * "Text not found in tweet", "Tweet is before the quest start time", "Tweet does
3912
+ * not have media", "Text found in tweet"
3913
+ * - Add Text to X Bio: "Missing required parameters: texts, twitterUserId", "User
3914
+ * not found", "Text found in bio", "Text not found in bio"
3915
+ * - Add Text to X Username: "Missing required parameters: texts, twitterUserId",
3916
+ * "User not found", "Text found in username", "Text not found in username"
3917
+ * - Comment on an X Post with Text: "Missing required parameters: texts,
3918
+ * twitterUserId", "Comment is already claimed", "Text found in comment", "Text
3919
+ * not found in comment", "Tweet not found or could not be retrieved"
3920
+ * - Comment on a YouTube Video: "Youtube comment added", "Youtube comment not
3921
+ * added"
3922
+ * - Subscribe to a YouTube Channel: "Youtube channel subscribed", "Quest failed,
3923
+ * please make sure you have made your subscriptions public in youtube"
3924
+ * - Get X post impressions: "You've already claimed the reward for this impression
3925
+ * range."
3926
+ * - Add an Item to Steam Wishlist: "Steam Wishlist item added", "Steam Wishlist
3927
+ * item not added"
3928
+ *
3929
+ * Complex Onchain Logic
3930
+ *
3931
+ * - Token Swap: "Swap rewards calculated successfully", "Swap rule failed"
3932
+ *
3933
+ * Other
3934
+ *
3935
+ * - Answer a Quiz: "Quiz question not configured", "No question response found",
3936
+ * "Incorrect answer", "Correct answer"
3937
+ * - Answer a Poll: "Poll question not configured", "Poll response recorded"
3938
+ * - Spend in Shopify Store: "Shopify not connected"
3939
+ * - Points Airdrop: "Seems like you're not eligible for this points airdrop."
3940
+ *
3941
+ * General
3942
+ *
3943
+ * - "Quest already completed"
3944
+ * - "Quest already completed using the same social account (${socialAccountName}),
3945
+ * with the different user."
3946
+ * - "You've already claimed the reward for this quest."
3947
+ * - "Quest not achieved, please try again."
3948
+ * - "Rule is not setup"
3949
+ * - "Request aborted due to timeout"
3950
+ * - "Google account not connected"
3951
+ * - "Claim failed: Multiplier is already active"
3952
+ */
1945
3953
  message?: string;
3954
+
3955
+ organizationId?: string;
3956
+
3957
+ /**
3958
+ * The progress of the loyalty rule from 0 to 100
3959
+ */
3960
+ progress?: number;
3961
+
3962
+ /**
3963
+ * Status of the queued job, this is only returned if the job is queued and being
3964
+ * processed, this wil be retained for 10 minutes after the job is completed
3965
+ */
3966
+ status?: 'pending' | 'processing' | 'completed' | 'failed';
3967
+
3968
+ updatedAt?: string;
3969
+
3970
+ websiteId?: string;
1946
3971
  }
1947
3972
  }
1948
3973
 
@@ -2024,6 +4049,7 @@ export interface RuleCreateParams {
2024
4049
  | 'connected_discord'
2025
4050
  | 'connected_email'
2026
4051
  | 'connected_epic'
4052
+ | 'connected_github'
2027
4053
  | 'connected_steam'
2028
4054
  | 'connected_telegram'
2029
4055
  | 'connected_twitter'
@@ -2053,7 +4079,29 @@ export interface RuleCreateParams {
2053
4079
  | 'twitter_like'
2054
4080
  | 'twitter_post_hashtag'
2055
4081
  | 'quiz'
2056
- | 'poll';
4082
+ | 'poll'
4083
+ | 'steam_wishlist'
4084
+ | 'liquidity_uniswap_v2'
4085
+ | 'liquidity_uniswap_v3'
4086
+ | 'points_airdrop'
4087
+ | 'youtube_subscribers'
4088
+ | 'youtube_comment'
4089
+ | 'shopify_spend'
4090
+ | 'swap'
4091
+ | 'tiktok_post'
4092
+ | 'post_impressions'
4093
+ | 'discord_join'
4094
+ | 'connected_youtube'
4095
+ | 'stratus_function'
4096
+ | 'connected_tiktok'
4097
+ | 'tiktok_follow'
4098
+ | 'github_repo_star'
4099
+ | 'github_repo_fork'
4100
+ | 'github_repo_collaborator'
4101
+ | 'github_merge_PR'
4102
+ | 'discord_role_grant'
4103
+ | 'connected_reddit'
4104
+ | 'reddit_comment';
2057
4105
 
2058
4106
  /**
2059
4107
  * Unique identifier for the associated website
@@ -2065,6 +4113,11 @@ export interface RuleCreateParams {
2065
4113
  */
2066
4114
  backgroundAssetUrl?: string;
2067
4115
 
4116
+ /**
4117
+ * The type of claim for the reward
4118
+ */
4119
+ claimType?: 'manual' | 'auto' | null;
4120
+
2068
4121
  /**
2069
4122
  * Blockchain address of the associated collection
2070
4123
  */
@@ -2090,6 +4143,18 @@ export interface RuleCreateParams {
2090
4143
  */
2091
4144
  description?: string;
2092
4145
 
4146
+ duplicatedFromId?: string | null;
4147
+
4148
+ /**
4149
+ * ID of the external integration
4150
+ */
4151
+ externalIntegrationId?: string | null;
4152
+
4153
+ /**
4154
+ * Optional stratus function id for the rule
4155
+ */
4156
+ functionId?: string | null;
4157
+
2093
4158
  /**
2094
4159
  * Whether to hide this rule in the user interface
2095
4160
  */
@@ -2098,18 +4163,40 @@ export interface RuleCreateParams {
2098
4163
  /**
2099
4164
  * Interval between rule executions
2100
4165
  */
2101
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
4166
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
2102
4167
 
2103
4168
  /**
2104
4169
  * Whether this rule is mandatory
2105
4170
  */
2106
4171
  isRequired?: boolean;
2107
4172
 
4173
+ /**
4174
+ * Unique identifier for the loyalty badge
4175
+ */
4176
+ loyaltyBadgeId?: string | null;
4177
+
2108
4178
  /**
2109
4179
  * Unique identifier for the loyalty rule group
2110
4180
  */
2111
4181
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
2112
4182
 
4183
+ /**
4184
+ * URL for uploading loyalty user allotment via CSV
4185
+ */
4186
+ loyaltyUserAllotmentCsvUrl?: string;
4187
+
4188
+ /**
4189
+ * The interval for the max amount. Available for the smart contract and external
4190
+ * rules.
4191
+ */
4192
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
4193
+
4194
+ /**
4195
+ * The maximum amount of points a user can earn per interval. Available for the
4196
+ * smart contract and external rules.
4197
+ */
4198
+ maxAmountPerInterval?: number | null;
4199
+
2113
4200
  /**
2114
4201
  * URL of the media to be displayed
2115
4202
  */
@@ -2119,13 +4206,17 @@ export interface RuleCreateParams {
2119
4206
  * Blockchain network where the rule will apply
2120
4207
  */
2121
4208
  network?:
4209
+ | 'abstract'
4210
+ | 'abstractTestnet'
2122
4211
  | 'apechain'
2123
4212
  | 'arbitrum'
2124
4213
  | 'avalanche'
2125
4214
  | 'avalancheFuji'
2126
4215
  | 'base'
2127
4216
  | 'baseSepolia'
4217
+ | 'berachain'
2128
4218
  | 'berachainArtio'
4219
+ | 'berachainBepolia'
2129
4220
  | 'binance'
2130
4221
  | 'bscTestnet'
2131
4222
  | 'campTestnet'
@@ -2133,18 +4224,30 @@ export interface RuleCreateParams {
2133
4224
  | 'fantomTestnet'
2134
4225
  | 'flowMainnet'
2135
4226
  | 'mainnet'
4227
+ | 'nexusTestnet'
2136
4228
  | 'optimism'
2137
4229
  | 'polygon'
2138
4230
  | 'polygon_mumbai'
2139
4231
  | 'skaleNebula'
4232
+ | 'skaleEuropa'
4233
+ | 'skaleCalypso'
2140
4234
  | 'solana'
2141
4235
  | 'sophon'
4236
+ | 'sophonTestnet'
2142
4237
  | 'sui'
2143
4238
  | 'superseed'
2144
4239
  | 'superseedSepolia'
2145
4240
  | 'vanar'
2146
4241
  | 'xai'
2147
4242
  | 'zksync'
4243
+ | 'coti'
4244
+ | 'cotiTestnet'
4245
+ | 'morph'
4246
+ | 'morphTestnet'
4247
+ | 'morphHolesky'
4248
+ | 'ultra'
4249
+ | 'ultraTestnet'
4250
+ | 'nitrograph'
2148
4251
  | 'sepolia'
2149
4252
  | 'optimism_sepolia'
2150
4253
  | 'arbitrumSepolia'
@@ -2152,22 +4255,41 @@ export interface RuleCreateParams {
2152
4255
  | 'optimism_goerli'
2153
4256
  | 'arbitrumGoerli'
2154
4257
  | 'basecamp'
2155
- | 'abstract';
4258
+ | 'somnia'
4259
+ | 'zkverify'
4260
+ | 'polkadot'
4261
+ | 'kusama'
4262
+ | 'flow_cadence';
2156
4263
 
2157
4264
  /**
2158
4265
  * OAuth credentials associated with the rule
2159
4266
  */
2160
4267
  oauthCredentialsId?: string | null;
2161
4268
 
4269
+ /**
4270
+ * The lifetime of the reward
4271
+ */
4272
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
4273
+
2162
4274
  /**
2163
4275
  * Type of reward issued by the rule
2164
4276
  */
2165
- rewardType?: 'points' | 'multiplier';
4277
+ rewardType?: 'points' | 'multiplier' | 'badge';
4278
+
4279
+ /**
4280
+ * URL of the Shopify store
4281
+ */
4282
+ shopifyStoreUrl?: string | null;
4283
+
4284
+ /**
4285
+ * Whether to show this rule before the start time
4286
+ */
4287
+ showBeforeStart?: boolean;
2166
4288
 
2167
4289
  /**
2168
- * Identifier for associated subscriptions
4290
+ * Optional stratus subscription id for the rule
2169
4291
  */
2170
- subscriptionIdentifier?: string | null;
4292
+ subscriptionId?: string | null;
2171
4293
  }
2172
4294
 
2173
4295
  export namespace RuleCreateParams {
@@ -2175,6 +4297,17 @@ export namespace RuleCreateParams {
2175
4297
  * Additional metadata for the loyalty rule
2176
4298
  */
2177
4299
  export interface Metadata {
4300
+ /**
4301
+ * Array of loyalty rule IDs that count as check-in when completed. If ["any"] then
4302
+ * any rule completions count as check-in.
4303
+ */
4304
+ autoCheckInRuleIds?: Array<(string & {}) | 'any'> | null;
4305
+
4306
+ /**
4307
+ * Number of tokens per batch.
4308
+ */
4309
+ batchSize?: number | null;
4310
+
2178
4311
  /**
2179
4312
  * Text displayed on the action button.
2180
4313
  */
@@ -2198,7 +4331,7 @@ export namespace RuleCreateParams {
2198
4331
  /**
2199
4332
  * Text to check in the Twitter post, username, or bio.
2200
4333
  */
2201
- checkText?: string | null;
4334
+ checkText?: string | Array<string> | null;
2202
4335
 
2203
4336
  /**
2204
4337
  * Array of collections associated with the rule.
@@ -2208,7 +4341,12 @@ export namespace RuleCreateParams {
2208
4341
  /**
2209
4342
  * Conditions for completing the profile.
2210
4343
  */
2211
- completeProfileConditions?: Record<string, boolean> | null;
4344
+ completeProfileConditions?: { [key: string]: boolean } | null;
4345
+
4346
+ /**
4347
+ * Description of the external rule condition (only for external rules)
4348
+ */
4349
+ conditionDescription?: string;
2212
4350
 
2213
4351
  /**
2214
4352
  * Object containing details for the call-to-action.
@@ -2220,6 +4358,11 @@ export namespace RuleCreateParams {
2220
4358
  */
2221
4359
  customRewardsApiKey?: string;
2222
4360
 
4361
+ /**
4362
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
4363
+ */
4364
+ directRpc?: boolean;
4365
+
2223
4366
  /**
2224
4367
  * Array of Discord servers, channels, and roles to join.
2225
4368
  */
@@ -2245,6 +4388,11 @@ export namespace RuleCreateParams {
2245
4388
  */
2246
4389
  enableVerifiedMultiplier?: boolean;
2247
4390
 
4391
+ /**
4392
+ * Type of ERC20 token for the loyalty rule.
4393
+ */
4394
+ erc20Type?: 'erc20' | 'native';
4395
+
2248
4396
  /**
2249
4397
  * Fill source of the order for the token sale
2250
4398
  */
@@ -2255,6 +4403,16 @@ export namespace RuleCreateParams {
2255
4403
  */
2256
4404
  firstReferralReward?: number | null;
2257
4405
 
4406
+ /**
4407
+ * Name of the GitHub branch to check for PR merge.
4408
+ */
4409
+ githubBranchName?: string | null;
4410
+
4411
+ /**
4412
+ * URL of the GitHub repository to check for star.
4413
+ */
4414
+ githubRepoUrl?: string | null;
4415
+
2258
4416
  /**
2259
4417
  * Flag indicating whether the fill source is included.
2260
4418
  */
@@ -2265,11 +4423,6 @@ export namespace RuleCreateParams {
2265
4423
  */
2266
4424
  hasNeverSold?: boolean;
2267
4425
 
2268
- /**
2269
- * Flag indicating whether the order source is included.
2270
- */
2271
- hasOrderSource?: boolean;
2272
-
2273
4426
  /**
2274
4427
  * Indicates if the full royalty has been paid for items.
2275
4428
  */
@@ -2290,11 +4443,21 @@ export namespace RuleCreateParams {
2290
4443
  */
2291
4444
  imageUrl?: string | null;
2292
4445
 
4446
+ /**
4447
+ * If enabled, the first transaction done on the platform will complete this rule
4448
+ */
4449
+ isCheckInOnEveryTxn?: boolean;
4450
+
2293
4451
  /**
2294
4452
  * Indicates if the multiplier has been applied to rewards.
2295
4453
  */
2296
4454
  isMultiplierApplied?: boolean;
2297
4455
 
4456
+ /**
4457
+ * Flag indicating if the rule is restricted to new users.
4458
+ */
4459
+ isRestrictedToNewUsers?: boolean;
4460
+
2298
4461
  /**
2299
4462
  * Flag indicating if rewards are applied retroactively.
2300
4463
  */
@@ -2310,6 +4473,11 @@ export namespace RuleCreateParams {
2310
4473
  */
2311
4474
  link?: string | null;
2312
4475
 
4476
+ /**
4477
+ * Liquidity pool details.
4478
+ */
4479
+ liquidity?: Metadata.Liquidity;
4480
+
2313
4481
  /**
2314
4482
  * Maximum quantity constraint for token holding.
2315
4483
  */
@@ -2351,20 +4519,40 @@ export namespace RuleCreateParams {
2351
4519
  onlyRewardSingleTokenOwnership?: boolean | null;
2352
4520
 
2353
4521
  /**
2354
- * Order source of the order for the token sale
4522
+ * Pre-generated text template that will be used to prefill the post content.
2355
4523
  */
2356
- orderSource?: string;
4524
+ preGeneratedPostText?: string | null;
2357
4525
 
2358
4526
  /**
2359
4527
  * Promotional code associated with the rule.
2360
4528
  */
2361
4529
  promoCode?: string;
2362
4530
 
4531
+ /**
4532
+ * URL of the CSV file containing promo codes.
4533
+ */
4534
+ promoCodeCsvUrl?: string;
4535
+
4536
+ /**
4537
+ * Numbers of the promotional code to be generated.
4538
+ */
4539
+ promoCodeLength?: number | null;
4540
+
4541
+ /**
4542
+ * Type of the promotional code.
4543
+ */
4544
+ promoCodeType?: 'code' | 'csv' | 'generate';
4545
+
2363
4546
  /**
2364
4547
  * Array defining ranges and corresponding rewards.
2365
4548
  */
2366
4549
  range?: Array<Metadata.Range>;
2367
4550
 
4551
+ /**
4552
+ * ID of the Reddit post.
4553
+ */
4554
+ redditPostId?: string | null;
4555
+
2368
4556
  /**
2369
4557
  * Object defining referral requirements.
2370
4558
  */
@@ -2375,11 +4563,67 @@ export namespace RuleCreateParams {
2375
4563
  */
2376
4564
  referrerReward?: number | null;
2377
4565
 
4566
+ /**
4567
+ * Loyalty currency ID of the referrer reward.
4568
+ */
4569
+ referrerRewardLoyaltyCurrencyId?: string | null;
4570
+
4571
+ /**
4572
+ * Flag indicating if the post link is required.
4573
+ */
4574
+ requirePostLink?: boolean | null;
4575
+
4576
+ /**
4577
+ * Flag indicating if media metadata is required.
4578
+ */
4579
+ requirePostMediaLink?: boolean | null;
4580
+
4581
+ /**
4582
+ * Flag indicating if the rule can also reward badges per range.
4583
+ */
4584
+ rewardBadgePerRange?: boolean;
4585
+
4586
+ /**
4587
+ * Flag indicating if the reward is rewarded by batch.
4588
+ */
4589
+ rewardByBatch?: boolean | null;
4590
+
4591
+ /**
4592
+ * Criteria to evaluate the reward.
4593
+ */
4594
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
4595
+
4596
+ /**
4597
+ * Flag indicating if the reward is rewarded per action.
4598
+ */
4599
+ rewardPerAction?: boolean | null;
4600
+
2378
4601
  /**
2379
4602
  * Flag indicating if rewards are given per impression.
2380
4603
  */
2381
4604
  rewardPerImpression?: boolean | null;
2382
4605
 
4606
+ /**
4607
+ * Flag indicating if the rule should reward based on value of traded tokens
4608
+ * instead of count.
4609
+ */
4610
+ rewardPerValue?: boolean;
4611
+
4612
+ /**
4613
+ * Flag indicating if the rule should reward quality posts.
4614
+ */
4615
+ rewardQualityPosts?: boolean;
4616
+
4617
+ /**
4618
+ * Wallet address of the user can only be used if userId is not provided
4619
+ */
4620
+ royaltyAddress?: string;
4621
+
4622
+ /**
4623
+ * Royalty percentage of the item.
4624
+ */
4625
+ royaltyPercentage?: number;
4626
+
2383
4627
  /**
2384
4628
  * Currency associated with sales.
2385
4629
  */
@@ -2419,6 +4663,9 @@ export namespace RuleCreateParams {
2419
4663
  | 'Twitch'
2420
4664
  | 'X(Twitter)'
2421
4665
  | 'YouTube'
4666
+ | 'Google'
4667
+ | 'GitHub'
4668
+ | 'Reddit'
2422
4669
  | null;
2423
4670
 
2424
4671
  /**
@@ -2431,11 +4678,21 @@ export namespace RuleCreateParams {
2431
4678
  */
2432
4679
  socialPlatformName?: string | null;
2433
4680
 
4681
+ /**
4682
+ * ID of the Steam app.
4683
+ */
4684
+ steamAppId?: string | null;
4685
+
2434
4686
  /**
2435
4687
  * Array of streak milestones and corresponding rewards.
2436
4688
  */
2437
4689
  streakArray?: Array<Metadata.StreakArray> | null;
2438
4690
 
4691
+ /**
4692
+ * Metadata for swap loyalty rules
4693
+ */
4694
+ swap?: Metadata.Swap;
4695
+
2439
4696
  /**
2440
4697
  * ID of the Telegram channel.
2441
4698
  */
@@ -2451,6 +4708,12 @@ export namespace RuleCreateParams {
2451
4708
  */
2452
4709
  trackAllContracts?: boolean | null;
2453
4710
 
4711
+ /**
4712
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
4713
+ * completed once the progress is 100%.
4714
+ */
4715
+ trackProgress?: boolean | null;
4716
+
2454
4717
  /**
2455
4718
  * URL of the associated Twitter account.
2456
4719
  */
@@ -2494,7 +4757,28 @@ export namespace RuleCreateParams {
2494
4757
  /**
2495
4758
  * Type of wallet associated with the rule.
2496
4759
  */
2497
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
4760
+ walletType?:
4761
+ | 'evm'
4762
+ | 'solana'
4763
+ | 'imx'
4764
+ | 'sui'
4765
+ | 'ton'
4766
+ | 'cosmos'
4767
+ | 'ultra'
4768
+ | 'agw'
4769
+ | 'flow_cadence'
4770
+ | 'substrate'
4771
+ | null;
4772
+
4773
+ /**
4774
+ * ID of the Youtube channel.
4775
+ */
4776
+ youtubeChannelId?: string | null;
4777
+
4778
+ /**
4779
+ * ID of the Youtube video.
4780
+ */
4781
+ youtubeVideoId?: string | null;
2498
4782
  }
2499
4783
 
2500
4784
  export namespace Metadata {
@@ -2513,13 +4797,17 @@ export namespace RuleCreateParams {
2513
4797
  * Blockchain network of the collection.
2514
4798
  */
2515
4799
  network?:
4800
+ | 'abstract'
4801
+ | 'abstractTestnet'
2516
4802
  | 'apechain'
2517
4803
  | 'arbitrum'
2518
4804
  | 'avalanche'
2519
4805
  | 'avalancheFuji'
2520
4806
  | 'base'
2521
4807
  | 'baseSepolia'
4808
+ | 'berachain'
2522
4809
  | 'berachainArtio'
4810
+ | 'berachainBepolia'
2523
4811
  | 'binance'
2524
4812
  | 'bscTestnet'
2525
4813
  | 'campTestnet'
@@ -2527,18 +4815,30 @@ export namespace RuleCreateParams {
2527
4815
  | 'fantomTestnet'
2528
4816
  | 'flowMainnet'
2529
4817
  | 'mainnet'
4818
+ | 'nexusTestnet'
2530
4819
  | 'optimism'
2531
4820
  | 'polygon'
2532
4821
  | 'polygon_mumbai'
2533
4822
  | 'skaleNebula'
4823
+ | 'skaleEuropa'
4824
+ | 'skaleCalypso'
2534
4825
  | 'solana'
2535
4826
  | 'sophon'
4827
+ | 'sophonTestnet'
2536
4828
  | 'sui'
2537
4829
  | 'superseed'
2538
4830
  | 'superseedSepolia'
2539
4831
  | 'vanar'
2540
4832
  | 'xai'
2541
4833
  | 'zksync'
4834
+ | 'coti'
4835
+ | 'cotiTestnet'
4836
+ | 'morph'
4837
+ | 'morphTestnet'
4838
+ | 'morphHolesky'
4839
+ | 'ultra'
4840
+ | 'ultraTestnet'
4841
+ | 'nitrograph'
2542
4842
  | 'sepolia'
2543
4843
  | 'optimism_sepolia'
2544
4844
  | 'arbitrumSepolia'
@@ -2546,7 +4846,11 @@ export namespace RuleCreateParams {
2546
4846
  | 'optimism_goerli'
2547
4847
  | 'arbitrumGoerli'
2548
4848
  | 'basecamp'
2549
- | 'abstract';
4849
+ | 'somnia'
4850
+ | 'zkverify'
4851
+ | 'polkadot'
4852
+ | 'kusama'
4853
+ | 'flow_cadence';
2550
4854
  }
2551
4855
 
2552
4856
  /**
@@ -2623,6 +4927,111 @@ export namespace RuleCreateParams {
2623
4927
  id: string;
2624
4928
  }
2625
4929
 
4930
+ /**
4931
+ * Liquidity pool details.
4932
+ */
4933
+ export interface Liquidity {
4934
+ /**
4935
+ * Calculation type of the liquidity pool.
4936
+ */
4937
+ calculationType?: 'fixed' | 'custom';
4938
+
4939
+ /**
4940
+ * Custom function to calculate the the reward amount based on the liquidity
4941
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
4942
+ * USD.
4943
+ */
4944
+ customFunction?: string;
4945
+
4946
+ /**
4947
+ * Liquidity provided per day in USD
4948
+ */
4949
+ liquidityPerDay?: number;
4950
+
4951
+ /**
4952
+ * Blockchain network of the liquidity pool.
4953
+ */
4954
+ network?:
4955
+ | 'abstract'
4956
+ | 'abstractTestnet'
4957
+ | 'apechain'
4958
+ | 'arbitrum'
4959
+ | 'avalanche'
4960
+ | 'avalancheFuji'
4961
+ | 'base'
4962
+ | 'baseSepolia'
4963
+ | 'berachain'
4964
+ | 'berachainArtio'
4965
+ | 'berachainBepolia'
4966
+ | 'binance'
4967
+ | 'bscTestnet'
4968
+ | 'campTestnet'
4969
+ | 'fantom'
4970
+ | 'fantomTestnet'
4971
+ | 'flowMainnet'
4972
+ | 'mainnet'
4973
+ | 'nexusTestnet'
4974
+ | 'optimism'
4975
+ | 'polygon'
4976
+ | 'polygon_mumbai'
4977
+ | 'skaleNebula'
4978
+ | 'skaleEuropa'
4979
+ | 'skaleCalypso'
4980
+ | 'solana'
4981
+ | 'sophon'
4982
+ | 'sophonTestnet'
4983
+ | 'sui'
4984
+ | 'superseed'
4985
+ | 'superseedSepolia'
4986
+ | 'vanar'
4987
+ | 'xai'
4988
+ | 'zksync'
4989
+ | 'coti'
4990
+ | 'cotiTestnet'
4991
+ | 'morph'
4992
+ | 'morphTestnet'
4993
+ | 'morphHolesky'
4994
+ | 'ultra'
4995
+ | 'ultraTestnet'
4996
+ | 'nitrograph'
4997
+ | 'sepolia'
4998
+ | 'optimism_sepolia'
4999
+ | 'arbitrumSepolia'
5000
+ | 'goerli'
5001
+ | 'optimism_goerli'
5002
+ | 'arbitrumGoerli'
5003
+ | 'basecamp'
5004
+ | 'somnia'
5005
+ | 'zkverify'
5006
+ | 'polkadot'
5007
+ | 'kusama'
5008
+ | 'flow_cadence';
5009
+
5010
+ /**
5011
+ * Indicates if only in-range liquidity is rewarded.
5012
+ */
5013
+ onlyRewardInRangeLiquidity?: boolean;
5014
+
5015
+ /**
5016
+ * Array of liquidity pools associated with the rule.
5017
+ */
5018
+ pools?: Array<Liquidity.Pool>;
5019
+
5020
+ /**
5021
+ * Protocol of the liquidity pool.
5022
+ */
5023
+ protocol?: string;
5024
+ }
5025
+
5026
+ export namespace Liquidity {
5027
+ export interface Pool {
5028
+ /**
5029
+ * Unique identifier of the liquidity pool.
5030
+ */
5031
+ id: string;
5032
+ }
5033
+ }
5034
+
2626
5035
  export interface Range {
2627
5036
  /**
2628
5037
  * Reward amount for this range.
@@ -2638,6 +5047,16 @@ export namespace RuleCreateParams {
2638
5047
  * Start value of the range.
2639
5048
  */
2640
5049
  startRange: number;
5050
+
5051
+ /**
5052
+ * ID of the loyalty badge for this range.
5053
+ */
5054
+ loyaltyBadgeId?: string;
5055
+
5056
+ /**
5057
+ * Amount of the loyalty multiplier for this range.
5058
+ */
5059
+ loyaltyMultiplierAmount?: number;
2641
5060
  }
2642
5061
 
2643
5062
  /**
@@ -2690,20 +5109,15 @@ export namespace RuleCreateParams {
2690
5109
  * Object containing details of the associated smart contract.
2691
5110
  */
2692
5111
  export interface SmartContract {
2693
- /**
2694
- * ABI of the smart contract.
2695
- */
2696
- abi?: string | null;
2697
-
2698
5112
  /**
2699
5113
  * Mapping of addresses for the smart contract.
2700
5114
  */
2701
5115
  addressMapping?: string | null;
2702
5116
 
2703
5117
  /**
2704
- * Array of bonus details applied to the rule.
5118
+ * Object containing details of the amount multiplier from the event.
2705
5119
  */
2706
- bonus?: Array<SmartContract.Bonus> | null;
5120
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2707
5121
 
2708
5122
  /**
2709
5123
  * ID of the smart contract.
@@ -2715,68 +5129,31 @@ export namespace RuleCreateParams {
2715
5129
  */
2716
5130
  criteria?: 'everyEvent' | 'byParameter' | null;
2717
5131
 
2718
- /**
2719
- * Time range applied to the rule.
2720
- */
2721
- customRange?: SmartContract.CustomRange | null;
2722
-
2723
5132
  /**
2724
5133
  * Event emitted by the smart contract.
2725
5134
  */
2726
5135
  event?: string | null;
2727
5136
 
2728
- /**
2729
- * Maximum value allowed for the parameter.
2730
- */
2731
- max?: number | null;
2732
-
2733
5137
  /**
2734
5138
  * Array of parameters for the smart contract.
2735
5139
  */
2736
5140
  params?: Array<SmartContract.Param> | null;
2737
5141
 
2738
5142
  /**
2739
- * Flag indicating if a bonus is applied.
2740
- */
2741
- withBonus?: boolean | null;
2742
-
2743
- /**
2744
- * Flag indicating if a custom range is applied.
2745
- */
2746
- withCustomRange?: boolean | null;
2747
-
2748
- /**
2749
- * Flag indicating if a maximum limit is applied.
5143
+ * Type of the smart contract interaction.
2750
5144
  */
2751
- withMax?: boolean | null;
5145
+ type?: 'function' | 'event' | null;
2752
5146
  }
2753
5147
 
2754
5148
  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
5149
  /**
2768
- * Time range applied to the rule.
5150
+ * Object containing details of the amount multiplier from the event.
2769
5151
  */
2770
- export interface CustomRange {
2771
- /**
2772
- * End time of the custom range.
2773
- */
2774
- endsAt?: string | null;
2775
-
5152
+ export interface AmountMultiplier {
2776
5153
  /**
2777
- * Start time of the custom range.
5154
+ * Mapping of the value for the smart contract.
2778
5155
  */
2779
- startsAt?: string | null;
5156
+ valueMapping?: string | null;
2780
5157
  }
2781
5158
 
2782
5159
  export interface Param {
@@ -2820,6 +5197,33 @@ export namespace RuleCreateParams {
2820
5197
  */
2821
5198
  streakMilestone: number;
2822
5199
  }
5200
+
5201
+ /**
5202
+ * Metadata for swap loyalty rules
5203
+ */
5204
+ export interface Swap {
5205
+ provider?: 'any' | 'relay' | 'lifi';
5206
+
5207
+ relayReferrerId?: string;
5208
+
5209
+ requireCrossChainSwap?: boolean;
5210
+
5211
+ swappedToChain?: 'any' | number | string;
5212
+
5213
+ swappedToTokens?: Array<Swap.SwappedToToken>;
5214
+
5215
+ tokenMode?: 'any' | 'specific';
5216
+
5217
+ trackTokenAmount?: boolean;
5218
+ }
5219
+
5220
+ export namespace Swap {
5221
+ export interface SwappedToToken {
5222
+ address: string;
5223
+
5224
+ chainId: string;
5225
+ }
5226
+ }
2823
5227
  }
2824
5228
 
2825
5229
  export interface Collection {
@@ -2832,13 +5236,17 @@ export namespace RuleCreateParams {
2832
5236
  * Blockchain network for the collection
2833
5237
  */
2834
5238
  network:
5239
+ | 'abstract'
5240
+ | 'abstractTestnet'
2835
5241
  | 'apechain'
2836
5242
  | 'arbitrum'
2837
5243
  | 'avalanche'
2838
5244
  | 'avalancheFuji'
2839
5245
  | 'base'
2840
5246
  | 'baseSepolia'
5247
+ | 'berachain'
2841
5248
  | 'berachainArtio'
5249
+ | 'berachainBepolia'
2842
5250
  | 'binance'
2843
5251
  | 'bscTestnet'
2844
5252
  | 'campTestnet'
@@ -2846,18 +5254,30 @@ export namespace RuleCreateParams {
2846
5254
  | 'fantomTestnet'
2847
5255
  | 'flowMainnet'
2848
5256
  | 'mainnet'
5257
+ | 'nexusTestnet'
2849
5258
  | 'optimism'
2850
5259
  | 'polygon'
2851
5260
  | 'polygon_mumbai'
2852
5261
  | 'skaleNebula'
5262
+ | 'skaleEuropa'
5263
+ | 'skaleCalypso'
2853
5264
  | 'solana'
2854
5265
  | 'sophon'
5266
+ | 'sophonTestnet'
2855
5267
  | 'sui'
2856
5268
  | 'superseed'
2857
5269
  | 'superseedSepolia'
2858
5270
  | 'vanar'
2859
5271
  | 'xai'
2860
5272
  | 'zksync'
5273
+ | 'coti'
5274
+ | 'cotiTestnet'
5275
+ | 'morph'
5276
+ | 'morphTestnet'
5277
+ | 'morphHolesky'
5278
+ | 'ultra'
5279
+ | 'ultraTestnet'
5280
+ | 'nitrograph'
2861
5281
  | 'sepolia'
2862
5282
  | 'optimism_sepolia'
2863
5283
  | 'arbitrumSepolia'
@@ -2865,7 +5285,16 @@ export namespace RuleCreateParams {
2865
5285
  | 'optimism_goerli'
2866
5286
  | 'arbitrumGoerli'
2867
5287
  | 'basecamp'
2868
- | 'abstract';
5288
+ | 'somnia'
5289
+ | 'zkverify'
5290
+ | 'polkadot'
5291
+ | 'kusama'
5292
+ | 'flow_cadence';
5293
+
5294
+ /**
5295
+ * Symbol of the collection.
5296
+ */
5297
+ symbol?: string;
2869
5298
  }
2870
5299
  }
2871
5300
 
@@ -2885,10 +5314,15 @@ export interface RuleUpdateParams {
2885
5314
  */
2886
5315
  name: string;
2887
5316
 
5317
+ /**
5318
+ * The type of claim for the reward
5319
+ */
5320
+ claimType?: 'manual' | 'auto' | null;
5321
+
2888
5322
  /**
2889
5323
  * Blockchain address of the associated collection
2890
5324
  */
2891
- collectionAddress?: string;
5325
+ collectionAddress?: string | null;
2892
5326
 
2893
5327
  /**
2894
5328
  * List of associated collections
@@ -2920,11 +5354,21 @@ export interface RuleUpdateParams {
2920
5354
  */
2921
5355
  effectiveStartTime?: string | null;
2922
5356
 
5357
+ /**
5358
+ * ID of the external integration
5359
+ */
5360
+ externalIntegrationId?: string | null;
5361
+
2923
5362
  /**
2924
5363
  * Frequency of the rule execution
2925
5364
  */
2926
5365
  frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
2927
5366
 
5367
+ /**
5368
+ * Optional stratus function id for the rule
5369
+ */
5370
+ functionId?: string | null;
5371
+
2928
5372
  /**
2929
5373
  * Whether to hide this rule in the user interface
2930
5374
  */
@@ -2933,7 +5377,7 @@ export interface RuleUpdateParams {
2933
5377
  /**
2934
5378
  * Time interval for recurring rule execution
2935
5379
  */
2936
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
5380
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
2937
5381
 
2938
5382
  /**
2939
5383
  * Whether this rule is required for participation
@@ -2945,6 +5389,18 @@ export interface RuleUpdateParams {
2945
5389
  */
2946
5390
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
2947
5391
 
5392
+ /**
5393
+ * The interval for the max amount. Available for the smart contract and external
5394
+ * rules.
5395
+ */
5396
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
5397
+
5398
+ /**
5399
+ * The maximum amount of points a user can earn per interval. Available for the
5400
+ * smart contract and external rules.
5401
+ */
5402
+ maxAmountPerInterval?: number | null;
5403
+
2948
5404
  /**
2949
5405
  * URL of the media to be displayed
2950
5406
  */
@@ -2959,13 +5415,17 @@ export interface RuleUpdateParams {
2959
5415
  * Blockchain network where the rule will apply
2960
5416
  */
2961
5417
  network?:
5418
+ | 'abstract'
5419
+ | 'abstractTestnet'
2962
5420
  | 'apechain'
2963
5421
  | 'arbitrum'
2964
5422
  | 'avalanche'
2965
5423
  | 'avalancheFuji'
2966
5424
  | 'base'
2967
5425
  | 'baseSepolia'
5426
+ | 'berachain'
2968
5427
  | 'berachainArtio'
5428
+ | 'berachainBepolia'
2969
5429
  | 'binance'
2970
5430
  | 'bscTestnet'
2971
5431
  | 'campTestnet'
@@ -2973,18 +5433,30 @@ export interface RuleUpdateParams {
2973
5433
  | 'fantomTestnet'
2974
5434
  | 'flowMainnet'
2975
5435
  | 'mainnet'
5436
+ | 'nexusTestnet'
2976
5437
  | 'optimism'
2977
5438
  | 'polygon'
2978
5439
  | 'polygon_mumbai'
2979
5440
  | 'skaleNebula'
5441
+ | 'skaleEuropa'
5442
+ | 'skaleCalypso'
2980
5443
  | 'solana'
2981
5444
  | 'sophon'
5445
+ | 'sophonTestnet'
2982
5446
  | 'sui'
2983
5447
  | 'superseed'
2984
5448
  | 'superseedSepolia'
2985
5449
  | 'vanar'
2986
5450
  | 'xai'
2987
5451
  | 'zksync'
5452
+ | 'coti'
5453
+ | 'cotiTestnet'
5454
+ | 'morph'
5455
+ | 'morphTestnet'
5456
+ | 'morphHolesky'
5457
+ | 'ultra'
5458
+ | 'ultraTestnet'
5459
+ | 'nitrograph'
2988
5460
  | 'sepolia'
2989
5461
  | 'optimism_sepolia'
2990
5462
  | 'arbitrumSepolia'
@@ -2992,7 +5464,11 @@ export interface RuleUpdateParams {
2992
5464
  | 'optimism_goerli'
2993
5465
  | 'arbitrumGoerli'
2994
5466
  | 'basecamp'
2995
- | 'abstract';
5467
+ | 'somnia'
5468
+ | 'zkverify'
5469
+ | 'polkadot'
5470
+ | 'kusama'
5471
+ | 'flow_cadence';
2996
5472
 
2997
5473
  /**
2998
5474
  * ID for associated OAuth credentials
@@ -3000,9 +5476,24 @@ export interface RuleUpdateParams {
3000
5476
  oauthCredentialsId?: string | null;
3001
5477
 
3002
5478
  /**
3003
- * Type of reward issued by this rule
5479
+ * The lifetime of the reward
5480
+ */
5481
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
5482
+
5483
+ /**
5484
+ * Type of reward issued by this rule
5485
+ */
5486
+ rewardType?: 'points' | 'multiplier' | 'badge';
5487
+
5488
+ /**
5489
+ * URL of the Shopify store
5490
+ */
5491
+ shopifyStoreUrl?: string | null;
5492
+
5493
+ /**
5494
+ * Whether to show this rule before the start time
3004
5495
  */
3005
- rewardType?: 'points' | 'multiplier';
5496
+ showBeforeStart?: boolean;
3006
5497
 
3007
5498
  /**
3008
5499
  * Start time for the loyalty rule
@@ -3010,9 +5501,9 @@ export interface RuleUpdateParams {
3010
5501
  startTime?: string | null;
3011
5502
 
3012
5503
  /**
3013
- * Optional subscription identifier for the rule
5504
+ * Optional stratus subscription id for the rule
3014
5505
  */
3015
- subscriptionIdentifier?: string | null;
5506
+ subscriptionId?: string | null;
3016
5507
  }
3017
5508
 
3018
5509
  export namespace RuleUpdateParams {
@@ -3026,13 +5517,17 @@ export namespace RuleUpdateParams {
3026
5517
  * Blockchain network for the collection
3027
5518
  */
3028
5519
  network:
5520
+ | 'abstract'
5521
+ | 'abstractTestnet'
3029
5522
  | 'apechain'
3030
5523
  | 'arbitrum'
3031
5524
  | 'avalanche'
3032
5525
  | 'avalancheFuji'
3033
5526
  | 'base'
3034
5527
  | 'baseSepolia'
5528
+ | 'berachain'
3035
5529
  | 'berachainArtio'
5530
+ | 'berachainBepolia'
3036
5531
  | 'binance'
3037
5532
  | 'bscTestnet'
3038
5533
  | 'campTestnet'
@@ -3040,18 +5535,30 @@ export namespace RuleUpdateParams {
3040
5535
  | 'fantomTestnet'
3041
5536
  | 'flowMainnet'
3042
5537
  | 'mainnet'
5538
+ | 'nexusTestnet'
3043
5539
  | 'optimism'
3044
5540
  | 'polygon'
3045
5541
  | 'polygon_mumbai'
3046
5542
  | 'skaleNebula'
5543
+ | 'skaleEuropa'
5544
+ | 'skaleCalypso'
3047
5545
  | 'solana'
3048
5546
  | 'sophon'
5547
+ | 'sophonTestnet'
3049
5548
  | 'sui'
3050
5549
  | 'superseed'
3051
5550
  | 'superseedSepolia'
3052
5551
  | 'vanar'
3053
5552
  | 'xai'
3054
5553
  | 'zksync'
5554
+ | 'coti'
5555
+ | 'cotiTestnet'
5556
+ | 'morph'
5557
+ | 'morphTestnet'
5558
+ | 'morphHolesky'
5559
+ | 'ultra'
5560
+ | 'ultraTestnet'
5561
+ | 'nitrograph'
3055
5562
  | 'sepolia'
3056
5563
  | 'optimism_sepolia'
3057
5564
  | 'arbitrumSepolia'
@@ -3059,13 +5566,33 @@ export namespace RuleUpdateParams {
3059
5566
  | 'optimism_goerli'
3060
5567
  | 'arbitrumGoerli'
3061
5568
  | 'basecamp'
3062
- | 'abstract';
5569
+ | 'somnia'
5570
+ | 'zkverify'
5571
+ | 'polkadot'
5572
+ | 'kusama'
5573
+ | 'flow_cadence';
5574
+
5575
+ /**
5576
+ * Symbol of the collection.
5577
+ */
5578
+ symbol?: string;
3063
5579
  }
3064
5580
 
3065
5581
  /**
3066
5582
  * Additional metadata for the loyalty rule
3067
5583
  */
3068
5584
  export interface Metadata {
5585
+ /**
5586
+ * Array of loyalty rule IDs that count as check-in when completed. If ["any"] then
5587
+ * any rule completions count as check-in.
5588
+ */
5589
+ autoCheckInRuleIds?: Array<(string & {}) | 'any'> | null;
5590
+
5591
+ /**
5592
+ * Number of tokens per batch.
5593
+ */
5594
+ batchSize?: number | null;
5595
+
3069
5596
  /**
3070
5597
  * Text displayed on the action button.
3071
5598
  */
@@ -3089,7 +5616,7 @@ export namespace RuleUpdateParams {
3089
5616
  /**
3090
5617
  * Text to check in the Twitter post, username, or bio.
3091
5618
  */
3092
- checkText?: string | null;
5619
+ checkText?: string | Array<string> | null;
3093
5620
 
3094
5621
  /**
3095
5622
  * Array of collections associated with the rule.
@@ -3099,7 +5626,12 @@ export namespace RuleUpdateParams {
3099
5626
  /**
3100
5627
  * Conditions for completing the profile.
3101
5628
  */
3102
- completeProfileConditions?: Record<string, boolean> | null;
5629
+ completeProfileConditions?: { [key: string]: boolean } | null;
5630
+
5631
+ /**
5632
+ * Description of the external rule condition (only for external rules)
5633
+ */
5634
+ conditionDescription?: string;
3103
5635
 
3104
5636
  /**
3105
5637
  * Object containing details for the call-to-action.
@@ -3111,6 +5643,11 @@ export namespace RuleUpdateParams {
3111
5643
  */
3112
5644
  customRewardsApiKey?: string;
3113
5645
 
5646
+ /**
5647
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
5648
+ */
5649
+ directRpc?: boolean;
5650
+
3114
5651
  /**
3115
5652
  * Array of Discord servers, channels, and roles to join.
3116
5653
  */
@@ -3136,6 +5673,11 @@ export namespace RuleUpdateParams {
3136
5673
  */
3137
5674
  enableVerifiedMultiplier?: boolean;
3138
5675
 
5676
+ /**
5677
+ * Type of ERC20 token for the loyalty rule.
5678
+ */
5679
+ erc20Type?: 'erc20' | 'native';
5680
+
3139
5681
  /**
3140
5682
  * Fill source of the order for the token sale
3141
5683
  */
@@ -3146,6 +5688,16 @@ export namespace RuleUpdateParams {
3146
5688
  */
3147
5689
  firstReferralReward?: number | null;
3148
5690
 
5691
+ /**
5692
+ * Name of the GitHub branch to check for PR merge.
5693
+ */
5694
+ githubBranchName?: string | null;
5695
+
5696
+ /**
5697
+ * URL of the GitHub repository to check for star.
5698
+ */
5699
+ githubRepoUrl?: string | null;
5700
+
3149
5701
  /**
3150
5702
  * Flag indicating whether the fill source is included.
3151
5703
  */
@@ -3156,11 +5708,6 @@ export namespace RuleUpdateParams {
3156
5708
  */
3157
5709
  hasNeverSold?: boolean;
3158
5710
 
3159
- /**
3160
- * Flag indicating whether the order source is included.
3161
- */
3162
- hasOrderSource?: boolean;
3163
-
3164
5711
  /**
3165
5712
  * Indicates if the full royalty has been paid for items.
3166
5713
  */
@@ -3181,11 +5728,21 @@ export namespace RuleUpdateParams {
3181
5728
  */
3182
5729
  imageUrl?: string | null;
3183
5730
 
5731
+ /**
5732
+ * If enabled, the first transaction done on the platform will complete this rule
5733
+ */
5734
+ isCheckInOnEveryTxn?: boolean;
5735
+
3184
5736
  /**
3185
5737
  * Indicates if the multiplier has been applied to rewards.
3186
5738
  */
3187
5739
  isMultiplierApplied?: boolean;
3188
5740
 
5741
+ /**
5742
+ * Flag indicating if the rule is restricted to new users.
5743
+ */
5744
+ isRestrictedToNewUsers?: boolean;
5745
+
3189
5746
  /**
3190
5747
  * Flag indicating if rewards are applied retroactively.
3191
5748
  */
@@ -3201,6 +5758,11 @@ export namespace RuleUpdateParams {
3201
5758
  */
3202
5759
  link?: string | null;
3203
5760
 
5761
+ /**
5762
+ * Liquidity pool details.
5763
+ */
5764
+ liquidity?: Metadata.Liquidity;
5765
+
3204
5766
  /**
3205
5767
  * Maximum quantity constraint for token holding.
3206
5768
  */
@@ -3242,20 +5804,40 @@ export namespace RuleUpdateParams {
3242
5804
  onlyRewardSingleTokenOwnership?: boolean | null;
3243
5805
 
3244
5806
  /**
3245
- * Order source of the order for the token sale
5807
+ * Pre-generated text template that will be used to prefill the post content.
3246
5808
  */
3247
- orderSource?: string;
5809
+ preGeneratedPostText?: string | null;
3248
5810
 
3249
5811
  /**
3250
5812
  * Promotional code associated with the rule.
3251
5813
  */
3252
5814
  promoCode?: string;
3253
5815
 
5816
+ /**
5817
+ * URL of the CSV file containing promo codes.
5818
+ */
5819
+ promoCodeCsvUrl?: string;
5820
+
5821
+ /**
5822
+ * Numbers of the promotional code to be generated.
5823
+ */
5824
+ promoCodeLength?: number | null;
5825
+
5826
+ /**
5827
+ * Type of the promotional code.
5828
+ */
5829
+ promoCodeType?: 'code' | 'csv' | 'generate';
5830
+
3254
5831
  /**
3255
5832
  * Array defining ranges and corresponding rewards.
3256
5833
  */
3257
5834
  range?: Array<Metadata.Range>;
3258
5835
 
5836
+ /**
5837
+ * ID of the Reddit post.
5838
+ */
5839
+ redditPostId?: string | null;
5840
+
3259
5841
  /**
3260
5842
  * Object defining referral requirements.
3261
5843
  */
@@ -3266,11 +5848,67 @@ export namespace RuleUpdateParams {
3266
5848
  */
3267
5849
  referrerReward?: number | null;
3268
5850
 
5851
+ /**
5852
+ * Loyalty currency ID of the referrer reward.
5853
+ */
5854
+ referrerRewardLoyaltyCurrencyId?: string | null;
5855
+
5856
+ /**
5857
+ * Flag indicating if the post link is required.
5858
+ */
5859
+ requirePostLink?: boolean | null;
5860
+
5861
+ /**
5862
+ * Flag indicating if media metadata is required.
5863
+ */
5864
+ requirePostMediaLink?: boolean | null;
5865
+
5866
+ /**
5867
+ * Flag indicating if the rule can also reward badges per range.
5868
+ */
5869
+ rewardBadgePerRange?: boolean;
5870
+
5871
+ /**
5872
+ * Flag indicating if the reward is rewarded by batch.
5873
+ */
5874
+ rewardByBatch?: boolean | null;
5875
+
5876
+ /**
5877
+ * Criteria to evaluate the reward.
5878
+ */
5879
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
5880
+
5881
+ /**
5882
+ * Flag indicating if the reward is rewarded per action.
5883
+ */
5884
+ rewardPerAction?: boolean | null;
5885
+
3269
5886
  /**
3270
5887
  * Flag indicating if rewards are given per impression.
3271
5888
  */
3272
5889
  rewardPerImpression?: boolean | null;
3273
5890
 
5891
+ /**
5892
+ * Flag indicating if the rule should reward based on value of traded tokens
5893
+ * instead of count.
5894
+ */
5895
+ rewardPerValue?: boolean;
5896
+
5897
+ /**
5898
+ * Flag indicating if the rule should reward quality posts.
5899
+ */
5900
+ rewardQualityPosts?: boolean;
5901
+
5902
+ /**
5903
+ * Wallet address of the user can only be used if userId is not provided
5904
+ */
5905
+ royaltyAddress?: string;
5906
+
5907
+ /**
5908
+ * Royalty percentage of the item.
5909
+ */
5910
+ royaltyPercentage?: number;
5911
+
3274
5912
  /**
3275
5913
  * Currency associated with sales.
3276
5914
  */
@@ -3310,6 +5948,9 @@ export namespace RuleUpdateParams {
3310
5948
  | 'Twitch'
3311
5949
  | 'X(Twitter)'
3312
5950
  | 'YouTube'
5951
+ | 'Google'
5952
+ | 'GitHub'
5953
+ | 'Reddit'
3313
5954
  | null;
3314
5955
 
3315
5956
  /**
@@ -3322,11 +5963,21 @@ export namespace RuleUpdateParams {
3322
5963
  */
3323
5964
  socialPlatformName?: string | null;
3324
5965
 
5966
+ /**
5967
+ * ID of the Steam app.
5968
+ */
5969
+ steamAppId?: string | null;
5970
+
3325
5971
  /**
3326
5972
  * Array of streak milestones and corresponding rewards.
3327
5973
  */
3328
5974
  streakArray?: Array<Metadata.StreakArray> | null;
3329
5975
 
5976
+ /**
5977
+ * Metadata for swap loyalty rules
5978
+ */
5979
+ swap?: Metadata.Swap;
5980
+
3330
5981
  /**
3331
5982
  * ID of the Telegram channel.
3332
5983
  */
@@ -3342,6 +5993,12 @@ export namespace RuleUpdateParams {
3342
5993
  */
3343
5994
  trackAllContracts?: boolean | null;
3344
5995
 
5996
+ /**
5997
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
5998
+ * completed once the progress is 100%.
5999
+ */
6000
+ trackProgress?: boolean | null;
6001
+
3345
6002
  /**
3346
6003
  * URL of the associated Twitter account.
3347
6004
  */
@@ -3385,7 +6042,28 @@ export namespace RuleUpdateParams {
3385
6042
  /**
3386
6043
  * Type of wallet associated with the rule.
3387
6044
  */
3388
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
6045
+ walletType?:
6046
+ | 'evm'
6047
+ | 'solana'
6048
+ | 'imx'
6049
+ | 'sui'
6050
+ | 'ton'
6051
+ | 'cosmos'
6052
+ | 'ultra'
6053
+ | 'agw'
6054
+ | 'flow_cadence'
6055
+ | 'substrate'
6056
+ | null;
6057
+
6058
+ /**
6059
+ * ID of the Youtube channel.
6060
+ */
6061
+ youtubeChannelId?: string | null;
6062
+
6063
+ /**
6064
+ * ID of the Youtube video.
6065
+ */
6066
+ youtubeVideoId?: string | null;
3389
6067
  }
3390
6068
 
3391
6069
  export namespace Metadata {
@@ -3404,13 +6082,17 @@ export namespace RuleUpdateParams {
3404
6082
  * Blockchain network of the collection.
3405
6083
  */
3406
6084
  network?:
6085
+ | 'abstract'
6086
+ | 'abstractTestnet'
3407
6087
  | 'apechain'
3408
6088
  | 'arbitrum'
3409
6089
  | 'avalanche'
3410
6090
  | 'avalancheFuji'
3411
6091
  | 'base'
3412
6092
  | 'baseSepolia'
6093
+ | 'berachain'
3413
6094
  | 'berachainArtio'
6095
+ | 'berachainBepolia'
3414
6096
  | 'binance'
3415
6097
  | 'bscTestnet'
3416
6098
  | 'campTestnet'
@@ -3418,18 +6100,30 @@ export namespace RuleUpdateParams {
3418
6100
  | 'fantomTestnet'
3419
6101
  | 'flowMainnet'
3420
6102
  | 'mainnet'
6103
+ | 'nexusTestnet'
3421
6104
  | 'optimism'
3422
6105
  | 'polygon'
3423
6106
  | 'polygon_mumbai'
3424
6107
  | 'skaleNebula'
6108
+ | 'skaleEuropa'
6109
+ | 'skaleCalypso'
3425
6110
  | 'solana'
3426
6111
  | 'sophon'
6112
+ | 'sophonTestnet'
3427
6113
  | 'sui'
3428
6114
  | 'superseed'
3429
6115
  | 'superseedSepolia'
3430
6116
  | 'vanar'
3431
6117
  | 'xai'
3432
6118
  | 'zksync'
6119
+ | 'coti'
6120
+ | 'cotiTestnet'
6121
+ | 'morph'
6122
+ | 'morphTestnet'
6123
+ | 'morphHolesky'
6124
+ | 'ultra'
6125
+ | 'ultraTestnet'
6126
+ | 'nitrograph'
3433
6127
  | 'sepolia'
3434
6128
  | 'optimism_sepolia'
3435
6129
  | 'arbitrumSepolia'
@@ -3437,7 +6131,11 @@ export namespace RuleUpdateParams {
3437
6131
  | 'optimism_goerli'
3438
6132
  | 'arbitrumGoerli'
3439
6133
  | 'basecamp'
3440
- | 'abstract';
6134
+ | 'somnia'
6135
+ | 'zkverify'
6136
+ | 'polkadot'
6137
+ | 'kusama'
6138
+ | 'flow_cadence';
3441
6139
  }
3442
6140
 
3443
6141
  /**
@@ -3514,6 +6212,111 @@ export namespace RuleUpdateParams {
3514
6212
  id: string;
3515
6213
  }
3516
6214
 
6215
+ /**
6216
+ * Liquidity pool details.
6217
+ */
6218
+ export interface Liquidity {
6219
+ /**
6220
+ * Calculation type of the liquidity pool.
6221
+ */
6222
+ calculationType?: 'fixed' | 'custom';
6223
+
6224
+ /**
6225
+ * Custom function to calculate the the reward amount based on the liquidity
6226
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
6227
+ * USD.
6228
+ */
6229
+ customFunction?: string;
6230
+
6231
+ /**
6232
+ * Liquidity provided per day in USD
6233
+ */
6234
+ liquidityPerDay?: number;
6235
+
6236
+ /**
6237
+ * Blockchain network of the liquidity pool.
6238
+ */
6239
+ network?:
6240
+ | 'abstract'
6241
+ | 'abstractTestnet'
6242
+ | 'apechain'
6243
+ | 'arbitrum'
6244
+ | 'avalanche'
6245
+ | 'avalancheFuji'
6246
+ | 'base'
6247
+ | 'baseSepolia'
6248
+ | 'berachain'
6249
+ | 'berachainArtio'
6250
+ | 'berachainBepolia'
6251
+ | 'binance'
6252
+ | 'bscTestnet'
6253
+ | 'campTestnet'
6254
+ | 'fantom'
6255
+ | 'fantomTestnet'
6256
+ | 'flowMainnet'
6257
+ | 'mainnet'
6258
+ | 'nexusTestnet'
6259
+ | 'optimism'
6260
+ | 'polygon'
6261
+ | 'polygon_mumbai'
6262
+ | 'skaleNebula'
6263
+ | 'skaleEuropa'
6264
+ | 'skaleCalypso'
6265
+ | 'solana'
6266
+ | 'sophon'
6267
+ | 'sophonTestnet'
6268
+ | 'sui'
6269
+ | 'superseed'
6270
+ | 'superseedSepolia'
6271
+ | 'vanar'
6272
+ | 'xai'
6273
+ | 'zksync'
6274
+ | 'coti'
6275
+ | 'cotiTestnet'
6276
+ | 'morph'
6277
+ | 'morphTestnet'
6278
+ | 'morphHolesky'
6279
+ | 'ultra'
6280
+ | 'ultraTestnet'
6281
+ | 'nitrograph'
6282
+ | 'sepolia'
6283
+ | 'optimism_sepolia'
6284
+ | 'arbitrumSepolia'
6285
+ | 'goerli'
6286
+ | 'optimism_goerli'
6287
+ | 'arbitrumGoerli'
6288
+ | 'basecamp'
6289
+ | 'somnia'
6290
+ | 'zkverify'
6291
+ | 'polkadot'
6292
+ | 'kusama'
6293
+ | 'flow_cadence';
6294
+
6295
+ /**
6296
+ * Indicates if only in-range liquidity is rewarded.
6297
+ */
6298
+ onlyRewardInRangeLiquidity?: boolean;
6299
+
6300
+ /**
6301
+ * Array of liquidity pools associated with the rule.
6302
+ */
6303
+ pools?: Array<Liquidity.Pool>;
6304
+
6305
+ /**
6306
+ * Protocol of the liquidity pool.
6307
+ */
6308
+ protocol?: string;
6309
+ }
6310
+
6311
+ export namespace Liquidity {
6312
+ export interface Pool {
6313
+ /**
6314
+ * Unique identifier of the liquidity pool.
6315
+ */
6316
+ id: string;
6317
+ }
6318
+ }
6319
+
3517
6320
  export interface Range {
3518
6321
  /**
3519
6322
  * Reward amount for this range.
@@ -3529,6 +6332,16 @@ export namespace RuleUpdateParams {
3529
6332
  * Start value of the range.
3530
6333
  */
3531
6334
  startRange: number;
6335
+
6336
+ /**
6337
+ * ID of the loyalty badge for this range.
6338
+ */
6339
+ loyaltyBadgeId?: string;
6340
+
6341
+ /**
6342
+ * Amount of the loyalty multiplier for this range.
6343
+ */
6344
+ loyaltyMultiplierAmount?: number;
3532
6345
  }
3533
6346
 
3534
6347
  /**
@@ -3581,20 +6394,15 @@ export namespace RuleUpdateParams {
3581
6394
  * Object containing details of the associated smart contract.
3582
6395
  */
3583
6396
  export interface SmartContract {
3584
- /**
3585
- * ABI of the smart contract.
3586
- */
3587
- abi?: string | null;
3588
-
3589
6397
  /**
3590
6398
  * Mapping of addresses for the smart contract.
3591
6399
  */
3592
6400
  addressMapping?: string | null;
3593
6401
 
3594
6402
  /**
3595
- * Array of bonus details applied to the rule.
6403
+ * Object containing details of the amount multiplier from the event.
3596
6404
  */
3597
- bonus?: Array<SmartContract.Bonus> | null;
6405
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3598
6406
 
3599
6407
  /**
3600
6408
  * ID of the smart contract.
@@ -3606,68 +6414,31 @@ export namespace RuleUpdateParams {
3606
6414
  */
3607
6415
  criteria?: 'everyEvent' | 'byParameter' | null;
3608
6416
 
3609
- /**
3610
- * Time range applied to the rule.
3611
- */
3612
- customRange?: SmartContract.CustomRange | null;
3613
-
3614
6417
  /**
3615
6418
  * Event emitted by the smart contract.
3616
6419
  */
3617
6420
  event?: string | null;
3618
6421
 
3619
- /**
3620
- * Maximum value allowed for the parameter.
3621
- */
3622
- max?: number | null;
3623
-
3624
6422
  /**
3625
6423
  * Array of parameters for the smart contract.
3626
6424
  */
3627
6425
  params?: Array<SmartContract.Param> | null;
3628
6426
 
3629
6427
  /**
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.
6428
+ * Type of the smart contract interaction.
3641
6429
  */
3642
- withMax?: boolean | null;
6430
+ type?: 'function' | 'event' | null;
3643
6431
  }
3644
6432
 
3645
6433
  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
6434
  /**
3659
- * Time range applied to the rule.
6435
+ * Object containing details of the amount multiplier from the event.
3660
6436
  */
3661
- export interface CustomRange {
3662
- /**
3663
- * End time of the custom range.
3664
- */
3665
- endsAt?: string | null;
3666
-
6437
+ export interface AmountMultiplier {
3667
6438
  /**
3668
- * Start time of the custom range.
6439
+ * Mapping of the value for the smart contract.
3669
6440
  */
3670
- startsAt?: string | null;
6441
+ valueMapping?: string | null;
3671
6442
  }
3672
6443
 
3673
6444
  export interface Param {
@@ -3711,17 +6482,71 @@ export namespace RuleUpdateParams {
3711
6482
  */
3712
6483
  streakMilestone: number;
3713
6484
  }
6485
+
6486
+ /**
6487
+ * Metadata for swap loyalty rules
6488
+ */
6489
+ export interface Swap {
6490
+ provider?: 'any' | 'relay' | 'lifi';
6491
+
6492
+ relayReferrerId?: string;
6493
+
6494
+ requireCrossChainSwap?: boolean;
6495
+
6496
+ swappedToChain?: 'any' | number | string;
6497
+
6498
+ swappedToTokens?: Array<Swap.SwappedToToken>;
6499
+
6500
+ tokenMode?: 'any' | 'specific';
6501
+
6502
+ trackTokenAmount?: boolean;
6503
+ }
6504
+
6505
+ export namespace Swap {
6506
+ export interface SwappedToToken {
6507
+ address: string;
6508
+
6509
+ chainId: string;
6510
+ }
6511
+ }
3714
6512
  }
3715
6513
  }
3716
6514
 
3717
6515
  export interface RuleListParams {
6516
+ /**
6517
+ * IDs of the users to filter results by
6518
+ */
6519
+ allotedToUserId?: string | Array<string>;
6520
+
6521
+ /**
6522
+ * ID of the user group to filter results by
6523
+ */
6524
+ allotedUserGroupId?: string;
6525
+
3718
6526
  /**
3719
6527
  * Address of the collection to filter by
3720
6528
  */
3721
6529
  collectionAddress?: string;
3722
6530
 
3723
6531
  /**
3724
- * Maximum number of records to return (max 1000)
6532
+ * Whether to include deleted/archived records
6533
+ */
6534
+ includeDeleted?: boolean | null;
6535
+
6536
+ /**
6537
+ * If true this will only return active rules, the rules for which the startTime is
6538
+ * in the past and the endTime is in the future
6539
+ */
6540
+ isActive?: 'true' | 'false';
6541
+
6542
+ /**
6543
+ * If true this will only return special rules, special rules are the rules that
6544
+ * are used for anti sybil as honey pot
6545
+ */
6546
+ isSpecial?: 'true' | 'false';
6547
+
6548
+ /**
6549
+ * Maximum number of records to return (max 100)
3725
6550
  */
3726
6551
  limit?: number;
3727
6552
 
@@ -3751,6 +6576,13 @@ export interface RuleListParams {
3751
6576
  websiteId?: string;
3752
6577
  }
3753
6578
 
6579
+ export interface RuleDeleteParams {
6580
+ /**
6581
+ * Whether to debit loyalty points
6582
+ */
6583
+ debitLoyaltyPoints?: string;
6584
+ }
6585
+
3754
6586
  export interface RuleCompleteParams {
3755
6587
  /**
3756
6588
  * Override amount for the reward (rounded to nearest whole number). This will
@@ -3759,15 +6591,30 @@ export interface RuleCompleteParams {
3759
6591
  amount?: number | null;
3760
6592
 
3761
6593
  /**
3762
- * Link to the comment made by user
6594
+ * Link to the post/comment made by user
6595
+ */
6596
+ contentUrl?: string;
6597
+
6598
+ /**
6599
+ * Unique key to ensure idempotent requests.
3763
6600
  */
3764
- commentLink?: string;
6601
+ idempotencyKey?: string;
3765
6602
 
3766
6603
  /**
3767
6604
  * ID of the choice selected by the user
3768
6605
  */
3769
6606
  loyaltyQuestionChoiceId?: string;
3770
6607
 
6608
+ /**
6609
+ * Value to compare with the range
6610
+ */
6611
+ rangeValue?: number | null;
6612
+
6613
+ /**
6614
+ * Flag indicating if the chain or required check should be skipped.
6615
+ */
6616
+ skipChainOrRequiredCheck?: boolean;
6617
+
3771
6618
  /**
3772
6619
  * Unique identifier for the user
3773
6620
  */
@@ -3780,7 +6627,7 @@ export interface RuleCompleteParams {
3780
6627
 
3781
6628
  /**
3782
6629
  * Flag indicating if only verification is required, this will not create a
3783
- * transaction and reward the user
6630
+ * transaction and reward the user.
3784
6631
  */
3785
6632
  verifyOnly?: string;
3786
6633
 
@@ -3791,11 +6638,30 @@ export interface RuleCompleteParams {
3791
6638
  }
3792
6639
 
3793
6640
  export interface RuleGetStatusParams {
3794
- organizationId: string;
6641
+ /**
6642
+ * Number of items to return
6643
+ */
6644
+ limit?: number | null;
3795
6645
 
3796
- websiteId: string;
6646
+ /**
6647
+ * Unique identifier for the loyalty rule[s]
6648
+ */
6649
+ loyaltyRuleId?: string | Array<string>;
6650
+
6651
+ organizationId?: string;
6652
+
6653
+ /**
6654
+ * Starting after item
6655
+ */
6656
+ startingAfter?: string;
6657
+
6658
+ userGroupId?: string;
3797
6659
 
3798
6660
  userId?: string;
6661
+
6662
+ walletAddress?: string;
6663
+
6664
+ websiteId?: string;
3799
6665
  }
3800
6666
 
3801
6667
  export declare namespace Rules {
@@ -3809,6 +6675,7 @@ export declare namespace Rules {
3809
6675
  type RuleCreateParams as RuleCreateParams,
3810
6676
  type RuleUpdateParams as RuleUpdateParams,
3811
6677
  type RuleListParams as RuleListParams,
6678
+ type RuleDeleteParams as RuleDeleteParams,
3812
6679
  type RuleCompleteParams as RuleCompleteParams,
3813
6680
  type RuleGetStatusParams as RuleGetStatusParams,
3814
6681
  };