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

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