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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/CHANGELOG.md +1552 -0
  2. package/README.md +13 -23
  3. package/core.d.ts +19 -5
  4. package/core.d.ts.map +1 -1
  5. package/core.js +24 -17
  6. package/core.js.map +1 -1
  7. package/core.mjs +24 -17
  8. package/core.mjs.map +1 -1
  9. package/index.d.mts +7 -4
  10. package/index.d.ts +7 -4
  11. package/index.d.ts.map +1 -1
  12. package/index.js +8 -4
  13. package/index.js.map +1 -1
  14. package/index.mjs +8 -4
  15. package/index.mjs.map +1 -1
  16. package/package.json +4 -5
  17. package/resource.d.ts +1 -1
  18. package/resource.d.ts.map +1 -1
  19. package/resource.js.map +1 -1
  20. package/resource.mjs.map +1 -1
  21. package/resources/assets.d.ts +16 -2
  22. package/resources/assets.d.ts.map +1 -1
  23. package/resources/assets.js +8 -0
  24. package/resources/assets.js.map +1 -1
  25. package/resources/assets.mjs +8 -0
  26. package/resources/assets.mjs.map +1 -1
  27. package/resources/auctions/auctions.d.ts +343 -0
  28. package/resources/auctions/auctions.d.ts.map +1 -0
  29. package/resources/auctions/auctions.js +72 -0
  30. package/resources/auctions/auctions.js.map +1 -0
  31. package/resources/auctions/auctions.mjs +45 -0
  32. package/resources/auctions/auctions.mjs.map +1 -0
  33. package/resources/auctions/index.d.ts +3 -0
  34. package/resources/auctions/index.d.ts.map +1 -0
  35. package/resources/auctions/index.js +9 -0
  36. package/resources/auctions/index.js.map +1 -0
  37. package/resources/auctions/index.mjs +4 -0
  38. package/resources/auctions/index.mjs.map +1 -0
  39. package/resources/auctions/website-user-attributes/index.d.ts +3 -0
  40. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
  41. package/resources/auctions/website-user-attributes/index.js +9 -0
  42. package/resources/auctions/website-user-attributes/index.js.map +1 -0
  43. package/resources/auctions/website-user-attributes/index.mjs +4 -0
  44. package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
  45. package/resources/auctions/website-user-attributes/values.d.ts +126 -0
  46. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  47. package/resources/auctions/website-user-attributes/values.js +49 -0
  48. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  49. package/resources/auctions/website-user-attributes/values.mjs +45 -0
  50. package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
  51. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +136 -0
  52. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
  53. package/resources/auctions/website-user-attributes/website-user-attributes.js +76 -0
  54. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
  55. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +49 -0
  56. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
  57. package/resources/auctions/website-user-attributes.d.ts +2 -0
  58. package/resources/auctions/website-user-attributes.d.ts.map +1 -0
  59. package/resources/auctions/website-user-attributes.js +19 -0
  60. package/resources/auctions/website-user-attributes.js.map +1 -0
  61. package/resources/auctions/website-user-attributes.mjs +3 -0
  62. package/resources/auctions/website-user-attributes.mjs.map +1 -0
  63. package/resources/auctions.d.ts +1 -133
  64. package/resources/auctions.d.ts.map +1 -1
  65. package/resources/auctions.js +15 -22
  66. package/resources/auctions.js.map +1 -1
  67. package/resources/auctions.mjs +1 -20
  68. package/resources/auctions.mjs.map +1 -1
  69. package/resources/auth.d.ts +17 -4
  70. package/resources/auth.d.ts.map +1 -1
  71. package/resources/auth.js.map +1 -1
  72. package/resources/auth.mjs.map +1 -1
  73. package/resources/index.d.ts +2 -2
  74. package/resources/index.d.ts.map +1 -1
  75. package/resources/index.js +1 -1
  76. package/resources/index.js.map +1 -1
  77. package/resources/index.mjs +1 -1
  78. package/resources/index.mjs.map +1 -1
  79. package/resources/loyalty/account-streaks.d.ts +81 -0
  80. package/resources/loyalty/account-streaks.d.ts.map +1 -0
  81. package/resources/loyalty/account-streaks.js +24 -0
  82. package/resources/loyalty/account-streaks.js.map +1 -0
  83. package/resources/loyalty/account-streaks.mjs +20 -0
  84. package/resources/loyalty/account-streaks.mjs.map +1 -0
  85. package/resources/loyalty/accounts.d.ts +60 -16
  86. package/resources/loyalty/accounts.d.ts.map +1 -1
  87. package/resources/loyalty/accounts.js +14 -0
  88. package/resources/loyalty/accounts.js.map +1 -1
  89. package/resources/loyalty/accounts.mjs +14 -0
  90. package/resources/loyalty/accounts.mjs.map +1 -1
  91. package/resources/loyalty/badges.d.ts +666 -135
  92. package/resources/loyalty/badges.d.ts.map +1 -1
  93. package/resources/loyalty/badges.js +19 -1
  94. package/resources/loyalty/badges.js.map +1 -1
  95. package/resources/loyalty/badges.mjs +19 -1
  96. package/resources/loyalty/badges.mjs.map +1 -1
  97. package/resources/loyalty/currencies.d.ts +19 -0
  98. package/resources/loyalty/currencies.d.ts.map +1 -1
  99. package/resources/loyalty/currencies.js +19 -0
  100. package/resources/loyalty/currencies.js.map +1 -1
  101. package/resources/loyalty/currencies.mjs +19 -0
  102. package/resources/loyalty/currencies.mjs.map +1 -1
  103. package/resources/loyalty/index.d.ts +4 -4
  104. package/resources/loyalty/index.d.ts.map +1 -1
  105. package/resources/loyalty/index.js +5 -5
  106. package/resources/loyalty/index.js.map +1 -1
  107. package/resources/loyalty/index.mjs +3 -3
  108. package/resources/loyalty/index.mjs.map +1 -1
  109. package/resources/loyalty/loyalty.d.ts +11 -11
  110. package/resources/loyalty/loyalty.d.ts.map +1 -1
  111. package/resources/loyalty/loyalty.js +6 -6
  112. package/resources/loyalty/loyalty.js.map +1 -1
  113. package/resources/loyalty/loyalty.mjs +7 -7
  114. package/resources/loyalty/loyalty.mjs.map +1 -1
  115. package/resources/loyalty/multipliers.d.ts +39 -2
  116. package/resources/loyalty/multipliers.d.ts.map +1 -1
  117. package/resources/loyalty/multipliers.js +23 -0
  118. package/resources/loyalty/multipliers.js.map +1 -1
  119. package/resources/loyalty/multipliers.mjs +23 -0
  120. package/resources/loyalty/multipliers.mjs.map +1 -1
  121. package/resources/loyalty/questions-responses.d.ts +55 -4
  122. package/resources/loyalty/questions-responses.d.ts.map +1 -1
  123. package/resources/loyalty/questions-responses.js +9 -0
  124. package/resources/loyalty/questions-responses.js.map +1 -1
  125. package/resources/loyalty/questions-responses.mjs +9 -0
  126. package/resources/loyalty/questions-responses.mjs.map +1 -1
  127. package/resources/loyalty/questions.d.ts +52 -6
  128. package/resources/loyalty/questions.d.ts.map +1 -1
  129. package/resources/loyalty/questions.js +31 -0
  130. package/resources/loyalty/questions.js.map +1 -1
  131. package/resources/loyalty/questions.mjs +31 -0
  132. package/resources/loyalty/questions.mjs.map +1 -1
  133. package/resources/loyalty/rule-edits.d.ts +2630 -8
  134. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  135. package/resources/loyalty/rule-edits.js +14 -0
  136. package/resources/loyalty/rule-edits.js.map +1 -1
  137. package/resources/loyalty/rule-edits.mjs +14 -0
  138. package/resources/loyalty/rule-edits.mjs.map +1 -1
  139. package/resources/loyalty/rule-groups.d.ts +279 -64
  140. package/resources/loyalty/rule-groups.d.ts.map +1 -1
  141. package/resources/loyalty/rule-groups.js +38 -2
  142. package/resources/loyalty/rule-groups.js.map +1 -1
  143. package/resources/loyalty/rule-groups.mjs +38 -2
  144. package/resources/loyalty/rule-groups.mjs.map +1 -1
  145. package/resources/loyalty/rules.d.ts +1902 -269
  146. package/resources/loyalty/rules.d.ts.map +1 -1
  147. package/resources/loyalty/rules.js +40 -9
  148. package/resources/loyalty/rules.js.map +1 -1
  149. package/resources/loyalty/rules.mjs +40 -9
  150. package/resources/loyalty/rules.mjs.map +1 -1
  151. package/resources/loyalty/transactions/index.d.ts +3 -0
  152. package/resources/loyalty/transactions/index.d.ts.map +1 -0
  153. package/resources/loyalty/transactions/index.js +9 -0
  154. package/resources/loyalty/transactions/index.js.map +1 -0
  155. package/resources/loyalty/transactions/index.mjs +4 -0
  156. package/resources/loyalty/transactions/index.mjs.map +1 -0
  157. package/resources/loyalty/transactions/rule-statuses.d.ts +120 -0
  158. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  159. package/resources/loyalty/transactions/rule-statuses.js +30 -0
  160. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  161. package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
  162. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  163. package/resources/loyalty/transactions/transactions.d.ts +410 -0
  164. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  165. package/resources/loyalty/transactions/transactions.js +76 -0
  166. package/resources/loyalty/transactions/transactions.js.map +1 -0
  167. package/resources/loyalty/transactions/transactions.mjs +49 -0
  168. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  169. package/resources/loyalty/transactions.d.ts +1 -248
  170. package/resources/loyalty/transactions.d.ts.map +1 -1
  171. package/resources/loyalty/transactions.js +15 -18
  172. package/resources/loyalty/transactions.js.map +1 -1
  173. package/resources/loyalty/transactions.mjs +1 -16
  174. package/resources/loyalty/transactions.mjs.map +1 -1
  175. package/resources/minting.d.ts +5 -5
  176. package/resources/minting.d.ts.map +1 -1
  177. package/resources/referral/referral.d.ts +11 -3
  178. package/resources/referral/referral.d.ts.map +1 -1
  179. package/resources/referral/referral.js +11 -5
  180. package/resources/referral/referral.js.map +1 -1
  181. package/resources/referral/referral.mjs +11 -5
  182. package/resources/referral/referral.mjs.map +1 -1
  183. package/resources/referral/users.d.ts +29 -3
  184. package/resources/referral/users.d.ts.map +1 -1
  185. package/resources/referral/users.js +12 -4
  186. package/resources/referral/users.js.map +1 -1
  187. package/resources/referral/users.mjs +12 -4
  188. package/resources/referral/users.mjs.map +1 -1
  189. package/resources/users/index.d.ts +1 -1
  190. package/resources/users/index.d.ts.map +1 -1
  191. package/resources/users/index.js.map +1 -1
  192. package/resources/users/index.mjs.map +1 -1
  193. package/resources/users/metadatas.d.ts +34 -3
  194. package/resources/users/metadatas.d.ts.map +1 -1
  195. package/resources/users/metadatas.js.map +1 -1
  196. package/resources/users/metadatas.mjs.map +1 -1
  197. package/resources/users/users.d.ts +184 -35
  198. package/resources/users/users.d.ts.map +1 -1
  199. package/resources/users/users.js +58 -1
  200. package/resources/users/users.js.map +1 -1
  201. package/resources/users/users.mjs +58 -1
  202. package/resources/users/users.mjs.map +1 -1
  203. package/resources/websites/website-collections.d.ts +22 -1
  204. package/resources/websites/website-collections.d.ts.map +1 -1
  205. package/resources/websites/website-collections.js +21 -0
  206. package/resources/websites/website-collections.js.map +1 -1
  207. package/resources/websites/website-collections.mjs +21 -0
  208. package/resources/websites/website-collections.mjs.map +1 -1
  209. package/resources/websites/website-user-roles.d.ts +24 -1
  210. package/resources/websites/website-user-roles.d.ts.map +1 -1
  211. package/resources/websites/website-user-roles.js +23 -0
  212. package/resources/websites/website-user-roles.js.map +1 -1
  213. package/resources/websites/website-user-roles.mjs +23 -0
  214. package/resources/websites/website-user-roles.mjs.map +1 -1
  215. package/resources/websites/websites.d.ts +12 -0
  216. package/resources/websites/websites.d.ts.map +1 -1
  217. package/resources/websites/websites.js +7 -0
  218. package/resources/websites/websites.js.map +1 -1
  219. package/resources/websites/websites.mjs +7 -0
  220. package/resources/websites/websites.mjs.map +1 -1
  221. package/src/core.ts +39 -16
  222. package/src/index.ts +31 -2
  223. package/src/resource.ts +1 -1
  224. package/src/resources/assets.ts +18 -3
  225. package/src/resources/auctions/auctions.ts +528 -0
  226. package/src/resources/auctions/index.ts +19 -0
  227. package/src/resources/auctions/website-user-attributes/index.ts +18 -0
  228. package/src/resources/auctions/website-user-attributes/values.ts +170 -0
  229. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +212 -0
  230. package/src/resources/auctions/website-user-attributes.ts +3 -0
  231. package/src/resources/auctions.ts +1 -207
  232. package/src/resources/auth.ts +21 -5
  233. package/src/resources/index.ts +12 -1
  234. package/src/resources/loyalty/account-streaks.ts +110 -0
  235. package/src/resources/loyalty/accounts.ts +65 -18
  236. package/src/resources/loyalty/badges.ts +790 -146
  237. package/src/resources/loyalty/currencies.ts +19 -0
  238. package/src/resources/loyalty/index.ts +19 -3
  239. package/src/resources/loyalty/loyalty.ts +39 -15
  240. package/src/resources/loyalty/multipliers.ts +43 -4
  241. package/src/resources/loyalty/questions-responses.ts +64 -4
  242. package/src/resources/loyalty/questions.ts +56 -6
  243. package/src/resources/loyalty/rule-edits.ts +3830 -100
  244. package/src/resources/loyalty/rule-groups.ts +491 -76
  245. package/src/resources/loyalty/rules.ts +2986 -310
  246. package/src/resources/loyalty/transactions/index.ts +18 -0
  247. package/src/resources/loyalty/transactions/rule-statuses.ts +178 -0
  248. package/src/resources/loyalty/transactions/transactions.ts +683 -0
  249. package/src/resources/loyalty/transactions.ts +1 -440
  250. package/src/resources/minting.ts +25 -5
  251. package/src/resources/referral/referral.ts +13 -11
  252. package/src/resources/referral/users.ts +43 -5
  253. package/src/resources/users/index.ts +4 -0
  254. package/src/resources/users/metadatas.ts +57 -3
  255. package/src/resources/users/users.ts +249 -38
  256. package/src/resources/websites/website-collections.ts +42 -1
  257. package/src/resources/websites/website-user-roles.ts +25 -1
  258. package/src/resources/websites/websites.ts +12 -0
  259. package/src/version.ts +1 -1
  260. package/version.d.ts +1 -1
  261. package/version.d.ts.map +1 -1
  262. package/version.js +1 -1
  263. package/version.js.map +1 -1
  264. package/version.mjs +1 -1
  265. package/version.mjs.map +1 -1
  266. package/resources/loyalty/rule-chains.d.ts +0 -34
  267. package/resources/loyalty/rule-chains.d.ts.map +0 -1
  268. package/resources/loyalty/rule-chains.js +0 -15
  269. package/resources/loyalty/rule-chains.js.map +0 -1
  270. package/resources/loyalty/rule-chains.mjs +0 -11
  271. package/resources/loyalty/rule-chains.mjs.map +0 -1
  272. package/src/resources/loyalty/rule-chains.ts +0 -45
