@snagsolutions/sdk 0.1.0-alpha.11 → 0.1.0-alpha.110

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 (378) hide show
  1. package/CHANGELOG.md +970 -0
  2. package/README.md +24 -28
  3. package/_shims/index.d.ts +2 -0
  4. package/_shims/index.js +5 -1
  5. package/_shims/index.mjs +5 -1
  6. package/core.d.ts +19 -5
  7. package/core.d.ts.map +1 -1
  8. package/core.js +35 -19
  9. package/core.js.map +1 -1
  10. package/core.mjs +36 -20
  11. package/core.mjs.map +1 -1
  12. package/index.d.mts +25 -16
  13. package/index.d.ts +25 -16
  14. package/index.d.ts.map +1 -1
  15. package/index.js +20 -10
  16. package/index.js.map +1 -1
  17. package/index.mjs +21 -11
  18. package/index.mjs.map +1 -1
  19. package/package.json +4 -5
  20. package/resource.d.ts +1 -1
  21. package/resource.d.ts.map +1 -1
  22. package/resource.js.map +1 -1
  23. package/resource.mjs.map +1 -1
  24. package/resources/assets.d.ts +22 -8
  25. package/resources/assets.d.ts.map +1 -1
  26. package/resources/assets.js +12 -4
  27. package/resources/assets.js.map +1 -1
  28. package/resources/assets.mjs +12 -4
  29. package/resources/assets.mjs.map +1 -1
  30. package/resources/auctions/auctions.d.ts +285 -0
  31. package/resources/auctions/auctions.d.ts.map +1 -0
  32. package/resources/auctions/auctions.js +76 -0
  33. package/resources/auctions/auctions.js.map +1 -0
  34. package/resources/auctions/auctions.mjs +49 -0
  35. package/resources/auctions/auctions.mjs.map +1 -0
  36. package/resources/auctions/index.d.ts +3 -0
  37. package/resources/auctions/index.d.ts.map +1 -0
  38. package/resources/auctions/index.js +9 -0
  39. package/resources/auctions/index.js.map +1 -0
  40. package/resources/auctions/index.mjs +4 -0
  41. package/resources/auctions/index.mjs.map +1 -0
  42. package/resources/auctions/website-user-attributes/index.d.ts +3 -0
  43. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
  44. package/resources/auctions/website-user-attributes/index.js +9 -0
  45. package/resources/auctions/website-user-attributes/index.js.map +1 -0
  46. package/resources/auctions/website-user-attributes/index.mjs +4 -0
  47. package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
  48. package/resources/auctions/website-user-attributes/values.d.ts +122 -0
  49. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  50. package/resources/auctions/website-user-attributes/values.js +49 -0
  51. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  52. package/resources/auctions/website-user-attributes/values.mjs +45 -0
  53. package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
  54. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +132 -0
  55. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
  56. package/resources/auctions/website-user-attributes/website-user-attributes.js +76 -0
  57. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
  58. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +49 -0
  59. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
  60. package/resources/auctions/website-user-attributes.d.ts +2 -0
  61. package/resources/auctions/website-user-attributes.d.ts.map +1 -0
  62. package/resources/auctions/website-user-attributes.js +19 -0
  63. package/resources/auctions/website-user-attributes.js.map +1 -0
  64. package/resources/auctions/website-user-attributes.mjs +3 -0
  65. package/resources/auctions/website-user-attributes.mjs.map +1 -0
  66. package/resources/auctions.d.ts +2 -0
  67. package/resources/auctions.d.ts.map +1 -0
  68. package/resources/auctions.js +19 -0
  69. package/resources/auctions.js.map +1 -0
  70. package/resources/auctions.mjs +3 -0
  71. package/resources/auctions.mjs.map +1 -0
  72. package/resources/auth.d.ts +44 -0
  73. package/resources/auth.d.ts.map +1 -0
  74. package/resources/auth.js +16 -0
  75. package/resources/auth.js.map +1 -0
  76. package/resources/auth.mjs +12 -0
  77. package/resources/auth.mjs.map +1 -0
  78. package/resources/index.d.ts +7 -5
  79. package/resources/index.d.ts.map +1 -1
  80. package/resources/index.js +10 -6
  81. package/resources/index.js.map +1 -1
  82. package/resources/index.mjs +6 -4
  83. package/resources/index.mjs.map +1 -1
  84. package/resources/loyalty/account-streaks.d.ts +81 -0
  85. package/resources/loyalty/account-streaks.d.ts.map +1 -0
  86. package/resources/loyalty/account-streaks.js +24 -0
  87. package/resources/loyalty/account-streaks.js.map +1 -0
  88. package/resources/loyalty/account-streaks.mjs +20 -0
  89. package/resources/loyalty/account-streaks.mjs.map +1 -0
  90. package/resources/loyalty/accounts.d.ts +62 -15
  91. package/resources/loyalty/accounts.d.ts.map +1 -1
  92. package/resources/loyalty/accounts.js +22 -1
  93. package/resources/loyalty/accounts.js.map +1 -1
  94. package/resources/loyalty/accounts.mjs +22 -1
  95. package/resources/loyalty/accounts.mjs.map +1 -1
  96. package/resources/loyalty/badges.d.ts +876 -77
  97. package/resources/loyalty/badges.d.ts.map +1 -1
  98. package/resources/loyalty/badges.js +19 -1
  99. package/resources/loyalty/badges.js.map +1 -1
  100. package/resources/loyalty/badges.mjs +19 -1
  101. package/resources/loyalty/badges.mjs.map +1 -1
  102. package/resources/loyalty/currencies.d.ts +20 -1
  103. package/resources/loyalty/currencies.d.ts.map +1 -1
  104. package/resources/loyalty/currencies.js +19 -0
  105. package/resources/loyalty/currencies.js.map +1 -1
  106. package/resources/loyalty/currencies.mjs +19 -0
  107. package/resources/loyalty/currencies.mjs.map +1 -1
  108. package/resources/loyalty/index.d.ts +9 -5
  109. package/resources/loyalty/index.d.ts.map +1 -1
  110. package/resources/loyalty/index.js +11 -3
  111. package/resources/loyalty/index.js.map +1 -1
  112. package/resources/loyalty/index.mjs +6 -2
  113. package/resources/loyalty/index.mjs.map +1 -1
  114. package/resources/loyalty/loyalty.d.ts +33 -17
  115. package/resources/loyalty/loyalty.d.ts.map +1 -1
  116. package/resources/loyalty/loyalty.js +28 -12
  117. package/resources/loyalty/loyalty.js.map +1 -1
  118. package/resources/loyalty/loyalty.mjs +29 -13
  119. package/resources/loyalty/loyalty.mjs.map +1 -1
  120. package/resources/loyalty/multipliers.d.ts +97 -4
  121. package/resources/loyalty/multipliers.d.ts.map +1 -1
  122. package/resources/loyalty/multipliers.js +29 -0
  123. package/resources/loyalty/multipliers.js.map +1 -1
  124. package/resources/loyalty/multipliers.mjs +29 -0
  125. package/resources/loyalty/multipliers.mjs.map +1 -1
  126. package/resources/loyalty/questions-responses.d.ts +112 -0
  127. package/resources/loyalty/questions-responses.d.ts.map +1 -0
  128. package/resources/loyalty/questions-responses.js +31 -0
  129. package/resources/loyalty/questions-responses.js.map +1 -0
  130. package/resources/loyalty/questions-responses.mjs +27 -0
  131. package/resources/loyalty/questions-responses.mjs.map +1 -0
  132. package/resources/loyalty/questions.d.ts +183 -0
  133. package/resources/loyalty/questions.d.ts.map +1 -0
  134. package/resources/loyalty/questions.js +60 -0
  135. package/resources/loyalty/questions.js.map +1 -0
  136. package/resources/loyalty/questions.mjs +56 -0
  137. package/resources/loyalty/questions.mjs.map +1 -0
  138. package/resources/loyalty/rule-edits.d.ts +2489 -11
  139. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  140. package/resources/loyalty/rule-edits.js +16 -2
  141. package/resources/loyalty/rule-edits.js.map +1 -1
  142. package/resources/loyalty/rule-edits.mjs +16 -2
  143. package/resources/loyalty/rule-edits.mjs.map +1 -1
  144. package/resources/loyalty/rule-groups.d.ts +738 -0
  145. package/resources/loyalty/rule-groups.d.ts.map +1 -0
  146. package/resources/loyalty/rule-groups.js +52 -0
  147. package/resources/loyalty/rule-groups.js.map +1 -0
  148. package/resources/loyalty/rule-groups.mjs +48 -0
  149. package/resources/loyalty/rule-groups.mjs.map +1 -0
  150. package/resources/loyalty/rules.d.ts +1717 -280
  151. package/resources/loyalty/rules.d.ts.map +1 -1
  152. package/resources/loyalty/rules.js +40 -9
  153. package/resources/loyalty/rules.js.map +1 -1
  154. package/resources/loyalty/rules.mjs +40 -9
  155. package/resources/loyalty/rules.mjs.map +1 -1
  156. package/resources/loyalty/transactions/index.d.ts +3 -0
  157. package/resources/loyalty/transactions/index.d.ts.map +1 -0
  158. package/resources/loyalty/transactions/index.js +9 -0
  159. package/resources/loyalty/transactions/index.js.map +1 -0
  160. package/resources/loyalty/transactions/index.mjs +4 -0
  161. package/resources/loyalty/transactions/index.mjs.map +1 -0
  162. package/resources/loyalty/transactions/rule-statuses.d.ts +120 -0
  163. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  164. package/resources/loyalty/transactions/rule-statuses.js +30 -0
  165. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  166. package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
  167. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  168. package/resources/loyalty/transactions/transactions.d.ts +410 -0
  169. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  170. package/resources/loyalty/transactions/transactions.js +76 -0
  171. package/resources/loyalty/transactions/transactions.js.map +1 -0
  172. package/resources/loyalty/transactions/transactions.mjs +49 -0
  173. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  174. package/resources/loyalty/transactions.d.ts +2 -0
  175. package/resources/loyalty/transactions.d.ts.map +1 -0
  176. package/resources/loyalty/transactions.js +19 -0
  177. package/resources/loyalty/transactions.js.map +1 -0
  178. package/resources/loyalty/transactions.mjs +3 -0
  179. package/resources/loyalty/transactions.mjs.map +1 -0
  180. package/resources/loyalty.d.ts +2 -0
  181. package/resources/loyalty.d.ts.map +1 -0
  182. package/resources/loyalty.js +19 -0
  183. package/resources/loyalty.js.map +1 -0
  184. package/resources/loyalty.mjs +3 -0
  185. package/resources/loyalty.mjs.map +1 -0
  186. package/resources/minting.d.ts +95 -0
  187. package/resources/minting.d.ts.map +1 -0
  188. package/resources/minting.js +15 -0
  189. package/resources/minting.js.map +1 -0
  190. package/resources/minting.mjs +11 -0
  191. package/resources/minting.mjs.map +1 -0
  192. package/resources/referral/index.d.ts +3 -0
  193. package/resources/referral/index.d.ts.map +1 -0
  194. package/resources/referral/index.js +9 -0
  195. package/resources/referral/index.js.map +1 -0
  196. package/resources/referral/index.mjs +4 -0
  197. package/resources/referral/index.mjs.map +1 -0
  198. package/resources/referral/referral.d.ts +39 -0
  199. package/resources/referral/referral.d.ts.map +1 -0
  200. package/resources/{drip/drip.js → referral/referral.js} +21 -12
  201. package/resources/referral/referral.js.map +1 -0
  202. package/resources/referral/referral.mjs +25 -0
  203. package/resources/referral/referral.mjs.map +1 -0
  204. package/resources/referral/users.d.ts +83 -0
  205. package/resources/referral/users.d.ts.map +1 -0
  206. package/resources/referral/users.js +35 -0
  207. package/resources/referral/users.js.map +1 -0
  208. package/resources/referral/users.mjs +31 -0
  209. package/resources/referral/users.mjs.map +1 -0
  210. package/resources/referral.d.ts +2 -0
  211. package/resources/referral.d.ts.map +1 -0
  212. package/resources/referral.js +19 -0
  213. package/resources/referral.js.map +1 -0
  214. package/resources/referral.mjs +3 -0
  215. package/resources/referral.mjs.map +1 -0
  216. package/resources/users/index.d.ts +2 -3
  217. package/resources/users/index.d.ts.map +1 -1
  218. package/resources/users/index.js +1 -3
  219. package/resources/users/index.js.map +1 -1
  220. package/resources/users/index.mjs +2 -3
  221. package/resources/users/index.mjs.map +1 -1
  222. package/resources/users/metadatas.d.ts +109 -9
  223. package/resources/users/metadatas.d.ts.map +1 -1
  224. package/resources/users/metadatas.js +6 -0
  225. package/resources/users/metadatas.js.map +1 -1
  226. package/resources/users/metadatas.mjs +6 -0
  227. package/resources/users/metadatas.mjs.map +1 -1
  228. package/resources/users/users.d.ts +414 -6
  229. package/resources/users/users.d.ts.map +1 -1
  230. package/resources/users/users.js +77 -4
  231. package/resources/users/users.js.map +1 -1
  232. package/resources/users/users.mjs +78 -5
  233. package/resources/users/users.mjs.map +1 -1
  234. package/resources/users.d.ts +2 -0
  235. package/resources/users.d.ts.map +1 -0
  236. package/resources/users.js +19 -0
  237. package/resources/users.js.map +1 -0
  238. package/resources/users.mjs +3 -0
  239. package/resources/users.mjs.map +1 -0
  240. package/resources/websites/index.d.ts +4 -0
  241. package/resources/websites/index.d.ts.map +1 -0
  242. package/resources/websites/index.js +11 -0
  243. package/resources/websites/index.js.map +1 -0
  244. package/resources/websites/index.mjs +5 -0
  245. package/resources/websites/index.mjs.map +1 -0
  246. package/resources/websites/website-collections.d.ts +94 -0
  247. package/resources/websites/website-collections.d.ts.map +1 -0
  248. package/resources/websites/website-collections.js +46 -0
  249. package/resources/websites/website-collections.js.map +1 -0
  250. package/resources/websites/website-collections.mjs +42 -0
  251. package/resources/websites/website-collections.mjs.map +1 -0
  252. package/resources/websites/website-user-roles.d.ts +96 -0
  253. package/resources/websites/website-user-roles.d.ts.map +1 -0
  254. package/resources/websites/website-user-roles.js +45 -0
  255. package/resources/websites/website-user-roles.js.map +1 -0
  256. package/resources/websites/website-user-roles.mjs +41 -0
  257. package/resources/websites/website-user-roles.mjs.map +1 -0
  258. package/resources/websites/websites.d.ts +223 -0
  259. package/resources/websites/websites.d.ts.map +1 -0
  260. package/resources/websites/websites.js +63 -0
  261. package/resources/websites/websites.js.map +1 -0
  262. package/resources/websites/websites.mjs +36 -0
  263. package/resources/websites/websites.mjs.map +1 -0
  264. package/resources/websites.d.ts +1 -202
  265. package/resources/websites.d.ts.map +1 -1
  266. package/resources/websites.js +15 -18
  267. package/resources/websites.js.map +1 -1
  268. package/resources/websites.mjs +1 -16
  269. package/resources/websites.mjs.map +1 -1
  270. package/resources.d.ts +2 -0
  271. package/resources.d.ts.map +1 -0
  272. package/resources.js +18 -0
  273. package/resources.js.map +1 -0
  274. package/resources.mjs +2 -0
  275. package/resources.mjs.map +1 -0
  276. package/src/_shims/index.d.ts +2 -0
  277. package/src/_shims/index.js +5 -1
  278. package/src/_shims/index.mjs +5 -1
  279. package/src/core.ts +56 -20
  280. package/src/index.ts +96 -24
  281. package/src/resource.ts +1 -1
  282. package/src/resources/assets.ts +29 -8
  283. package/src/resources/auctions/auctions.ts +436 -0
  284. package/src/resources/auctions/index.ts +18 -0
  285. package/src/resources/auctions/website-user-attributes/index.ts +18 -0
  286. package/src/resources/auctions/website-user-attributes/values.ts +165 -0
  287. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +207 -0
  288. package/src/resources/auctions/website-user-attributes.ts +3 -0
  289. package/src/resources/auctions.ts +3 -0
  290. package/src/resources/auth.ts +74 -0
  291. package/src/resources/index.ts +31 -5
  292. package/src/resources/loyalty/account-streaks.ts +110 -0
  293. package/src/resources/loyalty/accounts.ts +79 -16
  294. package/src/resources/loyalty/badges.ts +1055 -83
  295. package/src/resources/loyalty/currencies.ts +20 -1
  296. package/src/resources/loyalty/index.ts +53 -9
  297. package/src/resources/loyalty/loyalty.ts +160 -60
  298. package/src/resources/loyalty/multipliers.ts +124 -4
  299. package/src/resources/loyalty/questions-responses.ts +161 -0
  300. package/src/resources/loyalty/questions.ts +241 -0
  301. package/src/resources/loyalty/rule-edits.ts +3486 -63
  302. package/src/resources/loyalty/rule-groups.ts +1145 -0
  303. package/src/resources/loyalty/rules.ts +2854 -579
  304. package/src/resources/loyalty/transactions/index.ts +18 -0
  305. package/src/resources/loyalty/transactions/rule-statuses.ts +178 -0
  306. package/src/resources/loyalty/transactions/transactions.ts +671 -0
  307. package/src/resources/loyalty/transactions.ts +3 -0
  308. package/src/resources/loyalty.ts +3 -0
  309. package/src/resources/minting.ts +168 -0
  310. package/src/resources/referral/index.ts +10 -0
  311. package/src/resources/referral/referral.ts +72 -0
  312. package/src/resources/referral/users.ts +122 -0
  313. package/src/resources/referral.ts +3 -0
  314. package/src/resources/users/index.ts +21 -9
  315. package/src/resources/users/metadatas.ts +161 -8
  316. package/src/resources/users/users.ts +581 -17
  317. package/src/resources/users.ts +3 -0
  318. package/src/resources/websites/index.ts +22 -0
  319. package/src/resources/websites/website-collections.ts +180 -0
  320. package/src/resources/websites/website-user-roles.ts +130 -0
  321. package/src/resources/websites/websites.ts +311 -0
  322. package/src/resources/websites.ts +1 -257
  323. package/src/resources.ts +1 -0
  324. package/src/version.ts +1 -1
  325. package/version.d.ts +1 -1
  326. package/version.d.ts.map +1 -1
  327. package/version.js +1 -1
  328. package/version.js.map +1 -1
  329. package/version.mjs +1 -1
  330. package/version.mjs.map +1 -1
  331. package/resources/auction-bids.d.ts +0 -81
  332. package/resources/auction-bids.d.ts.map +0 -1
  333. package/resources/auction-bids.js +0 -30
  334. package/resources/auction-bids.js.map +0 -1
  335. package/resources/auction-bids.mjs +0 -26
  336. package/resources/auction-bids.mjs.map +0 -1
  337. package/resources/drip/drip.d.ts +0 -14
  338. package/resources/drip/drip.d.ts.map +0 -1
  339. package/resources/drip/drip.js.map +0 -1
  340. package/resources/drip/drip.mjs +0 -16
  341. package/resources/drip/drip.mjs.map +0 -1
  342. package/resources/drip/index.d.ts +0 -4
  343. package/resources/drip/index.d.ts.map +0 -1
  344. package/resources/drip/index.js +0 -11
  345. package/resources/drip/index.js.map +0 -1
  346. package/resources/drip/index.mjs +0 -5
  347. package/resources/drip/index.mjs.map +0 -1
  348. package/resources/drip/quests.d.ts +0 -168
  349. package/resources/drip/quests.d.ts.map +0 -1
  350. package/resources/drip/quests.js +0 -17
  351. package/resources/drip/quests.js.map +0 -1
  352. package/resources/drip/quests.mjs +0 -13
  353. package/resources/drip/quests.mjs.map +0 -1
  354. package/resources/drip/status.d.ts +0 -26
  355. package/resources/drip/status.d.ts.map +0 -1
  356. package/resources/drip/status.js +0 -16
  357. package/resources/drip/status.js.map +0 -1
  358. package/resources/drip/status.mjs +0 -12
  359. package/resources/drip/status.mjs.map +0 -1
  360. package/resources/loyalty/transaction-entries.d.ts +0 -175
  361. package/resources/loyalty/transaction-entries.d.ts.map +0 -1
  362. package/resources/loyalty/transaction-entries.js +0 -16
  363. package/resources/loyalty/transaction-entries.js.map +0 -1
  364. package/resources/loyalty/transaction-entries.mjs +0 -12
  365. package/resources/loyalty/transaction-entries.mjs.map +0 -1
  366. package/resources/users/wallets.d.ts +0 -193
  367. package/resources/users/wallets.d.ts.map +0 -1
  368. package/resources/users/wallets.js +0 -28
  369. package/resources/users/wallets.js.map +0 -1
  370. package/resources/users/wallets.mjs +0 -24
  371. package/resources/users/wallets.mjs.map +0 -1
  372. package/src/resources/auction-bids.ts +0 -123
  373. package/src/resources/drip/drip.ts +0 -25
  374. package/src/resources/drip/index.ts +0 -5
  375. package/src/resources/drip/quests.ts +0 -210
  376. package/src/resources/drip/status.ts +0 -33
  377. package/src/resources/loyalty/transaction-entries.ts +0 -229
  378. package/src/resources/users/wallets.ts +0 -271
