@snagsolutions/sdk 0.1.0-alpha.17 → 0.1.0-alpha.171

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 (278) hide show
  1. package/CHANGELOG.md +1408 -0
  2. package/README.md +13 -23
  3. package/core.d.ts +19 -5
  4. package/core.d.ts.map +1 -1
  5. package/core.js +24 -17
  6. package/core.js.map +1 -1
  7. package/core.mjs +24 -17
  8. package/core.mjs.map +1 -1
  9. package/index.d.mts +9 -6
  10. package/index.d.ts +9 -6
  11. package/index.d.ts.map +1 -1
  12. package/index.js +8 -4
  13. package/index.js.map +1 -1
  14. package/index.mjs +9 -5
  15. package/index.mjs.map +1 -1
  16. package/package.json +4 -5
  17. package/resource.d.ts +1 -1
  18. package/resource.d.ts.map +1 -1
  19. package/resource.js.map +1 -1
  20. package/resource.mjs.map +1 -1
  21. package/resources/assets.d.ts +16 -2
  22. package/resources/assets.d.ts.map +1 -1
  23. package/resources/assets.js +8 -0
  24. package/resources/assets.js.map +1 -1
  25. package/resources/assets.mjs +8 -0
  26. package/resources/assets.mjs.map +1 -1
  27. package/resources/auctions/auctions.d.ts +285 -0
  28. package/resources/auctions/auctions.d.ts.map +1 -0
  29. package/resources/auctions/auctions.js +76 -0
  30. package/resources/auctions/auctions.js.map +1 -0
  31. package/resources/auctions/auctions.mjs +49 -0
  32. package/resources/auctions/auctions.mjs.map +1 -0
  33. package/resources/auctions/index.d.ts +3 -0
  34. package/resources/auctions/index.d.ts.map +1 -0
  35. package/resources/auctions/index.js +9 -0
  36. package/resources/auctions/index.js.map +1 -0
  37. package/resources/auctions/index.mjs +4 -0
  38. package/resources/auctions/index.mjs.map +1 -0
  39. package/resources/auctions/website-user-attributes/index.d.ts +3 -0
  40. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
  41. package/resources/auctions/website-user-attributes/index.js +9 -0
  42. package/resources/auctions/website-user-attributes/index.js.map +1 -0
  43. package/resources/auctions/website-user-attributes/index.mjs +4 -0
  44. package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
  45. package/resources/auctions/website-user-attributes/values.d.ts +76 -0
  46. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  47. package/resources/auctions/website-user-attributes/values.js +35 -0
  48. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  49. package/resources/auctions/website-user-attributes/values.mjs +31 -0
  50. package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
  51. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +92 -0
  52. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
  53. package/resources/auctions/website-user-attributes/website-user-attributes.js +69 -0
  54. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
  55. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +42 -0
  56. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
  57. package/resources/auctions/website-user-attributes.d.ts +2 -0
  58. package/resources/auctions/website-user-attributes.d.ts.map +1 -0
  59. package/resources/auctions/website-user-attributes.js +19 -0
  60. package/resources/auctions/website-user-attributes.js.map +1 -0
  61. package/resources/auctions/website-user-attributes.mjs +3 -0
  62. package/resources/auctions/website-user-attributes.mjs.map +1 -0
  63. package/resources/auctions.d.ts +1 -133
  64. package/resources/auctions.d.ts.map +1 -1
  65. package/resources/auctions.js +15 -22
  66. package/resources/auctions.js.map +1 -1
  67. package/resources/auctions.mjs +1 -20
  68. package/resources/auctions.mjs.map +1 -1
  69. package/resources/auth.d.ts +17 -4
  70. package/resources/auth.d.ts.map +1 -1
  71. package/resources/auth.js.map +1 -1
  72. package/resources/auth.mjs.map +1 -1
  73. package/resources/index.d.ts +3 -3
  74. package/resources/index.d.ts.map +1 -1
  75. package/resources/index.js +1 -1
  76. package/resources/index.js.map +1 -1
  77. package/resources/index.mjs +2 -2
  78. package/resources/index.mjs.map +1 -1
  79. package/resources/loyalty/account-streaks.d.ts +81 -0
  80. package/resources/loyalty/account-streaks.d.ts.map +1 -0
  81. package/resources/loyalty/account-streaks.js +24 -0
  82. package/resources/loyalty/account-streaks.js.map +1 -0
  83. package/resources/loyalty/account-streaks.mjs +20 -0
  84. package/resources/loyalty/account-streaks.mjs.map +1 -0
  85. package/resources/loyalty/accounts.d.ts +58 -16
  86. package/resources/loyalty/accounts.d.ts.map +1 -1
  87. package/resources/loyalty/accounts.js +13 -0
  88. package/resources/loyalty/accounts.js.map +1 -1
  89. package/resources/loyalty/accounts.mjs +13 -0
  90. package/resources/loyalty/accounts.mjs.map +1 -1
  91. package/resources/loyalty/badges.d.ts +472 -22
  92. package/resources/loyalty/badges.d.ts.map +1 -1
  93. package/resources/loyalty/badges.js +19 -1
  94. package/resources/loyalty/badges.js.map +1 -1
  95. package/resources/loyalty/badges.mjs +19 -1
  96. package/resources/loyalty/badges.mjs.map +1 -1
  97. package/resources/loyalty/currencies.d.ts +19 -0
  98. package/resources/loyalty/currencies.d.ts.map +1 -1
  99. package/resources/loyalty/currencies.js +19 -0
  100. package/resources/loyalty/currencies.js.map +1 -1
  101. package/resources/loyalty/currencies.mjs +19 -0
  102. package/resources/loyalty/currencies.mjs.map +1 -1
  103. package/resources/loyalty/index.d.ts +4 -4
  104. package/resources/loyalty/index.d.ts.map +1 -1
  105. package/resources/loyalty/index.js +5 -5
  106. package/resources/loyalty/index.js.map +1 -1
  107. package/resources/loyalty/index.mjs +2 -2
  108. package/resources/loyalty/index.mjs.map +1 -1
  109. package/resources/loyalty/loyalty.d.ts +10 -10
  110. package/resources/loyalty/loyalty.d.ts.map +1 -1
  111. package/resources/loyalty/loyalty.js +6 -6
  112. package/resources/loyalty/loyalty.js.map +1 -1
  113. package/resources/loyalty/loyalty.mjs +7 -7
  114. package/resources/loyalty/loyalty.mjs.map +1 -1
  115. package/resources/loyalty/multipliers.d.ts +39 -2
  116. package/resources/loyalty/multipliers.d.ts.map +1 -1
  117. package/resources/loyalty/multipliers.js +23 -0
  118. package/resources/loyalty/multipliers.js.map +1 -1
  119. package/resources/loyalty/multipliers.mjs +23 -0
  120. package/resources/loyalty/multipliers.mjs.map +1 -1
  121. package/resources/loyalty/questions-responses.d.ts +39 -0
  122. package/resources/loyalty/questions-responses.d.ts.map +1 -1
  123. package/resources/loyalty/questions-responses.js +9 -0
  124. package/resources/loyalty/questions-responses.js.map +1 -1
  125. package/resources/loyalty/questions-responses.mjs +9 -0
  126. package/resources/loyalty/questions-responses.mjs.map +1 -1
  127. package/resources/loyalty/questions.d.ts +37 -2
  128. package/resources/loyalty/questions.d.ts.map +1 -1
  129. package/resources/loyalty/questions.js +31 -0
  130. package/resources/loyalty/questions.js.map +1 -1
  131. package/resources/loyalty/questions.mjs +31 -0
  132. package/resources/loyalty/questions.mjs.map +1 -1
  133. package/resources/loyalty/rule-edits.d.ts +2626 -4
  134. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  135. package/resources/loyalty/rule-edits.js +14 -0
  136. package/resources/loyalty/rule-edits.js.map +1 -1
  137. package/resources/loyalty/rule-edits.mjs +14 -0
  138. package/resources/loyalty/rule-edits.mjs.map +1 -1
  139. package/resources/loyalty/rule-groups.d.ts +273 -58
  140. package/resources/loyalty/rule-groups.d.ts.map +1 -1
  141. package/resources/loyalty/rule-groups.js +36 -0
  142. package/resources/loyalty/rule-groups.js.map +1 -1
  143. package/resources/loyalty/rule-groups.mjs +36 -0
  144. package/resources/loyalty/rule-groups.mjs.map +1 -1
  145. package/resources/loyalty/rules.d.ts +1887 -270
  146. package/resources/loyalty/rules.d.ts.map +1 -1
  147. package/resources/loyalty/rules.js +40 -9
  148. package/resources/loyalty/rules.js.map +1 -1
  149. package/resources/loyalty/rules.mjs +40 -9
  150. package/resources/loyalty/rules.mjs.map +1 -1
  151. package/resources/loyalty/transactions/index.d.ts +3 -0
  152. package/resources/loyalty/transactions/index.d.ts.map +1 -0
  153. package/resources/loyalty/transactions/index.js +9 -0
  154. package/resources/loyalty/transactions/index.js.map +1 -0
  155. package/resources/loyalty/transactions/index.mjs +4 -0
  156. package/resources/loyalty/transactions/index.mjs.map +1 -0
  157. package/resources/loyalty/transactions/rule-statuses.d.ts +61 -0
  158. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  159. package/resources/loyalty/transactions/rule-statuses.js +23 -0
  160. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  161. package/resources/loyalty/transactions/rule-statuses.mjs +19 -0
  162. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  163. package/resources/loyalty/transactions/transactions.d.ts +292 -0
  164. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  165. package/resources/loyalty/transactions/transactions.js +61 -0
  166. package/resources/loyalty/transactions/transactions.js.map +1 -0
  167. package/resources/loyalty/transactions/transactions.mjs +34 -0
  168. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  169. package/resources/loyalty/transactions.d.ts +1 -247
  170. package/resources/loyalty/transactions.d.ts.map +1 -1
  171. package/resources/loyalty/transactions.js +15 -18
  172. package/resources/loyalty/transactions.js.map +1 -1
  173. package/resources/loyalty/transactions.mjs +1 -16
  174. package/resources/loyalty/transactions.mjs.map +1 -1
  175. package/resources/minting.d.ts +5 -5
  176. package/resources/minting.d.ts.map +1 -1
  177. package/resources/referral/referral.d.ts +11 -3
  178. package/resources/referral/referral.d.ts.map +1 -1
  179. package/resources/referral/referral.js +11 -5
  180. package/resources/referral/referral.js.map +1 -1
  181. package/resources/referral/referral.mjs +11 -5
  182. package/resources/referral/referral.mjs.map +1 -1
  183. package/resources/referral/users.d.ts +28 -1
  184. package/resources/referral/users.d.ts.map +1 -1
  185. package/resources/referral/users.js +14 -0
  186. package/resources/referral/users.js.map +1 -1
  187. package/resources/referral/users.mjs +14 -0
  188. package/resources/referral/users.mjs.map +1 -1
  189. package/resources/users/index.d.ts +1 -1
  190. package/resources/users/index.d.ts.map +1 -1
  191. package/resources/users/index.js.map +1 -1
  192. package/resources/users/index.mjs.map +1 -1
  193. package/resources/users/metadatas.d.ts +27 -0
  194. package/resources/users/metadatas.d.ts.map +1 -1
  195. package/resources/users/metadatas.js.map +1 -1
  196. package/resources/users/metadatas.mjs.map +1 -1
  197. package/resources/users/users.d.ts +159 -6
  198. package/resources/users/users.d.ts.map +1 -1
  199. package/resources/users/users.js +53 -1
  200. package/resources/users/users.js.map +1 -1
  201. package/resources/users/users.mjs +53 -1
  202. package/resources/users/users.mjs.map +1 -1
  203. package/resources/websites/index.d.ts +2 -2
  204. package/resources/websites/index.d.ts.map +1 -1
  205. package/resources/websites/index.js.map +1 -1
  206. package/resources/websites/index.mjs +2 -2
  207. package/resources/websites/index.mjs.map +1 -1
  208. package/resources/websites/website-collections.d.ts +0 -69
  209. package/resources/websites/website-collections.d.ts.map +1 -1
  210. package/resources/websites/website-collections.js +0 -16
  211. package/resources/websites/website-collections.js.map +1 -1
  212. package/resources/websites/website-collections.mjs +0 -16
  213. package/resources/websites/website-collections.mjs.map +1 -1
  214. package/resources/websites/website-user-roles.d.ts +23 -0
  215. package/resources/websites/website-user-roles.d.ts.map +1 -1
  216. package/resources/websites/website-user-roles.js +23 -0
  217. package/resources/websites/website-user-roles.js.map +1 -1
  218. package/resources/websites/website-user-roles.mjs +23 -0
  219. package/resources/websites/website-user-roles.mjs.map +1 -1
  220. package/resources/websites/websites.d.ts +8 -98
  221. package/resources/websites/websites.d.ts.map +1 -1
  222. package/resources/websites/websites.js +0 -6
  223. package/resources/websites/websites.js.map +1 -1
  224. package/resources/websites/websites.mjs +1 -7
  225. package/resources/websites/websites.mjs.map +1 -1
  226. package/src/core.ts +39 -16
  227. package/src/index.ts +30 -11
  228. package/src/resource.ts +1 -1
  229. package/src/resources/assets.ts +18 -2
  230. package/src/resources/auctions/auctions.ts +432 -0
  231. package/src/resources/auctions/index.ts +16 -0
  232. package/src/resources/auctions/website-user-attributes/index.ts +10 -0
  233. package/src/resources/auctions/website-user-attributes/values.ts +97 -0
  234. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +137 -0
  235. package/src/resources/auctions/website-user-attributes.ts +3 -0
  236. package/src/resources/auctions.ts +1 -207
  237. package/src/resources/auth.ts +21 -5
  238. package/src/resources/index.ts +12 -8
  239. package/src/resources/loyalty/account-streaks.ts +110 -0
  240. package/src/resources/loyalty/accounts.ts +63 -18
  241. package/src/resources/loyalty/badges.ts +567 -24
  242. package/src/resources/loyalty/currencies.ts +19 -0
  243. package/src/resources/loyalty/index.ts +12 -2
  244. package/src/resources/loyalty/loyalty.ts +33 -9
  245. package/src/resources/loyalty/multipliers.ts +43 -4
  246. package/src/resources/loyalty/questions-responses.ts +45 -0
  247. package/src/resources/loyalty/questions.ts +38 -2
  248. package/src/resources/loyalty/rule-edits.ts +3799 -97
  249. package/src/resources/loyalty/rule-groups.ts +465 -65
  250. package/src/resources/loyalty/rules.ts +2906 -313
  251. package/src/resources/loyalty/transactions/index.ts +10 -0
  252. package/src/resources/loyalty/transactions/rule-statuses.ts +87 -0
  253. package/src/resources/loyalty/transactions/transactions.ts +520 -0
  254. package/src/resources/loyalty/transactions.ts +1 -330
  255. package/src/resources/minting.ts +22 -5
  256. package/src/resources/referral/referral.ts +13 -11
  257. package/src/resources/referral/users.ts +33 -2
  258. package/src/resources/users/index.ts +4 -0
  259. package/src/resources/users/metadatas.ts +52 -0
  260. package/src/resources/users/users.ts +213 -5
  261. package/src/resources/websites/index.ts +2 -13
  262. package/src/resources/websites/website-collections.ts +1 -145
  263. package/src/resources/websites/website-user-roles.ts +23 -0
  264. package/src/resources/websites/websites.ts +8 -134
  265. package/src/version.ts +1 -1
  266. package/version.d.ts +1 -1
  267. package/version.d.ts.map +1 -1
  268. package/version.js +1 -1
  269. package/version.js.map +1 -1
  270. package/version.mjs +1 -1
  271. package/version.mjs.map +1 -1
  272. package/resources/loyalty/rule-chains.d.ts +0 -4
  273. package/resources/loyalty/rule-chains.d.ts.map +0 -1
  274. package/resources/loyalty/rule-chains.js +0 -9
  275. package/resources/loyalty/rule-chains.js.map +0 -1
  276. package/resources/loyalty/rule-chains.mjs +0 -5
  277. package/resources/loyalty/rule-chains.mjs.map +0 -1
  278. package/src/resources/loyalty/rule-chains.ts +0 -5
