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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/CHANGELOG.md +1552 -0
  2. package/README.md +13 -23
  3. package/core.d.ts +19 -5
  4. package/core.d.ts.map +1 -1
  5. package/core.js +24 -17
  6. package/core.js.map +1 -1
  7. package/core.mjs +24 -17
  8. package/core.mjs.map +1 -1
  9. package/index.d.mts +7 -4
  10. package/index.d.ts +7 -4
  11. package/index.d.ts.map +1 -1
  12. package/index.js +8 -4
  13. package/index.js.map +1 -1
  14. package/index.mjs +8 -4
  15. package/index.mjs.map +1 -1
  16. package/package.json +4 -5
  17. package/resource.d.ts +1 -1
  18. package/resource.d.ts.map +1 -1
  19. package/resource.js.map +1 -1
  20. package/resource.mjs.map +1 -1
  21. package/resources/assets.d.ts +16 -2
  22. package/resources/assets.d.ts.map +1 -1
  23. package/resources/assets.js +8 -0
  24. package/resources/assets.js.map +1 -1
  25. package/resources/assets.mjs +8 -0
  26. package/resources/assets.mjs.map +1 -1
  27. package/resources/auctions/auctions.d.ts +343 -0
  28. package/resources/auctions/auctions.d.ts.map +1 -0
  29. package/resources/auctions/auctions.js +72 -0
  30. package/resources/auctions/auctions.js.map +1 -0
  31. package/resources/auctions/auctions.mjs +45 -0
  32. package/resources/auctions/auctions.mjs.map +1 -0
  33. package/resources/auctions/index.d.ts +3 -0
  34. package/resources/auctions/index.d.ts.map +1 -0
  35. package/resources/auctions/index.js +9 -0
  36. package/resources/auctions/index.js.map +1 -0
  37. package/resources/auctions/index.mjs +4 -0
  38. package/resources/auctions/index.mjs.map +1 -0
  39. package/resources/auctions/website-user-attributes/index.d.ts +3 -0
  40. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
  41. package/resources/auctions/website-user-attributes/index.js +9 -0
  42. package/resources/auctions/website-user-attributes/index.js.map +1 -0
  43. package/resources/auctions/website-user-attributes/index.mjs +4 -0
  44. package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
  45. package/resources/auctions/website-user-attributes/values.d.ts +126 -0
  46. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  47. package/resources/auctions/website-user-attributes/values.js +49 -0
  48. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  49. package/resources/auctions/website-user-attributes/values.mjs +45 -0
  50. package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
  51. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +136 -0
  52. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
  53. package/resources/auctions/website-user-attributes/website-user-attributes.js +76 -0
  54. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
  55. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +49 -0
  56. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
  57. package/resources/auctions/website-user-attributes.d.ts +2 -0
  58. package/resources/auctions/website-user-attributes.d.ts.map +1 -0
  59. package/resources/auctions/website-user-attributes.js +19 -0
  60. package/resources/auctions/website-user-attributes.js.map +1 -0
  61. package/resources/auctions/website-user-attributes.mjs +3 -0
  62. package/resources/auctions/website-user-attributes.mjs.map +1 -0
  63. package/resources/auctions.d.ts +1 -133
  64. package/resources/auctions.d.ts.map +1 -1
  65. package/resources/auctions.js +15 -22
  66. package/resources/auctions.js.map +1 -1
  67. package/resources/auctions.mjs +1 -20
  68. package/resources/auctions.mjs.map +1 -1
  69. package/resources/auth.d.ts +17 -4
  70. package/resources/auth.d.ts.map +1 -1
  71. package/resources/auth.js.map +1 -1
  72. package/resources/auth.mjs.map +1 -1
  73. package/resources/index.d.ts +2 -2
  74. package/resources/index.d.ts.map +1 -1
  75. package/resources/index.js +1 -1
  76. package/resources/index.js.map +1 -1
  77. package/resources/index.mjs +1 -1
  78. package/resources/index.mjs.map +1 -1
  79. package/resources/loyalty/account-streaks.d.ts +81 -0
  80. package/resources/loyalty/account-streaks.d.ts.map +1 -0
  81. package/resources/loyalty/account-streaks.js +24 -0
  82. package/resources/loyalty/account-streaks.js.map +1 -0
  83. package/resources/loyalty/account-streaks.mjs +20 -0
  84. package/resources/loyalty/account-streaks.mjs.map +1 -0
  85. package/resources/loyalty/accounts.d.ts +60 -16
  86. package/resources/loyalty/accounts.d.ts.map +1 -1
  87. package/resources/loyalty/accounts.js +14 -0
  88. package/resources/loyalty/accounts.js.map +1 -1
  89. package/resources/loyalty/accounts.mjs +14 -0
  90. package/resources/loyalty/accounts.mjs.map +1 -1
  91. package/resources/loyalty/badges.d.ts +666 -135
  92. package/resources/loyalty/badges.d.ts.map +1 -1
  93. package/resources/loyalty/badges.js +19 -1
  94. package/resources/loyalty/badges.js.map +1 -1
  95. package/resources/loyalty/badges.mjs +19 -1
  96. package/resources/loyalty/badges.mjs.map +1 -1
  97. package/resources/loyalty/currencies.d.ts +19 -0
  98. package/resources/loyalty/currencies.d.ts.map +1 -1
  99. package/resources/loyalty/currencies.js +19 -0
  100. package/resources/loyalty/currencies.js.map +1 -1
  101. package/resources/loyalty/currencies.mjs +19 -0
  102. package/resources/loyalty/currencies.mjs.map +1 -1
  103. package/resources/loyalty/index.d.ts +4 -4
  104. package/resources/loyalty/index.d.ts.map +1 -1
  105. package/resources/loyalty/index.js +5 -5
  106. package/resources/loyalty/index.js.map +1 -1
  107. package/resources/loyalty/index.mjs +3 -3
  108. package/resources/loyalty/index.mjs.map +1 -1
  109. package/resources/loyalty/loyalty.d.ts +11 -11
  110. package/resources/loyalty/loyalty.d.ts.map +1 -1
  111. package/resources/loyalty/loyalty.js +6 -6
  112. package/resources/loyalty/loyalty.js.map +1 -1
  113. package/resources/loyalty/loyalty.mjs +7 -7
  114. package/resources/loyalty/loyalty.mjs.map +1 -1
  115. package/resources/loyalty/multipliers.d.ts +39 -2
  116. package/resources/loyalty/multipliers.d.ts.map +1 -1
  117. package/resources/loyalty/multipliers.js +23 -0
  118. package/resources/loyalty/multipliers.js.map +1 -1
  119. package/resources/loyalty/multipliers.mjs +23 -0
  120. package/resources/loyalty/multipliers.mjs.map +1 -1
  121. package/resources/loyalty/questions-responses.d.ts +55 -4
  122. package/resources/loyalty/questions-responses.d.ts.map +1 -1
  123. package/resources/loyalty/questions-responses.js +9 -0
  124. package/resources/loyalty/questions-responses.js.map +1 -1
  125. package/resources/loyalty/questions-responses.mjs +9 -0
  126. package/resources/loyalty/questions-responses.mjs.map +1 -1
  127. package/resources/loyalty/questions.d.ts +52 -6
  128. package/resources/loyalty/questions.d.ts.map +1 -1
  129. package/resources/loyalty/questions.js +31 -0
  130. package/resources/loyalty/questions.js.map +1 -1
  131. package/resources/loyalty/questions.mjs +31 -0
  132. package/resources/loyalty/questions.mjs.map +1 -1
  133. package/resources/loyalty/rule-edits.d.ts +2630 -8
  134. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  135. package/resources/loyalty/rule-edits.js +14 -0
  136. package/resources/loyalty/rule-edits.js.map +1 -1
  137. package/resources/loyalty/rule-edits.mjs +14 -0
  138. package/resources/loyalty/rule-edits.mjs.map +1 -1
  139. package/resources/loyalty/rule-groups.d.ts +279 -64
  140. package/resources/loyalty/rule-groups.d.ts.map +1 -1
  141. package/resources/loyalty/rule-groups.js +38 -2
  142. package/resources/loyalty/rule-groups.js.map +1 -1
  143. package/resources/loyalty/rule-groups.mjs +38 -2
  144. package/resources/loyalty/rule-groups.mjs.map +1 -1
  145. package/resources/loyalty/rules.d.ts +1902 -269
  146. package/resources/loyalty/rules.d.ts.map +1 -1
  147. package/resources/loyalty/rules.js +40 -9
  148. package/resources/loyalty/rules.js.map +1 -1
  149. package/resources/loyalty/rules.mjs +40 -9
  150. package/resources/loyalty/rules.mjs.map +1 -1
  151. package/resources/loyalty/transactions/index.d.ts +3 -0
  152. package/resources/loyalty/transactions/index.d.ts.map +1 -0
  153. package/resources/loyalty/transactions/index.js +9 -0
  154. package/resources/loyalty/transactions/index.js.map +1 -0
  155. package/resources/loyalty/transactions/index.mjs +4 -0
  156. package/resources/loyalty/transactions/index.mjs.map +1 -0
  157. package/resources/loyalty/transactions/rule-statuses.d.ts +120 -0
  158. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  159. package/resources/loyalty/transactions/rule-statuses.js +30 -0
  160. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  161. package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
  162. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  163. package/resources/loyalty/transactions/transactions.d.ts +410 -0
  164. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  165. package/resources/loyalty/transactions/transactions.js +76 -0
  166. package/resources/loyalty/transactions/transactions.js.map +1 -0
  167. package/resources/loyalty/transactions/transactions.mjs +49 -0
  168. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  169. package/resources/loyalty/transactions.d.ts +1 -248
  170. package/resources/loyalty/transactions.d.ts.map +1 -1
  171. package/resources/loyalty/transactions.js +15 -18
  172. package/resources/loyalty/transactions.js.map +1 -1
  173. package/resources/loyalty/transactions.mjs +1 -16
  174. package/resources/loyalty/transactions.mjs.map +1 -1
  175. package/resources/minting.d.ts +5 -5
  176. package/resources/minting.d.ts.map +1 -1
  177. package/resources/referral/referral.d.ts +11 -3
  178. package/resources/referral/referral.d.ts.map +1 -1
  179. package/resources/referral/referral.js +11 -5
  180. package/resources/referral/referral.js.map +1 -1
  181. package/resources/referral/referral.mjs +11 -5
  182. package/resources/referral/referral.mjs.map +1 -1
  183. package/resources/referral/users.d.ts +29 -3
  184. package/resources/referral/users.d.ts.map +1 -1
  185. package/resources/referral/users.js +12 -4
  186. package/resources/referral/users.js.map +1 -1
  187. package/resources/referral/users.mjs +12 -4
  188. package/resources/referral/users.mjs.map +1 -1
  189. package/resources/users/index.d.ts +1 -1
  190. package/resources/users/index.d.ts.map +1 -1
  191. package/resources/users/index.js.map +1 -1
  192. package/resources/users/index.mjs.map +1 -1
  193. package/resources/users/metadatas.d.ts +34 -3
  194. package/resources/users/metadatas.d.ts.map +1 -1
  195. package/resources/users/metadatas.js.map +1 -1
  196. package/resources/users/metadatas.mjs.map +1 -1
  197. package/resources/users/users.d.ts +184 -35
  198. package/resources/users/users.d.ts.map +1 -1
  199. package/resources/users/users.js +58 -1
  200. package/resources/users/users.js.map +1 -1
  201. package/resources/users/users.mjs +58 -1
  202. package/resources/users/users.mjs.map +1 -1
  203. package/resources/websites/website-collections.d.ts +22 -1
  204. package/resources/websites/website-collections.d.ts.map +1 -1
  205. package/resources/websites/website-collections.js +21 -0
  206. package/resources/websites/website-collections.js.map +1 -1
  207. package/resources/websites/website-collections.mjs +21 -0
  208. package/resources/websites/website-collections.mjs.map +1 -1
  209. package/resources/websites/website-user-roles.d.ts +24 -1
  210. package/resources/websites/website-user-roles.d.ts.map +1 -1
  211. package/resources/websites/website-user-roles.js +23 -0
  212. package/resources/websites/website-user-roles.js.map +1 -1
  213. package/resources/websites/website-user-roles.mjs +23 -0
  214. package/resources/websites/website-user-roles.mjs.map +1 -1
  215. package/resources/websites/websites.d.ts +12 -0
  216. package/resources/websites/websites.d.ts.map +1 -1
  217. package/resources/websites/websites.js +7 -0
  218. package/resources/websites/websites.js.map +1 -1
  219. package/resources/websites/websites.mjs +7 -0
  220. package/resources/websites/websites.mjs.map +1 -1
  221. package/src/core.ts +39 -16
  222. package/src/index.ts +31 -2
  223. package/src/resource.ts +1 -1
  224. package/src/resources/assets.ts +18 -3
  225. package/src/resources/auctions/auctions.ts +528 -0
  226. package/src/resources/auctions/index.ts +19 -0
  227. package/src/resources/auctions/website-user-attributes/index.ts +18 -0
  228. package/src/resources/auctions/website-user-attributes/values.ts +170 -0
  229. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +212 -0
  230. package/src/resources/auctions/website-user-attributes.ts +3 -0
  231. package/src/resources/auctions.ts +1 -207
  232. package/src/resources/auth.ts +21 -5
  233. package/src/resources/index.ts +12 -1
  234. package/src/resources/loyalty/account-streaks.ts +110 -0
  235. package/src/resources/loyalty/accounts.ts +65 -18
  236. package/src/resources/loyalty/badges.ts +790 -146
  237. package/src/resources/loyalty/currencies.ts +19 -0
  238. package/src/resources/loyalty/index.ts +19 -3
  239. package/src/resources/loyalty/loyalty.ts +39 -15
  240. package/src/resources/loyalty/multipliers.ts +43 -4
  241. package/src/resources/loyalty/questions-responses.ts +64 -4
  242. package/src/resources/loyalty/questions.ts +56 -6
  243. package/src/resources/loyalty/rule-edits.ts +3830 -100
  244. package/src/resources/loyalty/rule-groups.ts +491 -76
  245. package/src/resources/loyalty/rules.ts +2986 -310
  246. package/src/resources/loyalty/transactions/index.ts +18 -0
  247. package/src/resources/loyalty/transactions/rule-statuses.ts +178 -0
  248. package/src/resources/loyalty/transactions/transactions.ts +683 -0
  249. package/src/resources/loyalty/transactions.ts +1 -440
  250. package/src/resources/minting.ts +25 -5
  251. package/src/resources/referral/referral.ts +13 -11
  252. package/src/resources/referral/users.ts +43 -5
  253. package/src/resources/users/index.ts +4 -0
  254. package/src/resources/users/metadatas.ts +57 -3
  255. package/src/resources/users/users.ts +249 -38
  256. package/src/resources/websites/website-collections.ts +42 -1
  257. package/src/resources/websites/website-user-roles.ts +25 -1
  258. package/src/resources/websites/websites.ts +12 -0
  259. package/src/version.ts +1 -1
  260. package/version.d.ts +1 -1
  261. package/version.d.ts.map +1 -1
  262. package/version.js +1 -1
  263. package/version.js.map +1 -1
  264. package/version.mjs +1 -1
  265. package/version.mjs.map +1 -1
  266. package/resources/loyalty/rule-chains.d.ts +0 -34
  267. package/resources/loyalty/rule-chains.d.ts.map +0 -1
  268. package/resources/loyalty/rule-chains.js +0 -15
  269. package/resources/loyalty/rule-chains.js.map +0 -1
  270. package/resources/loyalty/rule-chains.mjs +0 -11
  271. package/resources/loyalty/rule-chains.mjs.map +0 -1
  272. package/src/resources/loyalty/rule-chains.ts +0 -45