@@ -3,34 +3,91 @@ import * as Core from "../../core.js";
3
3
  export declare class Rules extends APIResource {
4
4
  /**
5
5
  * Create a new Loyalty Rule
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const rule = await client.loyalty.rules.create({
10
+ * amount: '10.5',
11
+ * effectiveEndTime: '2024-12-31T23:59:00Z',
12
+ * effectiveStartTime: '2024-01-01T00:00:00Z',
13
+ * endTime: '2024-12-31T23:59:00Z',
14
+ * frequency: 'daily',
15
+ * loyaltyCurrencyId: '456e1234-e89b-12d3-a456-426614174003',
16
+ * metadata: {},
17
+ * name: 'Referral Bonus Rule',
18
+ * organizationId: '123e4567-e89b-12d3-a456-426614174001',
19
+ * startTime: '2024-01-01T00:00:00Z',
20
+ * type: 'Bonus',
21
+ * websiteId: '123e4567-e89b-12d3-a456-426614174002',
22
+ * });
23
+ * ```
6
24
  */
7
25
  create(body: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse>;
8
26
  /**
9
27
  * Update an existing Loyalty Rule
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const rule = await client.loyalty.rules.update(
32
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
33
+ * {
34
+ * amount: '10.5',
35
+ * endTime: '2024-12-31T23:59:00Z',
36
+ * name: 'Daily Rewards Program',
37
+ * },
38
+ * );
39
+ * ```
10
40
  */
11
41
  update(id: string, body: RuleUpdateParams, options?: Core.RequestOptions): Core.APIPromise<RuleUpdateResponse>;
12
42
  /**
13
43
  * Retrieve configured loyalty rules with optional pagination and filters
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const rules = await client.loyalty.rules.list();
48
+ * ```
14
49
  */
15
50
  list(query?: RuleListParams, options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
16
51
  list(options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
17
52
  /**
18
53
  * Delete an existing Loyalty Rule
19
- */
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const rule = await client.loyalty.rules.delete(
58
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
59
+ * );
60
+ * ```
61
+ */
62
+ delete(id: string, params?: RuleDeleteParams, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse>;
20
63
  delete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse>;
21
64
  /**
22
65
  * Verify a loyalty rule based on user action and reward them if applicable. This
23
- * endpoint currenlty onlu supports following rule types code_entry, text_input,
66
+ * endpoint currently only supports following rule types code_entry, text_input,
24
67
  * link_click, discord_member, connect_wallet, check_in, external_rule,
25
68
  * drip_x_follow, drip_x_new_tweet, drip_x_text_in_bio, drip_x_text_in_name,
26
- * drip_x_text_in_comment, drip_x_tweet, telegram_join
69
+ * drip_x_text_in_comment, drip_x_tweet, telegram_join, DiscordMessages,
70
+ * youtube_subscribers, youtube_comment, steam_wishlist
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * const response = await client.loyalty.rules.complete(
75
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
76
+ * );
77
+ * ```
27
78
  */
28
79
  complete(id: string, body?: RuleCompleteParams, options?: Core.RequestOptions): Core.APIPromise<RuleCompleteResponse>;
29
80
  complete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleCompleteResponse>;
30
81
  /**
31
82
  * This will return the processing status of quests for a specific user
32
- */
33
- status(query: RuleStatusParams, options?: Core.RequestOptions): Core.APIPromise<RuleStatusResponse>;
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * const response = await client.loyalty.rules.getStatus();
87
+ * ```
88
+ */
89
+ getStatus(query?: RuleGetStatusParams, options?: Core.RequestOptions): Core.APIPromise<RuleGetStatusResponse>;
90
+ getStatus(options?: Core.RequestOptions): Core.APIPromise<RuleGetStatusResponse>;
34
91
  }
35
92
  export interface RuleCreateResponse {
36
93
  id: string;
@@ -77,7 +134,7 @@ export interface RuleCreateResponse {
77
134
  /**
78
135
  * Type of loyalty rule being created
79
136
  */
80
- type: 'Bonus' | 'BoughtOn' | 'BoughtWithRoyalties' | 'DiscordMessages' | 'Listing' | 'Lodging' | 'MintOn' | 'PoapClaim' | 'SnagSocialsConnected' | 'SnapshotFullset' | 'SnapshotHold' | 'SoldOn' | 'SoldWithRoyalties' | 'TokenHold' | 'TwitterBio' | 'TwitterHashTagPost' | 'Retweet' | 'check_in' | 'code_entry' | 'connect_wallet' | 'connected_discord' | 'connected_email' | 'connected_epic' | 'connected_steam' | 'connected_telegram' | 'connected_twitter' | 'create_partner_account' | 'discord_member' | 'drip_x_follow' | 'drip_x_new_tweet' | 'drip_x_text_in_bio' | 'drip_x_text_in_comment' | 'drip_x_text_in_name' | 'drip_x_tweet' | 'external_rule' | 'link_click' | 'manual_upload' | 'profile_completed' | 'referred_user' | 'smart_contract_event' | 'snapshot_governance' | 'telegram_join' | 'telegram_messages' | 'text_input' | 'token_hold_erc20' | 'tweet_liked_by_project' | 'twitter_comment' | 'twitter_follow' | 'twitter_followers' | 'twitter_like' | 'twitter_post_hashtag';
137
+ type: 'Bonus' | 'BoughtOn' | 'BoughtWithRoyalties' | 'DiscordMessages' | 'Listing' | 'Lodging' | 'MintOn' | 'PoapClaim' | 'SnagSocialsConnected' | 'SnapshotFullset' | 'SnapshotHold' | 'SoldOn' | 'SoldWithRoyalties' | 'TokenHold' | 'TwitterBio' | 'TwitterHashTagPost' | 'Retweet' | 'check_in' | 'code_entry' | 'connect_wallet' | 'connected_discord' | 'connected_email' | 'connected_epic' | 'connected_steam' | 'connected_telegram' | 'connected_twitter' | 'create_partner_account' | 'discord_member' | 'drip_x_follow' | 'drip_x_new_tweet' | 'drip_x_text_in_bio' | 'drip_x_text_in_comment' | 'drip_x_text_in_name' | 'drip_x_tweet' | 'external_rule' | 'link_click' | 'manual_upload' | 'profile_completed' | 'referred_user' | 'smart_contract_event' | 'snapshot_governance' | 'telegram_join' | 'telegram_messages' | 'text_input' | 'token_hold_erc20' | 'tweet_liked_by_project' | 'twitter_comment' | 'twitter_follow' | 'twitter_followers' | 'twitter_like' | 'twitter_post_hashtag' | 'quiz' | 'poll' | 'steam_wishlist' | 'liquidity_uniswap_v2' | 'liquidity_uniswap_v3' | 'points_airdrop' | 'youtube_subscribers' | 'youtube_comment' | 'shopify_spend' | 'swap' | 'tiktok_post';
81
138
  /**
82
139
  * Unique identifier for the associated website
83
140
  */
@@ -106,6 +163,10 @@ export interface RuleCreateResponse {
106
163
  * Optional detailed description of the rule
107
164
  */
108
165
  description?: string;
166
+ /**
167
+ * ID of the external integration
168
+ */
169
+ externalIntegrationId?: string | null;
109
170
  /**
110
171
  * Whether to hide this rule in the user interface
111
172
  */
@@ -113,19 +174,41 @@ export interface RuleCreateResponse {
113
174
  /**
114
175
  * Interval between rule executions
115
176
  */
116
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
177
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
117
178
  /**
118
179
  * Whether this rule is mandatory
119
180
  */
120
181
  isRequired?: boolean;
182
+ /**
183
+ * Unique identifier for the loyalty badge
184
+ */
185
+ loyaltyBadgeId?: string | null;
121
186
  /**
122
187
  * Unique identifier for the loyalty rule group
123
188
  */
124
189
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
190
+ /**
191
+ * URL for uploading loyalty user allotment via CSV
192
+ */
193
+ loyaltyUserAllotmentCsvUrl?: string;
194
+ /**
195
+ * The interval for the max amount. Available for the smart contract and external
196
+ * rules.
197
+ */
198
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
199
+ /**
200
+ * The maximum amount of points a user can earn per interval. Available for the
201
+ * smart contract and external rules.
202
+ */
203
+ maxAmountPerInterval?: number | null;
204
+ /**
205
+ * URL of the media to be displayed
206
+ */
207
+ mediaUrl?: string | null;
125
208
  /**
126
209
  * Blockchain network where the rule will apply
127
210
  */
128
- network?: 'mainnet' | 'polygon' | 'polygon_mumbai' | 'optimism' | 'arbitrum' | 'binance' | 'bscTestnet' | 'avalanche' | 'avalancheFuji' | 'zksync' | 'fantom' | 'fantomTestnet' | 'base' | 'baseSepolia' | 'skaleNebula' | 'xai' | 'berachainArtio' | 'solana' | 'apechain' | 'flowMainnet' | 'campTestnet' | 'sui' | 'vanar' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli';
211
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
129
212
  /**
130
213
  * OAuth credentials associated with the rule
131
214
  */
@@ -133,17 +216,25 @@ export interface RuleCreateResponse {
133
216
  /**
134
217
  * Type of reward issued by the rule
135
218
  */
136
- rewardType?: 'points' | 'multiplier';
219
+ rewardType?: 'points' | 'multiplier' | 'badge';
220
+ /**
221
+ * URL of the Shopify store
222
+ */
223
+ shopifyStoreUrl?: string | null;
137
224
  /**
138
- * Identifier for associated subscriptions
225
+ * Optional subscription id for the rule
139
226
  */
140
- subscriptionIdentifier?: string | null;
227
+ subscriptionId?: string | null;
141
228
  }
142
229
  export declare namespace RuleCreateResponse {
143
230
  /**
144
231
  * Additional metadata for the loyalty rule
145
232
  */
146
233
  interface Metadata {
234
+ /**
235
+ * Number of tokens per batch.
236
+ */
237
+ batchSize?: number | null;
147
238
  /**
148
239
  * Text displayed on the action button.
149
240
  */
@@ -168,6 +259,12 @@ export declare namespace RuleCreateResponse {
168
259
  * Array of collections associated with the rule.
169
260
  */
170
261
  collection?: Array<Metadata.Collection>;
262
+ /**
263
+ * Conditions for completing the profile.
264
+ */
265
+ completeProfileConditions?: {
266
+ [key: string]: boolean;
267
+ } | null;
171
268
  /**
172
269
  * Object containing details for the call-to-action.
173
270
  */
@@ -196,10 +293,18 @@ export declare namespace RuleCreateResponse {
196
293
  * Flag indicating whether the verified multiplier is enabled.
197
294
  */
198
295
  enableVerifiedMultiplier?: boolean;
296
+ /**
297
+ * Fill source of the order for the token sale
298
+ */
299
+ fillSource?: string;
199
300
  /**
200
301
  * Percentage reward given to a user for their first referral.
201
302
  */
202
303
  firstReferralReward?: number | null;
304
+ /**
305
+ * Flag indicating whether the fill source is included.
306
+ */
307
+ hasFillSource?: boolean;
203
308
  /**
204
309
  * Indicates if the item has never been sold.
205
310
  */
@@ -220,10 +325,18 @@ export declare namespace RuleCreateResponse {
220
325
  * URL of the image associated with the rule.
221
326
  */
222
327
  imageUrl?: string | null;
328
+ /**
329
+ * If enabled, the first transaction done on the platform will complete this rule
330
+ */
331
+ isCheckInOnEveryTxn?: boolean;
223
332
  /**
224
333
  * Indicates if the multiplier has been applied to rewards.
225
334
  */
226
335
  isMultiplierApplied?: boolean;
336
+ /**
337
+ * Flag indicating if the rule is restricted to new users.
338
+ */
339
+ isRestrictedToNewUsers?: boolean;
227
340
  /**
228
341
  * Flag indicating if rewards are applied retroactively.
229
342
  */
@@ -236,6 +349,10 @@ export declare namespace RuleCreateResponse {
236
349
  * Optional link associated with the metadata.
237
350
  */
238
351
  link?: string | null;
352
+ /**
353
+ * Liquidity pool details.
354
+ */
355
+ liquidity?: Metadata.Liquidity;
239
356
  /**
240
357
  * Maximum quantity constraint for token holding.
241
358
  */
@@ -260,10 +377,30 @@ export declare namespace RuleCreateResponse {
260
377
  * Flag indicating whether to include only non-listed items.
261
378
  */
262
379
  onlyNonListed?: boolean;
380
+ /**
381
+ * Indicates if only existing users are rewarded.
382
+ */
383
+ onlyRewardExistingUser?: boolean;
384
+ /**
385
+ * give points for only one token ownership per contract
386
+ */
387
+ onlyRewardSingleTokenOwnership?: boolean | null;
263
388
  /**
264
389
  * Promotional code associated with the rule.
265
390
  */
266
391
  promoCode?: string;
392
+ /**
393
+ * URL of the CSV file containing promo codes.
394
+ */
395
+ promoCodeCsvUrl?: string;
396
+ /**
397
+ * Numbers of the promotional code to be generated.
398
+ */
399
+ promoCodeLength?: number | null;
400
+ /**
401
+ * Type of the promotional code.
402
+ */
403
+ promoCodeType?: 'code' | 'csv' | 'generate';
267
404
  /**
268
405
  * Array defining ranges and corresponding rewards.
269
406
  */
@@ -276,10 +413,27 @@ export declare namespace RuleCreateResponse {
276
413
  * Lump sum reward given to a referrer.
277
414
  */
278
415
  referrerReward?: number | null;
416
+ /**
417
+ * Loyalty currency ID of the referrer reward.
418
+ */
419
+ referrerRewardLoyaltyCurrencyId?: string | null;
420
+ /**
421
+ * Flag indicating if the rule can also reward badges per range.
422
+ */
423
+ rewardBadgePerRange?: boolean;
424
+ /**
425
+ * Flag indicating if the reward is rewarded by batch.
426
+ */
427
+ rewardByBatch?: boolean | null;
279
428
  /**
280
429
  * Flag indicating if rewards are given per impression.
281
430
  */
282
431
  rewardPerImpression?: boolean | null;
432
+ /**
433
+ * Flag indicating if the rule should reward based on value of traded tokens
434
+ * instead of count.
435
+ */
436
+ rewardPerValue?: boolean;
283
437
  /**
284
438
  * Currency associated with sales.
285
439
  */
@@ -288,6 +442,10 @@ export declare namespace RuleCreateResponse {
288
442
  * Percentage reward given for a second-level referral.
289
443
  */
290
444
  secondReferralReward?: number | null;
445
+ /**
446
+ * Flag indicating if the multiplier is skipped.
447
+ */
448
+ skipMultiplier?: boolean | null;
291
449
  /**
292
450
  * Object containing details of the associated smart contract.
293
451
  */
@@ -299,7 +457,7 @@ export declare namespace RuleCreateResponse {
299
457
  /**
300
458
  * Social media platform associated with the rule.
301
459
  */
302
- socialPlatform?: 'Twitch' | 'TikTok' | 'X(Twitter)' | 'Instagram' | 'EpicGames' | 'YouTube' | 'Discord' | 'Custom' | null;
460
+ socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
303
461
  /**
304
462
  * URL of the social platform's logo.
305
463
  */
@@ -308,10 +466,18 @@ export declare namespace RuleCreateResponse {
308
466
  * Name of the social platform.
309
467
  */
310
468
  socialPlatformName?: string | null;
469
+ /**
470
+ * ID of the Steam app.
471
+ */
472
+ steamAppId?: string | null;
311
473
  /**
312
474
  * Array of streak milestones and corresponding rewards.
313
475
  */
314
476
  streakArray?: Array<Metadata.StreakArray> | null;
477
+ /**
478
+ * Metadata for swap loyalty rules
479
+ */
480
+ swap?: Metadata.Swap;
315
481
  /**
316
482
  * ID of the Telegram channel.
317
483
  */
@@ -324,6 +490,11 @@ export declare namespace RuleCreateResponse {
324
490
  * Flag indicating if all contracts are tracked.
325
491
  */
326
492
  trackAllContracts?: boolean | null;
493
+ /**
494
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
495
+ * completed once the progress is 100%.
496
+ */
497
+ trackProgress?: boolean | null;
327
498
  /**
328
499
  * URL of the associated Twitter account.
329
500
  */
@@ -359,7 +530,15 @@ export declare namespace RuleCreateResponse {
359
530
  /**
360
531
  * Type of wallet associated with the rule.
361
532
  */
362
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
533
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
534
+ /**
535
+ * ID of the Youtube channel.
536
+ */
537
+ youtubeChannelId?: string | null;
538
+ /**
539
+ * ID of the Youtube video.
540
+ */
541
+ youtubeVideoId?: string | null;
363
542
  }
364
543
  namespace Metadata {
365
544
  interface Collection {
@@ -374,7 +553,7 @@ export declare namespace RuleCreateResponse {
374
553
  /**
375
554
  * Blockchain network of the collection.
376
555
  */
377
- network?: 'mainnet' | 'polygon' | 'polygon_mumbai' | 'optimism' | 'arbitrum' | 'binance' | 'bscTestnet' | 'avalanche' | 'avalancheFuji' | 'zksync' | 'fantom' | 'fantomTestnet' | 'base' | 'baseSepolia' | 'skaleNebula' | 'xai' | 'berachainArtio' | 'solana' | 'apechain' | 'flowMainnet' | 'campTestnet' | 'sui' | 'vanar' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli';
556
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
378
557
  }
379
558
  /**
380
559
  * Object containing details for the call-to-action.
@@ -413,6 +592,10 @@ export declare namespace RuleCreateResponse {
413
592
  * Array of emojis used in the channel.
414
593
  */
415
594
  emojis?: Array<Channel.Emoji>;
595
+ /**
596
+ * Phrase of text to be present in the discord message
597
+ */
598
+ text?: string;
416
599
  }
417
600
  namespace Channel {
418
601
  interface Emoji {
@@ -435,6 +618,49 @@ export declare namespace RuleCreateResponse {
435
618
  */
436
619
  id: string;
437
620
  }
621
+ /**
622
+ * Liquidity pool details.
623
+ */
624
+ interface Liquidity {
625
+ /**
626
+ * Calculation type of the liquidity pool.
627
+ */
628
+ calculationType?: 'fixed' | 'custom';
629
+ /**
630
+ * Custom function to calculate the the reward amount based on the liquidity
631
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
632
+ * USD.
633
+ */
634
+ customFunction?: string;
635
+ /**
636
+ * Liquidity provided per day in USD
637
+ */
638
+ liquidityPerDay?: number;
639
+ /**
640
+ * Blockchain network of the liquidity pool.
641
+ */
642
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
643
+ /**
644
+ * Indicates if only in-range liquidity is rewarded.
645
+ */
646
+ onlyRewardInRangeLiquidity?: boolean;
647
+ /**
648
+ * Array of liquidity pools associated with the rule.
649
+ */
650
+ pools?: Array<Liquidity.Pool>;
651
+ /**
652
+ * Protocol of the liquidity pool.
653
+ */
654
+ protocol?: string;
655
+ }
656
+ namespace Liquidity {
657
+ interface Pool {
658
+ /**
659
+ * Unique identifier of the liquidity pool.
660
+ */
661
+ id: string;
662
+ }
663
+ }
438
664
  interface Range {
439
665
  /**
440
666
  * Reward amount for this range.
@@ -448,6 +674,14 @@ export declare namespace RuleCreateResponse {
448
674
  * Start value of the range.
449
675
  */
450
676
  startRange: number;
677
+ /**
678
+ * ID of the loyalty badge for this range.
679
+ */
680
+ loyaltyBadgeId?: string;
681
+ /**
682
+ * Amount of the loyalty multiplier for this range.
683
+ */
684
+ loyaltyMultiplierAmount?: number;
451
685
  }
452
686
  /**
453
687
  * Object defining referral requirements.
@@ -491,18 +725,14 @@ export declare namespace RuleCreateResponse {
491
725
  * Object containing details of the associated smart contract.
492
726
  */
493
727
  interface SmartContract {
494
- /**
495
- * ABI of the smart contract.
496
- */
497
- abi?: string | null;
498
728
  /**
499
729
  * Mapping of addresses for the smart contract.
500
730
  */
501
731
  addressMapping?: string | null;
502
732
  /**
503
- * Array of bonus details applied to the rule.
733
+ * Object containing details of the amount multiplier from the event.
504
734
  */
505
- bonus?: Array<SmartContract.Bonus> | null;
735
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
506
736
  /**
507
737
  * ID of the smart contract.
508
738
  */
@@ -511,58 +741,28 @@ export declare namespace RuleCreateResponse {
511
741
  * Criteria to evaluate the smart contract event.
512
742
  */
513
743
  criteria?: 'everyEvent' | 'byParameter' | null;
514
- /**
515
- * Time range applied to the rule.
516
- */
517
- customRange?: SmartContract.CustomRange | null;
518
744
  /**
519
745
  * Event emitted by the smart contract.
520
746
  */
521
747
  event?: string | null;
522
- /**
523
- * Maximum value allowed for the parameter.
524
- */
525
- max?: number | null;
526
748
  /**
527
749
  * Array of parameters for the smart contract.
528
750
  */
529
751
  params?: Array<SmartContract.Param> | null;
530
752
  /**
531
- * Flag indicating if a bonus is applied.
532
- */
533
- withBonus?: boolean | null;
534
- /**
535
- * Flag indicating if a custom range is applied.
753
+ * Type of the smart contract interaction.
536
754
  */
537
- withCustomRange?: boolean | null;
538
- /**
539
- * Flag indicating if a maximum limit is applied.
540
- */
541
- withMax?: boolean | null;
755
+ type?: 'function' | 'event' | null;
542
756
  }
543
757
  namespace SmartContract {
544
- interface Bonus {
545
- /**
546
- * Amount of the bonus.
547
- */
548
- amount?: number | null;
549
- /**
550
- * Number of times the bonus is applied.
551
- */
552
- count?: number | null;
553
- }
554
758
  /**
555
- * Time range applied to the rule.
759
+ * Object containing details of the amount multiplier from the event.
556
760
  */
557
- interface CustomRange {
761
+ interface AmountMultiplier {
558
762
  /**
559
- * End time of the custom range.
763
+ * Mapping of the value for the smart contract.
560
764
  */
561
- endsAt?: string | null;
562
- /**
563
- * Start time of the custom range.
564
- */
565
- startsAt?: string | null;
765
+ valueMapping?: string | null;
566
766
  }
567
767
  interface Param {
568
768
  /**
@@ -599,6 +799,24 @@ export declare namespace RuleCreateResponse {
599
799
  */
600
800
  streakMilestone: number;
601
801
  }
802
+ /**
803
+ * Metadata for swap loyalty rules
804
+ */
805
+ interface Swap {
806
+ provider?: 'any' | 'relay' | 'lifi';
807
+ relayReferrerId?: string;
808
+ requireCrossChainSwap?: boolean;
809
+ swappedToChain?: 'any' | number | string;
810
+ swappedToTokens?: Array<Swap.SwappedToToken>;
811
+ tokenMode?: 'any' | 'specific';
812
+ trackTokenAmount?: boolean;
813
+ }
814
+ namespace Swap {
815
+ interface SwappedToToken {
816
+ address: string;
817
+ chainId: string;
818
+ }
819
+ }
602
820
  }
603
821
  interface Collection {
604
822
  /**
@@ -608,7 +826,7 @@ export declare namespace RuleCreateResponse {
608
826
  /**
609
827
  * Blockchain network for the collection
610
828
  */
611
- network: 'mainnet' | 'polygon' | 'polygon_mumbai' | 'optimism' | 'arbitrum' | 'binance' | 'bscTestnet' | 'avalanche' | 'avalancheFuji' | 'zksync' | 'fantom' | 'fantomTestnet' | 'base' | 'baseSepolia' | 'skaleNebula' | 'xai' | 'berachainArtio' | 'solana' | 'apechain' | 'flowMainnet' | 'campTestnet' | 'sui' | 'vanar' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli';
829
+ network: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
612
830
  }
613
831
  }
614
832
  export interface RuleUpdateResponse {
@@ -617,34 +835,14 @@ export interface RuleUpdateResponse {
617
835
  * Reward amount for the loyalty rule
618
836
  */
619
837
  amount: unknown;
620
- /**
621
- * Effective end time of the rule
622
- */
623
- effectiveEndTime: string | null;
624
- /**
625
- * Effective start time of the rule
626
- */
627
- effectiveStartTime: string | null;
628
838
  /**
629
839
  * End time for the loyalty rule
630
840
  */
631
841
  endTime: string | null;
632
- /**
633
- * Frequency of the rule execution
634
- */
635
- frequency: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
636
- /**
637
- * Additional metadata for the loyalty rule
638
- */
639
- metadata: RuleUpdateResponse.Metadata;
640
842
  /**
641
843
  * Name of the loyalty rule
642
844
  */
643
845
  name: string;
644
- /**
645
- * Start time for the loyalty rule
646
- */
647
- startTime: string | null;
648
846
  /**
649
847
  * Blockchain address of the associated collection
650
848
  */
@@ -665,6 +863,22 @@ export interface RuleUpdateResponse {
665
863
  * Optional description of the loyalty rule
666
864
  */
667
865
  description?: string;
866
+ /**
867
+ * Effective end time of the rule
868
+ */
869
+ effectiveEndTime?: string | null;
870
+ /**
871
+ * Effective start time of the rule
872
+ */
873
+ effectiveStartTime?: string | null;
874
+ /**
875
+ * ID of the external integration
876
+ */
877
+ externalIntegrationId?: string | null;
878
+ /**
879
+ * Frequency of the rule execution
880
+ */
881
+ frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
668
882
  /**
669
883
  * Whether to hide this rule in the user interface
670
884
  */
@@ -672,7 +886,7 @@ export interface RuleUpdateResponse {
672
886
  /**
673
887
  * Time interval for recurring rule execution
674
888
  */
675
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
889
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
676
890
  /**
677
891
  * Whether this rule is required for participation
678
892
  */
@@ -681,10 +895,28 @@ export interface RuleUpdateResponse {
681
895
  * ID of the rule group section to associate with the rule
682
896
  */
683
897
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
898
+ /**
899
+ * The interval for the max amount. Available for the smart contract and external
900
+ * rules.
901
+ */
902
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
903
+ /**
904
+ * The maximum amount of points a user can earn per interval. Available for the
905
+ * smart contract and external rules.
906
+ */
907
+ maxAmountPerInterval?: number | null;
908
+ /**
909
+ * URL of the media to be displayed
910
+ */
911
+ mediaUrl?: string | null;
912
+ /**
913
+ * Additional metadata for the loyalty rule
914
+ */
915
+ metadata?: RuleUpdateResponse.Metadata;
684
916
  /**
685
917
  * Blockchain network where the rule will apply
686
918
  */
687
- network?: 'mainnet' | 'polygon' | 'polygon_mumbai' | 'optimism' | 'arbitrum' | 'binance' | 'bscTestnet' | 'avalanche' | 'avalancheFuji' | 'zksync' | 'fantom' | 'fantomTestnet' | 'base' | 'baseSepolia' | 'skaleNebula' | 'xai' | 'berachainArtio' | 'solana' | 'apechain' | 'flowMainnet' | 'campTestnet' | 'sui' | 'vanar' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli';
919
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
688
920
  /**
689
921
  * ID for associated OAuth credentials
690
922
  */
@@ -692,17 +924,39 @@ export interface RuleUpdateResponse {
692
924
  /**
693
925
  * Type of reward issued by this rule
694
926
  */
695
- rewardType?: 'points' | 'multiplier';
927
+ rewardType?: 'points' | 'multiplier' | 'badge';
928
+ /**
929
+ * URL of the Shopify store
930
+ */
931
+ shopifyStoreUrl?: string | null;
696
932
  /**
697
- * Optional subscription identifier for the rule
933
+ * Start time for the loyalty rule
934
+ */
935
+ startTime?: string | null;
936
+ /**
937
+ * Optional subscription id for the rule
698
938
  */
699
- subscriptionIdentifier?: string | null;
939
+ subscriptionId?: string | null;
700
940
  }
701
941
  export declare namespace RuleUpdateResponse {
942
+ interface Collection {
943
+ /**
944
+ * Blockchain address of the collection
945
+ */
946
+ address: string;
947
+ /**
948
+ * Blockchain network for the collection
949
+ */
950
+ network: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
951
+ }
702
952
  /**
703
953
  * Additional metadata for the loyalty rule
704
954
  */
705
955
  interface Metadata {
956
+ /**
957
+ * Number of tokens per batch.
958
+ */
959
+ batchSize?: number | null;
706
960
  /**
707
961
  * Text displayed on the action button.
708
962
  */
@@ -727,6 +981,12 @@ export declare namespace RuleUpdateResponse {
727
981
  * Array of collections associated with the rule.
728
982
  */
729
983
  collection?: Array<Metadata.Collection>;
984
+ /**
985
+ * Conditions for completing the profile.
986
+ */
987
+ completeProfileConditions?: {
988
+ [key: string]: boolean;
989
+ } | null;
730
990
  /**
731
991
  * Object containing details for the call-to-action.
732
992
  */
@@ -755,10 +1015,18 @@ export declare namespace RuleUpdateResponse {
755
1015
  * Flag indicating whether the verified multiplier is enabled.
756
1016
  */
757
1017
  enableVerifiedMultiplier?: boolean;
1018
+ /**
1019
+ * Fill source of the order for the token sale
1020
+ */
1021
+ fillSource?: string;
758
1022
  /**
759
1023
  * Percentage reward given to a user for their first referral.
760
1024
  */
761
1025
  firstReferralReward?: number | null;
1026
+ /**
1027
+ * Flag indicating whether the fill source is included.
1028
+ */
1029
+ hasFillSource?: boolean;
762
1030
  /**
763
1031
  * Indicates if the item has never been sold.
764
1032
  */
@@ -779,10 +1047,18 @@ export declare namespace RuleUpdateResponse {
779
1047
  * URL of the image associated with the rule.
780
1048
  */
781
1049
  imageUrl?: string | null;
1050
+ /**
1051
+ * If enabled, the first transaction done on the platform will complete this rule
1052
+ */
1053
+ isCheckInOnEveryTxn?: boolean;
782
1054
  /**
783
1055
  * Indicates if the multiplier has been applied to rewards.
784
1056
  */
785
1057
  isMultiplierApplied?: boolean;
1058
+ /**
1059
+ * Flag indicating if the rule is restricted to new users.
1060
+ */
1061
+ isRestrictedToNewUsers?: boolean;
786
1062
  /**
787
1063
  * Flag indicating if rewards are applied retroactively.
788
1064
  */
@@ -795,6 +1071,10 @@ export declare namespace RuleUpdateResponse {
795
1071
  * Optional link associated with the metadata.
796
1072
  */
797
1073
  link?: string | null;
1074
+ /**
1075
+ * Liquidity pool details.
1076
+ */
1077
+ liquidity?: Metadata.Liquidity;
798
1078
  /**
799
1079
  * Maximum quantity constraint for token holding.
800
1080
  */
@@ -819,10 +1099,30 @@ export declare namespace RuleUpdateResponse {
819
1099
  * Flag indicating whether to include only non-listed items.
820
1100
  */
821
1101
  onlyNonListed?: boolean;
1102
+ /**
1103
+ * Indicates if only existing users are rewarded.
1104
+ */
1105
+ onlyRewardExistingUser?: boolean;
1106
+ /**
1107
+ * give points for only one token ownership per contract
1108
+ */
1109
+ onlyRewardSingleTokenOwnership?: boolean | null;
822
1110
  /**
823
1111
  * Promotional code associated with the rule.
824
1112
  */
825
1113
  promoCode?: string;
1114
+ /**
1115
+ * URL of the CSV file containing promo codes.
1116
+ */
1117
+ promoCodeCsvUrl?: string;
1118
+ /**
1119
+ * Numbers of the promotional code to be generated.
1120
+ */
1121
+ promoCodeLength?: number | null;
1122
+ /**
1123
+ * Type of the promotional code.
1124
+ */
1125
+ promoCodeType?: 'code' | 'csv' | 'generate';
826
1126
  /**
827
1127
  * Array defining ranges and corresponding rewards.
828
1128
  */
@@ -835,10 +1135,27 @@ export declare namespace RuleUpdateResponse {
835
1135
  * Lump sum reward given to a referrer.
836
1136
  */
837
1137
  referrerReward?: number | null;
1138
+ /**
1139
+ * Loyalty currency ID of the referrer reward.
1140
+ */
1141
+ referrerRewardLoyaltyCurrencyId?: string | null;
1142
+ /**
1143
+ * Flag indicating if the rule can also reward badges per range.
1144
+ */
1145
+ rewardBadgePerRange?: boolean;
1146
+ /**
1147
+ * Flag indicating if the reward is rewarded by batch.
1148
+ */
1149
+ rewardByBatch?: boolean | null;
838
1150
  /**
839
1151
  * Flag indicating if rewards are given per impression.
840
1152
  */
841
1153
  rewardPerImpression?: boolean | null;
1154
+ /**
1155
+ * Flag indicating if the rule should reward based on value of traded tokens
1156
+ * instead of count.
1157
+ */
1158
+ rewardPerValue?: boolean;
842
1159
  /**
843
1160
  * Currency associated with sales.
844
1161
  */
@@ -847,6 +1164,10 @@ export declare namespace RuleUpdateResponse {
847
1164
  * Percentage reward given for a second-level referral.
848
1165
  */
849
1166
  secondReferralReward?: number | null;
1167
+ /**
1168
+ * Flag indicating if the multiplier is skipped.
1169
+ */
1170
+ skipMultiplier?: boolean | null;
850
1171
  /**
851
1172
  * Object containing details of the associated smart contract.
852
1173
  */
@@ -858,7 +1179,7 @@ export declare namespace RuleUpdateResponse {
858
1179
  /**
859
1180
  * Social media platform associated with the rule.
860
1181
  */
861
- socialPlatform?: 'Twitch' | 'TikTok' | 'X(Twitter)' | 'Instagram' | 'EpicGames' | 'YouTube' | 'Discord' | 'Custom' | null;
1182
+ socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
862
1183
  /**
863
1184
  * URL of the social platform's logo.
864
1185
  */
@@ -867,10 +1188,18 @@ export declare namespace RuleUpdateResponse {
867
1188
  * Name of the social platform.
868
1189
  */
869
1190
  socialPlatformName?: string | null;
1191
+ /**
1192
+ * ID of the Steam app.
1193
+ */
1194
+ steamAppId?: string | null;
870
1195
  /**
871
1196
  * Array of streak milestones and corresponding rewards.
872
1197
  */
873
1198
  streakArray?: Array<Metadata.StreakArray> | null;
1199
+ /**
1200
+ * Metadata for swap loyalty rules
1201
+ */
1202
+ swap?: Metadata.Swap;
874
1203
  /**
875
1204
  * ID of the Telegram channel.
876
1205
  */
@@ -883,6 +1212,11 @@ export declare namespace RuleUpdateResponse {
883
1212
  * Flag indicating if all contracts are tracked.
884
1213
  */
885
1214
  trackAllContracts?: boolean | null;
1215
+ /**
1216
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
1217
+ * completed once the progress is 100%.
1218
+ */
1219
+ trackProgress?: boolean | null;
886
1220
  /**
887
1221
  * URL of the associated Twitter account.
888
1222
  */
@@ -918,7 +1252,15 @@ export declare namespace RuleUpdateResponse {
918
1252
  /**
919
1253
  * Type of wallet associated with the rule.
920
1254
  */
921
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
1255
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
1256
+ /**
1257
+ * ID of the Youtube channel.
1258
+ */
1259
+ youtubeChannelId?: string | null;
1260
+ /**
1261
+ * ID of the Youtube video.
1262
+ */
1263
+ youtubeVideoId?: string | null;
922
1264
  }
923
1265
  namespace Metadata {
924
1266
  interface Collection {
@@ -933,7 +1275,7 @@ export declare namespace RuleUpdateResponse {
933
1275
  /**
934
1276
  * Blockchain network of the collection.
935
1277
  */
936
- network?: 'mainnet' | 'polygon' | 'polygon_mumbai' | 'optimism' | 'arbitrum' | 'binance' | 'bscTestnet' | 'avalanche' | 'avalancheFuji' | 'zksync' | 'fantom' | 'fantomTestnet' | 'base' | 'baseSepolia' | 'skaleNebula' | 'xai' | 'berachainArtio' | 'solana' | 'apechain' | 'flowMainnet' | 'campTestnet' | 'sui' | 'vanar' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli';
1278
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
937
1279
  }
938
1280
  /**
939
1281
  * Object containing details for the call-to-action.
@@ -972,6 +1314,10 @@ export declare namespace RuleUpdateResponse {
972
1314
  * Array of emojis used in the channel.
973
1315
  */
974
1316
  emojis?: Array<Channel.Emoji>;
1317
+ /**
1318
+ * Phrase of text to be present in the discord message
1319
+ */
1320
+ text?: string;
975
1321
  }
976
1322
  namespace Channel {
977
1323
  interface Emoji {
@@ -994,6 +1340,49 @@ export declare namespace RuleUpdateResponse {
994
1340
  */
995
1341
  id: string;
996
1342
  }
1343
+ /**
1344
+ * Liquidity pool details.
1345
+ */
1346
+ interface Liquidity {
1347
+ /**
1348
+ * Calculation type of the liquidity pool.
1349
+ */
1350
+ calculationType?: 'fixed' | 'custom';
1351
+ /**
1352
+ * Custom function to calculate the the reward amount based on the liquidity
1353
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
1354
+ * USD.
1355
+ */
1356
+ customFunction?: string;
1357
+ /**
1358
+ * Liquidity provided per day in USD
1359
+ */
1360
+ liquidityPerDay?: number;
1361
+ /**
1362
+ * Blockchain network of the liquidity pool.
1363
+ */
1364
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
1365
+ /**
1366
+ * Indicates if only in-range liquidity is rewarded.
1367
+ */
1368
+ onlyRewardInRangeLiquidity?: boolean;
1369
+ /**
1370
+ * Array of liquidity pools associated with the rule.
1371
+ */
1372
+ pools?: Array<Liquidity.Pool>;
1373
+ /**
1374
+ * Protocol of the liquidity pool.
1375
+ */
1376
+ protocol?: string;
1377
+ }
1378
+ namespace Liquidity {
1379
+ interface Pool {
1380
+ /**
1381
+ * Unique identifier of the liquidity pool.
1382
+ */
1383
+ id: string;
1384
+ }
1385
+ }
997
1386
  interface Range {
998
1387
  /**
999
1388
  * Reward amount for this range.
@@ -1007,6 +1396,14 @@ export declare namespace RuleUpdateResponse {
1007
1396
  * Start value of the range.
1008
1397
  */
1009
1398
  startRange: number;
1399
+ /**
1400
+ * ID of the loyalty badge for this range.
1401
+ */
1402
+ loyaltyBadgeId?: string;
1403
+ /**
1404
+ * Amount of the loyalty multiplier for this range.
1405
+ */
1406
+ loyaltyMultiplierAmount?: number;
1010
1407
  }
1011
1408
  /**
1012
1409
  * Object defining referral requirements.
@@ -1050,18 +1447,14 @@ export declare namespace RuleUpdateResponse {
1050
1447
  * Object containing details of the associated smart contract.
1051
1448
  */
1052
1449
  interface SmartContract {
1053
- /**
1054
- * ABI of the smart contract.
1055
- */
1056
- abi?: string | null;
1057
1450
  /**
1058
1451
  * Mapping of addresses for the smart contract.
1059
1452
  */
1060
1453
  addressMapping?: string | null;
1061
1454
  /**
1062
- * Array of bonus details applied to the rule.
1455
+ * Object containing details of the amount multiplier from the event.
1063
1456
  */
1064
- bonus?: Array<SmartContract.Bonus> | null;
1457
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1065
1458
  /**
1066
1459
  * ID of the smart contract.
1067
1460
  */
@@ -1070,58 +1463,28 @@ export declare namespace RuleUpdateResponse {
1070
1463
  * Criteria to evaluate the smart contract event.
1071
1464
  */
1072
1465
  criteria?: 'everyEvent' | 'byParameter' | null;
1073
- /**
1074
- * Time range applied to the rule.
1075
- */
1076
- customRange?: SmartContract.CustomRange | null;
1077
1466
  /**
1078
1467
  * Event emitted by the smart contract.
1079
1468
  */
1080
1469
  event?: string | null;
1081
- /**
1082
- * Maximum value allowed for the parameter.
1083
- */
1084
- max?: number | null;
1085
1470
  /**
1086
1471
  * Array of parameters for the smart contract.
1087
1472
  */
1088
1473
  params?: Array<SmartContract.Param> | null;
1089
1474
  /**
1090
- * Flag indicating if a bonus is applied.
1091
- */
1092
- withBonus?: boolean | null;
1093
- /**
1094
- * Flag indicating if a custom range is applied.
1475
+ * Type of the smart contract interaction.
1095
1476
  */
1096
- withCustomRange?: boolean | null;
1097
- /**
1098
- * Flag indicating if a maximum limit is applied.
1099
- */
1100
- withMax?: boolean | null;
1477
+ type?: 'function' | 'event' | null;
1101
1478
  }
1102
1479
  namespace SmartContract {
1103
- interface Bonus {
1104
- /**
1105
- * Amount of the bonus.
1106
- */
1107
- amount?: number | null;
1108
- /**
1109
- * Number of times the bonus is applied.
1110
- */
1111
- count?: number | null;
1112
- }
1113
1480
  /**
1114
- * Time range applied to the rule.
1481
+ * Object containing details of the amount multiplier from the event.
1115
1482
  */
1116
- interface CustomRange {
1483
+ interface AmountMultiplier {
1117
1484
  /**
1118
- * End time of the custom range.
1485
+ * Mapping of the value for the smart contract.
1119
1486
  */
1120
- endsAt?: string | null;
1121
- /**
1122
- * Start time of the custom range.
1123
- */
1124
- startsAt?: string | null;
1487
+ valueMapping?: string | null;
1125
1488
  }
1126
1489
  interface Param {
1127
1490
  /**
@@ -1158,16 +1521,24 @@ export declare namespace RuleUpdateResponse {
1158
1521
  */
1159
1522
  streakMilestone: number;
1160
1523
  }
1161
- }
1162
- interface Collection {
1163
1524
  /**
1164
- * Blockchain address of the collection
1525
+ * Metadata for swap loyalty rules
1165
1526
  */
1166
- address: string;
1167
- /**
1168
- * Blockchain network for the collection
1169
- */
1170
- network: 'mainnet' | 'polygon' | 'polygon_mumbai' | 'optimism' | 'arbitrum' | 'binance' | 'bscTestnet' | 'avalanche' | 'avalancheFuji' | 'zksync' | 'fantom' | 'fantomTestnet' | 'base' | 'baseSepolia' | 'skaleNebula' | 'xai' | 'berachainArtio' | 'solana' | 'apechain' | 'flowMainnet' | 'campTestnet' | 'sui' | 'vanar' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli';
1527
+ interface Swap {
1528
+ provider?: 'any' | 'relay' | 'lifi';
1529
+ relayReferrerId?: string;
1530
+ requireCrossChainSwap?: boolean;
1531
+ swappedToChain?: 'any' | number | string;
1532
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1533
+ tokenMode?: 'any' | 'specific';
1534
+ trackTokenAmount?: boolean;
1535
+ }
1536
+ namespace Swap {
1537
+ interface SwappedToToken {
1538
+ address: string;
1539
+ chainId: string;
1540
+ }
1541
+ }
1171
1542
  }
1172
1543
  }
1173
1544
  export interface RuleListResponse {
@@ -1175,9 +1546,6 @@ export interface RuleListResponse {
1175
1546
  hasNextPage: boolean;
1176
1547
  }
1177
1548
  export declare namespace RuleListResponse {
1178
- /**
1179
- * Schema for a loyalty rule
1180
- */
1181
1549
  interface Data {
1182
1550
  /**
1183
1551
  * Unique identifier for the loyalty rule
@@ -1195,14 +1563,38 @@ export declare namespace RuleListResponse {
1195
1563
  * Timestamp when the loyalty rule was deleted (if applicable)
1196
1564
  */
1197
1565
  deletedAt: string | null;
1566
+ /**
1567
+ * Description of the loyalty rule
1568
+ */
1569
+ description: string;
1570
+ /**
1571
+ * End time of the loyalty rule
1572
+ */
1573
+ endTime: string;
1198
1574
  /**
1199
1575
  * Frequency of the loyalty rule
1200
1576
  */
1201
1577
  frequency: string;
1578
+ /**
1579
+ * Chains attached to the loyalty rule
1580
+ */
1581
+ loyaltyRuleChain: Array<Data.LoyaltyRuleChain>;
1582
+ /**
1583
+ * Name of the loyalty rule
1584
+ */
1585
+ name: string;
1202
1586
  /**
1203
1587
  * Unique identifier for the organization
1204
1588
  */
1205
1589
  organizationId: string;
1590
+ /**
1591
+ * Type of the reward
1592
+ */
1593
+ rewardType: 'points' | 'multiplier' | 'badge';
1594
+ /**
1595
+ * Start time of the loyalty rule
1596
+ */
1597
+ startTime: string;
1206
1598
  /**
1207
1599
  * Type of the loyalty rule
1208
1600
  */
@@ -1219,10 +1611,687 @@ export declare namespace RuleListResponse {
1219
1611
  * Optional address of the collection
1220
1612
  */
1221
1613
  collectionAddress?: string;
1614
+ /**
1615
+ * URL of the media associated with the loyalty rule
1616
+ */
1617
+ mediaUrl?: string | null;
1222
1618
  /**
1223
1619
  * Optional metadata for the loyalty rule
1224
1620
  */
1225
- metadata?: Record<string, unknown>;
1621
+ metadata?: {
1622
+ [key: string]: Data.Metadata;
1623
+ };
1624
+ }
1625
+ namespace Data {
1626
+ interface LoyaltyRuleChain {
1627
+ /**
1628
+ * Unique identifier for the rule chain
1629
+ */
1630
+ id: string;
1631
+ loyaltyConditions: Array<LoyaltyRuleChain.LoyaltyCondition>;
1632
+ /**
1633
+ * Unique identifier for the loyalty rule
1634
+ */
1635
+ loyaltyRuleId: string;
1636
+ /**
1637
+ * Name of the rule chain
1638
+ */
1639
+ name: string;
1640
+ }
1641
+ namespace LoyaltyRuleChain {
1642
+ interface LoyaltyCondition {
1643
+ /**
1644
+ * Unique identifier for the condition
1645
+ */
1646
+ id: string;
1647
+ /**
1648
+ * Amount of the condition
1649
+ */
1650
+ amount: number | null;
1651
+ association: Array<LoyaltyCondition.Association>;
1652
+ /**
1653
+ * URL of the CSV file
1654
+ */
1655
+ csvUrl: string | null;
1656
+ /**
1657
+ * Description of the condition
1658
+ */
1659
+ description: string | null;
1660
+ /**
1661
+ * Number of times the condition must be met
1662
+ */
1663
+ repeatCount: number | null;
1664
+ /**
1665
+ * Number of times the condition must be met
1666
+ */
1667
+ requiredCount: number | null;
1668
+ /**
1669
+ * Type of the condition
1670
+ */
1671
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
1672
+ }
1673
+ namespace LoyaltyCondition {
1674
+ interface Association {
1675
+ /**
1676
+ * Unique identifier for the association
1677
+ */
1678
+ id: string;
1679
+ /**
1680
+ * Unique identifier for the loyalty badge
1681
+ */
1682
+ loyaltyBadgeId: string | null;
1683
+ /**
1684
+ * Unique identifier for the loyalty currency
1685
+ */
1686
+ loyaltyCurrencyId: string | null;
1687
+ loyaltyRule: Association.LoyaltyRule | null;
1688
+ /**
1689
+ * Unique identifier for the loyalty rule group
1690
+ */
1691
+ loyaltyRuleGroupId: string | null;
1692
+ /**
1693
+ * Unique identifier for the loyalty rule
1694
+ */
1695
+ loyaltyRuleId: string | null;
1696
+ }
1697
+ namespace Association {
1698
+ interface LoyaltyRule {
1699
+ /**
1700
+ * Name of the loyalty rule
1701
+ */
1702
+ name: string;
1703
+ }
1704
+ }
1705
+ }
1706
+ }
1707
+ interface Metadata {
1708
+ /**
1709
+ * Number of tokens per batch.
1710
+ */
1711
+ batchSize?: number | null;
1712
+ /**
1713
+ * Text displayed on the action button.
1714
+ */
1715
+ buttonText?: string | null;
1716
+ /**
1717
+ * Flag indicating if commenting is required.
1718
+ */
1719
+ checkComment?: boolean | null;
1720
+ /**
1721
+ * Flag indicating if liking the post is required.
1722
+ */
1723
+ checkLike?: boolean | null;
1724
+ /**
1725
+ * Flag indicating if reposting is required.
1726
+ */
1727
+ checkRepost?: boolean | null;
1728
+ /**
1729
+ * Text to check in the Twitter post, username, or bio.
1730
+ */
1731
+ checkText?: string | null;
1732
+ /**
1733
+ * Array of collections associated with the rule.
1734
+ */
1735
+ collection?: Array<Metadata.Collection>;
1736
+ /**
1737
+ * Conditions for completing the profile.
1738
+ */
1739
+ completeProfileConditions?: {
1740
+ [key: string]: boolean;
1741
+ } | null;
1742
+ /**
1743
+ * Object containing details for the call-to-action.
1744
+ */
1745
+ cta?: Metadata.Cta | null;
1746
+ /**
1747
+ * API key for custom rewards integration.
1748
+ */
1749
+ customRewardsApiKey?: string;
1750
+ /**
1751
+ * Array of Discord servers, channels, and roles to join.
1752
+ */
1753
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
1754
+ /**
1755
+ * Array of drip quests required to complete the rule.
1756
+ */
1757
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
1758
+ /**
1759
+ * Flag indicating whether joining Discord servers is required.
1760
+ */
1761
+ enableJoinDiscordServers?: boolean | null;
1762
+ /**
1763
+ * Flag indicating whether streaks are enabled.
1764
+ */
1765
+ enableStreaks?: boolean | null;
1766
+ /**
1767
+ * Flag indicating whether the verified multiplier is enabled.
1768
+ */
1769
+ enableVerifiedMultiplier?: boolean;
1770
+ /**
1771
+ * Fill source of the order for the token sale
1772
+ */
1773
+ fillSource?: string;
1774
+ /**
1775
+ * Percentage reward given to a user for their first referral.
1776
+ */
1777
+ firstReferralReward?: number | null;
1778
+ /**
1779
+ * Flag indicating whether the fill source is included.
1780
+ */
1781
+ hasFillSource?: boolean;
1782
+ /**
1783
+ * Indicates if the item has never been sold.
1784
+ */
1785
+ hasNeverSold?: boolean;
1786
+ /**
1787
+ * Indicates if the full royalty has been paid for items.
1788
+ */
1789
+ hasPaidFullRoyalty?: boolean;
1790
+ /**
1791
+ * Flag indicating if the sale currency is included.
1792
+ */
1793
+ hasSaleCurrency?: boolean;
1794
+ /**
1795
+ * Indicates if the user has a verified Twitter account.
1796
+ */
1797
+ hasVerifiedTwitter?: boolean;
1798
+ /**
1799
+ * URL of the image associated with the rule.
1800
+ */
1801
+ imageUrl?: string | null;
1802
+ /**
1803
+ * If enabled, the first transaction done on the platform will complete this rule
1804
+ */
1805
+ isCheckInOnEveryTxn?: boolean;
1806
+ /**
1807
+ * Indicates if the multiplier has been applied to rewards.
1808
+ */
1809
+ isMultiplierApplied?: boolean;
1810
+ /**
1811
+ * Flag indicating if the rule is restricted to new users.
1812
+ */
1813
+ isRestrictedToNewUsers?: boolean;
1814
+ /**
1815
+ * Flag indicating if rewards are applied retroactively.
1816
+ */
1817
+ isRetroactive?: boolean | null;
1818
+ /**
1819
+ * Flag indicating if the token hold multiplier is applied.
1820
+ */
1821
+ isTokenHoldMultiplier?: boolean;
1822
+ /**
1823
+ * Optional link associated with the metadata.
1824
+ */
1825
+ link?: string | null;
1826
+ /**
1827
+ * Liquidity pool details.
1828
+ */
1829
+ liquidity?: Metadata.Liquidity;
1830
+ /**
1831
+ * Maximum quantity constraint for token holding.
1832
+ */
1833
+ maxQty?: number | null;
1834
+ /**
1835
+ * Minimum quantity constraint for token holding.
1836
+ */
1837
+ minQty?: number | null;
1838
+ /**
1839
+ * Array of loyalty currency IDs used for multipliers.
1840
+ */
1841
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
1842
+ /**
1843
+ * Flag indicating whether to include only known users.
1844
+ */
1845
+ onlyKnownUsers?: boolean;
1846
+ /**
1847
+ * Flag indicating whether to include only native tokens.
1848
+ */
1849
+ onlyNative?: boolean;
1850
+ /**
1851
+ * Flag indicating whether to include only non-listed items.
1852
+ */
1853
+ onlyNonListed?: boolean;
1854
+ /**
1855
+ * Indicates if only existing users are rewarded.
1856
+ */
1857
+ onlyRewardExistingUser?: boolean;
1858
+ /**
1859
+ * give points for only one token ownership per contract
1860
+ */
1861
+ onlyRewardSingleTokenOwnership?: boolean | null;
1862
+ /**
1863
+ * Promotional code associated with the rule.
1864
+ */
1865
+ promoCode?: string;
1866
+ /**
1867
+ * URL of the CSV file containing promo codes.
1868
+ */
1869
+ promoCodeCsvUrl?: string;
1870
+ /**
1871
+ * Numbers of the promotional code to be generated.
1872
+ */
1873
+ promoCodeLength?: number | null;
1874
+ /**
1875
+ * Type of the promotional code.
1876
+ */
1877
+ promoCodeType?: 'code' | 'csv' | 'generate';
1878
+ /**
1879
+ * Array defining ranges and corresponding rewards.
1880
+ */
1881
+ range?: Array<Metadata.Range>;
1882
+ /**
1883
+ * Object defining referral requirements.
1884
+ */
1885
+ referralRequirements?: Metadata.ReferralRequirements | null;
1886
+ /**
1887
+ * Lump sum reward given to a referrer.
1888
+ */
1889
+ referrerReward?: number | null;
1890
+ /**
1891
+ * Loyalty currency ID of the referrer reward.
1892
+ */
1893
+ referrerRewardLoyaltyCurrencyId?: string | null;
1894
+ /**
1895
+ * Flag indicating if the rule can also reward badges per range.
1896
+ */
1897
+ rewardBadgePerRange?: boolean;
1898
+ /**
1899
+ * Flag indicating if the reward is rewarded by batch.
1900
+ */
1901
+ rewardByBatch?: boolean | null;
1902
+ /**
1903
+ * Flag indicating if rewards are given per impression.
1904
+ */
1905
+ rewardPerImpression?: boolean | null;
1906
+ /**
1907
+ * Flag indicating if the rule should reward based on value of traded tokens
1908
+ * instead of count.
1909
+ */
1910
+ rewardPerValue?: boolean;
1911
+ /**
1912
+ * Currency associated with sales.
1913
+ */
1914
+ saleCurrency?: string;
1915
+ /**
1916
+ * Percentage reward given for a second-level referral.
1917
+ */
1918
+ secondReferralReward?: number | null;
1919
+ /**
1920
+ * Flag indicating if the multiplier is skipped.
1921
+ */
1922
+ skipMultiplier?: boolean | null;
1923
+ /**
1924
+ * Object containing details of the associated smart contract.
1925
+ */
1926
+ smartContract?: Metadata.SmartContract;
1927
+ /**
1928
+ * Array of snapshot proposals for the rule.
1929
+ */
1930
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
1931
+ /**
1932
+ * Social media platform associated with the rule.
1933
+ */
1934
+ socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
1935
+ /**
1936
+ * URL of the social platform's logo.
1937
+ */
1938
+ socialPlatformLogo?: string | null;
1939
+ /**
1940
+ * Name of the social platform.
1941
+ */
1942
+ socialPlatformName?: string | null;
1943
+ /**
1944
+ * ID of the Steam app.
1945
+ */
1946
+ steamAppId?: string | null;
1947
+ /**
1948
+ * Array of streak milestones and corresponding rewards.
1949
+ */
1950
+ streakArray?: Array<Metadata.StreakArray> | null;
1951
+ /**
1952
+ * Metadata for swap loyalty rules
1953
+ */
1954
+ swap?: Metadata.Swap;
1955
+ /**
1956
+ * ID of the Telegram channel.
1957
+ */
1958
+ telegramChannelId?: string | null;
1959
+ /**
1960
+ * Time delay in seconds to verify actions.
1961
+ */
1962
+ timeDelayToVerifySeconds?: string | number | null;
1963
+ /**
1964
+ * Flag indicating if all contracts are tracked.
1965
+ */
1966
+ trackAllContracts?: boolean | null;
1967
+ /**
1968
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
1969
+ * completed once the progress is 100%.
1970
+ */
1971
+ trackProgress?: boolean | null;
1972
+ /**
1973
+ * URL of the associated Twitter account.
1974
+ */
1975
+ twitterAccountUrl?: string;
1976
+ /**
1977
+ * Hashtag associated with the Twitter post.
1978
+ */
1979
+ twitterHashtag?: string;
1980
+ /**
1981
+ * URL of the associated Twitter post.
1982
+ */
1983
+ twitterPostUrl?: string;
1984
+ /**
1985
+ * Unique identifier of the Twitter user.
1986
+ */
1987
+ twitterUserId?: string;
1988
+ /**
1989
+ * Twitter username of the user.
1990
+ */
1991
+ twitterUsername?: string;
1992
+ /**
1993
+ * Minimum length of the verification text.
1994
+ */
1995
+ verificationTextMinimumLength?: number | null;
1996
+ /**
1997
+ * Multiplier applied to rewards for verified users.
1998
+ */
1999
+ verifiedMultiplier?: number | null;
2000
+ /**
2001
+ * Placeholder text for verification input fields.
2002
+ */
2003
+ verifyPlaceHolderText?: string | null;
2004
+ /**
2005
+ * Type of wallet associated with the rule.
2006
+ */
2007
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
2008
+ /**
2009
+ * ID of the Youtube channel.
2010
+ */
2011
+ youtubeChannelId?: string | null;
2012
+ /**
2013
+ * ID of the Youtube video.
2014
+ */
2015
+ youtubeVideoId?: string | null;
2016
+ }
2017
+ namespace Metadata {
2018
+ interface Collection {
2019
+ /**
2020
+ * Blockchain address of the collection.
2021
+ */
2022
+ address?: string;
2023
+ /**
2024
+ * Multiplier applied to the rewards for this collection.
2025
+ */
2026
+ multiplier?: number;
2027
+ /**
2028
+ * Blockchain network of the collection.
2029
+ */
2030
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
2031
+ }
2032
+ /**
2033
+ * Object containing details for the call-to-action.
2034
+ */
2035
+ interface Cta {
2036
+ /**
2037
+ * Link for the call-to-action.
2038
+ */
2039
+ href?: string | null;
2040
+ /**
2041
+ * Label for the call-to-action.
2042
+ */
2043
+ label?: string | null;
2044
+ }
2045
+ interface DiscordServersToJoin {
2046
+ /**
2047
+ * ID of the Discord server to join.
2048
+ */
2049
+ id?: string;
2050
+ /**
2051
+ * Array of Discord channels to join.
2052
+ */
2053
+ channels?: Array<DiscordServersToJoin.Channel>;
2054
+ /**
2055
+ * Array of roles to assign in the Discord server.
2056
+ */
2057
+ roles?: Array<DiscordServersToJoin.Role>;
2058
+ }
2059
+ namespace DiscordServersToJoin {
2060
+ interface Channel {
2061
+ /**
2062
+ * ID of the Discord channel.
2063
+ */
2064
+ id?: string;
2065
+ /**
2066
+ * Array of emojis used in the channel.
2067
+ */
2068
+ emojis?: Array<Channel.Emoji>;
2069
+ /**
2070
+ * Phrase of text to be present in the discord message
2071
+ */
2072
+ text?: string;
2073
+ }
2074
+ namespace Channel {
2075
+ interface Emoji {
2076
+ /**
2077
+ * ID of the emoji used in the channel.
2078
+ */
2079
+ id?: string;
2080
+ }
2081
+ }
2082
+ interface Role {
2083
+ /**
2084
+ * ID of the role in the Discord server.
2085
+ */
2086
+ id: string;
2087
+ }
2088
+ }
2089
+ interface DripQuestsToComplete {
2090
+ /**
2091
+ * ID of the drip quest to complete.
2092
+ */
2093
+ id: string;
2094
+ }
2095
+ /**
2096
+ * Liquidity pool details.
2097
+ */
2098
+ interface Liquidity {
2099
+ /**
2100
+ * Calculation type of the liquidity pool.
2101
+ */
2102
+ calculationType?: 'fixed' | 'custom';
2103
+ /**
2104
+ * Custom function to calculate the the reward amount based on the liquidity
2105
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2106
+ * USD.
2107
+ */
2108
+ customFunction?: string;
2109
+ /**
2110
+ * Liquidity provided per day in USD
2111
+ */
2112
+ liquidityPerDay?: number;
2113
+ /**
2114
+ * Blockchain network of the liquidity pool.
2115
+ */
2116
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
2117
+ /**
2118
+ * Indicates if only in-range liquidity is rewarded.
2119
+ */
2120
+ onlyRewardInRangeLiquidity?: boolean;
2121
+ /**
2122
+ * Array of liquidity pools associated with the rule.
2123
+ */
2124
+ pools?: Array<Liquidity.Pool>;
2125
+ /**
2126
+ * Protocol of the liquidity pool.
2127
+ */
2128
+ protocol?: string;
2129
+ }
2130
+ namespace Liquidity {
2131
+ interface Pool {
2132
+ /**
2133
+ * Unique identifier of the liquidity pool.
2134
+ */
2135
+ id: string;
2136
+ }
2137
+ }
2138
+ interface Range {
2139
+ /**
2140
+ * Reward amount for this range.
2141
+ */
2142
+ amount: number;
2143
+ /**
2144
+ * End value of the range.
2145
+ */
2146
+ endRange: number;
2147
+ /**
2148
+ * Start value of the range.
2149
+ */
2150
+ startRange: number;
2151
+ /**
2152
+ * ID of the loyalty badge for this range.
2153
+ */
2154
+ loyaltyBadgeId?: string;
2155
+ /**
2156
+ * Amount of the loyalty multiplier for this range.
2157
+ */
2158
+ loyaltyMultiplierAmount?: number;
2159
+ }
2160
+ /**
2161
+ * Object defining referral requirements.
2162
+ */
2163
+ interface ReferralRequirements {
2164
+ /**
2165
+ * Flag indicating if achieving points is required.
2166
+ */
2167
+ achievePoints?: boolean | null;
2168
+ /**
2169
+ * Flag indicating if completing the profile is required.
2170
+ */
2171
+ completeProfile?: boolean | null;
2172
+ /**
2173
+ * Flag indicating if connecting Discord is required.
2174
+ */
2175
+ connectDiscord?: boolean | null;
2176
+ /**
2177
+ * Flag indicating if connecting email is required.
2178
+ */
2179
+ connectEmail?: boolean | null;
2180
+ /**
2181
+ * Flag indicating if connecting Twitter is required.
2182
+ */
2183
+ connectTwitter?: boolean | null;
2184
+ points?: ReferralRequirements.Points | null;
2185
+ }
2186
+ namespace ReferralRequirements {
2187
+ interface Points {
2188
+ /**
2189
+ * Points required for referral.
2190
+ */
2191
+ amount?: number | null;
2192
+ /**
2193
+ * ID of the loyalty currency for referral.
2194
+ */
2195
+ loyaltyCurrecyId?: string | null;
2196
+ }
2197
+ }
2198
+ /**
2199
+ * Object containing details of the associated smart contract.
2200
+ */
2201
+ interface SmartContract {
2202
+ /**
2203
+ * Mapping of addresses for the smart contract.
2204
+ */
2205
+ addressMapping?: string | null;
2206
+ /**
2207
+ * Object containing details of the amount multiplier from the event.
2208
+ */
2209
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2210
+ /**
2211
+ * ID of the smart contract.
2212
+ */
2213
+ contractId?: string | null;
2214
+ /**
2215
+ * Criteria to evaluate the smart contract event.
2216
+ */
2217
+ criteria?: 'everyEvent' | 'byParameter' | null;
2218
+ /**
2219
+ * Event emitted by the smart contract.
2220
+ */
2221
+ event?: string | null;
2222
+ /**
2223
+ * Array of parameters for the smart contract.
2224
+ */
2225
+ params?: Array<SmartContract.Param> | null;
2226
+ /**
2227
+ * Type of the smart contract interaction.
2228
+ */
2229
+ type?: 'function' | 'event' | null;
2230
+ }
2231
+ namespace SmartContract {
2232
+ /**
2233
+ * Object containing details of the amount multiplier from the event.
2234
+ */
2235
+ interface AmountMultiplier {
2236
+ /**
2237
+ * Mapping of the value for the smart contract.
2238
+ */
2239
+ valueMapping?: string | null;
2240
+ }
2241
+ interface Param {
2242
+ /**
2243
+ * Condition to check for the parameter.
2244
+ */
2245
+ condition?: string | null;
2246
+ /**
2247
+ * Name of the smart contract parameter.
2248
+ */
2249
+ name?: string | null;
2250
+ /**
2251
+ * Value of the parameter.
2252
+ */
2253
+ value?: string | null;
2254
+ }
2255
+ }
2256
+ interface SnapshotProposal {
2257
+ /**
2258
+ * ID of the snapshot proposal.
2259
+ */
2260
+ id: string;
2261
+ /**
2262
+ * Space associated with the snapshot proposal.
2263
+ */
2264
+ space: string;
2265
+ }
2266
+ interface StreakArray {
2267
+ /**
2268
+ * Reward amount for achieving the streak milestone.
2269
+ */
2270
+ streakAmount: number;
2271
+ /**
2272
+ * Milestone required to achieve the streak.
2273
+ */
2274
+ streakMilestone: number;
2275
+ }
2276
+ /**
2277
+ * Metadata for swap loyalty rules
2278
+ */
2279
+ interface Swap {
2280
+ provider?: 'any' | 'relay' | 'lifi';
2281
+ relayReferrerId?: string;
2282
+ requireCrossChainSwap?: boolean;
2283
+ swappedToChain?: 'any' | number | string;
2284
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2285
+ tokenMode?: 'any' | 'specific';
2286
+ trackTokenAmount?: boolean;
2287
+ }
2288
+ namespace Swap {
2289
+ interface SwappedToToken {
2290
+ address: string;
2291
+ chainId: string;
2292
+ }
2293
+ }
2294
+ }
1226
2295
  }
1227
2296
  }
1228
2297
  export interface RuleDeleteResponse {
@@ -1230,12 +2299,12 @@ export interface RuleDeleteResponse {
1230
2299
  deletedAt: string;
1231
2300
  }
1232
2301
  export interface RuleCompleteResponse {
1233
- message: string;
2302
+ message: 'Completion request added to queue' | 'Link click being verified, come back later to check the status';
1234
2303
  }
1235
- export interface RuleStatusResponse {
1236
- data: Array<RuleStatusResponse.Data>;
2304
+ export interface RuleGetStatusResponse {
2305
+ data: Array<RuleGetStatusResponse.Data>;
1237
2306
  }
1238
- export declare namespace RuleStatusResponse {
2307
+ export declare namespace RuleGetStatusResponse {
1239
2308
  interface Data {
1240
2309
  loyaltyRuleId: string;
1241
2310
  status: 'pending' | 'processing' | 'completed' | 'failed';
@@ -1287,7 +2356,7 @@ export interface RuleCreateParams {
1287
2356
  /**
1288
2357
  * Type of loyalty rule being created
1289
2358
  */
1290
- type: 'Bonus' | 'BoughtOn' | 'BoughtWithRoyalties' | 'DiscordMessages' | 'Listing' | 'Lodging' | 'MintOn' | 'PoapClaim' | 'SnagSocialsConnected' | 'SnapshotFullset' | 'SnapshotHold' | 'SoldOn' | 'SoldWithRoyalties' | 'TokenHold' | 'TwitterBio' | 'TwitterHashTagPost' | 'Retweet' | 'check_in' | 'code_entry' | 'connect_wallet' | 'connected_discord' | 'connected_email' | 'connected_epic' | 'connected_steam' | 'connected_telegram' | 'connected_twitter' | 'create_partner_account' | 'discord_member' | 'drip_x_follow' | 'drip_x_new_tweet' | 'drip_x_text_in_bio' | 'drip_x_text_in_comment' | 'drip_x_text_in_name' | 'drip_x_tweet' | 'external_rule' | 'link_click' | 'manual_upload' | 'profile_completed' | 'referred_user' | 'smart_contract_event' | 'snapshot_governance' | 'telegram_join' | 'telegram_messages' | 'text_input' | 'token_hold_erc20' | 'tweet_liked_by_project' | 'twitter_comment' | 'twitter_follow' | 'twitter_followers' | 'twitter_like' | 'twitter_post_hashtag';
2359
+ type: 'Bonus' | 'BoughtOn' | 'BoughtWithRoyalties' | 'DiscordMessages' | 'Listing' | 'Lodging' | 'MintOn' | 'PoapClaim' | 'SnagSocialsConnected' | 'SnapshotFullset' | 'SnapshotHold' | 'SoldOn' | 'SoldWithRoyalties' | 'TokenHold' | 'TwitterBio' | 'TwitterHashTagPost' | 'Retweet' | 'check_in' | 'code_entry' | 'connect_wallet' | 'connected_discord' | 'connected_email' | 'connected_epic' | 'connected_steam' | 'connected_telegram' | 'connected_twitter' | 'create_partner_account' | 'discord_member' | 'drip_x_follow' | 'drip_x_new_tweet' | 'drip_x_text_in_bio' | 'drip_x_text_in_comment' | 'drip_x_text_in_name' | 'drip_x_tweet' | 'external_rule' | 'link_click' | 'manual_upload' | 'profile_completed' | 'referred_user' | 'smart_contract_event' | 'snapshot_governance' | 'telegram_join' | 'telegram_messages' | 'text_input' | 'token_hold_erc20' | 'tweet_liked_by_project' | 'twitter_comment' | 'twitter_follow' | 'twitter_followers' | 'twitter_like' | 'twitter_post_hashtag' | 'quiz' | 'poll' | 'steam_wishlist' | 'liquidity_uniswap_v2' | 'liquidity_uniswap_v3' | 'points_airdrop' | 'youtube_subscribers' | 'youtube_comment' | 'shopify_spend' | 'swap' | 'tiktok_post';
1291
2360
  /**
1292
2361
  * Unique identifier for the associated website
1293
2362
  */
@@ -1316,6 +2385,10 @@ export interface RuleCreateParams {
1316
2385
  * Optional detailed description of the rule
1317
2386
  */
1318
2387
  description?: string;
2388
+ /**
2389
+ * ID of the external integration
2390
+ */
2391
+ externalIntegrationId?: string | null;
1319
2392
  /**
1320
2393
  * Whether to hide this rule in the user interface
1321
2394
  */
@@ -1323,19 +2396,41 @@ export interface RuleCreateParams {
1323
2396
  /**
1324
2397
  * Interval between rule executions
1325
2398
  */
1326
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
2399
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1327
2400
  /**
1328
2401
  * Whether this rule is mandatory
1329
2402
  */
1330
2403
  isRequired?: boolean;
2404
+ /**
2405
+ * Unique identifier for the loyalty badge
2406
+ */
2407
+ loyaltyBadgeId?: string | null;
1331
2408
  /**
1332
2409
  * Unique identifier for the loyalty rule group
1333
2410
  */
1334
2411
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
2412
+ /**
2413
+ * URL for uploading loyalty user allotment via CSV
2414
+ */
2415
+ loyaltyUserAllotmentCsvUrl?: string;
2416
+ /**
2417
+ * The interval for the max amount. Available for the smart contract and external
2418
+ * rules.
2419
+ */
2420
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
2421
+ /**
2422
+ * The maximum amount of points a user can earn per interval. Available for the
2423
+ * smart contract and external rules.
2424
+ */
2425
+ maxAmountPerInterval?: number | null;
2426
+ /**
2427
+ * URL of the media to be displayed
2428
+ */
2429
+ mediaUrl?: string | null;
1335
2430
  /**
1336
2431
  * Blockchain network where the rule will apply
1337
2432
  */
1338
- network?: 'mainnet' | 'polygon' | 'polygon_mumbai' | 'optimism' | 'arbitrum' | 'binance' | 'bscTestnet' | 'avalanche' | 'avalancheFuji' | 'zksync' | 'fantom' | 'fantomTestnet' | 'base' | 'baseSepolia' | 'skaleNebula' | 'xai' | 'berachainArtio' | 'solana' | 'apechain' | 'flowMainnet' | 'campTestnet' | 'sui' | 'vanar' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli';
2433
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
1339
2434
  /**
1340
2435
  * OAuth credentials associated with the rule
1341
2436
  */
@@ -1343,17 +2438,25 @@ export interface RuleCreateParams {
1343
2438
  /**
1344
2439
  * Type of reward issued by the rule
1345
2440
  */
1346
- rewardType?: 'points' | 'multiplier';
2441
+ rewardType?: 'points' | 'multiplier' | 'badge';
2442
+ /**
2443
+ * URL of the Shopify store
2444
+ */
2445
+ shopifyStoreUrl?: string | null;
1347
2446
  /**
1348
- * Identifier for associated subscriptions
2447
+ * Optional subscription id for the rule
1349
2448
  */
1350
- subscriptionIdentifier?: string | null;
2449
+ subscriptionId?: string | null;
1351
2450
  }
1352
2451
  export declare namespace RuleCreateParams {
1353
2452
  /**
1354
2453
  * Additional metadata for the loyalty rule
1355
2454
  */
1356
2455
  interface Metadata {
2456
+ /**
2457
+ * Number of tokens per batch.
2458
+ */
2459
+ batchSize?: number | null;
1357
2460
  /**
1358
2461
  * Text displayed on the action button.
1359
2462
  */
@@ -1378,6 +2481,12 @@ export declare namespace RuleCreateParams {
1378
2481
  * Array of collections associated with the rule.
1379
2482
  */
1380
2483
  collection?: Array<Metadata.Collection>;
2484
+ /**
2485
+ * Conditions for completing the profile.
2486
+ */
2487
+ completeProfileConditions?: {
2488
+ [key: string]: boolean;
2489
+ } | null;
1381
2490
  /**
1382
2491
  * Object containing details for the call-to-action.
1383
2492
  */
@@ -1406,10 +2515,18 @@ export declare namespace RuleCreateParams {
1406
2515
  * Flag indicating whether the verified multiplier is enabled.
1407
2516
  */
1408
2517
  enableVerifiedMultiplier?: boolean;
2518
+ /**
2519
+ * Fill source of the order for the token sale
2520
+ */
2521
+ fillSource?: string;
1409
2522
  /**
1410
2523
  * Percentage reward given to a user for their first referral.
1411
2524
  */
1412
2525
  firstReferralReward?: number | null;
2526
+ /**
2527
+ * Flag indicating whether the fill source is included.
2528
+ */
2529
+ hasFillSource?: boolean;
1413
2530
  /**
1414
2531
  * Indicates if the item has never been sold.
1415
2532
  */
@@ -1430,10 +2547,18 @@ export declare namespace RuleCreateParams {
1430
2547
  * URL of the image associated with the rule.
1431
2548
  */
1432
2549
  imageUrl?: string | null;
2550
+ /**
2551
+ * If enabled, the first transaction done on the platform will complete this rule
2552
+ */
2553
+ isCheckInOnEveryTxn?: boolean;
1433
2554
  /**
1434
2555
  * Indicates if the multiplier has been applied to rewards.
1435
2556
  */
1436
2557
  isMultiplierApplied?: boolean;
2558
+ /**
2559
+ * Flag indicating if the rule is restricted to new users.
2560
+ */
2561
+ isRestrictedToNewUsers?: boolean;
1437
2562
  /**
1438
2563
  * Flag indicating if rewards are applied retroactively.
1439
2564
  */
@@ -1446,6 +2571,10 @@ export declare namespace RuleCreateParams {
1446
2571
  * Optional link associated with the metadata.
1447
2572
  */
1448
2573
  link?: string | null;
2574
+ /**
2575
+ * Liquidity pool details.
2576
+ */
2577
+ liquidity?: Metadata.Liquidity;
1449
2578
  /**
1450
2579
  * Maximum quantity constraint for token holding.
1451
2580
  */
@@ -1471,9 +2600,29 @@ export declare namespace RuleCreateParams {
1471
2600
  */
1472
2601
  onlyNonListed?: boolean;
1473
2602
  /**
1474
- * Promotional code associated with the rule.
2603
+ * Indicates if only existing users are rewarded.
2604
+ */
2605
+ onlyRewardExistingUser?: boolean;
2606
+ /**
2607
+ * give points for only one token ownership per contract
2608
+ */
2609
+ onlyRewardSingleTokenOwnership?: boolean | null;
2610
+ /**
2611
+ * Promotional code associated with the rule.
2612
+ */
2613
+ promoCode?: string;
2614
+ /**
2615
+ * URL of the CSV file containing promo codes.
2616
+ */
2617
+ promoCodeCsvUrl?: string;
2618
+ /**
2619
+ * Numbers of the promotional code to be generated.
2620
+ */
2621
+ promoCodeLength?: number | null;
2622
+ /**
2623
+ * Type of the promotional code.
1475
2624
  */
1476
- promoCode?: string;
2625
+ promoCodeType?: 'code' | 'csv' | 'generate';
1477
2626
  /**
1478
2627
  * Array defining ranges and corresponding rewards.
1479
2628
  */
@@ -1486,10 +2635,27 @@ export declare namespace RuleCreateParams {
1486
2635
  * Lump sum reward given to a referrer.
1487
2636
  */
1488
2637
  referrerReward?: number | null;
2638
+ /**
2639
+ * Loyalty currency ID of the referrer reward.
2640
+ */
2641
+ referrerRewardLoyaltyCurrencyId?: string | null;
2642
+ /**
2643
+ * Flag indicating if the rule can also reward badges per range.
2644
+ */
2645
+ rewardBadgePerRange?: boolean;
2646
+ /**
2647
+ * Flag indicating if the reward is rewarded by batch.
2648
+ */
2649
+ rewardByBatch?: boolean | null;
1489
2650
  /**
1490
2651
  * Flag indicating if rewards are given per impression.
1491
2652
  */
1492
2653
  rewardPerImpression?: boolean | null;
2654
+ /**
2655
+ * Flag indicating if the rule should reward based on value of traded tokens
2656
+ * instead of count.
2657
+ */
2658
+ rewardPerValue?: boolean;
1493
2659
  /**
1494
2660
  * Currency associated with sales.
1495
2661
  */
@@ -1498,6 +2664,10 @@ export declare namespace RuleCreateParams {
1498
2664
  * Percentage reward given for a second-level referral.
1499
2665
  */
1500
2666
  secondReferralReward?: number | null;
2667
+ /**
2668
+ * Flag indicating if the multiplier is skipped.
2669
+ */
2670
+ skipMultiplier?: boolean | null;
1501
2671
  /**
1502
2672
  * Object containing details of the associated smart contract.
1503
2673
  */
@@ -1509,7 +2679,7 @@ export declare namespace RuleCreateParams {
1509
2679
  /**
1510
2680
  * Social media platform associated with the rule.
1511
2681
  */
1512
- socialPlatform?: 'Twitch' | 'TikTok' | 'X(Twitter)' | 'Instagram' | 'EpicGames' | 'YouTube' | 'Discord' | 'Custom' | null;
2682
+ socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
1513
2683
  /**
1514
2684
  * URL of the social platform's logo.
1515
2685
  */
@@ -1518,10 +2688,18 @@ export declare namespace RuleCreateParams {
1518
2688
  * Name of the social platform.
1519
2689
  */
1520
2690
  socialPlatformName?: string | null;
2691
+ /**
2692
+ * ID of the Steam app.
2693
+ */
2694
+ steamAppId?: string | null;
1521
2695
  /**
1522
2696
  * Array of streak milestones and corresponding rewards.
1523
2697
  */
1524
2698
  streakArray?: Array<Metadata.StreakArray> | null;
2699
+ /**
2700
+ * Metadata for swap loyalty rules
2701
+ */
2702
+ swap?: Metadata.Swap;
1525
2703
  /**
1526
2704
  * ID of the Telegram channel.
1527
2705
  */
@@ -1534,6 +2712,11 @@ export declare namespace RuleCreateParams {
1534
2712
  * Flag indicating if all contracts are tracked.
1535
2713
  */
1536
2714
  trackAllContracts?: boolean | null;
2715
+ /**
2716
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2717
+ * completed once the progress is 100%.
2718
+ */
2719
+ trackProgress?: boolean | null;
1537
2720
  /**
1538
2721
  * URL of the associated Twitter account.
1539
2722
  */
@@ -1569,7 +2752,15 @@ export declare namespace RuleCreateParams {
1569
2752
  /**
1570
2753
  * Type of wallet associated with the rule.
1571
2754
  */
1572
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
2755
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
2756
+ /**
2757
+ * ID of the Youtube channel.
2758
+ */
2759
+ youtubeChannelId?: string | null;
2760
+ /**
2761
+ * ID of the Youtube video.
2762
+ */
2763
+ youtubeVideoId?: string | null;
1573
2764
  }
1574
2765
  namespace Metadata {
1575
2766
  interface Collection {
@@ -1584,7 +2775,7 @@ export declare namespace RuleCreateParams {
1584
2775
  /**
1585
2776
  * Blockchain network of the collection.
1586
2777
  */
1587
- network?: 'mainnet' | 'polygon' | 'polygon_mumbai' | 'optimism' | 'arbitrum' | 'binance' | 'bscTestnet' | 'avalanche' | 'avalancheFuji' | 'zksync' | 'fantom' | 'fantomTestnet' | 'base' | 'baseSepolia' | 'skaleNebula' | 'xai' | 'berachainArtio' | 'solana' | 'apechain' | 'flowMainnet' | 'campTestnet' | 'sui' | 'vanar' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli';
2778
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
1588
2779
  }
1589
2780
  /**
1590
2781
  * Object containing details for the call-to-action.
@@ -1623,6 +2814,10 @@ export declare namespace RuleCreateParams {
1623
2814
  * Array of emojis used in the channel.
1624
2815
  */
1625
2816
  emojis?: Array<Channel.Emoji>;
2817
+ /**
2818
+ * Phrase of text to be present in the discord message
2819
+ */
2820
+ text?: string;
1626
2821
  }
1627
2822
  namespace Channel {
1628
2823
  interface Emoji {
@@ -1645,6 +2840,49 @@ export declare namespace RuleCreateParams {
1645
2840
  */
1646
2841
  id: string;
1647
2842
  }
2843
+ /**
2844
+ * Liquidity pool details.
2845
+ */
2846
+ interface Liquidity {
2847
+ /**
2848
+ * Calculation type of the liquidity pool.
2849
+ */
2850
+ calculationType?: 'fixed' | 'custom';
2851
+ /**
2852
+ * Custom function to calculate the the reward amount based on the liquidity
2853
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2854
+ * USD.
2855
+ */
2856
+ customFunction?: string;
2857
+ /**
2858
+ * Liquidity provided per day in USD
2859
+ */
2860
+ liquidityPerDay?: number;
2861
+ /**
2862
+ * Blockchain network of the liquidity pool.
2863
+ */
2864
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
2865
+ /**
2866
+ * Indicates if only in-range liquidity is rewarded.
2867
+ */
2868
+ onlyRewardInRangeLiquidity?: boolean;
2869
+ /**
2870
+ * Array of liquidity pools associated with the rule.
2871
+ */
2872
+ pools?: Array<Liquidity.Pool>;
2873
+ /**
2874
+ * Protocol of the liquidity pool.
2875
+ */
2876
+ protocol?: string;
2877
+ }
2878
+ namespace Liquidity {
2879
+ interface Pool {
2880
+ /**
2881
+ * Unique identifier of the liquidity pool.
2882
+ */
2883
+ id: string;
2884
+ }
2885
+ }
1648
2886
  interface Range {
1649
2887
  /**
1650
2888
  * Reward amount for this range.
@@ -1658,6 +2896,14 @@ export declare namespace RuleCreateParams {
1658
2896
  * Start value of the range.
1659
2897
  */
1660
2898
  startRange: number;
2899
+ /**
2900
+ * ID of the loyalty badge for this range.
2901
+ */
2902
+ loyaltyBadgeId?: string;
2903
+ /**
2904
+ * Amount of the loyalty multiplier for this range.
2905
+ */
2906
+ loyaltyMultiplierAmount?: number;
1661
2907
  }
1662
2908
  /**
1663
2909
  * Object defining referral requirements.
@@ -1701,18 +2947,14 @@ export declare namespace RuleCreateParams {
1701
2947
  * Object containing details of the associated smart contract.
1702
2948
  */
1703
2949
  interface SmartContract {
1704
- /**
1705
- * ABI of the smart contract.
1706
- */
1707
- abi?: string | null;
1708
2950
  /**
1709
2951
  * Mapping of addresses for the smart contract.
1710
2952
  */
1711
2953
  addressMapping?: string | null;
1712
2954
  /**
1713
- * Array of bonus details applied to the rule.
2955
+ * Object containing details of the amount multiplier from the event.
1714
2956
  */
1715
- bonus?: Array<SmartContract.Bonus> | null;
2957
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1716
2958
  /**
1717
2959
  * ID of the smart contract.
1718
2960
  */
@@ -1721,58 +2963,28 @@ export declare namespace RuleCreateParams {
1721
2963
  * Criteria to evaluate the smart contract event.
1722
2964
  */
1723
2965
  criteria?: 'everyEvent' | 'byParameter' | null;
1724
- /**
1725
- * Time range applied to the rule.
1726
- */
1727
- customRange?: SmartContract.CustomRange | null;
1728
2966
  /**
1729
2967
  * Event emitted by the smart contract.
1730
2968
  */
1731
2969
  event?: string | null;
1732
- /**
1733
- * Maximum value allowed for the parameter.
1734
- */
1735
- max?: number | null;
1736
2970
  /**
1737
2971
  * Array of parameters for the smart contract.
1738
2972
  */
1739
2973
  params?: Array<SmartContract.Param> | null;
1740
2974
  /**
1741
- * Flag indicating if a bonus is applied.
2975
+ * Type of the smart contract interaction.
1742
2976
  */
1743
- withBonus?: boolean | null;
1744
- /**
1745
- * Flag indicating if a custom range is applied.
1746
- */
1747
- withCustomRange?: boolean | null;
1748
- /**
1749
- * Flag indicating if a maximum limit is applied.
1750
- */
1751
- withMax?: boolean | null;
2977
+ type?: 'function' | 'event' | null;
1752
2978
  }
1753
2979
  namespace SmartContract {
1754
- interface Bonus {
1755
- /**
1756
- * Amount of the bonus.
1757
- */
1758
- amount?: number | null;
1759
- /**
1760
- * Number of times the bonus is applied.
1761
- */
1762
- count?: number | null;
1763
- }
1764
2980
  /**
1765
- * Time range applied to the rule.
2981
+ * Object containing details of the amount multiplier from the event.
1766
2982
  */
1767
- interface CustomRange {
1768
- /**
1769
- * End time of the custom range.
1770
- */
1771
- endsAt?: string | null;
2983
+ interface AmountMultiplier {
1772
2984
  /**
1773
- * Start time of the custom range.
2985
+ * Mapping of the value for the smart contract.
1774
2986
  */
1775
- startsAt?: string | null;
2987
+ valueMapping?: string | null;
1776
2988
  }
1777
2989
  interface Param {
1778
2990
  /**
@@ -1809,6 +3021,24 @@ export declare namespace RuleCreateParams {
1809
3021
  */
1810
3022
  streakMilestone: number;
1811
3023
  }
3024
+ /**
3025
+ * Metadata for swap loyalty rules
3026
+ */
3027
+ interface Swap {
3028
+ provider?: 'any' | 'relay' | 'lifi';
3029
+ relayReferrerId?: string;
3030
+ requireCrossChainSwap?: boolean;
3031
+ swappedToChain?: 'any' | number | string;
3032
+ swappedToTokens?: Array<Swap.SwappedToToken>;
3033
+ tokenMode?: 'any' | 'specific';
3034
+ trackTokenAmount?: boolean;
3035
+ }
3036
+ namespace Swap {
3037
+ interface SwappedToToken {
3038
+ address: string;
3039
+ chainId: string;
3040
+ }
3041
+ }
1812
3042
  }
1813
3043
  interface Collection {
1814
3044
  /**
@@ -1818,7 +3048,7 @@ export declare namespace RuleCreateParams {
1818
3048
  /**
1819
3049
  * Blockchain network for the collection
1820
3050
  */
1821
- network: 'mainnet' | 'polygon' | 'polygon_mumbai' | 'optimism' | 'arbitrum' | 'binance' | 'bscTestnet' | 'avalanche' | 'avalancheFuji' | 'zksync' | 'fantom' | 'fantomTestnet' | 'base' | 'baseSepolia' | 'skaleNebula' | 'xai' | 'berachainArtio' | 'solana' | 'apechain' | 'flowMainnet' | 'campTestnet' | 'sui' | 'vanar' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli';
3051
+ network: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
1822
3052
  }
1823
3053
  }
1824
3054
  export interface RuleUpdateParams {
@@ -1826,34 +3056,14 @@ export interface RuleUpdateParams {
1826
3056
  * Reward amount for the loyalty rule
1827
3057
  */
1828
3058
  amount: unknown;
1829
- /**
1830
- * Effective end time of the rule
1831
- */
1832
- effectiveEndTime: string | null;
1833
- /**
1834
- * Effective start time of the rule
1835
- */
1836
- effectiveStartTime: string | null;
1837
3059
  /**
1838
3060
  * End time for the loyalty rule
1839
3061
  */
1840
3062
  endTime: string | null;
1841
- /**
1842
- * Frequency of the rule execution
1843
- */
1844
- frequency: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
1845
- /**
1846
- * Additional metadata for the loyalty rule
1847
- */
1848
- metadata: RuleUpdateParams.Metadata;
1849
3063
  /**
1850
3064
  * Name of the loyalty rule
1851
3065
  */
1852
3066
  name: string;
1853
- /**
1854
- * Start time for the loyalty rule
1855
- */
1856
- startTime: string | null;
1857
3067
  /**
1858
3068
  * Blockchain address of the associated collection
1859
3069
  */
@@ -1874,6 +3084,22 @@ export interface RuleUpdateParams {
1874
3084
  * Optional description of the loyalty rule
1875
3085
  */
1876
3086
  description?: string;
3087
+ /**
3088
+ * Effective end time of the rule
3089
+ */
3090
+ effectiveEndTime?: string | null;
3091
+ /**
3092
+ * Effective start time of the rule
3093
+ */
3094
+ effectiveStartTime?: string | null;
3095
+ /**
3096
+ * ID of the external integration
3097
+ */
3098
+ externalIntegrationId?: string | null;
3099
+ /**
3100
+ * Frequency of the rule execution
3101
+ */
3102
+ frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
1877
3103
  /**
1878
3104
  * Whether to hide this rule in the user interface
1879
3105
  */
@@ -1881,7 +3107,7 @@ export interface RuleUpdateParams {
1881
3107
  /**
1882
3108
  * Time interval for recurring rule execution
1883
3109
  */
1884
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
3110
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1885
3111
  /**
1886
3112
  * Whether this rule is required for participation
1887
3113
  */
@@ -1890,10 +3116,28 @@ export interface RuleUpdateParams {
1890
3116
  * ID of the rule group section to associate with the rule
1891
3117
  */
1892
3118
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
3119
+ /**
3120
+ * The interval for the max amount. Available for the smart contract and external
3121
+ * rules.
3122
+ */
3123
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
3124
+ /**
3125
+ * The maximum amount of points a user can earn per interval. Available for the
3126
+ * smart contract and external rules.
3127
+ */
3128
+ maxAmountPerInterval?: number | null;
3129
+ /**
3130
+ * URL of the media to be displayed
3131
+ */
3132
+ mediaUrl?: string | null;
3133
+ /**
3134
+ * Additional metadata for the loyalty rule
3135
+ */
3136
+ metadata?: RuleUpdateParams.Metadata;
1893
3137
  /**
1894
3138
  * Blockchain network where the rule will apply
1895
3139
  */
1896
- network?: 'mainnet' | 'polygon' | 'polygon_mumbai' | 'optimism' | 'arbitrum' | 'binance' | 'bscTestnet' | 'avalanche' | 'avalancheFuji' | 'zksync' | 'fantom' | 'fantomTestnet' | 'base' | 'baseSepolia' | 'skaleNebula' | 'xai' | 'berachainArtio' | 'solana' | 'apechain' | 'flowMainnet' | 'campTestnet' | 'sui' | 'vanar' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli';
3140
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
1897
3141
  /**
1898
3142
  * ID for associated OAuth credentials
1899
3143
  */
@@ -1901,17 +3145,39 @@ export interface RuleUpdateParams {
1901
3145
  /**
1902
3146
  * Type of reward issued by this rule
1903
3147
  */
1904
- rewardType?: 'points' | 'multiplier';
3148
+ rewardType?: 'points' | 'multiplier' | 'badge';
1905
3149
  /**
1906
- * Optional subscription identifier for the rule
3150
+ * URL of the Shopify store
1907
3151
  */
1908
- subscriptionIdentifier?: string | null;
3152
+ shopifyStoreUrl?: string | null;
3153
+ /**
3154
+ * Start time for the loyalty rule
3155
+ */
3156
+ startTime?: string | null;
3157
+ /**
3158
+ * Optional subscription id for the rule
3159
+ */
3160
+ subscriptionId?: string | null;
1909
3161
  }
1910
3162
  export declare namespace RuleUpdateParams {
3163
+ interface Collection {
3164
+ /**
3165
+ * Blockchain address of the collection
3166
+ */
3167
+ address: string;
3168
+ /**
3169
+ * Blockchain network for the collection
3170
+ */
3171
+ network: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
3172
+ }
1911
3173
  /**
1912
3174
  * Additional metadata for the loyalty rule
1913
3175
  */
1914
3176
  interface Metadata {
3177
+ /**
3178
+ * Number of tokens per batch.
3179
+ */
3180
+ batchSize?: number | null;
1915
3181
  /**
1916
3182
  * Text displayed on the action button.
1917
3183
  */
@@ -1936,6 +3202,12 @@ export declare namespace RuleUpdateParams {
1936
3202
  * Array of collections associated with the rule.
1937
3203
  */
1938
3204
  collection?: Array<Metadata.Collection>;
3205
+ /**
3206
+ * Conditions for completing the profile.
3207
+ */
3208
+ completeProfileConditions?: {
3209
+ [key: string]: boolean;
3210
+ } | null;
1939
3211
  /**
1940
3212
  * Object containing details for the call-to-action.
1941
3213
  */
@@ -1964,10 +3236,18 @@ export declare namespace RuleUpdateParams {
1964
3236
  * Flag indicating whether the verified multiplier is enabled.
1965
3237
  */
1966
3238
  enableVerifiedMultiplier?: boolean;
3239
+ /**
3240
+ * Fill source of the order for the token sale
3241
+ */
3242
+ fillSource?: string;
1967
3243
  /**
1968
3244
  * Percentage reward given to a user for their first referral.
1969
3245
  */
1970
3246
  firstReferralReward?: number | null;
3247
+ /**
3248
+ * Flag indicating whether the fill source is included.
3249
+ */
3250
+ hasFillSource?: boolean;
1971
3251
  /**
1972
3252
  * Indicates if the item has never been sold.
1973
3253
  */
@@ -1988,10 +3268,18 @@ export declare namespace RuleUpdateParams {
1988
3268
  * URL of the image associated with the rule.
1989
3269
  */
1990
3270
  imageUrl?: string | null;
3271
+ /**
3272
+ * If enabled, the first transaction done on the platform will complete this rule
3273
+ */
3274
+ isCheckInOnEveryTxn?: boolean;
1991
3275
  /**
1992
3276
  * Indicates if the multiplier has been applied to rewards.
1993
3277
  */
1994
3278
  isMultiplierApplied?: boolean;
3279
+ /**
3280
+ * Flag indicating if the rule is restricted to new users.
3281
+ */
3282
+ isRestrictedToNewUsers?: boolean;
1995
3283
  /**
1996
3284
  * Flag indicating if rewards are applied retroactively.
1997
3285
  */
@@ -2004,6 +3292,10 @@ export declare namespace RuleUpdateParams {
2004
3292
  * Optional link associated with the metadata.
2005
3293
  */
2006
3294
  link?: string | null;
3295
+ /**
3296
+ * Liquidity pool details.
3297
+ */
3298
+ liquidity?: Metadata.Liquidity;
2007
3299
  /**
2008
3300
  * Maximum quantity constraint for token holding.
2009
3301
  */
@@ -2028,10 +3320,30 @@ export declare namespace RuleUpdateParams {
2028
3320
  * Flag indicating whether to include only non-listed items.
2029
3321
  */
2030
3322
  onlyNonListed?: boolean;
3323
+ /**
3324
+ * Indicates if only existing users are rewarded.
3325
+ */
3326
+ onlyRewardExistingUser?: boolean;
3327
+ /**
3328
+ * give points for only one token ownership per contract
3329
+ */
3330
+ onlyRewardSingleTokenOwnership?: boolean | null;
2031
3331
  /**
2032
3332
  * Promotional code associated with the rule.
2033
3333
  */
2034
3334
  promoCode?: string;
3335
+ /**
3336
+ * URL of the CSV file containing promo codes.
3337
+ */
3338
+ promoCodeCsvUrl?: string;
3339
+ /**
3340
+ * Numbers of the promotional code to be generated.
3341
+ */
3342
+ promoCodeLength?: number | null;
3343
+ /**
3344
+ * Type of the promotional code.
3345
+ */
3346
+ promoCodeType?: 'code' | 'csv' | 'generate';
2035
3347
  /**
2036
3348
  * Array defining ranges and corresponding rewards.
2037
3349
  */
@@ -2044,10 +3356,27 @@ export declare namespace RuleUpdateParams {
2044
3356
  * Lump sum reward given to a referrer.
2045
3357
  */
2046
3358
  referrerReward?: number | null;
3359
+ /**
3360
+ * Loyalty currency ID of the referrer reward.
3361
+ */
3362
+ referrerRewardLoyaltyCurrencyId?: string | null;
3363
+ /**
3364
+ * Flag indicating if the rule can also reward badges per range.
3365
+ */
3366
+ rewardBadgePerRange?: boolean;
3367
+ /**
3368
+ * Flag indicating if the reward is rewarded by batch.
3369
+ */
3370
+ rewardByBatch?: boolean | null;
2047
3371
  /**
2048
3372
  * Flag indicating if rewards are given per impression.
2049
3373
  */
2050
3374
  rewardPerImpression?: boolean | null;
3375
+ /**
3376
+ * Flag indicating if the rule should reward based on value of traded tokens
3377
+ * instead of count.
3378
+ */
3379
+ rewardPerValue?: boolean;
2051
3380
  /**
2052
3381
  * Currency associated with sales.
2053
3382
  */
@@ -2056,6 +3385,10 @@ export declare namespace RuleUpdateParams {
2056
3385
  * Percentage reward given for a second-level referral.
2057
3386
  */
2058
3387
  secondReferralReward?: number | null;
3388
+ /**
3389
+ * Flag indicating if the multiplier is skipped.
3390
+ */
3391
+ skipMultiplier?: boolean | null;
2059
3392
  /**
2060
3393
  * Object containing details of the associated smart contract.
2061
3394
  */
@@ -2067,7 +3400,7 @@ export declare namespace RuleUpdateParams {
2067
3400
  /**
2068
3401
  * Social media platform associated with the rule.
2069
3402
  */
2070
- socialPlatform?: 'Twitch' | 'TikTok' | 'X(Twitter)' | 'Instagram' | 'EpicGames' | 'YouTube' | 'Discord' | 'Custom' | null;
3403
+ socialPlatform?: 'Custom' | 'Discord' | 'EpicGames' | 'Instagram' | 'Steam' | 'Telegram' | 'TikTok' | 'Twitch' | 'X(Twitter)' | 'YouTube' | 'Google' | null;
2071
3404
  /**
2072
3405
  * URL of the social platform's logo.
2073
3406
  */
@@ -2076,10 +3409,18 @@ export declare namespace RuleUpdateParams {
2076
3409
  * Name of the social platform.
2077
3410
  */
2078
3411
  socialPlatformName?: string | null;
3412
+ /**
3413
+ * ID of the Steam app.
3414
+ */
3415
+ steamAppId?: string | null;
2079
3416
  /**
2080
3417
  * Array of streak milestones and corresponding rewards.
2081
3418
  */
2082
3419
  streakArray?: Array<Metadata.StreakArray> | null;
3420
+ /**
3421
+ * Metadata for swap loyalty rules
3422
+ */
3423
+ swap?: Metadata.Swap;
2083
3424
  /**
2084
3425
  * ID of the Telegram channel.
2085
3426
  */
@@ -2092,6 +3433,11 @@ export declare namespace RuleUpdateParams {
2092
3433
  * Flag indicating if all contracts are tracked.
2093
3434
  */
2094
3435
  trackAllContracts?: boolean | null;
3436
+ /**
3437
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
3438
+ * completed once the progress is 100%.
3439
+ */
3440
+ trackProgress?: boolean | null;
2095
3441
  /**
2096
3442
  * URL of the associated Twitter account.
2097
3443
  */
@@ -2127,7 +3473,15 @@ export declare namespace RuleUpdateParams {
2127
3473
  /**
2128
3474
  * Type of wallet associated with the rule.
2129
3475
  */
2130
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
3476
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
3477
+ /**
3478
+ * ID of the Youtube channel.
3479
+ */
3480
+ youtubeChannelId?: string | null;
3481
+ /**
3482
+ * ID of the Youtube video.
3483
+ */
3484
+ youtubeVideoId?: string | null;
2131
3485
  }
2132
3486
  namespace Metadata {
2133
3487
  interface Collection {
@@ -2142,7 +3496,7 @@ export declare namespace RuleUpdateParams {
2142
3496
  /**
2143
3497
  * Blockchain network of the collection.
2144
3498
  */
2145
- network?: 'mainnet' | 'polygon' | 'polygon_mumbai' | 'optimism' | 'arbitrum' | 'binance' | 'bscTestnet' | 'avalanche' | 'avalancheFuji' | 'zksync' | 'fantom' | 'fantomTestnet' | 'base' | 'baseSepolia' | 'skaleNebula' | 'xai' | 'berachainArtio' | 'solana' | 'apechain' | 'flowMainnet' | 'campTestnet' | 'sui' | 'vanar' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli';
3499
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
2146
3500
  }
2147
3501
  /**
2148
3502
  * Object containing details for the call-to-action.
@@ -2181,6 +3535,10 @@ export declare namespace RuleUpdateParams {
2181
3535
  * Array of emojis used in the channel.
2182
3536
  */
2183
3537
  emojis?: Array<Channel.Emoji>;
3538
+ /**
3539
+ * Phrase of text to be present in the discord message
3540
+ */
3541
+ text?: string;
2184
3542
  }
2185
3543
  namespace Channel {
2186
3544
  interface Emoji {
@@ -2203,6 +3561,49 @@ export declare namespace RuleUpdateParams {
2203
3561
  */
2204
3562
  id: string;
2205
3563
  }
3564
+ /**
3565
+ * Liquidity pool details.
3566
+ */
3567
+ interface Liquidity {
3568
+ /**
3569
+ * Calculation type of the liquidity pool.
3570
+ */
3571
+ calculationType?: 'fixed' | 'custom';
3572
+ /**
3573
+ * Custom function to calculate the the reward amount based on the liquidity
3574
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
3575
+ * USD.
3576
+ */
3577
+ customFunction?: string;
3578
+ /**
3579
+ * Liquidity provided per day in USD
3580
+ */
3581
+ liquidityPerDay?: number;
3582
+ /**
3583
+ * Blockchain network of the liquidity pool.
3584
+ */
3585
+ network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachain' | 'berachainArtio' | 'berachainBepolia' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sophonTestnet' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'coti' | 'cotiTestnet' | 'morph' | 'morphTestnet' | 'morphHolesky' | 'nitrograph' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
3586
+ /**
3587
+ * Indicates if only in-range liquidity is rewarded.
3588
+ */
3589
+ onlyRewardInRangeLiquidity?: boolean;
3590
+ /**
3591
+ * Array of liquidity pools associated with the rule.
3592
+ */
3593
+ pools?: Array<Liquidity.Pool>;
3594
+ /**
3595
+ * Protocol of the liquidity pool.
3596
+ */
3597
+ protocol?: string;
3598
+ }
3599
+ namespace Liquidity {
3600
+ interface Pool {
3601
+ /**
3602
+ * Unique identifier of the liquidity pool.
3603
+ */
3604
+ id: string;
3605
+ }
3606
+ }
2206
3607
  interface Range {
2207
3608
  /**
2208
3609
  * Reward amount for this range.
@@ -2216,6 +3617,14 @@ export declare namespace RuleUpdateParams {
2216
3617
  * Start value of the range.
2217
3618
  */
2218
3619
  startRange: number;
3620
+ /**
3621
+ * ID of the loyalty badge for this range.
3622
+ */
3623
+ loyaltyBadgeId?: string;
3624
+ /**
3625
+ * Amount of the loyalty multiplier for this range.
3626
+ */
3627
+ loyaltyMultiplierAmount?: number;
2219
3628
  }
2220
3629
  /**
2221
3630
  * Object defining referral requirements.
@@ -2259,18 +3668,14 @@ export declare namespace RuleUpdateParams {
2259
3668
  * Object containing details of the associated smart contract.
2260
3669
  */
2261
3670
  interface SmartContract {
2262
- /**
2263
- * ABI of the smart contract.
2264
- */
2265
- abi?: string | null;
2266
3671
  /**
2267
3672
  * Mapping of addresses for the smart contract.
2268
3673
  */
2269
3674
  addressMapping?: string | null;
2270
3675
  /**
2271
- * Array of bonus details applied to the rule.
3676
+ * Object containing details of the amount multiplier from the event.
2272
3677
  */
2273
- bonus?: Array<SmartContract.Bonus> | null;
3678
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2274
3679
  /**
2275
3680
  * ID of the smart contract.
2276
3681
  */
@@ -2279,58 +3684,28 @@ export declare namespace RuleUpdateParams {
2279
3684
  * Criteria to evaluate the smart contract event.
2280
3685
  */
2281
3686
  criteria?: 'everyEvent' | 'byParameter' | null;
2282
- /**
2283
- * Time range applied to the rule.
2284
- */
2285
- customRange?: SmartContract.CustomRange | null;
2286
3687
  /**
2287
3688
  * Event emitted by the smart contract.
2288
3689
  */
2289
3690
  event?: string | null;
2290
- /**
2291
- * Maximum value allowed for the parameter.
2292
- */
2293
- max?: number | null;
2294
3691
  /**
2295
3692
  * Array of parameters for the smart contract.
2296
3693
  */
2297
3694
  params?: Array<SmartContract.Param> | null;
2298
3695
  /**
2299
- * Flag indicating if a bonus is applied.
2300
- */
2301
- withBonus?: boolean | null;
2302
- /**
2303
- * Flag indicating if a custom range is applied.
2304
- */
2305
- withCustomRange?: boolean | null;
2306
- /**
2307
- * Flag indicating if a maximum limit is applied.
3696
+ * Type of the smart contract interaction.
2308
3697
  */
2309
- withMax?: boolean | null;
3698
+ type?: 'function' | 'event' | null;
2310
3699
  }
2311
3700
  namespace SmartContract {
2312
- interface Bonus {
2313
- /**
2314
- * Amount of the bonus.
2315
- */
2316
- amount?: number | null;
2317
- /**
2318
- * Number of times the bonus is applied.
2319
- */
2320
- count?: number | null;
2321
- }
2322
3701
  /**
2323
- * Time range applied to the rule.
3702
+ * Object containing details of the amount multiplier from the event.
2324
3703
  */
2325
- interface CustomRange {
2326
- /**
2327
- * End time of the custom range.
2328
- */
2329
- endsAt?: string | null;
3704
+ interface AmountMultiplier {
2330
3705
  /**
2331
- * Start time of the custom range.
3706
+ * Mapping of the value for the smart contract.
2332
3707
  */
2333
- startsAt?: string | null;
3708
+ valueMapping?: string | null;
2334
3709
  }
2335
3710
  interface Param {
2336
3711
  /**
@@ -2367,27 +3742,60 @@ export declare namespace RuleUpdateParams {
2367
3742
  */
2368
3743
  streakMilestone: number;
2369
3744
  }
2370
- }
2371
- interface Collection {
2372
- /**
2373
- * Blockchain address of the collection
2374
- */
2375
- address: string;
2376
3745
  /**
2377
- * Blockchain network for the collection
3746
+ * Metadata for swap loyalty rules
2378
3747
  */
2379
- network: 'mainnet' | 'polygon' | 'polygon_mumbai' | 'optimism' | 'arbitrum' | 'binance' | 'bscTestnet' | 'avalanche' | 'avalancheFuji' | 'zksync' | 'fantom' | 'fantomTestnet' | 'base' | 'baseSepolia' | 'skaleNebula' | 'xai' | 'berachainArtio' | 'solana' | 'apechain' | 'flowMainnet' | 'campTestnet' | 'sui' | 'vanar' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli';
3748
+ interface Swap {
3749
+ provider?: 'any' | 'relay' | 'lifi';
3750
+ relayReferrerId?: string;
3751
+ requireCrossChainSwap?: boolean;
3752
+ swappedToChain?: 'any' | number | string;
3753
+ swappedToTokens?: Array<Swap.SwappedToToken>;
3754
+ tokenMode?: 'any' | 'specific';
3755
+ trackTokenAmount?: boolean;
3756
+ }
3757
+ namespace Swap {
3758
+ interface SwappedToToken {
3759
+ address: string;
3760
+ chainId: string;
3761
+ }
3762
+ }
2380
3763
  }
2381
3764
  }
2382
3765
  export interface RuleListParams {
3766
+ /**
3767
+ * IDs of the users to filter results by
3768
+ */
3769
+ allotedToUserId?: string | Array<string>;
3770
+ /**
3771
+ * ID of the user group to filter results by
3772
+ */
3773
+ allotedUserGroupId?: string;
2383
3774
  /**
2384
3775
  * Address of the collection to filter by
2385
3776
  */
2386
3777
  collectionAddress?: string;
2387
3778
  /**
2388
- * Maximum number of records to return (max 1000)
3779
+ * If true this will only return loyalty rule chains
3780
+ */
3781
+ includeLoyaltyRuleChains?: 'true' | 'false';
3782
+ /**
3783
+ * If true this will only return active rules, the rules for which the startTime is
3784
+ * in the past and the endTime is in the future
3785
+ */
3786
+ isActive?: 'true' | 'false';
3787
+ /**
3788
+ * Maximum number of records to return (max 100)
2389
3789
  */
2390
3790
  limit?: number;
3791
+ /**
3792
+ * ID of the loyalty rule group to filter results
3793
+ */
3794
+ loyaltyRuleGroupId?: string;
3795
+ /**
3796
+ * The IDs of the loyalty rule
3797
+ */
3798
+ loyaltyRuleId?: string | Array<string>;
2391
3799
  /**
2392
3800
  * Unique identifier for the organization to filter by
2393
3801
  */
@@ -2401,11 +3809,34 @@ export interface RuleListParams {
2401
3809
  */
2402
3810
  websiteId?: string;
2403
3811
  }
3812
+ export interface RuleDeleteParams {
3813
+ /**
3814
+ * Whether to debit loyalty points
3815
+ */
3816
+ debitLoyaltyPoints?: string;
3817
+ }
2404
3818
  export interface RuleCompleteParams {
3819
+ /**
3820
+ * Override amount for the reward (rounded to nearest whole number). This will
3821
+ * override the rule amount and reward the integer passed.
3822
+ */
3823
+ amount?: number | null;
2405
3824
  /**
2406
3825
  * Link to the comment made by user
2407
3826
  */
2408
3827
  commentLink?: string;
3828
+ /**
3829
+ * Unique key to ensure idempotent requests.
3830
+ */
3831
+ idempotencyKey?: string;
3832
+ /**
3833
+ * ID of the choice selected by the user
3834
+ */
3835
+ loyaltyQuestionChoiceId?: string;
3836
+ /**
3837
+ * Value to compare with the range
3838
+ */
3839
+ rangeValue?: number | null;
2409
3840
  /**
2410
3841
  * Unique identifier for the user
2411
3842
  */
@@ -2414,17 +3845,23 @@ export interface RuleCompleteParams {
2414
3845
  * Optional verification code for completing the loyalty rule
2415
3846
  */
2416
3847
  verificationCode?: string;
3848
+ /**
3849
+ * Flag indicating if only verification is required, this will not create a
3850
+ * transaction and reward the user.
3851
+ */
3852
+ verifyOnly?: string;
2417
3853
  /**
2418
3854
  * Wallet address of the user can only be used if userId is not provided
2419
3855
  */
2420
3856
  walletAddress?: string;
2421
3857
  }
2422
- export interface RuleStatusParams {
2423
- organizationId: string;
2424
- websiteId: string;
3858
+ export interface RuleGetStatusParams {
3859
+ organizationId?: string;
2425
3860
  userId?: string;
3861
+ walletAddress?: string;
3862
+ websiteId?: string;
2426
3863
  }
2427
3864
  export declare namespace Rules {
2428
- export { type RuleCreateResponse as RuleCreateResponse, type RuleUpdateResponse as RuleUpdateResponse, type RuleListResponse as RuleListResponse, type RuleDeleteResponse as RuleDeleteResponse, type RuleCompleteResponse as RuleCompleteResponse, type RuleStatusResponse as RuleStatusResponse, type RuleCreateParams as RuleCreateParams, type RuleUpdateParams as RuleUpdateParams, type RuleListParams as RuleListParams, type RuleCompleteParams as RuleCompleteParams, type RuleStatusParams as RuleStatusParams, };
3865
+ export { type RuleCreateResponse as RuleCreateResponse, type RuleUpdateResponse as RuleUpdateResponse, type RuleListResponse as RuleListResponse, type RuleDeleteResponse as RuleDeleteResponse, type RuleCompleteResponse as RuleCompleteResponse, type RuleGetStatusResponse as RuleGetStatusResponse, type RuleCreateParams as RuleCreateParams, type RuleUpdateParams as RuleUpdateParams, type RuleListParams as RuleListParams, type RuleDeleteParams as RuleDeleteParams, type RuleCompleteParams as RuleCompleteParams, type RuleGetStatusParams as RuleGetStatusParams, };
2429
3866
  }
2430
3867
  //# sourceMappingURL=rules.d.ts.map