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

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 +978 -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 +1735 -282
  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 +3502 -63
  302. package/src/resources/loyalty/rule-groups.ts +1149 -0
  303. package/src/resources/loyalty/rules.ts +2906 -575
  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 +170 -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 +182 -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
@@ -7,6 +7,24 @@ import * as Core from '../../core';
7
7
  export class Rules extends APIResource {
8
8
  /**
9
9
  * Create a new Loyalty Rule
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const rule = await client.loyalty.rules.create({
14
+ * amount: '10.5',
15
+ * effectiveEndTime: '2024-12-31T23:59:00Z',
16
+ * effectiveStartTime: '2024-01-01T00:00:00Z',
17
+ * endTime: '2024-12-31T23:59:00Z',
18
+ * frequency: 'daily',
19
+ * loyaltyCurrencyId: '456e1234-e89b-12d3-a456-426614174003',
20
+ * metadata: {},
21
+ * name: 'Referral Bonus Rule',
22
+ * organizationId: '123e4567-e89b-12d3-a456-426614174001',
23
+ * startTime: '2024-01-01T00:00:00Z',
24
+ * type: 'Bonus',
25
+ * websiteId: '123e4567-e89b-12d3-a456-426614174002',
26
+ * });
27
+ * ```
10
28
  */
11
29
  create(body: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse> {
12
30
  return this._client.post('/api/loyalty/rules', { body, ...options });
@@ -14,6 +32,18 @@ export class Rules extends APIResource {
14
32
 
15
33
  /**
16
34
  * Update an existing Loyalty Rule
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const rule = await client.loyalty.rules.update(
39
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
40
+ * {
41
+ * amount: '10.5',
42
+ * endTime: '2024-12-31T23:59:00Z',
43
+ * name: 'Daily Rewards Program',
44
+ * },
45
+ * );
46
+ * ```
17
47
  */
18
48
  update(
19
49
  id: string,
@@ -25,6 +55,11 @@ export class Rules extends APIResource {
25
55
 
26
56
  /**
27
57
  * Retrieve configured loyalty rules with optional pagination and filters
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const rules = await client.loyalty.rules.list();
62
+ * ```
28
63
  */
29
64
  list(query?: RuleListParams, options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
30
65
  list(options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
@@ -40,17 +75,46 @@ export class Rules extends APIResource {
40
75
 
41
76
  /**
42
77
  * Delete an existing Loyalty Rule
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * const rule = await client.loyalty.rules.delete(
82
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
83
+ * );
84
+ * ```
43
85
  */
44
- delete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse> {
45
- return this._client.delete(`/api/loyalty/rules/${id}`, options);
86
+ delete(
87
+ id: string,
88
+ params?: RuleDeleteParams,
89
+ options?: Core.RequestOptions,
90
+ ): Core.APIPromise<RuleDeleteResponse>;
91
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse>;
92
+ delete(
93
+ id: string,
94
+ params: RuleDeleteParams | Core.RequestOptions = {},
95
+ options?: Core.RequestOptions,
96
+ ): Core.APIPromise<RuleDeleteResponse> {
97
+ if (isRequestOptions(params)) {
98
+ return this.delete(id, {}, params);
99
+ }
100
+ const { debitLoyaltyPoints } = params;
101
+ return this._client.delete(`/api/loyalty/rules/${id}`, { query: { debitLoyaltyPoints }, ...options });
46
102
  }
47
103
 
48
104
  /**
49
105
  * Verify a loyalty rule based on user action and reward them if applicable. This
50
- * endpoint currenlty onlu supports following rule types code_entry, text_input,
106
+ * endpoint currently only supports following rule types code_entry, text_input,
51
107
  * link_click, discord_member, connect_wallet, check_in, external_rule,
52
108
  * drip_x_follow, drip_x_new_tweet, drip_x_text_in_bio, drip_x_text_in_name,
53
- * drip_x_text_in_comment, drip_x_tweet, telegram_join
109
+ * drip_x_text_in_comment, drip_x_tweet, telegram_join, DiscordMessages,
110
+ * youtube_subscribers, youtube_comment, steam_wishlist
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * const response = await client.loyalty.rules.complete(
115
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
116
+ * );
117
+ * ```
54
118
  */
55
119
  complete(
56
120
  id: string,
@@ -71,8 +135,24 @@ export class Rules extends APIResource {
71
135
 
72
136
  /**
73
137
  * This will return the processing status of quests for a specific user
138
+ *
139
+ * @example
140
+ * ```ts
141
+ * const response = await client.loyalty.rules.getStatus();
142
+ * ```
74
143
  */
75
- status(query: RuleStatusParams, options?: Core.RequestOptions): Core.APIPromise<RuleStatusResponse> {
144
+ getStatus(
145
+ query?: RuleGetStatusParams,
146
+ options?: Core.RequestOptions,
147
+ ): Core.APIPromise<RuleGetStatusResponse>;
148
+ getStatus(options?: Core.RequestOptions): Core.APIPromise<RuleGetStatusResponse>;
149
+ getStatus(
150
+ query: RuleGetStatusParams | Core.RequestOptions = {},
151
+ options?: Core.RequestOptions,
152
+ ): Core.APIPromise<RuleGetStatusResponse> {
153
+ if (isRequestOptions(query)) {
154
+ return this.getStatus({}, query);
155
+ }
76
156
  return this._client.get('/api/loyalty/rules/status', { query, ...options });
77
157
  }
78
158
  }
@@ -184,7 +264,18 @@ export interface RuleCreateResponse {
184
264
  | 'twitter_follow'
185
265
  | 'twitter_followers'
186
266
  | 'twitter_like'
187
- | 'twitter_post_hashtag';
267
+ | 'twitter_post_hashtag'
268
+ | 'quiz'
269
+ | 'poll'
270
+ | 'steam_wishlist'
271
+ | 'liquidity_uniswap_v2'
272
+ | 'liquidity_uniswap_v3'
273
+ | 'points_airdrop'
274
+ | 'youtube_subscribers'
275
+ | 'youtube_comment'
276
+ | 'shopify_spend'
277
+ | 'swap'
278
+ | 'tiktok_post';
188
279
 
189
280
  /**
190
281
  * Unique identifier for the associated website
@@ -221,6 +312,11 @@ export interface RuleCreateResponse {
221
312
  */
222
313
  description?: string;
223
314
 
315
+ /**
316
+ * ID of the external integration
317
+ */
318
+ externalIntegrationId?: string | null;
319
+
224
320
  /**
225
321
  * Whether to hide this rule in the user interface
226
322
  */
@@ -229,51 +325,95 @@ export interface RuleCreateResponse {
229
325
  /**
230
326
  * Interval between rule executions
231
327
  */
232
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
328
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
233
329
 
234
330
  /**
235
331
  * Whether this rule is mandatory
236
332
  */
237
333
  isRequired?: boolean;
238
334
 
335
+ /**
336
+ * Unique identifier for the loyalty badge
337
+ */
338
+ loyaltyBadgeId?: string | null;
339
+
239
340
  /**
240
341
  * Unique identifier for the loyalty rule group
241
342
  */
242
343
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
243
344
 
345
+ /**
346
+ * URL for uploading loyalty user allotment via CSV
347
+ */
348
+ loyaltyUserAllotmentCsvUrl?: string;
349
+
350
+ /**
351
+ * The interval for the max amount. Available for the smart contract and external
352
+ * rules.
353
+ */
354
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
355
+
356
+ /**
357
+ * The maximum amount of points a user can earn per interval. Available for the
358
+ * smart contract and external rules.
359
+ */
360
+ maxAmountPerInterval?: number | null;
361
+
362
+ /**
363
+ * URL of the media to be displayed
364
+ */
365
+ mediaUrl?: string | null;
366
+
244
367
  /**
245
368
  * Blockchain network where the rule will apply
246
369
  */
247
370
  network?:
248
- | 'mainnet'
249
- | 'polygon'
250
- | 'polygon_mumbai'
251
- | 'optimism'
371
+ | 'abstract'
372
+ | 'abstractTestnet'
373
+ | 'apechain'
252
374
  | 'arbitrum'
253
- | 'binance'
254
- | 'bscTestnet'
255
375
  | 'avalanche'
256
376
  | 'avalancheFuji'
257
- | 'zksync'
258
- | 'fantom'
259
- | 'fantomTestnet'
260
377
  | 'base'
261
378
  | 'baseSepolia'
262
- | 'skaleNebula'
263
- | 'xai'
379
+ | 'berachain'
264
380
  | 'berachainArtio'
265
- | 'solana'
266
- | 'apechain'
267
- | 'flowMainnet'
381
+ | 'berachainBepolia'
382
+ | 'binance'
383
+ | 'bscTestnet'
268
384
  | 'campTestnet'
385
+ | 'fantom'
386
+ | 'fantomTestnet'
387
+ | 'flowMainnet'
388
+ | 'mainnet'
389
+ | 'optimism'
390
+ | 'polygon'
391
+ | 'polygon_mumbai'
392
+ | 'skaleNebula'
393
+ | 'solana'
394
+ | 'sophon'
395
+ | 'sophonTestnet'
269
396
  | 'sui'
397
+ | 'superseed'
398
+ | 'superseedSepolia'
270
399
  | 'vanar'
400
+ | 'xai'
401
+ | 'zksync'
402
+ | 'coti'
403
+ | 'cotiTestnet'
404
+ | 'morph'
405
+ | 'morphTestnet'
406
+ | 'morphHolesky'
407
+ | 'ultra'
408
+ | 'ultraTestnet'
409
+ | 'nitrograph'
271
410
  | 'sepolia'
272
411
  | 'optimism_sepolia'
273
412
  | 'arbitrumSepolia'
274
413
  | 'goerli'
275
414
  | 'optimism_goerli'
276
- | 'arbitrumGoerli';
415
+ | 'arbitrumGoerli'
416
+ | 'basecamp';
277
417
 
278
418
  /**
279
419
  * OAuth credentials associated with the rule
@@ -283,12 +423,17 @@ export interface RuleCreateResponse {
283
423
  /**
284
424
  * Type of reward issued by the rule
285
425
  */
286
- rewardType?: 'points' | 'multiplier';
426
+ rewardType?: 'points' | 'multiplier' | 'badge';
427
+
428
+ /**
429
+ * URL of the Shopify store
430
+ */
431
+ shopifyStoreUrl?: string | null;
287
432
 
288
433
  /**
289
- * Identifier for associated subscriptions
434
+ * Optional subscription id for the rule
290
435
  */
291
- subscriptionIdentifier?: string | null;
436
+ subscriptionId?: string | null;
292
437
  }
293
438
 
294
439
  export namespace RuleCreateResponse {
@@ -296,6 +441,11 @@ export namespace RuleCreateResponse {
296
441
  * Additional metadata for the loyalty rule
297
442
  */
298
443
  export interface Metadata {
444
+ /**
445
+ * Number of tokens per batch.
446
+ */
447
+ batchSize?: number | null;
448
+
299
449
  /**
300
450
  * Text displayed on the action button.
301
451
  */
@@ -326,6 +476,11 @@ export namespace RuleCreateResponse {
326
476
  */
327
477
  collection?: Array<Metadata.Collection>;
328
478
 
479
+ /**
480
+ * Conditions for completing the profile.
481
+ */
482
+ completeProfileConditions?: { [key: string]: boolean } | null;
483
+
329
484
  /**
330
485
  * Object containing details for the call-to-action.
331
486
  */
@@ -361,11 +516,21 @@ export namespace RuleCreateResponse {
361
516
  */
362
517
  enableVerifiedMultiplier?: boolean;
363
518
 
519
+ /**
520
+ * Fill source of the order for the token sale
521
+ */
522
+ fillSource?: string;
523
+
364
524
  /**
365
525
  * Percentage reward given to a user for their first referral.
366
526
  */
367
527
  firstReferralReward?: number | null;
368
528
 
529
+ /**
530
+ * Flag indicating whether the fill source is included.
531
+ */
532
+ hasFillSource?: boolean;
533
+
369
534
  /**
370
535
  * Indicates if the item has never been sold.
371
536
  */
@@ -391,11 +556,21 @@ export namespace RuleCreateResponse {
391
556
  */
392
557
  imageUrl?: string | null;
393
558
 
559
+ /**
560
+ * If enabled, the first transaction done on the platform will complete this rule
561
+ */
562
+ isCheckInOnEveryTxn?: boolean;
563
+
394
564
  /**
395
565
  * Indicates if the multiplier has been applied to rewards.
396
566
  */
397
567
  isMultiplierApplied?: boolean;
398
568
 
569
+ /**
570
+ * Flag indicating if the rule is restricted to new users.
571
+ */
572
+ isRestrictedToNewUsers?: boolean;
573
+
399
574
  /**
400
575
  * Flag indicating if rewards are applied retroactively.
401
576
  */
@@ -411,6 +586,11 @@ export namespace RuleCreateResponse {
411
586
  */
412
587
  link?: string | null;
413
588
 
589
+ /**
590
+ * Liquidity pool details.
591
+ */
592
+ liquidity?: Metadata.Liquidity;
593
+
414
594
  /**
415
595
  * Maximum quantity constraint for token holding.
416
596
  */
@@ -441,11 +621,36 @@ export namespace RuleCreateResponse {
441
621
  */
442
622
  onlyNonListed?: boolean;
443
623
 
624
+ /**
625
+ * Indicates if only existing users are rewarded.
626
+ */
627
+ onlyRewardExistingUser?: boolean;
628
+
629
+ /**
630
+ * give points for only one token ownership per contract
631
+ */
632
+ onlyRewardSingleTokenOwnership?: boolean | null;
633
+
444
634
  /**
445
635
  * Promotional code associated with the rule.
446
636
  */
447
637
  promoCode?: string;
448
638
 
639
+ /**
640
+ * URL of the CSV file containing promo codes.
641
+ */
642
+ promoCodeCsvUrl?: string;
643
+
644
+ /**
645
+ * Numbers of the promotional code to be generated.
646
+ */
647
+ promoCodeLength?: number | null;
648
+
649
+ /**
650
+ * Type of the promotional code.
651
+ */
652
+ promoCodeType?: 'code' | 'csv' | 'generate';
653
+
449
654
  /**
450
655
  * Array defining ranges and corresponding rewards.
451
656
  */
@@ -461,11 +666,32 @@ export namespace RuleCreateResponse {
461
666
  */
462
667
  referrerReward?: number | null;
463
668
 
669
+ /**
670
+ * Loyalty currency ID of the referrer reward.
671
+ */
672
+ referrerRewardLoyaltyCurrencyId?: string | null;
673
+
674
+ /**
675
+ * Flag indicating if the rule can also reward badges per range.
676
+ */
677
+ rewardBadgePerRange?: boolean;
678
+
679
+ /**
680
+ * Flag indicating if the reward is rewarded by batch.
681
+ */
682
+ rewardByBatch?: boolean | null;
683
+
464
684
  /**
465
685
  * Flag indicating if rewards are given per impression.
466
686
  */
467
687
  rewardPerImpression?: boolean | null;
468
688
 
689
+ /**
690
+ * Flag indicating if the rule should reward based on value of traded tokens
691
+ * instead of count.
692
+ */
693
+ rewardPerValue?: boolean;
694
+
469
695
  /**
470
696
  * Currency associated with sales.
471
697
  */
@@ -476,6 +702,11 @@ export namespace RuleCreateResponse {
476
702
  */
477
703
  secondReferralReward?: number | null;
478
704
 
705
+ /**
706
+ * Flag indicating if the multiplier is skipped.
707
+ */
708
+ skipMultiplier?: boolean | null;
709
+
479
710
  /**
480
711
  * Object containing details of the associated smart contract.
481
712
  */
@@ -490,14 +721,17 @@ export namespace RuleCreateResponse {
490
721
  * Social media platform associated with the rule.
491
722
  */
492
723
  socialPlatform?:
493
- | 'Twitch'
724
+ | 'Custom'
725
+ | 'Discord'
726
+ | 'EpicGames'
727
+ | 'Instagram'
728
+ | 'Steam'
729
+ | 'Telegram'
494
730
  | 'TikTok'
731
+ | 'Twitch'
495
732
  | 'X(Twitter)'
496
- | 'Instagram'
497
- | 'EpicGames'
498
733
  | 'YouTube'
499
- | 'Discord'
500
- | 'Custom'
734
+ | 'Google'
501
735
  | null;
502
736
 
503
737
  /**
@@ -510,11 +744,21 @@ export namespace RuleCreateResponse {
510
744
  */
511
745
  socialPlatformName?: string | null;
512
746
 
747
+ /**
748
+ * ID of the Steam app.
749
+ */
750
+ steamAppId?: string | null;
751
+
513
752
  /**
514
753
  * Array of streak milestones and corresponding rewards.
515
754
  */
516
755
  streakArray?: Array<Metadata.StreakArray> | null;
517
756
 
757
+ /**
758
+ * Metadata for swap loyalty rules
759
+ */
760
+ swap?: Metadata.Swap;
761
+
518
762
  /**
519
763
  * ID of the Telegram channel.
520
764
  */
@@ -530,6 +774,12 @@ export namespace RuleCreateResponse {
530
774
  */
531
775
  trackAllContracts?: boolean | null;
532
776
 
777
+ /**
778
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
779
+ * completed once the progress is 100%.
780
+ */
781
+ trackProgress?: boolean | null;
782
+
533
783
  /**
534
784
  * URL of the associated Twitter account.
535
785
  */
@@ -573,7 +823,17 @@ export namespace RuleCreateResponse {
573
823
  /**
574
824
  * Type of wallet associated with the rule.
575
825
  */
576
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
826
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
827
+
828
+ /**
829
+ * ID of the Youtube channel.
830
+ */
831
+ youtubeChannelId?: string | null;
832
+
833
+ /**
834
+ * ID of the Youtube video.
835
+ */
836
+ youtubeVideoId?: string | null;
577
837
  }
578
838
 
579
839
  export namespace Metadata {
@@ -592,35 +852,52 @@ export namespace RuleCreateResponse {
592
852
  * Blockchain network of the collection.
593
853
  */
594
854
  network?:
595
- | 'mainnet'
596
- | 'polygon'
597
- | 'polygon_mumbai'
598
- | 'optimism'
855
+ | 'abstract'
856
+ | 'abstractTestnet'
857
+ | 'apechain'
599
858
  | 'arbitrum'
600
- | 'binance'
601
- | 'bscTestnet'
602
859
  | 'avalanche'
603
860
  | 'avalancheFuji'
604
- | 'zksync'
605
- | 'fantom'
606
- | 'fantomTestnet'
607
861
  | 'base'
608
862
  | 'baseSepolia'
609
- | 'skaleNebula'
610
- | 'xai'
863
+ | 'berachain'
611
864
  | 'berachainArtio'
612
- | 'solana'
613
- | 'apechain'
614
- | 'flowMainnet'
865
+ | 'berachainBepolia'
866
+ | 'binance'
867
+ | 'bscTestnet'
615
868
  | 'campTestnet'
869
+ | 'fantom'
870
+ | 'fantomTestnet'
871
+ | 'flowMainnet'
872
+ | 'mainnet'
873
+ | 'optimism'
874
+ | 'polygon'
875
+ | 'polygon_mumbai'
876
+ | 'skaleNebula'
877
+ | 'solana'
878
+ | 'sophon'
879
+ | 'sophonTestnet'
616
880
  | 'sui'
881
+ | 'superseed'
882
+ | 'superseedSepolia'
617
883
  | 'vanar'
884
+ | 'xai'
885
+ | 'zksync'
886
+ | 'coti'
887
+ | 'cotiTestnet'
888
+ | 'morph'
889
+ | 'morphTestnet'
890
+ | 'morphHolesky'
891
+ | 'ultra'
892
+ | 'ultraTestnet'
893
+ | 'nitrograph'
618
894
  | 'sepolia'
619
895
  | 'optimism_sepolia'
620
896
  | 'arbitrumSepolia'
621
897
  | 'goerli'
622
898
  | 'optimism_goerli'
623
- | 'arbitrumGoerli';
899
+ | 'arbitrumGoerli'
900
+ | 'basecamp';
624
901
  }
625
902
 
626
903
  /**
@@ -666,6 +943,11 @@ export namespace RuleCreateResponse {
666
943
  * Array of emojis used in the channel.
667
944
  */
668
945
  emojis?: Array<Channel.Emoji>;
946
+
947
+ /**
948
+ * Phrase of text to be present in the discord message
949
+ */
950
+ text?: string;
669
951
  }
670
952
 
671
953
  export namespace Channel {
@@ -692,6 +974,103 @@ export namespace RuleCreateResponse {
692
974
  id: string;
693
975
  }
694
976
 
977
+ /**
978
+ * Liquidity pool details.
979
+ */
980
+ export interface Liquidity {
981
+ /**
982
+ * Calculation type of the liquidity pool.
983
+ */
984
+ calculationType?: 'fixed' | 'custom';
985
+
986
+ /**
987
+ * Custom function to calculate the the reward amount based on the liquidity
988
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
989
+ * USD.
990
+ */
991
+ customFunction?: string;
992
+
993
+ /**
994
+ * Liquidity provided per day in USD
995
+ */
996
+ liquidityPerDay?: number;
997
+
998
+ /**
999
+ * Blockchain network of the liquidity pool.
1000
+ */
1001
+ network?:
1002
+ | 'abstract'
1003
+ | 'abstractTestnet'
1004
+ | 'apechain'
1005
+ | 'arbitrum'
1006
+ | 'avalanche'
1007
+ | 'avalancheFuji'
1008
+ | 'base'
1009
+ | 'baseSepolia'
1010
+ | 'berachain'
1011
+ | 'berachainArtio'
1012
+ | 'berachainBepolia'
1013
+ | 'binance'
1014
+ | 'bscTestnet'
1015
+ | 'campTestnet'
1016
+ | 'fantom'
1017
+ | 'fantomTestnet'
1018
+ | 'flowMainnet'
1019
+ | 'mainnet'
1020
+ | 'optimism'
1021
+ | 'polygon'
1022
+ | 'polygon_mumbai'
1023
+ | 'skaleNebula'
1024
+ | 'solana'
1025
+ | 'sophon'
1026
+ | 'sophonTestnet'
1027
+ | 'sui'
1028
+ | 'superseed'
1029
+ | 'superseedSepolia'
1030
+ | 'vanar'
1031
+ | 'xai'
1032
+ | 'zksync'
1033
+ | 'coti'
1034
+ | 'cotiTestnet'
1035
+ | 'morph'
1036
+ | 'morphTestnet'
1037
+ | 'morphHolesky'
1038
+ | 'ultra'
1039
+ | 'ultraTestnet'
1040
+ | 'nitrograph'
1041
+ | 'sepolia'
1042
+ | 'optimism_sepolia'
1043
+ | 'arbitrumSepolia'
1044
+ | 'goerli'
1045
+ | 'optimism_goerli'
1046
+ | 'arbitrumGoerli'
1047
+ | 'basecamp';
1048
+
1049
+ /**
1050
+ * Indicates if only in-range liquidity is rewarded.
1051
+ */
1052
+ onlyRewardInRangeLiquidity?: boolean;
1053
+
1054
+ /**
1055
+ * Array of liquidity pools associated with the rule.
1056
+ */
1057
+ pools?: Array<Liquidity.Pool>;
1058
+
1059
+ /**
1060
+ * Protocol of the liquidity pool.
1061
+ */
1062
+ protocol?: string;
1063
+ }
1064
+
1065
+ export namespace Liquidity {
1066
+ export interface Pool {
1067
+ /**
1068
+ * Unique identifier of the liquidity pool.
1069
+ */
1070
+ id: string;
1071
+ }
1072
+ }
1073
+
695
1074
  export interface Range {
696
1075
  /**
697
1076
  * Reward amount for this range.
@@ -707,6 +1086,16 @@ export namespace RuleCreateResponse {
707
1086
  * Start value of the range.
708
1087
  */
709
1088
  startRange: number;
1089
+
1090
+ /**
1091
+ * ID of the loyalty badge for this range.
1092
+ */
1093
+ loyaltyBadgeId?: string;
1094
+
1095
+ /**
1096
+ * Amount of the loyalty multiplier for this range.
1097
+ */
1098
+ loyaltyMultiplierAmount?: number;
710
1099
  }
711
1100
 
712
1101
  /**
@@ -759,20 +1148,15 @@ export namespace RuleCreateResponse {
759
1148
  * Object containing details of the associated smart contract.
760
1149
  */
761
1150
  export interface SmartContract {
762
- /**
763
- * ABI of the smart contract.
764
- */
765
- abi?: string | null;
766
-
767
1151
  /**
768
1152
  * Mapping of addresses for the smart contract.
769
1153
  */
770
1154
  addressMapping?: string | null;
771
1155
 
772
1156
  /**
773
- * Array of bonus details applied to the rule.
1157
+ * Object containing details of the amount multiplier from the event.
774
1158
  */
775
- bonus?: Array<SmartContract.Bonus> | null;
1159
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
776
1160
 
777
1161
  /**
778
1162
  * ID of the smart contract.
@@ -784,68 +1168,31 @@ export namespace RuleCreateResponse {
784
1168
  */
785
1169
  criteria?: 'everyEvent' | 'byParameter' | null;
786
1170
 
787
- /**
788
- * Time range applied to the rule.
789
- */
790
- customRange?: SmartContract.CustomRange | null;
791
-
792
1171
  /**
793
1172
  * Event emitted by the smart contract.
794
1173
  */
795
1174
  event?: string | null;
796
1175
 
797
- /**
798
- * Maximum value allowed for the parameter.
799
- */
800
- max?: number | null;
801
-
802
1176
  /**
803
1177
  * Array of parameters for the smart contract.
804
1178
  */
805
1179
  params?: Array<SmartContract.Param> | null;
806
1180
 
807
1181
  /**
808
- * Flag indicating if a bonus is applied.
809
- */
810
- withBonus?: boolean | null;
811
-
812
- /**
813
- * Flag indicating if a custom range is applied.
814
- */
815
- withCustomRange?: boolean | null;
816
-
817
- /**
818
- * Flag indicating if a maximum limit is applied.
1182
+ * Type of the smart contract interaction.
819
1183
  */
820
- withMax?: boolean | null;
1184
+ type?: 'function' | 'event' | null;
821
1185
  }
822
1186
 
823
1187
  export namespace SmartContract {
824
- export interface Bonus {
825
- /**
826
- * Amount of the bonus.
827
- */
828
- amount?: number | null;
829
-
830
- /**
831
- * Number of times the bonus is applied.
832
- */
833
- count?: number | null;
834
- }
835
-
836
1188
  /**
837
- * Time range applied to the rule.
1189
+ * Object containing details of the amount multiplier from the event.
838
1190
  */
839
- export interface CustomRange {
840
- /**
841
- * End time of the custom range.
842
- */
843
- endsAt?: string | null;
844
-
1191
+ export interface AmountMultiplier {
845
1192
  /**
846
- * Start time of the custom range.
1193
+ * Mapping of the value for the smart contract.
847
1194
  */
848
- startsAt?: string | null;
1195
+ valueMapping?: string | null;
849
1196
  }
850
1197
 
851
1198
  export interface Param {
@@ -889,6 +1236,33 @@ export namespace RuleCreateResponse {
889
1236
  */
890
1237
  streakMilestone: number;
891
1238
  }
1239
+
1240
+ /**
1241
+ * Metadata for swap loyalty rules
1242
+ */
1243
+ export interface Swap {
1244
+ provider?: 'any' | 'relay' | 'lifi';
1245
+
1246
+ relayReferrerId?: string;
1247
+
1248
+ requireCrossChainSwap?: boolean;
1249
+
1250
+ swappedToChain?: 'any' | number | string;
1251
+
1252
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1253
+
1254
+ tokenMode?: 'any' | 'specific';
1255
+
1256
+ trackTokenAmount?: boolean;
1257
+ }
1258
+
1259
+ export namespace Swap {
1260
+ export interface SwappedToToken {
1261
+ address: string;
1262
+
1263
+ chainId: string;
1264
+ }
1265
+ }
892
1266
  }
893
1267
 
894
1268
  export interface Collection {
@@ -901,35 +1275,57 @@ export namespace RuleCreateResponse {
901
1275
  * Blockchain network for the collection
902
1276
  */
903
1277
  network:
904
- | 'mainnet'
905
- | 'polygon'
906
- | 'polygon_mumbai'
907
- | 'optimism'
1278
+ | 'abstract'
1279
+ | 'abstractTestnet'
1280
+ | 'apechain'
908
1281
  | 'arbitrum'
909
- | 'binance'
910
- | 'bscTestnet'
911
1282
  | 'avalanche'
912
1283
  | 'avalancheFuji'
913
- | 'zksync'
914
- | 'fantom'
915
- | 'fantomTestnet'
916
1284
  | 'base'
917
1285
  | 'baseSepolia'
918
- | 'skaleNebula'
919
- | 'xai'
1286
+ | 'berachain'
920
1287
  | 'berachainArtio'
921
- | 'solana'
922
- | 'apechain'
923
- | 'flowMainnet'
1288
+ | 'berachainBepolia'
1289
+ | 'binance'
1290
+ | 'bscTestnet'
924
1291
  | 'campTestnet'
1292
+ | 'fantom'
1293
+ | 'fantomTestnet'
1294
+ | 'flowMainnet'
1295
+ | 'mainnet'
1296
+ | 'optimism'
1297
+ | 'polygon'
1298
+ | 'polygon_mumbai'
1299
+ | 'skaleNebula'
1300
+ | 'solana'
1301
+ | 'sophon'
1302
+ | 'sophonTestnet'
925
1303
  | 'sui'
1304
+ | 'superseed'
1305
+ | 'superseedSepolia'
926
1306
  | 'vanar'
1307
+ | 'xai'
1308
+ | 'zksync'
1309
+ | 'coti'
1310
+ | 'cotiTestnet'
1311
+ | 'morph'
1312
+ | 'morphTestnet'
1313
+ | 'morphHolesky'
1314
+ | 'ultra'
1315
+ | 'ultraTestnet'
1316
+ | 'nitrograph'
927
1317
  | 'sepolia'
928
1318
  | 'optimism_sepolia'
929
1319
  | 'arbitrumSepolia'
930
1320
  | 'goerli'
931
1321
  | 'optimism_goerli'
932
- | 'arbitrumGoerli';
1322
+ | 'arbitrumGoerli'
1323
+ | 'basecamp';
1324
+
1325
+ /**
1326
+ * Symbol of the collection.
1327
+ */
1328
+ symbol?: string;
933
1329
  }
934
1330
  }
935
1331
 
@@ -941,41 +1337,16 @@ export interface RuleUpdateResponse {
941
1337
  */
942
1338
  amount: unknown;
943
1339
 
944
- /**
945
- * Effective end time of the rule
946
- */
947
- effectiveEndTime: string | null;
948
-
949
- /**
950
- * Effective start time of the rule
951
- */
952
- effectiveStartTime: string | null;
953
-
954
1340
  /**
955
1341
  * End time for the loyalty rule
956
1342
  */
957
1343
  endTime: string | null;
958
1344
 
959
- /**
960
- * Frequency of the rule execution
961
- */
962
- frequency: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
963
-
964
- /**
965
- * Additional metadata for the loyalty rule
966
- */
967
- metadata: RuleUpdateResponse.Metadata;
968
-
969
1345
  /**
970
1346
  * Name of the loyalty rule
971
1347
  */
972
1348
  name: string;
973
1349
 
974
- /**
975
- * Start time for the loyalty rule
976
- */
977
- startTime: string | null;
978
-
979
1350
  /**
980
1351
  * Blockchain address of the associated collection
981
1352
  */
@@ -1001,6 +1372,26 @@ export interface RuleUpdateResponse {
1001
1372
  */
1002
1373
  description?: string;
1003
1374
 
1375
+ /**
1376
+ * Effective end time of the rule
1377
+ */
1378
+ effectiveEndTime?: string | null;
1379
+
1380
+ /**
1381
+ * Effective start time of the rule
1382
+ */
1383
+ effectiveStartTime?: string | null;
1384
+
1385
+ /**
1386
+ * ID of the external integration
1387
+ */
1388
+ externalIntegrationId?: string | null;
1389
+
1390
+ /**
1391
+ * Frequency of the rule execution
1392
+ */
1393
+ frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
1394
+
1004
1395
  /**
1005
1396
  * Whether to hide this rule in the user interface
1006
1397
  */
@@ -1009,7 +1400,7 @@ export interface RuleUpdateResponse {
1009
1400
  /**
1010
1401
  * Time interval for recurring rule execution
1011
1402
  */
1012
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
1403
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1013
1404
 
1014
1405
  /**
1015
1406
  * Whether this rule is required for participation
@@ -1021,39 +1412,78 @@ export interface RuleUpdateResponse {
1021
1412
  */
1022
1413
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
1023
1414
 
1415
+ /**
1416
+ * The interval for the max amount. Available for the smart contract and external
1417
+ * rules.
1418
+ */
1419
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
1420
+
1421
+ /**
1422
+ * The maximum amount of points a user can earn per interval. Available for the
1423
+ * smart contract and external rules.
1424
+ */
1425
+ maxAmountPerInterval?: number | null;
1426
+
1427
+ /**
1428
+ * URL of the media to be displayed
1429
+ */
1430
+ mediaUrl?: string | null;
1431
+
1432
+ /**
1433
+ * Additional metadata for the loyalty rule
1434
+ */
1435
+ metadata?: RuleUpdateResponse.Metadata;
1436
+
1024
1437
  /**
1025
1438
  * Blockchain network where the rule will apply
1026
1439
  */
1027
1440
  network?:
1028
- | 'mainnet'
1029
- | 'polygon'
1030
- | 'polygon_mumbai'
1031
- | 'optimism'
1441
+ | 'abstract'
1442
+ | 'abstractTestnet'
1443
+ | 'apechain'
1032
1444
  | 'arbitrum'
1033
- | 'binance'
1034
- | 'bscTestnet'
1035
1445
  | 'avalanche'
1036
1446
  | 'avalancheFuji'
1037
- | 'zksync'
1038
- | 'fantom'
1039
- | 'fantomTestnet'
1040
1447
  | 'base'
1041
1448
  | 'baseSepolia'
1042
- | 'skaleNebula'
1043
- | 'xai'
1449
+ | 'berachain'
1044
1450
  | 'berachainArtio'
1045
- | 'solana'
1046
- | 'apechain'
1047
- | 'flowMainnet'
1451
+ | 'berachainBepolia'
1452
+ | 'binance'
1453
+ | 'bscTestnet'
1048
1454
  | 'campTestnet'
1455
+ | 'fantom'
1456
+ | 'fantomTestnet'
1457
+ | 'flowMainnet'
1458
+ | 'mainnet'
1459
+ | 'optimism'
1460
+ | 'polygon'
1461
+ | 'polygon_mumbai'
1462
+ | 'skaleNebula'
1463
+ | 'solana'
1464
+ | 'sophon'
1465
+ | 'sophonTestnet'
1049
1466
  | 'sui'
1467
+ | 'superseed'
1468
+ | 'superseedSepolia'
1050
1469
  | 'vanar'
1470
+ | 'xai'
1471
+ | 'zksync'
1472
+ | 'coti'
1473
+ | 'cotiTestnet'
1474
+ | 'morph'
1475
+ | 'morphTestnet'
1476
+ | 'morphHolesky'
1477
+ | 'ultra'
1478
+ | 'ultraTestnet'
1479
+ | 'nitrograph'
1051
1480
  | 'sepolia'
1052
1481
  | 'optimism_sepolia'
1053
1482
  | 'arbitrumSepolia'
1054
1483
  | 'goerli'
1055
1484
  | 'optimism_goerli'
1056
- | 'arbitrumGoerli';
1485
+ | 'arbitrumGoerli'
1486
+ | 'basecamp';
1057
1487
 
1058
1488
  /**
1059
1489
  * ID for associated OAuth credentials
@@ -1063,19 +1493,97 @@ export interface RuleUpdateResponse {
1063
1493
  /**
1064
1494
  * Type of reward issued by this rule
1065
1495
  */
1066
- rewardType?: 'points' | 'multiplier';
1496
+ rewardType?: 'points' | 'multiplier' | 'badge';
1497
+
1498
+ /**
1499
+ * URL of the Shopify store
1500
+ */
1501
+ shopifyStoreUrl?: string | null;
1067
1502
 
1068
1503
  /**
1069
- * Optional subscription identifier for the rule
1504
+ * Start time for the loyalty rule
1505
+ */
1506
+ startTime?: string | null;
1507
+
1508
+ /**
1509
+ * Optional subscription id for the rule
1070
1510
  */
1071
- subscriptionIdentifier?: string | null;
1511
+ subscriptionId?: string | null;
1072
1512
  }
1073
1513
 
1074
1514
  export namespace RuleUpdateResponse {
1515
+ export interface Collection {
1516
+ /**
1517
+ * Blockchain address of the collection
1518
+ */
1519
+ address: string;
1520
+
1521
+ /**
1522
+ * Blockchain network for the collection
1523
+ */
1524
+ network:
1525
+ | 'abstract'
1526
+ | 'abstractTestnet'
1527
+ | 'apechain'
1528
+ | 'arbitrum'
1529
+ | 'avalanche'
1530
+ | 'avalancheFuji'
1531
+ | 'base'
1532
+ | 'baseSepolia'
1533
+ | 'berachain'
1534
+ | 'berachainArtio'
1535
+ | 'berachainBepolia'
1536
+ | 'binance'
1537
+ | 'bscTestnet'
1538
+ | 'campTestnet'
1539
+ | 'fantom'
1540
+ | 'fantomTestnet'
1541
+ | 'flowMainnet'
1542
+ | 'mainnet'
1543
+ | 'optimism'
1544
+ | 'polygon'
1545
+ | 'polygon_mumbai'
1546
+ | 'skaleNebula'
1547
+ | 'solana'
1548
+ | 'sophon'
1549
+ | 'sophonTestnet'
1550
+ | 'sui'
1551
+ | 'superseed'
1552
+ | 'superseedSepolia'
1553
+ | 'vanar'
1554
+ | 'xai'
1555
+ | 'zksync'
1556
+ | 'coti'
1557
+ | 'cotiTestnet'
1558
+ | 'morph'
1559
+ | 'morphTestnet'
1560
+ | 'morphHolesky'
1561
+ | 'ultra'
1562
+ | 'ultraTestnet'
1563
+ | 'nitrograph'
1564
+ | 'sepolia'
1565
+ | 'optimism_sepolia'
1566
+ | 'arbitrumSepolia'
1567
+ | 'goerli'
1568
+ | 'optimism_goerli'
1569
+ | 'arbitrumGoerli'
1570
+ | 'basecamp';
1571
+
1572
+ /**
1573
+ * Symbol of the collection.
1574
+ */
1575
+ symbol?: string;
1576
+ }
1577
+
1075
1578
  /**
1076
1579
  * Additional metadata for the loyalty rule
1077
1580
  */
1078
1581
  export interface Metadata {
1582
+ /**
1583
+ * Number of tokens per batch.
1584
+ */
1585
+ batchSize?: number | null;
1586
+
1079
1587
  /**
1080
1588
  * Text displayed on the action button.
1081
1589
  */
@@ -1106,6 +1614,11 @@ export namespace RuleUpdateResponse {
1106
1614
  */
1107
1615
  collection?: Array<Metadata.Collection>;
1108
1616
 
1617
+ /**
1618
+ * Conditions for completing the profile.
1619
+ */
1620
+ completeProfileConditions?: { [key: string]: boolean } | null;
1621
+
1109
1622
  /**
1110
1623
  * Object containing details for the call-to-action.
1111
1624
  */
@@ -1141,11 +1654,21 @@ export namespace RuleUpdateResponse {
1141
1654
  */
1142
1655
  enableVerifiedMultiplier?: boolean;
1143
1656
 
1657
+ /**
1658
+ * Fill source of the order for the token sale
1659
+ */
1660
+ fillSource?: string;
1661
+
1144
1662
  /**
1145
1663
  * Percentage reward given to a user for their first referral.
1146
1664
  */
1147
1665
  firstReferralReward?: number | null;
1148
1666
 
1667
+ /**
1668
+ * Flag indicating whether the fill source is included.
1669
+ */
1670
+ hasFillSource?: boolean;
1671
+
1149
1672
  /**
1150
1673
  * Indicates if the item has never been sold.
1151
1674
  */
@@ -1171,11 +1694,21 @@ export namespace RuleUpdateResponse {
1171
1694
  */
1172
1695
  imageUrl?: string | null;
1173
1696
 
1697
+ /**
1698
+ * If enabled, the first transaction done on the platform will complete this rule
1699
+ */
1700
+ isCheckInOnEveryTxn?: boolean;
1701
+
1174
1702
  /**
1175
1703
  * Indicates if the multiplier has been applied to rewards.
1176
1704
  */
1177
1705
  isMultiplierApplied?: boolean;
1178
1706
 
1707
+ /**
1708
+ * Flag indicating if the rule is restricted to new users.
1709
+ */
1710
+ isRestrictedToNewUsers?: boolean;
1711
+
1179
1712
  /**
1180
1713
  * Flag indicating if rewards are applied retroactively.
1181
1714
  */
@@ -1191,6 +1724,11 @@ export namespace RuleUpdateResponse {
1191
1724
  */
1192
1725
  link?: string | null;
1193
1726
 
1727
+ /**
1728
+ * Liquidity pool details.
1729
+ */
1730
+ liquidity?: Metadata.Liquidity;
1731
+
1194
1732
  /**
1195
1733
  * Maximum quantity constraint for token holding.
1196
1734
  */
@@ -1221,11 +1759,36 @@ export namespace RuleUpdateResponse {
1221
1759
  */
1222
1760
  onlyNonListed?: boolean;
1223
1761
 
1762
+ /**
1763
+ * Indicates if only existing users are rewarded.
1764
+ */
1765
+ onlyRewardExistingUser?: boolean;
1766
+
1767
+ /**
1768
+ * give points for only one token ownership per contract
1769
+ */
1770
+ onlyRewardSingleTokenOwnership?: boolean | null;
1771
+
1224
1772
  /**
1225
1773
  * Promotional code associated with the rule.
1226
1774
  */
1227
1775
  promoCode?: string;
1228
1776
 
1777
+ /**
1778
+ * URL of the CSV file containing promo codes.
1779
+ */
1780
+ promoCodeCsvUrl?: string;
1781
+
1782
+ /**
1783
+ * Numbers of the promotional code to be generated.
1784
+ */
1785
+ promoCodeLength?: number | null;
1786
+
1787
+ /**
1788
+ * Type of the promotional code.
1789
+ */
1790
+ promoCodeType?: 'code' | 'csv' | 'generate';
1791
+
1229
1792
  /**
1230
1793
  * Array defining ranges and corresponding rewards.
1231
1794
  */
@@ -1241,11 +1804,32 @@ export namespace RuleUpdateResponse {
1241
1804
  */
1242
1805
  referrerReward?: number | null;
1243
1806
 
1807
+ /**
1808
+ * Loyalty currency ID of the referrer reward.
1809
+ */
1810
+ referrerRewardLoyaltyCurrencyId?: string | null;
1811
+
1812
+ /**
1813
+ * Flag indicating if the rule can also reward badges per range.
1814
+ */
1815
+ rewardBadgePerRange?: boolean;
1816
+
1817
+ /**
1818
+ * Flag indicating if the reward is rewarded by batch.
1819
+ */
1820
+ rewardByBatch?: boolean | null;
1821
+
1244
1822
  /**
1245
1823
  * Flag indicating if rewards are given per impression.
1246
1824
  */
1247
1825
  rewardPerImpression?: boolean | null;
1248
1826
 
1827
+ /**
1828
+ * Flag indicating if the rule should reward based on value of traded tokens
1829
+ * instead of count.
1830
+ */
1831
+ rewardPerValue?: boolean;
1832
+
1249
1833
  /**
1250
1834
  * Currency associated with sales.
1251
1835
  */
@@ -1256,6 +1840,11 @@ export namespace RuleUpdateResponse {
1256
1840
  */
1257
1841
  secondReferralReward?: number | null;
1258
1842
 
1843
+ /**
1844
+ * Flag indicating if the multiplier is skipped.
1845
+ */
1846
+ skipMultiplier?: boolean | null;
1847
+
1259
1848
  /**
1260
1849
  * Object containing details of the associated smart contract.
1261
1850
  */
@@ -1270,14 +1859,17 @@ export namespace RuleUpdateResponse {
1270
1859
  * Social media platform associated with the rule.
1271
1860
  */
1272
1861
  socialPlatform?:
1273
- | 'Twitch'
1862
+ | 'Custom'
1863
+ | 'Discord'
1864
+ | 'EpicGames'
1865
+ | 'Instagram'
1866
+ | 'Steam'
1867
+ | 'Telegram'
1274
1868
  | 'TikTok'
1869
+ | 'Twitch'
1275
1870
  | 'X(Twitter)'
1276
- | 'Instagram'
1277
- | 'EpicGames'
1278
1871
  | 'YouTube'
1279
- | 'Discord'
1280
- | 'Custom'
1872
+ | 'Google'
1281
1873
  | null;
1282
1874
 
1283
1875
  /**
@@ -1290,11 +1882,21 @@ export namespace RuleUpdateResponse {
1290
1882
  */
1291
1883
  socialPlatformName?: string | null;
1292
1884
 
1885
+ /**
1886
+ * ID of the Steam app.
1887
+ */
1888
+ steamAppId?: string | null;
1889
+
1293
1890
  /**
1294
1891
  * Array of streak milestones and corresponding rewards.
1295
1892
  */
1296
1893
  streakArray?: Array<Metadata.StreakArray> | null;
1297
1894
 
1895
+ /**
1896
+ * Metadata for swap loyalty rules
1897
+ */
1898
+ swap?: Metadata.Swap;
1899
+
1298
1900
  /**
1299
1901
  * ID of the Telegram channel.
1300
1902
  */
@@ -1310,6 +1912,12 @@ export namespace RuleUpdateResponse {
1310
1912
  */
1311
1913
  trackAllContracts?: boolean | null;
1312
1914
 
1915
+ /**
1916
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
1917
+ * completed once the progress is 100%.
1918
+ */
1919
+ trackProgress?: boolean | null;
1920
+
1313
1921
  /**
1314
1922
  * URL of the associated Twitter account.
1315
1923
  */
@@ -1353,7 +1961,17 @@ export namespace RuleUpdateResponse {
1353
1961
  /**
1354
1962
  * Type of wallet associated with the rule.
1355
1963
  */
1356
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
1964
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
1965
+
1966
+ /**
1967
+ * ID of the Youtube channel.
1968
+ */
1969
+ youtubeChannelId?: string | null;
1970
+
1971
+ /**
1972
+ * ID of the Youtube video.
1973
+ */
1974
+ youtubeVideoId?: string | null;
1357
1975
  }
1358
1976
 
1359
1977
  export namespace Metadata {
@@ -1372,35 +1990,52 @@ export namespace RuleUpdateResponse {
1372
1990
  * Blockchain network of the collection.
1373
1991
  */
1374
1992
  network?:
1375
- | 'mainnet'
1376
- | 'polygon'
1377
- | 'polygon_mumbai'
1378
- | 'optimism'
1993
+ | 'abstract'
1994
+ | 'abstractTestnet'
1995
+ | 'apechain'
1379
1996
  | 'arbitrum'
1380
- | 'binance'
1381
- | 'bscTestnet'
1382
1997
  | 'avalanche'
1383
1998
  | 'avalancheFuji'
1384
- | 'zksync'
1385
- | 'fantom'
1386
- | 'fantomTestnet'
1387
1999
  | 'base'
1388
2000
  | 'baseSepolia'
1389
- | 'skaleNebula'
1390
- | 'xai'
2001
+ | 'berachain'
1391
2002
  | 'berachainArtio'
1392
- | 'solana'
1393
- | 'apechain'
1394
- | 'flowMainnet'
2003
+ | 'berachainBepolia'
2004
+ | 'binance'
2005
+ | 'bscTestnet'
1395
2006
  | 'campTestnet'
2007
+ | 'fantom'
2008
+ | 'fantomTestnet'
2009
+ | 'flowMainnet'
2010
+ | 'mainnet'
2011
+ | 'optimism'
2012
+ | 'polygon'
2013
+ | 'polygon_mumbai'
2014
+ | 'skaleNebula'
2015
+ | 'solana'
2016
+ | 'sophon'
2017
+ | 'sophonTestnet'
1396
2018
  | 'sui'
2019
+ | 'superseed'
2020
+ | 'superseedSepolia'
1397
2021
  | 'vanar'
2022
+ | 'xai'
2023
+ | 'zksync'
2024
+ | 'coti'
2025
+ | 'cotiTestnet'
2026
+ | 'morph'
2027
+ | 'morphTestnet'
2028
+ | 'morphHolesky'
2029
+ | 'ultra'
2030
+ | 'ultraTestnet'
2031
+ | 'nitrograph'
1398
2032
  | 'sepolia'
1399
2033
  | 'optimism_sepolia'
1400
2034
  | 'arbitrumSepolia'
1401
2035
  | 'goerli'
1402
2036
  | 'optimism_goerli'
1403
- | 'arbitrumGoerli';
2037
+ | 'arbitrumGoerli'
2038
+ | 'basecamp';
1404
2039
  }
1405
2040
 
1406
2041
  /**
@@ -1446,6 +2081,11 @@ export namespace RuleUpdateResponse {
1446
2081
  * Array of emojis used in the channel.
1447
2082
  */
1448
2083
  emojis?: Array<Channel.Emoji>;
2084
+
2085
+ /**
2086
+ * Phrase of text to be present in the discord message
2087
+ */
2088
+ text?: string;
1449
2089
  }
1450
2090
 
1451
2091
  export namespace Channel {
@@ -1472,6 +2112,103 @@ export namespace RuleUpdateResponse {
1472
2112
  id: string;
1473
2113
  }
1474
2114
 
2115
+ /**
2116
+ * Liquidity pool details.
2117
+ */
2118
+ export interface Liquidity {
2119
+ /**
2120
+ * Calculation type of the liquidity pool.
2121
+ */
2122
+ calculationType?: 'fixed' | 'custom';
2123
+
2124
+ /**
2125
+ * Custom function to calculate the the reward amount based on the liquidity
2126
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2127
+ * USD.
2128
+ */
2129
+ customFunction?: string;
2130
+
2131
+ /**
2132
+ * Liquidity provided per day in USD
2133
+ */
2134
+ liquidityPerDay?: number;
2135
+
2136
+ /**
2137
+ * Blockchain network of the liquidity pool.
2138
+ */
2139
+ network?:
2140
+ | 'abstract'
2141
+ | 'abstractTestnet'
2142
+ | 'apechain'
2143
+ | 'arbitrum'
2144
+ | 'avalanche'
2145
+ | 'avalancheFuji'
2146
+ | 'base'
2147
+ | 'baseSepolia'
2148
+ | 'berachain'
2149
+ | 'berachainArtio'
2150
+ | 'berachainBepolia'
2151
+ | 'binance'
2152
+ | 'bscTestnet'
2153
+ | 'campTestnet'
2154
+ | 'fantom'
2155
+ | 'fantomTestnet'
2156
+ | 'flowMainnet'
2157
+ | 'mainnet'
2158
+ | 'optimism'
2159
+ | 'polygon'
2160
+ | 'polygon_mumbai'
2161
+ | 'skaleNebula'
2162
+ | 'solana'
2163
+ | 'sophon'
2164
+ | 'sophonTestnet'
2165
+ | 'sui'
2166
+ | 'superseed'
2167
+ | 'superseedSepolia'
2168
+ | 'vanar'
2169
+ | 'xai'
2170
+ | 'zksync'
2171
+ | 'coti'
2172
+ | 'cotiTestnet'
2173
+ | 'morph'
2174
+ | 'morphTestnet'
2175
+ | 'morphHolesky'
2176
+ | 'ultra'
2177
+ | 'ultraTestnet'
2178
+ | 'nitrograph'
2179
+ | 'sepolia'
2180
+ | 'optimism_sepolia'
2181
+ | 'arbitrumSepolia'
2182
+ | 'goerli'
2183
+ | 'optimism_goerli'
2184
+ | 'arbitrumGoerli'
2185
+ | 'basecamp';
2186
+
2187
+ /**
2188
+ * Indicates if only in-range liquidity is rewarded.
2189
+ */
2190
+ onlyRewardInRangeLiquidity?: boolean;
2191
+
2192
+ /**
2193
+ * Array of liquidity pools associated with the rule.
2194
+ */
2195
+ pools?: Array<Liquidity.Pool>;
2196
+
2197
+ /**
2198
+ * Protocol of the liquidity pool.
2199
+ */
2200
+ protocol?: string;
2201
+ }
2202
+
2203
+ export namespace Liquidity {
2204
+ export interface Pool {
2205
+ /**
2206
+ * Unique identifier of the liquidity pool.
2207
+ */
2208
+ id: string;
2209
+ }
2210
+ }
2211
+
1475
2212
  export interface Range {
1476
2213
  /**
1477
2214
  * Reward amount for this range.
@@ -1487,6 +2224,16 @@ export namespace RuleUpdateResponse {
1487
2224
  * Start value of the range.
1488
2225
  */
1489
2226
  startRange: number;
2227
+
2228
+ /**
2229
+ * ID of the loyalty badge for this range.
2230
+ */
2231
+ loyaltyBadgeId?: string;
2232
+
2233
+ /**
2234
+ * Amount of the loyalty multiplier for this range.
2235
+ */
2236
+ loyaltyMultiplierAmount?: number;
1490
2237
  }
1491
2238
 
1492
2239
  /**
@@ -1539,20 +2286,15 @@ export namespace RuleUpdateResponse {
1539
2286
  * Object containing details of the associated smart contract.
1540
2287
  */
1541
2288
  export interface SmartContract {
1542
- /**
1543
- * ABI of the smart contract.
1544
- */
1545
- abi?: string | null;
1546
-
1547
2289
  /**
1548
2290
  * Mapping of addresses for the smart contract.
1549
2291
  */
1550
2292
  addressMapping?: string | null;
1551
2293
 
1552
2294
  /**
1553
- * Array of bonus details applied to the rule.
2295
+ * Object containing details of the amount multiplier from the event.
1554
2296
  */
1555
- bonus?: Array<SmartContract.Bonus> | null;
2297
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1556
2298
 
1557
2299
  /**
1558
2300
  * ID of the smart contract.
@@ -1564,68 +2306,31 @@ export namespace RuleUpdateResponse {
1564
2306
  */
1565
2307
  criteria?: 'everyEvent' | 'byParameter' | null;
1566
2308
 
1567
- /**
1568
- * Time range applied to the rule.
1569
- */
1570
- customRange?: SmartContract.CustomRange | null;
1571
-
1572
2309
  /**
1573
2310
  * Event emitted by the smart contract.
1574
2311
  */
1575
2312
  event?: string | null;
1576
2313
 
1577
- /**
1578
- * Maximum value allowed for the parameter.
1579
- */
1580
- max?: number | null;
1581
-
1582
2314
  /**
1583
2315
  * Array of parameters for the smart contract.
1584
2316
  */
1585
2317
  params?: Array<SmartContract.Param> | null;
1586
2318
 
1587
2319
  /**
1588
- * Flag indicating if a bonus is applied.
1589
- */
1590
- withBonus?: boolean | null;
1591
-
1592
- /**
1593
- * Flag indicating if a custom range is applied.
1594
- */
1595
- withCustomRange?: boolean | null;
1596
-
1597
- /**
1598
- * Flag indicating if a maximum limit is applied.
2320
+ * Type of the smart contract interaction.
1599
2321
  */
1600
- withMax?: boolean | null;
2322
+ type?: 'function' | 'event' | null;
1601
2323
  }
1602
2324
 
1603
2325
  export namespace SmartContract {
1604
- export interface Bonus {
1605
- /**
1606
- * Amount of the bonus.
1607
- */
1608
- amount?: number | null;
1609
-
1610
- /**
1611
- * Number of times the bonus is applied.
1612
- */
1613
- count?: number | null;
1614
- }
1615
-
1616
2326
  /**
1617
- * Time range applied to the rule.
2327
+ * Object containing details of the amount multiplier from the event.
1618
2328
  */
1619
- export interface CustomRange {
1620
- /**
1621
- * End time of the custom range.
1622
- */
1623
- endsAt?: string | null;
1624
-
2329
+ export interface AmountMultiplier {
1625
2330
  /**
1626
- * Start time of the custom range.
2331
+ * Mapping of the value for the smart contract.
1627
2332
  */
1628
- startsAt?: string | null;
2333
+ valueMapping?: string | null;
1629
2334
  }
1630
2335
 
1631
2336
  export interface Param {
@@ -1669,47 +2374,33 @@ export namespace RuleUpdateResponse {
1669
2374
  */
1670
2375
  streakMilestone: number;
1671
2376
  }
1672
- }
1673
2377
 
1674
- export interface Collection {
1675
2378
  /**
1676
- * Blockchain address of the collection
2379
+ * Metadata for swap loyalty rules
1677
2380
  */
1678
- address: string;
2381
+ export interface Swap {
2382
+ provider?: 'any' | 'relay' | 'lifi';
1679
2383
 
1680
- /**
1681
- * Blockchain network for the collection
1682
- */
1683
- network:
1684
- | 'mainnet'
1685
- | 'polygon'
1686
- | 'polygon_mumbai'
1687
- | 'optimism'
1688
- | 'arbitrum'
1689
- | 'binance'
1690
- | 'bscTestnet'
1691
- | 'avalanche'
1692
- | 'avalancheFuji'
1693
- | 'zksync'
1694
- | 'fantom'
1695
- | 'fantomTestnet'
1696
- | 'base'
1697
- | 'baseSepolia'
1698
- | 'skaleNebula'
1699
- | 'xai'
1700
- | 'berachainArtio'
1701
- | 'solana'
1702
- | 'apechain'
1703
- | 'flowMainnet'
1704
- | 'campTestnet'
1705
- | 'sui'
1706
- | 'vanar'
1707
- | 'sepolia'
1708
- | 'optimism_sepolia'
1709
- | 'arbitrumSepolia'
1710
- | 'goerli'
1711
- | 'optimism_goerli'
1712
- | 'arbitrumGoerli';
2384
+ relayReferrerId?: string;
2385
+
2386
+ requireCrossChainSwap?: boolean;
2387
+
2388
+ swappedToChain?: 'any' | number | string;
2389
+
2390
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2391
+
2392
+ tokenMode?: 'any' | 'specific';
2393
+
2394
+ trackTokenAmount?: boolean;
2395
+ }
2396
+
2397
+ export namespace Swap {
2398
+ export interface SwappedToToken {
2399
+ address: string;
2400
+
2401
+ chainId: string;
2402
+ }
2403
+ }
1713
2404
  }
1714
2405
  }
1715
2406
 
@@ -1720,9 +2411,6 @@ export interface RuleListResponse {
1720
2411
  }
1721
2412
 
1722
2413
  export namespace RuleListResponse {
1723
- /**
1724
- * Schema for a loyalty rule
1725
- */
1726
2414
  export interface Data {
1727
2415
  /**
1728
2416
  * Unique identifier for the loyalty rule
@@ -1744,40 +2432,1002 @@ export namespace RuleListResponse {
1744
2432
  */
1745
2433
  deletedAt: string | null;
1746
2434
 
1747
- /**
1748
- * Frequency of the loyalty rule
1749
- */
1750
- frequency: string;
2435
+ /**
2436
+ * Description of the loyalty rule
2437
+ */
2438
+ description: string;
2439
+
2440
+ /**
2441
+ * End time of the loyalty rule
2442
+ */
2443
+ endTime: string;
2444
+
2445
+ /**
2446
+ * Frequency of the loyalty rule
2447
+ */
2448
+ frequency: string;
2449
+
2450
+ /**
2451
+ * Chains attached to the loyalty rule
2452
+ */
2453
+ loyaltyRuleChain: Array<Data.LoyaltyRuleChain>;
2454
+
2455
+ /**
2456
+ * Name of the loyalty rule
2457
+ */
2458
+ name: string;
2459
+
2460
+ /**
2461
+ * Unique identifier for the organization
2462
+ */
2463
+ organizationId: string;
2464
+
2465
+ /**
2466
+ * Type of the reward
2467
+ */
2468
+ rewardType: 'points' | 'multiplier' | 'badge';
2469
+
2470
+ /**
2471
+ * Start time of the loyalty rule
2472
+ */
2473
+ startTime: string;
2474
+
2475
+ /**
2476
+ * Type of the loyalty rule
2477
+ */
2478
+ type: string;
2479
+
2480
+ /**
2481
+ * Timestamp when the loyalty rule was last updated
2482
+ */
2483
+ updatedAt: string;
2484
+
2485
+ /**
2486
+ * Unique identifier for the website
2487
+ */
2488
+ websiteId: string;
2489
+
2490
+ /**
2491
+ * Optional address of the collection
2492
+ */
2493
+ collectionAddress?: string;
2494
+
2495
+ /**
2496
+ * URL of the media associated with the loyalty rule
2497
+ */
2498
+ mediaUrl?: string | null;
2499
+
2500
+ /**
2501
+ * Optional metadata for the loyalty rule
2502
+ */
2503
+ metadata?: { [key: string]: Data.Metadata };
2504
+ }
2505
+
2506
+ export namespace Data {
2507
+ export interface LoyaltyRuleChain {
2508
+ /**
2509
+ * Unique identifier for the rule chain
2510
+ */
2511
+ id: string;
2512
+
2513
+ loyaltyConditions: Array<LoyaltyRuleChain.LoyaltyCondition>;
2514
+
2515
+ /**
2516
+ * Unique identifier for the loyalty rule
2517
+ */
2518
+ loyaltyRuleId: string;
2519
+
2520
+ /**
2521
+ * Name of the rule chain
2522
+ */
2523
+ name: string;
2524
+ }
2525
+
2526
+ export namespace LoyaltyRuleChain {
2527
+ export interface LoyaltyCondition {
2528
+ /**
2529
+ * Unique identifier for the condition
2530
+ */
2531
+ id: string;
2532
+
2533
+ /**
2534
+ * Amount of the condition
2535
+ */
2536
+ amount: number | null;
2537
+
2538
+ association: Array<LoyaltyCondition.Association>;
2539
+
2540
+ /**
2541
+ * URL of the CSV file
2542
+ */
2543
+ csvUrl: string | null;
2544
+
2545
+ /**
2546
+ * Description of the condition
2547
+ */
2548
+ description: string | null;
2549
+
2550
+ /**
2551
+ * Number of times the condition must be met
2552
+ */
2553
+ repeatCount: number | null;
2554
+
2555
+ /**
2556
+ * Number of times the condition must be met
2557
+ */
2558
+ requiredCount: number | null;
2559
+
2560
+ /**
2561
+ * Type of the condition
2562
+ */
2563
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
2564
+ }
2565
+
2566
+ export namespace LoyaltyCondition {
2567
+ export interface Association {
2568
+ /**
2569
+ * Unique identifier for the association
2570
+ */
2571
+ id: string;
2572
+
2573
+ /**
2574
+ * Unique identifier for the loyalty badge
2575
+ */
2576
+ loyaltyBadgeId: string | null;
2577
+
2578
+ /**
2579
+ * Unique identifier for the loyalty currency
2580
+ */
2581
+ loyaltyCurrencyId: string | null;
2582
+
2583
+ loyaltyRule: Association.LoyaltyRule | null;
2584
+
2585
+ /**
2586
+ * Unique identifier for the loyalty rule group
2587
+ */
2588
+ loyaltyRuleGroupId: string | null;
2589
+
2590
+ /**
2591
+ * Unique identifier for the loyalty rule
2592
+ */
2593
+ loyaltyRuleId: string | null;
2594
+ }
2595
+
2596
+ export namespace Association {
2597
+ export interface LoyaltyRule {
2598
+ /**
2599
+ * Name of the loyalty rule
2600
+ */
2601
+ name: string;
2602
+ }
2603
+ }
2604
+ }
2605
+ }
2606
+
2607
+ export interface Metadata {
2608
+ /**
2609
+ * Number of tokens per batch.
2610
+ */
2611
+ batchSize?: number | null;
2612
+
2613
+ /**
2614
+ * Text displayed on the action button.
2615
+ */
2616
+ buttonText?: string | null;
2617
+
2618
+ /**
2619
+ * Flag indicating if commenting is required.
2620
+ */
2621
+ checkComment?: boolean | null;
2622
+
2623
+ /**
2624
+ * Flag indicating if liking the post is required.
2625
+ */
2626
+ checkLike?: boolean | null;
2627
+
2628
+ /**
2629
+ * Flag indicating if reposting is required.
2630
+ */
2631
+ checkRepost?: boolean | null;
2632
+
2633
+ /**
2634
+ * Text to check in the Twitter post, username, or bio.
2635
+ */
2636
+ checkText?: string | null;
2637
+
2638
+ /**
2639
+ * Array of collections associated with the rule.
2640
+ */
2641
+ collection?: Array<Metadata.Collection>;
2642
+
2643
+ /**
2644
+ * Conditions for completing the profile.
2645
+ */
2646
+ completeProfileConditions?: { [key: string]: boolean } | null;
2647
+
2648
+ /**
2649
+ * Object containing details for the call-to-action.
2650
+ */
2651
+ cta?: Metadata.Cta | null;
2652
+
2653
+ /**
2654
+ * API key for custom rewards integration.
2655
+ */
2656
+ customRewardsApiKey?: string;
2657
+
2658
+ /**
2659
+ * Array of Discord servers, channels, and roles to join.
2660
+ */
2661
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2662
+
2663
+ /**
2664
+ * Array of drip quests required to complete the rule.
2665
+ */
2666
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2667
+
2668
+ /**
2669
+ * Flag indicating whether joining Discord servers is required.
2670
+ */
2671
+ enableJoinDiscordServers?: boolean | null;
2672
+
2673
+ /**
2674
+ * Flag indicating whether streaks are enabled.
2675
+ */
2676
+ enableStreaks?: boolean | null;
2677
+
2678
+ /**
2679
+ * Flag indicating whether the verified multiplier is enabled.
2680
+ */
2681
+ enableVerifiedMultiplier?: boolean;
2682
+
2683
+ /**
2684
+ * Fill source of the order for the token sale
2685
+ */
2686
+ fillSource?: string;
2687
+
2688
+ /**
2689
+ * Percentage reward given to a user for their first referral.
2690
+ */
2691
+ firstReferralReward?: number | null;
2692
+
2693
+ /**
2694
+ * Flag indicating whether the fill source is included.
2695
+ */
2696
+ hasFillSource?: boolean;
2697
+
2698
+ /**
2699
+ * Indicates if the item has never been sold.
2700
+ */
2701
+ hasNeverSold?: boolean;
2702
+
2703
+ /**
2704
+ * Indicates if the full royalty has been paid for items.
2705
+ */
2706
+ hasPaidFullRoyalty?: boolean;
2707
+
2708
+ /**
2709
+ * Flag indicating if the sale currency is included.
2710
+ */
2711
+ hasSaleCurrency?: boolean;
2712
+
2713
+ /**
2714
+ * Indicates if the user has a verified Twitter account.
2715
+ */
2716
+ hasVerifiedTwitter?: boolean;
2717
+
2718
+ /**
2719
+ * URL of the image associated with the rule.
2720
+ */
2721
+ imageUrl?: string | null;
2722
+
2723
+ /**
2724
+ * If enabled, the first transaction done on the platform will complete this rule
2725
+ */
2726
+ isCheckInOnEveryTxn?: boolean;
2727
+
2728
+ /**
2729
+ * Indicates if the multiplier has been applied to rewards.
2730
+ */
2731
+ isMultiplierApplied?: boolean;
2732
+
2733
+ /**
2734
+ * Flag indicating if the rule is restricted to new users.
2735
+ */
2736
+ isRestrictedToNewUsers?: boolean;
2737
+
2738
+ /**
2739
+ * Flag indicating if rewards are applied retroactively.
2740
+ */
2741
+ isRetroactive?: boolean | null;
2742
+
2743
+ /**
2744
+ * Flag indicating if the token hold multiplier is applied.
2745
+ */
2746
+ isTokenHoldMultiplier?: boolean;
2747
+
2748
+ /**
2749
+ * Optional link associated with the metadata.
2750
+ */
2751
+ link?: string | null;
2752
+
2753
+ /**
2754
+ * Liquidity pool details.
2755
+ */
2756
+ liquidity?: Metadata.Liquidity;
2757
+
2758
+ /**
2759
+ * Maximum quantity constraint for token holding.
2760
+ */
2761
+ maxQty?: number | null;
2762
+
2763
+ /**
2764
+ * Minimum quantity constraint for token holding.
2765
+ */
2766
+ minQty?: number | null;
2767
+
2768
+ /**
2769
+ * Array of loyalty currency IDs used for multipliers.
2770
+ */
2771
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
2772
+
2773
+ /**
2774
+ * Flag indicating whether to include only known users.
2775
+ */
2776
+ onlyKnownUsers?: boolean;
2777
+
2778
+ /**
2779
+ * Flag indicating whether to include only native tokens.
2780
+ */
2781
+ onlyNative?: boolean;
2782
+
2783
+ /**
2784
+ * Flag indicating whether to include only non-listed items.
2785
+ */
2786
+ onlyNonListed?: boolean;
2787
+
2788
+ /**
2789
+ * Indicates if only existing users are rewarded.
2790
+ */
2791
+ onlyRewardExistingUser?: boolean;
2792
+
2793
+ /**
2794
+ * give points for only one token ownership per contract
2795
+ */
2796
+ onlyRewardSingleTokenOwnership?: boolean | null;
2797
+
2798
+ /**
2799
+ * Promotional code associated with the rule.
2800
+ */
2801
+ promoCode?: string;
2802
+
2803
+ /**
2804
+ * URL of the CSV file containing promo codes.
2805
+ */
2806
+ promoCodeCsvUrl?: string;
2807
+
2808
+ /**
2809
+ * Numbers of the promotional code to be generated.
2810
+ */
2811
+ promoCodeLength?: number | null;
2812
+
2813
+ /**
2814
+ * Type of the promotional code.
2815
+ */
2816
+ promoCodeType?: 'code' | 'csv' | 'generate';
2817
+
2818
+ /**
2819
+ * Array defining ranges and corresponding rewards.
2820
+ */
2821
+ range?: Array<Metadata.Range>;
2822
+
2823
+ /**
2824
+ * Object defining referral requirements.
2825
+ */
2826
+ referralRequirements?: Metadata.ReferralRequirements | null;
2827
+
2828
+ /**
2829
+ * Lump sum reward given to a referrer.
2830
+ */
2831
+ referrerReward?: number | null;
2832
+
2833
+ /**
2834
+ * Loyalty currency ID of the referrer reward.
2835
+ */
2836
+ referrerRewardLoyaltyCurrencyId?: string | null;
2837
+
2838
+ /**
2839
+ * Flag indicating if the rule can also reward badges per range.
2840
+ */
2841
+ rewardBadgePerRange?: boolean;
2842
+
2843
+ /**
2844
+ * Flag indicating if the reward is rewarded by batch.
2845
+ */
2846
+ rewardByBatch?: boolean | null;
2847
+
2848
+ /**
2849
+ * Flag indicating if rewards are given per impression.
2850
+ */
2851
+ rewardPerImpression?: boolean | null;
2852
+
2853
+ /**
2854
+ * Flag indicating if the rule should reward based on value of traded tokens
2855
+ * instead of count.
2856
+ */
2857
+ rewardPerValue?: boolean;
2858
+
2859
+ /**
2860
+ * Currency associated with sales.
2861
+ */
2862
+ saleCurrency?: string;
2863
+
2864
+ /**
2865
+ * Percentage reward given for a second-level referral.
2866
+ */
2867
+ secondReferralReward?: number | null;
2868
+
2869
+ /**
2870
+ * Flag indicating if the multiplier is skipped.
2871
+ */
2872
+ skipMultiplier?: boolean | null;
2873
+
2874
+ /**
2875
+ * Object containing details of the associated smart contract.
2876
+ */
2877
+ smartContract?: Metadata.SmartContract;
2878
+
2879
+ /**
2880
+ * Array of snapshot proposals for the rule.
2881
+ */
2882
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
2883
+
2884
+ /**
2885
+ * Social media platform associated with the rule.
2886
+ */
2887
+ socialPlatform?:
2888
+ | 'Custom'
2889
+ | 'Discord'
2890
+ | 'EpicGames'
2891
+ | 'Instagram'
2892
+ | 'Steam'
2893
+ | 'Telegram'
2894
+ | 'TikTok'
2895
+ | 'Twitch'
2896
+ | 'X(Twitter)'
2897
+ | 'YouTube'
2898
+ | 'Google'
2899
+ | null;
2900
+
2901
+ /**
2902
+ * URL of the social platform's logo.
2903
+ */
2904
+ socialPlatformLogo?: string | null;
2905
+
2906
+ /**
2907
+ * Name of the social platform.
2908
+ */
2909
+ socialPlatformName?: string | null;
2910
+
2911
+ /**
2912
+ * ID of the Steam app.
2913
+ */
2914
+ steamAppId?: string | null;
2915
+
2916
+ /**
2917
+ * Array of streak milestones and corresponding rewards.
2918
+ */
2919
+ streakArray?: Array<Metadata.StreakArray> | null;
2920
+
2921
+ /**
2922
+ * Metadata for swap loyalty rules
2923
+ */
2924
+ swap?: Metadata.Swap;
2925
+
2926
+ /**
2927
+ * ID of the Telegram channel.
2928
+ */
2929
+ telegramChannelId?: string | null;
2930
+
2931
+ /**
2932
+ * Time delay in seconds to verify actions.
2933
+ */
2934
+ timeDelayToVerifySeconds?: string | number | null;
2935
+
2936
+ /**
2937
+ * Flag indicating if all contracts are tracked.
2938
+ */
2939
+ trackAllContracts?: boolean | null;
2940
+
2941
+ /**
2942
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2943
+ * completed once the progress is 100%.
2944
+ */
2945
+ trackProgress?: boolean | null;
2946
+
2947
+ /**
2948
+ * URL of the associated Twitter account.
2949
+ */
2950
+ twitterAccountUrl?: string;
2951
+
2952
+ /**
2953
+ * Hashtag associated with the Twitter post.
2954
+ */
2955
+ twitterHashtag?: string;
2956
+
2957
+ /**
2958
+ * URL of the associated Twitter post.
2959
+ */
2960
+ twitterPostUrl?: string;
2961
+
2962
+ /**
2963
+ * Unique identifier of the Twitter user.
2964
+ */
2965
+ twitterUserId?: string;
2966
+
2967
+ /**
2968
+ * Twitter username of the user.
2969
+ */
2970
+ twitterUsername?: string;
2971
+
2972
+ /**
2973
+ * Minimum length of the verification text.
2974
+ */
2975
+ verificationTextMinimumLength?: number | null;
2976
+
2977
+ /**
2978
+ * Multiplier applied to rewards for verified users.
2979
+ */
2980
+ verifiedMultiplier?: number | null;
2981
+
2982
+ /**
2983
+ * Placeholder text for verification input fields.
2984
+ */
2985
+ verifyPlaceHolderText?: string | null;
2986
+
2987
+ /**
2988
+ * Type of wallet associated with the rule.
2989
+ */
2990
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
2991
+
2992
+ /**
2993
+ * ID of the Youtube channel.
2994
+ */
2995
+ youtubeChannelId?: string | null;
2996
+
2997
+ /**
2998
+ * ID of the Youtube video.
2999
+ */
3000
+ youtubeVideoId?: string | null;
3001
+ }
3002
+
3003
+ export namespace Metadata {
3004
+ export interface Collection {
3005
+ /**
3006
+ * Blockchain address of the collection.
3007
+ */
3008
+ address?: string;
3009
+
3010
+ /**
3011
+ * Multiplier applied to the rewards for this collection.
3012
+ */
3013
+ multiplier?: number;
3014
+
3015
+ /**
3016
+ * Blockchain network of the collection.
3017
+ */
3018
+ network?:
3019
+ | 'abstract'
3020
+ | 'abstractTestnet'
3021
+ | 'apechain'
3022
+ | 'arbitrum'
3023
+ | 'avalanche'
3024
+ | 'avalancheFuji'
3025
+ | 'base'
3026
+ | 'baseSepolia'
3027
+ | 'berachain'
3028
+ | 'berachainArtio'
3029
+ | 'berachainBepolia'
3030
+ | 'binance'
3031
+ | 'bscTestnet'
3032
+ | 'campTestnet'
3033
+ | 'fantom'
3034
+ | 'fantomTestnet'
3035
+ | 'flowMainnet'
3036
+ | 'mainnet'
3037
+ | 'optimism'
3038
+ | 'polygon'
3039
+ | 'polygon_mumbai'
3040
+ | 'skaleNebula'
3041
+ | 'solana'
3042
+ | 'sophon'
3043
+ | 'sophonTestnet'
3044
+ | 'sui'
3045
+ | 'superseed'
3046
+ | 'superseedSepolia'
3047
+ | 'vanar'
3048
+ | 'xai'
3049
+ | 'zksync'
3050
+ | 'coti'
3051
+ | 'cotiTestnet'
3052
+ | 'morph'
3053
+ | 'morphTestnet'
3054
+ | 'morphHolesky'
3055
+ | 'ultra'
3056
+ | 'ultraTestnet'
3057
+ | 'nitrograph'
3058
+ | 'sepolia'
3059
+ | 'optimism_sepolia'
3060
+ | 'arbitrumSepolia'
3061
+ | 'goerli'
3062
+ | 'optimism_goerli'
3063
+ | 'arbitrumGoerli'
3064
+ | 'basecamp';
3065
+ }
3066
+
3067
+ /**
3068
+ * Object containing details for the call-to-action.
3069
+ */
3070
+ export interface Cta {
3071
+ /**
3072
+ * Link for the call-to-action.
3073
+ */
3074
+ href?: string | null;
3075
+
3076
+ /**
3077
+ * Label for the call-to-action.
3078
+ */
3079
+ label?: string | null;
3080
+ }
3081
+
3082
+ export interface DiscordServersToJoin {
3083
+ /**
3084
+ * ID of the Discord server to join.
3085
+ */
3086
+ id?: string;
3087
+
3088
+ /**
3089
+ * Array of Discord channels to join.
3090
+ */
3091
+ channels?: Array<DiscordServersToJoin.Channel>;
3092
+
3093
+ /**
3094
+ * Array of roles to assign in the Discord server.
3095
+ */
3096
+ roles?: Array<DiscordServersToJoin.Role>;
3097
+ }
3098
+
3099
+ export namespace DiscordServersToJoin {
3100
+ export interface Channel {
3101
+ /**
3102
+ * ID of the Discord channel.
3103
+ */
3104
+ id?: string;
3105
+
3106
+ /**
3107
+ * Array of emojis used in the channel.
3108
+ */
3109
+ emojis?: Array<Channel.Emoji>;
3110
+
3111
+ /**
3112
+ * Phrase of text to be present in the discord message
3113
+ */
3114
+ text?: string;
3115
+ }
3116
+
3117
+ export namespace Channel {
3118
+ export interface Emoji {
3119
+ /**
3120
+ * ID of the emoji used in the channel.
3121
+ */
3122
+ id?: string;
3123
+ }
3124
+ }
3125
+
3126
+ export interface Role {
3127
+ /**
3128
+ * ID of the role in the Discord server.
3129
+ */
3130
+ id: string;
3131
+ }
3132
+ }
3133
+
3134
+ export interface DripQuestsToComplete {
3135
+ /**
3136
+ * ID of the drip quest to complete.
3137
+ */
3138
+ id: string;
3139
+ }
3140
+
3141
+ /**
3142
+ * Liquidity pool details.
3143
+ */
3144
+ export interface Liquidity {
3145
+ /**
3146
+ * Calculation type of the liquidity pool.
3147
+ */
3148
+ calculationType?: 'fixed' | 'custom';
3149
+
3150
+ /**
3151
+ * Custom function to calculate the the reward amount based on the liquidity
3152
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
3153
+ * USD.
3154
+ */
3155
+ customFunction?: string;
3156
+
3157
+ /**
3158
+ * Liquidity provided per day in USD
3159
+ */
3160
+ liquidityPerDay?: number;
3161
+
3162
+ /**
3163
+ * Blockchain network of the liquidity pool.
3164
+ */
3165
+ network?:
3166
+ | 'abstract'
3167
+ | 'abstractTestnet'
3168
+ | 'apechain'
3169
+ | 'arbitrum'
3170
+ | 'avalanche'
3171
+ | 'avalancheFuji'
3172
+ | 'base'
3173
+ | 'baseSepolia'
3174
+ | 'berachain'
3175
+ | 'berachainArtio'
3176
+ | 'berachainBepolia'
3177
+ | 'binance'
3178
+ | 'bscTestnet'
3179
+ | 'campTestnet'
3180
+ | 'fantom'
3181
+ | 'fantomTestnet'
3182
+ | 'flowMainnet'
3183
+ | 'mainnet'
3184
+ | 'optimism'
3185
+ | 'polygon'
3186
+ | 'polygon_mumbai'
3187
+ | 'skaleNebula'
3188
+ | 'solana'
3189
+ | 'sophon'
3190
+ | 'sophonTestnet'
3191
+ | 'sui'
3192
+ | 'superseed'
3193
+ | 'superseedSepolia'
3194
+ | 'vanar'
3195
+ | 'xai'
3196
+ | 'zksync'
3197
+ | 'coti'
3198
+ | 'cotiTestnet'
3199
+ | 'morph'
3200
+ | 'morphTestnet'
3201
+ | 'morphHolesky'
3202
+ | 'ultra'
3203
+ | 'ultraTestnet'
3204
+ | 'nitrograph'
3205
+ | 'sepolia'
3206
+ | 'optimism_sepolia'
3207
+ | 'arbitrumSepolia'
3208
+ | 'goerli'
3209
+ | 'optimism_goerli'
3210
+ | 'arbitrumGoerli'
3211
+ | 'basecamp';
3212
+
3213
+ /**
3214
+ * Indicates if only in-range liquidity is rewarded.
3215
+ */
3216
+ onlyRewardInRangeLiquidity?: boolean;
3217
+
3218
+ /**
3219
+ * Array of liquidity pools associated with the rule.
3220
+ */
3221
+ pools?: Array<Liquidity.Pool>;
3222
+
3223
+ /**
3224
+ * Protocol of the liquidity pool.
3225
+ */
3226
+ protocol?: string;
3227
+ }
3228
+
3229
+ export namespace Liquidity {
3230
+ export interface Pool {
3231
+ /**
3232
+ * Unique identifier of the liquidity pool.
3233
+ */
3234
+ id: string;
3235
+ }
3236
+ }
3237
+
3238
+ export interface Range {
3239
+ /**
3240
+ * Reward amount for this range.
3241
+ */
3242
+ amount: number;
3243
+
3244
+ /**
3245
+ * End value of the range.
3246
+ */
3247
+ endRange: number;
3248
+
3249
+ /**
3250
+ * Start value of the range.
3251
+ */
3252
+ startRange: number;
3253
+
3254
+ /**
3255
+ * ID of the loyalty badge for this range.
3256
+ */
3257
+ loyaltyBadgeId?: string;
3258
+
3259
+ /**
3260
+ * Amount of the loyalty multiplier for this range.
3261
+ */
3262
+ loyaltyMultiplierAmount?: number;
3263
+ }
3264
+
3265
+ /**
3266
+ * Object defining referral requirements.
3267
+ */
3268
+ export interface ReferralRequirements {
3269
+ /**
3270
+ * Flag indicating if achieving points is required.
3271
+ */
3272
+ achievePoints?: boolean | null;
3273
+
3274
+ /**
3275
+ * Flag indicating if completing the profile is required.
3276
+ */
3277
+ completeProfile?: boolean | null;
3278
+
3279
+ /**
3280
+ * Flag indicating if connecting Discord is required.
3281
+ */
3282
+ connectDiscord?: boolean | null;
3283
+
3284
+ /**
3285
+ * Flag indicating if connecting email is required.
3286
+ */
3287
+ connectEmail?: boolean | null;
3288
+
3289
+ /**
3290
+ * Flag indicating if connecting Twitter is required.
3291
+ */
3292
+ connectTwitter?: boolean | null;
3293
+
3294
+ points?: ReferralRequirements.Points | null;
3295
+ }
3296
+
3297
+ export namespace ReferralRequirements {
3298
+ export interface Points {
3299
+ /**
3300
+ * Points required for referral.
3301
+ */
3302
+ amount?: number | null;
3303
+
3304
+ /**
3305
+ * ID of the loyalty currency for referral.
3306
+ */
3307
+ loyaltyCurrecyId?: string | null;
3308
+ }
3309
+ }
3310
+
3311
+ /**
3312
+ * Object containing details of the associated smart contract.
3313
+ */
3314
+ export interface SmartContract {
3315
+ /**
3316
+ * Mapping of addresses for the smart contract.
3317
+ */
3318
+ addressMapping?: string | null;
3319
+
3320
+ /**
3321
+ * Object containing details of the amount multiplier from the event.
3322
+ */
3323
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3324
+
3325
+ /**
3326
+ * ID of the smart contract.
3327
+ */
3328
+ contractId?: string | null;
3329
+
3330
+ /**
3331
+ * Criteria to evaluate the smart contract event.
3332
+ */
3333
+ criteria?: 'everyEvent' | 'byParameter' | null;
3334
+
3335
+ /**
3336
+ * Event emitted by the smart contract.
3337
+ */
3338
+ event?: string | null;
3339
+
3340
+ /**
3341
+ * Array of parameters for the smart contract.
3342
+ */
3343
+ params?: Array<SmartContract.Param> | null;
3344
+
3345
+ /**
3346
+ * Type of the smart contract interaction.
3347
+ */
3348
+ type?: 'function' | 'event' | null;
3349
+ }
3350
+
3351
+ export namespace SmartContract {
3352
+ /**
3353
+ * Object containing details of the amount multiplier from the event.
3354
+ */
3355
+ export interface AmountMultiplier {
3356
+ /**
3357
+ * Mapping of the value for the smart contract.
3358
+ */
3359
+ valueMapping?: string | null;
3360
+ }
3361
+
3362
+ export interface Param {
3363
+ /**
3364
+ * Condition to check for the parameter.
3365
+ */
3366
+ condition?: string | null;
3367
+
3368
+ /**
3369
+ * Name of the smart contract parameter.
3370
+ */
3371
+ name?: string | null;
3372
+
3373
+ /**
3374
+ * Value of the parameter.
3375
+ */
3376
+ value?: string | null;
3377
+ }
3378
+ }
3379
+
3380
+ export interface SnapshotProposal {
3381
+ /**
3382
+ * ID of the snapshot proposal.
3383
+ */
3384
+ id: string;
3385
+
3386
+ /**
3387
+ * Space associated with the snapshot proposal.
3388
+ */
3389
+ space: string;
3390
+ }
3391
+
3392
+ export interface StreakArray {
3393
+ /**
3394
+ * Reward amount for achieving the streak milestone.
3395
+ */
3396
+ streakAmount: number;
3397
+
3398
+ /**
3399
+ * Milestone required to achieve the streak.
3400
+ */
3401
+ streakMilestone: number;
3402
+ }
3403
+
3404
+ /**
3405
+ * Metadata for swap loyalty rules
3406
+ */
3407
+ export interface Swap {
3408
+ provider?: 'any' | 'relay' | 'lifi';
3409
+
3410
+ relayReferrerId?: string;
1751
3411
 
1752
- /**
1753
- * Unique identifier for the organization
1754
- */
1755
- organizationId: string;
3412
+ requireCrossChainSwap?: boolean;
1756
3413
 
1757
- /**
1758
- * Type of the loyalty rule
1759
- */
1760
- type: string;
3414
+ swappedToChain?: 'any' | number | string;
1761
3415
 
1762
- /**
1763
- * Timestamp when the loyalty rule was last updated
1764
- */
1765
- updatedAt: string;
3416
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1766
3417
 
1767
- /**
1768
- * Unique identifier for the website
1769
- */
1770
- websiteId: string;
3418
+ tokenMode?: 'any' | 'specific';
1771
3419
 
1772
- /**
1773
- * Optional address of the collection
1774
- */
1775
- collectionAddress?: string;
3420
+ trackTokenAmount?: boolean;
3421
+ }
1776
3422
 
1777
- /**
1778
- * Optional metadata for the loyalty rule
1779
- */
1780
- metadata?: Record<string, unknown>;
3423
+ export namespace Swap {
3424
+ export interface SwappedToToken {
3425
+ address: string;
3426
+
3427
+ chainId: string;
3428
+ }
3429
+ }
3430
+ }
1781
3431
  }
1782
3432
  }
1783
3433
 
@@ -1788,14 +3438,16 @@ export interface RuleDeleteResponse {
1788
3438
  }
1789
3439
 
1790
3440
  export interface RuleCompleteResponse {
1791
- message: string;
3441
+ message:
3442
+ | 'Completion request added to queue'
3443
+ | 'Link click being verified, come back later to check the status';
1792
3444
  }
1793
3445
 
1794
- export interface RuleStatusResponse {
1795
- data: Array<RuleStatusResponse.Data>;
3446
+ export interface RuleGetStatusResponse {
3447
+ data: Array<RuleGetStatusResponse.Data>;
1796
3448
  }
1797
3449
 
1798
- export namespace RuleStatusResponse {
3450
+ export namespace RuleGetStatusResponse {
1799
3451
  export interface Data {
1800
3452
  loyaltyRuleId: string;
1801
3453
 
@@ -1912,7 +3564,18 @@ export interface RuleCreateParams {
1912
3564
  | 'twitter_follow'
1913
3565
  | 'twitter_followers'
1914
3566
  | 'twitter_like'
1915
- | 'twitter_post_hashtag';
3567
+ | 'twitter_post_hashtag'
3568
+ | 'quiz'
3569
+ | 'poll'
3570
+ | 'steam_wishlist'
3571
+ | 'liquidity_uniswap_v2'
3572
+ | 'liquidity_uniswap_v3'
3573
+ | 'points_airdrop'
3574
+ | 'youtube_subscribers'
3575
+ | 'youtube_comment'
3576
+ | 'shopify_spend'
3577
+ | 'swap'
3578
+ | 'tiktok_post';
1916
3579
 
1917
3580
  /**
1918
3581
  * Unique identifier for the associated website
@@ -1949,6 +3612,11 @@ export interface RuleCreateParams {
1949
3612
  */
1950
3613
  description?: string;
1951
3614
 
3615
+ /**
3616
+ * ID of the external integration
3617
+ */
3618
+ externalIntegrationId?: string | null;
3619
+
1952
3620
  /**
1953
3621
  * Whether to hide this rule in the user interface
1954
3622
  */
@@ -1957,51 +3625,95 @@ export interface RuleCreateParams {
1957
3625
  /**
1958
3626
  * Interval between rule executions
1959
3627
  */
1960
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
3628
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1961
3629
 
1962
3630
  /**
1963
3631
  * Whether this rule is mandatory
1964
3632
  */
1965
3633
  isRequired?: boolean;
1966
3634
 
3635
+ /**
3636
+ * Unique identifier for the loyalty badge
3637
+ */
3638
+ loyaltyBadgeId?: string | null;
3639
+
1967
3640
  /**
1968
3641
  * Unique identifier for the loyalty rule group
1969
3642
  */
1970
3643
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
1971
3644
 
3645
+ /**
3646
+ * URL for uploading loyalty user allotment via CSV
3647
+ */
3648
+ loyaltyUserAllotmentCsvUrl?: string;
3649
+
3650
+ /**
3651
+ * The interval for the max amount. Available for the smart contract and external
3652
+ * rules.
3653
+ */
3654
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
3655
+
3656
+ /**
3657
+ * The maximum amount of points a user can earn per interval. Available for the
3658
+ * smart contract and external rules.
3659
+ */
3660
+ maxAmountPerInterval?: number | null;
3661
+
3662
+ /**
3663
+ * URL of the media to be displayed
3664
+ */
3665
+ mediaUrl?: string | null;
3666
+
1972
3667
  /**
1973
3668
  * Blockchain network where the rule will apply
1974
3669
  */
1975
3670
  network?:
1976
- | 'mainnet'
1977
- | 'polygon'
1978
- | 'polygon_mumbai'
1979
- | 'optimism'
3671
+ | 'abstract'
3672
+ | 'abstractTestnet'
3673
+ | 'apechain'
1980
3674
  | 'arbitrum'
1981
- | 'binance'
1982
- | 'bscTestnet'
1983
3675
  | 'avalanche'
1984
3676
  | 'avalancheFuji'
1985
- | 'zksync'
1986
- | 'fantom'
1987
- | 'fantomTestnet'
1988
3677
  | 'base'
1989
3678
  | 'baseSepolia'
1990
- | 'skaleNebula'
1991
- | 'xai'
3679
+ | 'berachain'
1992
3680
  | 'berachainArtio'
1993
- | 'solana'
1994
- | 'apechain'
1995
- | 'flowMainnet'
3681
+ | 'berachainBepolia'
3682
+ | 'binance'
3683
+ | 'bscTestnet'
1996
3684
  | 'campTestnet'
3685
+ | 'fantom'
3686
+ | 'fantomTestnet'
3687
+ | 'flowMainnet'
3688
+ | 'mainnet'
3689
+ | 'optimism'
3690
+ | 'polygon'
3691
+ | 'polygon_mumbai'
3692
+ | 'skaleNebula'
3693
+ | 'solana'
3694
+ | 'sophon'
3695
+ | 'sophonTestnet'
1997
3696
  | 'sui'
3697
+ | 'superseed'
3698
+ | 'superseedSepolia'
1998
3699
  | 'vanar'
3700
+ | 'xai'
3701
+ | 'zksync'
3702
+ | 'coti'
3703
+ | 'cotiTestnet'
3704
+ | 'morph'
3705
+ | 'morphTestnet'
3706
+ | 'morphHolesky'
3707
+ | 'ultra'
3708
+ | 'ultraTestnet'
3709
+ | 'nitrograph'
1999
3710
  | 'sepolia'
2000
3711
  | 'optimism_sepolia'
2001
3712
  | 'arbitrumSepolia'
2002
3713
  | 'goerli'
2003
3714
  | 'optimism_goerli'
2004
- | 'arbitrumGoerli';
3715
+ | 'arbitrumGoerli'
3716
+ | 'basecamp';
2005
3717
 
2006
3718
  /**
2007
3719
  * OAuth credentials associated with the rule
@@ -2011,12 +3723,17 @@ export interface RuleCreateParams {
2011
3723
  /**
2012
3724
  * Type of reward issued by the rule
2013
3725
  */
2014
- rewardType?: 'points' | 'multiplier';
3726
+ rewardType?: 'points' | 'multiplier' | 'badge';
3727
+
3728
+ /**
3729
+ * URL of the Shopify store
3730
+ */
3731
+ shopifyStoreUrl?: string | null;
2015
3732
 
2016
3733
  /**
2017
- * Identifier for associated subscriptions
3734
+ * Optional subscription id for the rule
2018
3735
  */
2019
- subscriptionIdentifier?: string | null;
3736
+ subscriptionId?: string | null;
2020
3737
  }
2021
3738
 
2022
3739
  export namespace RuleCreateParams {
@@ -2024,6 +3741,11 @@ export namespace RuleCreateParams {
2024
3741
  * Additional metadata for the loyalty rule
2025
3742
  */
2026
3743
  export interface Metadata {
3744
+ /**
3745
+ * Number of tokens per batch.
3746
+ */
3747
+ batchSize?: number | null;
3748
+
2027
3749
  /**
2028
3750
  * Text displayed on the action button.
2029
3751
  */
@@ -2054,6 +3776,11 @@ export namespace RuleCreateParams {
2054
3776
  */
2055
3777
  collection?: Array<Metadata.Collection>;
2056
3778
 
3779
+ /**
3780
+ * Conditions for completing the profile.
3781
+ */
3782
+ completeProfileConditions?: { [key: string]: boolean } | null;
3783
+
2057
3784
  /**
2058
3785
  * Object containing details for the call-to-action.
2059
3786
  */
@@ -2089,11 +3816,21 @@ export namespace RuleCreateParams {
2089
3816
  */
2090
3817
  enableVerifiedMultiplier?: boolean;
2091
3818
 
3819
+ /**
3820
+ * Fill source of the order for the token sale
3821
+ */
3822
+ fillSource?: string;
3823
+
2092
3824
  /**
2093
3825
  * Percentage reward given to a user for their first referral.
2094
3826
  */
2095
3827
  firstReferralReward?: number | null;
2096
3828
 
3829
+ /**
3830
+ * Flag indicating whether the fill source is included.
3831
+ */
3832
+ hasFillSource?: boolean;
3833
+
2097
3834
  /**
2098
3835
  * Indicates if the item has never been sold.
2099
3836
  */
@@ -2119,11 +3856,21 @@ export namespace RuleCreateParams {
2119
3856
  */
2120
3857
  imageUrl?: string | null;
2121
3858
 
3859
+ /**
3860
+ * If enabled, the first transaction done on the platform will complete this rule
3861
+ */
3862
+ isCheckInOnEveryTxn?: boolean;
3863
+
2122
3864
  /**
2123
3865
  * Indicates if the multiplier has been applied to rewards.
2124
3866
  */
2125
3867
  isMultiplierApplied?: boolean;
2126
3868
 
3869
+ /**
3870
+ * Flag indicating if the rule is restricted to new users.
3871
+ */
3872
+ isRestrictedToNewUsers?: boolean;
3873
+
2127
3874
  /**
2128
3875
  * Flag indicating if rewards are applied retroactively.
2129
3876
  */
@@ -2139,6 +3886,11 @@ export namespace RuleCreateParams {
2139
3886
  */
2140
3887
  link?: string | null;
2141
3888
 
3889
+ /**
3890
+ * Liquidity pool details.
3891
+ */
3892
+ liquidity?: Metadata.Liquidity;
3893
+
2142
3894
  /**
2143
3895
  * Maximum quantity constraint for token holding.
2144
3896
  */
@@ -2169,11 +3921,36 @@ export namespace RuleCreateParams {
2169
3921
  */
2170
3922
  onlyNonListed?: boolean;
2171
3923
 
3924
+ /**
3925
+ * Indicates if only existing users are rewarded.
3926
+ */
3927
+ onlyRewardExistingUser?: boolean;
3928
+
3929
+ /**
3930
+ * give points for only one token ownership per contract
3931
+ */
3932
+ onlyRewardSingleTokenOwnership?: boolean | null;
3933
+
2172
3934
  /**
2173
3935
  * Promotional code associated with the rule.
2174
3936
  */
2175
3937
  promoCode?: string;
2176
3938
 
3939
+ /**
3940
+ * URL of the CSV file containing promo codes.
3941
+ */
3942
+ promoCodeCsvUrl?: string;
3943
+
3944
+ /**
3945
+ * Numbers of the promotional code to be generated.
3946
+ */
3947
+ promoCodeLength?: number | null;
3948
+
3949
+ /**
3950
+ * Type of the promotional code.
3951
+ */
3952
+ promoCodeType?: 'code' | 'csv' | 'generate';
3953
+
2177
3954
  /**
2178
3955
  * Array defining ranges and corresponding rewards.
2179
3956
  */
@@ -2189,11 +3966,32 @@ export namespace RuleCreateParams {
2189
3966
  */
2190
3967
  referrerReward?: number | null;
2191
3968
 
3969
+ /**
3970
+ * Loyalty currency ID of the referrer reward.
3971
+ */
3972
+ referrerRewardLoyaltyCurrencyId?: string | null;
3973
+
3974
+ /**
3975
+ * Flag indicating if the rule can also reward badges per range.
3976
+ */
3977
+ rewardBadgePerRange?: boolean;
3978
+
3979
+ /**
3980
+ * Flag indicating if the reward is rewarded by batch.
3981
+ */
3982
+ rewardByBatch?: boolean | null;
3983
+
2192
3984
  /**
2193
3985
  * Flag indicating if rewards are given per impression.
2194
3986
  */
2195
3987
  rewardPerImpression?: boolean | null;
2196
3988
 
3989
+ /**
3990
+ * Flag indicating if the rule should reward based on value of traded tokens
3991
+ * instead of count.
3992
+ */
3993
+ rewardPerValue?: boolean;
3994
+
2197
3995
  /**
2198
3996
  * Currency associated with sales.
2199
3997
  */
@@ -2204,6 +4002,11 @@ export namespace RuleCreateParams {
2204
4002
  */
2205
4003
  secondReferralReward?: number | null;
2206
4004
 
4005
+ /**
4006
+ * Flag indicating if the multiplier is skipped.
4007
+ */
4008
+ skipMultiplier?: boolean | null;
4009
+
2207
4010
  /**
2208
4011
  * Object containing details of the associated smart contract.
2209
4012
  */
@@ -2218,14 +4021,17 @@ export namespace RuleCreateParams {
2218
4021
  * Social media platform associated with the rule.
2219
4022
  */
2220
4023
  socialPlatform?:
2221
- | 'Twitch'
4024
+ | 'Custom'
4025
+ | 'Discord'
4026
+ | 'EpicGames'
4027
+ | 'Instagram'
4028
+ | 'Steam'
4029
+ | 'Telegram'
2222
4030
  | 'TikTok'
4031
+ | 'Twitch'
2223
4032
  | 'X(Twitter)'
2224
- | 'Instagram'
2225
- | 'EpicGames'
2226
4033
  | 'YouTube'
2227
- | 'Discord'
2228
- | 'Custom'
4034
+ | 'Google'
2229
4035
  | null;
2230
4036
 
2231
4037
  /**
@@ -2238,11 +4044,21 @@ export namespace RuleCreateParams {
2238
4044
  */
2239
4045
  socialPlatformName?: string | null;
2240
4046
 
4047
+ /**
4048
+ * ID of the Steam app.
4049
+ */
4050
+ steamAppId?: string | null;
4051
+
2241
4052
  /**
2242
4053
  * Array of streak milestones and corresponding rewards.
2243
4054
  */
2244
4055
  streakArray?: Array<Metadata.StreakArray> | null;
2245
4056
 
4057
+ /**
4058
+ * Metadata for swap loyalty rules
4059
+ */
4060
+ swap?: Metadata.Swap;
4061
+
2246
4062
  /**
2247
4063
  * ID of the Telegram channel.
2248
4064
  */
@@ -2258,6 +4074,12 @@ export namespace RuleCreateParams {
2258
4074
  */
2259
4075
  trackAllContracts?: boolean | null;
2260
4076
 
4077
+ /**
4078
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
4079
+ * completed once the progress is 100%.
4080
+ */
4081
+ trackProgress?: boolean | null;
4082
+
2261
4083
  /**
2262
4084
  * URL of the associated Twitter account.
2263
4085
  */
@@ -2301,7 +4123,17 @@ export namespace RuleCreateParams {
2301
4123
  /**
2302
4124
  * Type of wallet associated with the rule.
2303
4125
  */
2304
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
4126
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
4127
+
4128
+ /**
4129
+ * ID of the Youtube channel.
4130
+ */
4131
+ youtubeChannelId?: string | null;
4132
+
4133
+ /**
4134
+ * ID of the Youtube video.
4135
+ */
4136
+ youtubeVideoId?: string | null;
2305
4137
  }
2306
4138
 
2307
4139
  export namespace Metadata {
@@ -2320,35 +4152,52 @@ export namespace RuleCreateParams {
2320
4152
  * Blockchain network of the collection.
2321
4153
  */
2322
4154
  network?:
2323
- | 'mainnet'
2324
- | 'polygon'
2325
- | 'polygon_mumbai'
2326
- | 'optimism'
4155
+ | 'abstract'
4156
+ | 'abstractTestnet'
4157
+ | 'apechain'
2327
4158
  | 'arbitrum'
2328
- | 'binance'
2329
- | 'bscTestnet'
2330
4159
  | 'avalanche'
2331
4160
  | 'avalancheFuji'
2332
- | 'zksync'
2333
- | 'fantom'
2334
- | 'fantomTestnet'
2335
4161
  | 'base'
2336
4162
  | 'baseSepolia'
2337
- | 'skaleNebula'
2338
- | 'xai'
4163
+ | 'berachain'
2339
4164
  | 'berachainArtio'
2340
- | 'solana'
2341
- | 'apechain'
2342
- | 'flowMainnet'
4165
+ | 'berachainBepolia'
4166
+ | 'binance'
4167
+ | 'bscTestnet'
2343
4168
  | 'campTestnet'
4169
+ | 'fantom'
4170
+ | 'fantomTestnet'
4171
+ | 'flowMainnet'
4172
+ | 'mainnet'
4173
+ | 'optimism'
4174
+ | 'polygon'
4175
+ | 'polygon_mumbai'
4176
+ | 'skaleNebula'
4177
+ | 'solana'
4178
+ | 'sophon'
4179
+ | 'sophonTestnet'
2344
4180
  | 'sui'
4181
+ | 'superseed'
4182
+ | 'superseedSepolia'
2345
4183
  | 'vanar'
4184
+ | 'xai'
4185
+ | 'zksync'
4186
+ | 'coti'
4187
+ | 'cotiTestnet'
4188
+ | 'morph'
4189
+ | 'morphTestnet'
4190
+ | 'morphHolesky'
4191
+ | 'ultra'
4192
+ | 'ultraTestnet'
4193
+ | 'nitrograph'
2346
4194
  | 'sepolia'
2347
4195
  | 'optimism_sepolia'
2348
4196
  | 'arbitrumSepolia'
2349
4197
  | 'goerli'
2350
4198
  | 'optimism_goerli'
2351
- | 'arbitrumGoerli';
4199
+ | 'arbitrumGoerli'
4200
+ | 'basecamp';
2352
4201
  }
2353
4202
 
2354
4203
  /**
@@ -2394,6 +4243,11 @@ export namespace RuleCreateParams {
2394
4243
  * Array of emojis used in the channel.
2395
4244
  */
2396
4245
  emojis?: Array<Channel.Emoji>;
4246
+
4247
+ /**
4248
+ * Phrase of text to be present in the discord message
4249
+ */
4250
+ text?: string;
2397
4251
  }
2398
4252
 
2399
4253
  export namespace Channel {
@@ -2405,21 +4259,118 @@ export namespace RuleCreateParams {
2405
4259
  }
2406
4260
  }
2407
4261
 
2408
- export interface Role {
4262
+ export interface Role {
4263
+ /**
4264
+ * ID of the role in the Discord server.
4265
+ */
4266
+ id: string;
4267
+ }
4268
+ }
4269
+
4270
+ export interface DripQuestsToComplete {
4271
+ /**
4272
+ * ID of the drip quest to complete.
4273
+ */
4274
+ id: string;
4275
+ }
4276
+
4277
+ /**
4278
+ * Liquidity pool details.
4279
+ */
4280
+ export interface Liquidity {
4281
+ /**
4282
+ * Calculation type of the liquidity pool.
4283
+ */
4284
+ calculationType?: 'fixed' | 'custom';
4285
+
4286
+ /**
4287
+ * Custom function to calculate the the reward amount based on the liquidity
4288
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
4289
+ * USD.
4290
+ */
4291
+ customFunction?: string;
4292
+
4293
+ /**
4294
+ * Liquidity provided per day in USD
4295
+ */
4296
+ liquidityPerDay?: number;
4297
+
4298
+ /**
4299
+ * Blockchain network of the liquidity pool.
4300
+ */
4301
+ network?:
4302
+ | 'abstract'
4303
+ | 'abstractTestnet'
4304
+ | 'apechain'
4305
+ | 'arbitrum'
4306
+ | 'avalanche'
4307
+ | 'avalancheFuji'
4308
+ | 'base'
4309
+ | 'baseSepolia'
4310
+ | 'berachain'
4311
+ | 'berachainArtio'
4312
+ | 'berachainBepolia'
4313
+ | 'binance'
4314
+ | 'bscTestnet'
4315
+ | 'campTestnet'
4316
+ | 'fantom'
4317
+ | 'fantomTestnet'
4318
+ | 'flowMainnet'
4319
+ | 'mainnet'
4320
+ | 'optimism'
4321
+ | 'polygon'
4322
+ | 'polygon_mumbai'
4323
+ | 'skaleNebula'
4324
+ | 'solana'
4325
+ | 'sophon'
4326
+ | 'sophonTestnet'
4327
+ | 'sui'
4328
+ | 'superseed'
4329
+ | 'superseedSepolia'
4330
+ | 'vanar'
4331
+ | 'xai'
4332
+ | 'zksync'
4333
+ | 'coti'
4334
+ | 'cotiTestnet'
4335
+ | 'morph'
4336
+ | 'morphTestnet'
4337
+ | 'morphHolesky'
4338
+ | 'ultra'
4339
+ | 'ultraTestnet'
4340
+ | 'nitrograph'
4341
+ | 'sepolia'
4342
+ | 'optimism_sepolia'
4343
+ | 'arbitrumSepolia'
4344
+ | 'goerli'
4345
+ | 'optimism_goerli'
4346
+ | 'arbitrumGoerli'
4347
+ | 'basecamp';
4348
+
4349
+ /**
4350
+ * Indicates if only in-range liquidity is rewarded.
4351
+ */
4352
+ onlyRewardInRangeLiquidity?: boolean;
4353
+
4354
+ /**
4355
+ * Array of liquidity pools associated with the rule.
4356
+ */
4357
+ pools?: Array<Liquidity.Pool>;
4358
+
4359
+ /**
4360
+ * Protocol of the liquidity pool.
4361
+ */
4362
+ protocol?: string;
4363
+ }
4364
+
4365
+ export namespace Liquidity {
4366
+ export interface Pool {
2409
4367
  /**
2410
- * ID of the role in the Discord server.
4368
+ * Unique identifier of the liquidity pool.
2411
4369
  */
2412
4370
  id: string;
2413
4371
  }
2414
4372
  }
2415
4373
 
2416
- export interface DripQuestsToComplete {
2417
- /**
2418
- * ID of the drip quest to complete.
2419
- */
2420
- id: string;
2421
- }
2422
-
2423
4374
  export interface Range {
2424
4375
  /**
2425
4376
  * Reward amount for this range.
@@ -2435,6 +4386,16 @@ export namespace RuleCreateParams {
2435
4386
  * Start value of the range.
2436
4387
  */
2437
4388
  startRange: number;
4389
+
4390
+ /**
4391
+ * ID of the loyalty badge for this range.
4392
+ */
4393
+ loyaltyBadgeId?: string;
4394
+
4395
+ /**
4396
+ * Amount of the loyalty multiplier for this range.
4397
+ */
4398
+ loyaltyMultiplierAmount?: number;
2438
4399
  }
2439
4400
 
2440
4401
  /**
@@ -2487,20 +4448,15 @@ export namespace RuleCreateParams {
2487
4448
  * Object containing details of the associated smart contract.
2488
4449
  */
2489
4450
  export interface SmartContract {
2490
- /**
2491
- * ABI of the smart contract.
2492
- */
2493
- abi?: string | null;
2494
-
2495
4451
  /**
2496
4452
  * Mapping of addresses for the smart contract.
2497
4453
  */
2498
4454
  addressMapping?: string | null;
2499
4455
 
2500
4456
  /**
2501
- * Array of bonus details applied to the rule.
4457
+ * Object containing details of the amount multiplier from the event.
2502
4458
  */
2503
- bonus?: Array<SmartContract.Bonus> | null;
4459
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2504
4460
 
2505
4461
  /**
2506
4462
  * ID of the smart contract.
@@ -2512,68 +4468,31 @@ export namespace RuleCreateParams {
2512
4468
  */
2513
4469
  criteria?: 'everyEvent' | 'byParameter' | null;
2514
4470
 
2515
- /**
2516
- * Time range applied to the rule.
2517
- */
2518
- customRange?: SmartContract.CustomRange | null;
2519
-
2520
4471
  /**
2521
4472
  * Event emitted by the smart contract.
2522
4473
  */
2523
4474
  event?: string | null;
2524
4475
 
2525
- /**
2526
- * Maximum value allowed for the parameter.
2527
- */
2528
- max?: number | null;
2529
-
2530
4476
  /**
2531
4477
  * Array of parameters for the smart contract.
2532
4478
  */
2533
4479
  params?: Array<SmartContract.Param> | null;
2534
4480
 
2535
4481
  /**
2536
- * Flag indicating if a bonus is applied.
2537
- */
2538
- withBonus?: boolean | null;
2539
-
2540
- /**
2541
- * Flag indicating if a custom range is applied.
4482
+ * Type of the smart contract interaction.
2542
4483
  */
2543
- withCustomRange?: boolean | null;
2544
-
2545
- /**
2546
- * Flag indicating if a maximum limit is applied.
2547
- */
2548
- withMax?: boolean | null;
4484
+ type?: 'function' | 'event' | null;
2549
4485
  }
2550
4486
 
2551
4487
  export namespace SmartContract {
2552
- export interface Bonus {
2553
- /**
2554
- * Amount of the bonus.
2555
- */
2556
- amount?: number | null;
2557
-
2558
- /**
2559
- * Number of times the bonus is applied.
2560
- */
2561
- count?: number | null;
2562
- }
2563
-
2564
4488
  /**
2565
- * Time range applied to the rule.
4489
+ * Object containing details of the amount multiplier from the event.
2566
4490
  */
2567
- export interface CustomRange {
2568
- /**
2569
- * End time of the custom range.
2570
- */
2571
- endsAt?: string | null;
2572
-
4491
+ export interface AmountMultiplier {
2573
4492
  /**
2574
- * Start time of the custom range.
4493
+ * Mapping of the value for the smart contract.
2575
4494
  */
2576
- startsAt?: string | null;
4495
+ valueMapping?: string | null;
2577
4496
  }
2578
4497
 
2579
4498
  export interface Param {
@@ -2617,6 +4536,33 @@ export namespace RuleCreateParams {
2617
4536
  */
2618
4537
  streakMilestone: number;
2619
4538
  }
4539
+
4540
+ /**
4541
+ * Metadata for swap loyalty rules
4542
+ */
4543
+ export interface Swap {
4544
+ provider?: 'any' | 'relay' | 'lifi';
4545
+
4546
+ relayReferrerId?: string;
4547
+
4548
+ requireCrossChainSwap?: boolean;
4549
+
4550
+ swappedToChain?: 'any' | number | string;
4551
+
4552
+ swappedToTokens?: Array<Swap.SwappedToToken>;
4553
+
4554
+ tokenMode?: 'any' | 'specific';
4555
+
4556
+ trackTokenAmount?: boolean;
4557
+ }
4558
+
4559
+ export namespace Swap {
4560
+ export interface SwappedToToken {
4561
+ address: string;
4562
+
4563
+ chainId: string;
4564
+ }
4565
+ }
2620
4566
  }
2621
4567
 
2622
4568
  export interface Collection {
@@ -2629,35 +4575,57 @@ export namespace RuleCreateParams {
2629
4575
  * Blockchain network for the collection
2630
4576
  */
2631
4577
  network:
2632
- | 'mainnet'
2633
- | 'polygon'
2634
- | 'polygon_mumbai'
2635
- | 'optimism'
4578
+ | 'abstract'
4579
+ | 'abstractTestnet'
4580
+ | 'apechain'
2636
4581
  | 'arbitrum'
2637
- | 'binance'
2638
- | 'bscTestnet'
2639
4582
  | 'avalanche'
2640
4583
  | 'avalancheFuji'
2641
- | 'zksync'
2642
- | 'fantom'
2643
- | 'fantomTestnet'
2644
4584
  | 'base'
2645
4585
  | 'baseSepolia'
2646
- | 'skaleNebula'
2647
- | 'xai'
4586
+ | 'berachain'
2648
4587
  | 'berachainArtio'
2649
- | 'solana'
2650
- | 'apechain'
2651
- | 'flowMainnet'
4588
+ | 'berachainBepolia'
4589
+ | 'binance'
4590
+ | 'bscTestnet'
2652
4591
  | 'campTestnet'
4592
+ | 'fantom'
4593
+ | 'fantomTestnet'
4594
+ | 'flowMainnet'
4595
+ | 'mainnet'
4596
+ | 'optimism'
4597
+ | 'polygon'
4598
+ | 'polygon_mumbai'
4599
+ | 'skaleNebula'
4600
+ | 'solana'
4601
+ | 'sophon'
4602
+ | 'sophonTestnet'
2653
4603
  | 'sui'
4604
+ | 'superseed'
4605
+ | 'superseedSepolia'
2654
4606
  | 'vanar'
4607
+ | 'xai'
4608
+ | 'zksync'
4609
+ | 'coti'
4610
+ | 'cotiTestnet'
4611
+ | 'morph'
4612
+ | 'morphTestnet'
4613
+ | 'morphHolesky'
4614
+ | 'ultra'
4615
+ | 'ultraTestnet'
4616
+ | 'nitrograph'
2655
4617
  | 'sepolia'
2656
4618
  | 'optimism_sepolia'
2657
4619
  | 'arbitrumSepolia'
2658
4620
  | 'goerli'
2659
4621
  | 'optimism_goerli'
2660
- | 'arbitrumGoerli';
4622
+ | 'arbitrumGoerli'
4623
+ | 'basecamp';
4624
+
4625
+ /**
4626
+ * Symbol of the collection.
4627
+ */
4628
+ symbol?: string;
2661
4629
  }
2662
4630
  }
2663
4631
 
@@ -2667,41 +4635,16 @@ export interface RuleUpdateParams {
2667
4635
  */
2668
4636
  amount: unknown;
2669
4637
 
2670
- /**
2671
- * Effective end time of the rule
2672
- */
2673
- effectiveEndTime: string | null;
2674
-
2675
- /**
2676
- * Effective start time of the rule
2677
- */
2678
- effectiveStartTime: string | null;
2679
-
2680
4638
  /**
2681
4639
  * End time for the loyalty rule
2682
4640
  */
2683
4641
  endTime: string | null;
2684
4642
 
2685
- /**
2686
- * Frequency of the rule execution
2687
- */
2688
- frequency: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
2689
-
2690
- /**
2691
- * Additional metadata for the loyalty rule
2692
- */
2693
- metadata: RuleUpdateParams.Metadata;
2694
-
2695
4643
  /**
2696
4644
  * Name of the loyalty rule
2697
4645
  */
2698
4646
  name: string;
2699
4647
 
2700
- /**
2701
- * Start time for the loyalty rule
2702
- */
2703
- startTime: string | null;
2704
-
2705
4648
  /**
2706
4649
  * Blockchain address of the associated collection
2707
4650
  */
@@ -2727,6 +4670,26 @@ export interface RuleUpdateParams {
2727
4670
  */
2728
4671
  description?: string;
2729
4672
 
4673
+ /**
4674
+ * Effective end time of the rule
4675
+ */
4676
+ effectiveEndTime?: string | null;
4677
+
4678
+ /**
4679
+ * Effective start time of the rule
4680
+ */
4681
+ effectiveStartTime?: string | null;
4682
+
4683
+ /**
4684
+ * ID of the external integration
4685
+ */
4686
+ externalIntegrationId?: string | null;
4687
+
4688
+ /**
4689
+ * Frequency of the rule execution
4690
+ */
4691
+ frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
4692
+
2730
4693
  /**
2731
4694
  * Whether to hide this rule in the user interface
2732
4695
  */
@@ -2735,7 +4698,7 @@ export interface RuleUpdateParams {
2735
4698
  /**
2736
4699
  * Time interval for recurring rule execution
2737
4700
  */
2738
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
4701
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
2739
4702
 
2740
4703
  /**
2741
4704
  * Whether this rule is required for participation
@@ -2747,39 +4710,78 @@ export interface RuleUpdateParams {
2747
4710
  */
2748
4711
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
2749
4712
 
4713
+ /**
4714
+ * The interval for the max amount. Available for the smart contract and external
4715
+ * rules.
4716
+ */
4717
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
4718
+
4719
+ /**
4720
+ * The maximum amount of points a user can earn per interval. Available for the
4721
+ * smart contract and external rules.
4722
+ */
4723
+ maxAmountPerInterval?: number | null;
4724
+
4725
+ /**
4726
+ * URL of the media to be displayed
4727
+ */
4728
+ mediaUrl?: string | null;
4729
+
4730
+ /**
4731
+ * Additional metadata for the loyalty rule
4732
+ */
4733
+ metadata?: RuleUpdateParams.Metadata;
4734
+
2750
4735
  /**
2751
4736
  * Blockchain network where the rule will apply
2752
4737
  */
2753
4738
  network?:
2754
- | 'mainnet'
2755
- | 'polygon'
2756
- | 'polygon_mumbai'
2757
- | 'optimism'
4739
+ | 'abstract'
4740
+ | 'abstractTestnet'
4741
+ | 'apechain'
2758
4742
  | 'arbitrum'
2759
- | 'binance'
2760
- | 'bscTestnet'
2761
4743
  | 'avalanche'
2762
4744
  | 'avalancheFuji'
2763
- | 'zksync'
2764
- | 'fantom'
2765
- | 'fantomTestnet'
2766
4745
  | 'base'
2767
4746
  | 'baseSepolia'
2768
- | 'skaleNebula'
2769
- | 'xai'
4747
+ | 'berachain'
2770
4748
  | 'berachainArtio'
2771
- | 'solana'
2772
- | 'apechain'
2773
- | 'flowMainnet'
4749
+ | 'berachainBepolia'
4750
+ | 'binance'
4751
+ | 'bscTestnet'
2774
4752
  | 'campTestnet'
4753
+ | 'fantom'
4754
+ | 'fantomTestnet'
4755
+ | 'flowMainnet'
4756
+ | 'mainnet'
4757
+ | 'optimism'
4758
+ | 'polygon'
4759
+ | 'polygon_mumbai'
4760
+ | 'skaleNebula'
4761
+ | 'solana'
4762
+ | 'sophon'
4763
+ | 'sophonTestnet'
2775
4764
  | 'sui'
4765
+ | 'superseed'
4766
+ | 'superseedSepolia'
2776
4767
  | 'vanar'
4768
+ | 'xai'
4769
+ | 'zksync'
4770
+ | 'coti'
4771
+ | 'cotiTestnet'
4772
+ | 'morph'
4773
+ | 'morphTestnet'
4774
+ | 'morphHolesky'
4775
+ | 'ultra'
4776
+ | 'ultraTestnet'
4777
+ | 'nitrograph'
2777
4778
  | 'sepolia'
2778
4779
  | 'optimism_sepolia'
2779
4780
  | 'arbitrumSepolia'
2780
4781
  | 'goerli'
2781
4782
  | 'optimism_goerli'
2782
- | 'arbitrumGoerli';
4783
+ | 'arbitrumGoerli'
4784
+ | 'basecamp';
2783
4785
 
2784
4786
  /**
2785
4787
  * ID for associated OAuth credentials
@@ -2789,19 +4791,97 @@ export interface RuleUpdateParams {
2789
4791
  /**
2790
4792
  * Type of reward issued by this rule
2791
4793
  */
2792
- rewardType?: 'points' | 'multiplier';
4794
+ rewardType?: 'points' | 'multiplier' | 'badge';
4795
+
4796
+ /**
4797
+ * URL of the Shopify store
4798
+ */
4799
+ shopifyStoreUrl?: string | null;
4800
+
4801
+ /**
4802
+ * Start time for the loyalty rule
4803
+ */
4804
+ startTime?: string | null;
2793
4805
 
2794
4806
  /**
2795
- * Optional subscription identifier for the rule
4807
+ * Optional subscription id for the rule
2796
4808
  */
2797
- subscriptionIdentifier?: string | null;
4809
+ subscriptionId?: string | null;
2798
4810
  }
2799
4811
 
2800
4812
  export namespace RuleUpdateParams {
4813
+ export interface Collection {
4814
+ /**
4815
+ * Blockchain address of the collection
4816
+ */
4817
+ address: string;
4818
+
4819
+ /**
4820
+ * Blockchain network for the collection
4821
+ */
4822
+ network:
4823
+ | 'abstract'
4824
+ | 'abstractTestnet'
4825
+ | 'apechain'
4826
+ | 'arbitrum'
4827
+ | 'avalanche'
4828
+ | 'avalancheFuji'
4829
+ | 'base'
4830
+ | 'baseSepolia'
4831
+ | 'berachain'
4832
+ | 'berachainArtio'
4833
+ | 'berachainBepolia'
4834
+ | 'binance'
4835
+ | 'bscTestnet'
4836
+ | 'campTestnet'
4837
+ | 'fantom'
4838
+ | 'fantomTestnet'
4839
+ | 'flowMainnet'
4840
+ | 'mainnet'
4841
+ | 'optimism'
4842
+ | 'polygon'
4843
+ | 'polygon_mumbai'
4844
+ | 'skaleNebula'
4845
+ | 'solana'
4846
+ | 'sophon'
4847
+ | 'sophonTestnet'
4848
+ | 'sui'
4849
+ | 'superseed'
4850
+ | 'superseedSepolia'
4851
+ | 'vanar'
4852
+ | 'xai'
4853
+ | 'zksync'
4854
+ | 'coti'
4855
+ | 'cotiTestnet'
4856
+ | 'morph'
4857
+ | 'morphTestnet'
4858
+ | 'morphHolesky'
4859
+ | 'ultra'
4860
+ | 'ultraTestnet'
4861
+ | 'nitrograph'
4862
+ | 'sepolia'
4863
+ | 'optimism_sepolia'
4864
+ | 'arbitrumSepolia'
4865
+ | 'goerli'
4866
+ | 'optimism_goerli'
4867
+ | 'arbitrumGoerli'
4868
+ | 'basecamp';
4869
+
4870
+ /**
4871
+ * Symbol of the collection.
4872
+ */
4873
+ symbol?: string;
4874
+ }
4875
+
2801
4876
  /**
2802
4877
  * Additional metadata for the loyalty rule
2803
4878
  */
2804
4879
  export interface Metadata {
4880
+ /**
4881
+ * Number of tokens per batch.
4882
+ */
4883
+ batchSize?: number | null;
4884
+
2805
4885
  /**
2806
4886
  * Text displayed on the action button.
2807
4887
  */
@@ -2832,6 +4912,11 @@ export namespace RuleUpdateParams {
2832
4912
  */
2833
4913
  collection?: Array<Metadata.Collection>;
2834
4914
 
4915
+ /**
4916
+ * Conditions for completing the profile.
4917
+ */
4918
+ completeProfileConditions?: { [key: string]: boolean } | null;
4919
+
2835
4920
  /**
2836
4921
  * Object containing details for the call-to-action.
2837
4922
  */
@@ -2867,11 +4952,21 @@ export namespace RuleUpdateParams {
2867
4952
  */
2868
4953
  enableVerifiedMultiplier?: boolean;
2869
4954
 
4955
+ /**
4956
+ * Fill source of the order for the token sale
4957
+ */
4958
+ fillSource?: string;
4959
+
2870
4960
  /**
2871
4961
  * Percentage reward given to a user for their first referral.
2872
4962
  */
2873
4963
  firstReferralReward?: number | null;
2874
4964
 
4965
+ /**
4966
+ * Flag indicating whether the fill source is included.
4967
+ */
4968
+ hasFillSource?: boolean;
4969
+
2875
4970
  /**
2876
4971
  * Indicates if the item has never been sold.
2877
4972
  */
@@ -2897,11 +4992,21 @@ export namespace RuleUpdateParams {
2897
4992
  */
2898
4993
  imageUrl?: string | null;
2899
4994
 
4995
+ /**
4996
+ * If enabled, the first transaction done on the platform will complete this rule
4997
+ */
4998
+ isCheckInOnEveryTxn?: boolean;
4999
+
2900
5000
  /**
2901
5001
  * Indicates if the multiplier has been applied to rewards.
2902
5002
  */
2903
5003
  isMultiplierApplied?: boolean;
2904
5004
 
5005
+ /**
5006
+ * Flag indicating if the rule is restricted to new users.
5007
+ */
5008
+ isRestrictedToNewUsers?: boolean;
5009
+
2905
5010
  /**
2906
5011
  * Flag indicating if rewards are applied retroactively.
2907
5012
  */
@@ -2917,6 +5022,11 @@ export namespace RuleUpdateParams {
2917
5022
  */
2918
5023
  link?: string | null;
2919
5024
 
5025
+ /**
5026
+ * Liquidity pool details.
5027
+ */
5028
+ liquidity?: Metadata.Liquidity;
5029
+
2920
5030
  /**
2921
5031
  * Maximum quantity constraint for token holding.
2922
5032
  */
@@ -2945,12 +5055,37 @@ export namespace RuleUpdateParams {
2945
5055
  /**
2946
5056
  * Flag indicating whether to include only non-listed items.
2947
5057
  */
2948
- onlyNonListed?: boolean;
5058
+ onlyNonListed?: boolean;
5059
+
5060
+ /**
5061
+ * Indicates if only existing users are rewarded.
5062
+ */
5063
+ onlyRewardExistingUser?: boolean;
5064
+
5065
+ /**
5066
+ * give points for only one token ownership per contract
5067
+ */
5068
+ onlyRewardSingleTokenOwnership?: boolean | null;
5069
+
5070
+ /**
5071
+ * Promotional code associated with the rule.
5072
+ */
5073
+ promoCode?: string;
5074
+
5075
+ /**
5076
+ * URL of the CSV file containing promo codes.
5077
+ */
5078
+ promoCodeCsvUrl?: string;
5079
+
5080
+ /**
5081
+ * Numbers of the promotional code to be generated.
5082
+ */
5083
+ promoCodeLength?: number | null;
2949
5084
 
2950
5085
  /**
2951
- * Promotional code associated with the rule.
5086
+ * Type of the promotional code.
2952
5087
  */
2953
- promoCode?: string;
5088
+ promoCodeType?: 'code' | 'csv' | 'generate';
2954
5089
 
2955
5090
  /**
2956
5091
  * Array defining ranges and corresponding rewards.
@@ -2967,11 +5102,32 @@ export namespace RuleUpdateParams {
2967
5102
  */
2968
5103
  referrerReward?: number | null;
2969
5104
 
5105
+ /**
5106
+ * Loyalty currency ID of the referrer reward.
5107
+ */
5108
+ referrerRewardLoyaltyCurrencyId?: string | null;
5109
+
5110
+ /**
5111
+ * Flag indicating if the rule can also reward badges per range.
5112
+ */
5113
+ rewardBadgePerRange?: boolean;
5114
+
5115
+ /**
5116
+ * Flag indicating if the reward is rewarded by batch.
5117
+ */
5118
+ rewardByBatch?: boolean | null;
5119
+
2970
5120
  /**
2971
5121
  * Flag indicating if rewards are given per impression.
2972
5122
  */
2973
5123
  rewardPerImpression?: boolean | null;
2974
5124
 
5125
+ /**
5126
+ * Flag indicating if the rule should reward based on value of traded tokens
5127
+ * instead of count.
5128
+ */
5129
+ rewardPerValue?: boolean;
5130
+
2975
5131
  /**
2976
5132
  * Currency associated with sales.
2977
5133
  */
@@ -2982,6 +5138,11 @@ export namespace RuleUpdateParams {
2982
5138
  */
2983
5139
  secondReferralReward?: number | null;
2984
5140
 
5141
+ /**
5142
+ * Flag indicating if the multiplier is skipped.
5143
+ */
5144
+ skipMultiplier?: boolean | null;
5145
+
2985
5146
  /**
2986
5147
  * Object containing details of the associated smart contract.
2987
5148
  */
@@ -2996,14 +5157,17 @@ export namespace RuleUpdateParams {
2996
5157
  * Social media platform associated with the rule.
2997
5158
  */
2998
5159
  socialPlatform?:
2999
- | 'Twitch'
5160
+ | 'Custom'
5161
+ | 'Discord'
5162
+ | 'EpicGames'
5163
+ | 'Instagram'
5164
+ | 'Steam'
5165
+ | 'Telegram'
3000
5166
  | 'TikTok'
5167
+ | 'Twitch'
3001
5168
  | 'X(Twitter)'
3002
- | 'Instagram'
3003
- | 'EpicGames'
3004
5169
  | 'YouTube'
3005
- | 'Discord'
3006
- | 'Custom'
5170
+ | 'Google'
3007
5171
  | null;
3008
5172
 
3009
5173
  /**
@@ -3016,11 +5180,21 @@ export namespace RuleUpdateParams {
3016
5180
  */
3017
5181
  socialPlatformName?: string | null;
3018
5182
 
5183
+ /**
5184
+ * ID of the Steam app.
5185
+ */
5186
+ steamAppId?: string | null;
5187
+
3019
5188
  /**
3020
5189
  * Array of streak milestones and corresponding rewards.
3021
5190
  */
3022
5191
  streakArray?: Array<Metadata.StreakArray> | null;
3023
5192
 
5193
+ /**
5194
+ * Metadata for swap loyalty rules
5195
+ */
5196
+ swap?: Metadata.Swap;
5197
+
3024
5198
  /**
3025
5199
  * ID of the Telegram channel.
3026
5200
  */
@@ -3036,6 +5210,12 @@ export namespace RuleUpdateParams {
3036
5210
  */
3037
5211
  trackAllContracts?: boolean | null;
3038
5212
 
5213
+ /**
5214
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
5215
+ * completed once the progress is 100%.
5216
+ */
5217
+ trackProgress?: boolean | null;
5218
+
3039
5219
  /**
3040
5220
  * URL of the associated Twitter account.
3041
5221
  */
@@ -3079,7 +5259,17 @@ export namespace RuleUpdateParams {
3079
5259
  /**
3080
5260
  * Type of wallet associated with the rule.
3081
5261
  */
3082
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
5262
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
5263
+
5264
+ /**
5265
+ * ID of the Youtube channel.
5266
+ */
5267
+ youtubeChannelId?: string | null;
5268
+
5269
+ /**
5270
+ * ID of the Youtube video.
5271
+ */
5272
+ youtubeVideoId?: string | null;
3083
5273
  }
3084
5274
 
3085
5275
  export namespace Metadata {
@@ -3098,35 +5288,52 @@ export namespace RuleUpdateParams {
3098
5288
  * Blockchain network of the collection.
3099
5289
  */
3100
5290
  network?:
3101
- | 'mainnet'
3102
- | 'polygon'
3103
- | 'polygon_mumbai'
3104
- | 'optimism'
5291
+ | 'abstract'
5292
+ | 'abstractTestnet'
5293
+ | 'apechain'
3105
5294
  | 'arbitrum'
3106
- | 'binance'
3107
- | 'bscTestnet'
3108
5295
  | 'avalanche'
3109
5296
  | 'avalancheFuji'
3110
- | 'zksync'
3111
- | 'fantom'
3112
- | 'fantomTestnet'
3113
5297
  | 'base'
3114
5298
  | 'baseSepolia'
3115
- | 'skaleNebula'
3116
- | 'xai'
5299
+ | 'berachain'
3117
5300
  | 'berachainArtio'
3118
- | 'solana'
3119
- | 'apechain'
3120
- | 'flowMainnet'
5301
+ | 'berachainBepolia'
5302
+ | 'binance'
5303
+ | 'bscTestnet'
3121
5304
  | 'campTestnet'
5305
+ | 'fantom'
5306
+ | 'fantomTestnet'
5307
+ | 'flowMainnet'
5308
+ | 'mainnet'
5309
+ | 'optimism'
5310
+ | 'polygon'
5311
+ | 'polygon_mumbai'
5312
+ | 'skaleNebula'
5313
+ | 'solana'
5314
+ | 'sophon'
5315
+ | 'sophonTestnet'
3122
5316
  | 'sui'
5317
+ | 'superseed'
5318
+ | 'superseedSepolia'
3123
5319
  | 'vanar'
5320
+ | 'xai'
5321
+ | 'zksync'
5322
+ | 'coti'
5323
+ | 'cotiTestnet'
5324
+ | 'morph'
5325
+ | 'morphTestnet'
5326
+ | 'morphHolesky'
5327
+ | 'ultra'
5328
+ | 'ultraTestnet'
5329
+ | 'nitrograph'
3124
5330
  | 'sepolia'
3125
5331
  | 'optimism_sepolia'
3126
5332
  | 'arbitrumSepolia'
3127
5333
  | 'goerli'
3128
5334
  | 'optimism_goerli'
3129
- | 'arbitrumGoerli';
5335
+ | 'arbitrumGoerli'
5336
+ | 'basecamp';
3130
5337
  }
3131
5338
 
3132
5339
  /**
@@ -3172,6 +5379,11 @@ export namespace RuleUpdateParams {
3172
5379
  * Array of emojis used in the channel.
3173
5380
  */
3174
5381
  emojis?: Array<Channel.Emoji>;
5382
+
5383
+ /**
5384
+ * Phrase of text to be present in the discord message
5385
+ */
5386
+ text?: string;
3175
5387
  }
3176
5388
 
3177
5389
  export namespace Channel {
@@ -3198,6 +5410,103 @@ export namespace RuleUpdateParams {
3198
5410
  id: string;
3199
5411
  }
3200
5412
 
5413
+ /**
5414
+ * Liquidity pool details.
5415
+ */
5416
+ export interface Liquidity {
5417
+ /**
5418
+ * Calculation type of the liquidity pool.
5419
+ */
5420
+ calculationType?: 'fixed' | 'custom';
5421
+
5422
+ /**
5423
+ * Custom function to calculate the the reward amount based on the liquidity
5424
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
5425
+ * USD.
5426
+ */
5427
+ customFunction?: string;
5428
+
5429
+ /**
5430
+ * Liquidity provided per day in USD
5431
+ */
5432
+ liquidityPerDay?: number;
5433
+
5434
+ /**
5435
+ * Blockchain network of the liquidity pool.
5436
+ */
5437
+ network?:
5438
+ | 'abstract'
5439
+ | 'abstractTestnet'
5440
+ | 'apechain'
5441
+ | 'arbitrum'
5442
+ | 'avalanche'
5443
+ | 'avalancheFuji'
5444
+ | 'base'
5445
+ | 'baseSepolia'
5446
+ | 'berachain'
5447
+ | 'berachainArtio'
5448
+ | 'berachainBepolia'
5449
+ | 'binance'
5450
+ | 'bscTestnet'
5451
+ | 'campTestnet'
5452
+ | 'fantom'
5453
+ | 'fantomTestnet'
5454
+ | 'flowMainnet'
5455
+ | 'mainnet'
5456
+ | 'optimism'
5457
+ | 'polygon'
5458
+ | 'polygon_mumbai'
5459
+ | 'skaleNebula'
5460
+ | 'solana'
5461
+ | 'sophon'
5462
+ | 'sophonTestnet'
5463
+ | 'sui'
5464
+ | 'superseed'
5465
+ | 'superseedSepolia'
5466
+ | 'vanar'
5467
+ | 'xai'
5468
+ | 'zksync'
5469
+ | 'coti'
5470
+ | 'cotiTestnet'
5471
+ | 'morph'
5472
+ | 'morphTestnet'
5473
+ | 'morphHolesky'
5474
+ | 'ultra'
5475
+ | 'ultraTestnet'
5476
+ | 'nitrograph'
5477
+ | 'sepolia'
5478
+ | 'optimism_sepolia'
5479
+ | 'arbitrumSepolia'
5480
+ | 'goerli'
5481
+ | 'optimism_goerli'
5482
+ | 'arbitrumGoerli'
5483
+ | 'basecamp';
5484
+
5485
+ /**
5486
+ * Indicates if only in-range liquidity is rewarded.
5487
+ */
5488
+ onlyRewardInRangeLiquidity?: boolean;
5489
+
5490
+ /**
5491
+ * Array of liquidity pools associated with the rule.
5492
+ */
5493
+ pools?: Array<Liquidity.Pool>;
5494
+
5495
+ /**
5496
+ * Protocol of the liquidity pool.
5497
+ */
5498
+ protocol?: string;
5499
+ }
5500
+
5501
+ export namespace Liquidity {
5502
+ export interface Pool {
5503
+ /**
5504
+ * Unique identifier of the liquidity pool.
5505
+ */
5506
+ id: string;
5507
+ }
5508
+ }
5509
+
3201
5510
  export interface Range {
3202
5511
  /**
3203
5512
  * Reward amount for this range.
@@ -3213,6 +5522,16 @@ export namespace RuleUpdateParams {
3213
5522
  * Start value of the range.
3214
5523
  */
3215
5524
  startRange: number;
5525
+
5526
+ /**
5527
+ * ID of the loyalty badge for this range.
5528
+ */
5529
+ loyaltyBadgeId?: string;
5530
+
5531
+ /**
5532
+ * Amount of the loyalty multiplier for this range.
5533
+ */
5534
+ loyaltyMultiplierAmount?: number;
3216
5535
  }
3217
5536
 
3218
5537
  /**
@@ -3265,20 +5584,15 @@ export namespace RuleUpdateParams {
3265
5584
  * Object containing details of the associated smart contract.
3266
5585
  */
3267
5586
  export interface SmartContract {
3268
- /**
3269
- * ABI of the smart contract.
3270
- */
3271
- abi?: string | null;
3272
-
3273
5587
  /**
3274
5588
  * Mapping of addresses for the smart contract.
3275
5589
  */
3276
5590
  addressMapping?: string | null;
3277
5591
 
3278
5592
  /**
3279
- * Array of bonus details applied to the rule.
5593
+ * Object containing details of the amount multiplier from the event.
3280
5594
  */
3281
- bonus?: Array<SmartContract.Bonus> | null;
5595
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3282
5596
 
3283
5597
  /**
3284
5598
  * ID of the smart contract.
@@ -3290,68 +5604,31 @@ export namespace RuleUpdateParams {
3290
5604
  */
3291
5605
  criteria?: 'everyEvent' | 'byParameter' | null;
3292
5606
 
3293
- /**
3294
- * Time range applied to the rule.
3295
- */
3296
- customRange?: SmartContract.CustomRange | null;
3297
-
3298
5607
  /**
3299
5608
  * Event emitted by the smart contract.
3300
5609
  */
3301
5610
  event?: string | null;
3302
5611
 
3303
- /**
3304
- * Maximum value allowed for the parameter.
3305
- */
3306
- max?: number | null;
3307
-
3308
5612
  /**
3309
5613
  * Array of parameters for the smart contract.
3310
5614
  */
3311
5615
  params?: Array<SmartContract.Param> | null;
3312
5616
 
3313
5617
  /**
3314
- * Flag indicating if a bonus is applied.
3315
- */
3316
- withBonus?: boolean | null;
3317
-
3318
- /**
3319
- * Flag indicating if a custom range is applied.
3320
- */
3321
- withCustomRange?: boolean | null;
3322
-
3323
- /**
3324
- * Flag indicating if a maximum limit is applied.
5618
+ * Type of the smart contract interaction.
3325
5619
  */
3326
- withMax?: boolean | null;
5620
+ type?: 'function' | 'event' | null;
3327
5621
  }
3328
5622
 
3329
5623
  export namespace SmartContract {
3330
- export interface Bonus {
3331
- /**
3332
- * Amount of the bonus.
3333
- */
3334
- amount?: number | null;
3335
-
3336
- /**
3337
- * Number of times the bonus is applied.
3338
- */
3339
- count?: number | null;
3340
- }
3341
-
3342
5624
  /**
3343
- * Time range applied to the rule.
5625
+ * Object containing details of the amount multiplier from the event.
3344
5626
  */
3345
- export interface CustomRange {
3346
- /**
3347
- * End time of the custom range.
3348
- */
3349
- endsAt?: string | null;
3350
-
5627
+ export interface AmountMultiplier {
3351
5628
  /**
3352
- * Start time of the custom range.
5629
+ * Mapping of the value for the smart contract.
3353
5630
  */
3354
- startsAt?: string | null;
5631
+ valueMapping?: string | null;
3355
5632
  }
3356
5633
 
3357
5634
  export interface Param {
@@ -3395,61 +5672,78 @@ export namespace RuleUpdateParams {
3395
5672
  */
3396
5673
  streakMilestone: number;
3397
5674
  }
3398
- }
3399
5675
 
3400
- export interface Collection {
3401
5676
  /**
3402
- * Blockchain address of the collection
5677
+ * Metadata for swap loyalty rules
3403
5678
  */
3404
- address: string;
5679
+ export interface Swap {
5680
+ provider?: 'any' | 'relay' | 'lifi';
3405
5681
 
3406
- /**
3407
- * Blockchain network for the collection
3408
- */
3409
- network:
3410
- | 'mainnet'
3411
- | 'polygon'
3412
- | 'polygon_mumbai'
3413
- | 'optimism'
3414
- | 'arbitrum'
3415
- | 'binance'
3416
- | 'bscTestnet'
3417
- | 'avalanche'
3418
- | 'avalancheFuji'
3419
- | 'zksync'
3420
- | 'fantom'
3421
- | 'fantomTestnet'
3422
- | 'base'
3423
- | 'baseSepolia'
3424
- | 'skaleNebula'
3425
- | 'xai'
3426
- | 'berachainArtio'
3427
- | 'solana'
3428
- | 'apechain'
3429
- | 'flowMainnet'
3430
- | 'campTestnet'
3431
- | 'sui'
3432
- | 'vanar'
3433
- | 'sepolia'
3434
- | 'optimism_sepolia'
3435
- | 'arbitrumSepolia'
3436
- | 'goerli'
3437
- | 'optimism_goerli'
3438
- | 'arbitrumGoerli';
5682
+ relayReferrerId?: string;
5683
+
5684
+ requireCrossChainSwap?: boolean;
5685
+
5686
+ swappedToChain?: 'any' | number | string;
5687
+
5688
+ swappedToTokens?: Array<Swap.SwappedToToken>;
5689
+
5690
+ tokenMode?: 'any' | 'specific';
5691
+
5692
+ trackTokenAmount?: boolean;
5693
+ }
5694
+
5695
+ export namespace Swap {
5696
+ export interface SwappedToToken {
5697
+ address: string;
5698
+
5699
+ chainId: string;
5700
+ }
5701
+ }
3439
5702
  }
3440
5703
  }
3441
5704
 
3442
5705
  export interface RuleListParams {
5706
+ /**
5707
+ * IDs of the users to filter results by
5708
+ */
5709
+ allotedToUserId?: string | Array<string>;
5710
+
5711
+ /**
5712
+ * ID of the user group to filter results by
5713
+ */
5714
+ allotedUserGroupId?: string;
5715
+
3443
5716
  /**
3444
5717
  * Address of the collection to filter by
3445
5718
  */
3446
5719
  collectionAddress?: string;
3447
5720
 
3448
5721
  /**
3449
- * Maximum number of records to return (max 1000)
5722
+ * If true this will only return loyalty rule chains
5723
+ */
5724
+ includeLoyaltyRuleChains?: 'true' | 'false';
5725
+
5726
+ /**
5727
+ * If true this will only return active rules, the rules for which the startTime is
5728
+ * in the past and the endTime is in the future
5729
+ */
5730
+ isActive?: 'true' | 'false';
5731
+
5732
+ /**
5733
+ * Maximum number of records to return (max 100)
3450
5734
  */
3451
5735
  limit?: number;
3452
5736
 
5737
+ /**
5738
+ * ID of the loyalty rule group to filter results
5739
+ */
5740
+ loyaltyRuleGroupId?: string;
5741
+
5742
+ /**
5743
+ * The IDs of the loyalty rule
5744
+ */
5745
+ loyaltyRuleId?: string | Array<string>;
5746
+
3453
5747
  /**
3454
5748
  * Unique identifier for the organization to filter by
3455
5749
  */
@@ -3466,12 +5760,40 @@ export interface RuleListParams {
3466
5760
  websiteId?: string;
3467
5761
  }
3468
5762
 
5763
+ export interface RuleDeleteParams {
5764
+ /**
5765
+ * Whether to debit loyalty points
5766
+ */
5767
+ debitLoyaltyPoints?: string;
5768
+ }
5769
+
3469
5770
  export interface RuleCompleteParams {
5771
+ /**
5772
+ * Override amount for the reward (rounded to nearest whole number). This will
5773
+ * override the rule amount and reward the integer passed.
5774
+ */
5775
+ amount?: number | null;
5776
+
3470
5777
  /**
3471
5778
  * Link to the comment made by user
3472
5779
  */
3473
5780
  commentLink?: string;
3474
5781
 
5782
+ /**
5783
+ * Unique key to ensure idempotent requests.
5784
+ */
5785
+ idempotencyKey?: string;
5786
+
5787
+ /**
5788
+ * ID of the choice selected by the user
5789
+ */
5790
+ loyaltyQuestionChoiceId?: string;
5791
+
5792
+ /**
5793
+ * Value to compare with the range
5794
+ */
5795
+ rangeValue?: number | null;
5796
+
3475
5797
  /**
3476
5798
  * Unique identifier for the user
3477
5799
  */
@@ -3482,18 +5804,26 @@ export interface RuleCompleteParams {
3482
5804
  */
3483
5805
  verificationCode?: string;
3484
5806
 
5807
+ /**
5808
+ * Flag indicating if only verification is required, this will not create a
5809
+ * transaction and reward the user.
5810
+ */
5811
+ verifyOnly?: string;
5812
+
3485
5813
  /**
3486
5814
  * Wallet address of the user can only be used if userId is not provided
3487
5815
  */
3488
5816
  walletAddress?: string;
3489
5817
  }
3490
5818
 
3491
- export interface RuleStatusParams {
3492
- organizationId: string;
3493
-
3494
- websiteId: string;
5819
+ export interface RuleGetStatusParams {
5820
+ organizationId?: string;
3495
5821
 
3496
5822
  userId?: string;
5823
+
5824
+ walletAddress?: string;
5825
+
5826
+ websiteId?: string;
3497
5827
  }
3498
5828
 
3499
5829
  export declare namespace Rules {
@@ -3503,11 +5833,12 @@ export declare namespace Rules {
3503
5833
  type RuleListResponse as RuleListResponse,
3504
5834
  type RuleDeleteResponse as RuleDeleteResponse,
3505
5835
  type RuleCompleteResponse as RuleCompleteResponse,
3506
- type RuleStatusResponse as RuleStatusResponse,
5836
+ type RuleGetStatusResponse as RuleGetStatusResponse,
3507
5837
  type RuleCreateParams as RuleCreateParams,
3508
5838
  type RuleUpdateParams as RuleUpdateParams,
3509
5839
  type RuleListParams as RuleListParams,
5840
+ type RuleDeleteParams as RuleDeleteParams,
3510
5841
  type RuleCompleteParams as RuleCompleteParams,
3511
- type RuleStatusParams as RuleStatusParams,
5842
+ type RuleGetStatusParams as RuleGetStatusParams,
3512
5843
  };
3513
5844
  }