@@ -6,6 +6,13 @@ import * as Core from '../../core';
6
6
  export class RuleEdits extends APIResource {
7
7
  /**
8
8
  * Retrieve configured loyalty rule edits with optional pagination and filters
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const ruleEdits = await client.loyalty.ruleEdits.list({
13
+ * loyaltyRuleId: true,
14
+ * });
15
+ * ```
9
16
  */
10
17
  list(query: RuleEditListParams, options?: Core.RequestOptions): Core.APIPromise<RuleEditListResponse> {
11
18
  return this._client.get('/api/loyalty/rule_edits', { query, ...options });
@@ -13,6 +20,13 @@ export class RuleEdits extends APIResource {
13
20
 
14
21
  /**
15
22
  * Restore a loyalty rule from a rule edit
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const response = await client.loyalty.ruleEdits.restore(
27
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
28
+ * );
29
+ * ```
16
30
  */
17
31
  restore(
18
32
  id: string,
@@ -95,7 +109,7 @@ export namespace RuleEditListResponse {
95
109
  /**
96
110
  * Amount associated with the loyalty rule
97
111
  */
98
- amount: number;
112
+ amount: number | null;
99
113
 
100
114
  /**
101
115
  * Timestamp when the loyalty rule was created
@@ -107,16 +121,41 @@ export namespace RuleEditListResponse {
107
121
  */
108
122
  deletedAt: string | null;
109
123
 
124
+ /**
125
+ * Description of the loyalty rule
126
+ */
127
+ description: string;
128
+
129
+ /**
130
+ * End time of the loyalty rule
131
+ */
132
+ endTime: string | null;
133
+
110
134
  /**
111
135
  * Frequency of the loyalty rule
112
136
  */
113
137
  frequency: string;
114
138
 
139
+ /**
140
+ * Name of the loyalty rule
141
+ */
142
+ name: string;
143
+
115
144
  /**
116
145
  * Unique identifier for the organization
117
146
  */
118
147
  organizationId: string;
119
148
 
149
+ /**
150
+ * Type of the reward
151
+ */
152
+ rewardType: 'points' | 'multiplier' | 'badge';
153
+
154
+ /**
155
+ * Start time of the loyalty rule
156
+ */
157
+ startTime: string | null;
158
+
120
159
  /**
121
160
  * Type of the loyalty rule
122
161
  */
@@ -137,10 +176,914 @@ export namespace RuleEditListResponse {
137
176
  */
138
177
  collectionAddress?: string;
139
178
 
179
+ /**
180
+ * URL of the media associated with the loyalty rule
181
+ */
182
+ mediaUrl?: string | null;
183
+
140
184
  /**
141
185
  * Optional metadata for the loyalty rule
142
186
  */
143
- metadata?: Record<string, unknown>;
187
+ metadata?: { [key: string]: Data.Metadata };
188
+ }
189
+
190
+ export namespace Data {
191
+ export interface Metadata {
192
+ /**
193
+ * Number of tokens per batch.
194
+ */
195
+ batchSize?: number | null;
196
+
197
+ /**
198
+ * Text displayed on the action button.
199
+ */
200
+ buttonText?: string | null;
201
+
202
+ /**
203
+ * Flag indicating if commenting is required.
204
+ */
205
+ checkComment?: boolean | null;
206
+
207
+ /**
208
+ * Flag indicating if liking the post is required.
209
+ */
210
+ checkLike?: boolean | null;
211
+
212
+ /**
213
+ * Flag indicating if reposting is required.
214
+ */
215
+ checkRepost?: boolean | null;
216
+
217
+ /**
218
+ * Text to check in the Twitter post, username, or bio.
219
+ */
220
+ checkText?: string | Array<string> | null;
221
+
222
+ /**
223
+ * Array of collections associated with the rule.
224
+ */
225
+ collection?: Array<Metadata.Collection>;
226
+
227
+ /**
228
+ * Conditions for completing the profile.
229
+ */
230
+ completeProfileConditions?: { [key: string]: boolean } | null;
231
+
232
+ /**
233
+ * Description of the external rule condition (only for external rules)
234
+ */
235
+ conditionDescription?: string;
236
+
237
+ /**
238
+ * Object containing details for the call-to-action.
239
+ */
240
+ cta?: Metadata.Cta | null;
241
+
242
+ /**
243
+ * API key for custom rewards integration.
244
+ */
245
+ customRewardsApiKey?: string;
246
+
247
+ /**
248
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
249
+ */
250
+ directRpc?: boolean;
251
+
252
+ /**
253
+ * Array of Discord servers, channels, and roles to join.
254
+ */
255
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
256
+
257
+ /**
258
+ * Array of drip quests required to complete the rule.
259
+ */
260
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
261
+
262
+ /**
263
+ * Flag indicating whether joining Discord servers is required.
264
+ */
265
+ enableJoinDiscordServers?: boolean | null;
266
+
267
+ /**
268
+ * Flag indicating whether streaks are enabled.
269
+ */
270
+ enableStreaks?: boolean | null;
271
+
272
+ /**
273
+ * Flag indicating whether the verified multiplier is enabled.
274
+ */
275
+ enableVerifiedMultiplier?: boolean;
276
+
277
+ /**
278
+ * Type of ERC20 token for the loyalty rule.
279
+ */
280
+ erc20Type?: 'erc20' | 'native';
281
+
282
+ /**
283
+ * Fill source of the order for the token sale
284
+ */
285
+ fillSource?: string;
286
+
287
+ /**
288
+ * Percentage reward given to a user for their first referral.
289
+ */
290
+ firstReferralReward?: number | null;
291
+
292
+ /**
293
+ * Flag indicating whether the fill source is included.
294
+ */
295
+ hasFillSource?: boolean;
296
+
297
+ /**
298
+ * Indicates if the item has never been sold.
299
+ */
300
+ hasNeverSold?: boolean;
301
+
302
+ /**
303
+ * Indicates if the full royalty has been paid for items.
304
+ */
305
+ hasPaidFullRoyalty?: boolean;
306
+
307
+ /**
308
+ * Flag indicating if the sale currency is included.
309
+ */
310
+ hasSaleCurrency?: boolean;
311
+
312
+ /**
313
+ * Indicates if the user has a verified Twitter account.
314
+ */
315
+ hasVerifiedTwitter?: boolean;
316
+
317
+ /**
318
+ * URL of the image associated with the rule.
319
+ */
320
+ imageUrl?: string | null;
321
+
322
+ /**
323
+ * If enabled, the first transaction done on the platform will complete this rule
324
+ */
325
+ isCheckInOnEveryTxn?: boolean;
326
+
327
+ /**
328
+ * Indicates if the multiplier has been applied to rewards.
329
+ */
330
+ isMultiplierApplied?: boolean;
331
+
332
+ /**
333
+ * Flag indicating if the rule is restricted to new users.
334
+ */
335
+ isRestrictedToNewUsers?: boolean;
336
+
337
+ /**
338
+ * Flag indicating if rewards are applied retroactively.
339
+ */
340
+ isRetroactive?: boolean | null;
341
+
342
+ /**
343
+ * Flag indicating if the token hold multiplier is applied.
344
+ */
345
+ isTokenHoldMultiplier?: boolean;
346
+
347
+ /**
348
+ * Optional link associated with the metadata.
349
+ */
350
+ link?: string | null;
351
+
352
+ /**
353
+ * Liquidity pool details.
354
+ */
355
+ liquidity?: Metadata.Liquidity;
356
+
357
+ /**
358
+ * Maximum quantity constraint for token holding.
359
+ */
360
+ maxQty?: number | null;
361
+
362
+ /**
363
+ * Minimum quantity constraint for token holding.
364
+ */
365
+ minQty?: number | null;
366
+
367
+ /**
368
+ * Array of loyalty currency IDs used for multipliers.
369
+ */
370
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
371
+
372
+ /**
373
+ * Flag indicating whether to include only known users.
374
+ */
375
+ onlyKnownUsers?: boolean;
376
+
377
+ /**
378
+ * Flag indicating whether to include only native tokens.
379
+ */
380
+ onlyNative?: boolean;
381
+
382
+ /**
383
+ * Flag indicating whether to include only non-listed items.
384
+ */
385
+ onlyNonListed?: boolean;
386
+
387
+ /**
388
+ * Indicates if only existing users are rewarded.
389
+ */
390
+ onlyRewardExistingUser?: boolean;
391
+
392
+ /**
393
+ * give points for only one token ownership per contract
394
+ */
395
+ onlyRewardSingleTokenOwnership?: boolean | null;
396
+
397
+ /**
398
+ * Promotional code associated with the rule.
399
+ */
400
+ promoCode?: string;
401
+
402
+ /**
403
+ * URL of the CSV file containing promo codes.
404
+ */
405
+ promoCodeCsvUrl?: string;
406
+
407
+ /**
408
+ * Numbers of the promotional code to be generated.
409
+ */
410
+ promoCodeLength?: number | null;
411
+
412
+ /**
413
+ * Type of the promotional code.
414
+ */
415
+ promoCodeType?: 'code' | 'csv' | 'generate';
416
+
417
+ /**
418
+ * Array defining ranges and corresponding rewards.
419
+ */
420
+ range?: Array<Metadata.Range>;
421
+
422
+ /**
423
+ * Object defining referral requirements.
424
+ */
425
+ referralRequirements?: Metadata.ReferralRequirements | null;
426
+
427
+ /**
428
+ * Lump sum reward given to a referrer.
429
+ */
430
+ referrerReward?: number | null;
431
+
432
+ /**
433
+ * Loyalty currency ID of the referrer reward.
434
+ */
435
+ referrerRewardLoyaltyCurrencyId?: string | null;
436
+
437
+ /**
438
+ * Flag indicating if the post link is required.
439
+ */
440
+ requirePostLink?: boolean | null;
441
+
442
+ /**
443
+ * Flag indicating if media metadata is required.
444
+ */
445
+ requirePostMediaLink?: boolean | null;
446
+
447
+ /**
448
+ * Flag indicating if the rule can also reward badges per range.
449
+ */
450
+ rewardBadgePerRange?: boolean;
451
+
452
+ /**
453
+ * Flag indicating if the reward is rewarded by batch.
454
+ */
455
+ rewardByBatch?: boolean | null;
456
+
457
+ /**
458
+ * Criteria to evaluate the reward.
459
+ */
460
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
461
+
462
+ /**
463
+ * Flag indicating if the reward is rewarded per action.
464
+ */
465
+ rewardPerAction?: boolean | null;
466
+
467
+ /**
468
+ * Flag indicating if rewards are given per impression.
469
+ */
470
+ rewardPerImpression?: boolean | null;
471
+
472
+ /**
473
+ * Flag indicating if the rule should reward based on value of traded tokens
474
+ * instead of count.
475
+ */
476
+ rewardPerValue?: boolean;
477
+
478
+ /**
479
+ * Wallet address of the user can only be used if userId is not provided
480
+ */
481
+ royaltyAddress?: string;
482
+
483
+ /**
484
+ * Royalty percentage of the item.
485
+ */
486
+ royaltyPercentage?: number;
487
+
488
+ /**
489
+ * Currency associated with sales.
490
+ */
491
+ saleCurrency?: string;
492
+
493
+ /**
494
+ * Percentage reward given for a second-level referral.
495
+ */
496
+ secondReferralReward?: number | null;
497
+
498
+ /**
499
+ * Flag indicating if the multiplier is skipped.
500
+ */
501
+ skipMultiplier?: boolean | null;
502
+
503
+ /**
504
+ * Object containing details of the associated smart contract.
505
+ */
506
+ smartContract?: Metadata.SmartContract;
507
+
508
+ /**
509
+ * Array of snapshot proposals for the rule.
510
+ */
511
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
512
+
513
+ /**
514
+ * Social media platform associated with the rule.
515
+ */
516
+ socialPlatform?:
517
+ | 'Custom'
518
+ | 'Discord'
519
+ | 'EpicGames'
520
+ | 'Instagram'
521
+ | 'Steam'
522
+ | 'Telegram'
523
+ | 'TikTok'
524
+ | 'Twitch'
525
+ | 'X(Twitter)'
526
+ | 'YouTube'
527
+ | 'Google'
528
+ | null;
529
+
530
+ /**
531
+ * URL of the social platform's logo.
532
+ */
533
+ socialPlatformLogo?: string | null;
534
+
535
+ /**
536
+ * Name of the social platform.
537
+ */
538
+ socialPlatformName?: string | null;
539
+
540
+ /**
541
+ * ID of the Steam app.
542
+ */
543
+ steamAppId?: string | null;
544
+
545
+ /**
546
+ * Array of streak milestones and corresponding rewards.
547
+ */
548
+ streakArray?: Array<Metadata.StreakArray> | null;
549
+
550
+ /**
551
+ * Metadata for swap loyalty rules
552
+ */
553
+ swap?: Metadata.Swap;
554
+
555
+ /**
556
+ * ID of the Telegram channel.
557
+ */
558
+ telegramChannelId?: string | null;
559
+
560
+ /**
561
+ * Time delay in seconds to verify actions.
562
+ */
563
+ timeDelayToVerifySeconds?: string | number | null;
564
+
565
+ /**
566
+ * Flag indicating if all contracts are tracked.
567
+ */
568
+ trackAllContracts?: boolean | null;
569
+
570
+ /**
571
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
572
+ * completed once the progress is 100%.
573
+ */
574
+ trackProgress?: boolean | null;
575
+
576
+ /**
577
+ * URL of the associated Twitter account.
578
+ */
579
+ twitterAccountUrl?: string;
580
+
581
+ /**
582
+ * Hashtag associated with the Twitter post.
583
+ */
584
+ twitterHashtag?: string;
585
+
586
+ /**
587
+ * URL of the associated Twitter post.
588
+ */
589
+ twitterPostUrl?: string;
590
+
591
+ /**
592
+ * Unique identifier of the Twitter user.
593
+ */
594
+ twitterUserId?: string;
595
+
596
+ /**
597
+ * Twitter username of the user.
598
+ */
599
+ twitterUsername?: string;
600
+
601
+ /**
602
+ * Minimum length of the verification text.
603
+ */
604
+ verificationTextMinimumLength?: number | null;
605
+
606
+ /**
607
+ * Multiplier applied to rewards for verified users.
608
+ */
609
+ verifiedMultiplier?: number | null;
610
+
611
+ /**
612
+ * Placeholder text for verification input fields.
613
+ */
614
+ verifyPlaceHolderText?: string | null;
615
+
616
+ /**
617
+ * Type of wallet associated with the rule.
618
+ */
619
+ walletType?:
620
+ | 'evm'
621
+ | 'solana'
622
+ | 'imx'
623
+ | 'sui'
624
+ | 'ton'
625
+ | 'cosmos'
626
+ | 'ultra'
627
+ | 'agw'
628
+ | 'flow_cadence'
629
+ | 'substrate'
630
+ | null;
631
+
632
+ /**
633
+ * ID of the Youtube channel.
634
+ */
635
+ youtubeChannelId?: string | null;
636
+
637
+ /**
638
+ * ID of the Youtube video.
639
+ */
640
+ youtubeVideoId?: string | null;
641
+ }
642
+
643
+ export namespace Metadata {
644
+ export interface Collection {
645
+ /**
646
+ * Blockchain address of the collection.
647
+ */
648
+ address?: string;
649
+
650
+ /**
651
+ * Multiplier applied to the rewards for this collection.
652
+ */
653
+ multiplier?: number;
654
+
655
+ /**
656
+ * Blockchain network of the collection.
657
+ */
658
+ network?:
659
+ | 'abstract'
660
+ | 'abstractTestnet'
661
+ | 'apechain'
662
+ | 'arbitrum'
663
+ | 'avalanche'
664
+ | 'avalancheFuji'
665
+ | 'base'
666
+ | 'baseSepolia'
667
+ | 'berachain'
668
+ | 'berachainArtio'
669
+ | 'berachainBepolia'
670
+ | 'binance'
671
+ | 'bscTestnet'
672
+ | 'campTestnet'
673
+ | 'fantom'
674
+ | 'fantomTestnet'
675
+ | 'flowMainnet'
676
+ | 'mainnet'
677
+ | 'nexusTestnet'
678
+ | 'optimism'
679
+ | 'polygon'
680
+ | 'polygon_mumbai'
681
+ | 'skaleNebula'
682
+ | 'skaleEuropa'
683
+ | 'skaleCalypso'
684
+ | 'solana'
685
+ | 'sophon'
686
+ | 'sophonTestnet'
687
+ | 'sui'
688
+ | 'superseed'
689
+ | 'superseedSepolia'
690
+ | 'vanar'
691
+ | 'xai'
692
+ | 'zksync'
693
+ | 'coti'
694
+ | 'cotiTestnet'
695
+ | 'morph'
696
+ | 'morphTestnet'
697
+ | 'morphHolesky'
698
+ | 'ultra'
699
+ | 'ultraTestnet'
700
+ | 'nitrograph'
701
+ | 'sepolia'
702
+ | 'optimism_sepolia'
703
+ | 'arbitrumSepolia'
704
+ | 'goerli'
705
+ | 'optimism_goerli'
706
+ | 'arbitrumGoerli'
707
+ | 'basecamp'
708
+ | 'somnia'
709
+ | 'zkverify'
710
+ | 'polkadot'
711
+ | 'kusama'
712
+ | 'flow_cadence';
713
+ }
714
+
715
+ /**
716
+ * Object containing details for the call-to-action.
717
+ */
718
+ export interface Cta {
719
+ /**
720
+ * Link for the call-to-action.
721
+ */
722
+ href?: string | null;
723
+
724
+ /**
725
+ * Label for the call-to-action.
726
+ */
727
+ label?: string | null;
728
+ }
729
+
730
+ export interface DiscordServersToJoin {
731
+ /**
732
+ * ID of the Discord server to join.
733
+ */
734
+ id?: string;
735
+
736
+ /**
737
+ * Array of Discord channels to join.
738
+ */
739
+ channels?: Array<DiscordServersToJoin.Channel>;
740
+
741
+ /**
742
+ * Array of roles to assign in the Discord server.
743
+ */
744
+ roles?: Array<DiscordServersToJoin.Role>;
745
+ }
746
+
747
+ export namespace DiscordServersToJoin {
748
+ export interface Channel {
749
+ /**
750
+ * ID of the Discord channel.
751
+ */
752
+ id?: string;
753
+
754
+ /**
755
+ * Array of emojis used in the channel.
756
+ */
757
+ emojis?: Array<Channel.Emoji>;
758
+
759
+ /**
760
+ * Phrase of text to be present in the discord message
761
+ */
762
+ text?: string;
763
+ }
764
+
765
+ export namespace Channel {
766
+ export interface Emoji {
767
+ /**
768
+ * ID of the emoji used in the channel.
769
+ */
770
+ id?: string;
771
+ }
772
+ }
773
+
774
+ export interface Role {
775
+ /**
776
+ * ID of the role in the Discord server.
777
+ */
778
+ id: string;
779
+ }
780
+ }
781
+
782
+ export interface DripQuestsToComplete {
783
+ /**
784
+ * ID of the drip quest to complete.
785
+ */
786
+ id: string;
787
+ }
788
+
789
+ /**
790
+ * Liquidity pool details.
791
+ */
792
+ export interface Liquidity {
793
+ /**
794
+ * Calculation type of the liquidity pool.
795
+ */
796
+ calculationType?: 'fixed' | 'custom';
797
+
798
+ /**
799
+ * Custom function to calculate the the reward amount based on the liquidity
800
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
801
+ * USD.
802
+ */
803
+ customFunction?: string;
804
+
805
+ /**
806
+ * Liquidity provided per day in USD
807
+ */
808
+ liquidityPerDay?: number;
809
+
810
+ /**
811
+ * Blockchain network of the liquidity pool.
812
+ */
813
+ network?:
814
+ | 'abstract'
815
+ | 'abstractTestnet'
816
+ | 'apechain'
817
+ | 'arbitrum'
818
+ | 'avalanche'
819
+ | 'avalancheFuji'
820
+ | 'base'
821
+ | 'baseSepolia'
822
+ | 'berachain'
823
+ | 'berachainArtio'
824
+ | 'berachainBepolia'
825
+ | 'binance'
826
+ | 'bscTestnet'
827
+ | 'campTestnet'
828
+ | 'fantom'
829
+ | 'fantomTestnet'
830
+ | 'flowMainnet'
831
+ | 'mainnet'
832
+ | 'nexusTestnet'
833
+ | 'optimism'
834
+ | 'polygon'
835
+ | 'polygon_mumbai'
836
+ | 'skaleNebula'
837
+ | 'skaleEuropa'
838
+ | 'skaleCalypso'
839
+ | 'solana'
840
+ | 'sophon'
841
+ | 'sophonTestnet'
842
+ | 'sui'
843
+ | 'superseed'
844
+ | 'superseedSepolia'
845
+ | 'vanar'
846
+ | 'xai'
847
+ | 'zksync'
848
+ | 'coti'
849
+ | 'cotiTestnet'
850
+ | 'morph'
851
+ | 'morphTestnet'
852
+ | 'morphHolesky'
853
+ | 'ultra'
854
+ | 'ultraTestnet'
855
+ | 'nitrograph'
856
+ | 'sepolia'
857
+ | 'optimism_sepolia'
858
+ | 'arbitrumSepolia'
859
+ | 'goerli'
860
+ | 'optimism_goerli'
861
+ | 'arbitrumGoerli'
862
+ | 'basecamp'
863
+ | 'somnia'
864
+ | 'zkverify'
865
+ | 'polkadot'
866
+ | 'kusama'
867
+ | 'flow_cadence';
868
+
869
+ /**
870
+ * Indicates if only in-range liquidity is rewarded.
871
+ */
872
+ onlyRewardInRangeLiquidity?: boolean;
873
+
874
+ /**
875
+ * Array of liquidity pools associated with the rule.
876
+ */
877
+ pools?: Array<Liquidity.Pool>;
878
+
879
+ /**
880
+ * Protocol of the liquidity pool.
881
+ */
882
+ protocol?: string;
883
+ }
884
+
885
+ export namespace Liquidity {
886
+ export interface Pool {
887
+ /**
888
+ * Unique identifier of the liquidity pool.
889
+ */
890
+ id: string;
891
+ }
892
+ }
893
+
894
+ export interface Range {
895
+ /**
896
+ * Reward amount for this range.
897
+ */
898
+ amount: number;
899
+
900
+ /**
901
+ * End value of the range.
902
+ */
903
+ endRange: number;
904
+
905
+ /**
906
+ * Start value of the range.
907
+ */
908
+ startRange: number;
909
+
910
+ /**
911
+ * ID of the loyalty badge for this range.
912
+ */
913
+ loyaltyBadgeId?: string;
914
+
915
+ /**
916
+ * Amount of the loyalty multiplier for this range.
917
+ */
918
+ loyaltyMultiplierAmount?: number;
919
+ }
920
+
921
+ /**
922
+ * Object defining referral requirements.
923
+ */
924
+ export interface ReferralRequirements {
925
+ /**
926
+ * Flag indicating if achieving points is required.
927
+ */
928
+ achievePoints?: boolean | null;
929
+
930
+ /**
931
+ * Flag indicating if completing the profile is required.
932
+ */
933
+ completeProfile?: boolean | null;
934
+
935
+ /**
936
+ * Flag indicating if connecting Discord is required.
937
+ */
938
+ connectDiscord?: boolean | null;
939
+
940
+ /**
941
+ * Flag indicating if connecting email is required.
942
+ */
943
+ connectEmail?: boolean | null;
944
+
945
+ /**
946
+ * Flag indicating if connecting Twitter is required.
947
+ */
948
+ connectTwitter?: boolean | null;
949
+
950
+ points?: ReferralRequirements.Points | null;
951
+ }
952
+
953
+ export namespace ReferralRequirements {
954
+ export interface Points {
955
+ /**
956
+ * Points required for referral.
957
+ */
958
+ amount?: number | null;
959
+
960
+ /**
961
+ * ID of the loyalty currency for referral.
962
+ */
963
+ loyaltyCurrecyId?: string | null;
964
+ }
965
+ }
966
+
967
+ /**
968
+ * Object containing details of the associated smart contract.
969
+ */
970
+ export interface SmartContract {
971
+ /**
972
+ * Mapping of addresses for the smart contract.
973
+ */
974
+ addressMapping?: string | null;
975
+
976
+ /**
977
+ * Object containing details of the amount multiplier from the event.
978
+ */
979
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
980
+
981
+ /**
982
+ * ID of the smart contract.
983
+ */
984
+ contractId?: string | null;
985
+
986
+ /**
987
+ * Criteria to evaluate the smart contract event.
988
+ */
989
+ criteria?: 'everyEvent' | 'byParameter' | null;
990
+
991
+ /**
992
+ * Event emitted by the smart contract.
993
+ */
994
+ event?: string | null;
995
+
996
+ /**
997
+ * Array of parameters for the smart contract.
998
+ */
999
+ params?: Array<SmartContract.Param> | null;
1000
+
1001
+ /**
1002
+ * Type of the smart contract interaction.
1003
+ */
1004
+ type?: 'function' | 'event' | null;
1005
+ }
1006
+
1007
+ export namespace SmartContract {
1008
+ /**
1009
+ * Object containing details of the amount multiplier from the event.
1010
+ */
1011
+ export interface AmountMultiplier {
1012
+ /**
1013
+ * Mapping of the value for the smart contract.
1014
+ */
1015
+ valueMapping?: string | null;
1016
+ }
1017
+
1018
+ export interface Param {
1019
+ /**
1020
+ * Condition to check for the parameter.
1021
+ */
1022
+ condition?: string | null;
1023
+
1024
+ /**
1025
+ * Name of the smart contract parameter.
1026
+ */
1027
+ name?: string | null;
1028
+
1029
+ /**
1030
+ * Value of the parameter.
1031
+ */
1032
+ value?: string | null;
1033
+ }
1034
+ }
1035
+
1036
+ export interface SnapshotProposal {
1037
+ /**
1038
+ * ID of the snapshot proposal.
1039
+ */
1040
+ id: string;
1041
+
1042
+ /**
1043
+ * Space associated with the snapshot proposal.
1044
+ */
1045
+ space: string;
1046
+ }
1047
+
1048
+ export interface StreakArray {
1049
+ /**
1050
+ * Reward amount for achieving the streak milestone.
1051
+ */
1052
+ streakAmount: number;
1053
+
1054
+ /**
1055
+ * Milestone required to achieve the streak.
1056
+ */
1057
+ streakMilestone: number;
1058
+ }
1059
+
1060
+ /**
1061
+ * Metadata for swap loyalty rules
1062
+ */
1063
+ export interface Swap {
1064
+ provider?: 'any' | 'relay' | 'lifi';
1065
+
1066
+ relayReferrerId?: string;
1067
+
1068
+ requireCrossChainSwap?: boolean;
1069
+
1070
+ swappedToChain?: 'any' | number | string;
1071
+
1072
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1073
+
1074
+ tokenMode?: 'any' | 'specific';
1075
+
1076
+ trackTokenAmount?: boolean;
1077
+ }
1078
+
1079
+ export namespace Swap {
1080
+ export interface SwappedToToken {
1081
+ address: string;
1082
+
1083
+ chainId: string;
1084
+ }
1085
+ }
1086
+ }
144
1087
  }
145
1088
 
146
1089
  /**
@@ -155,7 +1098,7 @@ export namespace RuleEditListResponse {
155
1098
  /**
156
1099
  * Amount associated with the loyalty rule
157
1100
  */
158
- amount: number;
1101
+ amount: number | null;
159
1102
 
160
1103
  /**
161
1104
  * Timestamp when the loyalty rule was created
@@ -167,16 +1110,41 @@ export namespace RuleEditListResponse {
167
1110
  */
168
1111
  deletedAt: string | null;
169
1112
 
1113
+ /**
1114
+ * Description of the loyalty rule
1115
+ */
1116
+ description: string;
1117
+
1118
+ /**
1119
+ * End time of the loyalty rule
1120
+ */
1121
+ endTime: string | null;
1122
+
170
1123
  /**
171
1124
  * Frequency of the loyalty rule
172
1125
  */
173
1126
  frequency: string;
174
1127
 
1128
+ /**
1129
+ * Name of the loyalty rule
1130
+ */
1131
+ name: string;
1132
+
175
1133
  /**
176
1134
  * Unique identifier for the organization
177
1135
  */
178
1136
  organizationId: string;
179
1137
 
1138
+ /**
1139
+ * Type of the reward
1140
+ */
1141
+ rewardType: 'points' | 'multiplier' | 'badge';
1142
+
1143
+ /**
1144
+ * Start time of the loyalty rule
1145
+ */
1146
+ startTime: string | null;
1147
+
180
1148
  /**
181
1149
  * Type of the loyalty rule
182
1150
  */
@@ -197,131 +1165,975 @@ export namespace RuleEditListResponse {
197
1165
  */
198
1166
  collectionAddress?: string;
199
1167
 
1168
+ /**
1169
+ * URL of the media associated with the loyalty rule
1170
+ */
1171
+ mediaUrl?: string | null;
1172
+
200
1173
  /**
201
1174
  * Optional metadata for the loyalty rule
202
1175
  */
203
- metadata?: Record<string, unknown>;
1176
+ metadata?: { [key: string]: PreviousData.Metadata };
204
1177
  }
205
- }
206
- }
207
1178
 
208
- export interface RuleEditRestoreResponse {
209
- /**
210
- * Unique identifier for the rule edit
211
- */
212
- id: string;
1179
+ export namespace PreviousData {
1180
+ export interface Metadata {
1181
+ /**
1182
+ * Number of tokens per batch.
1183
+ */
1184
+ batchSize?: number | null;
213
1185
 
214
- /**
215
- * Type of action that was made on the rule
216
- */
217
- action: 'create' | 'update' | 'delete' | 'restore';
1186
+ /**
1187
+ * Text displayed on the action button.
1188
+ */
1189
+ buttonText?: string | null;
218
1190
 
219
- /**
220
- * Data that was changed on the rule
221
- */
222
- data: RuleEditRestoreResponse.Data;
1191
+ /**
1192
+ * Flag indicating if commenting is required.
1193
+ */
1194
+ checkComment?: boolean | null;
223
1195
 
224
- /**
225
- * Timestamp of when the rule edit was made
226
- */
227
- editedAt: string;
1196
+ /**
1197
+ * Flag indicating if liking the post is required.
1198
+ */
1199
+ checkLike?: boolean | null;
228
1200
 
229
- /**
230
- * User ID of the user who made the edit
231
- */
232
- editedByUserId: string;
1201
+ /**
1202
+ * Flag indicating if reposting is required.
1203
+ */
1204
+ checkRepost?: boolean | null;
233
1205
 
234
- /**
235
- * ID of the loyalty rule
236
- */
237
- loyaltyRuleId: string;
1206
+ /**
1207
+ * Text to check in the Twitter post, username, or bio.
1208
+ */
1209
+ checkText?: string | Array<string> | null;
238
1210
 
239
- /**
240
- * Unique identifier for the organization
241
- */
242
- organizationId: string;
1211
+ /**
1212
+ * Array of collections associated with the rule.
1213
+ */
1214
+ collection?: Array<Metadata.Collection>;
243
1215
 
244
- /**
245
- * Unique identifier for the website
246
- */
247
- websiteId: string;
1216
+ /**
1217
+ * Conditions for completing the profile.
1218
+ */
1219
+ completeProfileConditions?: { [key: string]: boolean } | null;
248
1220
 
249
- /**
250
- * Comment that was made on the edit
251
- */
252
- comment?: string;
1221
+ /**
1222
+ * Description of the external rule condition (only for external rules)
1223
+ */
1224
+ conditionDescription?: string;
253
1225
 
254
- /**
255
- * Previous data of the rule before the edit
256
- */
257
- previousData?: RuleEditRestoreResponse.PreviousData;
258
- }
1226
+ /**
1227
+ * Object containing details for the call-to-action.
1228
+ */
1229
+ cta?: Metadata.Cta | null;
259
1230
 
260
- export namespace RuleEditRestoreResponse {
261
- /**
262
- * Data that was changed on the rule
263
- */
264
- export interface Data {
265
- /**
266
- * Unique identifier for the loyalty rule
267
- */
268
- id: string;
1231
+ /**
1232
+ * API key for custom rewards integration.
1233
+ */
1234
+ customRewardsApiKey?: string;
269
1235
 
270
- /**
271
- * Amount associated with the loyalty rule
272
- */
273
- amount: number;
1236
+ /**
1237
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
1238
+ */
1239
+ directRpc?: boolean;
274
1240
 
275
- /**
276
- * Timestamp when the loyalty rule was created
277
- */
278
- createdAt: string;
1241
+ /**
1242
+ * Array of Discord servers, channels, and roles to join.
1243
+ */
1244
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
279
1245
 
280
- /**
281
- * Timestamp when the loyalty rule was deleted (if applicable)
282
- */
283
- deletedAt: string | null;
1246
+ /**
1247
+ * Array of drip quests required to complete the rule.
1248
+ */
1249
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
284
1250
 
285
- /**
286
- * Frequency of the loyalty rule
287
- */
288
- frequency: string;
1251
+ /**
1252
+ * Flag indicating whether joining Discord servers is required.
1253
+ */
1254
+ enableJoinDiscordServers?: boolean | null;
289
1255
 
290
- /**
291
- * Unique identifier for the organization
292
- */
293
- organizationId: string;
1256
+ /**
1257
+ * Flag indicating whether streaks are enabled.
1258
+ */
1259
+ enableStreaks?: boolean | null;
294
1260
 
295
- /**
296
- * Type of the loyalty rule
297
- */
298
- type: string;
1261
+ /**
1262
+ * Flag indicating whether the verified multiplier is enabled.
1263
+ */
1264
+ enableVerifiedMultiplier?: boolean;
299
1265
 
300
- /**
301
- * Timestamp when the loyalty rule was last updated
302
- */
303
- updatedAt: string;
1266
+ /**
1267
+ * Type of ERC20 token for the loyalty rule.
1268
+ */
1269
+ erc20Type?: 'erc20' | 'native';
304
1270
 
305
- /**
306
- * Unique identifier for the website
307
- */
308
- websiteId: string;
1271
+ /**
1272
+ * Fill source of the order for the token sale
1273
+ */
1274
+ fillSource?: string;
309
1275
 
310
- /**
311
- * Optional address of the collection
312
- */
313
- collectionAddress?: string;
1276
+ /**
1277
+ * Percentage reward given to a user for their first referral.
1278
+ */
1279
+ firstReferralReward?: number | null;
314
1280
 
315
- /**
316
- * Optional metadata for the loyalty rule
317
- */
318
- metadata?: Record<string, unknown>;
1281
+ /**
1282
+ * Flag indicating whether the fill source is included.
1283
+ */
1284
+ hasFillSource?: boolean;
1285
+
1286
+ /**
1287
+ * Indicates if the item has never been sold.
1288
+ */
1289
+ hasNeverSold?: boolean;
1290
+
1291
+ /**
1292
+ * Indicates if the full royalty has been paid for items.
1293
+ */
1294
+ hasPaidFullRoyalty?: boolean;
1295
+
1296
+ /**
1297
+ * Flag indicating if the sale currency is included.
1298
+ */
1299
+ hasSaleCurrency?: boolean;
1300
+
1301
+ /**
1302
+ * Indicates if the user has a verified Twitter account.
1303
+ */
1304
+ hasVerifiedTwitter?: boolean;
1305
+
1306
+ /**
1307
+ * URL of the image associated with the rule.
1308
+ */
1309
+ imageUrl?: string | null;
1310
+
1311
+ /**
1312
+ * If enabled, the first transaction done on the platform will complete this rule
1313
+ */
1314
+ isCheckInOnEveryTxn?: boolean;
1315
+
1316
+ /**
1317
+ * Indicates if the multiplier has been applied to rewards.
1318
+ */
1319
+ isMultiplierApplied?: boolean;
1320
+
1321
+ /**
1322
+ * Flag indicating if the rule is restricted to new users.
1323
+ */
1324
+ isRestrictedToNewUsers?: boolean;
1325
+
1326
+ /**
1327
+ * Flag indicating if rewards are applied retroactively.
1328
+ */
1329
+ isRetroactive?: boolean | null;
1330
+
1331
+ /**
1332
+ * Flag indicating if the token hold multiplier is applied.
1333
+ */
1334
+ isTokenHoldMultiplier?: boolean;
1335
+
1336
+ /**
1337
+ * Optional link associated with the metadata.
1338
+ */
1339
+ link?: string | null;
1340
+
1341
+ /**
1342
+ * Liquidity pool details.
1343
+ */
1344
+ liquidity?: Metadata.Liquidity;
1345
+
1346
+ /**
1347
+ * Maximum quantity constraint for token holding.
1348
+ */
1349
+ maxQty?: number | null;
1350
+
1351
+ /**
1352
+ * Minimum quantity constraint for token holding.
1353
+ */
1354
+ minQty?: number | null;
1355
+
1356
+ /**
1357
+ * Array of loyalty currency IDs used for multipliers.
1358
+ */
1359
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
1360
+
1361
+ /**
1362
+ * Flag indicating whether to include only known users.
1363
+ */
1364
+ onlyKnownUsers?: boolean;
1365
+
1366
+ /**
1367
+ * Flag indicating whether to include only native tokens.
1368
+ */
1369
+ onlyNative?: boolean;
1370
+
1371
+ /**
1372
+ * Flag indicating whether to include only non-listed items.
1373
+ */
1374
+ onlyNonListed?: boolean;
1375
+
1376
+ /**
1377
+ * Indicates if only existing users are rewarded.
1378
+ */
1379
+ onlyRewardExistingUser?: boolean;
1380
+
1381
+ /**
1382
+ * give points for only one token ownership per contract
1383
+ */
1384
+ onlyRewardSingleTokenOwnership?: boolean | null;
1385
+
1386
+ /**
1387
+ * Promotional code associated with the rule.
1388
+ */
1389
+ promoCode?: string;
1390
+
1391
+ /**
1392
+ * URL of the CSV file containing promo codes.
1393
+ */
1394
+ promoCodeCsvUrl?: string;
1395
+
1396
+ /**
1397
+ * Numbers of the promotional code to be generated.
1398
+ */
1399
+ promoCodeLength?: number | null;
1400
+
1401
+ /**
1402
+ * Type of the promotional code.
1403
+ */
1404
+ promoCodeType?: 'code' | 'csv' | 'generate';
1405
+
1406
+ /**
1407
+ * Array defining ranges and corresponding rewards.
1408
+ */
1409
+ range?: Array<Metadata.Range>;
1410
+
1411
+ /**
1412
+ * Object defining referral requirements.
1413
+ */
1414
+ referralRequirements?: Metadata.ReferralRequirements | null;
1415
+
1416
+ /**
1417
+ * Lump sum reward given to a referrer.
1418
+ */
1419
+ referrerReward?: number | null;
1420
+
1421
+ /**
1422
+ * Loyalty currency ID of the referrer reward.
1423
+ */
1424
+ referrerRewardLoyaltyCurrencyId?: string | null;
1425
+
1426
+ /**
1427
+ * Flag indicating if the post link is required.
1428
+ */
1429
+ requirePostLink?: boolean | null;
1430
+
1431
+ /**
1432
+ * Flag indicating if media metadata is required.
1433
+ */
1434
+ requirePostMediaLink?: boolean | null;
1435
+
1436
+ /**
1437
+ * Flag indicating if the rule can also reward badges per range.
1438
+ */
1439
+ rewardBadgePerRange?: boolean;
1440
+
1441
+ /**
1442
+ * Flag indicating if the reward is rewarded by batch.
1443
+ */
1444
+ rewardByBatch?: boolean | null;
1445
+
1446
+ /**
1447
+ * Criteria to evaluate the reward.
1448
+ */
1449
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
1450
+
1451
+ /**
1452
+ * Flag indicating if the reward is rewarded per action.
1453
+ */
1454
+ rewardPerAction?: boolean | null;
1455
+
1456
+ /**
1457
+ * Flag indicating if rewards are given per impression.
1458
+ */
1459
+ rewardPerImpression?: boolean | null;
1460
+
1461
+ /**
1462
+ * Flag indicating if the rule should reward based on value of traded tokens
1463
+ * instead of count.
1464
+ */
1465
+ rewardPerValue?: boolean;
1466
+
1467
+ /**
1468
+ * Wallet address of the user can only be used if userId is not provided
1469
+ */
1470
+ royaltyAddress?: string;
1471
+
1472
+ /**
1473
+ * Royalty percentage of the item.
1474
+ */
1475
+ royaltyPercentage?: number;
1476
+
1477
+ /**
1478
+ * Currency associated with sales.
1479
+ */
1480
+ saleCurrency?: string;
1481
+
1482
+ /**
1483
+ * Percentage reward given for a second-level referral.
1484
+ */
1485
+ secondReferralReward?: number | null;
1486
+
1487
+ /**
1488
+ * Flag indicating if the multiplier is skipped.
1489
+ */
1490
+ skipMultiplier?: boolean | null;
1491
+
1492
+ /**
1493
+ * Object containing details of the associated smart contract.
1494
+ */
1495
+ smartContract?: Metadata.SmartContract;
1496
+
1497
+ /**
1498
+ * Array of snapshot proposals for the rule.
1499
+ */
1500
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
1501
+
1502
+ /**
1503
+ * Social media platform associated with the rule.
1504
+ */
1505
+ socialPlatform?:
1506
+ | 'Custom'
1507
+ | 'Discord'
1508
+ | 'EpicGames'
1509
+ | 'Instagram'
1510
+ | 'Steam'
1511
+ | 'Telegram'
1512
+ | 'TikTok'
1513
+ | 'Twitch'
1514
+ | 'X(Twitter)'
1515
+ | 'YouTube'
1516
+ | 'Google'
1517
+ | null;
1518
+
1519
+ /**
1520
+ * URL of the social platform's logo.
1521
+ */
1522
+ socialPlatformLogo?: string | null;
1523
+
1524
+ /**
1525
+ * Name of the social platform.
1526
+ */
1527
+ socialPlatformName?: string | null;
1528
+
1529
+ /**
1530
+ * ID of the Steam app.
1531
+ */
1532
+ steamAppId?: string | null;
1533
+
1534
+ /**
1535
+ * Array of streak milestones and corresponding rewards.
1536
+ */
1537
+ streakArray?: Array<Metadata.StreakArray> | null;
1538
+
1539
+ /**
1540
+ * Metadata for swap loyalty rules
1541
+ */
1542
+ swap?: Metadata.Swap;
1543
+
1544
+ /**
1545
+ * ID of the Telegram channel.
1546
+ */
1547
+ telegramChannelId?: string | null;
1548
+
1549
+ /**
1550
+ * Time delay in seconds to verify actions.
1551
+ */
1552
+ timeDelayToVerifySeconds?: string | number | null;
1553
+
1554
+ /**
1555
+ * Flag indicating if all contracts are tracked.
1556
+ */
1557
+ trackAllContracts?: boolean | null;
1558
+
1559
+ /**
1560
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
1561
+ * completed once the progress is 100%.
1562
+ */
1563
+ trackProgress?: boolean | null;
1564
+
1565
+ /**
1566
+ * URL of the associated Twitter account.
1567
+ */
1568
+ twitterAccountUrl?: string;
1569
+
1570
+ /**
1571
+ * Hashtag associated with the Twitter post.
1572
+ */
1573
+ twitterHashtag?: string;
1574
+
1575
+ /**
1576
+ * URL of the associated Twitter post.
1577
+ */
1578
+ twitterPostUrl?: string;
1579
+
1580
+ /**
1581
+ * Unique identifier of the Twitter user.
1582
+ */
1583
+ twitterUserId?: string;
1584
+
1585
+ /**
1586
+ * Twitter username of the user.
1587
+ */
1588
+ twitterUsername?: string;
1589
+
1590
+ /**
1591
+ * Minimum length of the verification text.
1592
+ */
1593
+ verificationTextMinimumLength?: number | null;
1594
+
1595
+ /**
1596
+ * Multiplier applied to rewards for verified users.
1597
+ */
1598
+ verifiedMultiplier?: number | null;
1599
+
1600
+ /**
1601
+ * Placeholder text for verification input fields.
1602
+ */
1603
+ verifyPlaceHolderText?: string | null;
1604
+
1605
+ /**
1606
+ * Type of wallet associated with the rule.
1607
+ */
1608
+ walletType?:
1609
+ | 'evm'
1610
+ | 'solana'
1611
+ | 'imx'
1612
+ | 'sui'
1613
+ | 'ton'
1614
+ | 'cosmos'
1615
+ | 'ultra'
1616
+ | 'agw'
1617
+ | 'flow_cadence'
1618
+ | 'substrate'
1619
+ | null;
1620
+
1621
+ /**
1622
+ * ID of the Youtube channel.
1623
+ */
1624
+ youtubeChannelId?: string | null;
1625
+
1626
+ /**
1627
+ * ID of the Youtube video.
1628
+ */
1629
+ youtubeVideoId?: string | null;
1630
+ }
1631
+
1632
+ export namespace Metadata {
1633
+ export interface Collection {
1634
+ /**
1635
+ * Blockchain address of the collection.
1636
+ */
1637
+ address?: string;
1638
+
1639
+ /**
1640
+ * Multiplier applied to the rewards for this collection.
1641
+ */
1642
+ multiplier?: number;
1643
+
1644
+ /**
1645
+ * Blockchain network of the collection.
1646
+ */
1647
+ network?:
1648
+ | 'abstract'
1649
+ | 'abstractTestnet'
1650
+ | 'apechain'
1651
+ | 'arbitrum'
1652
+ | 'avalanche'
1653
+ | 'avalancheFuji'
1654
+ | 'base'
1655
+ | 'baseSepolia'
1656
+ | 'berachain'
1657
+ | 'berachainArtio'
1658
+ | 'berachainBepolia'
1659
+ | 'binance'
1660
+ | 'bscTestnet'
1661
+ | 'campTestnet'
1662
+ | 'fantom'
1663
+ | 'fantomTestnet'
1664
+ | 'flowMainnet'
1665
+ | 'mainnet'
1666
+ | 'nexusTestnet'
1667
+ | 'optimism'
1668
+ | 'polygon'
1669
+ | 'polygon_mumbai'
1670
+ | 'skaleNebula'
1671
+ | 'skaleEuropa'
1672
+ | 'skaleCalypso'
1673
+ | 'solana'
1674
+ | 'sophon'
1675
+ | 'sophonTestnet'
1676
+ | 'sui'
1677
+ | 'superseed'
1678
+ | 'superseedSepolia'
1679
+ | 'vanar'
1680
+ | 'xai'
1681
+ | 'zksync'
1682
+ | 'coti'
1683
+ | 'cotiTestnet'
1684
+ | 'morph'
1685
+ | 'morphTestnet'
1686
+ | 'morphHolesky'
1687
+ | 'ultra'
1688
+ | 'ultraTestnet'
1689
+ | 'nitrograph'
1690
+ | 'sepolia'
1691
+ | 'optimism_sepolia'
1692
+ | 'arbitrumSepolia'
1693
+ | 'goerli'
1694
+ | 'optimism_goerli'
1695
+ | 'arbitrumGoerli'
1696
+ | 'basecamp'
1697
+ | 'somnia'
1698
+ | 'zkverify'
1699
+ | 'polkadot'
1700
+ | 'kusama'
1701
+ | 'flow_cadence';
1702
+ }
1703
+
1704
+ /**
1705
+ * Object containing details for the call-to-action.
1706
+ */
1707
+ export interface Cta {
1708
+ /**
1709
+ * Link for the call-to-action.
1710
+ */
1711
+ href?: string | null;
1712
+
1713
+ /**
1714
+ * Label for the call-to-action.
1715
+ */
1716
+ label?: string | null;
1717
+ }
1718
+
1719
+ export interface DiscordServersToJoin {
1720
+ /**
1721
+ * ID of the Discord server to join.
1722
+ */
1723
+ id?: string;
1724
+
1725
+ /**
1726
+ * Array of Discord channels to join.
1727
+ */
1728
+ channels?: Array<DiscordServersToJoin.Channel>;
1729
+
1730
+ /**
1731
+ * Array of roles to assign in the Discord server.
1732
+ */
1733
+ roles?: Array<DiscordServersToJoin.Role>;
1734
+ }
1735
+
1736
+ export namespace DiscordServersToJoin {
1737
+ export interface Channel {
1738
+ /**
1739
+ * ID of the Discord channel.
1740
+ */
1741
+ id?: string;
1742
+
1743
+ /**
1744
+ * Array of emojis used in the channel.
1745
+ */
1746
+ emojis?: Array<Channel.Emoji>;
1747
+
1748
+ /**
1749
+ * Phrase of text to be present in the discord message
1750
+ */
1751
+ text?: string;
1752
+ }
1753
+
1754
+ export namespace Channel {
1755
+ export interface Emoji {
1756
+ /**
1757
+ * ID of the emoji used in the channel.
1758
+ */
1759
+ id?: string;
1760
+ }
1761
+ }
1762
+
1763
+ export interface Role {
1764
+ /**
1765
+ * ID of the role in the Discord server.
1766
+ */
1767
+ id: string;
1768
+ }
1769
+ }
1770
+
1771
+ export interface DripQuestsToComplete {
1772
+ /**
1773
+ * ID of the drip quest to complete.
1774
+ */
1775
+ id: string;
1776
+ }
1777
+
1778
+ /**
1779
+ * Liquidity pool details.
1780
+ */
1781
+ export interface Liquidity {
1782
+ /**
1783
+ * Calculation type of the liquidity pool.
1784
+ */
1785
+ calculationType?: 'fixed' | 'custom';
1786
+
1787
+ /**
1788
+ * Custom function to calculate the the reward amount based on the liquidity
1789
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
1790
+ * USD.
1791
+ */
1792
+ customFunction?: string;
1793
+
1794
+ /**
1795
+ * Liquidity provided per day in USD
1796
+ */
1797
+ liquidityPerDay?: number;
1798
+
1799
+ /**
1800
+ * Blockchain network of the liquidity pool.
1801
+ */
1802
+ network?:
1803
+ | 'abstract'
1804
+ | 'abstractTestnet'
1805
+ | 'apechain'
1806
+ | 'arbitrum'
1807
+ | 'avalanche'
1808
+ | 'avalancheFuji'
1809
+ | 'base'
1810
+ | 'baseSepolia'
1811
+ | 'berachain'
1812
+ | 'berachainArtio'
1813
+ | 'berachainBepolia'
1814
+ | 'binance'
1815
+ | 'bscTestnet'
1816
+ | 'campTestnet'
1817
+ | 'fantom'
1818
+ | 'fantomTestnet'
1819
+ | 'flowMainnet'
1820
+ | 'mainnet'
1821
+ | 'nexusTestnet'
1822
+ | 'optimism'
1823
+ | 'polygon'
1824
+ | 'polygon_mumbai'
1825
+ | 'skaleNebula'
1826
+ | 'skaleEuropa'
1827
+ | 'skaleCalypso'
1828
+ | 'solana'
1829
+ | 'sophon'
1830
+ | 'sophonTestnet'
1831
+ | 'sui'
1832
+ | 'superseed'
1833
+ | 'superseedSepolia'
1834
+ | 'vanar'
1835
+ | 'xai'
1836
+ | 'zksync'
1837
+ | 'coti'
1838
+ | 'cotiTestnet'
1839
+ | 'morph'
1840
+ | 'morphTestnet'
1841
+ | 'morphHolesky'
1842
+ | 'ultra'
1843
+ | 'ultraTestnet'
1844
+ | 'nitrograph'
1845
+ | 'sepolia'
1846
+ | 'optimism_sepolia'
1847
+ | 'arbitrumSepolia'
1848
+ | 'goerli'
1849
+ | 'optimism_goerli'
1850
+ | 'arbitrumGoerli'
1851
+ | 'basecamp'
1852
+ | 'somnia'
1853
+ | 'zkverify'
1854
+ | 'polkadot'
1855
+ | 'kusama'
1856
+ | 'flow_cadence';
1857
+
1858
+ /**
1859
+ * Indicates if only in-range liquidity is rewarded.
1860
+ */
1861
+ onlyRewardInRangeLiquidity?: boolean;
1862
+
1863
+ /**
1864
+ * Array of liquidity pools associated with the rule.
1865
+ */
1866
+ pools?: Array<Liquidity.Pool>;
1867
+
1868
+ /**
1869
+ * Protocol of the liquidity pool.
1870
+ */
1871
+ protocol?: string;
1872
+ }
1873
+
1874
+ export namespace Liquidity {
1875
+ export interface Pool {
1876
+ /**
1877
+ * Unique identifier of the liquidity pool.
1878
+ */
1879
+ id: string;
1880
+ }
1881
+ }
1882
+
1883
+ export interface Range {
1884
+ /**
1885
+ * Reward amount for this range.
1886
+ */
1887
+ amount: number;
1888
+
1889
+ /**
1890
+ * End value of the range.
1891
+ */
1892
+ endRange: number;
1893
+
1894
+ /**
1895
+ * Start value of the range.
1896
+ */
1897
+ startRange: number;
1898
+
1899
+ /**
1900
+ * ID of the loyalty badge for this range.
1901
+ */
1902
+ loyaltyBadgeId?: string;
1903
+
1904
+ /**
1905
+ * Amount of the loyalty multiplier for this range.
1906
+ */
1907
+ loyaltyMultiplierAmount?: number;
1908
+ }
1909
+
1910
+ /**
1911
+ * Object defining referral requirements.
1912
+ */
1913
+ export interface ReferralRequirements {
1914
+ /**
1915
+ * Flag indicating if achieving points is required.
1916
+ */
1917
+ achievePoints?: boolean | null;
1918
+
1919
+ /**
1920
+ * Flag indicating if completing the profile is required.
1921
+ */
1922
+ completeProfile?: boolean | null;
1923
+
1924
+ /**
1925
+ * Flag indicating if connecting Discord is required.
1926
+ */
1927
+ connectDiscord?: boolean | null;
1928
+
1929
+ /**
1930
+ * Flag indicating if connecting email is required.
1931
+ */
1932
+ connectEmail?: boolean | null;
1933
+
1934
+ /**
1935
+ * Flag indicating if connecting Twitter is required.
1936
+ */
1937
+ connectTwitter?: boolean | null;
1938
+
1939
+ points?: ReferralRequirements.Points | null;
1940
+ }
1941
+
1942
+ export namespace ReferralRequirements {
1943
+ export interface Points {
1944
+ /**
1945
+ * Points required for referral.
1946
+ */
1947
+ amount?: number | null;
1948
+
1949
+ /**
1950
+ * ID of the loyalty currency for referral.
1951
+ */
1952
+ loyaltyCurrecyId?: string | null;
1953
+ }
1954
+ }
1955
+
1956
+ /**
1957
+ * Object containing details of the associated smart contract.
1958
+ */
1959
+ export interface SmartContract {
1960
+ /**
1961
+ * Mapping of addresses for the smart contract.
1962
+ */
1963
+ addressMapping?: string | null;
1964
+
1965
+ /**
1966
+ * Object containing details of the amount multiplier from the event.
1967
+ */
1968
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1969
+
1970
+ /**
1971
+ * ID of the smart contract.
1972
+ */
1973
+ contractId?: string | null;
1974
+
1975
+ /**
1976
+ * Criteria to evaluate the smart contract event.
1977
+ */
1978
+ criteria?: 'everyEvent' | 'byParameter' | null;
1979
+
1980
+ /**
1981
+ * Event emitted by the smart contract.
1982
+ */
1983
+ event?: string | null;
1984
+
1985
+ /**
1986
+ * Array of parameters for the smart contract.
1987
+ */
1988
+ params?: Array<SmartContract.Param> | null;
1989
+
1990
+ /**
1991
+ * Type of the smart contract interaction.
1992
+ */
1993
+ type?: 'function' | 'event' | null;
1994
+ }
1995
+
1996
+ export namespace SmartContract {
1997
+ /**
1998
+ * Object containing details of the amount multiplier from the event.
1999
+ */
2000
+ export interface AmountMultiplier {
2001
+ /**
2002
+ * Mapping of the value for the smart contract.
2003
+ */
2004
+ valueMapping?: string | null;
2005
+ }
2006
+
2007
+ export interface Param {
2008
+ /**
2009
+ * Condition to check for the parameter.
2010
+ */
2011
+ condition?: string | null;
2012
+
2013
+ /**
2014
+ * Name of the smart contract parameter.
2015
+ */
2016
+ name?: string | null;
2017
+
2018
+ /**
2019
+ * Value of the parameter.
2020
+ */
2021
+ value?: string | null;
2022
+ }
2023
+ }
2024
+
2025
+ export interface SnapshotProposal {
2026
+ /**
2027
+ * ID of the snapshot proposal.
2028
+ */
2029
+ id: string;
2030
+
2031
+ /**
2032
+ * Space associated with the snapshot proposal.
2033
+ */
2034
+ space: string;
2035
+ }
2036
+
2037
+ export interface StreakArray {
2038
+ /**
2039
+ * Reward amount for achieving the streak milestone.
2040
+ */
2041
+ streakAmount: number;
2042
+
2043
+ /**
2044
+ * Milestone required to achieve the streak.
2045
+ */
2046
+ streakMilestone: number;
2047
+ }
2048
+
2049
+ /**
2050
+ * Metadata for swap loyalty rules
2051
+ */
2052
+ export interface Swap {
2053
+ provider?: 'any' | 'relay' | 'lifi';
2054
+
2055
+ relayReferrerId?: string;
2056
+
2057
+ requireCrossChainSwap?: boolean;
2058
+
2059
+ swappedToChain?: 'any' | number | string;
2060
+
2061
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2062
+
2063
+ tokenMode?: 'any' | 'specific';
2064
+
2065
+ trackTokenAmount?: boolean;
2066
+ }
2067
+
2068
+ export namespace Swap {
2069
+ export interface SwappedToToken {
2070
+ address: string;
2071
+
2072
+ chainId: string;
2073
+ }
2074
+ }
2075
+ }
2076
+ }
319
2077
  }
2078
+ }
2079
+
2080
+ export interface RuleEditRestoreResponse {
2081
+ /**
2082
+ * Unique identifier for the rule edit
2083
+ */
2084
+ id: string;
2085
+
2086
+ /**
2087
+ * Type of action that was made on the rule
2088
+ */
2089
+ action: 'create' | 'update' | 'delete' | 'restore';
2090
+
2091
+ /**
2092
+ * Data that was changed on the rule
2093
+ */
2094
+ data: RuleEditRestoreResponse.Data;
2095
+
2096
+ /**
2097
+ * Timestamp of when the rule edit was made
2098
+ */
2099
+ editedAt: string;
2100
+
2101
+ /**
2102
+ * User ID of the user who made the edit
2103
+ */
2104
+ editedByUserId: string;
2105
+
2106
+ /**
2107
+ * ID of the loyalty rule
2108
+ */
2109
+ loyaltyRuleId: string;
2110
+
2111
+ /**
2112
+ * Unique identifier for the organization
2113
+ */
2114
+ organizationId: string;
2115
+
2116
+ /**
2117
+ * Unique identifier for the website
2118
+ */
2119
+ websiteId: string;
2120
+
2121
+ /**
2122
+ * Comment that was made on the edit
2123
+ */
2124
+ comment?: string;
320
2125
 
321
2126
  /**
322
2127
  * Previous data of the rule before the edit
323
2128
  */
324
- export interface PreviousData {
2129
+ previousData?: RuleEditRestoreResponse.PreviousData;
2130
+ }
2131
+
2132
+ export namespace RuleEditRestoreResponse {
2133
+ /**
2134
+ * Data that was changed on the rule
2135
+ */
2136
+ export interface Data {
325
2137
  /**
326
2138
  * Unique identifier for the loyalty rule
327
2139
  */
@@ -330,7 +2142,7 @@ export namespace RuleEditRestoreResponse {
330
2142
  /**
331
2143
  * Amount associated with the loyalty rule
332
2144
  */
333
- amount: number;
2145
+ amount: number | null;
334
2146
 
335
2147
  /**
336
2148
  * Timestamp when the loyalty rule was created
@@ -342,16 +2154,41 @@ export namespace RuleEditRestoreResponse {
342
2154
  */
343
2155
  deletedAt: string | null;
344
2156
 
2157
+ /**
2158
+ * Description of the loyalty rule
2159
+ */
2160
+ description: string;
2161
+
2162
+ /**
2163
+ * End time of the loyalty rule
2164
+ */
2165
+ endTime: string | null;
2166
+
345
2167
  /**
346
2168
  * Frequency of the loyalty rule
347
2169
  */
348
2170
  frequency: string;
349
2171
 
2172
+ /**
2173
+ * Name of the loyalty rule
2174
+ */
2175
+ name: string;
2176
+
350
2177
  /**
351
2178
  * Unique identifier for the organization
352
2179
  */
353
2180
  organizationId: string;
354
2181
 
2182
+ /**
2183
+ * Type of the reward
2184
+ */
2185
+ rewardType: 'points' | 'multiplier' | 'badge';
2186
+
2187
+ /**
2188
+ * Start time of the loyalty rule
2189
+ */
2190
+ startTime: string | null;
2191
+
355
2192
  /**
356
2193
  * Type of the loyalty rule
357
2194
  */
@@ -372,10 +2209,1903 @@ export namespace RuleEditRestoreResponse {
372
2209
  */
373
2210
  collectionAddress?: string;
374
2211
 
2212
+ /**
2213
+ * URL of the media associated with the loyalty rule
2214
+ */
2215
+ mediaUrl?: string | null;
2216
+
375
2217
  /**
376
2218
  * Optional metadata for the loyalty rule
377
2219
  */
378
- metadata?: Record<string, unknown>;
2220
+ metadata?: { [key: string]: Data.Metadata };
2221
+ }
2222
+
2223
+ export namespace Data {
2224
+ export interface Metadata {
2225
+ /**
2226
+ * Number of tokens per batch.
2227
+ */
2228
+ batchSize?: number | null;
2229
+
2230
+ /**
2231
+ * Text displayed on the action button.
2232
+ */
2233
+ buttonText?: string | null;
2234
+
2235
+ /**
2236
+ * Flag indicating if commenting is required.
2237
+ */
2238
+ checkComment?: boolean | null;
2239
+
2240
+ /**
2241
+ * Flag indicating if liking the post is required.
2242
+ */
2243
+ checkLike?: boolean | null;
2244
+
2245
+ /**
2246
+ * Flag indicating if reposting is required.
2247
+ */
2248
+ checkRepost?: boolean | null;
2249
+
2250
+ /**
2251
+ * Text to check in the Twitter post, username, or bio.
2252
+ */
2253
+ checkText?: string | Array<string> | null;
2254
+
2255
+ /**
2256
+ * Array of collections associated with the rule.
2257
+ */
2258
+ collection?: Array<Metadata.Collection>;
2259
+
2260
+ /**
2261
+ * Conditions for completing the profile.
2262
+ */
2263
+ completeProfileConditions?: { [key: string]: boolean } | null;
2264
+
2265
+ /**
2266
+ * Description of the external rule condition (only for external rules)
2267
+ */
2268
+ conditionDescription?: string;
2269
+
2270
+ /**
2271
+ * Object containing details for the call-to-action.
2272
+ */
2273
+ cta?: Metadata.Cta | null;
2274
+
2275
+ /**
2276
+ * API key for custom rewards integration.
2277
+ */
2278
+ customRewardsApiKey?: string;
2279
+
2280
+ /**
2281
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
2282
+ */
2283
+ directRpc?: boolean;
2284
+
2285
+ /**
2286
+ * Array of Discord servers, channels, and roles to join.
2287
+ */
2288
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2289
+
2290
+ /**
2291
+ * Array of drip quests required to complete the rule.
2292
+ */
2293
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2294
+
2295
+ /**
2296
+ * Flag indicating whether joining Discord servers is required.
2297
+ */
2298
+ enableJoinDiscordServers?: boolean | null;
2299
+
2300
+ /**
2301
+ * Flag indicating whether streaks are enabled.
2302
+ */
2303
+ enableStreaks?: boolean | null;
2304
+
2305
+ /**
2306
+ * Flag indicating whether the verified multiplier is enabled.
2307
+ */
2308
+ enableVerifiedMultiplier?: boolean;
2309
+
2310
+ /**
2311
+ * Type of ERC20 token for the loyalty rule.
2312
+ */
2313
+ erc20Type?: 'erc20' | 'native';
2314
+
2315
+ /**
2316
+ * Fill source of the order for the token sale
2317
+ */
2318
+ fillSource?: string;
2319
+
2320
+ /**
2321
+ * Percentage reward given to a user for their first referral.
2322
+ */
2323
+ firstReferralReward?: number | null;
2324
+
2325
+ /**
2326
+ * Flag indicating whether the fill source is included.
2327
+ */
2328
+ hasFillSource?: boolean;
2329
+
2330
+ /**
2331
+ * Indicates if the item has never been sold.
2332
+ */
2333
+ hasNeverSold?: boolean;
2334
+
2335
+ /**
2336
+ * Indicates if the full royalty has been paid for items.
2337
+ */
2338
+ hasPaidFullRoyalty?: boolean;
2339
+
2340
+ /**
2341
+ * Flag indicating if the sale currency is included.
2342
+ */
2343
+ hasSaleCurrency?: boolean;
2344
+
2345
+ /**
2346
+ * Indicates if the user has a verified Twitter account.
2347
+ */
2348
+ hasVerifiedTwitter?: boolean;
2349
+
2350
+ /**
2351
+ * URL of the image associated with the rule.
2352
+ */
2353
+ imageUrl?: string | null;
2354
+
2355
+ /**
2356
+ * If enabled, the first transaction done on the platform will complete this rule
2357
+ */
2358
+ isCheckInOnEveryTxn?: boolean;
2359
+
2360
+ /**
2361
+ * Indicates if the multiplier has been applied to rewards.
2362
+ */
2363
+ isMultiplierApplied?: boolean;
2364
+
2365
+ /**
2366
+ * Flag indicating if the rule is restricted to new users.
2367
+ */
2368
+ isRestrictedToNewUsers?: boolean;
2369
+
2370
+ /**
2371
+ * Flag indicating if rewards are applied retroactively.
2372
+ */
2373
+ isRetroactive?: boolean | null;
2374
+
2375
+ /**
2376
+ * Flag indicating if the token hold multiplier is applied.
2377
+ */
2378
+ isTokenHoldMultiplier?: boolean;
2379
+
2380
+ /**
2381
+ * Optional link associated with the metadata.
2382
+ */
2383
+ link?: string | null;
2384
+
2385
+ /**
2386
+ * Liquidity pool details.
2387
+ */
2388
+ liquidity?: Metadata.Liquidity;
2389
+
2390
+ /**
2391
+ * Maximum quantity constraint for token holding.
2392
+ */
2393
+ maxQty?: number | null;
2394
+
2395
+ /**
2396
+ * Minimum quantity constraint for token holding.
2397
+ */
2398
+ minQty?: number | null;
2399
+
2400
+ /**
2401
+ * Array of loyalty currency IDs used for multipliers.
2402
+ */
2403
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
2404
+
2405
+ /**
2406
+ * Flag indicating whether to include only known users.
2407
+ */
2408
+ onlyKnownUsers?: boolean;
2409
+
2410
+ /**
2411
+ * Flag indicating whether to include only native tokens.
2412
+ */
2413
+ onlyNative?: boolean;
2414
+
2415
+ /**
2416
+ * Flag indicating whether to include only non-listed items.
2417
+ */
2418
+ onlyNonListed?: boolean;
2419
+
2420
+ /**
2421
+ * Indicates if only existing users are rewarded.
2422
+ */
2423
+ onlyRewardExistingUser?: boolean;
2424
+
2425
+ /**
2426
+ * give points for only one token ownership per contract
2427
+ */
2428
+ onlyRewardSingleTokenOwnership?: boolean | null;
2429
+
2430
+ /**
2431
+ * Promotional code associated with the rule.
2432
+ */
2433
+ promoCode?: string;
2434
+
2435
+ /**
2436
+ * URL of the CSV file containing promo codes.
2437
+ */
2438
+ promoCodeCsvUrl?: string;
2439
+
2440
+ /**
2441
+ * Numbers of the promotional code to be generated.
2442
+ */
2443
+ promoCodeLength?: number | null;
2444
+
2445
+ /**
2446
+ * Type of the promotional code.
2447
+ */
2448
+ promoCodeType?: 'code' | 'csv' | 'generate';
2449
+
2450
+ /**
2451
+ * Array defining ranges and corresponding rewards.
2452
+ */
2453
+ range?: Array<Metadata.Range>;
2454
+
2455
+ /**
2456
+ * Object defining referral requirements.
2457
+ */
2458
+ referralRequirements?: Metadata.ReferralRequirements | null;
2459
+
2460
+ /**
2461
+ * Lump sum reward given to a referrer.
2462
+ */
2463
+ referrerReward?: number | null;
2464
+
2465
+ /**
2466
+ * Loyalty currency ID of the referrer reward.
2467
+ */
2468
+ referrerRewardLoyaltyCurrencyId?: string | null;
2469
+
2470
+ /**
2471
+ * Flag indicating if the post link is required.
2472
+ */
2473
+ requirePostLink?: boolean | null;
2474
+
2475
+ /**
2476
+ * Flag indicating if media metadata is required.
2477
+ */
2478
+ requirePostMediaLink?: boolean | null;
2479
+
2480
+ /**
2481
+ * Flag indicating if the rule can also reward badges per range.
2482
+ */
2483
+ rewardBadgePerRange?: boolean;
2484
+
2485
+ /**
2486
+ * Flag indicating if the reward is rewarded by batch.
2487
+ */
2488
+ rewardByBatch?: boolean | null;
2489
+
2490
+ /**
2491
+ * Criteria to evaluate the reward.
2492
+ */
2493
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
2494
+
2495
+ /**
2496
+ * Flag indicating if the reward is rewarded per action.
2497
+ */
2498
+ rewardPerAction?: boolean | null;
2499
+
2500
+ /**
2501
+ * Flag indicating if rewards are given per impression.
2502
+ */
2503
+ rewardPerImpression?: boolean | null;
2504
+
2505
+ /**
2506
+ * Flag indicating if the rule should reward based on value of traded tokens
2507
+ * instead of count.
2508
+ */
2509
+ rewardPerValue?: boolean;
2510
+
2511
+ /**
2512
+ * Wallet address of the user can only be used if userId is not provided
2513
+ */
2514
+ royaltyAddress?: string;
2515
+
2516
+ /**
2517
+ * Royalty percentage of the item.
2518
+ */
2519
+ royaltyPercentage?: number;
2520
+
2521
+ /**
2522
+ * Currency associated with sales.
2523
+ */
2524
+ saleCurrency?: string;
2525
+
2526
+ /**
2527
+ * Percentage reward given for a second-level referral.
2528
+ */
2529
+ secondReferralReward?: number | null;
2530
+
2531
+ /**
2532
+ * Flag indicating if the multiplier is skipped.
2533
+ */
2534
+ skipMultiplier?: boolean | null;
2535
+
2536
+ /**
2537
+ * Object containing details of the associated smart contract.
2538
+ */
2539
+ smartContract?: Metadata.SmartContract;
2540
+
2541
+ /**
2542
+ * Array of snapshot proposals for the rule.
2543
+ */
2544
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
2545
+
2546
+ /**
2547
+ * Social media platform associated with the rule.
2548
+ */
2549
+ socialPlatform?:
2550
+ | 'Custom'
2551
+ | 'Discord'
2552
+ | 'EpicGames'
2553
+ | 'Instagram'
2554
+ | 'Steam'
2555
+ | 'Telegram'
2556
+ | 'TikTok'
2557
+ | 'Twitch'
2558
+ | 'X(Twitter)'
2559
+ | 'YouTube'
2560
+ | 'Google'
2561
+ | null;
2562
+
2563
+ /**
2564
+ * URL of the social platform's logo.
2565
+ */
2566
+ socialPlatformLogo?: string | null;
2567
+
2568
+ /**
2569
+ * Name of the social platform.
2570
+ */
2571
+ socialPlatformName?: string | null;
2572
+
2573
+ /**
2574
+ * ID of the Steam app.
2575
+ */
2576
+ steamAppId?: string | null;
2577
+
2578
+ /**
2579
+ * Array of streak milestones and corresponding rewards.
2580
+ */
2581
+ streakArray?: Array<Metadata.StreakArray> | null;
2582
+
2583
+ /**
2584
+ * Metadata for swap loyalty rules
2585
+ */
2586
+ swap?: Metadata.Swap;
2587
+
2588
+ /**
2589
+ * ID of the Telegram channel.
2590
+ */
2591
+ telegramChannelId?: string | null;
2592
+
2593
+ /**
2594
+ * Time delay in seconds to verify actions.
2595
+ */
2596
+ timeDelayToVerifySeconds?: string | number | null;
2597
+
2598
+ /**
2599
+ * Flag indicating if all contracts are tracked.
2600
+ */
2601
+ trackAllContracts?: boolean | null;
2602
+
2603
+ /**
2604
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2605
+ * completed once the progress is 100%.
2606
+ */
2607
+ trackProgress?: boolean | null;
2608
+
2609
+ /**
2610
+ * URL of the associated Twitter account.
2611
+ */
2612
+ twitterAccountUrl?: string;
2613
+
2614
+ /**
2615
+ * Hashtag associated with the Twitter post.
2616
+ */
2617
+ twitterHashtag?: string;
2618
+
2619
+ /**
2620
+ * URL of the associated Twitter post.
2621
+ */
2622
+ twitterPostUrl?: string;
2623
+
2624
+ /**
2625
+ * Unique identifier of the Twitter user.
2626
+ */
2627
+ twitterUserId?: string;
2628
+
2629
+ /**
2630
+ * Twitter username of the user.
2631
+ */
2632
+ twitterUsername?: string;
2633
+
2634
+ /**
2635
+ * Minimum length of the verification text.
2636
+ */
2637
+ verificationTextMinimumLength?: number | null;
2638
+
2639
+ /**
2640
+ * Multiplier applied to rewards for verified users.
2641
+ */
2642
+ verifiedMultiplier?: number | null;
2643
+
2644
+ /**
2645
+ * Placeholder text for verification input fields.
2646
+ */
2647
+ verifyPlaceHolderText?: string | null;
2648
+
2649
+ /**
2650
+ * Type of wallet associated with the rule.
2651
+ */
2652
+ walletType?:
2653
+ | 'evm'
2654
+ | 'solana'
2655
+ | 'imx'
2656
+ | 'sui'
2657
+ | 'ton'
2658
+ | 'cosmos'
2659
+ | 'ultra'
2660
+ | 'agw'
2661
+ | 'flow_cadence'
2662
+ | 'substrate'
2663
+ | null;
2664
+
2665
+ /**
2666
+ * ID of the Youtube channel.
2667
+ */
2668
+ youtubeChannelId?: string | null;
2669
+
2670
+ /**
2671
+ * ID of the Youtube video.
2672
+ */
2673
+ youtubeVideoId?: string | null;
2674
+ }
2675
+
2676
+ export namespace Metadata {
2677
+ export interface Collection {
2678
+ /**
2679
+ * Blockchain address of the collection.
2680
+ */
2681
+ address?: string;
2682
+
2683
+ /**
2684
+ * Multiplier applied to the rewards for this collection.
2685
+ */
2686
+ multiplier?: number;
2687
+
2688
+ /**
2689
+ * Blockchain network of the collection.
2690
+ */
2691
+ network?:
2692
+ | 'abstract'
2693
+ | 'abstractTestnet'
2694
+ | 'apechain'
2695
+ | 'arbitrum'
2696
+ | 'avalanche'
2697
+ | 'avalancheFuji'
2698
+ | 'base'
2699
+ | 'baseSepolia'
2700
+ | 'berachain'
2701
+ | 'berachainArtio'
2702
+ | 'berachainBepolia'
2703
+ | 'binance'
2704
+ | 'bscTestnet'
2705
+ | 'campTestnet'
2706
+ | 'fantom'
2707
+ | 'fantomTestnet'
2708
+ | 'flowMainnet'
2709
+ | 'mainnet'
2710
+ | 'nexusTestnet'
2711
+ | 'optimism'
2712
+ | 'polygon'
2713
+ | 'polygon_mumbai'
2714
+ | 'skaleNebula'
2715
+ | 'skaleEuropa'
2716
+ | 'skaleCalypso'
2717
+ | 'solana'
2718
+ | 'sophon'
2719
+ | 'sophonTestnet'
2720
+ | 'sui'
2721
+ | 'superseed'
2722
+ | 'superseedSepolia'
2723
+ | 'vanar'
2724
+ | 'xai'
2725
+ | 'zksync'
2726
+ | 'coti'
2727
+ | 'cotiTestnet'
2728
+ | 'morph'
2729
+ | 'morphTestnet'
2730
+ | 'morphHolesky'
2731
+ | 'ultra'
2732
+ | 'ultraTestnet'
2733
+ | 'nitrograph'
2734
+ | 'sepolia'
2735
+ | 'optimism_sepolia'
2736
+ | 'arbitrumSepolia'
2737
+ | 'goerli'
2738
+ | 'optimism_goerli'
2739
+ | 'arbitrumGoerli'
2740
+ | 'basecamp'
2741
+ | 'somnia'
2742
+ | 'zkverify'
2743
+ | 'polkadot'
2744
+ | 'kusama'
2745
+ | 'flow_cadence';
2746
+ }
2747
+
2748
+ /**
2749
+ * Object containing details for the call-to-action.
2750
+ */
2751
+ export interface Cta {
2752
+ /**
2753
+ * Link for the call-to-action.
2754
+ */
2755
+ href?: string | null;
2756
+
2757
+ /**
2758
+ * Label for the call-to-action.
2759
+ */
2760
+ label?: string | null;
2761
+ }
2762
+
2763
+ export interface DiscordServersToJoin {
2764
+ /**
2765
+ * ID of the Discord server to join.
2766
+ */
2767
+ id?: string;
2768
+
2769
+ /**
2770
+ * Array of Discord channels to join.
2771
+ */
2772
+ channels?: Array<DiscordServersToJoin.Channel>;
2773
+
2774
+ /**
2775
+ * Array of roles to assign in the Discord server.
2776
+ */
2777
+ roles?: Array<DiscordServersToJoin.Role>;
2778
+ }
2779
+
2780
+ export namespace DiscordServersToJoin {
2781
+ export interface Channel {
2782
+ /**
2783
+ * ID of the Discord channel.
2784
+ */
2785
+ id?: string;
2786
+
2787
+ /**
2788
+ * Array of emojis used in the channel.
2789
+ */
2790
+ emojis?: Array<Channel.Emoji>;
2791
+
2792
+ /**
2793
+ * Phrase of text to be present in the discord message
2794
+ */
2795
+ text?: string;
2796
+ }
2797
+
2798
+ export namespace Channel {
2799
+ export interface Emoji {
2800
+ /**
2801
+ * ID of the emoji used in the channel.
2802
+ */
2803
+ id?: string;
2804
+ }
2805
+ }
2806
+
2807
+ export interface Role {
2808
+ /**
2809
+ * ID of the role in the Discord server.
2810
+ */
2811
+ id: string;
2812
+ }
2813
+ }
2814
+
2815
+ export interface DripQuestsToComplete {
2816
+ /**
2817
+ * ID of the drip quest to complete.
2818
+ */
2819
+ id: string;
2820
+ }
2821
+
2822
+ /**
2823
+ * Liquidity pool details.
2824
+ */
2825
+ export interface Liquidity {
2826
+ /**
2827
+ * Calculation type of the liquidity pool.
2828
+ */
2829
+ calculationType?: 'fixed' | 'custom';
2830
+
2831
+ /**
2832
+ * Custom function to calculate the the reward amount based on the liquidity
2833
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2834
+ * USD.
2835
+ */
2836
+ customFunction?: string;
2837
+
2838
+ /**
2839
+ * Liquidity provided per day in USD
2840
+ */
2841
+ liquidityPerDay?: number;
2842
+
2843
+ /**
2844
+ * Blockchain network of the liquidity pool.
2845
+ */
2846
+ network?:
2847
+ | 'abstract'
2848
+ | 'abstractTestnet'
2849
+ | 'apechain'
2850
+ | 'arbitrum'
2851
+ | 'avalanche'
2852
+ | 'avalancheFuji'
2853
+ | 'base'
2854
+ | 'baseSepolia'
2855
+ | 'berachain'
2856
+ | 'berachainArtio'
2857
+ | 'berachainBepolia'
2858
+ | 'binance'
2859
+ | 'bscTestnet'
2860
+ | 'campTestnet'
2861
+ | 'fantom'
2862
+ | 'fantomTestnet'
2863
+ | 'flowMainnet'
2864
+ | 'mainnet'
2865
+ | 'nexusTestnet'
2866
+ | 'optimism'
2867
+ | 'polygon'
2868
+ | 'polygon_mumbai'
2869
+ | 'skaleNebula'
2870
+ | 'skaleEuropa'
2871
+ | 'skaleCalypso'
2872
+ | 'solana'
2873
+ | 'sophon'
2874
+ | 'sophonTestnet'
2875
+ | 'sui'
2876
+ | 'superseed'
2877
+ | 'superseedSepolia'
2878
+ | 'vanar'
2879
+ | 'xai'
2880
+ | 'zksync'
2881
+ | 'coti'
2882
+ | 'cotiTestnet'
2883
+ | 'morph'
2884
+ | 'morphTestnet'
2885
+ | 'morphHolesky'
2886
+ | 'ultra'
2887
+ | 'ultraTestnet'
2888
+ | 'nitrograph'
2889
+ | 'sepolia'
2890
+ | 'optimism_sepolia'
2891
+ | 'arbitrumSepolia'
2892
+ | 'goerli'
2893
+ | 'optimism_goerli'
2894
+ | 'arbitrumGoerli'
2895
+ | 'basecamp'
2896
+ | 'somnia'
2897
+ | 'zkverify'
2898
+ | 'polkadot'
2899
+ | 'kusama'
2900
+ | 'flow_cadence';
2901
+
2902
+ /**
2903
+ * Indicates if only in-range liquidity is rewarded.
2904
+ */
2905
+ onlyRewardInRangeLiquidity?: boolean;
2906
+
2907
+ /**
2908
+ * Array of liquidity pools associated with the rule.
2909
+ */
2910
+ pools?: Array<Liquidity.Pool>;
2911
+
2912
+ /**
2913
+ * Protocol of the liquidity pool.
2914
+ */
2915
+ protocol?: string;
2916
+ }
2917
+
2918
+ export namespace Liquidity {
2919
+ export interface Pool {
2920
+ /**
2921
+ * Unique identifier of the liquidity pool.
2922
+ */
2923
+ id: string;
2924
+ }
2925
+ }
2926
+
2927
+ export interface Range {
2928
+ /**
2929
+ * Reward amount for this range.
2930
+ */
2931
+ amount: number;
2932
+
2933
+ /**
2934
+ * End value of the range.
2935
+ */
2936
+ endRange: number;
2937
+
2938
+ /**
2939
+ * Start value of the range.
2940
+ */
2941
+ startRange: number;
2942
+
2943
+ /**
2944
+ * ID of the loyalty badge for this range.
2945
+ */
2946
+ loyaltyBadgeId?: string;
2947
+
2948
+ /**
2949
+ * Amount of the loyalty multiplier for this range.
2950
+ */
2951
+ loyaltyMultiplierAmount?: number;
2952
+ }
2953
+
2954
+ /**
2955
+ * Object defining referral requirements.
2956
+ */
2957
+ export interface ReferralRequirements {
2958
+ /**
2959
+ * Flag indicating if achieving points is required.
2960
+ */
2961
+ achievePoints?: boolean | null;
2962
+
2963
+ /**
2964
+ * Flag indicating if completing the profile is required.
2965
+ */
2966
+ completeProfile?: boolean | null;
2967
+
2968
+ /**
2969
+ * Flag indicating if connecting Discord is required.
2970
+ */
2971
+ connectDiscord?: boolean | null;
2972
+
2973
+ /**
2974
+ * Flag indicating if connecting email is required.
2975
+ */
2976
+ connectEmail?: boolean | null;
2977
+
2978
+ /**
2979
+ * Flag indicating if connecting Twitter is required.
2980
+ */
2981
+ connectTwitter?: boolean | null;
2982
+
2983
+ points?: ReferralRequirements.Points | null;
2984
+ }
2985
+
2986
+ export namespace ReferralRequirements {
2987
+ export interface Points {
2988
+ /**
2989
+ * Points required for referral.
2990
+ */
2991
+ amount?: number | null;
2992
+
2993
+ /**
2994
+ * ID of the loyalty currency for referral.
2995
+ */
2996
+ loyaltyCurrecyId?: string | null;
2997
+ }
2998
+ }
2999
+
3000
+ /**
3001
+ * Object containing details of the associated smart contract.
3002
+ */
3003
+ export interface SmartContract {
3004
+ /**
3005
+ * Mapping of addresses for the smart contract.
3006
+ */
3007
+ addressMapping?: string | null;
3008
+
3009
+ /**
3010
+ * Object containing details of the amount multiplier from the event.
3011
+ */
3012
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3013
+
3014
+ /**
3015
+ * ID of the smart contract.
3016
+ */
3017
+ contractId?: string | null;
3018
+
3019
+ /**
3020
+ * Criteria to evaluate the smart contract event.
3021
+ */
3022
+ criteria?: 'everyEvent' | 'byParameter' | null;
3023
+
3024
+ /**
3025
+ * Event emitted by the smart contract.
3026
+ */
3027
+ event?: string | null;
3028
+
3029
+ /**
3030
+ * Array of parameters for the smart contract.
3031
+ */
3032
+ params?: Array<SmartContract.Param> | null;
3033
+
3034
+ /**
3035
+ * Type of the smart contract interaction.
3036
+ */
3037
+ type?: 'function' | 'event' | null;
3038
+ }
3039
+
3040
+ export namespace SmartContract {
3041
+ /**
3042
+ * Object containing details of the amount multiplier from the event.
3043
+ */
3044
+ export interface AmountMultiplier {
3045
+ /**
3046
+ * Mapping of the value for the smart contract.
3047
+ */
3048
+ valueMapping?: string | null;
3049
+ }
3050
+
3051
+ export interface Param {
3052
+ /**
3053
+ * Condition to check for the parameter.
3054
+ */
3055
+ condition?: string | null;
3056
+
3057
+ /**
3058
+ * Name of the smart contract parameter.
3059
+ */
3060
+ name?: string | null;
3061
+
3062
+ /**
3063
+ * Value of the parameter.
3064
+ */
3065
+ value?: string | null;
3066
+ }
3067
+ }
3068
+
3069
+ export interface SnapshotProposal {
3070
+ /**
3071
+ * ID of the snapshot proposal.
3072
+ */
3073
+ id: string;
3074
+
3075
+ /**
3076
+ * Space associated with the snapshot proposal.
3077
+ */
3078
+ space: string;
3079
+ }
3080
+
3081
+ export interface StreakArray {
3082
+ /**
3083
+ * Reward amount for achieving the streak milestone.
3084
+ */
3085
+ streakAmount: number;
3086
+
3087
+ /**
3088
+ * Milestone required to achieve the streak.
3089
+ */
3090
+ streakMilestone: number;
3091
+ }
3092
+
3093
+ /**
3094
+ * Metadata for swap loyalty rules
3095
+ */
3096
+ export interface Swap {
3097
+ provider?: 'any' | 'relay' | 'lifi';
3098
+
3099
+ relayReferrerId?: string;
3100
+
3101
+ requireCrossChainSwap?: boolean;
3102
+
3103
+ swappedToChain?: 'any' | number | string;
3104
+
3105
+ swappedToTokens?: Array<Swap.SwappedToToken>;
3106
+
3107
+ tokenMode?: 'any' | 'specific';
3108
+
3109
+ trackTokenAmount?: boolean;
3110
+ }
3111
+
3112
+ export namespace Swap {
3113
+ export interface SwappedToToken {
3114
+ address: string;
3115
+
3116
+ chainId: string;
3117
+ }
3118
+ }
3119
+ }
3120
+ }
3121
+
3122
+ /**
3123
+ * Previous data of the rule before the edit
3124
+ */
3125
+ export interface PreviousData {
3126
+ /**
3127
+ * Unique identifier for the loyalty rule
3128
+ */
3129
+ id: string;
3130
+
3131
+ /**
3132
+ * Amount associated with the loyalty rule
3133
+ */
3134
+ amount: number | null;
3135
+
3136
+ /**
3137
+ * Timestamp when the loyalty rule was created
3138
+ */
3139
+ createdAt: string;
3140
+
3141
+ /**
3142
+ * Timestamp when the loyalty rule was deleted (if applicable)
3143
+ */
3144
+ deletedAt: string | null;
3145
+
3146
+ /**
3147
+ * Description of the loyalty rule
3148
+ */
3149
+ description: string;
3150
+
3151
+ /**
3152
+ * End time of the loyalty rule
3153
+ */
3154
+ endTime: string | null;
3155
+
3156
+ /**
3157
+ * Frequency of the loyalty rule
3158
+ */
3159
+ frequency: string;
3160
+
3161
+ /**
3162
+ * Name of the loyalty rule
3163
+ */
3164
+ name: string;
3165
+
3166
+ /**
3167
+ * Unique identifier for the organization
3168
+ */
3169
+ organizationId: string;
3170
+
3171
+ /**
3172
+ * Type of the reward
3173
+ */
3174
+ rewardType: 'points' | 'multiplier' | 'badge';
3175
+
3176
+ /**
3177
+ * Start time of the loyalty rule
3178
+ */
3179
+ startTime: string | null;
3180
+
3181
+ /**
3182
+ * Type of the loyalty rule
3183
+ */
3184
+ type: string;
3185
+
3186
+ /**
3187
+ * Timestamp when the loyalty rule was last updated
3188
+ */
3189
+ updatedAt: string;
3190
+
3191
+ /**
3192
+ * Unique identifier for the website
3193
+ */
3194
+ websiteId: string;
3195
+
3196
+ /**
3197
+ * Optional address of the collection
3198
+ */
3199
+ collectionAddress?: string;
3200
+
3201
+ /**
3202
+ * URL of the media associated with the loyalty rule
3203
+ */
3204
+ mediaUrl?: string | null;
3205
+
3206
+ /**
3207
+ * Optional metadata for the loyalty rule
3208
+ */
3209
+ metadata?: { [key: string]: PreviousData.Metadata };
3210
+ }
3211
+
3212
+ export namespace PreviousData {
3213
+ export interface Metadata {
3214
+ /**
3215
+ * Number of tokens per batch.
3216
+ */
3217
+ batchSize?: number | null;
3218
+
3219
+ /**
3220
+ * Text displayed on the action button.
3221
+ */
3222
+ buttonText?: string | null;
3223
+
3224
+ /**
3225
+ * Flag indicating if commenting is required.
3226
+ */
3227
+ checkComment?: boolean | null;
3228
+
3229
+ /**
3230
+ * Flag indicating if liking the post is required.
3231
+ */
3232
+ checkLike?: boolean | null;
3233
+
3234
+ /**
3235
+ * Flag indicating if reposting is required.
3236
+ */
3237
+ checkRepost?: boolean | null;
3238
+
3239
+ /**
3240
+ * Text to check in the Twitter post, username, or bio.
3241
+ */
3242
+ checkText?: string | Array<string> | null;
3243
+
3244
+ /**
3245
+ * Array of collections associated with the rule.
3246
+ */
3247
+ collection?: Array<Metadata.Collection>;
3248
+
3249
+ /**
3250
+ * Conditions for completing the profile.
3251
+ */
3252
+ completeProfileConditions?: { [key: string]: boolean } | null;
3253
+
3254
+ /**
3255
+ * Description of the external rule condition (only for external rules)
3256
+ */
3257
+ conditionDescription?: string;
3258
+
3259
+ /**
3260
+ * Object containing details for the call-to-action.
3261
+ */
3262
+ cta?: Metadata.Cta | null;
3263
+
3264
+ /**
3265
+ * API key for custom rewards integration.
3266
+ */
3267
+ customRewardsApiKey?: string;
3268
+
3269
+ /**
3270
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
3271
+ */
3272
+ directRpc?: boolean;
3273
+
3274
+ /**
3275
+ * Array of Discord servers, channels, and roles to join.
3276
+ */
3277
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
3278
+
3279
+ /**
3280
+ * Array of drip quests required to complete the rule.
3281
+ */
3282
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
3283
+
3284
+ /**
3285
+ * Flag indicating whether joining Discord servers is required.
3286
+ */
3287
+ enableJoinDiscordServers?: boolean | null;
3288
+
3289
+ /**
3290
+ * Flag indicating whether streaks are enabled.
3291
+ */
3292
+ enableStreaks?: boolean | null;
3293
+
3294
+ /**
3295
+ * Flag indicating whether the verified multiplier is enabled.
3296
+ */
3297
+ enableVerifiedMultiplier?: boolean;
3298
+
3299
+ /**
3300
+ * Type of ERC20 token for the loyalty rule.
3301
+ */
3302
+ erc20Type?: 'erc20' | 'native';
3303
+
3304
+ /**
3305
+ * Fill source of the order for the token sale
3306
+ */
3307
+ fillSource?: string;
3308
+
3309
+ /**
3310
+ * Percentage reward given to a user for their first referral.
3311
+ */
3312
+ firstReferralReward?: number | null;
3313
+
3314
+ /**
3315
+ * Flag indicating whether the fill source is included.
3316
+ */
3317
+ hasFillSource?: boolean;
3318
+
3319
+ /**
3320
+ * Indicates if the item has never been sold.
3321
+ */
3322
+ hasNeverSold?: boolean;
3323
+
3324
+ /**
3325
+ * Indicates if the full royalty has been paid for items.
3326
+ */
3327
+ hasPaidFullRoyalty?: boolean;
3328
+
3329
+ /**
3330
+ * Flag indicating if the sale currency is included.
3331
+ */
3332
+ hasSaleCurrency?: boolean;
3333
+
3334
+ /**
3335
+ * Indicates if the user has a verified Twitter account.
3336
+ */
3337
+ hasVerifiedTwitter?: boolean;
3338
+
3339
+ /**
3340
+ * URL of the image associated with the rule.
3341
+ */
3342
+ imageUrl?: string | null;
3343
+
3344
+ /**
3345
+ * If enabled, the first transaction done on the platform will complete this rule
3346
+ */
3347
+ isCheckInOnEveryTxn?: boolean;
3348
+
3349
+ /**
3350
+ * Indicates if the multiplier has been applied to rewards.
3351
+ */
3352
+ isMultiplierApplied?: boolean;
3353
+
3354
+ /**
3355
+ * Flag indicating if the rule is restricted to new users.
3356
+ */
3357
+ isRestrictedToNewUsers?: boolean;
3358
+
3359
+ /**
3360
+ * Flag indicating if rewards are applied retroactively.
3361
+ */
3362
+ isRetroactive?: boolean | null;
3363
+
3364
+ /**
3365
+ * Flag indicating if the token hold multiplier is applied.
3366
+ */
3367
+ isTokenHoldMultiplier?: boolean;
3368
+
3369
+ /**
3370
+ * Optional link associated with the metadata.
3371
+ */
3372
+ link?: string | null;
3373
+
3374
+ /**
3375
+ * Liquidity pool details.
3376
+ */
3377
+ liquidity?: Metadata.Liquidity;
3378
+
3379
+ /**
3380
+ * Maximum quantity constraint for token holding.
3381
+ */
3382
+ maxQty?: number | null;
3383
+
3384
+ /**
3385
+ * Minimum quantity constraint for token holding.
3386
+ */
3387
+ minQty?: number | null;
3388
+
3389
+ /**
3390
+ * Array of loyalty currency IDs used for multipliers.
3391
+ */
3392
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
3393
+
3394
+ /**
3395
+ * Flag indicating whether to include only known users.
3396
+ */
3397
+ onlyKnownUsers?: boolean;
3398
+
3399
+ /**
3400
+ * Flag indicating whether to include only native tokens.
3401
+ */
3402
+ onlyNative?: boolean;
3403
+
3404
+ /**
3405
+ * Flag indicating whether to include only non-listed items.
3406
+ */
3407
+ onlyNonListed?: boolean;
3408
+
3409
+ /**
3410
+ * Indicates if only existing users are rewarded.
3411
+ */
3412
+ onlyRewardExistingUser?: boolean;
3413
+
3414
+ /**
3415
+ * give points for only one token ownership per contract
3416
+ */
3417
+ onlyRewardSingleTokenOwnership?: boolean | null;
3418
+
3419
+ /**
3420
+ * Promotional code associated with the rule.
3421
+ */
3422
+ promoCode?: string;
3423
+
3424
+ /**
3425
+ * URL of the CSV file containing promo codes.
3426
+ */
3427
+ promoCodeCsvUrl?: string;
3428
+
3429
+ /**
3430
+ * Numbers of the promotional code to be generated.
3431
+ */
3432
+ promoCodeLength?: number | null;
3433
+
3434
+ /**
3435
+ * Type of the promotional code.
3436
+ */
3437
+ promoCodeType?: 'code' | 'csv' | 'generate';
3438
+
3439
+ /**
3440
+ * Array defining ranges and corresponding rewards.
3441
+ */
3442
+ range?: Array<Metadata.Range>;
3443
+
3444
+ /**
3445
+ * Object defining referral requirements.
3446
+ */
3447
+ referralRequirements?: Metadata.ReferralRequirements | null;
3448
+
3449
+ /**
3450
+ * Lump sum reward given to a referrer.
3451
+ */
3452
+ referrerReward?: number | null;
3453
+
3454
+ /**
3455
+ * Loyalty currency ID of the referrer reward.
3456
+ */
3457
+ referrerRewardLoyaltyCurrencyId?: string | null;
3458
+
3459
+ /**
3460
+ * Flag indicating if the post link is required.
3461
+ */
3462
+ requirePostLink?: boolean | null;
3463
+
3464
+ /**
3465
+ * Flag indicating if media metadata is required.
3466
+ */
3467
+ requirePostMediaLink?: boolean | null;
3468
+
3469
+ /**
3470
+ * Flag indicating if the rule can also reward badges per range.
3471
+ */
3472
+ rewardBadgePerRange?: boolean;
3473
+
3474
+ /**
3475
+ * Flag indicating if the reward is rewarded by batch.
3476
+ */
3477
+ rewardByBatch?: boolean | null;
3478
+
3479
+ /**
3480
+ * Criteria to evaluate the reward.
3481
+ */
3482
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
3483
+
3484
+ /**
3485
+ * Flag indicating if the reward is rewarded per action.
3486
+ */
3487
+ rewardPerAction?: boolean | null;
3488
+
3489
+ /**
3490
+ * Flag indicating if rewards are given per impression.
3491
+ */
3492
+ rewardPerImpression?: boolean | null;
3493
+
3494
+ /**
3495
+ * Flag indicating if the rule should reward based on value of traded tokens
3496
+ * instead of count.
3497
+ */
3498
+ rewardPerValue?: boolean;
3499
+
3500
+ /**
3501
+ * Wallet address of the user can only be used if userId is not provided
3502
+ */
3503
+ royaltyAddress?: string;
3504
+
3505
+ /**
3506
+ * Royalty percentage of the item.
3507
+ */
3508
+ royaltyPercentage?: number;
3509
+
3510
+ /**
3511
+ * Currency associated with sales.
3512
+ */
3513
+ saleCurrency?: string;
3514
+
3515
+ /**
3516
+ * Percentage reward given for a second-level referral.
3517
+ */
3518
+ secondReferralReward?: number | null;
3519
+
3520
+ /**
3521
+ * Flag indicating if the multiplier is skipped.
3522
+ */
3523
+ skipMultiplier?: boolean | null;
3524
+
3525
+ /**
3526
+ * Object containing details of the associated smart contract.
3527
+ */
3528
+ smartContract?: Metadata.SmartContract;
3529
+
3530
+ /**
3531
+ * Array of snapshot proposals for the rule.
3532
+ */
3533
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
3534
+
3535
+ /**
3536
+ * Social media platform associated with the rule.
3537
+ */
3538
+ socialPlatform?:
3539
+ | 'Custom'
3540
+ | 'Discord'
3541
+ | 'EpicGames'
3542
+ | 'Instagram'
3543
+ | 'Steam'
3544
+ | 'Telegram'
3545
+ | 'TikTok'
3546
+ | 'Twitch'
3547
+ | 'X(Twitter)'
3548
+ | 'YouTube'
3549
+ | 'Google'
3550
+ | null;
3551
+
3552
+ /**
3553
+ * URL of the social platform's logo.
3554
+ */
3555
+ socialPlatformLogo?: string | null;
3556
+
3557
+ /**
3558
+ * Name of the social platform.
3559
+ */
3560
+ socialPlatformName?: string | null;
3561
+
3562
+ /**
3563
+ * ID of the Steam app.
3564
+ */
3565
+ steamAppId?: string | null;
3566
+
3567
+ /**
3568
+ * Array of streak milestones and corresponding rewards.
3569
+ */
3570
+ streakArray?: Array<Metadata.StreakArray> | null;
3571
+
3572
+ /**
3573
+ * Metadata for swap loyalty rules
3574
+ */
3575
+ swap?: Metadata.Swap;
3576
+
3577
+ /**
3578
+ * ID of the Telegram channel.
3579
+ */
3580
+ telegramChannelId?: string | null;
3581
+
3582
+ /**
3583
+ * Time delay in seconds to verify actions.
3584
+ */
3585
+ timeDelayToVerifySeconds?: string | number | null;
3586
+
3587
+ /**
3588
+ * Flag indicating if all contracts are tracked.
3589
+ */
3590
+ trackAllContracts?: boolean | null;
3591
+
3592
+ /**
3593
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
3594
+ * completed once the progress is 100%.
3595
+ */
3596
+ trackProgress?: boolean | null;
3597
+
3598
+ /**
3599
+ * URL of the associated Twitter account.
3600
+ */
3601
+ twitterAccountUrl?: string;
3602
+
3603
+ /**
3604
+ * Hashtag associated with the Twitter post.
3605
+ */
3606
+ twitterHashtag?: string;
3607
+
3608
+ /**
3609
+ * URL of the associated Twitter post.
3610
+ */
3611
+ twitterPostUrl?: string;
3612
+
3613
+ /**
3614
+ * Unique identifier of the Twitter user.
3615
+ */
3616
+ twitterUserId?: string;
3617
+
3618
+ /**
3619
+ * Twitter username of the user.
3620
+ */
3621
+ twitterUsername?: string;
3622
+
3623
+ /**
3624
+ * Minimum length of the verification text.
3625
+ */
3626
+ verificationTextMinimumLength?: number | null;
3627
+
3628
+ /**
3629
+ * Multiplier applied to rewards for verified users.
3630
+ */
3631
+ verifiedMultiplier?: number | null;
3632
+
3633
+ /**
3634
+ * Placeholder text for verification input fields.
3635
+ */
3636
+ verifyPlaceHolderText?: string | null;
3637
+
3638
+ /**
3639
+ * Type of wallet associated with the rule.
3640
+ */
3641
+ walletType?:
3642
+ | 'evm'
3643
+ | 'solana'
3644
+ | 'imx'
3645
+ | 'sui'
3646
+ | 'ton'
3647
+ | 'cosmos'
3648
+ | 'ultra'
3649
+ | 'agw'
3650
+ | 'flow_cadence'
3651
+ | 'substrate'
3652
+ | null;
3653
+
3654
+ /**
3655
+ * ID of the Youtube channel.
3656
+ */
3657
+ youtubeChannelId?: string | null;
3658
+
3659
+ /**
3660
+ * ID of the Youtube video.
3661
+ */
3662
+ youtubeVideoId?: string | null;
3663
+ }
3664
+
3665
+ export namespace Metadata {
3666
+ export interface Collection {
3667
+ /**
3668
+ * Blockchain address of the collection.
3669
+ */
3670
+ address?: string;
3671
+
3672
+ /**
3673
+ * Multiplier applied to the rewards for this collection.
3674
+ */
3675
+ multiplier?: number;
3676
+
3677
+ /**
3678
+ * Blockchain network of the collection.
3679
+ */
3680
+ network?:
3681
+ | 'abstract'
3682
+ | 'abstractTestnet'
3683
+ | 'apechain'
3684
+ | 'arbitrum'
3685
+ | 'avalanche'
3686
+ | 'avalancheFuji'
3687
+ | 'base'
3688
+ | 'baseSepolia'
3689
+ | 'berachain'
3690
+ | 'berachainArtio'
3691
+ | 'berachainBepolia'
3692
+ | 'binance'
3693
+ | 'bscTestnet'
3694
+ | 'campTestnet'
3695
+ | 'fantom'
3696
+ | 'fantomTestnet'
3697
+ | 'flowMainnet'
3698
+ | 'mainnet'
3699
+ | 'nexusTestnet'
3700
+ | 'optimism'
3701
+ | 'polygon'
3702
+ | 'polygon_mumbai'
3703
+ | 'skaleNebula'
3704
+ | 'skaleEuropa'
3705
+ | 'skaleCalypso'
3706
+ | 'solana'
3707
+ | 'sophon'
3708
+ | 'sophonTestnet'
3709
+ | 'sui'
3710
+ | 'superseed'
3711
+ | 'superseedSepolia'
3712
+ | 'vanar'
3713
+ | 'xai'
3714
+ | 'zksync'
3715
+ | 'coti'
3716
+ | 'cotiTestnet'
3717
+ | 'morph'
3718
+ | 'morphTestnet'
3719
+ | 'morphHolesky'
3720
+ | 'ultra'
3721
+ | 'ultraTestnet'
3722
+ | 'nitrograph'
3723
+ | 'sepolia'
3724
+ | 'optimism_sepolia'
3725
+ | 'arbitrumSepolia'
3726
+ | 'goerli'
3727
+ | 'optimism_goerli'
3728
+ | 'arbitrumGoerli'
3729
+ | 'basecamp'
3730
+ | 'somnia'
3731
+ | 'zkverify'
3732
+ | 'polkadot'
3733
+ | 'kusama'
3734
+ | 'flow_cadence';
3735
+ }
3736
+
3737
+ /**
3738
+ * Object containing details for the call-to-action.
3739
+ */
3740
+ export interface Cta {
3741
+ /**
3742
+ * Link for the call-to-action.
3743
+ */
3744
+ href?: string | null;
3745
+
3746
+ /**
3747
+ * Label for the call-to-action.
3748
+ */
3749
+ label?: string | null;
3750
+ }
3751
+
3752
+ export interface DiscordServersToJoin {
3753
+ /**
3754
+ * ID of the Discord server to join.
3755
+ */
3756
+ id?: string;
3757
+
3758
+ /**
3759
+ * Array of Discord channels to join.
3760
+ */
3761
+ channels?: Array<DiscordServersToJoin.Channel>;
3762
+
3763
+ /**
3764
+ * Array of roles to assign in the Discord server.
3765
+ */
3766
+ roles?: Array<DiscordServersToJoin.Role>;
3767
+ }
3768
+
3769
+ export namespace DiscordServersToJoin {
3770
+ export interface Channel {
3771
+ /**
3772
+ * ID of the Discord channel.
3773
+ */
3774
+ id?: string;
3775
+
3776
+ /**
3777
+ * Array of emojis used in the channel.
3778
+ */
3779
+ emojis?: Array<Channel.Emoji>;
3780
+
3781
+ /**
3782
+ * Phrase of text to be present in the discord message
3783
+ */
3784
+ text?: string;
3785
+ }
3786
+
3787
+ export namespace Channel {
3788
+ export interface Emoji {
3789
+ /**
3790
+ * ID of the emoji used in the channel.
3791
+ */
3792
+ id?: string;
3793
+ }
3794
+ }
3795
+
3796
+ export interface Role {
3797
+ /**
3798
+ * ID of the role in the Discord server.
3799
+ */
3800
+ id: string;
3801
+ }
3802
+ }
3803
+
3804
+ export interface DripQuestsToComplete {
3805
+ /**
3806
+ * ID of the drip quest to complete.
3807
+ */
3808
+ id: string;
3809
+ }
3810
+
3811
+ /**
3812
+ * Liquidity pool details.
3813
+ */
3814
+ export interface Liquidity {
3815
+ /**
3816
+ * Calculation type of the liquidity pool.
3817
+ */
3818
+ calculationType?: 'fixed' | 'custom';
3819
+
3820
+ /**
3821
+ * Custom function to calculate the the reward amount based on the liquidity
3822
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
3823
+ * USD.
3824
+ */
3825
+ customFunction?: string;
3826
+
3827
+ /**
3828
+ * Liquidity provided per day in USD
3829
+ */
3830
+ liquidityPerDay?: number;
3831
+
3832
+ /**
3833
+ * Blockchain network of the liquidity pool.
3834
+ */
3835
+ network?:
3836
+ | 'abstract'
3837
+ | 'abstractTestnet'
3838
+ | 'apechain'
3839
+ | 'arbitrum'
3840
+ | 'avalanche'
3841
+ | 'avalancheFuji'
3842
+ | 'base'
3843
+ | 'baseSepolia'
3844
+ | 'berachain'
3845
+ | 'berachainArtio'
3846
+ | 'berachainBepolia'
3847
+ | 'binance'
3848
+ | 'bscTestnet'
3849
+ | 'campTestnet'
3850
+ | 'fantom'
3851
+ | 'fantomTestnet'
3852
+ | 'flowMainnet'
3853
+ | 'mainnet'
3854
+ | 'nexusTestnet'
3855
+ | 'optimism'
3856
+ | 'polygon'
3857
+ | 'polygon_mumbai'
3858
+ | 'skaleNebula'
3859
+ | 'skaleEuropa'
3860
+ | 'skaleCalypso'
3861
+ | 'solana'
3862
+ | 'sophon'
3863
+ | 'sophonTestnet'
3864
+ | 'sui'
3865
+ | 'superseed'
3866
+ | 'superseedSepolia'
3867
+ | 'vanar'
3868
+ | 'xai'
3869
+ | 'zksync'
3870
+ | 'coti'
3871
+ | 'cotiTestnet'
3872
+ | 'morph'
3873
+ | 'morphTestnet'
3874
+ | 'morphHolesky'
3875
+ | 'ultra'
3876
+ | 'ultraTestnet'
3877
+ | 'nitrograph'
3878
+ | 'sepolia'
3879
+ | 'optimism_sepolia'
3880
+ | 'arbitrumSepolia'
3881
+ | 'goerli'
3882
+ | 'optimism_goerli'
3883
+ | 'arbitrumGoerli'
3884
+ | 'basecamp'
3885
+ | 'somnia'
3886
+ | 'zkverify'
3887
+ | 'polkadot'
3888
+ | 'kusama'
3889
+ | 'flow_cadence';
3890
+
3891
+ /**
3892
+ * Indicates if only in-range liquidity is rewarded.
3893
+ */
3894
+ onlyRewardInRangeLiquidity?: boolean;
3895
+
3896
+ /**
3897
+ * Array of liquidity pools associated with the rule.
3898
+ */
3899
+ pools?: Array<Liquidity.Pool>;
3900
+
3901
+ /**
3902
+ * Protocol of the liquidity pool.
3903
+ */
3904
+ protocol?: string;
3905
+ }
3906
+
3907
+ export namespace Liquidity {
3908
+ export interface Pool {
3909
+ /**
3910
+ * Unique identifier of the liquidity pool.
3911
+ */
3912
+ id: string;
3913
+ }
3914
+ }
3915
+
3916
+ export interface Range {
3917
+ /**
3918
+ * Reward amount for this range.
3919
+ */
3920
+ amount: number;
3921
+
3922
+ /**
3923
+ * End value of the range.
3924
+ */
3925
+ endRange: number;
3926
+
3927
+ /**
3928
+ * Start value of the range.
3929
+ */
3930
+ startRange: number;
3931
+
3932
+ /**
3933
+ * ID of the loyalty badge for this range.
3934
+ */
3935
+ loyaltyBadgeId?: string;
3936
+
3937
+ /**
3938
+ * Amount of the loyalty multiplier for this range.
3939
+ */
3940
+ loyaltyMultiplierAmount?: number;
3941
+ }
3942
+
3943
+ /**
3944
+ * Object defining referral requirements.
3945
+ */
3946
+ export interface ReferralRequirements {
3947
+ /**
3948
+ * Flag indicating if achieving points is required.
3949
+ */
3950
+ achievePoints?: boolean | null;
3951
+
3952
+ /**
3953
+ * Flag indicating if completing the profile is required.
3954
+ */
3955
+ completeProfile?: boolean | null;
3956
+
3957
+ /**
3958
+ * Flag indicating if connecting Discord is required.
3959
+ */
3960
+ connectDiscord?: boolean | null;
3961
+
3962
+ /**
3963
+ * Flag indicating if connecting email is required.
3964
+ */
3965
+ connectEmail?: boolean | null;
3966
+
3967
+ /**
3968
+ * Flag indicating if connecting Twitter is required.
3969
+ */
3970
+ connectTwitter?: boolean | null;
3971
+
3972
+ points?: ReferralRequirements.Points | null;
3973
+ }
3974
+
3975
+ export namespace ReferralRequirements {
3976
+ export interface Points {
3977
+ /**
3978
+ * Points required for referral.
3979
+ */
3980
+ amount?: number | null;
3981
+
3982
+ /**
3983
+ * ID of the loyalty currency for referral.
3984
+ */
3985
+ loyaltyCurrecyId?: string | null;
3986
+ }
3987
+ }
3988
+
3989
+ /**
3990
+ * Object containing details of the associated smart contract.
3991
+ */
3992
+ export interface SmartContract {
3993
+ /**
3994
+ * Mapping of addresses for the smart contract.
3995
+ */
3996
+ addressMapping?: string | null;
3997
+
3998
+ /**
3999
+ * Object containing details of the amount multiplier from the event.
4000
+ */
4001
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
4002
+
4003
+ /**
4004
+ * ID of the smart contract.
4005
+ */
4006
+ contractId?: string | null;
4007
+
4008
+ /**
4009
+ * Criteria to evaluate the smart contract event.
4010
+ */
4011
+ criteria?: 'everyEvent' | 'byParameter' | null;
4012
+
4013
+ /**
4014
+ * Event emitted by the smart contract.
4015
+ */
4016
+ event?: string | null;
4017
+
4018
+ /**
4019
+ * Array of parameters for the smart contract.
4020
+ */
4021
+ params?: Array<SmartContract.Param> | null;
4022
+
4023
+ /**
4024
+ * Type of the smart contract interaction.
4025
+ */
4026
+ type?: 'function' | 'event' | null;
4027
+ }
4028
+
4029
+ export namespace SmartContract {
4030
+ /**
4031
+ * Object containing details of the amount multiplier from the event.
4032
+ */
4033
+ export interface AmountMultiplier {
4034
+ /**
4035
+ * Mapping of the value for the smart contract.
4036
+ */
4037
+ valueMapping?: string | null;
4038
+ }
4039
+
4040
+ export interface Param {
4041
+ /**
4042
+ * Condition to check for the parameter.
4043
+ */
4044
+ condition?: string | null;
4045
+
4046
+ /**
4047
+ * Name of the smart contract parameter.
4048
+ */
4049
+ name?: string | null;
4050
+
4051
+ /**
4052
+ * Value of the parameter.
4053
+ */
4054
+ value?: string | null;
4055
+ }
4056
+ }
4057
+
4058
+ export interface SnapshotProposal {
4059
+ /**
4060
+ * ID of the snapshot proposal.
4061
+ */
4062
+ id: string;
4063
+
4064
+ /**
4065
+ * Space associated with the snapshot proposal.
4066
+ */
4067
+ space: string;
4068
+ }
4069
+
4070
+ export interface StreakArray {
4071
+ /**
4072
+ * Reward amount for achieving the streak milestone.
4073
+ */
4074
+ streakAmount: number;
4075
+
4076
+ /**
4077
+ * Milestone required to achieve the streak.
4078
+ */
4079
+ streakMilestone: number;
4080
+ }
4081
+
4082
+ /**
4083
+ * Metadata for swap loyalty rules
4084
+ */
4085
+ export interface Swap {
4086
+ provider?: 'any' | 'relay' | 'lifi';
4087
+
4088
+ relayReferrerId?: string;
4089
+
4090
+ requireCrossChainSwap?: boolean;
4091
+
4092
+ swappedToChain?: 'any' | number | string;
4093
+
4094
+ swappedToTokens?: Array<Swap.SwappedToToken>;
4095
+
4096
+ tokenMode?: 'any' | 'specific';
4097
+
4098
+ trackTokenAmount?: boolean;
4099
+ }
4100
+
4101
+ export namespace Swap {
4102
+ export interface SwappedToToken {
4103
+ address: string;
4104
+
4105
+ chainId: string;
4106
+ }
4107
+ }
4108
+ }
379
4109
  }
380
4110
  }
381
4111