@@ -7,6 +7,24 @@ import * as Core from '../../core';
7
7
  export class Rules extends APIResource {
8
8
  /**
9
9
  * Create a new Loyalty Rule
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const rule = await client.loyalty.rules.create({
14
+ * amount: '10.5',
15
+ * effectiveEndTime: '2024-12-31T23:59:00Z',
16
+ * effectiveStartTime: '2024-01-01T00:00:00Z',
17
+ * endTime: '2024-12-31T23:59:00Z',
18
+ * frequency: 'daily',
19
+ * loyaltyCurrencyId: '456e1234-e89b-12d3-a456-426614174003',
20
+ * metadata: {},
21
+ * name: 'Referral Bonus Rule',
22
+ * organizationId: '123e4567-e89b-12d3-a456-426614174001',
23
+ * startTime: '2024-01-01T00:00:00Z',
24
+ * type: 'Bonus',
25
+ * websiteId: '123e4567-e89b-12d3-a456-426614174002',
26
+ * });
27
+ * ```
10
28
  */
11
29
  create(body: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse> {
12
30
  return this._client.post('/api/loyalty/rules', { body, ...options });
@@ -14,6 +32,18 @@ export class Rules extends APIResource {
14
32
 
15
33
  /**
16
34
  * Update an existing Loyalty Rule
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const rule = await client.loyalty.rules.update(
39
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
40
+ * {
41
+ * amount: '10.5',
42
+ * endTime: '2024-12-31T23:59:00Z',
43
+ * name: 'Daily Rewards Program',
44
+ * },
45
+ * );
46
+ * ```
17
47
  */
18
48
  update(
19
49
  id: string,
@@ -25,6 +55,11 @@ export class Rules extends APIResource {
25
55
 
26
56
  /**
27
57
  * Retrieve configured loyalty rules with optional pagination and filters
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const rules = await client.loyalty.rules.list();
62
+ * ```
28
63
  */
29
64
  list(query?: RuleListParams, options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
30
65
  list(options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
@@ -40,9 +75,30 @@ export class Rules extends APIResource {
40
75
 
41
76
  /**
42
77
  * Delete an existing Loyalty Rule
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * const rule = await client.loyalty.rules.delete(
82
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
83
+ * );
84
+ * ```
43
85
  */
44
- delete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse> {
45
- return this._client.delete(`/api/loyalty/rules/${id}`, options);
86
+ delete(
87
+ id: string,
88
+ params?: RuleDeleteParams,
89
+ options?: Core.RequestOptions,
90
+ ): Core.APIPromise<RuleDeleteResponse>;
91
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse>;
92
+ delete(
93
+ id: string,
94
+ params: RuleDeleteParams | Core.RequestOptions = {},
95
+ options?: Core.RequestOptions,
96
+ ): Core.APIPromise<RuleDeleteResponse> {
97
+ if (isRequestOptions(params)) {
98
+ return this.delete(id, {}, params);
99
+ }
100
+ const { debitLoyaltyPoints } = params;
101
+ return this._client.delete(`/api/loyalty/rules/${id}`, { query: { debitLoyaltyPoints }, ...options });
46
102
  }
47
103
 
48
104
  /**
@@ -50,7 +106,15 @@ export class Rules extends APIResource {
50
106
  * endpoint currently only supports following rule types code_entry, text_input,
51
107
  * link_click, discord_member, connect_wallet, check_in, external_rule,
52
108
  * drip_x_follow, drip_x_new_tweet, drip_x_text_in_bio, drip_x_text_in_name,
53
- * drip_x_text_in_comment, drip_x_tweet, telegram_join, DiscordMessages
109
+ * drip_x_text_in_comment, drip_x_tweet, telegram_join, DiscordMessages,
110
+ * youtube_subscribers, youtube_comment, steam_wishlist
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * const response = await client.loyalty.rules.complete(
115
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
116
+ * );
117
+ * ```
54
118
  */
55
119
  complete(
56
120
  id: string,
@@ -70,12 +134,26 @@ export class Rules extends APIResource {
70
134
  }
71
135
 
72
136
  /**
73
- * This will return the processing status of quests for a specific user
137
+ * This will return the processing status of quests for a specific user and also
138
+ * the progress of the loyalty rule
139
+ *
140
+ * @example
141
+ * ```ts
142
+ * const response = await client.loyalty.rules.getStatus();
143
+ * ```
74
144
  */
75
145
  getStatus(
76
- query: RuleGetStatusParams,
146
+ query?: RuleGetStatusParams,
147
+ options?: Core.RequestOptions,
148
+ ): Core.APIPromise<RuleGetStatusResponse>;
149
+ getStatus(options?: Core.RequestOptions): Core.APIPromise<RuleGetStatusResponse>;
150
+ getStatus(
151
+ query: RuleGetStatusParams | Core.RequestOptions = {},
77
152
  options?: Core.RequestOptions,
78
153
  ): Core.APIPromise<RuleGetStatusResponse> {
154
+ if (isRequestOptions(query)) {
155
+ return this.getStatus({}, query);
156
+ }
79
157
  return this._client.get('/api/loyalty/rules/status', { query, ...options });
80
158
  }
81
159
  }
@@ -189,7 +267,20 @@ export interface RuleCreateResponse {
189
267
  | 'twitter_like'
190
268
  | 'twitter_post_hashtag'
191
269
  | 'quiz'
192
- | 'poll';
270
+ | 'poll'
271
+ | 'steam_wishlist'
272
+ | 'liquidity_uniswap_v2'
273
+ | 'liquidity_uniswap_v3'
274
+ | 'points_airdrop'
275
+ | 'youtube_subscribers'
276
+ | 'youtube_comment'
277
+ | 'shopify_spend'
278
+ | 'swap'
279
+ | 'tiktok_post'
280
+ | 'post_impressions'
281
+ | 'discord_join'
282
+ | 'connected_youtube'
283
+ | 'connected_tiktok';
193
284
 
194
285
  /**
195
286
  * Unique identifier for the associated website
@@ -201,6 +292,11 @@ export interface RuleCreateResponse {
201
292
  */
202
293
  backgroundAssetUrl?: string;
203
294
 
295
+ /**
296
+ * The type of claim for the reward
297
+ */
298
+ claimType?: 'manual' | 'auto' | null;
299
+
204
300
  /**
205
301
  * Blockchain address of the associated collection
206
302
  */
@@ -226,6 +322,13 @@ export interface RuleCreateResponse {
226
322
  */
227
323
  description?: string;
228
324
 
325
+ duplicatedFromId?: string | null;
326
+
327
+ /**
328
+ * ID of the external integration
329
+ */
330
+ externalIntegrationId?: string | null;
331
+
229
332
  /**
230
333
  * Whether to hide this rule in the user interface
231
334
  */
@@ -234,18 +337,40 @@ export interface RuleCreateResponse {
234
337
  /**
235
338
  * Interval between rule executions
236
339
  */
237
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
340
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
238
341
 
239
342
  /**
240
343
  * Whether this rule is mandatory
241
344
  */
242
345
  isRequired?: boolean;
243
346
 
347
+ /**
348
+ * Unique identifier for the loyalty badge
349
+ */
350
+ loyaltyBadgeId?: string | null;
351
+
244
352
  /**
245
353
  * Unique identifier for the loyalty rule group
246
354
  */
247
355
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
248
356
 
357
+ /**
358
+ * URL for uploading loyalty user allotment via CSV
359
+ */
360
+ loyaltyUserAllotmentCsvUrl?: string;
361
+
362
+ /**
363
+ * The interval for the max amount. Available for the smart contract and external
364
+ * rules.
365
+ */
366
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
367
+
368
+ /**
369
+ * The maximum amount of points a user can earn per interval. Available for the
370
+ * smart contract and external rules.
371
+ */
372
+ maxAmountPerInterval?: number | null;
373
+
249
374
  /**
250
375
  * URL of the media to be displayed
251
376
  */
@@ -255,13 +380,17 @@ export interface RuleCreateResponse {
255
380
  * Blockchain network where the rule will apply
256
381
  */
257
382
  network?:
383
+ | 'abstract'
384
+ | 'abstractTestnet'
258
385
  | 'apechain'
259
386
  | 'arbitrum'
260
387
  | 'avalanche'
261
388
  | 'avalancheFuji'
262
389
  | 'base'
263
390
  | 'baseSepolia'
391
+ | 'berachain'
264
392
  | 'berachainArtio'
393
+ | 'berachainBepolia'
265
394
  | 'binance'
266
395
  | 'bscTestnet'
267
396
  | 'campTestnet'
@@ -269,18 +398,30 @@ export interface RuleCreateResponse {
269
398
  | 'fantomTestnet'
270
399
  | 'flowMainnet'
271
400
  | 'mainnet'
401
+ | 'nexusTestnet'
272
402
  | 'optimism'
273
403
  | 'polygon'
274
404
  | 'polygon_mumbai'
275
405
  | 'skaleNebula'
406
+ | 'skaleEuropa'
407
+ | 'skaleCalypso'
276
408
  | 'solana'
277
409
  | 'sophon'
410
+ | 'sophonTestnet'
278
411
  | 'sui'
279
412
  | 'superseed'
280
413
  | 'superseedSepolia'
281
414
  | 'vanar'
282
415
  | 'xai'
283
416
  | 'zksync'
417
+ | 'coti'
418
+ | 'cotiTestnet'
419
+ | 'morph'
420
+ | 'morphTestnet'
421
+ | 'morphHolesky'
422
+ | 'ultra'
423
+ | 'ultraTestnet'
424
+ | 'nitrograph'
284
425
  | 'sepolia'
285
426
  | 'optimism_sepolia'
286
427
  | 'arbitrumSepolia'
@@ -288,22 +429,38 @@ export interface RuleCreateResponse {
288
429
  | 'optimism_goerli'
289
430
  | 'arbitrumGoerli'
290
431
  | 'basecamp'
291
- | 'abstract';
432
+ | 'somnia'
433
+ | 'flow_cadence';
292
434
 
293
435
  /**
294
436
  * OAuth credentials associated with the rule
295
437
  */
296
438
  oauthCredentialsId?: string | null;
297
439
 
440
+ /**
441
+ * The lifetime of the reward
442
+ */
443
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
444
+
298
445
  /**
299
446
  * Type of reward issued by the rule
300
447
  */
301
- rewardType?: 'points' | 'multiplier';
448
+ rewardType?: 'points' | 'multiplier' | 'badge';
449
+
450
+ /**
451
+ * URL of the Shopify store
452
+ */
453
+ shopifyStoreUrl?: string | null;
454
+
455
+ /**
456
+ * Whether to show this rule before the start time
457
+ */
458
+ showBeforeStart?: boolean;
302
459
 
303
460
  /**
304
- * Identifier for associated subscriptions
461
+ * Optional subscription id for the rule
305
462
  */
306
- subscriptionIdentifier?: string | null;
463
+ subscriptionId?: string | null;
307
464
  }
308
465
 
309
466
  export namespace RuleCreateResponse {
@@ -311,6 +468,11 @@ export namespace RuleCreateResponse {
311
468
  * Additional metadata for the loyalty rule
312
469
  */
313
470
  export interface Metadata {
471
+ /**
472
+ * Number of tokens per batch.
473
+ */
474
+ batchSize?: number | null;
475
+
314
476
  /**
315
477
  * Text displayed on the action button.
316
478
  */
@@ -334,7 +496,7 @@ export namespace RuleCreateResponse {
334
496
  /**
335
497
  * Text to check in the Twitter post, username, or bio.
336
498
  */
337
- checkText?: string | null;
499
+ checkText?: string | Array<string> | null;
338
500
 
339
501
  /**
340
502
  * Array of collections associated with the rule.
@@ -344,7 +506,12 @@ export namespace RuleCreateResponse {
344
506
  /**
345
507
  * Conditions for completing the profile.
346
508
  */
347
- completeProfileConditions?: Record<string, boolean> | null;
509
+ completeProfileConditions?: { [key: string]: boolean } | null;
510
+
511
+ /**
512
+ * Description of the external rule condition (only for external rules)
513
+ */
514
+ conditionDescription?: string;
348
515
 
349
516
  /**
350
517
  * Object containing details for the call-to-action.
@@ -356,6 +523,11 @@ export namespace RuleCreateResponse {
356
523
  */
357
524
  customRewardsApiKey?: string;
358
525
 
526
+ /**
527
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
528
+ */
529
+ directRpc?: boolean;
530
+
359
531
  /**
360
532
  * Array of Discord servers, channels, and roles to join.
361
533
  */
@@ -381,6 +553,11 @@ export namespace RuleCreateResponse {
381
553
  */
382
554
  enableVerifiedMultiplier?: boolean;
383
555
 
556
+ /**
557
+ * Type of ERC20 token for the loyalty rule.
558
+ */
559
+ erc20Type?: 'erc20' | 'native';
560
+
384
561
  /**
385
562
  * Fill source of the order for the token sale
386
563
  */
@@ -401,11 +578,6 @@ export namespace RuleCreateResponse {
401
578
  */
402
579
  hasNeverSold?: boolean;
403
580
 
404
- /**
405
- * Flag indicating whether the order source is included.
406
- */
407
- hasOrderSource?: boolean;
408
-
409
581
  /**
410
582
  * Indicates if the full royalty has been paid for items.
411
583
  */
@@ -426,11 +598,21 @@ export namespace RuleCreateResponse {
426
598
  */
427
599
  imageUrl?: string | null;
428
600
 
601
+ /**
602
+ * If enabled, the first transaction done on the platform will complete this rule
603
+ */
604
+ isCheckInOnEveryTxn?: boolean;
605
+
429
606
  /**
430
607
  * Indicates if the multiplier has been applied to rewards.
431
608
  */
432
609
  isMultiplierApplied?: boolean;
433
610
 
611
+ /**
612
+ * Flag indicating if the rule is restricted to new users.
613
+ */
614
+ isRestrictedToNewUsers?: boolean;
615
+
434
616
  /**
435
617
  * Flag indicating if rewards are applied retroactively.
436
618
  */
@@ -446,6 +628,11 @@ export namespace RuleCreateResponse {
446
628
  */
447
629
  link?: string | null;
448
630
 
631
+ /**
632
+ * Liquidity pool details.
633
+ */
634
+ liquidity?: Metadata.Liquidity;
635
+
449
636
  /**
450
637
  * Maximum quantity constraint for token holding.
451
638
  */
@@ -487,14 +674,24 @@ export namespace RuleCreateResponse {
487
674
  onlyRewardSingleTokenOwnership?: boolean | null;
488
675
 
489
676
  /**
490
- * Order source of the order for the token sale
677
+ * Promotional code associated with the rule.
491
678
  */
492
- orderSource?: string;
679
+ promoCode?: string;
493
680
 
494
681
  /**
495
- * Promotional code associated with the rule.
682
+ * URL of the CSV file containing promo codes.
496
683
  */
497
- promoCode?: string;
684
+ promoCodeCsvUrl?: string;
685
+
686
+ /**
687
+ * Numbers of the promotional code to be generated.
688
+ */
689
+ promoCodeLength?: number | null;
690
+
691
+ /**
692
+ * Type of the promotional code.
693
+ */
694
+ promoCodeType?: 'code' | 'csv' | 'generate';
498
695
 
499
696
  /**
500
697
  * Array defining ranges and corresponding rewards.
@@ -511,11 +708,62 @@ export namespace RuleCreateResponse {
511
708
  */
512
709
  referrerReward?: number | null;
513
710
 
711
+ /**
712
+ * Loyalty currency ID of the referrer reward.
713
+ */
714
+ referrerRewardLoyaltyCurrencyId?: string | null;
715
+
716
+ /**
717
+ * Flag indicating if the post link is required.
718
+ */
719
+ requirePostLink?: boolean | null;
720
+
721
+ /**
722
+ * Flag indicating if media metadata is required.
723
+ */
724
+ requirePostMediaLink?: boolean | null;
725
+
726
+ /**
727
+ * Flag indicating if the rule can also reward badges per range.
728
+ */
729
+ rewardBadgePerRange?: boolean;
730
+
731
+ /**
732
+ * Flag indicating if the reward is rewarded by batch.
733
+ */
734
+ rewardByBatch?: boolean | null;
735
+
736
+ /**
737
+ * Criteria to evaluate the reward.
738
+ */
739
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
740
+
741
+ /**
742
+ * Flag indicating if the reward is rewarded per action.
743
+ */
744
+ rewardPerAction?: boolean | null;
745
+
514
746
  /**
515
747
  * Flag indicating if rewards are given per impression.
516
748
  */
517
749
  rewardPerImpression?: boolean | null;
518
750
 
751
+ /**
752
+ * Flag indicating if the rule should reward based on value of traded tokens
753
+ * instead of count.
754
+ */
755
+ rewardPerValue?: boolean;
756
+
757
+ /**
758
+ * Wallet address of the user can only be used if userId is not provided
759
+ */
760
+ royaltyAddress?: string;
761
+
762
+ /**
763
+ * Royalty percentage of the item.
764
+ */
765
+ royaltyPercentage?: number;
766
+
519
767
  /**
520
768
  * Currency associated with sales.
521
769
  */
@@ -555,6 +803,7 @@ export namespace RuleCreateResponse {
555
803
  | 'Twitch'
556
804
  | 'X(Twitter)'
557
805
  | 'YouTube'
806
+ | 'Google'
558
807
  | null;
559
808
 
560
809
  /**
@@ -567,11 +816,21 @@ export namespace RuleCreateResponse {
567
816
  */
568
817
  socialPlatformName?: string | null;
569
818
 
819
+ /**
820
+ * ID of the Steam app.
821
+ */
822
+ steamAppId?: string | null;
823
+
570
824
  /**
571
825
  * Array of streak milestones and corresponding rewards.
572
826
  */
573
827
  streakArray?: Array<Metadata.StreakArray> | null;
574
828
 
829
+ /**
830
+ * Metadata for swap loyalty rules
831
+ */
832
+ swap?: Metadata.Swap;
833
+
575
834
  /**
576
835
  * ID of the Telegram channel.
577
836
  */
@@ -587,6 +846,12 @@ export namespace RuleCreateResponse {
587
846
  */
588
847
  trackAllContracts?: boolean | null;
589
848
 
849
+ /**
850
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
851
+ * completed once the progress is 100%.
852
+ */
853
+ trackProgress?: boolean | null;
854
+
590
855
  /**
591
856
  * URL of the associated Twitter account.
592
857
  */
@@ -630,7 +895,27 @@ export namespace RuleCreateResponse {
630
895
  /**
631
896
  * Type of wallet associated with the rule.
632
897
  */
633
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
898
+ walletType?:
899
+ | 'evm'
900
+ | 'solana'
901
+ | 'imx'
902
+ | 'sui'
903
+ | 'ton'
904
+ | 'cosmos'
905
+ | 'ultra'
906
+ | 'agw'
907
+ | 'flow_cadence'
908
+ | null;
909
+
910
+ /**
911
+ * ID of the Youtube channel.
912
+ */
913
+ youtubeChannelId?: string | null;
914
+
915
+ /**
916
+ * ID of the Youtube video.
917
+ */
918
+ youtubeVideoId?: string | null;
634
919
  }
635
920
 
636
921
  export namespace Metadata {
@@ -649,13 +934,17 @@ export namespace RuleCreateResponse {
649
934
  * Blockchain network of the collection.
650
935
  */
651
936
  network?:
937
+ | 'abstract'
938
+ | 'abstractTestnet'
652
939
  | 'apechain'
653
940
  | 'arbitrum'
654
941
  | 'avalanche'
655
942
  | 'avalancheFuji'
656
943
  | 'base'
657
944
  | 'baseSepolia'
945
+ | 'berachain'
658
946
  | 'berachainArtio'
947
+ | 'berachainBepolia'
659
948
  | 'binance'
660
949
  | 'bscTestnet'
661
950
  | 'campTestnet'
@@ -663,18 +952,30 @@ export namespace RuleCreateResponse {
663
952
  | 'fantomTestnet'
664
953
  | 'flowMainnet'
665
954
  | 'mainnet'
955
+ | 'nexusTestnet'
666
956
  | 'optimism'
667
957
  | 'polygon'
668
958
  | 'polygon_mumbai'
669
959
  | 'skaleNebula'
960
+ | 'skaleEuropa'
961
+ | 'skaleCalypso'
670
962
  | 'solana'
671
963
  | 'sophon'
964
+ | 'sophonTestnet'
672
965
  | 'sui'
673
966
  | 'superseed'
674
967
  | 'superseedSepolia'
675
968
  | 'vanar'
676
969
  | 'xai'
677
970
  | 'zksync'
971
+ | 'coti'
972
+ | 'cotiTestnet'
973
+ | 'morph'
974
+ | 'morphTestnet'
975
+ | 'morphHolesky'
976
+ | 'ultra'
977
+ | 'ultraTestnet'
978
+ | 'nitrograph'
678
979
  | 'sepolia'
679
980
  | 'optimism_sepolia'
680
981
  | 'arbitrumSepolia'
@@ -682,7 +983,8 @@ export namespace RuleCreateResponse {
682
983
  | 'optimism_goerli'
683
984
  | 'arbitrumGoerli'
684
985
  | 'basecamp'
685
- | 'abstract';
986
+ | 'somnia'
987
+ | 'flow_cadence';
686
988
  }
687
989
 
688
990
  /**
@@ -759,6 +1061,108 @@ export namespace RuleCreateResponse {
759
1061
  id: string;
760
1062
  }
761
1063
 
1064
+ /**
1065
+ * Liquidity pool details.
1066
+ */
1067
+ export interface Liquidity {
1068
+ /**
1069
+ * Calculation type of the liquidity pool.
1070
+ */
1071
+ calculationType?: 'fixed' | 'custom';
1072
+
1073
+ /**
1074
+ * Custom function to calculate the the reward amount based on the liquidity
1075
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
1076
+ * USD.
1077
+ */
1078
+ customFunction?: string;
1079
+
1080
+ /**
1081
+ * Liquidity provided per day in USD
1082
+ */
1083
+ liquidityPerDay?: number;
1084
+
1085
+ /**
1086
+ * Blockchain network of the liquidity pool.
1087
+ */
1088
+ network?:
1089
+ | 'abstract'
1090
+ | 'abstractTestnet'
1091
+ | 'apechain'
1092
+ | 'arbitrum'
1093
+ | 'avalanche'
1094
+ | 'avalancheFuji'
1095
+ | 'base'
1096
+ | 'baseSepolia'
1097
+ | 'berachain'
1098
+ | 'berachainArtio'
1099
+ | 'berachainBepolia'
1100
+ | 'binance'
1101
+ | 'bscTestnet'
1102
+ | 'campTestnet'
1103
+ | 'fantom'
1104
+ | 'fantomTestnet'
1105
+ | 'flowMainnet'
1106
+ | 'mainnet'
1107
+ | 'nexusTestnet'
1108
+ | 'optimism'
1109
+ | 'polygon'
1110
+ | 'polygon_mumbai'
1111
+ | 'skaleNebula'
1112
+ | 'skaleEuropa'
1113
+ | 'skaleCalypso'
1114
+ | 'solana'
1115
+ | 'sophon'
1116
+ | 'sophonTestnet'
1117
+ | 'sui'
1118
+ | 'superseed'
1119
+ | 'superseedSepolia'
1120
+ | 'vanar'
1121
+ | 'xai'
1122
+ | 'zksync'
1123
+ | 'coti'
1124
+ | 'cotiTestnet'
1125
+ | 'morph'
1126
+ | 'morphTestnet'
1127
+ | 'morphHolesky'
1128
+ | 'ultra'
1129
+ | 'ultraTestnet'
1130
+ | 'nitrograph'
1131
+ | 'sepolia'
1132
+ | 'optimism_sepolia'
1133
+ | 'arbitrumSepolia'
1134
+ | 'goerli'
1135
+ | 'optimism_goerli'
1136
+ | 'arbitrumGoerli'
1137
+ | 'basecamp'
1138
+ | 'somnia'
1139
+ | 'flow_cadence';
1140
+
1141
+ /**
1142
+ * Indicates if only in-range liquidity is rewarded.
1143
+ */
1144
+ onlyRewardInRangeLiquidity?: boolean;
1145
+
1146
+ /**
1147
+ * Array of liquidity pools associated with the rule.
1148
+ */
1149
+ pools?: Array<Liquidity.Pool>;
1150
+
1151
+ /**
1152
+ * Protocol of the liquidity pool.
1153
+ */
1154
+ protocol?: string;
1155
+ }
1156
+
1157
+ export namespace Liquidity {
1158
+ export interface Pool {
1159
+ /**
1160
+ * Unique identifier of the liquidity pool.
1161
+ */
1162
+ id: string;
1163
+ }
1164
+ }
1165
+
762
1166
  export interface Range {
763
1167
  /**
764
1168
  * Reward amount for this range.
@@ -774,6 +1178,16 @@ export namespace RuleCreateResponse {
774
1178
  * Start value of the range.
775
1179
  */
776
1180
  startRange: number;
1181
+
1182
+ /**
1183
+ * ID of the loyalty badge for this range.
1184
+ */
1185
+ loyaltyBadgeId?: string;
1186
+
1187
+ /**
1188
+ * Amount of the loyalty multiplier for this range.
1189
+ */
1190
+ loyaltyMultiplierAmount?: number;
777
1191
  }
778
1192
 
779
1193
  /**
@@ -826,20 +1240,15 @@ export namespace RuleCreateResponse {
826
1240
  * Object containing details of the associated smart contract.
827
1241
  */
828
1242
  export interface SmartContract {
829
- /**
830
- * ABI of the smart contract.
831
- */
832
- abi?: string | null;
833
-
834
1243
  /**
835
1244
  * Mapping of addresses for the smart contract.
836
1245
  */
837
1246
  addressMapping?: string | null;
838
1247
 
839
1248
  /**
840
- * Array of bonus details applied to the rule.
1249
+ * Object containing details of the amount multiplier from the event.
841
1250
  */
842
- bonus?: Array<SmartContract.Bonus> | null;
1251
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
843
1252
 
844
1253
  /**
845
1254
  * ID of the smart contract.
@@ -851,68 +1260,31 @@ export namespace RuleCreateResponse {
851
1260
  */
852
1261
  criteria?: 'everyEvent' | 'byParameter' | null;
853
1262
 
854
- /**
855
- * Time range applied to the rule.
856
- */
857
- customRange?: SmartContract.CustomRange | null;
858
-
859
1263
  /**
860
1264
  * Event emitted by the smart contract.
861
1265
  */
862
1266
  event?: string | null;
863
1267
 
864
- /**
865
- * Maximum value allowed for the parameter.
866
- */
867
- max?: number | null;
868
-
869
1268
  /**
870
1269
  * Array of parameters for the smart contract.
871
1270
  */
872
1271
  params?: Array<SmartContract.Param> | null;
873
1272
 
874
1273
  /**
875
- * Flag indicating if a bonus is applied.
876
- */
877
- withBonus?: boolean | null;
878
-
879
- /**
880
- * Flag indicating if a custom range is applied.
881
- */
882
- withCustomRange?: boolean | null;
883
-
884
- /**
885
- * Flag indicating if a maximum limit is applied.
1274
+ * Type of the smart contract interaction.
886
1275
  */
887
- withMax?: boolean | null;
1276
+ type?: 'function' | 'event' | null;
888
1277
  }
889
1278
 
890
1279
  export namespace SmartContract {
891
- export interface Bonus {
892
- /**
893
- * Amount of the bonus.
894
- */
895
- amount?: number | null;
896
-
897
- /**
898
- * Number of times the bonus is applied.
899
- */
900
- count?: number | null;
901
- }
902
-
903
1280
  /**
904
- * Time range applied to the rule.
1281
+ * Object containing details of the amount multiplier from the event.
905
1282
  */
906
- export interface CustomRange {
1283
+ export interface AmountMultiplier {
907
1284
  /**
908
- * End time of the custom range.
1285
+ * Mapping of the value for the smart contract.
909
1286
  */
910
- endsAt?: string | null;
911
-
912
- /**
913
- * Start time of the custom range.
914
- */
915
- startsAt?: string | null;
1287
+ valueMapping?: string | null;
916
1288
  }
917
1289
 
918
1290
  export interface Param {
@@ -956,6 +1328,33 @@ export namespace RuleCreateResponse {
956
1328
  */
957
1329
  streakMilestone: number;
958
1330
  }
1331
+
1332
+ /**
1333
+ * Metadata for swap loyalty rules
1334
+ */
1335
+ export interface Swap {
1336
+ provider?: 'any' | 'relay' | 'lifi';
1337
+
1338
+ relayReferrerId?: string;
1339
+
1340
+ requireCrossChainSwap?: boolean;
1341
+
1342
+ swappedToChain?: 'any' | number | string;
1343
+
1344
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1345
+
1346
+ tokenMode?: 'any' | 'specific';
1347
+
1348
+ trackTokenAmount?: boolean;
1349
+ }
1350
+
1351
+ export namespace Swap {
1352
+ export interface SwappedToToken {
1353
+ address: string;
1354
+
1355
+ chainId: string;
1356
+ }
1357
+ }
959
1358
  }
960
1359
 
961
1360
  export interface Collection {
@@ -968,13 +1367,17 @@ export namespace RuleCreateResponse {
968
1367
  * Blockchain network for the collection
969
1368
  */
970
1369
  network:
1370
+ | 'abstract'
1371
+ | 'abstractTestnet'
971
1372
  | 'apechain'
972
1373
  | 'arbitrum'
973
1374
  | 'avalanche'
974
1375
  | 'avalancheFuji'
975
1376
  | 'base'
976
1377
  | 'baseSepolia'
1378
+ | 'berachain'
977
1379
  | 'berachainArtio'
1380
+ | 'berachainBepolia'
978
1381
  | 'binance'
979
1382
  | 'bscTestnet'
980
1383
  | 'campTestnet'
@@ -982,18 +1385,30 @@ export namespace RuleCreateResponse {
982
1385
  | 'fantomTestnet'
983
1386
  | 'flowMainnet'
984
1387
  | 'mainnet'
1388
+ | 'nexusTestnet'
985
1389
  | 'optimism'
986
1390
  | 'polygon'
987
1391
  | 'polygon_mumbai'
988
1392
  | 'skaleNebula'
1393
+ | 'skaleEuropa'
1394
+ | 'skaleCalypso'
989
1395
  | 'solana'
990
1396
  | 'sophon'
1397
+ | 'sophonTestnet'
991
1398
  | 'sui'
992
1399
  | 'superseed'
993
1400
  | 'superseedSepolia'
994
1401
  | 'vanar'
995
1402
  | 'xai'
996
1403
  | 'zksync'
1404
+ | 'coti'
1405
+ | 'cotiTestnet'
1406
+ | 'morph'
1407
+ | 'morphTestnet'
1408
+ | 'morphHolesky'
1409
+ | 'ultra'
1410
+ | 'ultraTestnet'
1411
+ | 'nitrograph'
997
1412
  | 'sepolia'
998
1413
  | 'optimism_sepolia'
999
1414
  | 'arbitrumSepolia'
@@ -1001,7 +1416,13 @@ export namespace RuleCreateResponse {
1001
1416
  | 'optimism_goerli'
1002
1417
  | 'arbitrumGoerli'
1003
1418
  | 'basecamp'
1004
- | 'abstract';
1419
+ | 'somnia'
1420
+ | 'flow_cadence';
1421
+
1422
+ /**
1423
+ * Symbol of the collection.
1424
+ */
1425
+ symbol?: string;
1005
1426
  }
1006
1427
  }
1007
1428
 
@@ -1023,10 +1444,15 @@ export interface RuleUpdateResponse {
1023
1444
  */
1024
1445
  name: string;
1025
1446
 
1447
+ /**
1448
+ * The type of claim for the reward
1449
+ */
1450
+ claimType?: 'manual' | 'auto' | null;
1451
+
1026
1452
  /**
1027
1453
  * Blockchain address of the associated collection
1028
1454
  */
1029
- collectionAddress?: string;
1455
+ collectionAddress?: string | null;
1030
1456
 
1031
1457
  /**
1032
1458
  * List of associated collections
@@ -1058,6 +1484,11 @@ export interface RuleUpdateResponse {
1058
1484
  */
1059
1485
  effectiveStartTime?: string | null;
1060
1486
 
1487
+ /**
1488
+ * ID of the external integration
1489
+ */
1490
+ externalIntegrationId?: string | null;
1491
+
1061
1492
  /**
1062
1493
  * Frequency of the rule execution
1063
1494
  */
@@ -1071,7 +1502,7 @@ export interface RuleUpdateResponse {
1071
1502
  /**
1072
1503
  * Time interval for recurring rule execution
1073
1504
  */
1074
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1505
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
1075
1506
 
1076
1507
  /**
1077
1508
  * Whether this rule is required for participation
@@ -1083,6 +1514,18 @@ export interface RuleUpdateResponse {
1083
1514
  */
1084
1515
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
1085
1516
 
1517
+ /**
1518
+ * The interval for the max amount. Available for the smart contract and external
1519
+ * rules.
1520
+ */
1521
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
1522
+
1523
+ /**
1524
+ * The maximum amount of points a user can earn per interval. Available for the
1525
+ * smart contract and external rules.
1526
+ */
1527
+ maxAmountPerInterval?: number | null;
1528
+
1086
1529
  /**
1087
1530
  * URL of the media to be displayed
1088
1531
  */
@@ -1097,13 +1540,17 @@ export interface RuleUpdateResponse {
1097
1540
  * Blockchain network where the rule will apply
1098
1541
  */
1099
1542
  network?:
1543
+ | 'abstract'
1544
+ | 'abstractTestnet'
1100
1545
  | 'apechain'
1101
1546
  | 'arbitrum'
1102
1547
  | 'avalanche'
1103
1548
  | 'avalancheFuji'
1104
1549
  | 'base'
1105
1550
  | 'baseSepolia'
1551
+ | 'berachain'
1106
1552
  | 'berachainArtio'
1553
+ | 'berachainBepolia'
1107
1554
  | 'binance'
1108
1555
  | 'bscTestnet'
1109
1556
  | 'campTestnet'
@@ -1111,18 +1558,30 @@ export interface RuleUpdateResponse {
1111
1558
  | 'fantomTestnet'
1112
1559
  | 'flowMainnet'
1113
1560
  | 'mainnet'
1561
+ | 'nexusTestnet'
1114
1562
  | 'optimism'
1115
1563
  | 'polygon'
1116
1564
  | 'polygon_mumbai'
1117
1565
  | 'skaleNebula'
1566
+ | 'skaleEuropa'
1567
+ | 'skaleCalypso'
1118
1568
  | 'solana'
1119
1569
  | 'sophon'
1570
+ | 'sophonTestnet'
1120
1571
  | 'sui'
1121
1572
  | 'superseed'
1122
1573
  | 'superseedSepolia'
1123
1574
  | 'vanar'
1124
1575
  | 'xai'
1125
1576
  | 'zksync'
1577
+ | 'coti'
1578
+ | 'cotiTestnet'
1579
+ | 'morph'
1580
+ | 'morphTestnet'
1581
+ | 'morphHolesky'
1582
+ | 'ultra'
1583
+ | 'ultraTestnet'
1584
+ | 'nitrograph'
1126
1585
  | 'sepolia'
1127
1586
  | 'optimism_sepolia'
1128
1587
  | 'arbitrumSepolia'
@@ -1130,17 +1589,33 @@ export interface RuleUpdateResponse {
1130
1589
  | 'optimism_goerli'
1131
1590
  | 'arbitrumGoerli'
1132
1591
  | 'basecamp'
1133
- | 'abstract';
1592
+ | 'somnia'
1593
+ | 'flow_cadence';
1134
1594
 
1135
1595
  /**
1136
1596
  * ID for associated OAuth credentials
1137
1597
  */
1138
1598
  oauthCredentialsId?: string | null;
1139
1599
 
1600
+ /**
1601
+ * The lifetime of the reward
1602
+ */
1603
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
1604
+
1140
1605
  /**
1141
1606
  * Type of reward issued by this rule
1142
1607
  */
1143
- rewardType?: 'points' | 'multiplier';
1608
+ rewardType?: 'points' | 'multiplier' | 'badge';
1609
+
1610
+ /**
1611
+ * URL of the Shopify store
1612
+ */
1613
+ shopifyStoreUrl?: string | null;
1614
+
1615
+ /**
1616
+ * Whether to show this rule before the start time
1617
+ */
1618
+ showBeforeStart?: boolean;
1144
1619
 
1145
1620
  /**
1146
1621
  * Start time for the loyalty rule
@@ -1148,9 +1623,9 @@ export interface RuleUpdateResponse {
1148
1623
  startTime?: string | null;
1149
1624
 
1150
1625
  /**
1151
- * Optional subscription identifier for the rule
1626
+ * Optional subscription id for the rule
1152
1627
  */
1153
- subscriptionIdentifier?: string | null;
1628
+ subscriptionId?: string | null;
1154
1629
  }
1155
1630
 
1156
1631
  export namespace RuleUpdateResponse {
@@ -1164,13 +1639,17 @@ export namespace RuleUpdateResponse {
1164
1639
  * Blockchain network for the collection
1165
1640
  */
1166
1641
  network:
1642
+ | 'abstract'
1643
+ | 'abstractTestnet'
1167
1644
  | 'apechain'
1168
1645
  | 'arbitrum'
1169
1646
  | 'avalanche'
1170
1647
  | 'avalancheFuji'
1171
1648
  | 'base'
1172
1649
  | 'baseSepolia'
1650
+ | 'berachain'
1173
1651
  | 'berachainArtio'
1652
+ | 'berachainBepolia'
1174
1653
  | 'binance'
1175
1654
  | 'bscTestnet'
1176
1655
  | 'campTestnet'
@@ -1178,18 +1657,30 @@ export namespace RuleUpdateResponse {
1178
1657
  | 'fantomTestnet'
1179
1658
  | 'flowMainnet'
1180
1659
  | 'mainnet'
1660
+ | 'nexusTestnet'
1181
1661
  | 'optimism'
1182
1662
  | 'polygon'
1183
1663
  | 'polygon_mumbai'
1184
1664
  | 'skaleNebula'
1665
+ | 'skaleEuropa'
1666
+ | 'skaleCalypso'
1185
1667
  | 'solana'
1186
1668
  | 'sophon'
1669
+ | 'sophonTestnet'
1187
1670
  | 'sui'
1188
1671
  | 'superseed'
1189
1672
  | 'superseedSepolia'
1190
1673
  | 'vanar'
1191
1674
  | 'xai'
1192
1675
  | 'zksync'
1676
+ | 'coti'
1677
+ | 'cotiTestnet'
1678
+ | 'morph'
1679
+ | 'morphTestnet'
1680
+ | 'morphHolesky'
1681
+ | 'ultra'
1682
+ | 'ultraTestnet'
1683
+ | 'nitrograph'
1193
1684
  | 'sepolia'
1194
1685
  | 'optimism_sepolia'
1195
1686
  | 'arbitrumSepolia'
@@ -1197,13 +1688,24 @@ export namespace RuleUpdateResponse {
1197
1688
  | 'optimism_goerli'
1198
1689
  | 'arbitrumGoerli'
1199
1690
  | 'basecamp'
1200
- | 'abstract';
1201
- }
1691
+ | 'somnia'
1692
+ | 'flow_cadence';
1202
1693
 
1203
- /**
1694
+ /**
1695
+ * Symbol of the collection.
1696
+ */
1697
+ symbol?: string;
1698
+ }
1699
+
1700
+ /**
1204
1701
  * Additional metadata for the loyalty rule
1205
1702
  */
1206
1703
  export interface Metadata {
1704
+ /**
1705
+ * Number of tokens per batch.
1706
+ */
1707
+ batchSize?: number | null;
1708
+
1207
1709
  /**
1208
1710
  * Text displayed on the action button.
1209
1711
  */
@@ -1227,7 +1729,7 @@ export namespace RuleUpdateResponse {
1227
1729
  /**
1228
1730
  * Text to check in the Twitter post, username, or bio.
1229
1731
  */
1230
- checkText?: string | null;
1732
+ checkText?: string | Array<string> | null;
1231
1733
 
1232
1734
  /**
1233
1735
  * Array of collections associated with the rule.
@@ -1237,7 +1739,12 @@ export namespace RuleUpdateResponse {
1237
1739
  /**
1238
1740
  * Conditions for completing the profile.
1239
1741
  */
1240
- completeProfileConditions?: Record<string, boolean> | null;
1742
+ completeProfileConditions?: { [key: string]: boolean } | null;
1743
+
1744
+ /**
1745
+ * Description of the external rule condition (only for external rules)
1746
+ */
1747
+ conditionDescription?: string;
1241
1748
 
1242
1749
  /**
1243
1750
  * Object containing details for the call-to-action.
@@ -1249,6 +1756,11 @@ export namespace RuleUpdateResponse {
1249
1756
  */
1250
1757
  customRewardsApiKey?: string;
1251
1758
 
1759
+ /**
1760
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
1761
+ */
1762
+ directRpc?: boolean;
1763
+
1252
1764
  /**
1253
1765
  * Array of Discord servers, channels, and roles to join.
1254
1766
  */
@@ -1274,6 +1786,11 @@ export namespace RuleUpdateResponse {
1274
1786
  */
1275
1787
  enableVerifiedMultiplier?: boolean;
1276
1788
 
1789
+ /**
1790
+ * Type of ERC20 token for the loyalty rule.
1791
+ */
1792
+ erc20Type?: 'erc20' | 'native';
1793
+
1277
1794
  /**
1278
1795
  * Fill source of the order for the token sale
1279
1796
  */
@@ -1294,11 +1811,6 @@ export namespace RuleUpdateResponse {
1294
1811
  */
1295
1812
  hasNeverSold?: boolean;
1296
1813
 
1297
- /**
1298
- * Flag indicating whether the order source is included.
1299
- */
1300
- hasOrderSource?: boolean;
1301
-
1302
1814
  /**
1303
1815
  * Indicates if the full royalty has been paid for items.
1304
1816
  */
@@ -1319,11 +1831,21 @@ export namespace RuleUpdateResponse {
1319
1831
  */
1320
1832
  imageUrl?: string | null;
1321
1833
 
1834
+ /**
1835
+ * If enabled, the first transaction done on the platform will complete this rule
1836
+ */
1837
+ isCheckInOnEveryTxn?: boolean;
1838
+
1322
1839
  /**
1323
1840
  * Indicates if the multiplier has been applied to rewards.
1324
1841
  */
1325
1842
  isMultiplierApplied?: boolean;
1326
1843
 
1844
+ /**
1845
+ * Flag indicating if the rule is restricted to new users.
1846
+ */
1847
+ isRestrictedToNewUsers?: boolean;
1848
+
1327
1849
  /**
1328
1850
  * Flag indicating if rewards are applied retroactively.
1329
1851
  */
@@ -1339,6 +1861,11 @@ export namespace RuleUpdateResponse {
1339
1861
  */
1340
1862
  link?: string | null;
1341
1863
 
1864
+ /**
1865
+ * Liquidity pool details.
1866
+ */
1867
+ liquidity?: Metadata.Liquidity;
1868
+
1342
1869
  /**
1343
1870
  * Maximum quantity constraint for token holding.
1344
1871
  */
@@ -1380,14 +1907,24 @@ export namespace RuleUpdateResponse {
1380
1907
  onlyRewardSingleTokenOwnership?: boolean | null;
1381
1908
 
1382
1909
  /**
1383
- * Order source of the order for the token sale
1910
+ * Promotional code associated with the rule.
1384
1911
  */
1385
- orderSource?: string;
1912
+ promoCode?: string;
1386
1913
 
1387
1914
  /**
1388
- * Promotional code associated with the rule.
1915
+ * URL of the CSV file containing promo codes.
1389
1916
  */
1390
- promoCode?: string;
1917
+ promoCodeCsvUrl?: string;
1918
+
1919
+ /**
1920
+ * Numbers of the promotional code to be generated.
1921
+ */
1922
+ promoCodeLength?: number | null;
1923
+
1924
+ /**
1925
+ * Type of the promotional code.
1926
+ */
1927
+ promoCodeType?: 'code' | 'csv' | 'generate';
1391
1928
 
1392
1929
  /**
1393
1930
  * Array defining ranges and corresponding rewards.
@@ -1404,11 +1941,62 @@ export namespace RuleUpdateResponse {
1404
1941
  */
1405
1942
  referrerReward?: number | null;
1406
1943
 
1944
+ /**
1945
+ * Loyalty currency ID of the referrer reward.
1946
+ */
1947
+ referrerRewardLoyaltyCurrencyId?: string | null;
1948
+
1949
+ /**
1950
+ * Flag indicating if the post link is required.
1951
+ */
1952
+ requirePostLink?: boolean | null;
1953
+
1954
+ /**
1955
+ * Flag indicating if media metadata is required.
1956
+ */
1957
+ requirePostMediaLink?: boolean | null;
1958
+
1959
+ /**
1960
+ * Flag indicating if the rule can also reward badges per range.
1961
+ */
1962
+ rewardBadgePerRange?: boolean;
1963
+
1964
+ /**
1965
+ * Flag indicating if the reward is rewarded by batch.
1966
+ */
1967
+ rewardByBatch?: boolean | null;
1968
+
1969
+ /**
1970
+ * Criteria to evaluate the reward.
1971
+ */
1972
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
1973
+
1974
+ /**
1975
+ * Flag indicating if the reward is rewarded per action.
1976
+ */
1977
+ rewardPerAction?: boolean | null;
1978
+
1407
1979
  /**
1408
1980
  * Flag indicating if rewards are given per impression.
1409
1981
  */
1410
1982
  rewardPerImpression?: boolean | null;
1411
1983
 
1984
+ /**
1985
+ * Flag indicating if the rule should reward based on value of traded tokens
1986
+ * instead of count.
1987
+ */
1988
+ rewardPerValue?: boolean;
1989
+
1990
+ /**
1991
+ * Wallet address of the user can only be used if userId is not provided
1992
+ */
1993
+ royaltyAddress?: string;
1994
+
1995
+ /**
1996
+ * Royalty percentage of the item.
1997
+ */
1998
+ royaltyPercentage?: number;
1999
+
1412
2000
  /**
1413
2001
  * Currency associated with sales.
1414
2002
  */
@@ -1448,6 +2036,7 @@ export namespace RuleUpdateResponse {
1448
2036
  | 'Twitch'
1449
2037
  | 'X(Twitter)'
1450
2038
  | 'YouTube'
2039
+ | 'Google'
1451
2040
  | null;
1452
2041
 
1453
2042
  /**
@@ -1460,11 +2049,21 @@ export namespace RuleUpdateResponse {
1460
2049
  */
1461
2050
  socialPlatformName?: string | null;
1462
2051
 
2052
+ /**
2053
+ * ID of the Steam app.
2054
+ */
2055
+ steamAppId?: string | null;
2056
+
1463
2057
  /**
1464
2058
  * Array of streak milestones and corresponding rewards.
1465
2059
  */
1466
2060
  streakArray?: Array<Metadata.StreakArray> | null;
1467
2061
 
2062
+ /**
2063
+ * Metadata for swap loyalty rules
2064
+ */
2065
+ swap?: Metadata.Swap;
2066
+
1468
2067
  /**
1469
2068
  * ID of the Telegram channel.
1470
2069
  */
@@ -1480,6 +2079,12 @@ export namespace RuleUpdateResponse {
1480
2079
  */
1481
2080
  trackAllContracts?: boolean | null;
1482
2081
 
2082
+ /**
2083
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2084
+ * completed once the progress is 100%.
2085
+ */
2086
+ trackProgress?: boolean | null;
2087
+
1483
2088
  /**
1484
2089
  * URL of the associated Twitter account.
1485
2090
  */
@@ -1523,7 +2128,27 @@ export namespace RuleUpdateResponse {
1523
2128
  /**
1524
2129
  * Type of wallet associated with the rule.
1525
2130
  */
1526
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
2131
+ walletType?:
2132
+ | 'evm'
2133
+ | 'solana'
2134
+ | 'imx'
2135
+ | 'sui'
2136
+ | 'ton'
2137
+ | 'cosmos'
2138
+ | 'ultra'
2139
+ | 'agw'
2140
+ | 'flow_cadence'
2141
+ | null;
2142
+
2143
+ /**
2144
+ * ID of the Youtube channel.
2145
+ */
2146
+ youtubeChannelId?: string | null;
2147
+
2148
+ /**
2149
+ * ID of the Youtube video.
2150
+ */
2151
+ youtubeVideoId?: string | null;
1527
2152
  }
1528
2153
 
1529
2154
  export namespace Metadata {
@@ -1542,13 +2167,17 @@ export namespace RuleUpdateResponse {
1542
2167
  * Blockchain network of the collection.
1543
2168
  */
1544
2169
  network?:
2170
+ | 'abstract'
2171
+ | 'abstractTestnet'
1545
2172
  | 'apechain'
1546
2173
  | 'arbitrum'
1547
2174
  | 'avalanche'
1548
2175
  | 'avalancheFuji'
1549
2176
  | 'base'
1550
2177
  | 'baseSepolia'
2178
+ | 'berachain'
1551
2179
  | 'berachainArtio'
2180
+ | 'berachainBepolia'
1552
2181
  | 'binance'
1553
2182
  | 'bscTestnet'
1554
2183
  | 'campTestnet'
@@ -1556,18 +2185,30 @@ export namespace RuleUpdateResponse {
1556
2185
  | 'fantomTestnet'
1557
2186
  | 'flowMainnet'
1558
2187
  | 'mainnet'
2188
+ | 'nexusTestnet'
1559
2189
  | 'optimism'
1560
2190
  | 'polygon'
1561
2191
  | 'polygon_mumbai'
1562
2192
  | 'skaleNebula'
2193
+ | 'skaleEuropa'
2194
+ | 'skaleCalypso'
1563
2195
  | 'solana'
1564
2196
  | 'sophon'
2197
+ | 'sophonTestnet'
1565
2198
  | 'sui'
1566
2199
  | 'superseed'
1567
2200
  | 'superseedSepolia'
1568
2201
  | 'vanar'
1569
2202
  | 'xai'
1570
2203
  | 'zksync'
2204
+ | 'coti'
2205
+ | 'cotiTestnet'
2206
+ | 'morph'
2207
+ | 'morphTestnet'
2208
+ | 'morphHolesky'
2209
+ | 'ultra'
2210
+ | 'ultraTestnet'
2211
+ | 'nitrograph'
1571
2212
  | 'sepolia'
1572
2213
  | 'optimism_sepolia'
1573
2214
  | 'arbitrumSepolia'
@@ -1575,7 +2216,8 @@ export namespace RuleUpdateResponse {
1575
2216
  | 'optimism_goerli'
1576
2217
  | 'arbitrumGoerli'
1577
2218
  | 'basecamp'
1578
- | 'abstract';
2219
+ | 'somnia'
2220
+ | 'flow_cadence';
1579
2221
  }
1580
2222
 
1581
2223
  /**
@@ -1652,6 +2294,108 @@ export namespace RuleUpdateResponse {
1652
2294
  id: string;
1653
2295
  }
1654
2296
 
2297
+ /**
2298
+ * Liquidity pool details.
2299
+ */
2300
+ export interface Liquidity {
2301
+ /**
2302
+ * Calculation type of the liquidity pool.
2303
+ */
2304
+ calculationType?: 'fixed' | 'custom';
2305
+
2306
+ /**
2307
+ * Custom function to calculate the the reward amount based on the liquidity
2308
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2309
+ * USD.
2310
+ */
2311
+ customFunction?: string;
2312
+
2313
+ /**
2314
+ * Liquidity provided per day in USD
2315
+ */
2316
+ liquidityPerDay?: number;
2317
+
2318
+ /**
2319
+ * Blockchain network of the liquidity pool.
2320
+ */
2321
+ network?:
2322
+ | 'abstract'
2323
+ | 'abstractTestnet'
2324
+ | 'apechain'
2325
+ | 'arbitrum'
2326
+ | 'avalanche'
2327
+ | 'avalancheFuji'
2328
+ | 'base'
2329
+ | 'baseSepolia'
2330
+ | 'berachain'
2331
+ | 'berachainArtio'
2332
+ | 'berachainBepolia'
2333
+ | 'binance'
2334
+ | 'bscTestnet'
2335
+ | 'campTestnet'
2336
+ | 'fantom'
2337
+ | 'fantomTestnet'
2338
+ | 'flowMainnet'
2339
+ | 'mainnet'
2340
+ | 'nexusTestnet'
2341
+ | 'optimism'
2342
+ | 'polygon'
2343
+ | 'polygon_mumbai'
2344
+ | 'skaleNebula'
2345
+ | 'skaleEuropa'
2346
+ | 'skaleCalypso'
2347
+ | 'solana'
2348
+ | 'sophon'
2349
+ | 'sophonTestnet'
2350
+ | 'sui'
2351
+ | 'superseed'
2352
+ | 'superseedSepolia'
2353
+ | 'vanar'
2354
+ | 'xai'
2355
+ | 'zksync'
2356
+ | 'coti'
2357
+ | 'cotiTestnet'
2358
+ | 'morph'
2359
+ | 'morphTestnet'
2360
+ | 'morphHolesky'
2361
+ | 'ultra'
2362
+ | 'ultraTestnet'
2363
+ | 'nitrograph'
2364
+ | 'sepolia'
2365
+ | 'optimism_sepolia'
2366
+ | 'arbitrumSepolia'
2367
+ | 'goerli'
2368
+ | 'optimism_goerli'
2369
+ | 'arbitrumGoerli'
2370
+ | 'basecamp'
2371
+ | 'somnia'
2372
+ | 'flow_cadence';
2373
+
2374
+ /**
2375
+ * Indicates if only in-range liquidity is rewarded.
2376
+ */
2377
+ onlyRewardInRangeLiquidity?: boolean;
2378
+
2379
+ /**
2380
+ * Array of liquidity pools associated with the rule.
2381
+ */
2382
+ pools?: Array<Liquidity.Pool>;
2383
+
2384
+ /**
2385
+ * Protocol of the liquidity pool.
2386
+ */
2387
+ protocol?: string;
2388
+ }
2389
+
2390
+ export namespace Liquidity {
2391
+ export interface Pool {
2392
+ /**
2393
+ * Unique identifier of the liquidity pool.
2394
+ */
2395
+ id: string;
2396
+ }
2397
+ }
2398
+
1655
2399
  export interface Range {
1656
2400
  /**
1657
2401
  * Reward amount for this range.
@@ -1667,6 +2411,16 @@ export namespace RuleUpdateResponse {
1667
2411
  * Start value of the range.
1668
2412
  */
1669
2413
  startRange: number;
2414
+
2415
+ /**
2416
+ * ID of the loyalty badge for this range.
2417
+ */
2418
+ loyaltyBadgeId?: string;
2419
+
2420
+ /**
2421
+ * Amount of the loyalty multiplier for this range.
2422
+ */
2423
+ loyaltyMultiplierAmount?: number;
1670
2424
  }
1671
2425
 
1672
2426
  /**
@@ -1719,20 +2473,15 @@ export namespace RuleUpdateResponse {
1719
2473
  * Object containing details of the associated smart contract.
1720
2474
  */
1721
2475
  export interface SmartContract {
1722
- /**
1723
- * ABI of the smart contract.
1724
- */
1725
- abi?: string | null;
1726
-
1727
2476
  /**
1728
2477
  * Mapping of addresses for the smart contract.
1729
2478
  */
1730
2479
  addressMapping?: string | null;
1731
2480
 
1732
2481
  /**
1733
- * Array of bonus details applied to the rule.
2482
+ * Object containing details of the amount multiplier from the event.
1734
2483
  */
1735
- bonus?: Array<SmartContract.Bonus> | null;
2484
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1736
2485
 
1737
2486
  /**
1738
2487
  * ID of the smart contract.
@@ -1744,68 +2493,31 @@ export namespace RuleUpdateResponse {
1744
2493
  */
1745
2494
  criteria?: 'everyEvent' | 'byParameter' | null;
1746
2495
 
1747
- /**
1748
- * Time range applied to the rule.
1749
- */
1750
- customRange?: SmartContract.CustomRange | null;
1751
-
1752
2496
  /**
1753
2497
  * Event emitted by the smart contract.
1754
2498
  */
1755
2499
  event?: string | null;
1756
2500
 
1757
- /**
1758
- * Maximum value allowed for the parameter.
1759
- */
1760
- max?: number | null;
1761
-
1762
2501
  /**
1763
2502
  * Array of parameters for the smart contract.
1764
2503
  */
1765
2504
  params?: Array<SmartContract.Param> | null;
1766
2505
 
1767
2506
  /**
1768
- * Flag indicating if a bonus is applied.
1769
- */
1770
- withBonus?: boolean | null;
1771
-
1772
- /**
1773
- * Flag indicating if a custom range is applied.
1774
- */
1775
- withCustomRange?: boolean | null;
1776
-
1777
- /**
1778
- * Flag indicating if a maximum limit is applied.
2507
+ * Type of the smart contract interaction.
1779
2508
  */
1780
- withMax?: boolean | null;
2509
+ type?: 'function' | 'event' | null;
1781
2510
  }
1782
2511
 
1783
2512
  export namespace SmartContract {
1784
- export interface Bonus {
1785
- /**
1786
- * Amount of the bonus.
1787
- */
1788
- amount?: number | null;
1789
-
1790
- /**
1791
- * Number of times the bonus is applied.
1792
- */
1793
- count?: number | null;
1794
- }
1795
-
1796
2513
  /**
1797
- * Time range applied to the rule.
2514
+ * Object containing details of the amount multiplier from the event.
1798
2515
  */
1799
- export interface CustomRange {
2516
+ export interface AmountMultiplier {
1800
2517
  /**
1801
- * End time of the custom range.
2518
+ * Mapping of the value for the smart contract.
1802
2519
  */
1803
- endsAt?: string | null;
1804
-
1805
- /**
1806
- * Start time of the custom range.
1807
- */
1808
- startsAt?: string | null;
2520
+ valueMapping?: string | null;
1809
2521
  }
1810
2522
 
1811
2523
  export interface Param {
@@ -1849,6 +2561,33 @@ export namespace RuleUpdateResponse {
1849
2561
  */
1850
2562
  streakMilestone: number;
1851
2563
  }
2564
+
2565
+ /**
2566
+ * Metadata for swap loyalty rules
2567
+ */
2568
+ export interface Swap {
2569
+ provider?: 'any' | 'relay' | 'lifi';
2570
+
2571
+ relayReferrerId?: string;
2572
+
2573
+ requireCrossChainSwap?: boolean;
2574
+
2575
+ swappedToChain?: 'any' | number | string;
2576
+
2577
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2578
+
2579
+ tokenMode?: 'any' | 'specific';
2580
+
2581
+ trackTokenAmount?: boolean;
2582
+ }
2583
+
2584
+ export namespace Swap {
2585
+ export interface SwappedToToken {
2586
+ address: string;
2587
+
2588
+ chainId: string;
2589
+ }
2590
+ }
1852
2591
  }
1853
2592
  }
1854
2593
 
@@ -1859,9 +2598,6 @@ export interface RuleListResponse {
1859
2598
  }
1860
2599
 
1861
2600
  export namespace RuleListResponse {
1862
- /**
1863
- * Schema for a loyalty rule
1864
- */
1865
2601
  export interface Data {
1866
2602
  /**
1867
2603
  * Unique identifier for the loyalty rule
@@ -1883,16 +2619,46 @@ export namespace RuleListResponse {
1883
2619
  */
1884
2620
  deletedAt: string | null;
1885
2621
 
2622
+ /**
2623
+ * Description of the loyalty rule
2624
+ */
2625
+ description: string;
2626
+
2627
+ /**
2628
+ * End time of the loyalty rule
2629
+ */
2630
+ endTime: string;
2631
+
1886
2632
  /**
1887
2633
  * Frequency of the loyalty rule
1888
2634
  */
1889
2635
  frequency: string;
1890
2636
 
2637
+ /**
2638
+ * Chains attached to the loyalty rule
2639
+ */
2640
+ loyaltyRuleChain: Array<Data.LoyaltyRuleChain>;
2641
+
2642
+ /**
2643
+ * Name of the loyalty rule
2644
+ */
2645
+ name: string;
2646
+
1891
2647
  /**
1892
2648
  * Unique identifier for the organization
1893
2649
  */
1894
2650
  organizationId: string;
1895
2651
 
2652
+ /**
2653
+ * Type of the reward
2654
+ */
2655
+ rewardType: 'points' | 'multiplier' | 'badge';
2656
+
2657
+ /**
2658
+ * Start time of the loyalty rule
2659
+ */
2660
+ startTime: string;
2661
+
1896
2662
  /**
1897
2663
  * Type of the loyalty rule
1898
2664
  */
@@ -1903,20 +2669,1017 @@ export namespace RuleListResponse {
1903
2669
  */
1904
2670
  updatedAt: string;
1905
2671
 
1906
- /**
1907
- * Unique identifier for the website
1908
- */
1909
- websiteId: string;
2672
+ /**
2673
+ * Unique identifier for the website
2674
+ */
2675
+ websiteId: string;
2676
+
2677
+ /**
2678
+ * Optional address of the collection
2679
+ */
2680
+ collectionAddress?: string;
2681
+
2682
+ /**
2683
+ * URL of the media associated with the loyalty rule
2684
+ */
2685
+ mediaUrl?: string | null;
2686
+
2687
+ /**
2688
+ * Optional metadata for the loyalty rule
2689
+ */
2690
+ metadata?: { [key: string]: Data.Metadata };
2691
+ }
2692
+
2693
+ export namespace Data {
2694
+ export interface LoyaltyRuleChain {
2695
+ /**
2696
+ * Unique identifier for the rule chain
2697
+ */
2698
+ id: string;
2699
+
2700
+ loyaltyConditions: Array<LoyaltyRuleChain.LoyaltyCondition>;
2701
+
2702
+ /**
2703
+ * Unique identifier for the loyalty rule
2704
+ */
2705
+ loyaltyRuleId: string;
2706
+
2707
+ /**
2708
+ * Name of the rule chain
2709
+ */
2710
+ name: string;
2711
+ }
2712
+
2713
+ export namespace LoyaltyRuleChain {
2714
+ export interface LoyaltyCondition {
2715
+ /**
2716
+ * Unique identifier for the condition
2717
+ */
2718
+ id: string;
2719
+
2720
+ /**
2721
+ * Amount of the condition
2722
+ */
2723
+ amount: number | null;
2724
+
2725
+ association: Array<LoyaltyCondition.Association>;
2726
+
2727
+ /**
2728
+ * URL of the CSV file
2729
+ */
2730
+ csvUrl: string | null;
2731
+
2732
+ /**
2733
+ * Description of the condition
2734
+ */
2735
+ description: string | null;
2736
+
2737
+ /**
2738
+ * Number of times the condition must be met
2739
+ */
2740
+ repeatCount: number | null;
2741
+
2742
+ /**
2743
+ * Number of times the condition must be met
2744
+ */
2745
+ requiredCount: number | null;
2746
+
2747
+ /**
2748
+ * Type of the condition
2749
+ */
2750
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
2751
+ }
2752
+
2753
+ export namespace LoyaltyCondition {
2754
+ export interface Association {
2755
+ /**
2756
+ * Unique identifier for the association
2757
+ */
2758
+ id: string;
2759
+
2760
+ /**
2761
+ * Unique identifier for the loyalty badge
2762
+ */
2763
+ loyaltyBadgeId: string | null;
2764
+
2765
+ /**
2766
+ * Unique identifier for the loyalty currency
2767
+ */
2768
+ loyaltyCurrencyId: string | null;
2769
+
2770
+ loyaltyRule: Association.LoyaltyRule | null;
2771
+
2772
+ /**
2773
+ * Unique identifier for the loyalty rule group
2774
+ */
2775
+ loyaltyRuleGroupId: string | null;
2776
+
2777
+ /**
2778
+ * Unique identifier for the loyalty rule
2779
+ */
2780
+ loyaltyRuleId: string | null;
2781
+ }
2782
+
2783
+ export namespace Association {
2784
+ export interface LoyaltyRule {
2785
+ /**
2786
+ * Name of the loyalty rule
2787
+ */
2788
+ name: string;
2789
+ }
2790
+ }
2791
+ }
2792
+ }
2793
+
2794
+ export interface Metadata {
2795
+ /**
2796
+ * Number of tokens per batch.
2797
+ */
2798
+ batchSize?: number | null;
2799
+
2800
+ /**
2801
+ * Text displayed on the action button.
2802
+ */
2803
+ buttonText?: string | null;
2804
+
2805
+ /**
2806
+ * Flag indicating if commenting is required.
2807
+ */
2808
+ checkComment?: boolean | null;
2809
+
2810
+ /**
2811
+ * Flag indicating if liking the post is required.
2812
+ */
2813
+ checkLike?: boolean | null;
2814
+
2815
+ /**
2816
+ * Flag indicating if reposting is required.
2817
+ */
2818
+ checkRepost?: boolean | null;
2819
+
2820
+ /**
2821
+ * Text to check in the Twitter post, username, or bio.
2822
+ */
2823
+ checkText?: string | Array<string> | null;
2824
+
2825
+ /**
2826
+ * Array of collections associated with the rule.
2827
+ */
2828
+ collection?: Array<Metadata.Collection>;
2829
+
2830
+ /**
2831
+ * Conditions for completing the profile.
2832
+ */
2833
+ completeProfileConditions?: { [key: string]: boolean } | null;
2834
+
2835
+ /**
2836
+ * Description of the external rule condition (only for external rules)
2837
+ */
2838
+ conditionDescription?: string;
2839
+
2840
+ /**
2841
+ * Object containing details for the call-to-action.
2842
+ */
2843
+ cta?: Metadata.Cta | null;
2844
+
2845
+ /**
2846
+ * API key for custom rewards integration.
2847
+ */
2848
+ customRewardsApiKey?: string;
2849
+
2850
+ /**
2851
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
2852
+ */
2853
+ directRpc?: boolean;
2854
+
2855
+ /**
2856
+ * Array of Discord servers, channels, and roles to join.
2857
+ */
2858
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2859
+
2860
+ /**
2861
+ * Array of drip quests required to complete the rule.
2862
+ */
2863
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2864
+
2865
+ /**
2866
+ * Flag indicating whether joining Discord servers is required.
2867
+ */
2868
+ enableJoinDiscordServers?: boolean | null;
2869
+
2870
+ /**
2871
+ * Flag indicating whether streaks are enabled.
2872
+ */
2873
+ enableStreaks?: boolean | null;
2874
+
2875
+ /**
2876
+ * Flag indicating whether the verified multiplier is enabled.
2877
+ */
2878
+ enableVerifiedMultiplier?: boolean;
2879
+
2880
+ /**
2881
+ * Type of ERC20 token for the loyalty rule.
2882
+ */
2883
+ erc20Type?: 'erc20' | 'native';
2884
+
2885
+ /**
2886
+ * Fill source of the order for the token sale
2887
+ */
2888
+ fillSource?: string;
2889
+
2890
+ /**
2891
+ * Percentage reward given to a user for their first referral.
2892
+ */
2893
+ firstReferralReward?: number | null;
2894
+
2895
+ /**
2896
+ * Flag indicating whether the fill source is included.
2897
+ */
2898
+ hasFillSource?: boolean;
2899
+
2900
+ /**
2901
+ * Indicates if the item has never been sold.
2902
+ */
2903
+ hasNeverSold?: boolean;
2904
+
2905
+ /**
2906
+ * Indicates if the full royalty has been paid for items.
2907
+ */
2908
+ hasPaidFullRoyalty?: boolean;
2909
+
2910
+ /**
2911
+ * Flag indicating if the sale currency is included.
2912
+ */
2913
+ hasSaleCurrency?: boolean;
2914
+
2915
+ /**
2916
+ * Indicates if the user has a verified Twitter account.
2917
+ */
2918
+ hasVerifiedTwitter?: boolean;
2919
+
2920
+ /**
2921
+ * URL of the image associated with the rule.
2922
+ */
2923
+ imageUrl?: string | null;
2924
+
2925
+ /**
2926
+ * If enabled, the first transaction done on the platform will complete this rule
2927
+ */
2928
+ isCheckInOnEveryTxn?: boolean;
2929
+
2930
+ /**
2931
+ * Indicates if the multiplier has been applied to rewards.
2932
+ */
2933
+ isMultiplierApplied?: boolean;
2934
+
2935
+ /**
2936
+ * Flag indicating if the rule is restricted to new users.
2937
+ */
2938
+ isRestrictedToNewUsers?: boolean;
2939
+
2940
+ /**
2941
+ * Flag indicating if rewards are applied retroactively.
2942
+ */
2943
+ isRetroactive?: boolean | null;
2944
+
2945
+ /**
2946
+ * Flag indicating if the token hold multiplier is applied.
2947
+ */
2948
+ isTokenHoldMultiplier?: boolean;
2949
+
2950
+ /**
2951
+ * Optional link associated with the metadata.
2952
+ */
2953
+ link?: string | null;
2954
+
2955
+ /**
2956
+ * Liquidity pool details.
2957
+ */
2958
+ liquidity?: Metadata.Liquidity;
2959
+
2960
+ /**
2961
+ * Maximum quantity constraint for token holding.
2962
+ */
2963
+ maxQty?: number | null;
2964
+
2965
+ /**
2966
+ * Minimum quantity constraint for token holding.
2967
+ */
2968
+ minQty?: number | null;
2969
+
2970
+ /**
2971
+ * Array of loyalty currency IDs used for multipliers.
2972
+ */
2973
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
2974
+
2975
+ /**
2976
+ * Flag indicating whether to include only known users.
2977
+ */
2978
+ onlyKnownUsers?: boolean;
2979
+
2980
+ /**
2981
+ * Flag indicating whether to include only native tokens.
2982
+ */
2983
+ onlyNative?: boolean;
2984
+
2985
+ /**
2986
+ * Flag indicating whether to include only non-listed items.
2987
+ */
2988
+ onlyNonListed?: boolean;
2989
+
2990
+ /**
2991
+ * Indicates if only existing users are rewarded.
2992
+ */
2993
+ onlyRewardExistingUser?: boolean;
2994
+
2995
+ /**
2996
+ * give points for only one token ownership per contract
2997
+ */
2998
+ onlyRewardSingleTokenOwnership?: boolean | null;
2999
+
3000
+ /**
3001
+ * Promotional code associated with the rule.
3002
+ */
3003
+ promoCode?: string;
3004
+
3005
+ /**
3006
+ * URL of the CSV file containing promo codes.
3007
+ */
3008
+ promoCodeCsvUrl?: string;
3009
+
3010
+ /**
3011
+ * Numbers of the promotional code to be generated.
3012
+ */
3013
+ promoCodeLength?: number | null;
3014
+
3015
+ /**
3016
+ * Type of the promotional code.
3017
+ */
3018
+ promoCodeType?: 'code' | 'csv' | 'generate';
3019
+
3020
+ /**
3021
+ * Array defining ranges and corresponding rewards.
3022
+ */
3023
+ range?: Array<Metadata.Range>;
3024
+
3025
+ /**
3026
+ * Object defining referral requirements.
3027
+ */
3028
+ referralRequirements?: Metadata.ReferralRequirements | null;
3029
+
3030
+ /**
3031
+ * Lump sum reward given to a referrer.
3032
+ */
3033
+ referrerReward?: number | null;
3034
+
3035
+ /**
3036
+ * Loyalty currency ID of the referrer reward.
3037
+ */
3038
+ referrerRewardLoyaltyCurrencyId?: string | null;
3039
+
3040
+ /**
3041
+ * Flag indicating if the post link is required.
3042
+ */
3043
+ requirePostLink?: boolean | null;
3044
+
3045
+ /**
3046
+ * Flag indicating if media metadata is required.
3047
+ */
3048
+ requirePostMediaLink?: boolean | null;
3049
+
3050
+ /**
3051
+ * Flag indicating if the rule can also reward badges per range.
3052
+ */
3053
+ rewardBadgePerRange?: boolean;
3054
+
3055
+ /**
3056
+ * Flag indicating if the reward is rewarded by batch.
3057
+ */
3058
+ rewardByBatch?: boolean | null;
3059
+
3060
+ /**
3061
+ * Criteria to evaluate the reward.
3062
+ */
3063
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
3064
+
3065
+ /**
3066
+ * Flag indicating if the reward is rewarded per action.
3067
+ */
3068
+ rewardPerAction?: boolean | null;
3069
+
3070
+ /**
3071
+ * Flag indicating if rewards are given per impression.
3072
+ */
3073
+ rewardPerImpression?: boolean | null;
3074
+
3075
+ /**
3076
+ * Flag indicating if the rule should reward based on value of traded tokens
3077
+ * instead of count.
3078
+ */
3079
+ rewardPerValue?: boolean;
3080
+
3081
+ /**
3082
+ * Wallet address of the user can only be used if userId is not provided
3083
+ */
3084
+ royaltyAddress?: string;
3085
+
3086
+ /**
3087
+ * Royalty percentage of the item.
3088
+ */
3089
+ royaltyPercentage?: number;
3090
+
3091
+ /**
3092
+ * Currency associated with sales.
3093
+ */
3094
+ saleCurrency?: string;
3095
+
3096
+ /**
3097
+ * Percentage reward given for a second-level referral.
3098
+ */
3099
+ secondReferralReward?: number | null;
3100
+
3101
+ /**
3102
+ * Flag indicating if the multiplier is skipped.
3103
+ */
3104
+ skipMultiplier?: boolean | null;
3105
+
3106
+ /**
3107
+ * Object containing details of the associated smart contract.
3108
+ */
3109
+ smartContract?: Metadata.SmartContract;
3110
+
3111
+ /**
3112
+ * Array of snapshot proposals for the rule.
3113
+ */
3114
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
3115
+
3116
+ /**
3117
+ * Social media platform associated with the rule.
3118
+ */
3119
+ socialPlatform?:
3120
+ | 'Custom'
3121
+ | 'Discord'
3122
+ | 'EpicGames'
3123
+ | 'Instagram'
3124
+ | 'Steam'
3125
+ | 'Telegram'
3126
+ | 'TikTok'
3127
+ | 'Twitch'
3128
+ | 'X(Twitter)'
3129
+ | 'YouTube'
3130
+ | 'Google'
3131
+ | null;
3132
+
3133
+ /**
3134
+ * URL of the social platform's logo.
3135
+ */
3136
+ socialPlatformLogo?: string | null;
3137
+
3138
+ /**
3139
+ * Name of the social platform.
3140
+ */
3141
+ socialPlatformName?: string | null;
3142
+
3143
+ /**
3144
+ * ID of the Steam app.
3145
+ */
3146
+ steamAppId?: string | null;
3147
+
3148
+ /**
3149
+ * Array of streak milestones and corresponding rewards.
3150
+ */
3151
+ streakArray?: Array<Metadata.StreakArray> | null;
3152
+
3153
+ /**
3154
+ * Metadata for swap loyalty rules
3155
+ */
3156
+ swap?: Metadata.Swap;
3157
+
3158
+ /**
3159
+ * ID of the Telegram channel.
3160
+ */
3161
+ telegramChannelId?: string | null;
3162
+
3163
+ /**
3164
+ * Time delay in seconds to verify actions.
3165
+ */
3166
+ timeDelayToVerifySeconds?: string | number | null;
3167
+
3168
+ /**
3169
+ * Flag indicating if all contracts are tracked.
3170
+ */
3171
+ trackAllContracts?: boolean | null;
3172
+
3173
+ /**
3174
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
3175
+ * completed once the progress is 100%.
3176
+ */
3177
+ trackProgress?: boolean | null;
3178
+
3179
+ /**
3180
+ * URL of the associated Twitter account.
3181
+ */
3182
+ twitterAccountUrl?: string;
3183
+
3184
+ /**
3185
+ * Hashtag associated with the Twitter post.
3186
+ */
3187
+ twitterHashtag?: string;
3188
+
3189
+ /**
3190
+ * URL of the associated Twitter post.
3191
+ */
3192
+ twitterPostUrl?: string;
3193
+
3194
+ /**
3195
+ * Unique identifier of the Twitter user.
3196
+ */
3197
+ twitterUserId?: string;
3198
+
3199
+ /**
3200
+ * Twitter username of the user.
3201
+ */
3202
+ twitterUsername?: string;
3203
+
3204
+ /**
3205
+ * Minimum length of the verification text.
3206
+ */
3207
+ verificationTextMinimumLength?: number | null;
3208
+
3209
+ /**
3210
+ * Multiplier applied to rewards for verified users.
3211
+ */
3212
+ verifiedMultiplier?: number | null;
3213
+
3214
+ /**
3215
+ * Placeholder text for verification input fields.
3216
+ */
3217
+ verifyPlaceHolderText?: string | null;
3218
+
3219
+ /**
3220
+ * Type of wallet associated with the rule.
3221
+ */
3222
+ walletType?:
3223
+ | 'evm'
3224
+ | 'solana'
3225
+ | 'imx'
3226
+ | 'sui'
3227
+ | 'ton'
3228
+ | 'cosmos'
3229
+ | 'ultra'
3230
+ | 'agw'
3231
+ | 'flow_cadence'
3232
+ | null;
3233
+
3234
+ /**
3235
+ * ID of the Youtube channel.
3236
+ */
3237
+ youtubeChannelId?: string | null;
3238
+
3239
+ /**
3240
+ * ID of the Youtube video.
3241
+ */
3242
+ youtubeVideoId?: string | null;
3243
+ }
3244
+
3245
+ export namespace Metadata {
3246
+ export interface Collection {
3247
+ /**
3248
+ * Blockchain address of the collection.
3249
+ */
3250
+ address?: string;
3251
+
3252
+ /**
3253
+ * Multiplier applied to the rewards for this collection.
3254
+ */
3255
+ multiplier?: number;
3256
+
3257
+ /**
3258
+ * Blockchain network of the collection.
3259
+ */
3260
+ network?:
3261
+ | 'abstract'
3262
+ | 'abstractTestnet'
3263
+ | 'apechain'
3264
+ | 'arbitrum'
3265
+ | 'avalanche'
3266
+ | 'avalancheFuji'
3267
+ | 'base'
3268
+ | 'baseSepolia'
3269
+ | 'berachain'
3270
+ | 'berachainArtio'
3271
+ | 'berachainBepolia'
3272
+ | 'binance'
3273
+ | 'bscTestnet'
3274
+ | 'campTestnet'
3275
+ | 'fantom'
3276
+ | 'fantomTestnet'
3277
+ | 'flowMainnet'
3278
+ | 'mainnet'
3279
+ | 'nexusTestnet'
3280
+ | 'optimism'
3281
+ | 'polygon'
3282
+ | 'polygon_mumbai'
3283
+ | 'skaleNebula'
3284
+ | 'skaleEuropa'
3285
+ | 'skaleCalypso'
3286
+ | 'solana'
3287
+ | 'sophon'
3288
+ | 'sophonTestnet'
3289
+ | 'sui'
3290
+ | 'superseed'
3291
+ | 'superseedSepolia'
3292
+ | 'vanar'
3293
+ | 'xai'
3294
+ | 'zksync'
3295
+ | 'coti'
3296
+ | 'cotiTestnet'
3297
+ | 'morph'
3298
+ | 'morphTestnet'
3299
+ | 'morphHolesky'
3300
+ | 'ultra'
3301
+ | 'ultraTestnet'
3302
+ | 'nitrograph'
3303
+ | 'sepolia'
3304
+ | 'optimism_sepolia'
3305
+ | 'arbitrumSepolia'
3306
+ | 'goerli'
3307
+ | 'optimism_goerli'
3308
+ | 'arbitrumGoerli'
3309
+ | 'basecamp'
3310
+ | 'somnia'
3311
+ | 'flow_cadence';
3312
+ }
3313
+
3314
+ /**
3315
+ * Object containing details for the call-to-action.
3316
+ */
3317
+ export interface Cta {
3318
+ /**
3319
+ * Link for the call-to-action.
3320
+ */
3321
+ href?: string | null;
3322
+
3323
+ /**
3324
+ * Label for the call-to-action.
3325
+ */
3326
+ label?: string | null;
3327
+ }
3328
+
3329
+ export interface DiscordServersToJoin {
3330
+ /**
3331
+ * ID of the Discord server to join.
3332
+ */
3333
+ id?: string;
3334
+
3335
+ /**
3336
+ * Array of Discord channels to join.
3337
+ */
3338
+ channels?: Array<DiscordServersToJoin.Channel>;
3339
+
3340
+ /**
3341
+ * Array of roles to assign in the Discord server.
3342
+ */
3343
+ roles?: Array<DiscordServersToJoin.Role>;
3344
+ }
3345
+
3346
+ export namespace DiscordServersToJoin {
3347
+ export interface Channel {
3348
+ /**
3349
+ * ID of the Discord channel.
3350
+ */
3351
+ id?: string;
3352
+
3353
+ /**
3354
+ * Array of emojis used in the channel.
3355
+ */
3356
+ emojis?: Array<Channel.Emoji>;
3357
+
3358
+ /**
3359
+ * Phrase of text to be present in the discord message
3360
+ */
3361
+ text?: string;
3362
+ }
3363
+
3364
+ export namespace Channel {
3365
+ export interface Emoji {
3366
+ /**
3367
+ * ID of the emoji used in the channel.
3368
+ */
3369
+ id?: string;
3370
+ }
3371
+ }
3372
+
3373
+ export interface Role {
3374
+ /**
3375
+ * ID of the role in the Discord server.
3376
+ */
3377
+ id: string;
3378
+ }
3379
+ }
3380
+
3381
+ export interface DripQuestsToComplete {
3382
+ /**
3383
+ * ID of the drip quest to complete.
3384
+ */
3385
+ id: string;
3386
+ }
3387
+
3388
+ /**
3389
+ * Liquidity pool details.
3390
+ */
3391
+ export interface Liquidity {
3392
+ /**
3393
+ * Calculation type of the liquidity pool.
3394
+ */
3395
+ calculationType?: 'fixed' | 'custom';
3396
+
3397
+ /**
3398
+ * Custom function to calculate the the reward amount based on the liquidity
3399
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
3400
+ * USD.
3401
+ */
3402
+ customFunction?: string;
3403
+
3404
+ /**
3405
+ * Liquidity provided per day in USD
3406
+ */
3407
+ liquidityPerDay?: number;
3408
+
3409
+ /**
3410
+ * Blockchain network of the liquidity pool.
3411
+ */
3412
+ network?:
3413
+ | 'abstract'
3414
+ | 'abstractTestnet'
3415
+ | 'apechain'
3416
+ | 'arbitrum'
3417
+ | 'avalanche'
3418
+ | 'avalancheFuji'
3419
+ | 'base'
3420
+ | 'baseSepolia'
3421
+ | 'berachain'
3422
+ | 'berachainArtio'
3423
+ | 'berachainBepolia'
3424
+ | 'binance'
3425
+ | 'bscTestnet'
3426
+ | 'campTestnet'
3427
+ | 'fantom'
3428
+ | 'fantomTestnet'
3429
+ | 'flowMainnet'
3430
+ | 'mainnet'
3431
+ | 'nexusTestnet'
3432
+ | 'optimism'
3433
+ | 'polygon'
3434
+ | 'polygon_mumbai'
3435
+ | 'skaleNebula'
3436
+ | 'skaleEuropa'
3437
+ | 'skaleCalypso'
3438
+ | 'solana'
3439
+ | 'sophon'
3440
+ | 'sophonTestnet'
3441
+ | 'sui'
3442
+ | 'superseed'
3443
+ | 'superseedSepolia'
3444
+ | 'vanar'
3445
+ | 'xai'
3446
+ | 'zksync'
3447
+ | 'coti'
3448
+ | 'cotiTestnet'
3449
+ | 'morph'
3450
+ | 'morphTestnet'
3451
+ | 'morphHolesky'
3452
+ | 'ultra'
3453
+ | 'ultraTestnet'
3454
+ | 'nitrograph'
3455
+ | 'sepolia'
3456
+ | 'optimism_sepolia'
3457
+ | 'arbitrumSepolia'
3458
+ | 'goerli'
3459
+ | 'optimism_goerli'
3460
+ | 'arbitrumGoerli'
3461
+ | 'basecamp'
3462
+ | 'somnia'
3463
+ | 'flow_cadence';
3464
+
3465
+ /**
3466
+ * Indicates if only in-range liquidity is rewarded.
3467
+ */
3468
+ onlyRewardInRangeLiquidity?: boolean;
3469
+
3470
+ /**
3471
+ * Array of liquidity pools associated with the rule.
3472
+ */
3473
+ pools?: Array<Liquidity.Pool>;
3474
+
3475
+ /**
3476
+ * Protocol of the liquidity pool.
3477
+ */
3478
+ protocol?: string;
3479
+ }
3480
+
3481
+ export namespace Liquidity {
3482
+ export interface Pool {
3483
+ /**
3484
+ * Unique identifier of the liquidity pool.
3485
+ */
3486
+ id: string;
3487
+ }
3488
+ }
3489
+
3490
+ export interface Range {
3491
+ /**
3492
+ * Reward amount for this range.
3493
+ */
3494
+ amount: number;
3495
+
3496
+ /**
3497
+ * End value of the range.
3498
+ */
3499
+ endRange: number;
3500
+
3501
+ /**
3502
+ * Start value of the range.
3503
+ */
3504
+ startRange: number;
3505
+
3506
+ /**
3507
+ * ID of the loyalty badge for this range.
3508
+ */
3509
+ loyaltyBadgeId?: string;
3510
+
3511
+ /**
3512
+ * Amount of the loyalty multiplier for this range.
3513
+ */
3514
+ loyaltyMultiplierAmount?: number;
3515
+ }
3516
+
3517
+ /**
3518
+ * Object defining referral requirements.
3519
+ */
3520
+ export interface ReferralRequirements {
3521
+ /**
3522
+ * Flag indicating if achieving points is required.
3523
+ */
3524
+ achievePoints?: boolean | null;
3525
+
3526
+ /**
3527
+ * Flag indicating if completing the profile is required.
3528
+ */
3529
+ completeProfile?: boolean | null;
3530
+
3531
+ /**
3532
+ * Flag indicating if connecting Discord is required.
3533
+ */
3534
+ connectDiscord?: boolean | null;
3535
+
3536
+ /**
3537
+ * Flag indicating if connecting email is required.
3538
+ */
3539
+ connectEmail?: boolean | null;
3540
+
3541
+ /**
3542
+ * Flag indicating if connecting Twitter is required.
3543
+ */
3544
+ connectTwitter?: boolean | null;
3545
+
3546
+ points?: ReferralRequirements.Points | null;
3547
+ }
3548
+
3549
+ export namespace ReferralRequirements {
3550
+ export interface Points {
3551
+ /**
3552
+ * Points required for referral.
3553
+ */
3554
+ amount?: number | null;
3555
+
3556
+ /**
3557
+ * ID of the loyalty currency for referral.
3558
+ */
3559
+ loyaltyCurrecyId?: string | null;
3560
+ }
3561
+ }
3562
+
3563
+ /**
3564
+ * Object containing details of the associated smart contract.
3565
+ */
3566
+ export interface SmartContract {
3567
+ /**
3568
+ * Mapping of addresses for the smart contract.
3569
+ */
3570
+ addressMapping?: string | null;
3571
+
3572
+ /**
3573
+ * Object containing details of the amount multiplier from the event.
3574
+ */
3575
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3576
+
3577
+ /**
3578
+ * ID of the smart contract.
3579
+ */
3580
+ contractId?: string | null;
3581
+
3582
+ /**
3583
+ * Criteria to evaluate the smart contract event.
3584
+ */
3585
+ criteria?: 'everyEvent' | 'byParameter' | null;
3586
+
3587
+ /**
3588
+ * Event emitted by the smart contract.
3589
+ */
3590
+ event?: string | null;
3591
+
3592
+ /**
3593
+ * Array of parameters for the smart contract.
3594
+ */
3595
+ params?: Array<SmartContract.Param> | null;
3596
+
3597
+ /**
3598
+ * Type of the smart contract interaction.
3599
+ */
3600
+ type?: 'function' | 'event' | null;
3601
+ }
3602
+
3603
+ export namespace SmartContract {
3604
+ /**
3605
+ * Object containing details of the amount multiplier from the event.
3606
+ */
3607
+ export interface AmountMultiplier {
3608
+ /**
3609
+ * Mapping of the value for the smart contract.
3610
+ */
3611
+ valueMapping?: string | null;
3612
+ }
3613
+
3614
+ export interface Param {
3615
+ /**
3616
+ * Condition to check for the parameter.
3617
+ */
3618
+ condition?: string | null;
3619
+
3620
+ /**
3621
+ * Name of the smart contract parameter.
3622
+ */
3623
+ name?: string | null;
3624
+
3625
+ /**
3626
+ * Value of the parameter.
3627
+ */
3628
+ value?: string | null;
3629
+ }
3630
+ }
3631
+
3632
+ export interface SnapshotProposal {
3633
+ /**
3634
+ * ID of the snapshot proposal.
3635
+ */
3636
+ id: string;
3637
+
3638
+ /**
3639
+ * Space associated with the snapshot proposal.
3640
+ */
3641
+ space: string;
3642
+ }
3643
+
3644
+ export interface StreakArray {
3645
+ /**
3646
+ * Reward amount for achieving the streak milestone.
3647
+ */
3648
+ streakAmount: number;
3649
+
3650
+ /**
3651
+ * Milestone required to achieve the streak.
3652
+ */
3653
+ streakMilestone: number;
3654
+ }
3655
+
3656
+ /**
3657
+ * Metadata for swap loyalty rules
3658
+ */
3659
+ export interface Swap {
3660
+ provider?: 'any' | 'relay' | 'lifi';
3661
+
3662
+ relayReferrerId?: string;
3663
+
3664
+ requireCrossChainSwap?: boolean;
3665
+
3666
+ swappedToChain?: 'any' | number | string;
3667
+
3668
+ swappedToTokens?: Array<Swap.SwappedToToken>;
3669
+
3670
+ tokenMode?: 'any' | 'specific';
1910
3671
 
1911
- /**
1912
- * Optional address of the collection
1913
- */
1914
- collectionAddress?: string;
3672
+ trackTokenAmount?: boolean;
3673
+ }
1915
3674
 
1916
- /**
1917
- * Optional metadata for the loyalty rule
1918
- */
1919
- metadata?: Record<string, unknown>;
3675
+ export namespace Swap {
3676
+ export interface SwappedToToken {
3677
+ address: string;
3678
+
3679
+ chainId: string;
3680
+ }
3681
+ }
3682
+ }
1920
3683
  }
1921
3684
  }
1922
3685
 
@@ -1927,7 +3690,9 @@ export interface RuleDeleteResponse {
1927
3690
  }
1928
3691
 
1929
3692
  export interface RuleCompleteResponse {
1930
- message: string;
3693
+ message:
3694
+ | 'Completion request added to queue'
3695
+ | 'Link click being verified, come back later to check the status';
1931
3696
  }
1932
3697
 
1933
3698
  export interface RuleGetStatusResponse {
@@ -1938,11 +3703,119 @@ export namespace RuleGetStatusResponse {
1938
3703
  export interface Data {
1939
3704
  loyaltyRuleId: string;
1940
3705
 
1941
- status: 'pending' | 'processing' | 'completed' | 'failed';
1942
-
1943
3706
  userId: string;
1944
3707
 
3708
+ /**
3709
+ * The ID of the loyalty rule status for the Progress object
3710
+ */
3711
+ id?: string;
3712
+
3713
+ createdAt?: string;
3714
+
3715
+ fulfilledAt?: string | null;
3716
+
3717
+ /**
3718
+ * Categorized examples of messages that may be returned for a loyalty rule's
3719
+ * processing result.
3720
+ *
3721
+ * User Onboarding
3722
+ *
3723
+ * - Check In: "Streak successful"
3724
+ * - Complete Profile Details: "Profile not complete"
3725
+ *
3726
+ * Connect Accounts
3727
+ *
3728
+ * - Connect TikTok: "TikTok not connected"
3729
+ * - Connect Discord: "Discord not connected", "Discord request timeout"
3730
+ * - Connect X: "Twitter not connected", "Twitter not connected or content url is
3731
+ * required"
3732
+ * - Connect Email: "Email address not connected"
3733
+ * - Connect Telegram: "Telegram not connected", "user has not setup telegram (no
3734
+ * telegramUsername), please setup username in telegram and reconnect.",
3735
+ * "Telegram request rate-limited"
3736
+ * - Connect Steam: "Steam not connected"
3737
+ * - Connect Youtube: "Youtube not connected"
3738
+ *
3739
+ * Social Quests
3740
+ *
3741
+ * - Join Telegram Group: "Telegram Channel not joined", "Telegram Channel joined
3742
+ * successfully"
3743
+ * - Post on TikTok: "TikTok post not verified"
3744
+ * - Comment on an X Post: "Quest Completed: You have commented on the tweet",
3745
+ * "Quest Not Completed: Comment not found for the specified tweet"
3746
+ * - Repost an X Post: "Quest Completed: You have retweeted the tweet", "Quest Not
3747
+ * Completed: Retweet not found for the specified tweet", "Quest Completed: You
3748
+ * have retweeted and commented on the tweet", "Quest Not Completed: You have not
3749
+ * retweeted or commented on the tweet"
3750
+ * - Follow an X Account: "Missing required parameters: twitterUserId,
3751
+ * targetUsername", "Quest Completed: You are a follower of
3752
+ * @${targetUsername}", "Quest Not Completed: Please follow @${targetUsername}
3753
+ * and try again in few minutes"
3754
+ * - React to an X Post: "Missing required parameters: texts, twitterUserId,
3755
+ * userTweetId", "No text provided", "Quest Completed: You have posted {tweetId}
3756
+ * a tweet with the text {text}", "Quest Not Completed: Your all previous {COUNT}
3757
+ * posts are already claimed. Please post a new tweet and try again in a few
3758
+ * minutes.", "Tweet is already claimed", "Tweet does not belong to the user",
3759
+ * "Text not found in tweet", "Tweet is before the quest start time", "Tweet does
3760
+ * not have media", "Text found in tweet"
3761
+ * - Add Text to X Bio: "Missing required parameters: texts, twitterUserId", "User
3762
+ * not found", "Text found in bio", "Text not found in bio"
3763
+ * - Add Text to X Username: "Missing required parameters: texts, twitterUserId",
3764
+ * "User not found", "Text found in username", "Text not found in username"
3765
+ * - Comment on an X Post with Text: "Missing required parameters: texts,
3766
+ * twitterUserId", "Comment is already claimed", "Text found in comment", "Text
3767
+ * not found in comment", "Tweet not found or could not be retrieved"
3768
+ * - Comment on a YouTube Video: "Youtube comment added", "Youtube comment not
3769
+ * added"
3770
+ * - Subscribe to a YouTube Channel: "Youtube channel subscribed", "Quest failed,
3771
+ * please make sure you have made your subscriptions public in youtube"
3772
+ * - Get X post impressions: "You've already claimed the reward for this impression
3773
+ * range."
3774
+ * - Add an Item to Steam Wishlist: "Steam Wishlist item added", "Steam Wishlist
3775
+ * item not added"
3776
+ *
3777
+ * Complex Onchain Logic
3778
+ *
3779
+ * - Token Swap: "Swap rewards calculated successfully", "Swap rule failed"
3780
+ *
3781
+ * Other
3782
+ *
3783
+ * - Answer a Quiz: "Quiz question not configured", "No question response found",
3784
+ * "Incorrect answer", "Correct answer"
3785
+ * - Answer a Poll: "Poll question not configured", "Poll response recorded"
3786
+ * - Spend in Shopify Store: "Shopify not connected"
3787
+ * - Points Airdrop: "Seems like you're not eligible for this points airdrop."
3788
+ *
3789
+ * General
3790
+ *
3791
+ * - "Quest already completed"
3792
+ * - "Quest already completed using the same social account (${socialAccountName}),
3793
+ * with the different user."
3794
+ * - "You've already claimed the reward for this quest."
3795
+ * - "Quest not achieved, please try again."
3796
+ * - "Rule is not setup"
3797
+ * - "Request aborted due to timeout"
3798
+ * - "Google account not connected"
3799
+ * - "Claim failed: Multiplier is already active"
3800
+ */
1945
3801
  message?: string;
3802
+
3803
+ organizationId?: string;
3804
+
3805
+ /**
3806
+ * The progress of the loyalty rule from 0 to 100
3807
+ */
3808
+ progress?: number;
3809
+
3810
+ /**
3811
+ * Status of the queued job, this is only returned if the job is queued and being
3812
+ * processed, this wil be retained for 10 minutes after the job is completed
3813
+ */
3814
+ status?: 'pending' | 'processing' | 'completed' | 'failed';
3815
+
3816
+ updatedAt?: string;
3817
+
3818
+ websiteId?: string;
1946
3819
  }
1947
3820
  }
1948
3821
 
@@ -2053,7 +3926,20 @@ export interface RuleCreateParams {
2053
3926
  | 'twitter_like'
2054
3927
  | 'twitter_post_hashtag'
2055
3928
  | 'quiz'
2056
- | 'poll';
3929
+ | 'poll'
3930
+ | 'steam_wishlist'
3931
+ | 'liquidity_uniswap_v2'
3932
+ | 'liquidity_uniswap_v3'
3933
+ | 'points_airdrop'
3934
+ | 'youtube_subscribers'
3935
+ | 'youtube_comment'
3936
+ | 'shopify_spend'
3937
+ | 'swap'
3938
+ | 'tiktok_post'
3939
+ | 'post_impressions'
3940
+ | 'discord_join'
3941
+ | 'connected_youtube'
3942
+ | 'connected_tiktok';
2057
3943
 
2058
3944
  /**
2059
3945
  * Unique identifier for the associated website
@@ -2065,6 +3951,11 @@ export interface RuleCreateParams {
2065
3951
  */
2066
3952
  backgroundAssetUrl?: string;
2067
3953
 
3954
+ /**
3955
+ * The type of claim for the reward
3956
+ */
3957
+ claimType?: 'manual' | 'auto' | null;
3958
+
2068
3959
  /**
2069
3960
  * Blockchain address of the associated collection
2070
3961
  */
@@ -2090,6 +3981,13 @@ export interface RuleCreateParams {
2090
3981
  */
2091
3982
  description?: string;
2092
3983
 
3984
+ duplicatedFromId?: string | null;
3985
+
3986
+ /**
3987
+ * ID of the external integration
3988
+ */
3989
+ externalIntegrationId?: string | null;
3990
+
2093
3991
  /**
2094
3992
  * Whether to hide this rule in the user interface
2095
3993
  */
@@ -2098,18 +3996,40 @@ export interface RuleCreateParams {
2098
3996
  /**
2099
3997
  * Interval between rule executions
2100
3998
  */
2101
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
3999
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
2102
4000
 
2103
4001
  /**
2104
4002
  * Whether this rule is mandatory
2105
4003
  */
2106
4004
  isRequired?: boolean;
2107
4005
 
4006
+ /**
4007
+ * Unique identifier for the loyalty badge
4008
+ */
4009
+ loyaltyBadgeId?: string | null;
4010
+
2108
4011
  /**
2109
4012
  * Unique identifier for the loyalty rule group
2110
4013
  */
2111
4014
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
2112
4015
 
4016
+ /**
4017
+ * URL for uploading loyalty user allotment via CSV
4018
+ */
4019
+ loyaltyUserAllotmentCsvUrl?: string;
4020
+
4021
+ /**
4022
+ * The interval for the max amount. Available for the smart contract and external
4023
+ * rules.
4024
+ */
4025
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
4026
+
4027
+ /**
4028
+ * The maximum amount of points a user can earn per interval. Available for the
4029
+ * smart contract and external rules.
4030
+ */
4031
+ maxAmountPerInterval?: number | null;
4032
+
2113
4033
  /**
2114
4034
  * URL of the media to be displayed
2115
4035
  */
@@ -2119,13 +4039,17 @@ export interface RuleCreateParams {
2119
4039
  * Blockchain network where the rule will apply
2120
4040
  */
2121
4041
  network?:
4042
+ | 'abstract'
4043
+ | 'abstractTestnet'
2122
4044
  | 'apechain'
2123
4045
  | 'arbitrum'
2124
4046
  | 'avalanche'
2125
4047
  | 'avalancheFuji'
2126
4048
  | 'base'
2127
4049
  | 'baseSepolia'
4050
+ | 'berachain'
2128
4051
  | 'berachainArtio'
4052
+ | 'berachainBepolia'
2129
4053
  | 'binance'
2130
4054
  | 'bscTestnet'
2131
4055
  | 'campTestnet'
@@ -2133,18 +4057,30 @@ export interface RuleCreateParams {
2133
4057
  | 'fantomTestnet'
2134
4058
  | 'flowMainnet'
2135
4059
  | 'mainnet'
4060
+ | 'nexusTestnet'
2136
4061
  | 'optimism'
2137
4062
  | 'polygon'
2138
4063
  | 'polygon_mumbai'
2139
4064
  | 'skaleNebula'
4065
+ | 'skaleEuropa'
4066
+ | 'skaleCalypso'
2140
4067
  | 'solana'
2141
4068
  | 'sophon'
4069
+ | 'sophonTestnet'
2142
4070
  | 'sui'
2143
4071
  | 'superseed'
2144
4072
  | 'superseedSepolia'
2145
4073
  | 'vanar'
2146
4074
  | 'xai'
2147
4075
  | 'zksync'
4076
+ | 'coti'
4077
+ | 'cotiTestnet'
4078
+ | 'morph'
4079
+ | 'morphTestnet'
4080
+ | 'morphHolesky'
4081
+ | 'ultra'
4082
+ | 'ultraTestnet'
4083
+ | 'nitrograph'
2148
4084
  | 'sepolia'
2149
4085
  | 'optimism_sepolia'
2150
4086
  | 'arbitrumSepolia'
@@ -2152,22 +4088,38 @@ export interface RuleCreateParams {
2152
4088
  | 'optimism_goerli'
2153
4089
  | 'arbitrumGoerli'
2154
4090
  | 'basecamp'
2155
- | 'abstract';
4091
+ | 'somnia'
4092
+ | 'flow_cadence';
2156
4093
 
2157
4094
  /**
2158
4095
  * OAuth credentials associated with the rule
2159
4096
  */
2160
4097
  oauthCredentialsId?: string | null;
2161
4098
 
4099
+ /**
4100
+ * The lifetime of the reward
4101
+ */
4102
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
4103
+
2162
4104
  /**
2163
4105
  * Type of reward issued by the rule
2164
4106
  */
2165
- rewardType?: 'points' | 'multiplier';
4107
+ rewardType?: 'points' | 'multiplier' | 'badge';
4108
+
4109
+ /**
4110
+ * URL of the Shopify store
4111
+ */
4112
+ shopifyStoreUrl?: string | null;
4113
+
4114
+ /**
4115
+ * Whether to show this rule before the start time
4116
+ */
4117
+ showBeforeStart?: boolean;
2166
4118
 
2167
4119
  /**
2168
- * Identifier for associated subscriptions
4120
+ * Optional subscription id for the rule
2169
4121
  */
2170
- subscriptionIdentifier?: string | null;
4122
+ subscriptionId?: string | null;
2171
4123
  }
2172
4124
 
2173
4125
  export namespace RuleCreateParams {
@@ -2175,6 +4127,11 @@ export namespace RuleCreateParams {
2175
4127
  * Additional metadata for the loyalty rule
2176
4128
  */
2177
4129
  export interface Metadata {
4130
+ /**
4131
+ * Number of tokens per batch.
4132
+ */
4133
+ batchSize?: number | null;
4134
+
2178
4135
  /**
2179
4136
  * Text displayed on the action button.
2180
4137
  */
@@ -2198,7 +4155,7 @@ export namespace RuleCreateParams {
2198
4155
  /**
2199
4156
  * Text to check in the Twitter post, username, or bio.
2200
4157
  */
2201
- checkText?: string | null;
4158
+ checkText?: string | Array<string> | null;
2202
4159
 
2203
4160
  /**
2204
4161
  * Array of collections associated with the rule.
@@ -2208,7 +4165,12 @@ export namespace RuleCreateParams {
2208
4165
  /**
2209
4166
  * Conditions for completing the profile.
2210
4167
  */
2211
- completeProfileConditions?: Record<string, boolean> | null;
4168
+ completeProfileConditions?: { [key: string]: boolean } | null;
4169
+
4170
+ /**
4171
+ * Description of the external rule condition (only for external rules)
4172
+ */
4173
+ conditionDescription?: string;
2212
4174
 
2213
4175
  /**
2214
4176
  * Object containing details for the call-to-action.
@@ -2220,6 +4182,11 @@ export namespace RuleCreateParams {
2220
4182
  */
2221
4183
  customRewardsApiKey?: string;
2222
4184
 
4185
+ /**
4186
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
4187
+ */
4188
+ directRpc?: boolean;
4189
+
2223
4190
  /**
2224
4191
  * Array of Discord servers, channels, and roles to join.
2225
4192
  */
@@ -2245,6 +4212,11 @@ export namespace RuleCreateParams {
2245
4212
  */
2246
4213
  enableVerifiedMultiplier?: boolean;
2247
4214
 
4215
+ /**
4216
+ * Type of ERC20 token for the loyalty rule.
4217
+ */
4218
+ erc20Type?: 'erc20' | 'native';
4219
+
2248
4220
  /**
2249
4221
  * Fill source of the order for the token sale
2250
4222
  */
@@ -2265,11 +4237,6 @@ export namespace RuleCreateParams {
2265
4237
  */
2266
4238
  hasNeverSold?: boolean;
2267
4239
 
2268
- /**
2269
- * Flag indicating whether the order source is included.
2270
- */
2271
- hasOrderSource?: boolean;
2272
-
2273
4240
  /**
2274
4241
  * Indicates if the full royalty has been paid for items.
2275
4242
  */
@@ -2290,11 +4257,21 @@ export namespace RuleCreateParams {
2290
4257
  */
2291
4258
  imageUrl?: string | null;
2292
4259
 
4260
+ /**
4261
+ * If enabled, the first transaction done on the platform will complete this rule
4262
+ */
4263
+ isCheckInOnEveryTxn?: boolean;
4264
+
2293
4265
  /**
2294
4266
  * Indicates if the multiplier has been applied to rewards.
2295
4267
  */
2296
4268
  isMultiplierApplied?: boolean;
2297
4269
 
4270
+ /**
4271
+ * Flag indicating if the rule is restricted to new users.
4272
+ */
4273
+ isRestrictedToNewUsers?: boolean;
4274
+
2298
4275
  /**
2299
4276
  * Flag indicating if rewards are applied retroactively.
2300
4277
  */
@@ -2310,6 +4287,11 @@ export namespace RuleCreateParams {
2310
4287
  */
2311
4288
  link?: string | null;
2312
4289
 
4290
+ /**
4291
+ * Liquidity pool details.
4292
+ */
4293
+ liquidity?: Metadata.Liquidity;
4294
+
2313
4295
  /**
2314
4296
  * Maximum quantity constraint for token holding.
2315
4297
  */
@@ -2351,14 +4333,24 @@ export namespace RuleCreateParams {
2351
4333
  onlyRewardSingleTokenOwnership?: boolean | null;
2352
4334
 
2353
4335
  /**
2354
- * Order source of the order for the token sale
4336
+ * Promotional code associated with the rule.
2355
4337
  */
2356
- orderSource?: string;
4338
+ promoCode?: string;
2357
4339
 
2358
4340
  /**
2359
- * Promotional code associated with the rule.
4341
+ * URL of the CSV file containing promo codes.
2360
4342
  */
2361
- promoCode?: string;
4343
+ promoCodeCsvUrl?: string;
4344
+
4345
+ /**
4346
+ * Numbers of the promotional code to be generated.
4347
+ */
4348
+ promoCodeLength?: number | null;
4349
+
4350
+ /**
4351
+ * Type of the promotional code.
4352
+ */
4353
+ promoCodeType?: 'code' | 'csv' | 'generate';
2362
4354
 
2363
4355
  /**
2364
4356
  * Array defining ranges and corresponding rewards.
@@ -2375,11 +4367,62 @@ export namespace RuleCreateParams {
2375
4367
  */
2376
4368
  referrerReward?: number | null;
2377
4369
 
4370
+ /**
4371
+ * Loyalty currency ID of the referrer reward.
4372
+ */
4373
+ referrerRewardLoyaltyCurrencyId?: string | null;
4374
+
4375
+ /**
4376
+ * Flag indicating if the post link is required.
4377
+ */
4378
+ requirePostLink?: boolean | null;
4379
+
4380
+ /**
4381
+ * Flag indicating if media metadata is required.
4382
+ */
4383
+ requirePostMediaLink?: boolean | null;
4384
+
4385
+ /**
4386
+ * Flag indicating if the rule can also reward badges per range.
4387
+ */
4388
+ rewardBadgePerRange?: boolean;
4389
+
4390
+ /**
4391
+ * Flag indicating if the reward is rewarded by batch.
4392
+ */
4393
+ rewardByBatch?: boolean | null;
4394
+
4395
+ /**
4396
+ * Criteria to evaluate the reward.
4397
+ */
4398
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
4399
+
4400
+ /**
4401
+ * Flag indicating if the reward is rewarded per action.
4402
+ */
4403
+ rewardPerAction?: boolean | null;
4404
+
2378
4405
  /**
2379
4406
  * Flag indicating if rewards are given per impression.
2380
4407
  */
2381
4408
  rewardPerImpression?: boolean | null;
2382
4409
 
4410
+ /**
4411
+ * Flag indicating if the rule should reward based on value of traded tokens
4412
+ * instead of count.
4413
+ */
4414
+ rewardPerValue?: boolean;
4415
+
4416
+ /**
4417
+ * Wallet address of the user can only be used if userId is not provided
4418
+ */
4419
+ royaltyAddress?: string;
4420
+
4421
+ /**
4422
+ * Royalty percentage of the item.
4423
+ */
4424
+ royaltyPercentage?: number;
4425
+
2383
4426
  /**
2384
4427
  * Currency associated with sales.
2385
4428
  */
@@ -2419,6 +4462,7 @@ export namespace RuleCreateParams {
2419
4462
  | 'Twitch'
2420
4463
  | 'X(Twitter)'
2421
4464
  | 'YouTube'
4465
+ | 'Google'
2422
4466
  | null;
2423
4467
 
2424
4468
  /**
@@ -2431,11 +4475,21 @@ export namespace RuleCreateParams {
2431
4475
  */
2432
4476
  socialPlatformName?: string | null;
2433
4477
 
4478
+ /**
4479
+ * ID of the Steam app.
4480
+ */
4481
+ steamAppId?: string | null;
4482
+
2434
4483
  /**
2435
4484
  * Array of streak milestones and corresponding rewards.
2436
4485
  */
2437
4486
  streakArray?: Array<Metadata.StreakArray> | null;
2438
4487
 
4488
+ /**
4489
+ * Metadata for swap loyalty rules
4490
+ */
4491
+ swap?: Metadata.Swap;
4492
+
2439
4493
  /**
2440
4494
  * ID of the Telegram channel.
2441
4495
  */
@@ -2451,6 +4505,12 @@ export namespace RuleCreateParams {
2451
4505
  */
2452
4506
  trackAllContracts?: boolean | null;
2453
4507
 
4508
+ /**
4509
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
4510
+ * completed once the progress is 100%.
4511
+ */
4512
+ trackProgress?: boolean | null;
4513
+
2454
4514
  /**
2455
4515
  * URL of the associated Twitter account.
2456
4516
  */
@@ -2494,7 +4554,27 @@ export namespace RuleCreateParams {
2494
4554
  /**
2495
4555
  * Type of wallet associated with the rule.
2496
4556
  */
2497
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
4557
+ walletType?:
4558
+ | 'evm'
4559
+ | 'solana'
4560
+ | 'imx'
4561
+ | 'sui'
4562
+ | 'ton'
4563
+ | 'cosmos'
4564
+ | 'ultra'
4565
+ | 'agw'
4566
+ | 'flow_cadence'
4567
+ | null;
4568
+
4569
+ /**
4570
+ * ID of the Youtube channel.
4571
+ */
4572
+ youtubeChannelId?: string | null;
4573
+
4574
+ /**
4575
+ * ID of the Youtube video.
4576
+ */
4577
+ youtubeVideoId?: string | null;
2498
4578
  }
2499
4579
 
2500
4580
  export namespace Metadata {
@@ -2513,13 +4593,17 @@ export namespace RuleCreateParams {
2513
4593
  * Blockchain network of the collection.
2514
4594
  */
2515
4595
  network?:
4596
+ | 'abstract'
4597
+ | 'abstractTestnet'
2516
4598
  | 'apechain'
2517
4599
  | 'arbitrum'
2518
4600
  | 'avalanche'
2519
4601
  | 'avalancheFuji'
2520
4602
  | 'base'
2521
4603
  | 'baseSepolia'
4604
+ | 'berachain'
2522
4605
  | 'berachainArtio'
4606
+ | 'berachainBepolia'
2523
4607
  | 'binance'
2524
4608
  | 'bscTestnet'
2525
4609
  | 'campTestnet'
@@ -2527,18 +4611,30 @@ export namespace RuleCreateParams {
2527
4611
  | 'fantomTestnet'
2528
4612
  | 'flowMainnet'
2529
4613
  | 'mainnet'
4614
+ | 'nexusTestnet'
2530
4615
  | 'optimism'
2531
4616
  | 'polygon'
2532
4617
  | 'polygon_mumbai'
2533
4618
  | 'skaleNebula'
4619
+ | 'skaleEuropa'
4620
+ | 'skaleCalypso'
2534
4621
  | 'solana'
2535
4622
  | 'sophon'
4623
+ | 'sophonTestnet'
2536
4624
  | 'sui'
2537
4625
  | 'superseed'
2538
4626
  | 'superseedSepolia'
2539
4627
  | 'vanar'
2540
4628
  | 'xai'
2541
4629
  | 'zksync'
4630
+ | 'coti'
4631
+ | 'cotiTestnet'
4632
+ | 'morph'
4633
+ | 'morphTestnet'
4634
+ | 'morphHolesky'
4635
+ | 'ultra'
4636
+ | 'ultraTestnet'
4637
+ | 'nitrograph'
2542
4638
  | 'sepolia'
2543
4639
  | 'optimism_sepolia'
2544
4640
  | 'arbitrumSepolia'
@@ -2546,7 +4642,8 @@ export namespace RuleCreateParams {
2546
4642
  | 'optimism_goerli'
2547
4643
  | 'arbitrumGoerli'
2548
4644
  | 'basecamp'
2549
- | 'abstract';
4645
+ | 'somnia'
4646
+ | 'flow_cadence';
2550
4647
  }
2551
4648
 
2552
4649
  /**
@@ -2623,6 +4720,108 @@ export namespace RuleCreateParams {
2623
4720
  id: string;
2624
4721
  }
2625
4722
 
4723
+ /**
4724
+ * Liquidity pool details.
4725
+ */
4726
+ export interface Liquidity {
4727
+ /**
4728
+ * Calculation type of the liquidity pool.
4729
+ */
4730
+ calculationType?: 'fixed' | 'custom';
4731
+
4732
+ /**
4733
+ * Custom function to calculate the the reward amount based on the liquidity
4734
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
4735
+ * USD.
4736
+ */
4737
+ customFunction?: string;
4738
+
4739
+ /**
4740
+ * Liquidity provided per day in USD
4741
+ */
4742
+ liquidityPerDay?: number;
4743
+
4744
+ /**
4745
+ * Blockchain network of the liquidity pool.
4746
+ */
4747
+ network?:
4748
+ | 'abstract'
4749
+ | 'abstractTestnet'
4750
+ | 'apechain'
4751
+ | 'arbitrum'
4752
+ | 'avalanche'
4753
+ | 'avalancheFuji'
4754
+ | 'base'
4755
+ | 'baseSepolia'
4756
+ | 'berachain'
4757
+ | 'berachainArtio'
4758
+ | 'berachainBepolia'
4759
+ | 'binance'
4760
+ | 'bscTestnet'
4761
+ | 'campTestnet'
4762
+ | 'fantom'
4763
+ | 'fantomTestnet'
4764
+ | 'flowMainnet'
4765
+ | 'mainnet'
4766
+ | 'nexusTestnet'
4767
+ | 'optimism'
4768
+ | 'polygon'
4769
+ | 'polygon_mumbai'
4770
+ | 'skaleNebula'
4771
+ | 'skaleEuropa'
4772
+ | 'skaleCalypso'
4773
+ | 'solana'
4774
+ | 'sophon'
4775
+ | 'sophonTestnet'
4776
+ | 'sui'
4777
+ | 'superseed'
4778
+ | 'superseedSepolia'
4779
+ | 'vanar'
4780
+ | 'xai'
4781
+ | 'zksync'
4782
+ | 'coti'
4783
+ | 'cotiTestnet'
4784
+ | 'morph'
4785
+ | 'morphTestnet'
4786
+ | 'morphHolesky'
4787
+ | 'ultra'
4788
+ | 'ultraTestnet'
4789
+ | 'nitrograph'
4790
+ | 'sepolia'
4791
+ | 'optimism_sepolia'
4792
+ | 'arbitrumSepolia'
4793
+ | 'goerli'
4794
+ | 'optimism_goerli'
4795
+ | 'arbitrumGoerli'
4796
+ | 'basecamp'
4797
+ | 'somnia'
4798
+ | 'flow_cadence';
4799
+
4800
+ /**
4801
+ * Indicates if only in-range liquidity is rewarded.
4802
+ */
4803
+ onlyRewardInRangeLiquidity?: boolean;
4804
+
4805
+ /**
4806
+ * Array of liquidity pools associated with the rule.
4807
+ */
4808
+ pools?: Array<Liquidity.Pool>;
4809
+
4810
+ /**
4811
+ * Protocol of the liquidity pool.
4812
+ */
4813
+ protocol?: string;
4814
+ }
4815
+
4816
+ export namespace Liquidity {
4817
+ export interface Pool {
4818
+ /**
4819
+ * Unique identifier of the liquidity pool.
4820
+ */
4821
+ id: string;
4822
+ }
4823
+ }
4824
+
2626
4825
  export interface Range {
2627
4826
  /**
2628
4827
  * Reward amount for this range.
@@ -2638,6 +4837,16 @@ export namespace RuleCreateParams {
2638
4837
  * Start value of the range.
2639
4838
  */
2640
4839
  startRange: number;
4840
+
4841
+ /**
4842
+ * ID of the loyalty badge for this range.
4843
+ */
4844
+ loyaltyBadgeId?: string;
4845
+
4846
+ /**
4847
+ * Amount of the loyalty multiplier for this range.
4848
+ */
4849
+ loyaltyMultiplierAmount?: number;
2641
4850
  }
2642
4851
 
2643
4852
  /**
@@ -2690,20 +4899,15 @@ export namespace RuleCreateParams {
2690
4899
  * Object containing details of the associated smart contract.
2691
4900
  */
2692
4901
  export interface SmartContract {
2693
- /**
2694
- * ABI of the smart contract.
2695
- */
2696
- abi?: string | null;
2697
-
2698
4902
  /**
2699
4903
  * Mapping of addresses for the smart contract.
2700
4904
  */
2701
4905
  addressMapping?: string | null;
2702
4906
 
2703
4907
  /**
2704
- * Array of bonus details applied to the rule.
4908
+ * Object containing details of the amount multiplier from the event.
2705
4909
  */
2706
- bonus?: Array<SmartContract.Bonus> | null;
4910
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2707
4911
 
2708
4912
  /**
2709
4913
  * ID of the smart contract.
@@ -2715,68 +4919,31 @@ export namespace RuleCreateParams {
2715
4919
  */
2716
4920
  criteria?: 'everyEvent' | 'byParameter' | null;
2717
4921
 
2718
- /**
2719
- * Time range applied to the rule.
2720
- */
2721
- customRange?: SmartContract.CustomRange | null;
2722
-
2723
4922
  /**
2724
4923
  * Event emitted by the smart contract.
2725
4924
  */
2726
4925
  event?: string | null;
2727
4926
 
2728
- /**
2729
- * Maximum value allowed for the parameter.
2730
- */
2731
- max?: number | null;
2732
-
2733
4927
  /**
2734
4928
  * Array of parameters for the smart contract.
2735
4929
  */
2736
4930
  params?: Array<SmartContract.Param> | null;
2737
4931
 
2738
4932
  /**
2739
- * Flag indicating if a bonus is applied.
2740
- */
2741
- withBonus?: boolean | null;
2742
-
2743
- /**
2744
- * Flag indicating if a custom range is applied.
4933
+ * Type of the smart contract interaction.
2745
4934
  */
2746
- withCustomRange?: boolean | null;
2747
-
2748
- /**
2749
- * Flag indicating if a maximum limit is applied.
2750
- */
2751
- withMax?: boolean | null;
4935
+ type?: 'function' | 'event' | null;
2752
4936
  }
2753
4937
 
2754
4938
  export namespace SmartContract {
2755
- export interface Bonus {
2756
- /**
2757
- * Amount of the bonus.
2758
- */
2759
- amount?: number | null;
2760
-
2761
- /**
2762
- * Number of times the bonus is applied.
2763
- */
2764
- count?: number | null;
2765
- }
2766
-
2767
4939
  /**
2768
- * Time range applied to the rule.
4940
+ * Object containing details of the amount multiplier from the event.
2769
4941
  */
2770
- export interface CustomRange {
2771
- /**
2772
- * End time of the custom range.
2773
- */
2774
- endsAt?: string | null;
2775
-
4942
+ export interface AmountMultiplier {
2776
4943
  /**
2777
- * Start time of the custom range.
4944
+ * Mapping of the value for the smart contract.
2778
4945
  */
2779
- startsAt?: string | null;
4946
+ valueMapping?: string | null;
2780
4947
  }
2781
4948
 
2782
4949
  export interface Param {
@@ -2820,6 +4987,33 @@ export namespace RuleCreateParams {
2820
4987
  */
2821
4988
  streakMilestone: number;
2822
4989
  }
4990
+
4991
+ /**
4992
+ * Metadata for swap loyalty rules
4993
+ */
4994
+ export interface Swap {
4995
+ provider?: 'any' | 'relay' | 'lifi';
4996
+
4997
+ relayReferrerId?: string;
4998
+
4999
+ requireCrossChainSwap?: boolean;
5000
+
5001
+ swappedToChain?: 'any' | number | string;
5002
+
5003
+ swappedToTokens?: Array<Swap.SwappedToToken>;
5004
+
5005
+ tokenMode?: 'any' | 'specific';
5006
+
5007
+ trackTokenAmount?: boolean;
5008
+ }
5009
+
5010
+ export namespace Swap {
5011
+ export interface SwappedToToken {
5012
+ address: string;
5013
+
5014
+ chainId: string;
5015
+ }
5016
+ }
2823
5017
  }
2824
5018
 
2825
5019
  export interface Collection {
@@ -2832,13 +5026,17 @@ export namespace RuleCreateParams {
2832
5026
  * Blockchain network for the collection
2833
5027
  */
2834
5028
  network:
5029
+ | 'abstract'
5030
+ | 'abstractTestnet'
2835
5031
  | 'apechain'
2836
5032
  | 'arbitrum'
2837
5033
  | 'avalanche'
2838
5034
  | 'avalancheFuji'
2839
5035
  | 'base'
2840
5036
  | 'baseSepolia'
5037
+ | 'berachain'
2841
5038
  | 'berachainArtio'
5039
+ | 'berachainBepolia'
2842
5040
  | 'binance'
2843
5041
  | 'bscTestnet'
2844
5042
  | 'campTestnet'
@@ -2846,18 +5044,30 @@ export namespace RuleCreateParams {
2846
5044
  | 'fantomTestnet'
2847
5045
  | 'flowMainnet'
2848
5046
  | 'mainnet'
5047
+ | 'nexusTestnet'
2849
5048
  | 'optimism'
2850
5049
  | 'polygon'
2851
5050
  | 'polygon_mumbai'
2852
5051
  | 'skaleNebula'
5052
+ | 'skaleEuropa'
5053
+ | 'skaleCalypso'
2853
5054
  | 'solana'
2854
5055
  | 'sophon'
5056
+ | 'sophonTestnet'
2855
5057
  | 'sui'
2856
5058
  | 'superseed'
2857
5059
  | 'superseedSepolia'
2858
5060
  | 'vanar'
2859
5061
  | 'xai'
2860
5062
  | 'zksync'
5063
+ | 'coti'
5064
+ | 'cotiTestnet'
5065
+ | 'morph'
5066
+ | 'morphTestnet'
5067
+ | 'morphHolesky'
5068
+ | 'ultra'
5069
+ | 'ultraTestnet'
5070
+ | 'nitrograph'
2861
5071
  | 'sepolia'
2862
5072
  | 'optimism_sepolia'
2863
5073
  | 'arbitrumSepolia'
@@ -2865,7 +5075,13 @@ export namespace RuleCreateParams {
2865
5075
  | 'optimism_goerli'
2866
5076
  | 'arbitrumGoerli'
2867
5077
  | 'basecamp'
2868
- | 'abstract';
5078
+ | 'somnia'
5079
+ | 'flow_cadence';
5080
+
5081
+ /**
5082
+ * Symbol of the collection.
5083
+ */
5084
+ symbol?: string;
2869
5085
  }
2870
5086
  }
2871
5087
 
@@ -2881,14 +5097,19 @@ export interface RuleUpdateParams {
2881
5097
  endTime: string | null;
2882
5098
 
2883
5099
  /**
2884
- * Name of the loyalty rule
5100
+ * Name of the loyalty rule
5101
+ */
5102
+ name: string;
5103
+
5104
+ /**
5105
+ * The type of claim for the reward
2885
5106
  */
2886
- name: string;
5107
+ claimType?: 'manual' | 'auto' | null;
2887
5108
 
2888
5109
  /**
2889
5110
  * Blockchain address of the associated collection
2890
5111
  */
2891
- collectionAddress?: string;
5112
+ collectionAddress?: string | null;
2892
5113
 
2893
5114
  /**
2894
5115
  * List of associated collections
@@ -2920,6 +5141,11 @@ export interface RuleUpdateParams {
2920
5141
  */
2921
5142
  effectiveStartTime?: string | null;
2922
5143
 
5144
+ /**
5145
+ * ID of the external integration
5146
+ */
5147
+ externalIntegrationId?: string | null;
5148
+
2923
5149
  /**
2924
5150
  * Frequency of the rule execution
2925
5151
  */
@@ -2933,7 +5159,7 @@ export interface RuleUpdateParams {
2933
5159
  /**
2934
5160
  * Time interval for recurring rule execution
2935
5161
  */
2936
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
5162
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | 'unlimited' | null;
2937
5163
 
2938
5164
  /**
2939
5165
  * Whether this rule is required for participation
@@ -2945,6 +5171,18 @@ export interface RuleUpdateParams {
2945
5171
  */
2946
5172
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
2947
5173
 
5174
+ /**
5175
+ * The interval for the max amount. Available for the smart contract and external
5176
+ * rules.
5177
+ */
5178
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
5179
+
5180
+ /**
5181
+ * The maximum amount of points a user can earn per interval. Available for the
5182
+ * smart contract and external rules.
5183
+ */
5184
+ maxAmountPerInterval?: number | null;
5185
+
2948
5186
  /**
2949
5187
  * URL of the media to be displayed
2950
5188
  */
@@ -2959,13 +5197,17 @@ export interface RuleUpdateParams {
2959
5197
  * Blockchain network where the rule will apply
2960
5198
  */
2961
5199
  network?:
5200
+ | 'abstract'
5201
+ | 'abstractTestnet'
2962
5202
  | 'apechain'
2963
5203
  | 'arbitrum'
2964
5204
  | 'avalanche'
2965
5205
  | 'avalancheFuji'
2966
5206
  | 'base'
2967
5207
  | 'baseSepolia'
5208
+ | 'berachain'
2968
5209
  | 'berachainArtio'
5210
+ | 'berachainBepolia'
2969
5211
  | 'binance'
2970
5212
  | 'bscTestnet'
2971
5213
  | 'campTestnet'
@@ -2973,18 +5215,30 @@ export interface RuleUpdateParams {
2973
5215
  | 'fantomTestnet'
2974
5216
  | 'flowMainnet'
2975
5217
  | 'mainnet'
5218
+ | 'nexusTestnet'
2976
5219
  | 'optimism'
2977
5220
  | 'polygon'
2978
5221
  | 'polygon_mumbai'
2979
5222
  | 'skaleNebula'
5223
+ | 'skaleEuropa'
5224
+ | 'skaleCalypso'
2980
5225
  | 'solana'
2981
5226
  | 'sophon'
5227
+ | 'sophonTestnet'
2982
5228
  | 'sui'
2983
5229
  | 'superseed'
2984
5230
  | 'superseedSepolia'
2985
5231
  | 'vanar'
2986
5232
  | 'xai'
2987
5233
  | 'zksync'
5234
+ | 'coti'
5235
+ | 'cotiTestnet'
5236
+ | 'morph'
5237
+ | 'morphTestnet'
5238
+ | 'morphHolesky'
5239
+ | 'ultra'
5240
+ | 'ultraTestnet'
5241
+ | 'nitrograph'
2988
5242
  | 'sepolia'
2989
5243
  | 'optimism_sepolia'
2990
5244
  | 'arbitrumSepolia'
@@ -2992,17 +5246,33 @@ export interface RuleUpdateParams {
2992
5246
  | 'optimism_goerli'
2993
5247
  | 'arbitrumGoerli'
2994
5248
  | 'basecamp'
2995
- | 'abstract';
5249
+ | 'somnia'
5250
+ | 'flow_cadence';
2996
5251
 
2997
5252
  /**
2998
5253
  * ID for associated OAuth credentials
2999
5254
  */
3000
5255
  oauthCredentialsId?: string | null;
3001
5256
 
5257
+ /**
5258
+ * The lifetime of the reward
5259
+ */
5260
+ rewardLifetime?: 'permanent' | 'dynamic' | null;
5261
+
3002
5262
  /**
3003
5263
  * Type of reward issued by this rule
3004
5264
  */
3005
- rewardType?: 'points' | 'multiplier';
5265
+ rewardType?: 'points' | 'multiplier' | 'badge';
5266
+
5267
+ /**
5268
+ * URL of the Shopify store
5269
+ */
5270
+ shopifyStoreUrl?: string | null;
5271
+
5272
+ /**
5273
+ * Whether to show this rule before the start time
5274
+ */
5275
+ showBeforeStart?: boolean;
3006
5276
 
3007
5277
  /**
3008
5278
  * Start time for the loyalty rule
@@ -3010,9 +5280,9 @@ export interface RuleUpdateParams {
3010
5280
  startTime?: string | null;
3011
5281
 
3012
5282
  /**
3013
- * Optional subscription identifier for the rule
5283
+ * Optional subscription id for the rule
3014
5284
  */
3015
- subscriptionIdentifier?: string | null;
5285
+ subscriptionId?: string | null;
3016
5286
  }
3017
5287
 
3018
5288
  export namespace RuleUpdateParams {
@@ -3026,13 +5296,17 @@ export namespace RuleUpdateParams {
3026
5296
  * Blockchain network for the collection
3027
5297
  */
3028
5298
  network:
5299
+ | 'abstract'
5300
+ | 'abstractTestnet'
3029
5301
  | 'apechain'
3030
5302
  | 'arbitrum'
3031
5303
  | 'avalanche'
3032
5304
  | 'avalancheFuji'
3033
5305
  | 'base'
3034
5306
  | 'baseSepolia'
5307
+ | 'berachain'
3035
5308
  | 'berachainArtio'
5309
+ | 'berachainBepolia'
3036
5310
  | 'binance'
3037
5311
  | 'bscTestnet'
3038
5312
  | 'campTestnet'
@@ -3040,18 +5314,30 @@ export namespace RuleUpdateParams {
3040
5314
  | 'fantomTestnet'
3041
5315
  | 'flowMainnet'
3042
5316
  | 'mainnet'
5317
+ | 'nexusTestnet'
3043
5318
  | 'optimism'
3044
5319
  | 'polygon'
3045
5320
  | 'polygon_mumbai'
3046
5321
  | 'skaleNebula'
5322
+ | 'skaleEuropa'
5323
+ | 'skaleCalypso'
3047
5324
  | 'solana'
3048
5325
  | 'sophon'
5326
+ | 'sophonTestnet'
3049
5327
  | 'sui'
3050
5328
  | 'superseed'
3051
5329
  | 'superseedSepolia'
3052
5330
  | 'vanar'
3053
5331
  | 'xai'
3054
5332
  | 'zksync'
5333
+ | 'coti'
5334
+ | 'cotiTestnet'
5335
+ | 'morph'
5336
+ | 'morphTestnet'
5337
+ | 'morphHolesky'
5338
+ | 'ultra'
5339
+ | 'ultraTestnet'
5340
+ | 'nitrograph'
3055
5341
  | 'sepolia'
3056
5342
  | 'optimism_sepolia'
3057
5343
  | 'arbitrumSepolia'
@@ -3059,13 +5345,24 @@ export namespace RuleUpdateParams {
3059
5345
  | 'optimism_goerli'
3060
5346
  | 'arbitrumGoerli'
3061
5347
  | 'basecamp'
3062
- | 'abstract';
5348
+ | 'somnia'
5349
+ | 'flow_cadence';
5350
+
5351
+ /**
5352
+ * Symbol of the collection.
5353
+ */
5354
+ symbol?: string;
3063
5355
  }
3064
5356
 
3065
5357
  /**
3066
5358
  * Additional metadata for the loyalty rule
3067
5359
  */
3068
5360
  export interface Metadata {
5361
+ /**
5362
+ * Number of tokens per batch.
5363
+ */
5364
+ batchSize?: number | null;
5365
+
3069
5366
  /**
3070
5367
  * Text displayed on the action button.
3071
5368
  */
@@ -3089,7 +5386,7 @@ export namespace RuleUpdateParams {
3089
5386
  /**
3090
5387
  * Text to check in the Twitter post, username, or bio.
3091
5388
  */
3092
- checkText?: string | null;
5389
+ checkText?: string | Array<string> | null;
3093
5390
 
3094
5391
  /**
3095
5392
  * Array of collections associated with the rule.
@@ -3099,7 +5396,12 @@ export namespace RuleUpdateParams {
3099
5396
  /**
3100
5397
  * Conditions for completing the profile.
3101
5398
  */
3102
- completeProfileConditions?: Record<string, boolean> | null;
5399
+ completeProfileConditions?: { [key: string]: boolean } | null;
5400
+
5401
+ /**
5402
+ * Description of the external rule condition (only for external rules)
5403
+ */
5404
+ conditionDescription?: string;
3103
5405
 
3104
5406
  /**
3105
5407
  * Object containing details for the call-to-action.
@@ -3111,6 +5413,11 @@ export namespace RuleUpdateParams {
3111
5413
  */
3112
5414
  customRewardsApiKey?: string;
3113
5415
 
5416
+ /**
5417
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
5418
+ */
5419
+ directRpc?: boolean;
5420
+
3114
5421
  /**
3115
5422
  * Array of Discord servers, channels, and roles to join.
3116
5423
  */
@@ -3136,6 +5443,11 @@ export namespace RuleUpdateParams {
3136
5443
  */
3137
5444
  enableVerifiedMultiplier?: boolean;
3138
5445
 
5446
+ /**
5447
+ * Type of ERC20 token for the loyalty rule.
5448
+ */
5449
+ erc20Type?: 'erc20' | 'native';
5450
+
3139
5451
  /**
3140
5452
  * Fill source of the order for the token sale
3141
5453
  */
@@ -3156,11 +5468,6 @@ export namespace RuleUpdateParams {
3156
5468
  */
3157
5469
  hasNeverSold?: boolean;
3158
5470
 
3159
- /**
3160
- * Flag indicating whether the order source is included.
3161
- */
3162
- hasOrderSource?: boolean;
3163
-
3164
5471
  /**
3165
5472
  * Indicates if the full royalty has been paid for items.
3166
5473
  */
@@ -3181,11 +5488,21 @@ export namespace RuleUpdateParams {
3181
5488
  */
3182
5489
  imageUrl?: string | null;
3183
5490
 
5491
+ /**
5492
+ * If enabled, the first transaction done on the platform will complete this rule
5493
+ */
5494
+ isCheckInOnEveryTxn?: boolean;
5495
+
3184
5496
  /**
3185
5497
  * Indicates if the multiplier has been applied to rewards.
3186
5498
  */
3187
5499
  isMultiplierApplied?: boolean;
3188
5500
 
5501
+ /**
5502
+ * Flag indicating if the rule is restricted to new users.
5503
+ */
5504
+ isRestrictedToNewUsers?: boolean;
5505
+
3189
5506
  /**
3190
5507
  * Flag indicating if rewards are applied retroactively.
3191
5508
  */
@@ -3201,6 +5518,11 @@ export namespace RuleUpdateParams {
3201
5518
  */
3202
5519
  link?: string | null;
3203
5520
 
5521
+ /**
5522
+ * Liquidity pool details.
5523
+ */
5524
+ liquidity?: Metadata.Liquidity;
5525
+
3204
5526
  /**
3205
5527
  * Maximum quantity constraint for token holding.
3206
5528
  */
@@ -3242,14 +5564,24 @@ export namespace RuleUpdateParams {
3242
5564
  onlyRewardSingleTokenOwnership?: boolean | null;
3243
5565
 
3244
5566
  /**
3245
- * Order source of the order for the token sale
5567
+ * Promotional code associated with the rule.
3246
5568
  */
3247
- orderSource?: string;
5569
+ promoCode?: string;
3248
5570
 
3249
5571
  /**
3250
- * Promotional code associated with the rule.
5572
+ * URL of the CSV file containing promo codes.
3251
5573
  */
3252
- promoCode?: string;
5574
+ promoCodeCsvUrl?: string;
5575
+
5576
+ /**
5577
+ * Numbers of the promotional code to be generated.
5578
+ */
5579
+ promoCodeLength?: number | null;
5580
+
5581
+ /**
5582
+ * Type of the promotional code.
5583
+ */
5584
+ promoCodeType?: 'code' | 'csv' | 'generate';
3253
5585
 
3254
5586
  /**
3255
5587
  * Array defining ranges and corresponding rewards.
@@ -3266,11 +5598,62 @@ export namespace RuleUpdateParams {
3266
5598
  */
3267
5599
  referrerReward?: number | null;
3268
5600
 
5601
+ /**
5602
+ * Loyalty currency ID of the referrer reward.
5603
+ */
5604
+ referrerRewardLoyaltyCurrencyId?: string | null;
5605
+
5606
+ /**
5607
+ * Flag indicating if the post link is required.
5608
+ */
5609
+ requirePostLink?: boolean | null;
5610
+
5611
+ /**
5612
+ * Flag indicating if media metadata is required.
5613
+ */
5614
+ requirePostMediaLink?: boolean | null;
5615
+
5616
+ /**
5617
+ * Flag indicating if the rule can also reward badges per range.
5618
+ */
5619
+ rewardBadgePerRange?: boolean;
5620
+
5621
+ /**
5622
+ * Flag indicating if the reward is rewarded by batch.
5623
+ */
5624
+ rewardByBatch?: boolean | null;
5625
+
5626
+ /**
5627
+ * Criteria to evaluate the reward.
5628
+ */
5629
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
5630
+
5631
+ /**
5632
+ * Flag indicating if the reward is rewarded per action.
5633
+ */
5634
+ rewardPerAction?: boolean | null;
5635
+
3269
5636
  /**
3270
5637
  * Flag indicating if rewards are given per impression.
3271
5638
  */
3272
5639
  rewardPerImpression?: boolean | null;
3273
5640
 
5641
+ /**
5642
+ * Flag indicating if the rule should reward based on value of traded tokens
5643
+ * instead of count.
5644
+ */
5645
+ rewardPerValue?: boolean;
5646
+
5647
+ /**
5648
+ * Wallet address of the user can only be used if userId is not provided
5649
+ */
5650
+ royaltyAddress?: string;
5651
+
5652
+ /**
5653
+ * Royalty percentage of the item.
5654
+ */
5655
+ royaltyPercentage?: number;
5656
+
3274
5657
  /**
3275
5658
  * Currency associated with sales.
3276
5659
  */
@@ -3310,6 +5693,7 @@ export namespace RuleUpdateParams {
3310
5693
  | 'Twitch'
3311
5694
  | 'X(Twitter)'
3312
5695
  | 'YouTube'
5696
+ | 'Google'
3313
5697
  | null;
3314
5698
 
3315
5699
  /**
@@ -3322,11 +5706,21 @@ export namespace RuleUpdateParams {
3322
5706
  */
3323
5707
  socialPlatformName?: string | null;
3324
5708
 
5709
+ /**
5710
+ * ID of the Steam app.
5711
+ */
5712
+ steamAppId?: string | null;
5713
+
3325
5714
  /**
3326
5715
  * Array of streak milestones and corresponding rewards.
3327
5716
  */
3328
5717
  streakArray?: Array<Metadata.StreakArray> | null;
3329
5718
 
5719
+ /**
5720
+ * Metadata for swap loyalty rules
5721
+ */
5722
+ swap?: Metadata.Swap;
5723
+
3330
5724
  /**
3331
5725
  * ID of the Telegram channel.
3332
5726
  */
@@ -3342,6 +5736,12 @@ export namespace RuleUpdateParams {
3342
5736
  */
3343
5737
  trackAllContracts?: boolean | null;
3344
5738
 
5739
+ /**
5740
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
5741
+ * completed once the progress is 100%.
5742
+ */
5743
+ trackProgress?: boolean | null;
5744
+
3345
5745
  /**
3346
5746
  * URL of the associated Twitter account.
3347
5747
  */
@@ -3385,7 +5785,27 @@ export namespace RuleUpdateParams {
3385
5785
  /**
3386
5786
  * Type of wallet associated with the rule.
3387
5787
  */
3388
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
5788
+ walletType?:
5789
+ | 'evm'
5790
+ | 'solana'
5791
+ | 'imx'
5792
+ | 'sui'
5793
+ | 'ton'
5794
+ | 'cosmos'
5795
+ | 'ultra'
5796
+ | 'agw'
5797
+ | 'flow_cadence'
5798
+ | null;
5799
+
5800
+ /**
5801
+ * ID of the Youtube channel.
5802
+ */
5803
+ youtubeChannelId?: string | null;
5804
+
5805
+ /**
5806
+ * ID of the Youtube video.
5807
+ */
5808
+ youtubeVideoId?: string | null;
3389
5809
  }
3390
5810
 
3391
5811
  export namespace Metadata {
@@ -3404,13 +5824,17 @@ export namespace RuleUpdateParams {
3404
5824
  * Blockchain network of the collection.
3405
5825
  */
3406
5826
  network?:
5827
+ | 'abstract'
5828
+ | 'abstractTestnet'
3407
5829
  | 'apechain'
3408
5830
  | 'arbitrum'
3409
5831
  | 'avalanche'
3410
5832
  | 'avalancheFuji'
3411
5833
  | 'base'
3412
5834
  | 'baseSepolia'
5835
+ | 'berachain'
3413
5836
  | 'berachainArtio'
5837
+ | 'berachainBepolia'
3414
5838
  | 'binance'
3415
5839
  | 'bscTestnet'
3416
5840
  | 'campTestnet'
@@ -3418,18 +5842,30 @@ export namespace RuleUpdateParams {
3418
5842
  | 'fantomTestnet'
3419
5843
  | 'flowMainnet'
3420
5844
  | 'mainnet'
5845
+ | 'nexusTestnet'
3421
5846
  | 'optimism'
3422
5847
  | 'polygon'
3423
5848
  | 'polygon_mumbai'
3424
5849
  | 'skaleNebula'
5850
+ | 'skaleEuropa'
5851
+ | 'skaleCalypso'
3425
5852
  | 'solana'
3426
5853
  | 'sophon'
5854
+ | 'sophonTestnet'
3427
5855
  | 'sui'
3428
5856
  | 'superseed'
3429
5857
  | 'superseedSepolia'
3430
5858
  | 'vanar'
3431
5859
  | 'xai'
3432
5860
  | 'zksync'
5861
+ | 'coti'
5862
+ | 'cotiTestnet'
5863
+ | 'morph'
5864
+ | 'morphTestnet'
5865
+ | 'morphHolesky'
5866
+ | 'ultra'
5867
+ | 'ultraTestnet'
5868
+ | 'nitrograph'
3433
5869
  | 'sepolia'
3434
5870
  | 'optimism_sepolia'
3435
5871
  | 'arbitrumSepolia'
@@ -3437,7 +5873,8 @@ export namespace RuleUpdateParams {
3437
5873
  | 'optimism_goerli'
3438
5874
  | 'arbitrumGoerli'
3439
5875
  | 'basecamp'
3440
- | 'abstract';
5876
+ | 'somnia'
5877
+ | 'flow_cadence';
3441
5878
  }
3442
5879
 
3443
5880
  /**
@@ -3514,6 +5951,108 @@ export namespace RuleUpdateParams {
3514
5951
  id: string;
3515
5952
  }
3516
5953
 
5954
+ /**
5955
+ * Liquidity pool details.
5956
+ */
5957
+ export interface Liquidity {
5958
+ /**
5959
+ * Calculation type of the liquidity pool.
5960
+ */
5961
+ calculationType?: 'fixed' | 'custom';
5962
+
5963
+ /**
5964
+ * Custom function to calculate the the reward amount based on the liquidity
5965
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
5966
+ * USD.
5967
+ */
5968
+ customFunction?: string;
5969
+
5970
+ /**
5971
+ * Liquidity provided per day in USD
5972
+ */
5973
+ liquidityPerDay?: number;
5974
+
5975
+ /**
5976
+ * Blockchain network of the liquidity pool.
5977
+ */
5978
+ network?:
5979
+ | 'abstract'
5980
+ | 'abstractTestnet'
5981
+ | 'apechain'
5982
+ | 'arbitrum'
5983
+ | 'avalanche'
5984
+ | 'avalancheFuji'
5985
+ | 'base'
5986
+ | 'baseSepolia'
5987
+ | 'berachain'
5988
+ | 'berachainArtio'
5989
+ | 'berachainBepolia'
5990
+ | 'binance'
5991
+ | 'bscTestnet'
5992
+ | 'campTestnet'
5993
+ | 'fantom'
5994
+ | 'fantomTestnet'
5995
+ | 'flowMainnet'
5996
+ | 'mainnet'
5997
+ | 'nexusTestnet'
5998
+ | 'optimism'
5999
+ | 'polygon'
6000
+ | 'polygon_mumbai'
6001
+ | 'skaleNebula'
6002
+ | 'skaleEuropa'
6003
+ | 'skaleCalypso'
6004
+ | 'solana'
6005
+ | 'sophon'
6006
+ | 'sophonTestnet'
6007
+ | 'sui'
6008
+ | 'superseed'
6009
+ | 'superseedSepolia'
6010
+ | 'vanar'
6011
+ | 'xai'
6012
+ | 'zksync'
6013
+ | 'coti'
6014
+ | 'cotiTestnet'
6015
+ | 'morph'
6016
+ | 'morphTestnet'
6017
+ | 'morphHolesky'
6018
+ | 'ultra'
6019
+ | 'ultraTestnet'
6020
+ | 'nitrograph'
6021
+ | 'sepolia'
6022
+ | 'optimism_sepolia'
6023
+ | 'arbitrumSepolia'
6024
+ | 'goerli'
6025
+ | 'optimism_goerli'
6026
+ | 'arbitrumGoerli'
6027
+ | 'basecamp'
6028
+ | 'somnia'
6029
+ | 'flow_cadence';
6030
+
6031
+ /**
6032
+ * Indicates if only in-range liquidity is rewarded.
6033
+ */
6034
+ onlyRewardInRangeLiquidity?: boolean;
6035
+
6036
+ /**
6037
+ * Array of liquidity pools associated with the rule.
6038
+ */
6039
+ pools?: Array<Liquidity.Pool>;
6040
+
6041
+ /**
6042
+ * Protocol of the liquidity pool.
6043
+ */
6044
+ protocol?: string;
6045
+ }
6046
+
6047
+ export namespace Liquidity {
6048
+ export interface Pool {
6049
+ /**
6050
+ * Unique identifier of the liquidity pool.
6051
+ */
6052
+ id: string;
6053
+ }
6054
+ }
6055
+
3517
6056
  export interface Range {
3518
6057
  /**
3519
6058
  * Reward amount for this range.
@@ -3529,6 +6068,16 @@ export namespace RuleUpdateParams {
3529
6068
  * Start value of the range.
3530
6069
  */
3531
6070
  startRange: number;
6071
+
6072
+ /**
6073
+ * ID of the loyalty badge for this range.
6074
+ */
6075
+ loyaltyBadgeId?: string;
6076
+
6077
+ /**
6078
+ * Amount of the loyalty multiplier for this range.
6079
+ */
6080
+ loyaltyMultiplierAmount?: number;
3532
6081
  }
3533
6082
 
3534
6083
  /**
@@ -3581,20 +6130,15 @@ export namespace RuleUpdateParams {
3581
6130
  * Object containing details of the associated smart contract.
3582
6131
  */
3583
6132
  export interface SmartContract {
3584
- /**
3585
- * ABI of the smart contract.
3586
- */
3587
- abi?: string | null;
3588
-
3589
6133
  /**
3590
6134
  * Mapping of addresses for the smart contract.
3591
6135
  */
3592
6136
  addressMapping?: string | null;
3593
6137
 
3594
6138
  /**
3595
- * Array of bonus details applied to the rule.
6139
+ * Object containing details of the amount multiplier from the event.
3596
6140
  */
3597
- bonus?: Array<SmartContract.Bonus> | null;
6141
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3598
6142
 
3599
6143
  /**
3600
6144
  * ID of the smart contract.
@@ -3606,68 +6150,31 @@ export namespace RuleUpdateParams {
3606
6150
  */
3607
6151
  criteria?: 'everyEvent' | 'byParameter' | null;
3608
6152
 
3609
- /**
3610
- * Time range applied to the rule.
3611
- */
3612
- customRange?: SmartContract.CustomRange | null;
3613
-
3614
6153
  /**
3615
6154
  * Event emitted by the smart contract.
3616
6155
  */
3617
6156
  event?: string | null;
3618
6157
 
3619
- /**
3620
- * Maximum value allowed for the parameter.
3621
- */
3622
- max?: number | null;
3623
-
3624
6158
  /**
3625
6159
  * Array of parameters for the smart contract.
3626
6160
  */
3627
6161
  params?: Array<SmartContract.Param> | null;
3628
6162
 
3629
6163
  /**
3630
- * Flag indicating if a bonus is applied.
3631
- */
3632
- withBonus?: boolean | null;
3633
-
3634
- /**
3635
- * Flag indicating if a custom range is applied.
6164
+ * Type of the smart contract interaction.
3636
6165
  */
3637
- withCustomRange?: boolean | null;
3638
-
3639
- /**
3640
- * Flag indicating if a maximum limit is applied.
3641
- */
3642
- withMax?: boolean | null;
6166
+ type?: 'function' | 'event' | null;
3643
6167
  }
3644
6168
 
3645
6169
  export namespace SmartContract {
3646
- export interface Bonus {
3647
- /**
3648
- * Amount of the bonus.
3649
- */
3650
- amount?: number | null;
3651
-
3652
- /**
3653
- * Number of times the bonus is applied.
3654
- */
3655
- count?: number | null;
3656
- }
3657
-
3658
6170
  /**
3659
- * Time range applied to the rule.
6171
+ * Object containing details of the amount multiplier from the event.
3660
6172
  */
3661
- export interface CustomRange {
3662
- /**
3663
- * End time of the custom range.
3664
- */
3665
- endsAt?: string | null;
3666
-
6173
+ export interface AmountMultiplier {
3667
6174
  /**
3668
- * Start time of the custom range.
6175
+ * Mapping of the value for the smart contract.
3669
6176
  */
3670
- startsAt?: string | null;
6177
+ valueMapping?: string | null;
3671
6178
  }
3672
6179
 
3673
6180
  export interface Param {
@@ -3711,17 +6218,66 @@ export namespace RuleUpdateParams {
3711
6218
  */
3712
6219
  streakMilestone: number;
3713
6220
  }
6221
+
6222
+ /**
6223
+ * Metadata for swap loyalty rules
6224
+ */
6225
+ export interface Swap {
6226
+ provider?: 'any' | 'relay' | 'lifi';
6227
+
6228
+ relayReferrerId?: string;
6229
+
6230
+ requireCrossChainSwap?: boolean;
6231
+
6232
+ swappedToChain?: 'any' | number | string;
6233
+
6234
+ swappedToTokens?: Array<Swap.SwappedToToken>;
6235
+
6236
+ tokenMode?: 'any' | 'specific';
6237
+
6238
+ trackTokenAmount?: boolean;
6239
+ }
6240
+
6241
+ export namespace Swap {
6242
+ export interface SwappedToToken {
6243
+ address: string;
6244
+
6245
+ chainId: string;
6246
+ }
6247
+ }
3714
6248
  }
3715
6249
  }
3716
6250
 
3717
6251
  export interface RuleListParams {
6252
+ /**
6253
+ * IDs of the users to filter results by
6254
+ */
6255
+ allotedToUserId?: string | Array<string>;
6256
+
6257
+ /**
6258
+ * ID of the user group to filter results by
6259
+ */
6260
+ allotedUserGroupId?: string;
6261
+
3718
6262
  /**
3719
6263
  * Address of the collection to filter by
3720
6264
  */
3721
6265
  collectionAddress?: string;
3722
6266
 
3723
6267
  /**
3724
- * Maximum number of records to return (max 1000)
6268
+ * If true this will only return active rules, the rules for which the startTime is
6269
+ * in the past and the endTime is in the future
6270
+ */
6271
+ isActive?: 'true' | 'false';
6272
+
6273
+ /**
6274
+ * If true this will only return special rules, special rules are the rules that
6275
+ * are used for anti sybil as honey pot
6276
+ */
6277
+ isSpecial?: 'true' | 'false';
6278
+
6279
+ /**
6280
+ * Maximum number of records to return (max 100)
3725
6281
  */
3726
6282
  limit?: number;
3727
6283
 
@@ -3751,6 +6307,13 @@ export interface RuleListParams {
3751
6307
  websiteId?: string;
3752
6308
  }
3753
6309
 
6310
+ export interface RuleDeleteParams {
6311
+ /**
6312
+ * Whether to debit loyalty points
6313
+ */
6314
+ debitLoyaltyPoints?: string;
6315
+ }
6316
+
3754
6317
  export interface RuleCompleteParams {
3755
6318
  /**
3756
6319
  * Override amount for the reward (rounded to nearest whole number). This will
@@ -3759,15 +6322,25 @@ export interface RuleCompleteParams {
3759
6322
  amount?: number | null;
3760
6323
 
3761
6324
  /**
3762
- * Link to the comment made by user
6325
+ * Link to the post/comment made by user
3763
6326
  */
3764
- commentLink?: string;
6327
+ contentUrl?: string;
6328
+
6329
+ /**
6330
+ * Unique key to ensure idempotent requests.
6331
+ */
6332
+ idempotencyKey?: string;
3765
6333
 
3766
6334
  /**
3767
6335
  * ID of the choice selected by the user
3768
6336
  */
3769
6337
  loyaltyQuestionChoiceId?: string;
3770
6338
 
6339
+ /**
6340
+ * Value to compare with the range
6341
+ */
6342
+ rangeValue?: number | null;
6343
+
3771
6344
  /**
3772
6345
  * Unique identifier for the user
3773
6346
  */
@@ -3780,7 +6353,7 @@ export interface RuleCompleteParams {
3780
6353
 
3781
6354
  /**
3782
6355
  * Flag indicating if only verification is required, this will not create a
3783
- * transaction and reward the user
6356
+ * transaction and reward the user.
3784
6357
  */
3785
6358
  verifyOnly?: string;
3786
6359
 
@@ -3791,11 +6364,30 @@ export interface RuleCompleteParams {
3791
6364
  }
3792
6365
 
3793
6366
  export interface RuleGetStatusParams {
3794
- organizationId: string;
6367
+ /**
6368
+ * Number of items to return
6369
+ */
6370
+ limit?: number | null;
3795
6371
 
3796
- websiteId: string;
6372
+ /**
6373
+ * Unique identifier for the loyalty rule[s]
6374
+ */
6375
+ loyaltyRuleId?: string | Array<string>;
6376
+
6377
+ organizationId?: string;
6378
+
6379
+ /**
6380
+ * Starting after item
6381
+ */
6382
+ startingAfter?: string;
6383
+
6384
+ userGroupId?: string;
3797
6385
 
3798
6386
  userId?: string;
6387
+
6388
+ walletAddress?: string;
6389
+
6390
+ websiteId?: string;
3799
6391
  }
3800
6392
 
3801
6393
  export declare namespace Rules {
@@ -3809,6 +6401,7 @@ export declare namespace Rules {
3809
6401
  type RuleCreateParams as RuleCreateParams,
3810
6402
  type RuleUpdateParams as RuleUpdateParams,
3811
6403
  type RuleListParams as RuleListParams,
6404
+ type RuleDeleteParams as RuleDeleteParams,
3812
6405
  type RuleCompleteParams as RuleCompleteParams,
3813
6406
  type RuleGetStatusParams as RuleGetStatusParams,
3814
6407
  };