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

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