@snagsolutions/sdk 0.1.0-alpha.18 → 0.1.0-alpha.180

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