@@ -3,10 +3,24 @@ import * as Core from "../../core.js";
3
3
  export declare class RuleEdits extends APIResource {
4
4
  /**
5
5
  * Retrieve configured loyalty rule edits with optional pagination and filters
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const ruleEdits = await client.loyalty.ruleEdits.list({
10
+ * loyaltyRuleId: true,
11
+ * });
12
+ * ```
6
13
  */
7
14
  list(query: RuleEditListParams, options?: Core.RequestOptions): Core.APIPromise<RuleEditListResponse>;
8
15
  /**
9
16
  * Restore a loyalty rule from a rule edit
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const response = await client.loyalty.ruleEdits.restore(
21
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
22
+ * );
23
+ * ```
10
24
  */
11
25
  restore(id: string, body?: RuleEditRestoreParams | null | undefined, options?: Core.RequestOptions): Core.APIPromise<RuleEditRestoreResponse>;
12
26
  }
@@ -69,7 +83,7 @@ export declare namespace RuleEditListResponse {
69
83
  /**
70
84
  * Amount associated with the loyalty rule
71
85
  */
72
- amount: number;
86
+ amount: number | null;
73
87
  /**
74
88
  * Timestamp when the loyalty rule was created
75
89
  */
@@ -78,14 +92,34 @@ export declare namespace RuleEditListResponse {
78
92
  * Timestamp when the loyalty rule was deleted (if applicable)
79
93
  */
80
94
  deletedAt: string | null;
95
+ /**
96
+ * Description of the loyalty rule
97
+ */
98
+ description: string;
99
+ /**
100
+ * End time of the loyalty rule
101
+ */
102
+ endTime: string | null;
81
103
  /**
82
104
  * Frequency of the loyalty rule
83
105
  */
84
106
  frequency: string;
107
+ /**
108
+ * Name of the loyalty rule
109
+ */
110
+ name: string;
85
111
  /**
86
112
  * Unique identifier for the organization
87
113
  */
88
114
  organizationId: string;
115
+ /**
116
+ * Type of the reward
117
+ */
118
+ rewardType: 'points' | 'multiplier' | 'badge';
119
+ /**
120
+ * Start time of the loyalty rule
121
+ */
122
+ startTime: string | null;
89
123
  /**
90
124
  * Type of the loyalty rule
91
125
  */
@@ -102,10 +136,642 @@ export declare namespace RuleEditListResponse {
102
136
  * Optional address of the collection
103
137
  */
104
138
  collectionAddress?: string;
139
+ /**
140
+ * URL of the media associated with the loyalty rule
141
+ */
142
+ mediaUrl?: string | null;
105
143
  /**
106
144
  * Optional metadata for the loyalty rule
107
145
  */
108
- metadata?: Record<string, unknown>;
146
+ metadata?: {
147
+ [key: string]: Data.Metadata;
148
+ };
149
+ }
150
+ namespace Data {
151
+ interface Metadata {
152
+ /**
153
+ * Number of tokens per batch.
154
+ */
155
+ batchSize?: number | null;
156
+ /**
157
+ * Text displayed on the action button.
158
+ */
159
+ buttonText?: string | null;
160
+ /**
161
+ * Flag indicating if commenting is required.
162
+ */
163
+ checkComment?: boolean | null;
164
+ /**
165
+ * Flag indicating if liking the post is required.
166
+ */
167
+ checkLike?: boolean | null;
168
+ /**
169
+ * Flag indicating if reposting is required.
170
+ */
171
+ checkRepost?: boolean | null;
172
+ /**
173
+ * Text to check in the Twitter post, username, or bio.
174
+ */
175
+ checkText?: string | Array<string> | null;
176
+ /**
177
+ * Array of collections associated with the rule.
178
+ */
179
+ collection?: Array<Metadata.Collection>;
180
+ /**
181
+ * Conditions for completing the profile.
182
+ */
183
+ completeProfileConditions?: {
184
+ [key: string]: boolean;
185
+ } | null;
186
+ /**
187
+ * Description of the external rule condition (only for external rules)
188
+ */
189
+ conditionDescription?: string;
190
+ /**
191
+ * Object containing details for the call-to-action.
192
+ */
193
+ cta?: Metadata.Cta | null;
194
+ /**
195
+ * API key for custom rewards integration.
196
+ */
197
+ customRewardsApiKey?: string;
198
+ /**
199
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
200
+ */
201
+ directRpc?: boolean;
202
+ /**
203
+ * Array of Discord servers, channels, and roles to join.
204
+ */
205
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
206
+ /**
207
+ * Array of drip quests required to complete the rule.
208
+ */
209
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
210
+ /**
211
+ * Flag indicating whether joining Discord servers is required.
212
+ */
213
+ enableJoinDiscordServers?: boolean | null;
214
+ /**
215
+ * Flag indicating whether streaks are enabled.
216
+ */
217
+ enableStreaks?: boolean | null;
218
+ /**
219
+ * Flag indicating whether the verified multiplier is enabled.
220
+ */
221
+ enableVerifiedMultiplier?: boolean;
222
+ /**
223
+ * Type of ERC20 token for the loyalty rule.
224
+ */
225
+ erc20Type?: 'erc20' | 'native';
226
+ /**
227
+ * Fill source of the order for the token sale
228
+ */
229
+ fillSource?: string;
230
+ /**
231
+ * Percentage reward given to a user for their first referral.
232
+ */
233
+ firstReferralReward?: number | null;
234
+ /**
235
+ * Flag indicating whether the fill source is included.
236
+ */
237
+ hasFillSource?: boolean;
238
+ /**
239
+ * Indicates if the item has never been sold.
240
+ */
241
+ hasNeverSold?: boolean;
242
+ /**
243
+ * Indicates if the full royalty has been paid for items.
244
+ */
245
+ hasPaidFullRoyalty?: boolean;
246
+ /**
247
+ * Flag indicating if the sale currency is included.
248
+ */
249
+ hasSaleCurrency?: boolean;
250
+ /**
251
+ * Indicates if the user has a verified Twitter account.
252
+ */
253
+ hasVerifiedTwitter?: boolean;
254
+ /**
255
+ * URL of the image associated with the rule.
256
+ */
257
+ imageUrl?: string | null;
258
+ /**
259
+ * If enabled, the first transaction done on the platform will complete this rule
260
+ */
261
+ isCheckInOnEveryTxn?: boolean;
262
+ /**
263
+ * Indicates if the multiplier has been applied to rewards.
264
+ */
265
+ isMultiplierApplied?: boolean;
266
+ /**
267
+ * Flag indicating if the rule is restricted to new users.
268
+ */
269
+ isRestrictedToNewUsers?: boolean;
270
+ /**
271
+ * Flag indicating if rewards are applied retroactively.
272
+ */
273
+ isRetroactive?: boolean | null;
274
+ /**
275
+ * Flag indicating if the token hold multiplier is applied.
276
+ */
277
+ isTokenHoldMultiplier?: boolean;
278
+ /**
279
+ * Optional link associated with the metadata.
280
+ */
281
+ link?: string | null;
282
+ /**
283
+ * Liquidity pool details.
284
+ */
285
+ liquidity?: Metadata.Liquidity;
286
+ /**
287
+ * Maximum quantity constraint for token holding.
288
+ */
289
+ maxQty?: number | null;
290
+ /**
291
+ * Minimum quantity constraint for token holding.
292
+ */
293
+ minQty?: number | null;
294
+ /**
295
+ * Array of loyalty currency IDs used for multipliers.
296
+ */
297
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
298
+ /**
299
+ * Flag indicating whether to include only known users.
300
+ */
301
+ onlyKnownUsers?: boolean;
302
+ /**
303
+ * Flag indicating whether to include only native tokens.
304
+ */
305
+ onlyNative?: boolean;
306
+ /**
307
+ * Flag indicating whether to include only non-listed items.
308
+ */
309
+ onlyNonListed?: boolean;
310
+ /**
311
+ * Indicates if only existing users are rewarded.
312
+ */
313
+ onlyRewardExistingUser?: boolean;
314
+ /**
315
+ * give points for only one token ownership per contract
316
+ */
317
+ onlyRewardSingleTokenOwnership?: boolean | null;
318
+ /**
319
+ * Promotional code associated with the rule.
320
+ */
321
+ promoCode?: string;
322
+ /**
323
+ * URL of the CSV file containing promo codes.
324
+ */
325
+ promoCodeCsvUrl?: string;
326
+ /**
327
+ * Numbers of the promotional code to be generated.
328
+ */
329
+ promoCodeLength?: number | null;
330
+ /**
331
+ * Type of the promotional code.
332
+ */
333
+ promoCodeType?: 'code' | 'csv' | 'generate';
334
+ /**
335
+ * Array defining ranges and corresponding rewards.
336
+ */
337
+ range?: Array<Metadata.Range>;
338
+ /**
339
+ * Object defining referral requirements.
340
+ */
341
+ referralRequirements?: Metadata.ReferralRequirements | null;
342
+ /**
343
+ * Lump sum reward given to a referrer.
344
+ */
345
+ referrerReward?: number | null;
346
+ /**
347
+ * Loyalty currency ID of the referrer reward.
348
+ */
349
+ referrerRewardLoyaltyCurrencyId?: string | null;
350
+ /**
351
+ * Flag indicating if the post link is required.
352
+ */
353
+ requirePostLink?: boolean | null;
354
+ /**
355
+ * Flag indicating if media metadata is required.
356
+ */
357
+ requirePostMediaLink?: boolean | null;
358
+ /**
359
+ * Flag indicating if the rule can also reward badges per range.
360
+ */
361
+ rewardBadgePerRange?: boolean;
362
+ /**
363
+ * Flag indicating if the reward is rewarded by batch.
364
+ */
365
+ rewardByBatch?: boolean | null;
366
+ /**
367
+ * Criteria to evaluate the reward.
368
+ */
369
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
370
+ /**
371
+ * Flag indicating if the reward is rewarded per action.
372
+ */
373
+ rewardPerAction?: boolean | null;
374
+ /**
375
+ * Flag indicating if rewards are given per impression.
376
+ */
377
+ rewardPerImpression?: boolean | null;
378
+ /**
379
+ * Flag indicating if the rule should reward based on value of traded tokens
380
+ * instead of count.
381
+ */
382
+ rewardPerValue?: boolean;
383
+ /**
384
+ * Wallet address of the user can only be used if userId is not provided
385
+ */
386
+ royaltyAddress?: string;
387
+ /**
388
+ * Royalty percentage of the item.
389
+ */
390
+ royaltyPercentage?: number;
391
+ /**
392
+ * Currency associated with sales.
393
+ */
394
+ saleCurrency?: string;
395
+ /**
396
+ * Percentage reward given for a second-level referral.
397
+ */
398
+ secondReferralReward?: number | null;
399
+ /**
400
+ * Flag indicating if the multiplier is skipped.
401
+ */
402
+ skipMultiplier?: boolean | null;
403
+ /**
404
+ * Object containing details of the associated smart contract.
405
+ */
406
+ smartContract?: Metadata.SmartContract;
407
+ /**
408
+ * Array of snapshot proposals for the rule.
409
+ */
410
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
411
+ /**
412
+ * Social media platform associated with the rule.
413
+ */
414
+ socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
415
+ /**
416
+ * URL of the social platform's logo.
417
+ */
418
+ socialPlatformLogo?: string | null;
419
+ /**
420
+ * Name of the social platform.
421
+ */
422
+ socialPlatformName?: string | null;
423
+ /**
424
+ * ID of the Steam app.
425
+ */
426
+ steamAppId?: string | null;
427
+ /**
428
+ * Array of streak milestones and corresponding rewards.
429
+ */
430
+ streakArray?: Array<Metadata.StreakArray> | null;
431
+ /**
432
+ * Metadata for swap loyalty rules
433
+ */
434
+ swap?: Metadata.Swap;
435
+ /**
436
+ * ID of the Telegram channel.
437
+ */
438
+ telegramChannelId?: string | null;
439
+ /**
440
+ * Time delay in seconds to verify actions.
441
+ */
442
+ timeDelayToVerifySeconds?: string | number | null;
443
+ /**
444
+ * Flag indicating if all contracts are tracked.
445
+ */
446
+ trackAllContracts?: boolean | null;
447
+ /**
448
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
449
+ * completed once the progress is 100%.
450
+ */
451
+ trackProgress?: boolean | null;
452
+ /**
453
+ * URL of the associated Twitter account.
454
+ */
455
+ twitterAccountUrl?: string;
456
+ /**
457
+ * Hashtag associated with the Twitter post.
458
+ */
459
+ twitterHashtag?: string;
460
+ /**
461
+ * URL of the associated Twitter post.
462
+ */
463
+ twitterPostUrl?: string;
464
+ /**
465
+ * Unique identifier of the Twitter user.
466
+ */
467
+ twitterUserId?: string;
468
+ /**
469
+ * Twitter username of the user.
470
+ */
471
+ twitterUsername?: string;
472
+ /**
473
+ * Minimum length of the verification text.
474
+ */
475
+ verificationTextMinimumLength?: number | null;
476
+ /**
477
+ * Multiplier applied to rewards for verified users.
478
+ */
479
+ verifiedMultiplier?: number | null;
480
+ /**
481
+ * Placeholder text for verification input fields.
482
+ */
483
+ verifyPlaceHolderText?: string | null;
484
+ /**
485
+ * Type of wallet associated with the rule.
486
+ */
487
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | 'flow_cadence' | 'substrate' | null;
488
+ /**
489
+ * ID of the Youtube channel.
490
+ */
491
+ youtubeChannelId?: string | null;
492
+ /**
493
+ * ID of the Youtube video.
494
+ */
495
+ youtubeVideoId?: string | null;
496
+ }
497
+ namespace Metadata {
498
+ interface Collection {
499
+ /**
500
+ * Blockchain address of the collection.
501
+ */
502
+ address?: string;
503
+ /**
504
+ * Multiplier applied to the rewards for this collection.
505
+ */
506
+ multiplier?: number;
507
+ /**
508
+ * Blockchain network of the collection.
509
+ */
510
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'nexusTestnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'skaleEuropa' | 'skaleCalypso' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp' | 'somnia' | 'zkverify' | 'polkadot' | 'kusama' | 'flow_cadence';
511
+ }
512
+ /**
513
+ * Object containing details for the call-to-action.
514
+ */
515
+ interface Cta {
516
+ /**
517
+ * Link for the call-to-action.
518
+ */
519
+ href?: string | null;
520
+ /**
521
+ * Label for the call-to-action.
522
+ */
523
+ label?: string | null;
524
+ }
525
+ interface DiscordServersToJoin {
526
+ /**
527
+ * ID of the Discord server to join.
528
+ */
529
+ id?: string;
530
+ /**
531
+ * Array of Discord channels to join.
532
+ */
533
+ channels?: Array<DiscordServersToJoin.Channel>;
534
+ /**
535
+ * Array of roles to assign in the Discord server.
536
+ */
537
+ roles?: Array<DiscordServersToJoin.Role>;
538
+ }
539
+ namespace DiscordServersToJoin {
540
+ interface Channel {
541
+ /**
542
+ * ID of the Discord channel.
543
+ */
544
+ id?: string;
545
+ /**
546
+ * Array of emojis used in the channel.
547
+ */
548
+ emojis?: Array<Channel.Emoji>;
549
+ /**
550
+ * Phrase of text to be present in the discord message
551
+ */
552
+ text?: string;
553
+ }
554
+ namespace Channel {
555
+ interface Emoji {
556
+ /**
557
+ * ID of the emoji used in the channel.
558
+ */
559
+ id?: string;
560
+ }
561
+ }
562
+ interface Role {
563
+ /**
564
+ * ID of the role in the Discord server.
565
+ */
566
+ id: string;
567
+ }
568
+ }
569
+ interface DripQuestsToComplete {
570
+ /**
571
+ * ID of the drip quest to complete.
572
+ */
573
+ id: string;
574
+ }
575
+ /**
576
+ * Liquidity pool details.
577
+ */
578
+ interface Liquidity {
579
+ /**
580
+ * Calculation type of the liquidity pool.
581
+ */
582
+ calculationType?: 'fixed' | 'custom';
583
+ /**
584
+ * Custom function to calculate the the reward amount based on the liquidity
585
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
586
+ * USD.
587
+ */
588
+ customFunction?: string;
589
+ /**
590
+ * Liquidity provided per day in USD
591
+ */
592
+ liquidityPerDay?: number;
593
+ /**
594
+ * Blockchain network of the liquidity pool.
595
+ */
596
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'nexusTestnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'skaleEuropa' | 'skaleCalypso' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp' | 'somnia' | 'zkverify' | 'polkadot' | 'kusama' | 'flow_cadence';
597
+ /**
598
+ * Indicates if only in-range liquidity is rewarded.
599
+ */
600
+ onlyRewardInRangeLiquidity?: boolean;
601
+ /**
602
+ * Array of liquidity pools associated with the rule.
603
+ */
604
+ pools?: Array<Liquidity.Pool>;
605
+ /**
606
+ * Protocol of the liquidity pool.
607
+ */
608
+ protocol?: string;
609
+ }
610
+ namespace Liquidity {
611
+ interface Pool {
612
+ /**
613
+ * Unique identifier of the liquidity pool.
614
+ */
615
+ id: string;
616
+ }
617
+ }
618
+ interface Range {
619
+ /**
620
+ * Reward amount for this range.
621
+ */
622
+ amount: number;
623
+ /**
624
+ * End value of the range.
625
+ */
626
+ endRange: number;
627
+ /**
628
+ * Start value of the range.
629
+ */
630
+ startRange: number;
631
+ /**
632
+ * ID of the loyalty badge for this range.
633
+ */
634
+ loyaltyBadgeId?: string;
635
+ /**
636
+ * Amount of the loyalty multiplier for this range.
637
+ */
638
+ loyaltyMultiplierAmount?: number;
639
+ }
640
+ /**
641
+ * Object defining referral requirements.
642
+ */
643
+ interface ReferralRequirements {
644
+ /**
645
+ * Flag indicating if achieving points is required.
646
+ */
647
+ achievePoints?: boolean | null;
648
+ /**
649
+ * Flag indicating if completing the profile is required.
650
+ */
651
+ completeProfile?: boolean | null;
652
+ /**
653
+ * Flag indicating if connecting Discord is required.
654
+ */
655
+ connectDiscord?: boolean | null;
656
+ /**
657
+ * Flag indicating if connecting email is required.
658
+ */
659
+ connectEmail?: boolean | null;
660
+ /**
661
+ * Flag indicating if connecting Twitter is required.
662
+ */
663
+ connectTwitter?: boolean | null;
664
+ points?: ReferralRequirements.Points | null;
665
+ }
666
+ namespace ReferralRequirements {
667
+ interface Points {
668
+ /**
669
+ * Points required for referral.
670
+ */
671
+ amount?: number | null;
672
+ /**
673
+ * ID of the loyalty currency for referral.
674
+ */
675
+ loyaltyCurrecyId?: string | null;
676
+ }
677
+ }
678
+ /**
679
+ * Object containing details of the associated smart contract.
680
+ */
681
+ interface SmartContract {
682
+ /**
683
+ * Mapping of addresses for the smart contract.
684
+ */
685
+ addressMapping?: string | null;
686
+ /**
687
+ * Object containing details of the amount multiplier from the event.
688
+ */
689
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
690
+ /**
691
+ * ID of the smart contract.
692
+ */
693
+ contractId?: string | null;
694
+ /**
695
+ * Criteria to evaluate the smart contract event.
696
+ */
697
+ criteria?: 'everyEvent' | 'byParameter' | null;
698
+ /**
699
+ * Event emitted by the smart contract.
700
+ */
701
+ event?: string | null;
702
+ /**
703
+ * Array of parameters for the smart contract.
704
+ */
705
+ params?: Array<SmartContract.Param> | null;
706
+ /**
707
+ * Type of the smart contract interaction.
708
+ */
709
+ type?: 'function' | 'event' | null;
710
+ }
711
+ namespace SmartContract {
712
+ /**
713
+ * Object containing details of the amount multiplier from the event.
714
+ */
715
+ interface AmountMultiplier {
716
+ /**
717
+ * Mapping of the value for the smart contract.
718
+ */
719
+ valueMapping?: string | null;
720
+ }
721
+ interface Param {
722
+ /**
723
+ * Condition to check for the parameter.
724
+ */
725
+ condition?: string | null;
726
+ /**
727
+ * Name of the smart contract parameter.
728
+ */
729
+ name?: string | null;
730
+ /**
731
+ * Value of the parameter.
732
+ */
733
+ value?: string | null;
734
+ }
735
+ }
736
+ interface SnapshotProposal {
737
+ /**
738
+ * ID of the snapshot proposal.
739
+ */
740
+ id: string;
741
+ /**
742
+ * Space associated with the snapshot proposal.
743
+ */
744
+ space: string;
745
+ }
746
+ interface StreakArray {
747
+ /**
748
+ * Reward amount for achieving the streak milestone.
749
+ */
750
+ streakAmount: number;
751
+ /**
752
+ * Milestone required to achieve the streak.
753
+ */
754
+ streakMilestone: number;
755
+ }
756
+ /**
757
+ * Metadata for swap loyalty rules
758
+ */
759
+ interface Swap {
760
+ provider?: 'any' | 'relay' | 'lifi';
761
+ relayReferrerId?: string;
762
+ requireCrossChainSwap?: boolean;
763
+ swappedToChain?: 'any' | number | string;
764
+ swappedToTokens?: Array<Swap.SwappedToToken>;
765
+ tokenMode?: 'any' | 'specific';
766
+ trackTokenAmount?: boolean;
767
+ }
768
+ namespace Swap {
769
+ interface SwappedToToken {
770
+ address: string;
771
+ chainId: string;
772
+ }
773
+ }
774
+ }
109
775
  }
110
776
  /**
111
777
  * Previous data of the rule before the edit
@@ -118,7 +784,7 @@ export declare namespace RuleEditListResponse {
118
784
  /**
119
785
  * Amount associated with the loyalty rule
120
786
  */
121
- amount: number;
787
+ amount: number | null;
122
788
  /**
123
789
  * Timestamp when the loyalty rule was created
124
790
  */
@@ -127,14 +793,34 @@ export declare namespace RuleEditListResponse {
127
793
  * Timestamp when the loyalty rule was deleted (if applicable)
128
794
  */
129
795
  deletedAt: string | null;
796
+ /**
797
+ * Description of the loyalty rule
798
+ */
799
+ description: string;
800
+ /**
801
+ * End time of the loyalty rule
802
+ */
803
+ endTime: string | null;
130
804
  /**
131
805
  * Frequency of the loyalty rule
132
806
  */
133
807
  frequency: string;
808
+ /**
809
+ * Name of the loyalty rule
810
+ */
811
+ name: string;
134
812
  /**
135
813
  * Unique identifier for the organization
136
814
  */
137
815
  organizationId: string;
816
+ /**
817
+ * Type of the reward
818
+ */
819
+ rewardType: 'points' | 'multiplier' | 'badge';
820
+ /**
821
+ * Start time of the loyalty rule
822
+ */
823
+ startTime: string | null;
138
824
  /**
139
825
  * Type of the loyalty rule
140
826
  */
@@ -151,10 +837,642 @@ export declare namespace RuleEditListResponse {
151
837
  * Optional address of the collection
152
838
  */
153
839
  collectionAddress?: string;
840
+ /**
841
+ * URL of the media associated with the loyalty rule
842
+ */
843
+ mediaUrl?: string | null;
154
844
  /**
155
845
  * Optional metadata for the loyalty rule
156
846
  */
157
- metadata?: Record<string, unknown>;
847
+ metadata?: {
848
+ [key: string]: PreviousData.Metadata;
849
+ };
850
+ }
851
+ namespace PreviousData {
852
+ interface Metadata {
853
+ /**
854
+ * Number of tokens per batch.
855
+ */
856
+ batchSize?: number | null;
857
+ /**
858
+ * Text displayed on the action button.
859
+ */
860
+ buttonText?: string | null;
861
+ /**
862
+ * Flag indicating if commenting is required.
863
+ */
864
+ checkComment?: boolean | null;
865
+ /**
866
+ * Flag indicating if liking the post is required.
867
+ */
868
+ checkLike?: boolean | null;
869
+ /**
870
+ * Flag indicating if reposting is required.
871
+ */
872
+ checkRepost?: boolean | null;
873
+ /**
874
+ * Text to check in the Twitter post, username, or bio.
875
+ */
876
+ checkText?: string | Array<string> | null;
877
+ /**
878
+ * Array of collections associated with the rule.
879
+ */
880
+ collection?: Array<Metadata.Collection>;
881
+ /**
882
+ * Conditions for completing the profile.
883
+ */
884
+ completeProfileConditions?: {
885
+ [key: string]: boolean;
886
+ } | null;
887
+ /**
888
+ * Description of the external rule condition (only for external rules)
889
+ */
890
+ conditionDescription?: string;
891
+ /**
892
+ * Object containing details for the call-to-action.
893
+ */
894
+ cta?: Metadata.Cta | null;
895
+ /**
896
+ * API key for custom rewards integration.
897
+ */
898
+ customRewardsApiKey?: string;
899
+ /**
900
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
901
+ */
902
+ directRpc?: boolean;
903
+ /**
904
+ * Array of Discord servers, channels, and roles to join.
905
+ */
906
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
907
+ /**
908
+ * Array of drip quests required to complete the rule.
909
+ */
910
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
911
+ /**
912
+ * Flag indicating whether joining Discord servers is required.
913
+ */
914
+ enableJoinDiscordServers?: boolean | null;
915
+ /**
916
+ * Flag indicating whether streaks are enabled.
917
+ */
918
+ enableStreaks?: boolean | null;
919
+ /**
920
+ * Flag indicating whether the verified multiplier is enabled.
921
+ */
922
+ enableVerifiedMultiplier?: boolean;
923
+ /**
924
+ * Type of ERC20 token for the loyalty rule.
925
+ */
926
+ erc20Type?: 'erc20' | 'native';
927
+ /**
928
+ * Fill source of the order for the token sale
929
+ */
930
+ fillSource?: string;
931
+ /**
932
+ * Percentage reward given to a user for their first referral.
933
+ */
934
+ firstReferralReward?: number | null;
935
+ /**
936
+ * Flag indicating whether the fill source is included.
937
+ */
938
+ hasFillSource?: boolean;
939
+ /**
940
+ * Indicates if the item has never been sold.
941
+ */
942
+ hasNeverSold?: boolean;
943
+ /**
944
+ * Indicates if the full royalty has been paid for items.
945
+ */
946
+ hasPaidFullRoyalty?: boolean;
947
+ /**
948
+ * Flag indicating if the sale currency is included.
949
+ */
950
+ hasSaleCurrency?: boolean;
951
+ /**
952
+ * Indicates if the user has a verified Twitter account.
953
+ */
954
+ hasVerifiedTwitter?: boolean;
955
+ /**
956
+ * URL of the image associated with the rule.
957
+ */
958
+ imageUrl?: string | null;
959
+ /**
960
+ * If enabled, the first transaction done on the platform will complete this rule
961
+ */
962
+ isCheckInOnEveryTxn?: boolean;
963
+ /**
964
+ * Indicates if the multiplier has been applied to rewards.
965
+ */
966
+ isMultiplierApplied?: boolean;
967
+ /**
968
+ * Flag indicating if the rule is restricted to new users.
969
+ */
970
+ isRestrictedToNewUsers?: boolean;
971
+ /**
972
+ * Flag indicating if rewards are applied retroactively.
973
+ */
974
+ isRetroactive?: boolean | null;
975
+ /**
976
+ * Flag indicating if the token hold multiplier is applied.
977
+ */
978
+ isTokenHoldMultiplier?: boolean;
979
+ /**
980
+ * Optional link associated with the metadata.
981
+ */
982
+ link?: string | null;
983
+ /**
984
+ * Liquidity pool details.
985
+ */
986
+ liquidity?: Metadata.Liquidity;
987
+ /**
988
+ * Maximum quantity constraint for token holding.
989
+ */
990
+ maxQty?: number | null;
991
+ /**
992
+ * Minimum quantity constraint for token holding.
993
+ */
994
+ minQty?: number | null;
995
+ /**
996
+ * Array of loyalty currency IDs used for multipliers.
997
+ */
998
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
999
+ /**
1000
+ * Flag indicating whether to include only known users.
1001
+ */
1002
+ onlyKnownUsers?: boolean;
1003
+ /**
1004
+ * Flag indicating whether to include only native tokens.
1005
+ */
1006
+ onlyNative?: boolean;
1007
+ /**
1008
+ * Flag indicating whether to include only non-listed items.
1009
+ */
1010
+ onlyNonListed?: boolean;
1011
+ /**
1012
+ * Indicates if only existing users are rewarded.
1013
+ */
1014
+ onlyRewardExistingUser?: boolean;
1015
+ /**
1016
+ * give points for only one token ownership per contract
1017
+ */
1018
+ onlyRewardSingleTokenOwnership?: boolean | null;
1019
+ /**
1020
+ * Promotional code associated with the rule.
1021
+ */
1022
+ promoCode?: string;
1023
+ /**
1024
+ * URL of the CSV file containing promo codes.
1025
+ */
1026
+ promoCodeCsvUrl?: string;
1027
+ /**
1028
+ * Numbers of the promotional code to be generated.
1029
+ */
1030
+ promoCodeLength?: number | null;
1031
+ /**
1032
+ * Type of the promotional code.
1033
+ */
1034
+ promoCodeType?: 'code' | 'csv' | 'generate';
1035
+ /**
1036
+ * Array defining ranges and corresponding rewards.
1037
+ */
1038
+ range?: Array<Metadata.Range>;
1039
+ /**
1040
+ * Object defining referral requirements.
1041
+ */
1042
+ referralRequirements?: Metadata.ReferralRequirements | null;
1043
+ /**
1044
+ * Lump sum reward given to a referrer.
1045
+ */
1046
+ referrerReward?: number | null;
1047
+ /**
1048
+ * Loyalty currency ID of the referrer reward.
1049
+ */
1050
+ referrerRewardLoyaltyCurrencyId?: string | null;
1051
+ /**
1052
+ * Flag indicating if the post link is required.
1053
+ */
1054
+ requirePostLink?: boolean | null;
1055
+ /**
1056
+ * Flag indicating if media metadata is required.
1057
+ */
1058
+ requirePostMediaLink?: boolean | null;
1059
+ /**
1060
+ * Flag indicating if the rule can also reward badges per range.
1061
+ */
1062
+ rewardBadgePerRange?: boolean;
1063
+ /**
1064
+ * Flag indicating if the reward is rewarded by batch.
1065
+ */
1066
+ rewardByBatch?: boolean | null;
1067
+ /**
1068
+ * Criteria to evaluate the reward.
1069
+ */
1070
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
1071
+ /**
1072
+ * Flag indicating if the reward is rewarded per action.
1073
+ */
1074
+ rewardPerAction?: boolean | null;
1075
+ /**
1076
+ * Flag indicating if rewards are given per impression.
1077
+ */
1078
+ rewardPerImpression?: boolean | null;
1079
+ /**
1080
+ * Flag indicating if the rule should reward based on value of traded tokens
1081
+ * instead of count.
1082
+ */
1083
+ rewardPerValue?: boolean;
1084
+ /**
1085
+ * Wallet address of the user can only be used if userId is not provided
1086
+ */
1087
+ royaltyAddress?: string;
1088
+ /**
1089
+ * Royalty percentage of the item.
1090
+ */
1091
+ royaltyPercentage?: number;
1092
+ /**
1093
+ * Currency associated with sales.
1094
+ */
1095
+ saleCurrency?: string;
1096
+ /**
1097
+ * Percentage reward given for a second-level referral.
1098
+ */
1099
+ secondReferralReward?: number | null;
1100
+ /**
1101
+ * Flag indicating if the multiplier is skipped.
1102
+ */
1103
+ skipMultiplier?: boolean | null;
1104
+ /**
1105
+ * Object containing details of the associated smart contract.
1106
+ */
1107
+ smartContract?: Metadata.SmartContract;
1108
+ /**
1109
+ * Array of snapshot proposals for the rule.
1110
+ */
1111
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
1112
+ /**
1113
+ * Social media platform associated with the rule.
1114
+ */
1115
+ socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
1116
+ /**
1117
+ * URL of the social platform's logo.
1118
+ */
1119
+ socialPlatformLogo?: string | null;
1120
+ /**
1121
+ * Name of the social platform.
1122
+ */
1123
+ socialPlatformName?: string | null;
1124
+ /**
1125
+ * ID of the Steam app.
1126
+ */
1127
+ steamAppId?: string | null;
1128
+ /**
1129
+ * Array of streak milestones and corresponding rewards.
1130
+ */
1131
+ streakArray?: Array<Metadata.StreakArray> | null;
1132
+ /**
1133
+ * Metadata for swap loyalty rules
1134
+ */
1135
+ swap?: Metadata.Swap;
1136
+ /**
1137
+ * ID of the Telegram channel.
1138
+ */
1139
+ telegramChannelId?: string | null;
1140
+ /**
1141
+ * Time delay in seconds to verify actions.
1142
+ */
1143
+ timeDelayToVerifySeconds?: string | number | null;
1144
+ /**
1145
+ * Flag indicating if all contracts are tracked.
1146
+ */
1147
+ trackAllContracts?: boolean | null;
1148
+ /**
1149
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
1150
+ * completed once the progress is 100%.
1151
+ */
1152
+ trackProgress?: boolean | null;
1153
+ /**
1154
+ * URL of the associated Twitter account.
1155
+ */
1156
+ twitterAccountUrl?: string;
1157
+ /**
1158
+ * Hashtag associated with the Twitter post.
1159
+ */
1160
+ twitterHashtag?: string;
1161
+ /**
1162
+ * URL of the associated Twitter post.
1163
+ */
1164
+ twitterPostUrl?: string;
1165
+ /**
1166
+ * Unique identifier of the Twitter user.
1167
+ */
1168
+ twitterUserId?: string;
1169
+ /**
1170
+ * Twitter username of the user.
1171
+ */
1172
+ twitterUsername?: string;
1173
+ /**
1174
+ * Minimum length of the verification text.
1175
+ */
1176
+ verificationTextMinimumLength?: number | null;
1177
+ /**
1178
+ * Multiplier applied to rewards for verified users.
1179
+ */
1180
+ verifiedMultiplier?: number | null;
1181
+ /**
1182
+ * Placeholder text for verification input fields.
1183
+ */
1184
+ verifyPlaceHolderText?: string | null;
1185
+ /**
1186
+ * Type of wallet associated with the rule.
1187
+ */
1188
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | 'flow_cadence' | 'substrate' | null;
1189
+ /**
1190
+ * ID of the Youtube channel.
1191
+ */
1192
+ youtubeChannelId?: string | null;
1193
+ /**
1194
+ * ID of the Youtube video.
1195
+ */
1196
+ youtubeVideoId?: string | null;
1197
+ }
1198
+ namespace Metadata {
1199
+ interface Collection {
1200
+ /**
1201
+ * Blockchain address of the collection.
1202
+ */
1203
+ address?: string;
1204
+ /**
1205
+ * Multiplier applied to the rewards for this collection.
1206
+ */
1207
+ multiplier?: number;
1208
+ /**
1209
+ * Blockchain network of the collection.
1210
+ */
1211
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'nexusTestnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'skaleEuropa' | 'skaleCalypso' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp' | 'somnia' | 'zkverify' | 'polkadot' | 'kusama' | 'flow_cadence';
1212
+ }
1213
+ /**
1214
+ * Object containing details for the call-to-action.
1215
+ */
1216
+ interface Cta {
1217
+ /**
1218
+ * Link for the call-to-action.
1219
+ */
1220
+ href?: string | null;
1221
+ /**
1222
+ * Label for the call-to-action.
1223
+ */
1224
+ label?: string | null;
1225
+ }
1226
+ interface DiscordServersToJoin {
1227
+ /**
1228
+ * ID of the Discord server to join.
1229
+ */
1230
+ id?: string;
1231
+ /**
1232
+ * Array of Discord channels to join.
1233
+ */
1234
+ channels?: Array<DiscordServersToJoin.Channel>;
1235
+ /**
1236
+ * Array of roles to assign in the Discord server.
1237
+ */
1238
+ roles?: Array<DiscordServersToJoin.Role>;
1239
+ }
1240
+ namespace DiscordServersToJoin {
1241
+ interface Channel {
1242
+ /**
1243
+ * ID of the Discord channel.
1244
+ */
1245
+ id?: string;
1246
+ /**
1247
+ * Array of emojis used in the channel.
1248
+ */
1249
+ emojis?: Array<Channel.Emoji>;
1250
+ /**
1251
+ * Phrase of text to be present in the discord message
1252
+ */
1253
+ text?: string;
1254
+ }
1255
+ namespace Channel {
1256
+ interface Emoji {
1257
+ /**
1258
+ * ID of the emoji used in the channel.
1259
+ */
1260
+ id?: string;
1261
+ }
1262
+ }
1263
+ interface Role {
1264
+ /**
1265
+ * ID of the role in the Discord server.
1266
+ */
1267
+ id: string;
1268
+ }
1269
+ }
1270
+ interface DripQuestsToComplete {
1271
+ /**
1272
+ * ID of the drip quest to complete.
1273
+ */
1274
+ id: string;
1275
+ }
1276
+ /**
1277
+ * Liquidity pool details.
1278
+ */
1279
+ interface Liquidity {
1280
+ /**
1281
+ * Calculation type of the liquidity pool.
1282
+ */
1283
+ calculationType?: 'fixed' | 'custom';
1284
+ /**
1285
+ * Custom function to calculate the the reward amount based on the liquidity
1286
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
1287
+ * USD.
1288
+ */
1289
+ customFunction?: string;
1290
+ /**
1291
+ * Liquidity provided per day in USD
1292
+ */
1293
+ liquidityPerDay?: number;
1294
+ /**
1295
+ * Blockchain network of the liquidity pool.
1296
+ */
1297
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'nexusTestnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'skaleEuropa' | 'skaleCalypso' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp' | 'somnia' | 'zkverify' | 'polkadot' | 'kusama' | 'flow_cadence';
1298
+ /**
1299
+ * Indicates if only in-range liquidity is rewarded.
1300
+ */
1301
+ onlyRewardInRangeLiquidity?: boolean;
1302
+ /**
1303
+ * Array of liquidity pools associated with the rule.
1304
+ */
1305
+ pools?: Array<Liquidity.Pool>;
1306
+ /**
1307
+ * Protocol of the liquidity pool.
1308
+ */
1309
+ protocol?: string;
1310
+ }
1311
+ namespace Liquidity {
1312
+ interface Pool {
1313
+ /**
1314
+ * Unique identifier of the liquidity pool.
1315
+ */
1316
+ id: string;
1317
+ }
1318
+ }
1319
+ interface Range {
1320
+ /**
1321
+ * Reward amount for this range.
1322
+ */
1323
+ amount: number;
1324
+ /**
1325
+ * End value of the range.
1326
+ */
1327
+ endRange: number;
1328
+ /**
1329
+ * Start value of the range.
1330
+ */
1331
+ startRange: number;
1332
+ /**
1333
+ * ID of the loyalty badge for this range.
1334
+ */
1335
+ loyaltyBadgeId?: string;
1336
+ /**
1337
+ * Amount of the loyalty multiplier for this range.
1338
+ */
1339
+ loyaltyMultiplierAmount?: number;
1340
+ }
1341
+ /**
1342
+ * Object defining referral requirements.
1343
+ */
1344
+ interface ReferralRequirements {
1345
+ /**
1346
+ * Flag indicating if achieving points is required.
1347
+ */
1348
+ achievePoints?: boolean | null;
1349
+ /**
1350
+ * Flag indicating if completing the profile is required.
1351
+ */
1352
+ completeProfile?: boolean | null;
1353
+ /**
1354
+ * Flag indicating if connecting Discord is required.
1355
+ */
1356
+ connectDiscord?: boolean | null;
1357
+ /**
1358
+ * Flag indicating if connecting email is required.
1359
+ */
1360
+ connectEmail?: boolean | null;
1361
+ /**
1362
+ * Flag indicating if connecting Twitter is required.
1363
+ */
1364
+ connectTwitter?: boolean | null;
1365
+ points?: ReferralRequirements.Points | null;
1366
+ }
1367
+ namespace ReferralRequirements {
1368
+ interface Points {
1369
+ /**
1370
+ * Points required for referral.
1371
+ */
1372
+ amount?: number | null;
1373
+ /**
1374
+ * ID of the loyalty currency for referral.
1375
+ */
1376
+ loyaltyCurrecyId?: string | null;
1377
+ }
1378
+ }
1379
+ /**
1380
+ * Object containing details of the associated smart contract.
1381
+ */
1382
+ interface SmartContract {
1383
+ /**
1384
+ * Mapping of addresses for the smart contract.
1385
+ */
1386
+ addressMapping?: string | null;
1387
+ /**
1388
+ * Object containing details of the amount multiplier from the event.
1389
+ */
1390
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1391
+ /**
1392
+ * ID of the smart contract.
1393
+ */
1394
+ contractId?: string | null;
1395
+ /**
1396
+ * Criteria to evaluate the smart contract event.
1397
+ */
1398
+ criteria?: 'everyEvent' | 'byParameter' | null;
1399
+ /**
1400
+ * Event emitted by the smart contract.
1401
+ */
1402
+ event?: string | null;
1403
+ /**
1404
+ * Array of parameters for the smart contract.
1405
+ */
1406
+ params?: Array<SmartContract.Param> | null;
1407
+ /**
1408
+ * Type of the smart contract interaction.
1409
+ */
1410
+ type?: 'function' | 'event' | null;
1411
+ }
1412
+ namespace SmartContract {
1413
+ /**
1414
+ * Object containing details of the amount multiplier from the event.
1415
+ */
1416
+ interface AmountMultiplier {
1417
+ /**
1418
+ * Mapping of the value for the smart contract.
1419
+ */
1420
+ valueMapping?: string | null;
1421
+ }
1422
+ interface Param {
1423
+ /**
1424
+ * Condition to check for the parameter.
1425
+ */
1426
+ condition?: string | null;
1427
+ /**
1428
+ * Name of the smart contract parameter.
1429
+ */
1430
+ name?: string | null;
1431
+ /**
1432
+ * Value of the parameter.
1433
+ */
1434
+ value?: string | null;
1435
+ }
1436
+ }
1437
+ interface SnapshotProposal {
1438
+ /**
1439
+ * ID of the snapshot proposal.
1440
+ */
1441
+ id: string;
1442
+ /**
1443
+ * Space associated with the snapshot proposal.
1444
+ */
1445
+ space: string;
1446
+ }
1447
+ interface StreakArray {
1448
+ /**
1449
+ * Reward amount for achieving the streak milestone.
1450
+ */
1451
+ streakAmount: number;
1452
+ /**
1453
+ * Milestone required to achieve the streak.
1454
+ */
1455
+ streakMilestone: number;
1456
+ }
1457
+ /**
1458
+ * Metadata for swap loyalty rules
1459
+ */
1460
+ interface Swap {
1461
+ provider?: 'any' | 'relay' | 'lifi';
1462
+ relayReferrerId?: string;
1463
+ requireCrossChainSwap?: boolean;
1464
+ swappedToChain?: 'any' | number | string;
1465
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1466
+ tokenMode?: 'any' | 'specific';
1467
+ trackTokenAmount?: boolean;
1468
+ }
1469
+ namespace Swap {
1470
+ interface SwappedToToken {
1471
+ address: string;
1472
+ chainId: string;
1473
+ }
1474
+ }
1475
+ }
158
1476
  }
159
1477
  }
160
1478
  }
@@ -212,7 +1530,7 @@ export declare namespace RuleEditRestoreResponse {
212
1530
  /**
213
1531
  * Amount associated with the loyalty rule
214
1532
  */
215
- amount: number;
1533
+ amount: number | null;
216
1534
  /**
217
1535
  * Timestamp when the loyalty rule was created
218
1536
  */
@@ -221,14 +1539,34 @@ export declare namespace RuleEditRestoreResponse {
221
1539
  * Timestamp when the loyalty rule was deleted (if applicable)
222
1540
  */
223
1541
  deletedAt: string | null;
1542
+ /**
1543
+ * Description of the loyalty rule
1544
+ */
1545
+ description: string;
1546
+ /**
1547
+ * End time of the loyalty rule
1548
+ */
1549
+ endTime: string | null;
224
1550
  /**
225
1551
  * Frequency of the loyalty rule
226
1552
  */
227
1553
  frequency: string;
1554
+ /**
1555
+ * Name of the loyalty rule
1556
+ */
1557
+ name: string;
228
1558
  /**
229
1559
  * Unique identifier for the organization
230
1560
  */
231
1561
  organizationId: string;
1562
+ /**
1563
+ * Type of the reward
1564
+ */
1565
+ rewardType: 'points' | 'multiplier' | 'badge';
1566
+ /**
1567
+ * Start time of the loyalty rule
1568
+ */
1569
+ startTime: string | null;
232
1570
  /**
233
1571
  * Type of the loyalty rule
234
1572
  */
@@ -245,10 +1583,642 @@ export declare namespace RuleEditRestoreResponse {
245
1583
  * Optional address of the collection
246
1584
  */
247
1585
  collectionAddress?: string;
1586
+ /**
1587
+ * URL of the media associated with the loyalty rule
1588
+ */
1589
+ mediaUrl?: string | null;
248
1590
  /**
249
1591
  * Optional metadata for the loyalty rule
250
1592
  */
251
- metadata?: Record<string, unknown>;
1593
+ metadata?: {
1594
+ [key: string]: Data.Metadata;
1595
+ };
1596
+ }
1597
+ namespace Data {
1598
+ interface Metadata {
1599
+ /**
1600
+ * Number of tokens per batch.
1601
+ */
1602
+ batchSize?: number | null;
1603
+ /**
1604
+ * Text displayed on the action button.
1605
+ */
1606
+ buttonText?: string | null;
1607
+ /**
1608
+ * Flag indicating if commenting is required.
1609
+ */
1610
+ checkComment?: boolean | null;
1611
+ /**
1612
+ * Flag indicating if liking the post is required.
1613
+ */
1614
+ checkLike?: boolean | null;
1615
+ /**
1616
+ * Flag indicating if reposting is required.
1617
+ */
1618
+ checkRepost?: boolean | null;
1619
+ /**
1620
+ * Text to check in the Twitter post, username, or bio.
1621
+ */
1622
+ checkText?: string | Array<string> | null;
1623
+ /**
1624
+ * Array of collections associated with the rule.
1625
+ */
1626
+ collection?: Array<Metadata.Collection>;
1627
+ /**
1628
+ * Conditions for completing the profile.
1629
+ */
1630
+ completeProfileConditions?: {
1631
+ [key: string]: boolean;
1632
+ } | null;
1633
+ /**
1634
+ * Description of the external rule condition (only for external rules)
1635
+ */
1636
+ conditionDescription?: string;
1637
+ /**
1638
+ * Object containing details for the call-to-action.
1639
+ */
1640
+ cta?: Metadata.Cta | null;
1641
+ /**
1642
+ * API key for custom rewards integration.
1643
+ */
1644
+ customRewardsApiKey?: string;
1645
+ /**
1646
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
1647
+ */
1648
+ directRpc?: boolean;
1649
+ /**
1650
+ * Array of Discord servers, channels, and roles to join.
1651
+ */
1652
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
1653
+ /**
1654
+ * Array of drip quests required to complete the rule.
1655
+ */
1656
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
1657
+ /**
1658
+ * Flag indicating whether joining Discord servers is required.
1659
+ */
1660
+ enableJoinDiscordServers?: boolean | null;
1661
+ /**
1662
+ * Flag indicating whether streaks are enabled.
1663
+ */
1664
+ enableStreaks?: boolean | null;
1665
+ /**
1666
+ * Flag indicating whether the verified multiplier is enabled.
1667
+ */
1668
+ enableVerifiedMultiplier?: boolean;
1669
+ /**
1670
+ * Type of ERC20 token for the loyalty rule.
1671
+ */
1672
+ erc20Type?: 'erc20' | 'native';
1673
+ /**
1674
+ * Fill source of the order for the token sale
1675
+ */
1676
+ fillSource?: string;
1677
+ /**
1678
+ * Percentage reward given to a user for their first referral.
1679
+ */
1680
+ firstReferralReward?: number | null;
1681
+ /**
1682
+ * Flag indicating whether the fill source is included.
1683
+ */
1684
+ hasFillSource?: boolean;
1685
+ /**
1686
+ * Indicates if the item has never been sold.
1687
+ */
1688
+ hasNeverSold?: boolean;
1689
+ /**
1690
+ * Indicates if the full royalty has been paid for items.
1691
+ */
1692
+ hasPaidFullRoyalty?: boolean;
1693
+ /**
1694
+ * Flag indicating if the sale currency is included.
1695
+ */
1696
+ hasSaleCurrency?: boolean;
1697
+ /**
1698
+ * Indicates if the user has a verified Twitter account.
1699
+ */
1700
+ hasVerifiedTwitter?: boolean;
1701
+ /**
1702
+ * URL of the image associated with the rule.
1703
+ */
1704
+ imageUrl?: string | null;
1705
+ /**
1706
+ * If enabled, the first transaction done on the platform will complete this rule
1707
+ */
1708
+ isCheckInOnEveryTxn?: boolean;
1709
+ /**
1710
+ * Indicates if the multiplier has been applied to rewards.
1711
+ */
1712
+ isMultiplierApplied?: boolean;
1713
+ /**
1714
+ * Flag indicating if the rule is restricted to new users.
1715
+ */
1716
+ isRestrictedToNewUsers?: boolean;
1717
+ /**
1718
+ * Flag indicating if rewards are applied retroactively.
1719
+ */
1720
+ isRetroactive?: boolean | null;
1721
+ /**
1722
+ * Flag indicating if the token hold multiplier is applied.
1723
+ */
1724
+ isTokenHoldMultiplier?: boolean;
1725
+ /**
1726
+ * Optional link associated with the metadata.
1727
+ */
1728
+ link?: string | null;
1729
+ /**
1730
+ * Liquidity pool details.
1731
+ */
1732
+ liquidity?: Metadata.Liquidity;
1733
+ /**
1734
+ * Maximum quantity constraint for token holding.
1735
+ */
1736
+ maxQty?: number | null;
1737
+ /**
1738
+ * Minimum quantity constraint for token holding.
1739
+ */
1740
+ minQty?: number | null;
1741
+ /**
1742
+ * Array of loyalty currency IDs used for multipliers.
1743
+ */
1744
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
1745
+ /**
1746
+ * Flag indicating whether to include only known users.
1747
+ */
1748
+ onlyKnownUsers?: boolean;
1749
+ /**
1750
+ * Flag indicating whether to include only native tokens.
1751
+ */
1752
+ onlyNative?: boolean;
1753
+ /**
1754
+ * Flag indicating whether to include only non-listed items.
1755
+ */
1756
+ onlyNonListed?: boolean;
1757
+ /**
1758
+ * Indicates if only existing users are rewarded.
1759
+ */
1760
+ onlyRewardExistingUser?: boolean;
1761
+ /**
1762
+ * give points for only one token ownership per contract
1763
+ */
1764
+ onlyRewardSingleTokenOwnership?: boolean | null;
1765
+ /**
1766
+ * Promotional code associated with the rule.
1767
+ */
1768
+ promoCode?: string;
1769
+ /**
1770
+ * URL of the CSV file containing promo codes.
1771
+ */
1772
+ promoCodeCsvUrl?: string;
1773
+ /**
1774
+ * Numbers of the promotional code to be generated.
1775
+ */
1776
+ promoCodeLength?: number | null;
1777
+ /**
1778
+ * Type of the promotional code.
1779
+ */
1780
+ promoCodeType?: 'code' | 'csv' | 'generate';
1781
+ /**
1782
+ * Array defining ranges and corresponding rewards.
1783
+ */
1784
+ range?: Array<Metadata.Range>;
1785
+ /**
1786
+ * Object defining referral requirements.
1787
+ */
1788
+ referralRequirements?: Metadata.ReferralRequirements | null;
1789
+ /**
1790
+ * Lump sum reward given to a referrer.
1791
+ */
1792
+ referrerReward?: number | null;
1793
+ /**
1794
+ * Loyalty currency ID of the referrer reward.
1795
+ */
1796
+ referrerRewardLoyaltyCurrencyId?: string | null;
1797
+ /**
1798
+ * Flag indicating if the post link is required.
1799
+ */
1800
+ requirePostLink?: boolean | null;
1801
+ /**
1802
+ * Flag indicating if media metadata is required.
1803
+ */
1804
+ requirePostMediaLink?: boolean | null;
1805
+ /**
1806
+ * Flag indicating if the rule can also reward badges per range.
1807
+ */
1808
+ rewardBadgePerRange?: boolean;
1809
+ /**
1810
+ * Flag indicating if the reward is rewarded by batch.
1811
+ */
1812
+ rewardByBatch?: boolean | null;
1813
+ /**
1814
+ * Criteria to evaluate the reward.
1815
+ */
1816
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
1817
+ /**
1818
+ * Flag indicating if the reward is rewarded per action.
1819
+ */
1820
+ rewardPerAction?: boolean | null;
1821
+ /**
1822
+ * Flag indicating if rewards are given per impression.
1823
+ */
1824
+ rewardPerImpression?: boolean | null;
1825
+ /**
1826
+ * Flag indicating if the rule should reward based on value of traded tokens
1827
+ * instead of count.
1828
+ */
1829
+ rewardPerValue?: boolean;
1830
+ /**
1831
+ * Wallet address of the user can only be used if userId is not provided
1832
+ */
1833
+ royaltyAddress?: string;
1834
+ /**
1835
+ * Royalty percentage of the item.
1836
+ */
1837
+ royaltyPercentage?: number;
1838
+ /**
1839
+ * Currency associated with sales.
1840
+ */
1841
+ saleCurrency?: string;
1842
+ /**
1843
+ * Percentage reward given for a second-level referral.
1844
+ */
1845
+ secondReferralReward?: number | null;
1846
+ /**
1847
+ * Flag indicating if the multiplier is skipped.
1848
+ */
1849
+ skipMultiplier?: boolean | null;
1850
+ /**
1851
+ * Object containing details of the associated smart contract.
1852
+ */
1853
+ smartContract?: Metadata.SmartContract;
1854
+ /**
1855
+ * Array of snapshot proposals for the rule.
1856
+ */
1857
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
1858
+ /**
1859
+ * Social media platform associated with the rule.
1860
+ */
1861
+ socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
1862
+ /**
1863
+ * URL of the social platform's logo.
1864
+ */
1865
+ socialPlatformLogo?: string | null;
1866
+ /**
1867
+ * Name of the social platform.
1868
+ */
1869
+ socialPlatformName?: string | null;
1870
+ /**
1871
+ * ID of the Steam app.
1872
+ */
1873
+ steamAppId?: string | null;
1874
+ /**
1875
+ * Array of streak milestones and corresponding rewards.
1876
+ */
1877
+ streakArray?: Array<Metadata.StreakArray> | null;
1878
+ /**
1879
+ * Metadata for swap loyalty rules
1880
+ */
1881
+ swap?: Metadata.Swap;
1882
+ /**
1883
+ * ID of the Telegram channel.
1884
+ */
1885
+ telegramChannelId?: string | null;
1886
+ /**
1887
+ * Time delay in seconds to verify actions.
1888
+ */
1889
+ timeDelayToVerifySeconds?: string | number | null;
1890
+ /**
1891
+ * Flag indicating if all contracts are tracked.
1892
+ */
1893
+ trackAllContracts?: boolean | null;
1894
+ /**
1895
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
1896
+ * completed once the progress is 100%.
1897
+ */
1898
+ trackProgress?: boolean | null;
1899
+ /**
1900
+ * URL of the associated Twitter account.
1901
+ */
1902
+ twitterAccountUrl?: string;
1903
+ /**
1904
+ * Hashtag associated with the Twitter post.
1905
+ */
1906
+ twitterHashtag?: string;
1907
+ /**
1908
+ * URL of the associated Twitter post.
1909
+ */
1910
+ twitterPostUrl?: string;
1911
+ /**
1912
+ * Unique identifier of the Twitter user.
1913
+ */
1914
+ twitterUserId?: string;
1915
+ /**
1916
+ * Twitter username of the user.
1917
+ */
1918
+ twitterUsername?: string;
1919
+ /**
1920
+ * Minimum length of the verification text.
1921
+ */
1922
+ verificationTextMinimumLength?: number | null;
1923
+ /**
1924
+ * Multiplier applied to rewards for verified users.
1925
+ */
1926
+ verifiedMultiplier?: number | null;
1927
+ /**
1928
+ * Placeholder text for verification input fields.
1929
+ */
1930
+ verifyPlaceHolderText?: string | null;
1931
+ /**
1932
+ * Type of wallet associated with the rule.
1933
+ */
1934
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | 'flow_cadence' | 'substrate' | null;
1935
+ /**
1936
+ * ID of the Youtube channel.
1937
+ */
1938
+ youtubeChannelId?: string | null;
1939
+ /**
1940
+ * ID of the Youtube video.
1941
+ */
1942
+ youtubeVideoId?: string | null;
1943
+ }
1944
+ namespace Metadata {
1945
+ interface Collection {
1946
+ /**
1947
+ * Blockchain address of the collection.
1948
+ */
1949
+ address?: string;
1950
+ /**
1951
+ * Multiplier applied to the rewards for this collection.
1952
+ */
1953
+ multiplier?: number;
1954
+ /**
1955
+ * Blockchain network of the collection.
1956
+ */
1957
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'nexusTestnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'skaleEuropa' | 'skaleCalypso' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp' | 'somnia' | 'zkverify' | 'polkadot' | 'kusama' | 'flow_cadence';
1958
+ }
1959
+ /**
1960
+ * Object containing details for the call-to-action.
1961
+ */
1962
+ interface Cta {
1963
+ /**
1964
+ * Link for the call-to-action.
1965
+ */
1966
+ href?: string | null;
1967
+ /**
1968
+ * Label for the call-to-action.
1969
+ */
1970
+ label?: string | null;
1971
+ }
1972
+ interface DiscordServersToJoin {
1973
+ /**
1974
+ * ID of the Discord server to join.
1975
+ */
1976
+ id?: string;
1977
+ /**
1978
+ * Array of Discord channels to join.
1979
+ */
1980
+ channels?: Array<DiscordServersToJoin.Channel>;
1981
+ /**
1982
+ * Array of roles to assign in the Discord server.
1983
+ */
1984
+ roles?: Array<DiscordServersToJoin.Role>;
1985
+ }
1986
+ namespace DiscordServersToJoin {
1987
+ interface Channel {
1988
+ /**
1989
+ * ID of the Discord channel.
1990
+ */
1991
+ id?: string;
1992
+ /**
1993
+ * Array of emojis used in the channel.
1994
+ */
1995
+ emojis?: Array<Channel.Emoji>;
1996
+ /**
1997
+ * Phrase of text to be present in the discord message
1998
+ */
1999
+ text?: string;
2000
+ }
2001
+ namespace Channel {
2002
+ interface Emoji {
2003
+ /**
2004
+ * ID of the emoji used in the channel.
2005
+ */
2006
+ id?: string;
2007
+ }
2008
+ }
2009
+ interface Role {
2010
+ /**
2011
+ * ID of the role in the Discord server.
2012
+ */
2013
+ id: string;
2014
+ }
2015
+ }
2016
+ interface DripQuestsToComplete {
2017
+ /**
2018
+ * ID of the drip quest to complete.
2019
+ */
2020
+ id: string;
2021
+ }
2022
+ /**
2023
+ * Liquidity pool details.
2024
+ */
2025
+ interface Liquidity {
2026
+ /**
2027
+ * Calculation type of the liquidity pool.
2028
+ */
2029
+ calculationType?: 'fixed' | 'custom';
2030
+ /**
2031
+ * Custom function to calculate the the reward amount based on the liquidity
2032
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2033
+ * USD.
2034
+ */
2035
+ customFunction?: string;
2036
+ /**
2037
+ * Liquidity provided per day in USD
2038
+ */
2039
+ liquidityPerDay?: number;
2040
+ /**
2041
+ * Blockchain network of the liquidity pool.
2042
+ */
2043
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'nexusTestnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'skaleEuropa' | 'skaleCalypso' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp' | 'somnia' | 'zkverify' | 'polkadot' | 'kusama' | 'flow_cadence';
2044
+ /**
2045
+ * Indicates if only in-range liquidity is rewarded.
2046
+ */
2047
+ onlyRewardInRangeLiquidity?: boolean;
2048
+ /**
2049
+ * Array of liquidity pools associated with the rule.
2050
+ */
2051
+ pools?: Array<Liquidity.Pool>;
2052
+ /**
2053
+ * Protocol of the liquidity pool.
2054
+ */
2055
+ protocol?: string;
2056
+ }
2057
+ namespace Liquidity {
2058
+ interface Pool {
2059
+ /**
2060
+ * Unique identifier of the liquidity pool.
2061
+ */
2062
+ id: string;
2063
+ }
2064
+ }
2065
+ interface Range {
2066
+ /**
2067
+ * Reward amount for this range.
2068
+ */
2069
+ amount: number;
2070
+ /**
2071
+ * End value of the range.
2072
+ */
2073
+ endRange: number;
2074
+ /**
2075
+ * Start value of the range.
2076
+ */
2077
+ startRange: number;
2078
+ /**
2079
+ * ID of the loyalty badge for this range.
2080
+ */
2081
+ loyaltyBadgeId?: string;
2082
+ /**
2083
+ * Amount of the loyalty multiplier for this range.
2084
+ */
2085
+ loyaltyMultiplierAmount?: number;
2086
+ }
2087
+ /**
2088
+ * Object defining referral requirements.
2089
+ */
2090
+ interface ReferralRequirements {
2091
+ /**
2092
+ * Flag indicating if achieving points is required.
2093
+ */
2094
+ achievePoints?: boolean | null;
2095
+ /**
2096
+ * Flag indicating if completing the profile is required.
2097
+ */
2098
+ completeProfile?: boolean | null;
2099
+ /**
2100
+ * Flag indicating if connecting Discord is required.
2101
+ */
2102
+ connectDiscord?: boolean | null;
2103
+ /**
2104
+ * Flag indicating if connecting email is required.
2105
+ */
2106
+ connectEmail?: boolean | null;
2107
+ /**
2108
+ * Flag indicating if connecting Twitter is required.
2109
+ */
2110
+ connectTwitter?: boolean | null;
2111
+ points?: ReferralRequirements.Points | null;
2112
+ }
2113
+ namespace ReferralRequirements {
2114
+ interface Points {
2115
+ /**
2116
+ * Points required for referral.
2117
+ */
2118
+ amount?: number | null;
2119
+ /**
2120
+ * ID of the loyalty currency for referral.
2121
+ */
2122
+ loyaltyCurrecyId?: string | null;
2123
+ }
2124
+ }
2125
+ /**
2126
+ * Object containing details of the associated smart contract.
2127
+ */
2128
+ interface SmartContract {
2129
+ /**
2130
+ * Mapping of addresses for the smart contract.
2131
+ */
2132
+ addressMapping?: string | null;
2133
+ /**
2134
+ * Object containing details of the amount multiplier from the event.
2135
+ */
2136
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2137
+ /**
2138
+ * ID of the smart contract.
2139
+ */
2140
+ contractId?: string | null;
2141
+ /**
2142
+ * Criteria to evaluate the smart contract event.
2143
+ */
2144
+ criteria?: 'everyEvent' | 'byParameter' | null;
2145
+ /**
2146
+ * Event emitted by the smart contract.
2147
+ */
2148
+ event?: string | null;
2149
+ /**
2150
+ * Array of parameters for the smart contract.
2151
+ */
2152
+ params?: Array<SmartContract.Param> | null;
2153
+ /**
2154
+ * Type of the smart contract interaction.
2155
+ */
2156
+ type?: 'function' | 'event' | null;
2157
+ }
2158
+ namespace SmartContract {
2159
+ /**
2160
+ * Object containing details of the amount multiplier from the event.
2161
+ */
2162
+ interface AmountMultiplier {
2163
+ /**
2164
+ * Mapping of the value for the smart contract.
2165
+ */
2166
+ valueMapping?: string | null;
2167
+ }
2168
+ interface Param {
2169
+ /**
2170
+ * Condition to check for the parameter.
2171
+ */
2172
+ condition?: string | null;
2173
+ /**
2174
+ * Name of the smart contract parameter.
2175
+ */
2176
+ name?: string | null;
2177
+ /**
2178
+ * Value of the parameter.
2179
+ */
2180
+ value?: string | null;
2181
+ }
2182
+ }
2183
+ interface SnapshotProposal {
2184
+ /**
2185
+ * ID of the snapshot proposal.
2186
+ */
2187
+ id: string;
2188
+ /**
2189
+ * Space associated with the snapshot proposal.
2190
+ */
2191
+ space: string;
2192
+ }
2193
+ interface StreakArray {
2194
+ /**
2195
+ * Reward amount for achieving the streak milestone.
2196
+ */
2197
+ streakAmount: number;
2198
+ /**
2199
+ * Milestone required to achieve the streak.
2200
+ */
2201
+ streakMilestone: number;
2202
+ }
2203
+ /**
2204
+ * Metadata for swap loyalty rules
2205
+ */
2206
+ interface Swap {
2207
+ provider?: 'any' | 'relay' | 'lifi';
2208
+ relayReferrerId?: string;
2209
+ requireCrossChainSwap?: boolean;
2210
+ swappedToChain?: 'any' | number | string;
2211
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2212
+ tokenMode?: 'any' | 'specific';
2213
+ trackTokenAmount?: boolean;
2214
+ }
2215
+ namespace Swap {
2216
+ interface SwappedToToken {
2217
+ address: string;
2218
+ chainId: string;
2219
+ }
2220
+ }
2221
+ }
252
2222
  }
253
2223
  /**
254
2224
  * Previous data of the rule before the edit
@@ -261,7 +2231,7 @@ export declare namespace RuleEditRestoreResponse {
261
2231
  /**
262
2232
  * Amount associated with the loyalty rule
263
2233
  */
264
- amount: number;
2234
+ amount: number | null;
265
2235
  /**
266
2236
  * Timestamp when the loyalty rule was created
267
2237
  */
@@ -270,14 +2240,34 @@ export declare namespace RuleEditRestoreResponse {
270
2240
  * Timestamp when the loyalty rule was deleted (if applicable)
271
2241
  */
272
2242
  deletedAt: string | null;
2243
+ /**
2244
+ * Description of the loyalty rule
2245
+ */
2246
+ description: string;
2247
+ /**
2248
+ * End time of the loyalty rule
2249
+ */
2250
+ endTime: string | null;
273
2251
  /**
274
2252
  * Frequency of the loyalty rule
275
2253
  */
276
2254
  frequency: string;
2255
+ /**
2256
+ * Name of the loyalty rule
2257
+ */
2258
+ name: string;
277
2259
  /**
278
2260
  * Unique identifier for the organization
279
2261
  */
280
2262
  organizationId: string;
2263
+ /**
2264
+ * Type of the reward
2265
+ */
2266
+ rewardType: 'points' | 'multiplier' | 'badge';
2267
+ /**
2268
+ * Start time of the loyalty rule
2269
+ */
2270
+ startTime: string | null;
281
2271
  /**
282
2272
  * Type of the loyalty rule
283
2273
  */
@@ -294,10 +2284,642 @@ export declare namespace RuleEditRestoreResponse {
294
2284
  * Optional address of the collection
295
2285
  */
296
2286
  collectionAddress?: string;
2287
+ /**
2288
+ * URL of the media associated with the loyalty rule
2289
+ */
2290
+ mediaUrl?: string | null;
297
2291
  /**
298
2292
  * Optional metadata for the loyalty rule
299
2293
  */
300
- metadata?: Record<string, unknown>;
2294
+ metadata?: {
2295
+ [key: string]: PreviousData.Metadata;
2296
+ };
2297
+ }
2298
+ namespace PreviousData {
2299
+ interface Metadata {
2300
+ /**
2301
+ * Number of tokens per batch.
2302
+ */
2303
+ batchSize?: number | null;
2304
+ /**
2305
+ * Text displayed on the action button.
2306
+ */
2307
+ buttonText?: string | null;
2308
+ /**
2309
+ * Flag indicating if commenting is required.
2310
+ */
2311
+ checkComment?: boolean | null;
2312
+ /**
2313
+ * Flag indicating if liking the post is required.
2314
+ */
2315
+ checkLike?: boolean | null;
2316
+ /**
2317
+ * Flag indicating if reposting is required.
2318
+ */
2319
+ checkRepost?: boolean | null;
2320
+ /**
2321
+ * Text to check in the Twitter post, username, or bio.
2322
+ */
2323
+ checkText?: string | Array<string> | null;
2324
+ /**
2325
+ * Array of collections associated with the rule.
2326
+ */
2327
+ collection?: Array<Metadata.Collection>;
2328
+ /**
2329
+ * Conditions for completing the profile.
2330
+ */
2331
+ completeProfileConditions?: {
2332
+ [key: string]: boolean;
2333
+ } | null;
2334
+ /**
2335
+ * Description of the external rule condition (only for external rules)
2336
+ */
2337
+ conditionDescription?: string;
2338
+ /**
2339
+ * Object containing details for the call-to-action.
2340
+ */
2341
+ cta?: Metadata.Cta | null;
2342
+ /**
2343
+ * API key for custom rewards integration.
2344
+ */
2345
+ customRewardsApiKey?: string;
2346
+ /**
2347
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
2348
+ */
2349
+ directRpc?: boolean;
2350
+ /**
2351
+ * Array of Discord servers, channels, and roles to join.
2352
+ */
2353
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2354
+ /**
2355
+ * Array of drip quests required to complete the rule.
2356
+ */
2357
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2358
+ /**
2359
+ * Flag indicating whether joining Discord servers is required.
2360
+ */
2361
+ enableJoinDiscordServers?: boolean | null;
2362
+ /**
2363
+ * Flag indicating whether streaks are enabled.
2364
+ */
2365
+ enableStreaks?: boolean | null;
2366
+ /**
2367
+ * Flag indicating whether the verified multiplier is enabled.
2368
+ */
2369
+ enableVerifiedMultiplier?: boolean;
2370
+ /**
2371
+ * Type of ERC20 token for the loyalty rule.
2372
+ */
2373
+ erc20Type?: 'erc20' | 'native';
2374
+ /**
2375
+ * Fill source of the order for the token sale
2376
+ */
2377
+ fillSource?: string;
2378
+ /**
2379
+ * Percentage reward given to a user for their first referral.
2380
+ */
2381
+ firstReferralReward?: number | null;
2382
+ /**
2383
+ * Flag indicating whether the fill source is included.
2384
+ */
2385
+ hasFillSource?: boolean;
2386
+ /**
2387
+ * Indicates if the item has never been sold.
2388
+ */
2389
+ hasNeverSold?: boolean;
2390
+ /**
2391
+ * Indicates if the full royalty has been paid for items.
2392
+ */
2393
+ hasPaidFullRoyalty?: boolean;
2394
+ /**
2395
+ * Flag indicating if the sale currency is included.
2396
+ */
2397
+ hasSaleCurrency?: boolean;
2398
+ /**
2399
+ * Indicates if the user has a verified Twitter account.
2400
+ */
2401
+ hasVerifiedTwitter?: boolean;
2402
+ /**
2403
+ * URL of the image associated with the rule.
2404
+ */
2405
+ imageUrl?: string | null;
2406
+ /**
2407
+ * If enabled, the first transaction done on the platform will complete this rule
2408
+ */
2409
+ isCheckInOnEveryTxn?: boolean;
2410
+ /**
2411
+ * Indicates if the multiplier has been applied to rewards.
2412
+ */
2413
+ isMultiplierApplied?: boolean;
2414
+ /**
2415
+ * Flag indicating if the rule is restricted to new users.
2416
+ */
2417
+ isRestrictedToNewUsers?: boolean;
2418
+ /**
2419
+ * Flag indicating if rewards are applied retroactively.
2420
+ */
2421
+ isRetroactive?: boolean | null;
2422
+ /**
2423
+ * Flag indicating if the token hold multiplier is applied.
2424
+ */
2425
+ isTokenHoldMultiplier?: boolean;
2426
+ /**
2427
+ * Optional link associated with the metadata.
2428
+ */
2429
+ link?: string | null;
2430
+ /**
2431
+ * Liquidity pool details.
2432
+ */
2433
+ liquidity?: Metadata.Liquidity;
2434
+ /**
2435
+ * Maximum quantity constraint for token holding.
2436
+ */
2437
+ maxQty?: number | null;
2438
+ /**
2439
+ * Minimum quantity constraint for token holding.
2440
+ */
2441
+ minQty?: number | null;
2442
+ /**
2443
+ * Array of loyalty currency IDs used for multipliers.
2444
+ */
2445
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
2446
+ /**
2447
+ * Flag indicating whether to include only known users.
2448
+ */
2449
+ onlyKnownUsers?: boolean;
2450
+ /**
2451
+ * Flag indicating whether to include only native tokens.
2452
+ */
2453
+ onlyNative?: boolean;
2454
+ /**
2455
+ * Flag indicating whether to include only non-listed items.
2456
+ */
2457
+ onlyNonListed?: boolean;
2458
+ /**
2459
+ * Indicates if only existing users are rewarded.
2460
+ */
2461
+ onlyRewardExistingUser?: boolean;
2462
+ /**
2463
+ * give points for only one token ownership per contract
2464
+ */
2465
+ onlyRewardSingleTokenOwnership?: boolean | null;
2466
+ /**
2467
+ * Promotional code associated with the rule.
2468
+ */
2469
+ promoCode?: string;
2470
+ /**
2471
+ * URL of the CSV file containing promo codes.
2472
+ */
2473
+ promoCodeCsvUrl?: string;
2474
+ /**
2475
+ * Numbers of the promotional code to be generated.
2476
+ */
2477
+ promoCodeLength?: number | null;
2478
+ /**
2479
+ * Type of the promotional code.
2480
+ */
2481
+ promoCodeType?: 'code' | 'csv' | 'generate';
2482
+ /**
2483
+ * Array defining ranges and corresponding rewards.
2484
+ */
2485
+ range?: Array<Metadata.Range>;
2486
+ /**
2487
+ * Object defining referral requirements.
2488
+ */
2489
+ referralRequirements?: Metadata.ReferralRequirements | null;
2490
+ /**
2491
+ * Lump sum reward given to a referrer.
2492
+ */
2493
+ referrerReward?: number | null;
2494
+ /**
2495
+ * Loyalty currency ID of the referrer reward.
2496
+ */
2497
+ referrerRewardLoyaltyCurrencyId?: string | null;
2498
+ /**
2499
+ * Flag indicating if the post link is required.
2500
+ */
2501
+ requirePostLink?: boolean | null;
2502
+ /**
2503
+ * Flag indicating if media metadata is required.
2504
+ */
2505
+ requirePostMediaLink?: boolean | null;
2506
+ /**
2507
+ * Flag indicating if the rule can also reward badges per range.
2508
+ */
2509
+ rewardBadgePerRange?: boolean;
2510
+ /**
2511
+ * Flag indicating if the reward is rewarded by batch.
2512
+ */
2513
+ rewardByBatch?: boolean | null;
2514
+ /**
2515
+ * Criteria to evaluate the reward.
2516
+ */
2517
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
2518
+ /**
2519
+ * Flag indicating if the reward is rewarded per action.
2520
+ */
2521
+ rewardPerAction?: boolean | null;
2522
+ /**
2523
+ * Flag indicating if rewards are given per impression.
2524
+ */
2525
+ rewardPerImpression?: boolean | null;
2526
+ /**
2527
+ * Flag indicating if the rule should reward based on value of traded tokens
2528
+ * instead of count.
2529
+ */
2530
+ rewardPerValue?: boolean;
2531
+ /**
2532
+ * Wallet address of the user can only be used if userId is not provided
2533
+ */
2534
+ royaltyAddress?: string;
2535
+ /**
2536
+ * Royalty percentage of the item.
2537
+ */
2538
+ royaltyPercentage?: number;
2539
+ /**
2540
+ * Currency associated with sales.
2541
+ */
2542
+ saleCurrency?: string;
2543
+ /**
2544
+ * Percentage reward given for a second-level referral.
2545
+ */
2546
+ secondReferralReward?: number | null;
2547
+ /**
2548
+ * Flag indicating if the multiplier is skipped.
2549
+ */
2550
+ skipMultiplier?: boolean | null;
2551
+ /**
2552
+ * Object containing details of the associated smart contract.
2553
+ */
2554
+ smartContract?: Metadata.SmartContract;
2555
+ /**
2556
+ * Array of snapshot proposals for the rule.
2557
+ */
2558
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
2559
+ /**
2560
+ * Social media platform associated with the rule.
2561
+ */
2562
+ socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
2563
+ /**
2564
+ * URL of the social platform's logo.
2565
+ */
2566
+ socialPlatformLogo?: string | null;
2567
+ /**
2568
+ * Name of the social platform.
2569
+ */
2570
+ socialPlatformName?: string | null;
2571
+ /**
2572
+ * ID of the Steam app.
2573
+ */
2574
+ steamAppId?: string | null;
2575
+ /**
2576
+ * Array of streak milestones and corresponding rewards.
2577
+ */
2578
+ streakArray?: Array<Metadata.StreakArray> | null;
2579
+ /**
2580
+ * Metadata for swap loyalty rules
2581
+ */
2582
+ swap?: Metadata.Swap;
2583
+ /**
2584
+ * ID of the Telegram channel.
2585
+ */
2586
+ telegramChannelId?: string | null;
2587
+ /**
2588
+ * Time delay in seconds to verify actions.
2589
+ */
2590
+ timeDelayToVerifySeconds?: string | number | null;
2591
+ /**
2592
+ * Flag indicating if all contracts are tracked.
2593
+ */
2594
+ trackAllContracts?: boolean | null;
2595
+ /**
2596
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2597
+ * completed once the progress is 100%.
2598
+ */
2599
+ trackProgress?: boolean | null;
2600
+ /**
2601
+ * URL of the associated Twitter account.
2602
+ */
2603
+ twitterAccountUrl?: string;
2604
+ /**
2605
+ * Hashtag associated with the Twitter post.
2606
+ */
2607
+ twitterHashtag?: string;
2608
+ /**
2609
+ * URL of the associated Twitter post.
2610
+ */
2611
+ twitterPostUrl?: string;
2612
+ /**
2613
+ * Unique identifier of the Twitter user.
2614
+ */
2615
+ twitterUserId?: string;
2616
+ /**
2617
+ * Twitter username of the user.
2618
+ */
2619
+ twitterUsername?: string;
2620
+ /**
2621
+ * Minimum length of the verification text.
2622
+ */
2623
+ verificationTextMinimumLength?: number | null;
2624
+ /**
2625
+ * Multiplier applied to rewards for verified users.
2626
+ */
2627
+ verifiedMultiplier?: number | null;
2628
+ /**
2629
+ * Placeholder text for verification input fields.
2630
+ */
2631
+ verifyPlaceHolderText?: string | null;
2632
+ /**
2633
+ * Type of wallet associated with the rule.
2634
+ */
2635
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | 'flow_cadence' | 'substrate' | null;
2636
+ /**
2637
+ * ID of the Youtube channel.
2638
+ */
2639
+ youtubeChannelId?: string | null;
2640
+ /**
2641
+ * ID of the Youtube video.
2642
+ */
2643
+ youtubeVideoId?: string | null;
2644
+ }
2645
+ namespace Metadata {
2646
+ interface Collection {
2647
+ /**
2648
+ * Blockchain address of the collection.
2649
+ */
2650
+ address?: string;
2651
+ /**
2652
+ * Multiplier applied to the rewards for this collection.
2653
+ */
2654
+ multiplier?: number;
2655
+ /**
2656
+ * Blockchain network of the collection.
2657
+ */
2658
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'nexusTestnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'skaleEuropa' | 'skaleCalypso' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp' | 'somnia' | 'zkverify' | 'polkadot' | 'kusama' | 'flow_cadence';
2659
+ }
2660
+ /**
2661
+ * Object containing details for the call-to-action.
2662
+ */
2663
+ interface Cta {
2664
+ /**
2665
+ * Link for the call-to-action.
2666
+ */
2667
+ href?: string | null;
2668
+ /**
2669
+ * Label for the call-to-action.
2670
+ */
2671
+ label?: string | null;
2672
+ }
2673
+ interface DiscordServersToJoin {
2674
+ /**
2675
+ * ID of the Discord server to join.
2676
+ */
2677
+ id?: string;
2678
+ /**
2679
+ * Array of Discord channels to join.
2680
+ */
2681
+ channels?: Array<DiscordServersToJoin.Channel>;
2682
+ /**
2683
+ * Array of roles to assign in the Discord server.
2684
+ */
2685
+ roles?: Array<DiscordServersToJoin.Role>;
2686
+ }
2687
+ namespace DiscordServersToJoin {
2688
+ interface Channel {
2689
+ /**
2690
+ * ID of the Discord channel.
2691
+ */
2692
+ id?: string;
2693
+ /**
2694
+ * Array of emojis used in the channel.
2695
+ */
2696
+ emojis?: Array<Channel.Emoji>;
2697
+ /**
2698
+ * Phrase of text to be present in the discord message
2699
+ */
2700
+ text?: string;
2701
+ }
2702
+ namespace Channel {
2703
+ interface Emoji {
2704
+ /**
2705
+ * ID of the emoji used in the channel.
2706
+ */
2707
+ id?: string;
2708
+ }
2709
+ }
2710
+ interface Role {
2711
+ /**
2712
+ * ID of the role in the Discord server.
2713
+ */
2714
+ id: string;
2715
+ }
2716
+ }
2717
+ interface DripQuestsToComplete {
2718
+ /**
2719
+ * ID of the drip quest to complete.
2720
+ */
2721
+ id: string;
2722
+ }
2723
+ /**
2724
+ * Liquidity pool details.
2725
+ */
2726
+ interface Liquidity {
2727
+ /**
2728
+ * Calculation type of the liquidity pool.
2729
+ */
2730
+ calculationType?: 'fixed' | 'custom';
2731
+ /**
2732
+ * Custom function to calculate the the reward amount based on the liquidity
2733
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2734
+ * USD.
2735
+ */
2736
+ customFunction?: string;
2737
+ /**
2738
+ * Liquidity provided per day in USD
2739
+ */
2740
+ liquidityPerDay?: number;
2741
+ /**
2742
+ * Blockchain network of the liquidity pool.
2743
+ */
2744
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'nexusTestnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'skaleEuropa' | 'skaleCalypso' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'ultra' | 'ultraTestnet' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp' | 'somnia' | 'zkverify' | 'polkadot' | 'kusama' | 'flow_cadence';
2745
+ /**
2746
+ * Indicates if only in-range liquidity is rewarded.
2747
+ */
2748
+ onlyRewardInRangeLiquidity?: boolean;
2749
+ /**
2750
+ * Array of liquidity pools associated with the rule.
2751
+ */
2752
+ pools?: Array<Liquidity.Pool>;
2753
+ /**
2754
+ * Protocol of the liquidity pool.
2755
+ */
2756
+ protocol?: string;
2757
+ }
2758
+ namespace Liquidity {
2759
+ interface Pool {
2760
+ /**
2761
+ * Unique identifier of the liquidity pool.
2762
+ */
2763
+ id: string;
2764
+ }
2765
+ }
2766
+ interface Range {
2767
+ /**
2768
+ * Reward amount for this range.
2769
+ */
2770
+ amount: number;
2771
+ /**
2772
+ * End value of the range.
2773
+ */
2774
+ endRange: number;
2775
+ /**
2776
+ * Start value of the range.
2777
+ */
2778
+ startRange: number;
2779
+ /**
2780
+ * ID of the loyalty badge for this range.
2781
+ */
2782
+ loyaltyBadgeId?: string;
2783
+ /**
2784
+ * Amount of the loyalty multiplier for this range.
2785
+ */
2786
+ loyaltyMultiplierAmount?: number;
2787
+ }
2788
+ /**
2789
+ * Object defining referral requirements.
2790
+ */
2791
+ interface ReferralRequirements {
2792
+ /**
2793
+ * Flag indicating if achieving points is required.
2794
+ */
2795
+ achievePoints?: boolean | null;
2796
+ /**
2797
+ * Flag indicating if completing the profile is required.
2798
+ */
2799
+ completeProfile?: boolean | null;
2800
+ /**
2801
+ * Flag indicating if connecting Discord is required.
2802
+ */
2803
+ connectDiscord?: boolean | null;
2804
+ /**
2805
+ * Flag indicating if connecting email is required.
2806
+ */
2807
+ connectEmail?: boolean | null;
2808
+ /**
2809
+ * Flag indicating if connecting Twitter is required.
2810
+ */
2811
+ connectTwitter?: boolean | null;
2812
+ points?: ReferralRequirements.Points | null;
2813
+ }
2814
+ namespace ReferralRequirements {
2815
+ interface Points {
2816
+ /**
2817
+ * Points required for referral.
2818
+ */
2819
+ amount?: number | null;
2820
+ /**
2821
+ * ID of the loyalty currency for referral.
2822
+ */
2823
+ loyaltyCurrecyId?: string | null;
2824
+ }
2825
+ }
2826
+ /**
2827
+ * Object containing details of the associated smart contract.
2828
+ */
2829
+ interface SmartContract {
2830
+ /**
2831
+ * Mapping of addresses for the smart contract.
2832
+ */
2833
+ addressMapping?: string | null;
2834
+ /**
2835
+ * Object containing details of the amount multiplier from the event.
2836
+ */
2837
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2838
+ /**
2839
+ * ID of the smart contract.
2840
+ */
2841
+ contractId?: string | null;
2842
+ /**
2843
+ * Criteria to evaluate the smart contract event.
2844
+ */
2845
+ criteria?: 'everyEvent' | 'byParameter' | null;
2846
+ /**
2847
+ * Event emitted by the smart contract.
2848
+ */
2849
+ event?: string | null;
2850
+ /**
2851
+ * Array of parameters for the smart contract.
2852
+ */
2853
+ params?: Array<SmartContract.Param> | null;
2854
+ /**
2855
+ * Type of the smart contract interaction.
2856
+ */
2857
+ type?: 'function' | 'event' | null;
2858
+ }
2859
+ namespace SmartContract {
2860
+ /**
2861
+ * Object containing details of the amount multiplier from the event.
2862
+ */
2863
+ interface AmountMultiplier {
2864
+ /**
2865
+ * Mapping of the value for the smart contract.
2866
+ */
2867
+ valueMapping?: string | null;
2868
+ }
2869
+ interface Param {
2870
+ /**
2871
+ * Condition to check for the parameter.
2872
+ */
2873
+ condition?: string | null;
2874
+ /**
2875
+ * Name of the smart contract parameter.
2876
+ */
2877
+ name?: string | null;
2878
+ /**
2879
+ * Value of the parameter.
2880
+ */
2881
+ value?: string | null;
2882
+ }
2883
+ }
2884
+ interface SnapshotProposal {
2885
+ /**
2886
+ * ID of the snapshot proposal.
2887
+ */
2888
+ id: string;
2889
+ /**
2890
+ * Space associated with the snapshot proposal.
2891
+ */
2892
+ space: string;
2893
+ }
2894
+ interface StreakArray {
2895
+ /**
2896
+ * Reward amount for achieving the streak milestone.
2897
+ */
2898
+ streakAmount: number;
2899
+ /**
2900
+ * Milestone required to achieve the streak.
2901
+ */
2902
+ streakMilestone: number;
2903
+ }
2904
+ /**
2905
+ * Metadata for swap loyalty rules
2906
+ */
2907
+ interface Swap {
2908
+ provider?: 'any' | 'relay' | 'lifi';
2909
+ relayReferrerId?: string;
2910
+ requireCrossChainSwap?: boolean;
2911
+ swappedToChain?: 'any' | number | string;
2912
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2913
+ tokenMode?: 'any' | 'specific';
2914
+ trackTokenAmount?: boolean;
2915
+ }
2916
+ namespace Swap {
2917
+ interface SwappedToToken {
2918
+ address: string;
2919
+ chainId: string;
2920
+ }
2921
+ }
2922
+ }
301
2923
  }
302
2924
  }
303
2925
  export interface RuleEditListParams {