@snagsolutions/sdk 0.1.0-alpha.20 → 0.1.0-alpha.201

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