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

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