@snagsolutions/sdk 0.1.0-alpha.12 → 0.1.0-alpha.120

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 +1048 -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 +23 -9
  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 +26 -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 +2521 -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 +747 -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 +1775 -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 +111 -8
  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 +97 -24
  281. package/src/resource.ts +1 -1
  282. package/src/resources/assets.ts +31 -9
  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 +26 -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 +3542 -63
  302. package/src/resources/loyalty/rule-groups.ts +1161 -0
  303. package/src/resources/loyalty/rules.ts +2955 -574
  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 +163 -7
  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
  */
@@ -336,6 +491,11 @@ export namespace RuleCreateResponse {
336
491
  */
337
492
  customRewardsApiKey?: string;
338
493
 
494
+ /**
495
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
496
+ */
497
+ directRpc?: boolean;
498
+
339
499
  /**
340
500
  * Array of Discord servers, channels, and roles to join.
341
501
  */
@@ -361,11 +521,21 @@ export namespace RuleCreateResponse {
361
521
  */
362
522
  enableVerifiedMultiplier?: boolean;
363
523
 
524
+ /**
525
+ * Fill source of the order for the token sale
526
+ */
527
+ fillSource?: string;
528
+
364
529
  /**
365
530
  * Percentage reward given to a user for their first referral.
366
531
  */
367
532
  firstReferralReward?: number | null;
368
533
 
534
+ /**
535
+ * Flag indicating whether the fill source is included.
536
+ */
537
+ hasFillSource?: boolean;
538
+
369
539
  /**
370
540
  * Indicates if the item has never been sold.
371
541
  */
@@ -391,11 +561,21 @@ export namespace RuleCreateResponse {
391
561
  */
392
562
  imageUrl?: string | null;
393
563
 
564
+ /**
565
+ * If enabled, the first transaction done on the platform will complete this rule
566
+ */
567
+ isCheckInOnEveryTxn?: boolean;
568
+
394
569
  /**
395
570
  * Indicates if the multiplier has been applied to rewards.
396
571
  */
397
572
  isMultiplierApplied?: boolean;
398
573
 
574
+ /**
575
+ * Flag indicating if the rule is restricted to new users.
576
+ */
577
+ isRestrictedToNewUsers?: boolean;
578
+
399
579
  /**
400
580
  * Flag indicating if rewards are applied retroactively.
401
581
  */
@@ -411,6 +591,11 @@ export namespace RuleCreateResponse {
411
591
  */
412
592
  link?: string | null;
413
593
 
594
+ /**
595
+ * Liquidity pool details.
596
+ */
597
+ liquidity?: Metadata.Liquidity;
598
+
414
599
  /**
415
600
  * Maximum quantity constraint for token holding.
416
601
  */
@@ -441,11 +626,36 @@ export namespace RuleCreateResponse {
441
626
  */
442
627
  onlyNonListed?: boolean;
443
628
 
629
+ /**
630
+ * Indicates if only existing users are rewarded.
631
+ */
632
+ onlyRewardExistingUser?: boolean;
633
+
634
+ /**
635
+ * give points for only one token ownership per contract
636
+ */
637
+ onlyRewardSingleTokenOwnership?: boolean | null;
638
+
444
639
  /**
445
640
  * Promotional code associated with the rule.
446
641
  */
447
642
  promoCode?: string;
448
643
 
644
+ /**
645
+ * URL of the CSV file containing promo codes.
646
+ */
647
+ promoCodeCsvUrl?: string;
648
+
649
+ /**
650
+ * Numbers of the promotional code to be generated.
651
+ */
652
+ promoCodeLength?: number | null;
653
+
654
+ /**
655
+ * Type of the promotional code.
656
+ */
657
+ promoCodeType?: 'code' | 'csv' | 'generate';
658
+
449
659
  /**
450
660
  * Array defining ranges and corresponding rewards.
451
661
  */
@@ -461,11 +671,37 @@ export namespace RuleCreateResponse {
461
671
  */
462
672
  referrerReward?: number | null;
463
673
 
674
+ /**
675
+ * Loyalty currency ID of the referrer reward.
676
+ */
677
+ referrerRewardLoyaltyCurrencyId?: string | null;
678
+
679
+ /**
680
+ * Flag indicating if the post link is required.
681
+ */
682
+ requirePostLink?: boolean | null;
683
+
684
+ /**
685
+ * Flag indicating if the rule can also reward badges per range.
686
+ */
687
+ rewardBadgePerRange?: boolean;
688
+
689
+ /**
690
+ * Flag indicating if the reward is rewarded by batch.
691
+ */
692
+ rewardByBatch?: boolean | null;
693
+
464
694
  /**
465
695
  * Flag indicating if rewards are given per impression.
466
696
  */
467
697
  rewardPerImpression?: boolean | null;
468
698
 
699
+ /**
700
+ * Flag indicating if the rule should reward based on value of traded tokens
701
+ * instead of count.
702
+ */
703
+ rewardPerValue?: boolean;
704
+
469
705
  /**
470
706
  * Currency associated with sales.
471
707
  */
@@ -476,6 +712,11 @@ export namespace RuleCreateResponse {
476
712
  */
477
713
  secondReferralReward?: number | null;
478
714
 
715
+ /**
716
+ * Flag indicating if the multiplier is skipped.
717
+ */
718
+ skipMultiplier?: boolean | null;
719
+
479
720
  /**
480
721
  * Object containing details of the associated smart contract.
481
722
  */
@@ -490,14 +731,17 @@ export namespace RuleCreateResponse {
490
731
  * Social media platform associated with the rule.
491
732
  */
492
733
  socialPlatform?:
493
- | 'Twitch'
734
+ | 'Custom'
735
+ | 'Discord'
736
+ | 'EpicGames'
737
+ | 'Instagram'
738
+ | 'Steam'
739
+ | 'Telegram'
494
740
  | 'TikTok'
741
+ | 'Twitch'
495
742
  | 'X(Twitter)'
496
- | 'Instagram'
497
- | 'EpicGames'
498
743
  | 'YouTube'
499
- | 'Discord'
500
- | 'Custom'
744
+ | 'Google'
501
745
  | null;
502
746
 
503
747
  /**
@@ -510,11 +754,21 @@ export namespace RuleCreateResponse {
510
754
  */
511
755
  socialPlatformName?: string | null;
512
756
 
757
+ /**
758
+ * ID of the Steam app.
759
+ */
760
+ steamAppId?: string | null;
761
+
513
762
  /**
514
763
  * Array of streak milestones and corresponding rewards.
515
764
  */
516
765
  streakArray?: Array<Metadata.StreakArray> | null;
517
766
 
767
+ /**
768
+ * Metadata for swap loyalty rules
769
+ */
770
+ swap?: Metadata.Swap;
771
+
518
772
  /**
519
773
  * ID of the Telegram channel.
520
774
  */
@@ -530,6 +784,12 @@ export namespace RuleCreateResponse {
530
784
  */
531
785
  trackAllContracts?: boolean | null;
532
786
 
787
+ /**
788
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
789
+ * completed once the progress is 100%.
790
+ */
791
+ trackProgress?: boolean | null;
792
+
533
793
  /**
534
794
  * URL of the associated Twitter account.
535
795
  */
@@ -573,7 +833,17 @@ export namespace RuleCreateResponse {
573
833
  /**
574
834
  * Type of wallet associated with the rule.
575
835
  */
576
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
836
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
837
+
838
+ /**
839
+ * ID of the Youtube channel.
840
+ */
841
+ youtubeChannelId?: string | null;
842
+
843
+ /**
844
+ * ID of the Youtube video.
845
+ */
846
+ youtubeVideoId?: string | null;
577
847
  }
578
848
 
579
849
  export namespace Metadata {
@@ -592,35 +862,52 @@ export namespace RuleCreateResponse {
592
862
  * Blockchain network of the collection.
593
863
  */
594
864
  network?:
595
- | 'mainnet'
596
- | 'polygon'
597
- | 'polygon_mumbai'
598
- | 'optimism'
865
+ | 'abstract'
866
+ | 'abstractTestnet'
867
+ | 'apechain'
599
868
  | 'arbitrum'
600
- | 'binance'
601
- | 'bscTestnet'
602
869
  | 'avalanche'
603
870
  | 'avalancheFuji'
604
- | 'zksync'
605
- | 'fantom'
606
- | 'fantomTestnet'
607
871
  | 'base'
608
872
  | 'baseSepolia'
609
- | 'skaleNebula'
610
- | 'xai'
873
+ | 'berachain'
611
874
  | 'berachainArtio'
612
- | 'solana'
613
- | 'apechain'
614
- | 'flowMainnet'
875
+ | 'berachainBepolia'
876
+ | 'binance'
877
+ | 'bscTestnet'
615
878
  | 'campTestnet'
879
+ | 'fantom'
880
+ | 'fantomTestnet'
881
+ | 'flowMainnet'
882
+ | 'mainnet'
883
+ | 'optimism'
884
+ | 'polygon'
885
+ | 'polygon_mumbai'
886
+ | 'skaleNebula'
887
+ | 'solana'
888
+ | 'sophon'
889
+ | 'sophonTestnet'
616
890
  | 'sui'
891
+ | 'superseed'
892
+ | 'superseedSepolia'
617
893
  | 'vanar'
894
+ | 'xai'
895
+ | 'zksync'
896
+ | 'coti'
897
+ | 'cotiTestnet'
898
+ | 'morph'
899
+ | 'morphTestnet'
900
+ | 'morphHolesky'
901
+ | 'ultra'
902
+ | 'ultraTestnet'
903
+ | 'nitrograph'
618
904
  | 'sepolia'
619
905
  | 'optimism_sepolia'
620
906
  | 'arbitrumSepolia'
621
907
  | 'goerli'
622
908
  | 'optimism_goerli'
623
- | 'arbitrumGoerli';
909
+ | 'arbitrumGoerli'
910
+ | 'basecamp';
624
911
  }
625
912
 
626
913
  /**
@@ -666,6 +953,11 @@ export namespace RuleCreateResponse {
666
953
  * Array of emojis used in the channel.
667
954
  */
668
955
  emojis?: Array<Channel.Emoji>;
956
+
957
+ /**
958
+ * Phrase of text to be present in the discord message
959
+ */
960
+ text?: string;
669
961
  }
670
962
 
671
963
  export namespace Channel {
@@ -692,6 +984,103 @@ export namespace RuleCreateResponse {
692
984
  id: string;
693
985
  }
694
986
 
987
+ /**
988
+ * Liquidity pool details.
989
+ */
990
+ export interface Liquidity {
991
+ /**
992
+ * Calculation type of the liquidity pool.
993
+ */
994
+ calculationType?: 'fixed' | 'custom';
995
+
996
+ /**
997
+ * Custom function to calculate the the reward amount based on the liquidity
998
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
999
+ * USD.
1000
+ */
1001
+ customFunction?: string;
1002
+
1003
+ /**
1004
+ * Liquidity provided per day in USD
1005
+ */
1006
+ liquidityPerDay?: number;
1007
+
1008
+ /**
1009
+ * Blockchain network of the liquidity pool.
1010
+ */
1011
+ network?:
1012
+ | 'abstract'
1013
+ | 'abstractTestnet'
1014
+ | 'apechain'
1015
+ | 'arbitrum'
1016
+ | 'avalanche'
1017
+ | 'avalancheFuji'
1018
+ | 'base'
1019
+ | 'baseSepolia'
1020
+ | 'berachain'
1021
+ | 'berachainArtio'
1022
+ | 'berachainBepolia'
1023
+ | 'binance'
1024
+ | 'bscTestnet'
1025
+ | 'campTestnet'
1026
+ | 'fantom'
1027
+ | 'fantomTestnet'
1028
+ | 'flowMainnet'
1029
+ | 'mainnet'
1030
+ | 'optimism'
1031
+ | 'polygon'
1032
+ | 'polygon_mumbai'
1033
+ | 'skaleNebula'
1034
+ | 'solana'
1035
+ | 'sophon'
1036
+ | 'sophonTestnet'
1037
+ | 'sui'
1038
+ | 'superseed'
1039
+ | 'superseedSepolia'
1040
+ | 'vanar'
1041
+ | 'xai'
1042
+ | 'zksync'
1043
+ | 'coti'
1044
+ | 'cotiTestnet'
1045
+ | 'morph'
1046
+ | 'morphTestnet'
1047
+ | 'morphHolesky'
1048
+ | 'ultra'
1049
+ | 'ultraTestnet'
1050
+ | 'nitrograph'
1051
+ | 'sepolia'
1052
+ | 'optimism_sepolia'
1053
+ | 'arbitrumSepolia'
1054
+ | 'goerli'
1055
+ | 'optimism_goerli'
1056
+ | 'arbitrumGoerli'
1057
+ | 'basecamp';
1058
+
1059
+ /**
1060
+ * Indicates if only in-range liquidity is rewarded.
1061
+ */
1062
+ onlyRewardInRangeLiquidity?: boolean;
1063
+
1064
+ /**
1065
+ * Array of liquidity pools associated with the rule.
1066
+ */
1067
+ pools?: Array<Liquidity.Pool>;
1068
+
1069
+ /**
1070
+ * Protocol of the liquidity pool.
1071
+ */
1072
+ protocol?: string;
1073
+ }
1074
+
1075
+ export namespace Liquidity {
1076
+ export interface Pool {
1077
+ /**
1078
+ * Unique identifier of the liquidity pool.
1079
+ */
1080
+ id: string;
1081
+ }
1082
+ }
1083
+
695
1084
  export interface Range {
696
1085
  /**
697
1086
  * Reward amount for this range.
@@ -707,6 +1096,16 @@ export namespace RuleCreateResponse {
707
1096
  * Start value of the range.
708
1097
  */
709
1098
  startRange: number;
1099
+
1100
+ /**
1101
+ * ID of the loyalty badge for this range.
1102
+ */
1103
+ loyaltyBadgeId?: string;
1104
+
1105
+ /**
1106
+ * Amount of the loyalty multiplier for this range.
1107
+ */
1108
+ loyaltyMultiplierAmount?: number;
710
1109
  }
711
1110
 
712
1111
  /**
@@ -759,20 +1158,15 @@ export namespace RuleCreateResponse {
759
1158
  * Object containing details of the associated smart contract.
760
1159
  */
761
1160
  export interface SmartContract {
762
- /**
763
- * ABI of the smart contract.
764
- */
765
- abi?: string | null;
766
-
767
1161
  /**
768
1162
  * Mapping of addresses for the smart contract.
769
1163
  */
770
1164
  addressMapping?: string | null;
771
1165
 
772
1166
  /**
773
- * Array of bonus details applied to the rule.
1167
+ * Object containing details of the amount multiplier from the event.
774
1168
  */
775
- bonus?: Array<SmartContract.Bonus> | null;
1169
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
776
1170
 
777
1171
  /**
778
1172
  * ID of the smart contract.
@@ -784,71 +1178,34 @@ export namespace RuleCreateResponse {
784
1178
  */
785
1179
  criteria?: 'everyEvent' | 'byParameter' | null;
786
1180
 
787
- /**
788
- * Time range applied to the rule.
789
- */
790
- customRange?: SmartContract.CustomRange | null;
791
-
792
1181
  /**
793
1182
  * Event emitted by the smart contract.
794
1183
  */
795
1184
  event?: string | null;
796
1185
 
797
- /**
798
- * Maximum value allowed for the parameter.
799
- */
800
- max?: number | null;
801
-
802
1186
  /**
803
1187
  * Array of parameters for the smart contract.
804
1188
  */
805
1189
  params?: Array<SmartContract.Param> | null;
806
1190
 
807
1191
  /**
808
- * Flag indicating if a bonus is applied.
809
- */
810
- withBonus?: boolean | null;
811
-
812
- /**
813
- * Flag indicating if a custom range is applied.
1192
+ * Type of the smart contract interaction.
814
1193
  */
815
- withCustomRange?: boolean | null;
816
-
817
- /**
818
- * Flag indicating if a maximum limit is applied.
819
- */
820
- withMax?: boolean | null;
1194
+ type?: 'function' | 'event' | null;
821
1195
  }
822
1196
 
823
1197
  export namespace SmartContract {
824
- export interface Bonus {
1198
+ /**
1199
+ * Object containing details of the amount multiplier from the event.
1200
+ */
1201
+ export interface AmountMultiplier {
825
1202
  /**
826
- * Amount of the bonus.
1203
+ * Mapping of the value for the smart contract.
827
1204
  */
828
- amount?: number | null;
1205
+ valueMapping?: string | null;
1206
+ }
829
1207
 
830
- /**
831
- * Number of times the bonus is applied.
832
- */
833
- count?: number | null;
834
- }
835
-
836
- /**
837
- * Time range applied to the rule.
838
- */
839
- export interface CustomRange {
840
- /**
841
- * End time of the custom range.
842
- */
843
- endsAt?: string | null;
844
-
845
- /**
846
- * Start time of the custom range.
847
- */
848
- startsAt?: string | null;
849
- }
850
-
851
- export interface Param {
1208
+ export interface Param {
852
1209
  /**
853
1210
  * Condition to check for the parameter.
854
1211
  */
@@ -889,6 +1246,33 @@ export namespace RuleCreateResponse {
889
1246
  */
890
1247
  streakMilestone: number;
891
1248
  }
1249
+
1250
+ /**
1251
+ * Metadata for swap loyalty rules
1252
+ */
1253
+ export interface Swap {
1254
+ provider?: 'any' | 'relay' | 'lifi';
1255
+
1256
+ relayReferrerId?: string;
1257
+
1258
+ requireCrossChainSwap?: boolean;
1259
+
1260
+ swappedToChain?: 'any' | number | string;
1261
+
1262
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1263
+
1264
+ tokenMode?: 'any' | 'specific';
1265
+
1266
+ trackTokenAmount?: boolean;
1267
+ }
1268
+
1269
+ export namespace Swap {
1270
+ export interface SwappedToToken {
1271
+ address: string;
1272
+
1273
+ chainId: string;
1274
+ }
1275
+ }
892
1276
  }
893
1277
 
894
1278
  export interface Collection {
@@ -901,35 +1285,57 @@ export namespace RuleCreateResponse {
901
1285
  * Blockchain network for the collection
902
1286
  */
903
1287
  network:
904
- | 'mainnet'
905
- | 'polygon'
906
- | 'polygon_mumbai'
907
- | 'optimism'
1288
+ | 'abstract'
1289
+ | 'abstractTestnet'
1290
+ | 'apechain'
908
1291
  | 'arbitrum'
909
- | 'binance'
910
- | 'bscTestnet'
911
1292
  | 'avalanche'
912
1293
  | 'avalancheFuji'
913
- | 'zksync'
914
- | 'fantom'
915
- | 'fantomTestnet'
916
1294
  | 'base'
917
1295
  | 'baseSepolia'
918
- | 'skaleNebula'
919
- | 'xai'
1296
+ | 'berachain'
920
1297
  | 'berachainArtio'
921
- | 'solana'
922
- | 'apechain'
923
- | 'flowMainnet'
1298
+ | 'berachainBepolia'
1299
+ | 'binance'
1300
+ | 'bscTestnet'
924
1301
  | 'campTestnet'
1302
+ | 'fantom'
1303
+ | 'fantomTestnet'
1304
+ | 'flowMainnet'
1305
+ | 'mainnet'
1306
+ | 'optimism'
1307
+ | 'polygon'
1308
+ | 'polygon_mumbai'
1309
+ | 'skaleNebula'
1310
+ | 'solana'
1311
+ | 'sophon'
1312
+ | 'sophonTestnet'
925
1313
  | 'sui'
1314
+ | 'superseed'
1315
+ | 'superseedSepolia'
926
1316
  | 'vanar'
1317
+ | 'xai'
1318
+ | 'zksync'
1319
+ | 'coti'
1320
+ | 'cotiTestnet'
1321
+ | 'morph'
1322
+ | 'morphTestnet'
1323
+ | 'morphHolesky'
1324
+ | 'ultra'
1325
+ | 'ultraTestnet'
1326
+ | 'nitrograph'
927
1327
  | 'sepolia'
928
1328
  | 'optimism_sepolia'
929
1329
  | 'arbitrumSepolia'
930
1330
  | 'goerli'
931
1331
  | 'optimism_goerli'
932
- | 'arbitrumGoerli';
1332
+ | 'arbitrumGoerli'
1333
+ | 'basecamp';
1334
+
1335
+ /**
1336
+ * Symbol of the collection.
1337
+ */
1338
+ symbol?: string;
933
1339
  }
934
1340
  }
935
1341
 
@@ -941,41 +1347,16 @@ export interface RuleUpdateResponse {
941
1347
  */
942
1348
  amount: unknown;
943
1349
 
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
1350
  /**
955
1351
  * End time for the loyalty rule
956
1352
  */
957
1353
  endTime: string | null;
958
1354
 
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
1355
  /**
970
1356
  * Name of the loyalty rule
971
1357
  */
972
1358
  name: string;
973
1359
 
974
- /**
975
- * Start time for the loyalty rule
976
- */
977
- startTime: string | null;
978
-
979
1360
  /**
980
1361
  * Blockchain address of the associated collection
981
1362
  */
@@ -1001,6 +1382,26 @@ export interface RuleUpdateResponse {
1001
1382
  */
1002
1383
  description?: string;
1003
1384
 
1385
+ /**
1386
+ * Effective end time of the rule
1387
+ */
1388
+ effectiveEndTime?: string | null;
1389
+
1390
+ /**
1391
+ * Effective start time of the rule
1392
+ */
1393
+ effectiveStartTime?: string | null;
1394
+
1395
+ /**
1396
+ * ID of the external integration
1397
+ */
1398
+ externalIntegrationId?: string | null;
1399
+
1400
+ /**
1401
+ * Frequency of the rule execution
1402
+ */
1403
+ frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
1404
+
1004
1405
  /**
1005
1406
  * Whether to hide this rule in the user interface
1006
1407
  */
@@ -1009,7 +1410,7 @@ export interface RuleUpdateResponse {
1009
1410
  /**
1010
1411
  * Time interval for recurring rule execution
1011
1412
  */
1012
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
1413
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1013
1414
 
1014
1415
  /**
1015
1416
  * Whether this rule is required for participation
@@ -1021,39 +1422,78 @@ export interface RuleUpdateResponse {
1021
1422
  */
1022
1423
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
1023
1424
 
1425
+ /**
1426
+ * The interval for the max amount. Available for the smart contract and external
1427
+ * rules.
1428
+ */
1429
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
1430
+
1431
+ /**
1432
+ * The maximum amount of points a user can earn per interval. Available for the
1433
+ * smart contract and external rules.
1434
+ */
1435
+ maxAmountPerInterval?: number | null;
1436
+
1437
+ /**
1438
+ * URL of the media to be displayed
1439
+ */
1440
+ mediaUrl?: string | null;
1441
+
1442
+ /**
1443
+ * Additional metadata for the loyalty rule
1444
+ */
1445
+ metadata?: RuleUpdateResponse.Metadata;
1446
+
1024
1447
  /**
1025
1448
  * Blockchain network where the rule will apply
1026
1449
  */
1027
1450
  network?:
1028
- | 'mainnet'
1029
- | 'polygon'
1030
- | 'polygon_mumbai'
1031
- | 'optimism'
1451
+ | 'abstract'
1452
+ | 'abstractTestnet'
1453
+ | 'apechain'
1032
1454
  | 'arbitrum'
1033
- | 'binance'
1034
- | 'bscTestnet'
1035
1455
  | 'avalanche'
1036
1456
  | 'avalancheFuji'
1037
- | 'zksync'
1038
- | 'fantom'
1039
- | 'fantomTestnet'
1040
1457
  | 'base'
1041
1458
  | 'baseSepolia'
1042
- | 'skaleNebula'
1043
- | 'xai'
1459
+ | 'berachain'
1044
1460
  | 'berachainArtio'
1045
- | 'solana'
1046
- | 'apechain'
1047
- | 'flowMainnet'
1461
+ | 'berachainBepolia'
1462
+ | 'binance'
1463
+ | 'bscTestnet'
1048
1464
  | 'campTestnet'
1465
+ | 'fantom'
1466
+ | 'fantomTestnet'
1467
+ | 'flowMainnet'
1468
+ | 'mainnet'
1469
+ | 'optimism'
1470
+ | 'polygon'
1471
+ | 'polygon_mumbai'
1472
+ | 'skaleNebula'
1473
+ | 'solana'
1474
+ | 'sophon'
1475
+ | 'sophonTestnet'
1049
1476
  | 'sui'
1477
+ | 'superseed'
1478
+ | 'superseedSepolia'
1050
1479
  | 'vanar'
1480
+ | 'xai'
1481
+ | 'zksync'
1482
+ | 'coti'
1483
+ | 'cotiTestnet'
1484
+ | 'morph'
1485
+ | 'morphTestnet'
1486
+ | 'morphHolesky'
1487
+ | 'ultra'
1488
+ | 'ultraTestnet'
1489
+ | 'nitrograph'
1051
1490
  | 'sepolia'
1052
1491
  | 'optimism_sepolia'
1053
1492
  | 'arbitrumSepolia'
1054
1493
  | 'goerli'
1055
1494
  | 'optimism_goerli'
1056
- | 'arbitrumGoerli';
1495
+ | 'arbitrumGoerli'
1496
+ | 'basecamp';
1057
1497
 
1058
1498
  /**
1059
1499
  * ID for associated OAuth credentials
@@ -1063,19 +1503,97 @@ export interface RuleUpdateResponse {
1063
1503
  /**
1064
1504
  * Type of reward issued by this rule
1065
1505
  */
1066
- rewardType?: 'points' | 'multiplier';
1506
+ rewardType?: 'points' | 'multiplier' | 'badge';
1507
+
1508
+ /**
1509
+ * URL of the Shopify store
1510
+ */
1511
+ shopifyStoreUrl?: string | null;
1512
+
1513
+ /**
1514
+ * Start time for the loyalty rule
1515
+ */
1516
+ startTime?: string | null;
1067
1517
 
1068
1518
  /**
1069
- * Optional subscription identifier for the rule
1519
+ * Optional subscription id for the rule
1070
1520
  */
1071
- subscriptionIdentifier?: string | null;
1521
+ subscriptionId?: string | null;
1072
1522
  }
1073
1523
 
1074
1524
  export namespace RuleUpdateResponse {
1525
+ export interface Collection {
1526
+ /**
1527
+ * Blockchain address of the collection
1528
+ */
1529
+ address: string;
1530
+
1531
+ /**
1532
+ * Blockchain network for the collection
1533
+ */
1534
+ network:
1535
+ | 'abstract'
1536
+ | 'abstractTestnet'
1537
+ | 'apechain'
1538
+ | 'arbitrum'
1539
+ | 'avalanche'
1540
+ | 'avalancheFuji'
1541
+ | 'base'
1542
+ | 'baseSepolia'
1543
+ | 'berachain'
1544
+ | 'berachainArtio'
1545
+ | 'berachainBepolia'
1546
+ | 'binance'
1547
+ | 'bscTestnet'
1548
+ | 'campTestnet'
1549
+ | 'fantom'
1550
+ | 'fantomTestnet'
1551
+ | 'flowMainnet'
1552
+ | 'mainnet'
1553
+ | 'optimism'
1554
+ | 'polygon'
1555
+ | 'polygon_mumbai'
1556
+ | 'skaleNebula'
1557
+ | 'solana'
1558
+ | 'sophon'
1559
+ | 'sophonTestnet'
1560
+ | 'sui'
1561
+ | 'superseed'
1562
+ | 'superseedSepolia'
1563
+ | 'vanar'
1564
+ | 'xai'
1565
+ | 'zksync'
1566
+ | 'coti'
1567
+ | 'cotiTestnet'
1568
+ | 'morph'
1569
+ | 'morphTestnet'
1570
+ | 'morphHolesky'
1571
+ | 'ultra'
1572
+ | 'ultraTestnet'
1573
+ | 'nitrograph'
1574
+ | 'sepolia'
1575
+ | 'optimism_sepolia'
1576
+ | 'arbitrumSepolia'
1577
+ | 'goerli'
1578
+ | 'optimism_goerli'
1579
+ | 'arbitrumGoerli'
1580
+ | 'basecamp';
1581
+
1582
+ /**
1583
+ * Symbol of the collection.
1584
+ */
1585
+ symbol?: string;
1586
+ }
1587
+
1075
1588
  /**
1076
1589
  * Additional metadata for the loyalty rule
1077
1590
  */
1078
1591
  export interface Metadata {
1592
+ /**
1593
+ * Number of tokens per batch.
1594
+ */
1595
+ batchSize?: number | null;
1596
+
1079
1597
  /**
1080
1598
  * Text displayed on the action button.
1081
1599
  */
@@ -1106,6 +1624,11 @@ export namespace RuleUpdateResponse {
1106
1624
  */
1107
1625
  collection?: Array<Metadata.Collection>;
1108
1626
 
1627
+ /**
1628
+ * Conditions for completing the profile.
1629
+ */
1630
+ completeProfileConditions?: { [key: string]: boolean } | null;
1631
+
1109
1632
  /**
1110
1633
  * Object containing details for the call-to-action.
1111
1634
  */
@@ -1116,6 +1639,11 @@ export namespace RuleUpdateResponse {
1116
1639
  */
1117
1640
  customRewardsApiKey?: string;
1118
1641
 
1642
+ /**
1643
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
1644
+ */
1645
+ directRpc?: boolean;
1646
+
1119
1647
  /**
1120
1648
  * Array of Discord servers, channels, and roles to join.
1121
1649
  */
@@ -1141,11 +1669,21 @@ export namespace RuleUpdateResponse {
1141
1669
  */
1142
1670
  enableVerifiedMultiplier?: boolean;
1143
1671
 
1672
+ /**
1673
+ * Fill source of the order for the token sale
1674
+ */
1675
+ fillSource?: string;
1676
+
1144
1677
  /**
1145
1678
  * Percentage reward given to a user for their first referral.
1146
1679
  */
1147
1680
  firstReferralReward?: number | null;
1148
1681
 
1682
+ /**
1683
+ * Flag indicating whether the fill source is included.
1684
+ */
1685
+ hasFillSource?: boolean;
1686
+
1149
1687
  /**
1150
1688
  * Indicates if the item has never been sold.
1151
1689
  */
@@ -1171,11 +1709,21 @@ export namespace RuleUpdateResponse {
1171
1709
  */
1172
1710
  imageUrl?: string | null;
1173
1711
 
1712
+ /**
1713
+ * If enabled, the first transaction done on the platform will complete this rule
1714
+ */
1715
+ isCheckInOnEveryTxn?: boolean;
1716
+
1174
1717
  /**
1175
1718
  * Indicates if the multiplier has been applied to rewards.
1176
1719
  */
1177
1720
  isMultiplierApplied?: boolean;
1178
1721
 
1722
+ /**
1723
+ * Flag indicating if the rule is restricted to new users.
1724
+ */
1725
+ isRestrictedToNewUsers?: boolean;
1726
+
1179
1727
  /**
1180
1728
  * Flag indicating if rewards are applied retroactively.
1181
1729
  */
@@ -1191,6 +1739,11 @@ export namespace RuleUpdateResponse {
1191
1739
  */
1192
1740
  link?: string | null;
1193
1741
 
1742
+ /**
1743
+ * Liquidity pool details.
1744
+ */
1745
+ liquidity?: Metadata.Liquidity;
1746
+
1194
1747
  /**
1195
1748
  * Maximum quantity constraint for token holding.
1196
1749
  */
@@ -1221,11 +1774,36 @@ export namespace RuleUpdateResponse {
1221
1774
  */
1222
1775
  onlyNonListed?: boolean;
1223
1776
 
1777
+ /**
1778
+ * Indicates if only existing users are rewarded.
1779
+ */
1780
+ onlyRewardExistingUser?: boolean;
1781
+
1782
+ /**
1783
+ * give points for only one token ownership per contract
1784
+ */
1785
+ onlyRewardSingleTokenOwnership?: boolean | null;
1786
+
1224
1787
  /**
1225
1788
  * Promotional code associated with the rule.
1226
1789
  */
1227
1790
  promoCode?: string;
1228
1791
 
1792
+ /**
1793
+ * URL of the CSV file containing promo codes.
1794
+ */
1795
+ promoCodeCsvUrl?: string;
1796
+
1797
+ /**
1798
+ * Numbers of the promotional code to be generated.
1799
+ */
1800
+ promoCodeLength?: number | null;
1801
+
1802
+ /**
1803
+ * Type of the promotional code.
1804
+ */
1805
+ promoCodeType?: 'code' | 'csv' | 'generate';
1806
+
1229
1807
  /**
1230
1808
  * Array defining ranges and corresponding rewards.
1231
1809
  */
@@ -1241,11 +1819,37 @@ export namespace RuleUpdateResponse {
1241
1819
  */
1242
1820
  referrerReward?: number | null;
1243
1821
 
1822
+ /**
1823
+ * Loyalty currency ID of the referrer reward.
1824
+ */
1825
+ referrerRewardLoyaltyCurrencyId?: string | null;
1826
+
1827
+ /**
1828
+ * Flag indicating if the post link is required.
1829
+ */
1830
+ requirePostLink?: boolean | null;
1831
+
1832
+ /**
1833
+ * Flag indicating if the rule can also reward badges per range.
1834
+ */
1835
+ rewardBadgePerRange?: boolean;
1836
+
1837
+ /**
1838
+ * Flag indicating if the reward is rewarded by batch.
1839
+ */
1840
+ rewardByBatch?: boolean | null;
1841
+
1244
1842
  /**
1245
1843
  * Flag indicating if rewards are given per impression.
1246
1844
  */
1247
1845
  rewardPerImpression?: boolean | null;
1248
1846
 
1847
+ /**
1848
+ * Flag indicating if the rule should reward based on value of traded tokens
1849
+ * instead of count.
1850
+ */
1851
+ rewardPerValue?: boolean;
1852
+
1249
1853
  /**
1250
1854
  * Currency associated with sales.
1251
1855
  */
@@ -1256,6 +1860,11 @@ export namespace RuleUpdateResponse {
1256
1860
  */
1257
1861
  secondReferralReward?: number | null;
1258
1862
 
1863
+ /**
1864
+ * Flag indicating if the multiplier is skipped.
1865
+ */
1866
+ skipMultiplier?: boolean | null;
1867
+
1259
1868
  /**
1260
1869
  * Object containing details of the associated smart contract.
1261
1870
  */
@@ -1270,14 +1879,17 @@ export namespace RuleUpdateResponse {
1270
1879
  * Social media platform associated with the rule.
1271
1880
  */
1272
1881
  socialPlatform?:
1273
- | 'Twitch'
1882
+ | 'Custom'
1883
+ | 'Discord'
1884
+ | 'EpicGames'
1885
+ | 'Instagram'
1886
+ | 'Steam'
1887
+ | 'Telegram'
1274
1888
  | 'TikTok'
1889
+ | 'Twitch'
1275
1890
  | 'X(Twitter)'
1276
- | 'Instagram'
1277
- | 'EpicGames'
1278
1891
  | 'YouTube'
1279
- | 'Discord'
1280
- | 'Custom'
1892
+ | 'Google'
1281
1893
  | null;
1282
1894
 
1283
1895
  /**
@@ -1290,11 +1902,21 @@ export namespace RuleUpdateResponse {
1290
1902
  */
1291
1903
  socialPlatformName?: string | null;
1292
1904
 
1905
+ /**
1906
+ * ID of the Steam app.
1907
+ */
1908
+ steamAppId?: string | null;
1909
+
1293
1910
  /**
1294
1911
  * Array of streak milestones and corresponding rewards.
1295
1912
  */
1296
1913
  streakArray?: Array<Metadata.StreakArray> | null;
1297
1914
 
1915
+ /**
1916
+ * Metadata for swap loyalty rules
1917
+ */
1918
+ swap?: Metadata.Swap;
1919
+
1298
1920
  /**
1299
1921
  * ID of the Telegram channel.
1300
1922
  */
@@ -1310,6 +1932,12 @@ export namespace RuleUpdateResponse {
1310
1932
  */
1311
1933
  trackAllContracts?: boolean | null;
1312
1934
 
1935
+ /**
1936
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
1937
+ * completed once the progress is 100%.
1938
+ */
1939
+ trackProgress?: boolean | null;
1940
+
1313
1941
  /**
1314
1942
  * URL of the associated Twitter account.
1315
1943
  */
@@ -1353,7 +1981,17 @@ export namespace RuleUpdateResponse {
1353
1981
  /**
1354
1982
  * Type of wallet associated with the rule.
1355
1983
  */
1356
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
1984
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
1985
+
1986
+ /**
1987
+ * ID of the Youtube channel.
1988
+ */
1989
+ youtubeChannelId?: string | null;
1990
+
1991
+ /**
1992
+ * ID of the Youtube video.
1993
+ */
1994
+ youtubeVideoId?: string | null;
1357
1995
  }
1358
1996
 
1359
1997
  export namespace Metadata {
@@ -1372,35 +2010,52 @@ export namespace RuleUpdateResponse {
1372
2010
  * Blockchain network of the collection.
1373
2011
  */
1374
2012
  network?:
1375
- | 'mainnet'
1376
- | 'polygon'
1377
- | 'polygon_mumbai'
1378
- | 'optimism'
2013
+ | 'abstract'
2014
+ | 'abstractTestnet'
2015
+ | 'apechain'
1379
2016
  | 'arbitrum'
1380
- | 'binance'
1381
- | 'bscTestnet'
1382
2017
  | 'avalanche'
1383
2018
  | 'avalancheFuji'
1384
- | 'zksync'
1385
- | 'fantom'
1386
- | 'fantomTestnet'
1387
2019
  | 'base'
1388
2020
  | 'baseSepolia'
1389
- | 'skaleNebula'
1390
- | 'xai'
2021
+ | 'berachain'
1391
2022
  | 'berachainArtio'
1392
- | 'solana'
1393
- | 'apechain'
1394
- | 'flowMainnet'
2023
+ | 'berachainBepolia'
2024
+ | 'binance'
2025
+ | 'bscTestnet'
1395
2026
  | 'campTestnet'
2027
+ | 'fantom'
2028
+ | 'fantomTestnet'
2029
+ | 'flowMainnet'
2030
+ | 'mainnet'
2031
+ | 'optimism'
2032
+ | 'polygon'
2033
+ | 'polygon_mumbai'
2034
+ | 'skaleNebula'
2035
+ | 'solana'
2036
+ | 'sophon'
2037
+ | 'sophonTestnet'
1396
2038
  | 'sui'
2039
+ | 'superseed'
2040
+ | 'superseedSepolia'
1397
2041
  | 'vanar'
2042
+ | 'xai'
2043
+ | 'zksync'
2044
+ | 'coti'
2045
+ | 'cotiTestnet'
2046
+ | 'morph'
2047
+ | 'morphTestnet'
2048
+ | 'morphHolesky'
2049
+ | 'ultra'
2050
+ | 'ultraTestnet'
2051
+ | 'nitrograph'
1398
2052
  | 'sepolia'
1399
2053
  | 'optimism_sepolia'
1400
2054
  | 'arbitrumSepolia'
1401
2055
  | 'goerli'
1402
2056
  | 'optimism_goerli'
1403
- | 'arbitrumGoerli';
2057
+ | 'arbitrumGoerli'
2058
+ | 'basecamp';
1404
2059
  }
1405
2060
 
1406
2061
  /**
@@ -1446,6 +2101,11 @@ export namespace RuleUpdateResponse {
1446
2101
  * Array of emojis used in the channel.
1447
2102
  */
1448
2103
  emojis?: Array<Channel.Emoji>;
2104
+
2105
+ /**
2106
+ * Phrase of text to be present in the discord message
2107
+ */
2108
+ text?: string;
1449
2109
  }
1450
2110
 
1451
2111
  export namespace Channel {
@@ -1472,6 +2132,103 @@ export namespace RuleUpdateResponse {
1472
2132
  id: string;
1473
2133
  }
1474
2134
 
2135
+ /**
2136
+ * Liquidity pool details.
2137
+ */
2138
+ export interface Liquidity {
2139
+ /**
2140
+ * Calculation type of the liquidity pool.
2141
+ */
2142
+ calculationType?: 'fixed' | 'custom';
2143
+
2144
+ /**
2145
+ * Custom function to calculate the the reward amount based on the liquidity
2146
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2147
+ * USD.
2148
+ */
2149
+ customFunction?: string;
2150
+
2151
+ /**
2152
+ * Liquidity provided per day in USD
2153
+ */
2154
+ liquidityPerDay?: number;
2155
+
2156
+ /**
2157
+ * Blockchain network of the liquidity pool.
2158
+ */
2159
+ network?:
2160
+ | 'abstract'
2161
+ | 'abstractTestnet'
2162
+ | 'apechain'
2163
+ | 'arbitrum'
2164
+ | 'avalanche'
2165
+ | 'avalancheFuji'
2166
+ | 'base'
2167
+ | 'baseSepolia'
2168
+ | 'berachain'
2169
+ | 'berachainArtio'
2170
+ | 'berachainBepolia'
2171
+ | 'binance'
2172
+ | 'bscTestnet'
2173
+ | 'campTestnet'
2174
+ | 'fantom'
2175
+ | 'fantomTestnet'
2176
+ | 'flowMainnet'
2177
+ | 'mainnet'
2178
+ | 'optimism'
2179
+ | 'polygon'
2180
+ | 'polygon_mumbai'
2181
+ | 'skaleNebula'
2182
+ | 'solana'
2183
+ | 'sophon'
2184
+ | 'sophonTestnet'
2185
+ | 'sui'
2186
+ | 'superseed'
2187
+ | 'superseedSepolia'
2188
+ | 'vanar'
2189
+ | 'xai'
2190
+ | 'zksync'
2191
+ | 'coti'
2192
+ | 'cotiTestnet'
2193
+ | 'morph'
2194
+ | 'morphTestnet'
2195
+ | 'morphHolesky'
2196
+ | 'ultra'
2197
+ | 'ultraTestnet'
2198
+ | 'nitrograph'
2199
+ | 'sepolia'
2200
+ | 'optimism_sepolia'
2201
+ | 'arbitrumSepolia'
2202
+ | 'goerli'
2203
+ | 'optimism_goerli'
2204
+ | 'arbitrumGoerli'
2205
+ | 'basecamp';
2206
+
2207
+ /**
2208
+ * Indicates if only in-range liquidity is rewarded.
2209
+ */
2210
+ onlyRewardInRangeLiquidity?: boolean;
2211
+
2212
+ /**
2213
+ * Array of liquidity pools associated with the rule.
2214
+ */
2215
+ pools?: Array<Liquidity.Pool>;
2216
+
2217
+ /**
2218
+ * Protocol of the liquidity pool.
2219
+ */
2220
+ protocol?: string;
2221
+ }
2222
+
2223
+ export namespace Liquidity {
2224
+ export interface Pool {
2225
+ /**
2226
+ * Unique identifier of the liquidity pool.
2227
+ */
2228
+ id: string;
2229
+ }
2230
+ }
2231
+
1475
2232
  export interface Range {
1476
2233
  /**
1477
2234
  * Reward amount for this range.
@@ -1487,6 +2244,16 @@ export namespace RuleUpdateResponse {
1487
2244
  * Start value of the range.
1488
2245
  */
1489
2246
  startRange: number;
2247
+
2248
+ /**
2249
+ * ID of the loyalty badge for this range.
2250
+ */
2251
+ loyaltyBadgeId?: string;
2252
+
2253
+ /**
2254
+ * Amount of the loyalty multiplier for this range.
2255
+ */
2256
+ loyaltyMultiplierAmount?: number;
1490
2257
  }
1491
2258
 
1492
2259
  /**
@@ -1539,20 +2306,15 @@ export namespace RuleUpdateResponse {
1539
2306
  * Object containing details of the associated smart contract.
1540
2307
  */
1541
2308
  export interface SmartContract {
1542
- /**
1543
- * ABI of the smart contract.
1544
- */
1545
- abi?: string | null;
1546
-
1547
2309
  /**
1548
2310
  * Mapping of addresses for the smart contract.
1549
2311
  */
1550
2312
  addressMapping?: string | null;
1551
2313
 
1552
2314
  /**
1553
- * Array of bonus details applied to the rule.
2315
+ * Object containing details of the amount multiplier from the event.
1554
2316
  */
1555
- bonus?: Array<SmartContract.Bonus> | null;
2317
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1556
2318
 
1557
2319
  /**
1558
2320
  * ID of the smart contract.
@@ -1564,68 +2326,31 @@ export namespace RuleUpdateResponse {
1564
2326
  */
1565
2327
  criteria?: 'everyEvent' | 'byParameter' | null;
1566
2328
 
1567
- /**
1568
- * Time range applied to the rule.
1569
- */
1570
- customRange?: SmartContract.CustomRange | null;
1571
-
1572
2329
  /**
1573
2330
  * Event emitted by the smart contract.
1574
2331
  */
1575
2332
  event?: string | null;
1576
2333
 
1577
- /**
1578
- * Maximum value allowed for the parameter.
1579
- */
1580
- max?: number | null;
1581
-
1582
2334
  /**
1583
2335
  * Array of parameters for the smart contract.
1584
2336
  */
1585
2337
  params?: Array<SmartContract.Param> | null;
1586
2338
 
1587
2339
  /**
1588
- * Flag indicating if a bonus is applied.
2340
+ * Type of the smart contract interaction.
1589
2341
  */
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.
1599
- */
1600
- withMax?: boolean | null;
2342
+ type?: 'function' | 'event' | null;
1601
2343
  }
1602
2344
 
1603
2345
  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
2346
  /**
1617
- * Time range applied to the rule.
2347
+ * Object containing details of the amount multiplier from the event.
1618
2348
  */
1619
- export interface CustomRange {
1620
- /**
1621
- * End time of the custom range.
1622
- */
1623
- endsAt?: string | null;
1624
-
2349
+ export interface AmountMultiplier {
1625
2350
  /**
1626
- * Start time of the custom range.
2351
+ * Mapping of the value for the smart contract.
1627
2352
  */
1628
- startsAt?: string | null;
2353
+ valueMapping?: string | null;
1629
2354
  }
1630
2355
 
1631
2356
  export interface Param {
@@ -1669,47 +2394,33 @@ export namespace RuleUpdateResponse {
1669
2394
  */
1670
2395
  streakMilestone: number;
1671
2396
  }
1672
- }
1673
2397
 
1674
- export interface Collection {
1675
2398
  /**
1676
- * Blockchain address of the collection
2399
+ * Metadata for swap loyalty rules
1677
2400
  */
1678
- address: string;
2401
+ export interface Swap {
2402
+ provider?: 'any' | 'relay' | 'lifi';
1679
2403
 
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';
2404
+ relayReferrerId?: string;
2405
+
2406
+ requireCrossChainSwap?: boolean;
2407
+
2408
+ swappedToChain?: 'any' | number | string;
2409
+
2410
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2411
+
2412
+ tokenMode?: 'any' | 'specific';
2413
+
2414
+ trackTokenAmount?: boolean;
2415
+ }
2416
+
2417
+ export namespace Swap {
2418
+ export interface SwappedToToken {
2419
+ address: string;
2420
+
2421
+ chainId: string;
2422
+ }
2423
+ }
1713
2424
  }
1714
2425
  }
1715
2426
 
@@ -1720,9 +2431,6 @@ export interface RuleListResponse {
1720
2431
  }
1721
2432
 
1722
2433
  export namespace RuleListResponse {
1723
- /**
1724
- * Schema for a loyalty rule
1725
- */
1726
2434
  export interface Data {
1727
2435
  /**
1728
2436
  * Unique identifier for the loyalty rule
@@ -1744,40 +2452,1012 @@ export namespace RuleListResponse {
1744
2452
  */
1745
2453
  deletedAt: string | null;
1746
2454
 
2455
+ /**
2456
+ * Description of the loyalty rule
2457
+ */
2458
+ description: string;
2459
+
2460
+ /**
2461
+ * End time of the loyalty rule
2462
+ */
2463
+ endTime: string;
2464
+
1747
2465
  /**
1748
2466
  * Frequency of the loyalty rule
1749
2467
  */
1750
2468
  frequency: string;
1751
2469
 
1752
- /**
1753
- * Unique identifier for the organization
1754
- */
1755
- organizationId: string;
2470
+ /**
2471
+ * Chains attached to the loyalty rule
2472
+ */
2473
+ loyaltyRuleChain: Array<Data.LoyaltyRuleChain>;
2474
+
2475
+ /**
2476
+ * Name of the loyalty rule
2477
+ */
2478
+ name: string;
2479
+
2480
+ /**
2481
+ * Unique identifier for the organization
2482
+ */
2483
+ organizationId: string;
2484
+
2485
+ /**
2486
+ * Type of the reward
2487
+ */
2488
+ rewardType: 'points' | 'multiplier' | 'badge';
2489
+
2490
+ /**
2491
+ * Start time of the loyalty rule
2492
+ */
2493
+ startTime: string;
2494
+
2495
+ /**
2496
+ * Type of the loyalty rule
2497
+ */
2498
+ type: string;
2499
+
2500
+ /**
2501
+ * Timestamp when the loyalty rule was last updated
2502
+ */
2503
+ updatedAt: string;
2504
+
2505
+ /**
2506
+ * Unique identifier for the website
2507
+ */
2508
+ websiteId: string;
2509
+
2510
+ /**
2511
+ * Optional address of the collection
2512
+ */
2513
+ collectionAddress?: string;
2514
+
2515
+ /**
2516
+ * URL of the media associated with the loyalty rule
2517
+ */
2518
+ mediaUrl?: string | null;
2519
+
2520
+ /**
2521
+ * Optional metadata for the loyalty rule
2522
+ */
2523
+ metadata?: { [key: string]: Data.Metadata };
2524
+ }
2525
+
2526
+ export namespace Data {
2527
+ export interface LoyaltyRuleChain {
2528
+ /**
2529
+ * Unique identifier for the rule chain
2530
+ */
2531
+ id: string;
2532
+
2533
+ loyaltyConditions: Array<LoyaltyRuleChain.LoyaltyCondition>;
2534
+
2535
+ /**
2536
+ * Unique identifier for the loyalty rule
2537
+ */
2538
+ loyaltyRuleId: string;
2539
+
2540
+ /**
2541
+ * Name of the rule chain
2542
+ */
2543
+ name: string;
2544
+ }
2545
+
2546
+ export namespace LoyaltyRuleChain {
2547
+ export interface LoyaltyCondition {
2548
+ /**
2549
+ * Unique identifier for the condition
2550
+ */
2551
+ id: string;
2552
+
2553
+ /**
2554
+ * Amount of the condition
2555
+ */
2556
+ amount: number | null;
2557
+
2558
+ association: Array<LoyaltyCondition.Association>;
2559
+
2560
+ /**
2561
+ * URL of the CSV file
2562
+ */
2563
+ csvUrl: string | null;
2564
+
2565
+ /**
2566
+ * Description of the condition
2567
+ */
2568
+ description: string | null;
2569
+
2570
+ /**
2571
+ * Number of times the condition must be met
2572
+ */
2573
+ repeatCount: number | null;
2574
+
2575
+ /**
2576
+ * Number of times the condition must be met
2577
+ */
2578
+ requiredCount: number | null;
2579
+
2580
+ /**
2581
+ * Type of the condition
2582
+ */
2583
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
2584
+ }
2585
+
2586
+ export namespace LoyaltyCondition {
2587
+ export interface Association {
2588
+ /**
2589
+ * Unique identifier for the association
2590
+ */
2591
+ id: string;
2592
+
2593
+ /**
2594
+ * Unique identifier for the loyalty badge
2595
+ */
2596
+ loyaltyBadgeId: string | null;
2597
+
2598
+ /**
2599
+ * Unique identifier for the loyalty currency
2600
+ */
2601
+ loyaltyCurrencyId: string | null;
2602
+
2603
+ loyaltyRule: Association.LoyaltyRule | null;
2604
+
2605
+ /**
2606
+ * Unique identifier for the loyalty rule group
2607
+ */
2608
+ loyaltyRuleGroupId: string | null;
2609
+
2610
+ /**
2611
+ * Unique identifier for the loyalty rule
2612
+ */
2613
+ loyaltyRuleId: string | null;
2614
+ }
2615
+
2616
+ export namespace Association {
2617
+ export interface LoyaltyRule {
2618
+ /**
2619
+ * Name of the loyalty rule
2620
+ */
2621
+ name: string;
2622
+ }
2623
+ }
2624
+ }
2625
+ }
2626
+
2627
+ export interface Metadata {
2628
+ /**
2629
+ * Number of tokens per batch.
2630
+ */
2631
+ batchSize?: number | null;
2632
+
2633
+ /**
2634
+ * Text displayed on the action button.
2635
+ */
2636
+ buttonText?: string | null;
2637
+
2638
+ /**
2639
+ * Flag indicating if commenting is required.
2640
+ */
2641
+ checkComment?: boolean | null;
2642
+
2643
+ /**
2644
+ * Flag indicating if liking the post is required.
2645
+ */
2646
+ checkLike?: boolean | null;
2647
+
2648
+ /**
2649
+ * Flag indicating if reposting is required.
2650
+ */
2651
+ checkRepost?: boolean | null;
2652
+
2653
+ /**
2654
+ * Text to check in the Twitter post, username, or bio.
2655
+ */
2656
+ checkText?: string | null;
2657
+
2658
+ /**
2659
+ * Array of collections associated with the rule.
2660
+ */
2661
+ collection?: Array<Metadata.Collection>;
2662
+
2663
+ /**
2664
+ * Conditions for completing the profile.
2665
+ */
2666
+ completeProfileConditions?: { [key: string]: boolean } | null;
2667
+
2668
+ /**
2669
+ * Object containing details for the call-to-action.
2670
+ */
2671
+ cta?: Metadata.Cta | null;
2672
+
2673
+ /**
2674
+ * API key for custom rewards integration.
2675
+ */
2676
+ customRewardsApiKey?: string;
2677
+
2678
+ /**
2679
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
2680
+ */
2681
+ directRpc?: boolean;
2682
+
2683
+ /**
2684
+ * Array of Discord servers, channels, and roles to join.
2685
+ */
2686
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2687
+
2688
+ /**
2689
+ * Array of drip quests required to complete the rule.
2690
+ */
2691
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2692
+
2693
+ /**
2694
+ * Flag indicating whether joining Discord servers is required.
2695
+ */
2696
+ enableJoinDiscordServers?: boolean | null;
2697
+
2698
+ /**
2699
+ * Flag indicating whether streaks are enabled.
2700
+ */
2701
+ enableStreaks?: boolean | null;
2702
+
2703
+ /**
2704
+ * Flag indicating whether the verified multiplier is enabled.
2705
+ */
2706
+ enableVerifiedMultiplier?: boolean;
2707
+
2708
+ /**
2709
+ * Fill source of the order for the token sale
2710
+ */
2711
+ fillSource?: string;
2712
+
2713
+ /**
2714
+ * Percentage reward given to a user for their first referral.
2715
+ */
2716
+ firstReferralReward?: number | null;
2717
+
2718
+ /**
2719
+ * Flag indicating whether the fill source is included.
2720
+ */
2721
+ hasFillSource?: boolean;
2722
+
2723
+ /**
2724
+ * Indicates if the item has never been sold.
2725
+ */
2726
+ hasNeverSold?: boolean;
2727
+
2728
+ /**
2729
+ * Indicates if the full royalty has been paid for items.
2730
+ */
2731
+ hasPaidFullRoyalty?: boolean;
2732
+
2733
+ /**
2734
+ * Flag indicating if the sale currency is included.
2735
+ */
2736
+ hasSaleCurrency?: boolean;
2737
+
2738
+ /**
2739
+ * Indicates if the user has a verified Twitter account.
2740
+ */
2741
+ hasVerifiedTwitter?: boolean;
2742
+
2743
+ /**
2744
+ * URL of the image associated with the rule.
2745
+ */
2746
+ imageUrl?: string | null;
2747
+
2748
+ /**
2749
+ * If enabled, the first transaction done on the platform will complete this rule
2750
+ */
2751
+ isCheckInOnEveryTxn?: boolean;
2752
+
2753
+ /**
2754
+ * Indicates if the multiplier has been applied to rewards.
2755
+ */
2756
+ isMultiplierApplied?: boolean;
2757
+
2758
+ /**
2759
+ * Flag indicating if the rule is restricted to new users.
2760
+ */
2761
+ isRestrictedToNewUsers?: boolean;
2762
+
2763
+ /**
2764
+ * Flag indicating if rewards are applied retroactively.
2765
+ */
2766
+ isRetroactive?: boolean | null;
2767
+
2768
+ /**
2769
+ * Flag indicating if the token hold multiplier is applied.
2770
+ */
2771
+ isTokenHoldMultiplier?: boolean;
2772
+
2773
+ /**
2774
+ * Optional link associated with the metadata.
2775
+ */
2776
+ link?: string | null;
2777
+
2778
+ /**
2779
+ * Liquidity pool details.
2780
+ */
2781
+ liquidity?: Metadata.Liquidity;
2782
+
2783
+ /**
2784
+ * Maximum quantity constraint for token holding.
2785
+ */
2786
+ maxQty?: number | null;
2787
+
2788
+ /**
2789
+ * Minimum quantity constraint for token holding.
2790
+ */
2791
+ minQty?: number | null;
2792
+
2793
+ /**
2794
+ * Array of loyalty currency IDs used for multipliers.
2795
+ */
2796
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
2797
+
2798
+ /**
2799
+ * Flag indicating whether to include only known users.
2800
+ */
2801
+ onlyKnownUsers?: boolean;
2802
+
2803
+ /**
2804
+ * Flag indicating whether to include only native tokens.
2805
+ */
2806
+ onlyNative?: boolean;
2807
+
2808
+ /**
2809
+ * Flag indicating whether to include only non-listed items.
2810
+ */
2811
+ onlyNonListed?: boolean;
2812
+
2813
+ /**
2814
+ * Indicates if only existing users are rewarded.
2815
+ */
2816
+ onlyRewardExistingUser?: boolean;
2817
+
2818
+ /**
2819
+ * give points for only one token ownership per contract
2820
+ */
2821
+ onlyRewardSingleTokenOwnership?: boolean | null;
2822
+
2823
+ /**
2824
+ * Promotional code associated with the rule.
2825
+ */
2826
+ promoCode?: string;
2827
+
2828
+ /**
2829
+ * URL of the CSV file containing promo codes.
2830
+ */
2831
+ promoCodeCsvUrl?: string;
2832
+
2833
+ /**
2834
+ * Numbers of the promotional code to be generated.
2835
+ */
2836
+ promoCodeLength?: number | null;
2837
+
2838
+ /**
2839
+ * Type of the promotional code.
2840
+ */
2841
+ promoCodeType?: 'code' | 'csv' | 'generate';
2842
+
2843
+ /**
2844
+ * Array defining ranges and corresponding rewards.
2845
+ */
2846
+ range?: Array<Metadata.Range>;
2847
+
2848
+ /**
2849
+ * Object defining referral requirements.
2850
+ */
2851
+ referralRequirements?: Metadata.ReferralRequirements | null;
2852
+
2853
+ /**
2854
+ * Lump sum reward given to a referrer.
2855
+ */
2856
+ referrerReward?: number | null;
2857
+
2858
+ /**
2859
+ * Loyalty currency ID of the referrer reward.
2860
+ */
2861
+ referrerRewardLoyaltyCurrencyId?: string | null;
2862
+
2863
+ /**
2864
+ * Flag indicating if the post link is required.
2865
+ */
2866
+ requirePostLink?: boolean | null;
2867
+
2868
+ /**
2869
+ * Flag indicating if the rule can also reward badges per range.
2870
+ */
2871
+ rewardBadgePerRange?: boolean;
2872
+
2873
+ /**
2874
+ * Flag indicating if the reward is rewarded by batch.
2875
+ */
2876
+ rewardByBatch?: boolean | null;
2877
+
2878
+ /**
2879
+ * Flag indicating if rewards are given per impression.
2880
+ */
2881
+ rewardPerImpression?: boolean | null;
2882
+
2883
+ /**
2884
+ * Flag indicating if the rule should reward based on value of traded tokens
2885
+ * instead of count.
2886
+ */
2887
+ rewardPerValue?: boolean;
2888
+
2889
+ /**
2890
+ * Currency associated with sales.
2891
+ */
2892
+ saleCurrency?: string;
2893
+
2894
+ /**
2895
+ * Percentage reward given for a second-level referral.
2896
+ */
2897
+ secondReferralReward?: number | null;
2898
+
2899
+ /**
2900
+ * Flag indicating if the multiplier is skipped.
2901
+ */
2902
+ skipMultiplier?: boolean | null;
2903
+
2904
+ /**
2905
+ * Object containing details of the associated smart contract.
2906
+ */
2907
+ smartContract?: Metadata.SmartContract;
2908
+
2909
+ /**
2910
+ * Array of snapshot proposals for the rule.
2911
+ */
2912
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
2913
+
2914
+ /**
2915
+ * Social media platform associated with the rule.
2916
+ */
2917
+ socialPlatform?:
2918
+ | 'Custom'
2919
+ | 'Discord'
2920
+ | 'EpicGames'
2921
+ | 'Instagram'
2922
+ | 'Steam'
2923
+ | 'Telegram'
2924
+ | 'TikTok'
2925
+ | 'Twitch'
2926
+ | 'X(Twitter)'
2927
+ | 'YouTube'
2928
+ | 'Google'
2929
+ | null;
2930
+
2931
+ /**
2932
+ * URL of the social platform's logo.
2933
+ */
2934
+ socialPlatformLogo?: string | null;
2935
+
2936
+ /**
2937
+ * Name of the social platform.
2938
+ */
2939
+ socialPlatformName?: string | null;
2940
+
2941
+ /**
2942
+ * ID of the Steam app.
2943
+ */
2944
+ steamAppId?: string | null;
2945
+
2946
+ /**
2947
+ * Array of streak milestones and corresponding rewards.
2948
+ */
2949
+ streakArray?: Array<Metadata.StreakArray> | null;
2950
+
2951
+ /**
2952
+ * Metadata for swap loyalty rules
2953
+ */
2954
+ swap?: Metadata.Swap;
2955
+
2956
+ /**
2957
+ * ID of the Telegram channel.
2958
+ */
2959
+ telegramChannelId?: string | null;
2960
+
2961
+ /**
2962
+ * Time delay in seconds to verify actions.
2963
+ */
2964
+ timeDelayToVerifySeconds?: string | number | null;
2965
+
2966
+ /**
2967
+ * Flag indicating if all contracts are tracked.
2968
+ */
2969
+ trackAllContracts?: boolean | null;
2970
+
2971
+ /**
2972
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2973
+ * completed once the progress is 100%.
2974
+ */
2975
+ trackProgress?: boolean | null;
2976
+
2977
+ /**
2978
+ * URL of the associated Twitter account.
2979
+ */
2980
+ twitterAccountUrl?: string;
2981
+
2982
+ /**
2983
+ * Hashtag associated with the Twitter post.
2984
+ */
2985
+ twitterHashtag?: string;
2986
+
2987
+ /**
2988
+ * URL of the associated Twitter post.
2989
+ */
2990
+ twitterPostUrl?: string;
2991
+
2992
+ /**
2993
+ * Unique identifier of the Twitter user.
2994
+ */
2995
+ twitterUserId?: string;
2996
+
2997
+ /**
2998
+ * Twitter username of the user.
2999
+ */
3000
+ twitterUsername?: string;
3001
+
3002
+ /**
3003
+ * Minimum length of the verification text.
3004
+ */
3005
+ verificationTextMinimumLength?: number | null;
3006
+
3007
+ /**
3008
+ * Multiplier applied to rewards for verified users.
3009
+ */
3010
+ verifiedMultiplier?: number | null;
3011
+
3012
+ /**
3013
+ * Placeholder text for verification input fields.
3014
+ */
3015
+ verifyPlaceHolderText?: string | null;
3016
+
3017
+ /**
3018
+ * Type of wallet associated with the rule.
3019
+ */
3020
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
3021
+
3022
+ /**
3023
+ * ID of the Youtube channel.
3024
+ */
3025
+ youtubeChannelId?: string | null;
3026
+
3027
+ /**
3028
+ * ID of the Youtube video.
3029
+ */
3030
+ youtubeVideoId?: string | null;
3031
+ }
3032
+
3033
+ export namespace Metadata {
3034
+ export interface Collection {
3035
+ /**
3036
+ * Blockchain address of the collection.
3037
+ */
3038
+ address?: string;
3039
+
3040
+ /**
3041
+ * Multiplier applied to the rewards for this collection.
3042
+ */
3043
+ multiplier?: number;
3044
+
3045
+ /**
3046
+ * Blockchain network of the collection.
3047
+ */
3048
+ network?:
3049
+ | 'abstract'
3050
+ | 'abstractTestnet'
3051
+ | 'apechain'
3052
+ | 'arbitrum'
3053
+ | 'avalanche'
3054
+ | 'avalancheFuji'
3055
+ | 'base'
3056
+ | 'baseSepolia'
3057
+ | 'berachain'
3058
+ | 'berachainArtio'
3059
+ | 'berachainBepolia'
3060
+ | 'binance'
3061
+ | 'bscTestnet'
3062
+ | 'campTestnet'
3063
+ | 'fantom'
3064
+ | 'fantomTestnet'
3065
+ | 'flowMainnet'
3066
+ | 'mainnet'
3067
+ | 'optimism'
3068
+ | 'polygon'
3069
+ | 'polygon_mumbai'
3070
+ | 'skaleNebula'
3071
+ | 'solana'
3072
+ | 'sophon'
3073
+ | 'sophonTestnet'
3074
+ | 'sui'
3075
+ | 'superseed'
3076
+ | 'superseedSepolia'
3077
+ | 'vanar'
3078
+ | 'xai'
3079
+ | 'zksync'
3080
+ | 'coti'
3081
+ | 'cotiTestnet'
3082
+ | 'morph'
3083
+ | 'morphTestnet'
3084
+ | 'morphHolesky'
3085
+ | 'ultra'
3086
+ | 'ultraTestnet'
3087
+ | 'nitrograph'
3088
+ | 'sepolia'
3089
+ | 'optimism_sepolia'
3090
+ | 'arbitrumSepolia'
3091
+ | 'goerli'
3092
+ | 'optimism_goerli'
3093
+ | 'arbitrumGoerli'
3094
+ | 'basecamp';
3095
+ }
3096
+
3097
+ /**
3098
+ * Object containing details for the call-to-action.
3099
+ */
3100
+ export interface Cta {
3101
+ /**
3102
+ * Link for the call-to-action.
3103
+ */
3104
+ href?: string | null;
3105
+
3106
+ /**
3107
+ * Label for the call-to-action.
3108
+ */
3109
+ label?: string | null;
3110
+ }
3111
+
3112
+ export interface DiscordServersToJoin {
3113
+ /**
3114
+ * ID of the Discord server to join.
3115
+ */
3116
+ id?: string;
3117
+
3118
+ /**
3119
+ * Array of Discord channels to join.
3120
+ */
3121
+ channels?: Array<DiscordServersToJoin.Channel>;
3122
+
3123
+ /**
3124
+ * Array of roles to assign in the Discord server.
3125
+ */
3126
+ roles?: Array<DiscordServersToJoin.Role>;
3127
+ }
3128
+
3129
+ export namespace DiscordServersToJoin {
3130
+ export interface Channel {
3131
+ /**
3132
+ * ID of the Discord channel.
3133
+ */
3134
+ id?: string;
3135
+
3136
+ /**
3137
+ * Array of emojis used in the channel.
3138
+ */
3139
+ emojis?: Array<Channel.Emoji>;
3140
+
3141
+ /**
3142
+ * Phrase of text to be present in the discord message
3143
+ */
3144
+ text?: string;
3145
+ }
3146
+
3147
+ export namespace Channel {
3148
+ export interface Emoji {
3149
+ /**
3150
+ * ID of the emoji used in the channel.
3151
+ */
3152
+ id?: string;
3153
+ }
3154
+ }
3155
+
3156
+ export interface Role {
3157
+ /**
3158
+ * ID of the role in the Discord server.
3159
+ */
3160
+ id: string;
3161
+ }
3162
+ }
3163
+
3164
+ export interface DripQuestsToComplete {
3165
+ /**
3166
+ * ID of the drip quest to complete.
3167
+ */
3168
+ id: string;
3169
+ }
3170
+
3171
+ /**
3172
+ * Liquidity pool details.
3173
+ */
3174
+ export interface Liquidity {
3175
+ /**
3176
+ * Calculation type of the liquidity pool.
3177
+ */
3178
+ calculationType?: 'fixed' | 'custom';
3179
+
3180
+ /**
3181
+ * Custom function to calculate the the reward amount based on the liquidity
3182
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
3183
+ * USD.
3184
+ */
3185
+ customFunction?: string;
3186
+
3187
+ /**
3188
+ * Liquidity provided per day in USD
3189
+ */
3190
+ liquidityPerDay?: number;
3191
+
3192
+ /**
3193
+ * Blockchain network of the liquidity pool.
3194
+ */
3195
+ network?:
3196
+ | 'abstract'
3197
+ | 'abstractTestnet'
3198
+ | 'apechain'
3199
+ | 'arbitrum'
3200
+ | 'avalanche'
3201
+ | 'avalancheFuji'
3202
+ | 'base'
3203
+ | 'baseSepolia'
3204
+ | 'berachain'
3205
+ | 'berachainArtio'
3206
+ | 'berachainBepolia'
3207
+ | 'binance'
3208
+ | 'bscTestnet'
3209
+ | 'campTestnet'
3210
+ | 'fantom'
3211
+ | 'fantomTestnet'
3212
+ | 'flowMainnet'
3213
+ | 'mainnet'
3214
+ | 'optimism'
3215
+ | 'polygon'
3216
+ | 'polygon_mumbai'
3217
+ | 'skaleNebula'
3218
+ | 'solana'
3219
+ | 'sophon'
3220
+ | 'sophonTestnet'
3221
+ | 'sui'
3222
+ | 'superseed'
3223
+ | 'superseedSepolia'
3224
+ | 'vanar'
3225
+ | 'xai'
3226
+ | 'zksync'
3227
+ | 'coti'
3228
+ | 'cotiTestnet'
3229
+ | 'morph'
3230
+ | 'morphTestnet'
3231
+ | 'morphHolesky'
3232
+ | 'ultra'
3233
+ | 'ultraTestnet'
3234
+ | 'nitrograph'
3235
+ | 'sepolia'
3236
+ | 'optimism_sepolia'
3237
+ | 'arbitrumSepolia'
3238
+ | 'goerli'
3239
+ | 'optimism_goerli'
3240
+ | 'arbitrumGoerli'
3241
+ | 'basecamp';
3242
+
3243
+ /**
3244
+ * Indicates if only in-range liquidity is rewarded.
3245
+ */
3246
+ onlyRewardInRangeLiquidity?: boolean;
3247
+
3248
+ /**
3249
+ * Array of liquidity pools associated with the rule.
3250
+ */
3251
+ pools?: Array<Liquidity.Pool>;
3252
+
3253
+ /**
3254
+ * Protocol of the liquidity pool.
3255
+ */
3256
+ protocol?: string;
3257
+ }
3258
+
3259
+ export namespace Liquidity {
3260
+ export interface Pool {
3261
+ /**
3262
+ * Unique identifier of the liquidity pool.
3263
+ */
3264
+ id: string;
3265
+ }
3266
+ }
3267
+
3268
+ export interface Range {
3269
+ /**
3270
+ * Reward amount for this range.
3271
+ */
3272
+ amount: number;
3273
+
3274
+ /**
3275
+ * End value of the range.
3276
+ */
3277
+ endRange: number;
3278
+
3279
+ /**
3280
+ * Start value of the range.
3281
+ */
3282
+ startRange: number;
3283
+
3284
+ /**
3285
+ * ID of the loyalty badge for this range.
3286
+ */
3287
+ loyaltyBadgeId?: string;
3288
+
3289
+ /**
3290
+ * Amount of the loyalty multiplier for this range.
3291
+ */
3292
+ loyaltyMultiplierAmount?: number;
3293
+ }
3294
+
3295
+ /**
3296
+ * Object defining referral requirements.
3297
+ */
3298
+ export interface ReferralRequirements {
3299
+ /**
3300
+ * Flag indicating if achieving points is required.
3301
+ */
3302
+ achievePoints?: boolean | null;
3303
+
3304
+ /**
3305
+ * Flag indicating if completing the profile is required.
3306
+ */
3307
+ completeProfile?: boolean | null;
3308
+
3309
+ /**
3310
+ * Flag indicating if connecting Discord is required.
3311
+ */
3312
+ connectDiscord?: boolean | null;
3313
+
3314
+ /**
3315
+ * Flag indicating if connecting email is required.
3316
+ */
3317
+ connectEmail?: boolean | null;
3318
+
3319
+ /**
3320
+ * Flag indicating if connecting Twitter is required.
3321
+ */
3322
+ connectTwitter?: boolean | null;
3323
+
3324
+ points?: ReferralRequirements.Points | null;
3325
+ }
3326
+
3327
+ export namespace ReferralRequirements {
3328
+ export interface Points {
3329
+ /**
3330
+ * Points required for referral.
3331
+ */
3332
+ amount?: number | null;
3333
+
3334
+ /**
3335
+ * ID of the loyalty currency for referral.
3336
+ */
3337
+ loyaltyCurrecyId?: string | null;
3338
+ }
3339
+ }
3340
+
3341
+ /**
3342
+ * Object containing details of the associated smart contract.
3343
+ */
3344
+ export interface SmartContract {
3345
+ /**
3346
+ * Mapping of addresses for the smart contract.
3347
+ */
3348
+ addressMapping?: string | null;
3349
+
3350
+ /**
3351
+ * Object containing details of the amount multiplier from the event.
3352
+ */
3353
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3354
+
3355
+ /**
3356
+ * ID of the smart contract.
3357
+ */
3358
+ contractId?: string | null;
3359
+
3360
+ /**
3361
+ * Criteria to evaluate the smart contract event.
3362
+ */
3363
+ criteria?: 'everyEvent' | 'byParameter' | null;
3364
+
3365
+ /**
3366
+ * Event emitted by the smart contract.
3367
+ */
3368
+ event?: string | null;
3369
+
3370
+ /**
3371
+ * Array of parameters for the smart contract.
3372
+ */
3373
+ params?: Array<SmartContract.Param> | null;
3374
+
3375
+ /**
3376
+ * Type of the smart contract interaction.
3377
+ */
3378
+ type?: 'function' | 'event' | null;
3379
+ }
3380
+
3381
+ export namespace SmartContract {
3382
+ /**
3383
+ * Object containing details of the amount multiplier from the event.
3384
+ */
3385
+ export interface AmountMultiplier {
3386
+ /**
3387
+ * Mapping of the value for the smart contract.
3388
+ */
3389
+ valueMapping?: string | null;
3390
+ }
3391
+
3392
+ export interface Param {
3393
+ /**
3394
+ * Condition to check for the parameter.
3395
+ */
3396
+ condition?: string | null;
3397
+
3398
+ /**
3399
+ * Name of the smart contract parameter.
3400
+ */
3401
+ name?: string | null;
3402
+
3403
+ /**
3404
+ * Value of the parameter.
3405
+ */
3406
+ value?: string | null;
3407
+ }
3408
+ }
3409
+
3410
+ export interface SnapshotProposal {
3411
+ /**
3412
+ * ID of the snapshot proposal.
3413
+ */
3414
+ id: string;
3415
+
3416
+ /**
3417
+ * Space associated with the snapshot proposal.
3418
+ */
3419
+ space: string;
3420
+ }
3421
+
3422
+ export interface StreakArray {
3423
+ /**
3424
+ * Reward amount for achieving the streak milestone.
3425
+ */
3426
+ streakAmount: number;
3427
+
3428
+ /**
3429
+ * Milestone required to achieve the streak.
3430
+ */
3431
+ streakMilestone: number;
3432
+ }
3433
+
3434
+ /**
3435
+ * Metadata for swap loyalty rules
3436
+ */
3437
+ export interface Swap {
3438
+ provider?: 'any' | 'relay' | 'lifi';
3439
+
3440
+ relayReferrerId?: string;
3441
+
3442
+ requireCrossChainSwap?: boolean;
3443
+
3444
+ swappedToChain?: 'any' | number | string;
1756
3445
 
1757
- /**
1758
- * Type of the loyalty rule
1759
- */
1760
- type: string;
3446
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1761
3447
 
1762
- /**
1763
- * Timestamp when the loyalty rule was last updated
1764
- */
1765
- updatedAt: string;
3448
+ tokenMode?: 'any' | 'specific';
1766
3449
 
1767
- /**
1768
- * Unique identifier for the website
1769
- */
1770
- websiteId: string;
3450
+ trackTokenAmount?: boolean;
3451
+ }
1771
3452
 
1772
- /**
1773
- * Optional address of the collection
1774
- */
1775
- collectionAddress?: string;
3453
+ export namespace Swap {
3454
+ export interface SwappedToToken {
3455
+ address: string;
1776
3456
 
1777
- /**
1778
- * Optional metadata for the loyalty rule
1779
- */
1780
- metadata?: Record<string, unknown>;
3457
+ chainId: string;
3458
+ }
3459
+ }
3460
+ }
1781
3461
  }
1782
3462
  }
1783
3463
 
@@ -1788,14 +3468,16 @@ export interface RuleDeleteResponse {
1788
3468
  }
1789
3469
 
1790
3470
  export interface RuleCompleteResponse {
1791
- message: string;
3471
+ message:
3472
+ | 'Completion request added to queue'
3473
+ | 'Link click being verified, come back later to check the status';
1792
3474
  }
1793
3475
 
1794
- export interface RuleStatusResponse {
1795
- data: Array<RuleStatusResponse.Data>;
3476
+ export interface RuleGetStatusResponse {
3477
+ data: Array<RuleGetStatusResponse.Data>;
1796
3478
  }
1797
3479
 
1798
- export namespace RuleStatusResponse {
3480
+ export namespace RuleGetStatusResponse {
1799
3481
  export interface Data {
1800
3482
  loyaltyRuleId: string;
1801
3483
 
@@ -1912,7 +3594,18 @@ export interface RuleCreateParams {
1912
3594
  | 'twitter_follow'
1913
3595
  | 'twitter_followers'
1914
3596
  | 'twitter_like'
1915
- | 'twitter_post_hashtag';
3597
+ | 'twitter_post_hashtag'
3598
+ | 'quiz'
3599
+ | 'poll'
3600
+ | 'steam_wishlist'
3601
+ | 'liquidity_uniswap_v2'
3602
+ | 'liquidity_uniswap_v3'
3603
+ | 'points_airdrop'
3604
+ | 'youtube_subscribers'
3605
+ | 'youtube_comment'
3606
+ | 'shopify_spend'
3607
+ | 'swap'
3608
+ | 'tiktok_post';
1916
3609
 
1917
3610
  /**
1918
3611
  * Unique identifier for the associated website
@@ -1949,6 +3642,11 @@ export interface RuleCreateParams {
1949
3642
  */
1950
3643
  description?: string;
1951
3644
 
3645
+ /**
3646
+ * ID of the external integration
3647
+ */
3648
+ externalIntegrationId?: string | null;
3649
+
1952
3650
  /**
1953
3651
  * Whether to hide this rule in the user interface
1954
3652
  */
@@ -1957,51 +3655,95 @@ export interface RuleCreateParams {
1957
3655
  /**
1958
3656
  * Interval between rule executions
1959
3657
  */
1960
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
3658
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1961
3659
 
1962
3660
  /**
1963
3661
  * Whether this rule is mandatory
1964
3662
  */
1965
3663
  isRequired?: boolean;
1966
3664
 
3665
+ /**
3666
+ * Unique identifier for the loyalty badge
3667
+ */
3668
+ loyaltyBadgeId?: string | null;
3669
+
1967
3670
  /**
1968
3671
  * Unique identifier for the loyalty rule group
1969
3672
  */
1970
3673
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
1971
3674
 
3675
+ /**
3676
+ * URL for uploading loyalty user allotment via CSV
3677
+ */
3678
+ loyaltyUserAllotmentCsvUrl?: string;
3679
+
3680
+ /**
3681
+ * The interval for the max amount. Available for the smart contract and external
3682
+ * rules.
3683
+ */
3684
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
3685
+
3686
+ /**
3687
+ * The maximum amount of points a user can earn per interval. Available for the
3688
+ * smart contract and external rules.
3689
+ */
3690
+ maxAmountPerInterval?: number | null;
3691
+
3692
+ /**
3693
+ * URL of the media to be displayed
3694
+ */
3695
+ mediaUrl?: string | null;
3696
+
1972
3697
  /**
1973
3698
  * Blockchain network where the rule will apply
1974
3699
  */
1975
3700
  network?:
1976
- | 'mainnet'
1977
- | 'polygon'
1978
- | 'polygon_mumbai'
1979
- | 'optimism'
3701
+ | 'abstract'
3702
+ | 'abstractTestnet'
3703
+ | 'apechain'
1980
3704
  | 'arbitrum'
1981
- | 'binance'
1982
- | 'bscTestnet'
1983
3705
  | 'avalanche'
1984
3706
  | 'avalancheFuji'
1985
- | 'zksync'
1986
- | 'fantom'
1987
- | 'fantomTestnet'
1988
3707
  | 'base'
1989
3708
  | 'baseSepolia'
1990
- | 'skaleNebula'
1991
- | 'xai'
3709
+ | 'berachain'
1992
3710
  | 'berachainArtio'
1993
- | 'solana'
1994
- | 'apechain'
1995
- | 'flowMainnet'
3711
+ | 'berachainBepolia'
3712
+ | 'binance'
3713
+ | 'bscTestnet'
1996
3714
  | 'campTestnet'
3715
+ | 'fantom'
3716
+ | 'fantomTestnet'
3717
+ | 'flowMainnet'
3718
+ | 'mainnet'
3719
+ | 'optimism'
3720
+ | 'polygon'
3721
+ | 'polygon_mumbai'
3722
+ | 'skaleNebula'
3723
+ | 'solana'
3724
+ | 'sophon'
3725
+ | 'sophonTestnet'
1997
3726
  | 'sui'
3727
+ | 'superseed'
3728
+ | 'superseedSepolia'
1998
3729
  | 'vanar'
3730
+ | 'xai'
3731
+ | 'zksync'
3732
+ | 'coti'
3733
+ | 'cotiTestnet'
3734
+ | 'morph'
3735
+ | 'morphTestnet'
3736
+ | 'morphHolesky'
3737
+ | 'ultra'
3738
+ | 'ultraTestnet'
3739
+ | 'nitrograph'
1999
3740
  | 'sepolia'
2000
3741
  | 'optimism_sepolia'
2001
3742
  | 'arbitrumSepolia'
2002
3743
  | 'goerli'
2003
3744
  | 'optimism_goerli'
2004
- | 'arbitrumGoerli';
3745
+ | 'arbitrumGoerli'
3746
+ | 'basecamp';
2005
3747
 
2006
3748
  /**
2007
3749
  * OAuth credentials associated with the rule
@@ -2011,12 +3753,17 @@ export interface RuleCreateParams {
2011
3753
  /**
2012
3754
  * Type of reward issued by the rule
2013
3755
  */
2014
- rewardType?: 'points' | 'multiplier';
3756
+ rewardType?: 'points' | 'multiplier' | 'badge';
3757
+
3758
+ /**
3759
+ * URL of the Shopify store
3760
+ */
3761
+ shopifyStoreUrl?: string | null;
2015
3762
 
2016
3763
  /**
2017
- * Identifier for associated subscriptions
3764
+ * Optional subscription id for the rule
2018
3765
  */
2019
- subscriptionIdentifier?: string | null;
3766
+ subscriptionId?: string | null;
2020
3767
  }
2021
3768
 
2022
3769
  export namespace RuleCreateParams {
@@ -2024,6 +3771,11 @@ export namespace RuleCreateParams {
2024
3771
  * Additional metadata for the loyalty rule
2025
3772
  */
2026
3773
  export interface Metadata {
3774
+ /**
3775
+ * Number of tokens per batch.
3776
+ */
3777
+ batchSize?: number | null;
3778
+
2027
3779
  /**
2028
3780
  * Text displayed on the action button.
2029
3781
  */
@@ -2054,6 +3806,11 @@ export namespace RuleCreateParams {
2054
3806
  */
2055
3807
  collection?: Array<Metadata.Collection>;
2056
3808
 
3809
+ /**
3810
+ * Conditions for completing the profile.
3811
+ */
3812
+ completeProfileConditions?: { [key: string]: boolean } | null;
3813
+
2057
3814
  /**
2058
3815
  * Object containing details for the call-to-action.
2059
3816
  */
@@ -2064,6 +3821,11 @@ export namespace RuleCreateParams {
2064
3821
  */
2065
3822
  customRewardsApiKey?: string;
2066
3823
 
3824
+ /**
3825
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
3826
+ */
3827
+ directRpc?: boolean;
3828
+
2067
3829
  /**
2068
3830
  * Array of Discord servers, channels, and roles to join.
2069
3831
  */
@@ -2089,11 +3851,21 @@ export namespace RuleCreateParams {
2089
3851
  */
2090
3852
  enableVerifiedMultiplier?: boolean;
2091
3853
 
3854
+ /**
3855
+ * Fill source of the order for the token sale
3856
+ */
3857
+ fillSource?: string;
3858
+
2092
3859
  /**
2093
3860
  * Percentage reward given to a user for their first referral.
2094
3861
  */
2095
3862
  firstReferralReward?: number | null;
2096
3863
 
3864
+ /**
3865
+ * Flag indicating whether the fill source is included.
3866
+ */
3867
+ hasFillSource?: boolean;
3868
+
2097
3869
  /**
2098
3870
  * Indicates if the item has never been sold.
2099
3871
  */
@@ -2119,11 +3891,21 @@ export namespace RuleCreateParams {
2119
3891
  */
2120
3892
  imageUrl?: string | null;
2121
3893
 
3894
+ /**
3895
+ * If enabled, the first transaction done on the platform will complete this rule
3896
+ */
3897
+ isCheckInOnEveryTxn?: boolean;
3898
+
2122
3899
  /**
2123
3900
  * Indicates if the multiplier has been applied to rewards.
2124
3901
  */
2125
3902
  isMultiplierApplied?: boolean;
2126
3903
 
3904
+ /**
3905
+ * Flag indicating if the rule is restricted to new users.
3906
+ */
3907
+ isRestrictedToNewUsers?: boolean;
3908
+
2127
3909
  /**
2128
3910
  * Flag indicating if rewards are applied retroactively.
2129
3911
  */
@@ -2139,6 +3921,11 @@ export namespace RuleCreateParams {
2139
3921
  */
2140
3922
  link?: string | null;
2141
3923
 
3924
+ /**
3925
+ * Liquidity pool details.
3926
+ */
3927
+ liquidity?: Metadata.Liquidity;
3928
+
2142
3929
  /**
2143
3930
  * Maximum quantity constraint for token holding.
2144
3931
  */
@@ -2169,11 +3956,36 @@ export namespace RuleCreateParams {
2169
3956
  */
2170
3957
  onlyNonListed?: boolean;
2171
3958
 
3959
+ /**
3960
+ * Indicates if only existing users are rewarded.
3961
+ */
3962
+ onlyRewardExistingUser?: boolean;
3963
+
3964
+ /**
3965
+ * give points for only one token ownership per contract
3966
+ */
3967
+ onlyRewardSingleTokenOwnership?: boolean | null;
3968
+
2172
3969
  /**
2173
3970
  * Promotional code associated with the rule.
2174
3971
  */
2175
3972
  promoCode?: string;
2176
3973
 
3974
+ /**
3975
+ * URL of the CSV file containing promo codes.
3976
+ */
3977
+ promoCodeCsvUrl?: string;
3978
+
3979
+ /**
3980
+ * Numbers of the promotional code to be generated.
3981
+ */
3982
+ promoCodeLength?: number | null;
3983
+
3984
+ /**
3985
+ * Type of the promotional code.
3986
+ */
3987
+ promoCodeType?: 'code' | 'csv' | 'generate';
3988
+
2177
3989
  /**
2178
3990
  * Array defining ranges and corresponding rewards.
2179
3991
  */
@@ -2189,11 +4001,37 @@ export namespace RuleCreateParams {
2189
4001
  */
2190
4002
  referrerReward?: number | null;
2191
4003
 
4004
+ /**
4005
+ * Loyalty currency ID of the referrer reward.
4006
+ */
4007
+ referrerRewardLoyaltyCurrencyId?: string | null;
4008
+
4009
+ /**
4010
+ * Flag indicating if the post link is required.
4011
+ */
4012
+ requirePostLink?: boolean | null;
4013
+
4014
+ /**
4015
+ * Flag indicating if the rule can also reward badges per range.
4016
+ */
4017
+ rewardBadgePerRange?: boolean;
4018
+
4019
+ /**
4020
+ * Flag indicating if the reward is rewarded by batch.
4021
+ */
4022
+ rewardByBatch?: boolean | null;
4023
+
2192
4024
  /**
2193
4025
  * Flag indicating if rewards are given per impression.
2194
4026
  */
2195
4027
  rewardPerImpression?: boolean | null;
2196
4028
 
4029
+ /**
4030
+ * Flag indicating if the rule should reward based on value of traded tokens
4031
+ * instead of count.
4032
+ */
4033
+ rewardPerValue?: boolean;
4034
+
2197
4035
  /**
2198
4036
  * Currency associated with sales.
2199
4037
  */
@@ -2204,6 +4042,11 @@ export namespace RuleCreateParams {
2204
4042
  */
2205
4043
  secondReferralReward?: number | null;
2206
4044
 
4045
+ /**
4046
+ * Flag indicating if the multiplier is skipped.
4047
+ */
4048
+ skipMultiplier?: boolean | null;
4049
+
2207
4050
  /**
2208
4051
  * Object containing details of the associated smart contract.
2209
4052
  */
@@ -2218,14 +4061,17 @@ export namespace RuleCreateParams {
2218
4061
  * Social media platform associated with the rule.
2219
4062
  */
2220
4063
  socialPlatform?:
2221
- | 'Twitch'
4064
+ | 'Custom'
4065
+ | 'Discord'
4066
+ | 'EpicGames'
4067
+ | 'Instagram'
4068
+ | 'Steam'
4069
+ | 'Telegram'
2222
4070
  | 'TikTok'
4071
+ | 'Twitch'
2223
4072
  | 'X(Twitter)'
2224
- | 'Instagram'
2225
- | 'EpicGames'
2226
4073
  | 'YouTube'
2227
- | 'Discord'
2228
- | 'Custom'
4074
+ | 'Google'
2229
4075
  | null;
2230
4076
 
2231
4077
  /**
@@ -2238,11 +4084,21 @@ export namespace RuleCreateParams {
2238
4084
  */
2239
4085
  socialPlatformName?: string | null;
2240
4086
 
4087
+ /**
4088
+ * ID of the Steam app.
4089
+ */
4090
+ steamAppId?: string | null;
4091
+
2241
4092
  /**
2242
4093
  * Array of streak milestones and corresponding rewards.
2243
4094
  */
2244
4095
  streakArray?: Array<Metadata.StreakArray> | null;
2245
4096
 
4097
+ /**
4098
+ * Metadata for swap loyalty rules
4099
+ */
4100
+ swap?: Metadata.Swap;
4101
+
2246
4102
  /**
2247
4103
  * ID of the Telegram channel.
2248
4104
  */
@@ -2258,6 +4114,12 @@ export namespace RuleCreateParams {
2258
4114
  */
2259
4115
  trackAllContracts?: boolean | null;
2260
4116
 
4117
+ /**
4118
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
4119
+ * completed once the progress is 100%.
4120
+ */
4121
+ trackProgress?: boolean | null;
4122
+
2261
4123
  /**
2262
4124
  * URL of the associated Twitter account.
2263
4125
  */
@@ -2301,7 +4163,17 @@ export namespace RuleCreateParams {
2301
4163
  /**
2302
4164
  * Type of wallet associated with the rule.
2303
4165
  */
2304
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
4166
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
4167
+
4168
+ /**
4169
+ * ID of the Youtube channel.
4170
+ */
4171
+ youtubeChannelId?: string | null;
4172
+
4173
+ /**
4174
+ * ID of the Youtube video.
4175
+ */
4176
+ youtubeVideoId?: string | null;
2305
4177
  }
2306
4178
 
2307
4179
  export namespace Metadata {
@@ -2320,35 +4192,52 @@ export namespace RuleCreateParams {
2320
4192
  * Blockchain network of the collection.
2321
4193
  */
2322
4194
  network?:
2323
- | 'mainnet'
2324
- | 'polygon'
2325
- | 'polygon_mumbai'
2326
- | 'optimism'
4195
+ | 'abstract'
4196
+ | 'abstractTestnet'
4197
+ | 'apechain'
2327
4198
  | 'arbitrum'
2328
- | 'binance'
2329
- | 'bscTestnet'
2330
4199
  | 'avalanche'
2331
4200
  | 'avalancheFuji'
2332
- | 'zksync'
2333
- | 'fantom'
2334
- | 'fantomTestnet'
2335
4201
  | 'base'
2336
4202
  | 'baseSepolia'
2337
- | 'skaleNebula'
2338
- | 'xai'
4203
+ | 'berachain'
2339
4204
  | 'berachainArtio'
2340
- | 'solana'
2341
- | 'apechain'
2342
- | 'flowMainnet'
4205
+ | 'berachainBepolia'
4206
+ | 'binance'
4207
+ | 'bscTestnet'
2343
4208
  | 'campTestnet'
4209
+ | 'fantom'
4210
+ | 'fantomTestnet'
4211
+ | 'flowMainnet'
4212
+ | 'mainnet'
4213
+ | 'optimism'
4214
+ | 'polygon'
4215
+ | 'polygon_mumbai'
4216
+ | 'skaleNebula'
4217
+ | 'solana'
4218
+ | 'sophon'
4219
+ | 'sophonTestnet'
2344
4220
  | 'sui'
4221
+ | 'superseed'
4222
+ | 'superseedSepolia'
2345
4223
  | 'vanar'
4224
+ | 'xai'
4225
+ | 'zksync'
4226
+ | 'coti'
4227
+ | 'cotiTestnet'
4228
+ | 'morph'
4229
+ | 'morphTestnet'
4230
+ | 'morphHolesky'
4231
+ | 'ultra'
4232
+ | 'ultraTestnet'
4233
+ | 'nitrograph'
2346
4234
  | 'sepolia'
2347
4235
  | 'optimism_sepolia'
2348
4236
  | 'arbitrumSepolia'
2349
4237
  | 'goerli'
2350
4238
  | 'optimism_goerli'
2351
- | 'arbitrumGoerli';
4239
+ | 'arbitrumGoerli'
4240
+ | 'basecamp';
2352
4241
  }
2353
4242
 
2354
4243
  /**
@@ -2394,6 +4283,11 @@ export namespace RuleCreateParams {
2394
4283
  * Array of emojis used in the channel.
2395
4284
  */
2396
4285
  emojis?: Array<Channel.Emoji>;
4286
+
4287
+ /**
4288
+ * Phrase of text to be present in the discord message
4289
+ */
4290
+ text?: string;
2397
4291
  }
2398
4292
 
2399
4293
  export namespace Channel {
@@ -2405,21 +4299,118 @@ export namespace RuleCreateParams {
2405
4299
  }
2406
4300
  }
2407
4301
 
2408
- export interface Role {
4302
+ export interface Role {
4303
+ /**
4304
+ * ID of the role in the Discord server.
4305
+ */
4306
+ id: string;
4307
+ }
4308
+ }
4309
+
4310
+ export interface DripQuestsToComplete {
4311
+ /**
4312
+ * ID of the drip quest to complete.
4313
+ */
4314
+ id: string;
4315
+ }
4316
+
4317
+ /**
4318
+ * Liquidity pool details.
4319
+ */
4320
+ export interface Liquidity {
4321
+ /**
4322
+ * Calculation type of the liquidity pool.
4323
+ */
4324
+ calculationType?: 'fixed' | 'custom';
4325
+
4326
+ /**
4327
+ * Custom function to calculate the the reward amount based on the liquidity
4328
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
4329
+ * USD.
4330
+ */
4331
+ customFunction?: string;
4332
+
4333
+ /**
4334
+ * Liquidity provided per day in USD
4335
+ */
4336
+ liquidityPerDay?: number;
4337
+
4338
+ /**
4339
+ * Blockchain network of the liquidity pool.
4340
+ */
4341
+ network?:
4342
+ | 'abstract'
4343
+ | 'abstractTestnet'
4344
+ | 'apechain'
4345
+ | 'arbitrum'
4346
+ | 'avalanche'
4347
+ | 'avalancheFuji'
4348
+ | 'base'
4349
+ | 'baseSepolia'
4350
+ | 'berachain'
4351
+ | 'berachainArtio'
4352
+ | 'berachainBepolia'
4353
+ | 'binance'
4354
+ | 'bscTestnet'
4355
+ | 'campTestnet'
4356
+ | 'fantom'
4357
+ | 'fantomTestnet'
4358
+ | 'flowMainnet'
4359
+ | 'mainnet'
4360
+ | 'optimism'
4361
+ | 'polygon'
4362
+ | 'polygon_mumbai'
4363
+ | 'skaleNebula'
4364
+ | 'solana'
4365
+ | 'sophon'
4366
+ | 'sophonTestnet'
4367
+ | 'sui'
4368
+ | 'superseed'
4369
+ | 'superseedSepolia'
4370
+ | 'vanar'
4371
+ | 'xai'
4372
+ | 'zksync'
4373
+ | 'coti'
4374
+ | 'cotiTestnet'
4375
+ | 'morph'
4376
+ | 'morphTestnet'
4377
+ | 'morphHolesky'
4378
+ | 'ultra'
4379
+ | 'ultraTestnet'
4380
+ | 'nitrograph'
4381
+ | 'sepolia'
4382
+ | 'optimism_sepolia'
4383
+ | 'arbitrumSepolia'
4384
+ | 'goerli'
4385
+ | 'optimism_goerli'
4386
+ | 'arbitrumGoerli'
4387
+ | 'basecamp';
4388
+
4389
+ /**
4390
+ * Indicates if only in-range liquidity is rewarded.
4391
+ */
4392
+ onlyRewardInRangeLiquidity?: boolean;
4393
+
4394
+ /**
4395
+ * Array of liquidity pools associated with the rule.
4396
+ */
4397
+ pools?: Array<Liquidity.Pool>;
4398
+
4399
+ /**
4400
+ * Protocol of the liquidity pool.
4401
+ */
4402
+ protocol?: string;
4403
+ }
4404
+
4405
+ export namespace Liquidity {
4406
+ export interface Pool {
2409
4407
  /**
2410
- * ID of the role in the Discord server.
4408
+ * Unique identifier of the liquidity pool.
2411
4409
  */
2412
4410
  id: string;
2413
4411
  }
2414
4412
  }
2415
4413
 
2416
- export interface DripQuestsToComplete {
2417
- /**
2418
- * ID of the drip quest to complete.
2419
- */
2420
- id: string;
2421
- }
2422
-
2423
4414
  export interface Range {
2424
4415
  /**
2425
4416
  * Reward amount for this range.
@@ -2435,6 +4426,16 @@ export namespace RuleCreateParams {
2435
4426
  * Start value of the range.
2436
4427
  */
2437
4428
  startRange: number;
4429
+
4430
+ /**
4431
+ * ID of the loyalty badge for this range.
4432
+ */
4433
+ loyaltyBadgeId?: string;
4434
+
4435
+ /**
4436
+ * Amount of the loyalty multiplier for this range.
4437
+ */
4438
+ loyaltyMultiplierAmount?: number;
2438
4439
  }
2439
4440
 
2440
4441
  /**
@@ -2487,20 +4488,15 @@ export namespace RuleCreateParams {
2487
4488
  * Object containing details of the associated smart contract.
2488
4489
  */
2489
4490
  export interface SmartContract {
2490
- /**
2491
- * ABI of the smart contract.
2492
- */
2493
- abi?: string | null;
2494
-
2495
4491
  /**
2496
4492
  * Mapping of addresses for the smart contract.
2497
4493
  */
2498
4494
  addressMapping?: string | null;
2499
4495
 
2500
4496
  /**
2501
- * Array of bonus details applied to the rule.
4497
+ * Object containing details of the amount multiplier from the event.
2502
4498
  */
2503
- bonus?: Array<SmartContract.Bonus> | null;
4499
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2504
4500
 
2505
4501
  /**
2506
4502
  * ID of the smart contract.
@@ -2512,68 +4508,31 @@ export namespace RuleCreateParams {
2512
4508
  */
2513
4509
  criteria?: 'everyEvent' | 'byParameter' | null;
2514
4510
 
2515
- /**
2516
- * Time range applied to the rule.
2517
- */
2518
- customRange?: SmartContract.CustomRange | null;
2519
-
2520
4511
  /**
2521
4512
  * Event emitted by the smart contract.
2522
4513
  */
2523
4514
  event?: string | null;
2524
4515
 
2525
- /**
2526
- * Maximum value allowed for the parameter.
2527
- */
2528
- max?: number | null;
2529
-
2530
4516
  /**
2531
4517
  * Array of parameters for the smart contract.
2532
4518
  */
2533
4519
  params?: Array<SmartContract.Param> | null;
2534
4520
 
2535
4521
  /**
2536
- * Flag indicating if a bonus is applied.
2537
- */
2538
- withBonus?: boolean | null;
2539
-
2540
- /**
2541
- * Flag indicating if a custom range is applied.
4522
+ * Type of the smart contract interaction.
2542
4523
  */
2543
- withCustomRange?: boolean | null;
2544
-
2545
- /**
2546
- * Flag indicating if a maximum limit is applied.
2547
- */
2548
- withMax?: boolean | null;
4524
+ type?: 'function' | 'event' | null;
2549
4525
  }
2550
4526
 
2551
4527
  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
4528
  /**
2565
- * Time range applied to the rule.
4529
+ * Object containing details of the amount multiplier from the event.
2566
4530
  */
2567
- export interface CustomRange {
2568
- /**
2569
- * End time of the custom range.
2570
- */
2571
- endsAt?: string | null;
2572
-
4531
+ export interface AmountMultiplier {
2573
4532
  /**
2574
- * Start time of the custom range.
4533
+ * Mapping of the value for the smart contract.
2575
4534
  */
2576
- startsAt?: string | null;
4535
+ valueMapping?: string | null;
2577
4536
  }
2578
4537
 
2579
4538
  export interface Param {
@@ -2617,6 +4576,33 @@ export namespace RuleCreateParams {
2617
4576
  */
2618
4577
  streakMilestone: number;
2619
4578
  }
4579
+
4580
+ /**
4581
+ * Metadata for swap loyalty rules
4582
+ */
4583
+ export interface Swap {
4584
+ provider?: 'any' | 'relay' | 'lifi';
4585
+
4586
+ relayReferrerId?: string;
4587
+
4588
+ requireCrossChainSwap?: boolean;
4589
+
4590
+ swappedToChain?: 'any' | number | string;
4591
+
4592
+ swappedToTokens?: Array<Swap.SwappedToToken>;
4593
+
4594
+ tokenMode?: 'any' | 'specific';
4595
+
4596
+ trackTokenAmount?: boolean;
4597
+ }
4598
+
4599
+ export namespace Swap {
4600
+ export interface SwappedToToken {
4601
+ address: string;
4602
+
4603
+ chainId: string;
4604
+ }
4605
+ }
2620
4606
  }
2621
4607
 
2622
4608
  export interface Collection {
@@ -2629,35 +4615,57 @@ export namespace RuleCreateParams {
2629
4615
  * Blockchain network for the collection
2630
4616
  */
2631
4617
  network:
2632
- | 'mainnet'
2633
- | 'polygon'
2634
- | 'polygon_mumbai'
2635
- | 'optimism'
4618
+ | 'abstract'
4619
+ | 'abstractTestnet'
4620
+ | 'apechain'
2636
4621
  | 'arbitrum'
2637
- | 'binance'
2638
- | 'bscTestnet'
2639
4622
  | 'avalanche'
2640
4623
  | 'avalancheFuji'
2641
- | 'zksync'
2642
- | 'fantom'
2643
- | 'fantomTestnet'
2644
4624
  | 'base'
2645
4625
  | 'baseSepolia'
2646
- | 'skaleNebula'
2647
- | 'xai'
4626
+ | 'berachain'
2648
4627
  | 'berachainArtio'
2649
- | 'solana'
2650
- | 'apechain'
2651
- | 'flowMainnet'
4628
+ | 'berachainBepolia'
4629
+ | 'binance'
4630
+ | 'bscTestnet'
2652
4631
  | 'campTestnet'
4632
+ | 'fantom'
4633
+ | 'fantomTestnet'
4634
+ | 'flowMainnet'
4635
+ | 'mainnet'
4636
+ | 'optimism'
4637
+ | 'polygon'
4638
+ | 'polygon_mumbai'
4639
+ | 'skaleNebula'
4640
+ | 'solana'
4641
+ | 'sophon'
4642
+ | 'sophonTestnet'
2653
4643
  | 'sui'
4644
+ | 'superseed'
4645
+ | 'superseedSepolia'
2654
4646
  | 'vanar'
4647
+ | 'xai'
4648
+ | 'zksync'
4649
+ | 'coti'
4650
+ | 'cotiTestnet'
4651
+ | 'morph'
4652
+ | 'morphTestnet'
4653
+ | 'morphHolesky'
4654
+ | 'ultra'
4655
+ | 'ultraTestnet'
4656
+ | 'nitrograph'
2655
4657
  | 'sepolia'
2656
4658
  | 'optimism_sepolia'
2657
4659
  | 'arbitrumSepolia'
2658
4660
  | 'goerli'
2659
4661
  | 'optimism_goerli'
2660
- | 'arbitrumGoerli';
4662
+ | 'arbitrumGoerli'
4663
+ | 'basecamp';
4664
+
4665
+ /**
4666
+ * Symbol of the collection.
4667
+ */
4668
+ symbol?: string;
2661
4669
  }
2662
4670
  }
2663
4671
 
@@ -2667,41 +4675,16 @@ export interface RuleUpdateParams {
2667
4675
  */
2668
4676
  amount: unknown;
2669
4677
 
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
4678
  /**
2681
4679
  * End time for the loyalty rule
2682
4680
  */
2683
4681
  endTime: string | null;
2684
4682
 
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
4683
  /**
2696
4684
  * Name of the loyalty rule
2697
4685
  */
2698
4686
  name: string;
2699
4687
 
2700
- /**
2701
- * Start time for the loyalty rule
2702
- */
2703
- startTime: string | null;
2704
-
2705
4688
  /**
2706
4689
  * Blockchain address of the associated collection
2707
4690
  */
@@ -2727,6 +4710,26 @@ export interface RuleUpdateParams {
2727
4710
  */
2728
4711
  description?: string;
2729
4712
 
4713
+ /**
4714
+ * Effective end time of the rule
4715
+ */
4716
+ effectiveEndTime?: string | null;
4717
+
4718
+ /**
4719
+ * Effective start time of the rule
4720
+ */
4721
+ effectiveStartTime?: string | null;
4722
+
4723
+ /**
4724
+ * ID of the external integration
4725
+ */
4726
+ externalIntegrationId?: string | null;
4727
+
4728
+ /**
4729
+ * Frequency of the rule execution
4730
+ */
4731
+ frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
4732
+
2730
4733
  /**
2731
4734
  * Whether to hide this rule in the user interface
2732
4735
  */
@@ -2735,7 +4738,7 @@ export interface RuleUpdateParams {
2735
4738
  /**
2736
4739
  * Time interval for recurring rule execution
2737
4740
  */
2738
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
4741
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
2739
4742
 
2740
4743
  /**
2741
4744
  * Whether this rule is required for participation
@@ -2747,39 +4750,78 @@ export interface RuleUpdateParams {
2747
4750
  */
2748
4751
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
2749
4752
 
4753
+ /**
4754
+ * The interval for the max amount. Available for the smart contract and external
4755
+ * rules.
4756
+ */
4757
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
4758
+
4759
+ /**
4760
+ * The maximum amount of points a user can earn per interval. Available for the
4761
+ * smart contract and external rules.
4762
+ */
4763
+ maxAmountPerInterval?: number | null;
4764
+
4765
+ /**
4766
+ * URL of the media to be displayed
4767
+ */
4768
+ mediaUrl?: string | null;
4769
+
4770
+ /**
4771
+ * Additional metadata for the loyalty rule
4772
+ */
4773
+ metadata?: RuleUpdateParams.Metadata;
4774
+
2750
4775
  /**
2751
4776
  * Blockchain network where the rule will apply
2752
4777
  */
2753
4778
  network?:
2754
- | 'mainnet'
2755
- | 'polygon'
2756
- | 'polygon_mumbai'
2757
- | 'optimism'
4779
+ | 'abstract'
4780
+ | 'abstractTestnet'
4781
+ | 'apechain'
2758
4782
  | 'arbitrum'
2759
- | 'binance'
2760
- | 'bscTestnet'
2761
4783
  | 'avalanche'
2762
4784
  | 'avalancheFuji'
2763
- | 'zksync'
2764
- | 'fantom'
2765
- | 'fantomTestnet'
2766
4785
  | 'base'
2767
4786
  | 'baseSepolia'
2768
- | 'skaleNebula'
2769
- | 'xai'
4787
+ | 'berachain'
2770
4788
  | 'berachainArtio'
2771
- | 'solana'
2772
- | 'apechain'
2773
- | 'flowMainnet'
4789
+ | 'berachainBepolia'
4790
+ | 'binance'
4791
+ | 'bscTestnet'
2774
4792
  | 'campTestnet'
4793
+ | 'fantom'
4794
+ | 'fantomTestnet'
4795
+ | 'flowMainnet'
4796
+ | 'mainnet'
4797
+ | 'optimism'
4798
+ | 'polygon'
4799
+ | 'polygon_mumbai'
4800
+ | 'skaleNebula'
4801
+ | 'solana'
4802
+ | 'sophon'
4803
+ | 'sophonTestnet'
2775
4804
  | 'sui'
4805
+ | 'superseed'
4806
+ | 'superseedSepolia'
2776
4807
  | 'vanar'
4808
+ | 'xai'
4809
+ | 'zksync'
4810
+ | 'coti'
4811
+ | 'cotiTestnet'
4812
+ | 'morph'
4813
+ | 'morphTestnet'
4814
+ | 'morphHolesky'
4815
+ | 'ultra'
4816
+ | 'ultraTestnet'
4817
+ | 'nitrograph'
2777
4818
  | 'sepolia'
2778
4819
  | 'optimism_sepolia'
2779
4820
  | 'arbitrumSepolia'
2780
4821
  | 'goerli'
2781
4822
  | 'optimism_goerli'
2782
- | 'arbitrumGoerli';
4823
+ | 'arbitrumGoerli'
4824
+ | 'basecamp';
2783
4825
 
2784
4826
  /**
2785
4827
  * ID for associated OAuth credentials
@@ -2789,19 +4831,97 @@ export interface RuleUpdateParams {
2789
4831
  /**
2790
4832
  * Type of reward issued by this rule
2791
4833
  */
2792
- rewardType?: 'points' | 'multiplier';
4834
+ rewardType?: 'points' | 'multiplier' | 'badge';
4835
+
4836
+ /**
4837
+ * URL of the Shopify store
4838
+ */
4839
+ shopifyStoreUrl?: string | null;
4840
+
4841
+ /**
4842
+ * Start time for the loyalty rule
4843
+ */
4844
+ startTime?: string | null;
2793
4845
 
2794
4846
  /**
2795
- * Optional subscription identifier for the rule
4847
+ * Optional subscription id for the rule
2796
4848
  */
2797
- subscriptionIdentifier?: string | null;
4849
+ subscriptionId?: string | null;
2798
4850
  }
2799
4851
 
2800
4852
  export namespace RuleUpdateParams {
4853
+ export interface Collection {
4854
+ /**
4855
+ * Blockchain address of the collection
4856
+ */
4857
+ address: string;
4858
+
4859
+ /**
4860
+ * Blockchain network for the collection
4861
+ */
4862
+ network:
4863
+ | 'abstract'
4864
+ | 'abstractTestnet'
4865
+ | 'apechain'
4866
+ | 'arbitrum'
4867
+ | 'avalanche'
4868
+ | 'avalancheFuji'
4869
+ | 'base'
4870
+ | 'baseSepolia'
4871
+ | 'berachain'
4872
+ | 'berachainArtio'
4873
+ | 'berachainBepolia'
4874
+ | 'binance'
4875
+ | 'bscTestnet'
4876
+ | 'campTestnet'
4877
+ | 'fantom'
4878
+ | 'fantomTestnet'
4879
+ | 'flowMainnet'
4880
+ | 'mainnet'
4881
+ | 'optimism'
4882
+ | 'polygon'
4883
+ | 'polygon_mumbai'
4884
+ | 'skaleNebula'
4885
+ | 'solana'
4886
+ | 'sophon'
4887
+ | 'sophonTestnet'
4888
+ | 'sui'
4889
+ | 'superseed'
4890
+ | 'superseedSepolia'
4891
+ | 'vanar'
4892
+ | 'xai'
4893
+ | 'zksync'
4894
+ | 'coti'
4895
+ | 'cotiTestnet'
4896
+ | 'morph'
4897
+ | 'morphTestnet'
4898
+ | 'morphHolesky'
4899
+ | 'ultra'
4900
+ | 'ultraTestnet'
4901
+ | 'nitrograph'
4902
+ | 'sepolia'
4903
+ | 'optimism_sepolia'
4904
+ | 'arbitrumSepolia'
4905
+ | 'goerli'
4906
+ | 'optimism_goerli'
4907
+ | 'arbitrumGoerli'
4908
+ | 'basecamp';
4909
+
4910
+ /**
4911
+ * Symbol of the collection.
4912
+ */
4913
+ symbol?: string;
4914
+ }
4915
+
2801
4916
  /**
2802
4917
  * Additional metadata for the loyalty rule
2803
4918
  */
2804
4919
  export interface Metadata {
4920
+ /**
4921
+ * Number of tokens per batch.
4922
+ */
4923
+ batchSize?: number | null;
4924
+
2805
4925
  /**
2806
4926
  * Text displayed on the action button.
2807
4927
  */
@@ -2832,6 +4952,11 @@ export namespace RuleUpdateParams {
2832
4952
  */
2833
4953
  collection?: Array<Metadata.Collection>;
2834
4954
 
4955
+ /**
4956
+ * Conditions for completing the profile.
4957
+ */
4958
+ completeProfileConditions?: { [key: string]: boolean } | null;
4959
+
2835
4960
  /**
2836
4961
  * Object containing details for the call-to-action.
2837
4962
  */
@@ -2842,6 +4967,11 @@ export namespace RuleUpdateParams {
2842
4967
  */
2843
4968
  customRewardsApiKey?: string;
2844
4969
 
4970
+ /**
4971
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
4972
+ */
4973
+ directRpc?: boolean;
4974
+
2845
4975
  /**
2846
4976
  * Array of Discord servers, channels, and roles to join.
2847
4977
  */
@@ -2867,11 +4997,21 @@ export namespace RuleUpdateParams {
2867
4997
  */
2868
4998
  enableVerifiedMultiplier?: boolean;
2869
4999
 
5000
+ /**
5001
+ * Fill source of the order for the token sale
5002
+ */
5003
+ fillSource?: string;
5004
+
2870
5005
  /**
2871
5006
  * Percentage reward given to a user for their first referral.
2872
5007
  */
2873
5008
  firstReferralReward?: number | null;
2874
5009
 
5010
+ /**
5011
+ * Flag indicating whether the fill source is included.
5012
+ */
5013
+ hasFillSource?: boolean;
5014
+
2875
5015
  /**
2876
5016
  * Indicates if the item has never been sold.
2877
5017
  */
@@ -2897,11 +5037,21 @@ export namespace RuleUpdateParams {
2897
5037
  */
2898
5038
  imageUrl?: string | null;
2899
5039
 
5040
+ /**
5041
+ * If enabled, the first transaction done on the platform will complete this rule
5042
+ */
5043
+ isCheckInOnEveryTxn?: boolean;
5044
+
2900
5045
  /**
2901
5046
  * Indicates if the multiplier has been applied to rewards.
2902
5047
  */
2903
5048
  isMultiplierApplied?: boolean;
2904
5049
 
5050
+ /**
5051
+ * Flag indicating if the rule is restricted to new users.
5052
+ */
5053
+ isRestrictedToNewUsers?: boolean;
5054
+
2905
5055
  /**
2906
5056
  * Flag indicating if rewards are applied retroactively.
2907
5057
  */
@@ -2917,6 +5067,11 @@ export namespace RuleUpdateParams {
2917
5067
  */
2918
5068
  link?: string | null;
2919
5069
 
5070
+ /**
5071
+ * Liquidity pool details.
5072
+ */
5073
+ liquidity?: Metadata.Liquidity;
5074
+
2920
5075
  /**
2921
5076
  * Maximum quantity constraint for token holding.
2922
5077
  */
@@ -2947,11 +5102,36 @@ export namespace RuleUpdateParams {
2947
5102
  */
2948
5103
  onlyNonListed?: boolean;
2949
5104
 
5105
+ /**
5106
+ * Indicates if only existing users are rewarded.
5107
+ */
5108
+ onlyRewardExistingUser?: boolean;
5109
+
5110
+ /**
5111
+ * give points for only one token ownership per contract
5112
+ */
5113
+ onlyRewardSingleTokenOwnership?: boolean | null;
5114
+
2950
5115
  /**
2951
5116
  * Promotional code associated with the rule.
2952
5117
  */
2953
5118
  promoCode?: string;
2954
5119
 
5120
+ /**
5121
+ * URL of the CSV file containing promo codes.
5122
+ */
5123
+ promoCodeCsvUrl?: string;
5124
+
5125
+ /**
5126
+ * Numbers of the promotional code to be generated.
5127
+ */
5128
+ promoCodeLength?: number | null;
5129
+
5130
+ /**
5131
+ * Type of the promotional code.
5132
+ */
5133
+ promoCodeType?: 'code' | 'csv' | 'generate';
5134
+
2955
5135
  /**
2956
5136
  * Array defining ranges and corresponding rewards.
2957
5137
  */
@@ -2967,11 +5147,37 @@ export namespace RuleUpdateParams {
2967
5147
  */
2968
5148
  referrerReward?: number | null;
2969
5149
 
5150
+ /**
5151
+ * Loyalty currency ID of the referrer reward.
5152
+ */
5153
+ referrerRewardLoyaltyCurrencyId?: string | null;
5154
+
5155
+ /**
5156
+ * Flag indicating if the post link is required.
5157
+ */
5158
+ requirePostLink?: boolean | null;
5159
+
5160
+ /**
5161
+ * Flag indicating if the rule can also reward badges per range.
5162
+ */
5163
+ rewardBadgePerRange?: boolean;
5164
+
5165
+ /**
5166
+ * Flag indicating if the reward is rewarded by batch.
5167
+ */
5168
+ rewardByBatch?: boolean | null;
5169
+
2970
5170
  /**
2971
5171
  * Flag indicating if rewards are given per impression.
2972
5172
  */
2973
5173
  rewardPerImpression?: boolean | null;
2974
5174
 
5175
+ /**
5176
+ * Flag indicating if the rule should reward based on value of traded tokens
5177
+ * instead of count.
5178
+ */
5179
+ rewardPerValue?: boolean;
5180
+
2975
5181
  /**
2976
5182
  * Currency associated with sales.
2977
5183
  */
@@ -2982,6 +5188,11 @@ export namespace RuleUpdateParams {
2982
5188
  */
2983
5189
  secondReferralReward?: number | null;
2984
5190
 
5191
+ /**
5192
+ * Flag indicating if the multiplier is skipped.
5193
+ */
5194
+ skipMultiplier?: boolean | null;
5195
+
2985
5196
  /**
2986
5197
  * Object containing details of the associated smart contract.
2987
5198
  */
@@ -2996,14 +5207,17 @@ export namespace RuleUpdateParams {
2996
5207
  * Social media platform associated with the rule.
2997
5208
  */
2998
5209
  socialPlatform?:
2999
- | 'Twitch'
5210
+ | 'Custom'
5211
+ | 'Discord'
5212
+ | 'EpicGames'
5213
+ | 'Instagram'
5214
+ | 'Steam'
5215
+ | 'Telegram'
3000
5216
  | 'TikTok'
5217
+ | 'Twitch'
3001
5218
  | 'X(Twitter)'
3002
- | 'Instagram'
3003
- | 'EpicGames'
3004
5219
  | 'YouTube'
3005
- | 'Discord'
3006
- | 'Custom'
5220
+ | 'Google'
3007
5221
  | null;
3008
5222
 
3009
5223
  /**
@@ -3016,11 +5230,21 @@ export namespace RuleUpdateParams {
3016
5230
  */
3017
5231
  socialPlatformName?: string | null;
3018
5232
 
5233
+ /**
5234
+ * ID of the Steam app.
5235
+ */
5236
+ steamAppId?: string | null;
5237
+
3019
5238
  /**
3020
5239
  * Array of streak milestones and corresponding rewards.
3021
5240
  */
3022
5241
  streakArray?: Array<Metadata.StreakArray> | null;
3023
5242
 
5243
+ /**
5244
+ * Metadata for swap loyalty rules
5245
+ */
5246
+ swap?: Metadata.Swap;
5247
+
3024
5248
  /**
3025
5249
  * ID of the Telegram channel.
3026
5250
  */
@@ -3036,6 +5260,12 @@ export namespace RuleUpdateParams {
3036
5260
  */
3037
5261
  trackAllContracts?: boolean | null;
3038
5262
 
5263
+ /**
5264
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
5265
+ * completed once the progress is 100%.
5266
+ */
5267
+ trackProgress?: boolean | null;
5268
+
3039
5269
  /**
3040
5270
  * URL of the associated Twitter account.
3041
5271
  */
@@ -3079,7 +5309,17 @@ export namespace RuleUpdateParams {
3079
5309
  /**
3080
5310
  * Type of wallet associated with the rule.
3081
5311
  */
3082
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
5312
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
5313
+
5314
+ /**
5315
+ * ID of the Youtube channel.
5316
+ */
5317
+ youtubeChannelId?: string | null;
5318
+
5319
+ /**
5320
+ * ID of the Youtube video.
5321
+ */
5322
+ youtubeVideoId?: string | null;
3083
5323
  }
3084
5324
 
3085
5325
  export namespace Metadata {
@@ -3098,35 +5338,52 @@ export namespace RuleUpdateParams {
3098
5338
  * Blockchain network of the collection.
3099
5339
  */
3100
5340
  network?:
3101
- | 'mainnet'
3102
- | 'polygon'
3103
- | 'polygon_mumbai'
3104
- | 'optimism'
5341
+ | 'abstract'
5342
+ | 'abstractTestnet'
5343
+ | 'apechain'
3105
5344
  | 'arbitrum'
3106
- | 'binance'
3107
- | 'bscTestnet'
3108
5345
  | 'avalanche'
3109
5346
  | 'avalancheFuji'
3110
- | 'zksync'
3111
- | 'fantom'
3112
- | 'fantomTestnet'
3113
5347
  | 'base'
3114
5348
  | 'baseSepolia'
3115
- | 'skaleNebula'
3116
- | 'xai'
5349
+ | 'berachain'
3117
5350
  | 'berachainArtio'
3118
- | 'solana'
3119
- | 'apechain'
3120
- | 'flowMainnet'
5351
+ | 'berachainBepolia'
5352
+ | 'binance'
5353
+ | 'bscTestnet'
3121
5354
  | 'campTestnet'
5355
+ | 'fantom'
5356
+ | 'fantomTestnet'
5357
+ | 'flowMainnet'
5358
+ | 'mainnet'
5359
+ | 'optimism'
5360
+ | 'polygon'
5361
+ | 'polygon_mumbai'
5362
+ | 'skaleNebula'
5363
+ | 'solana'
5364
+ | 'sophon'
5365
+ | 'sophonTestnet'
3122
5366
  | 'sui'
5367
+ | 'superseed'
5368
+ | 'superseedSepolia'
3123
5369
  | 'vanar'
5370
+ | 'xai'
5371
+ | 'zksync'
5372
+ | 'coti'
5373
+ | 'cotiTestnet'
5374
+ | 'morph'
5375
+ | 'morphTestnet'
5376
+ | 'morphHolesky'
5377
+ | 'ultra'
5378
+ | 'ultraTestnet'
5379
+ | 'nitrograph'
3124
5380
  | 'sepolia'
3125
5381
  | 'optimism_sepolia'
3126
5382
  | 'arbitrumSepolia'
3127
5383
  | 'goerli'
3128
5384
  | 'optimism_goerli'
3129
- | 'arbitrumGoerli';
5385
+ | 'arbitrumGoerli'
5386
+ | 'basecamp';
3130
5387
  }
3131
5388
 
3132
5389
  /**
@@ -3172,6 +5429,11 @@ export namespace RuleUpdateParams {
3172
5429
  * Array of emojis used in the channel.
3173
5430
  */
3174
5431
  emojis?: Array<Channel.Emoji>;
5432
+
5433
+ /**
5434
+ * Phrase of text to be present in the discord message
5435
+ */
5436
+ text?: string;
3175
5437
  }
3176
5438
 
3177
5439
  export namespace Channel {
@@ -3198,6 +5460,103 @@ export namespace RuleUpdateParams {
3198
5460
  id: string;
3199
5461
  }
3200
5462
 
5463
+ /**
5464
+ * Liquidity pool details.
5465
+ */
5466
+ export interface Liquidity {
5467
+ /**
5468
+ * Calculation type of the liquidity pool.
5469
+ */
5470
+ calculationType?: 'fixed' | 'custom';
5471
+
5472
+ /**
5473
+ * Custom function to calculate the the reward amount based on the liquidity
5474
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
5475
+ * USD.
5476
+ */
5477
+ customFunction?: string;
5478
+
5479
+ /**
5480
+ * Liquidity provided per day in USD
5481
+ */
5482
+ liquidityPerDay?: number;
5483
+
5484
+ /**
5485
+ * Blockchain network of the liquidity pool.
5486
+ */
5487
+ network?:
5488
+ | 'abstract'
5489
+ | 'abstractTestnet'
5490
+ | 'apechain'
5491
+ | 'arbitrum'
5492
+ | 'avalanche'
5493
+ | 'avalancheFuji'
5494
+ | 'base'
5495
+ | 'baseSepolia'
5496
+ | 'berachain'
5497
+ | 'berachainArtio'
5498
+ | 'berachainBepolia'
5499
+ | 'binance'
5500
+ | 'bscTestnet'
5501
+ | 'campTestnet'
5502
+ | 'fantom'
5503
+ | 'fantomTestnet'
5504
+ | 'flowMainnet'
5505
+ | 'mainnet'
5506
+ | 'optimism'
5507
+ | 'polygon'
5508
+ | 'polygon_mumbai'
5509
+ | 'skaleNebula'
5510
+ | 'solana'
5511
+ | 'sophon'
5512
+ | 'sophonTestnet'
5513
+ | 'sui'
5514
+ | 'superseed'
5515
+ | 'superseedSepolia'
5516
+ | 'vanar'
5517
+ | 'xai'
5518
+ | 'zksync'
5519
+ | 'coti'
5520
+ | 'cotiTestnet'
5521
+ | 'morph'
5522
+ | 'morphTestnet'
5523
+ | 'morphHolesky'
5524
+ | 'ultra'
5525
+ | 'ultraTestnet'
5526
+ | 'nitrograph'
5527
+ | 'sepolia'
5528
+ | 'optimism_sepolia'
5529
+ | 'arbitrumSepolia'
5530
+ | 'goerli'
5531
+ | 'optimism_goerli'
5532
+ | 'arbitrumGoerli'
5533
+ | 'basecamp';
5534
+
5535
+ /**
5536
+ * Indicates if only in-range liquidity is rewarded.
5537
+ */
5538
+ onlyRewardInRangeLiquidity?: boolean;
5539
+
5540
+ /**
5541
+ * Array of liquidity pools associated with the rule.
5542
+ */
5543
+ pools?: Array<Liquidity.Pool>;
5544
+
5545
+ /**
5546
+ * Protocol of the liquidity pool.
5547
+ */
5548
+ protocol?: string;
5549
+ }
5550
+
5551
+ export namespace Liquidity {
5552
+ export interface Pool {
5553
+ /**
5554
+ * Unique identifier of the liquidity pool.
5555
+ */
5556
+ id: string;
5557
+ }
5558
+ }
5559
+
3201
5560
  export interface Range {
3202
5561
  /**
3203
5562
  * Reward amount for this range.
@@ -3213,6 +5572,16 @@ export namespace RuleUpdateParams {
3213
5572
  * Start value of the range.
3214
5573
  */
3215
5574
  startRange: number;
5575
+
5576
+ /**
5577
+ * ID of the loyalty badge for this range.
5578
+ */
5579
+ loyaltyBadgeId?: string;
5580
+
5581
+ /**
5582
+ * Amount of the loyalty multiplier for this range.
5583
+ */
5584
+ loyaltyMultiplierAmount?: number;
3216
5585
  }
3217
5586
 
3218
5587
  /**
@@ -3265,20 +5634,15 @@ export namespace RuleUpdateParams {
3265
5634
  * Object containing details of the associated smart contract.
3266
5635
  */
3267
5636
  export interface SmartContract {
3268
- /**
3269
- * ABI of the smart contract.
3270
- */
3271
- abi?: string | null;
3272
-
3273
5637
  /**
3274
5638
  * Mapping of addresses for the smart contract.
3275
5639
  */
3276
5640
  addressMapping?: string | null;
3277
5641
 
3278
5642
  /**
3279
- * Array of bonus details applied to the rule.
5643
+ * Object containing details of the amount multiplier from the event.
3280
5644
  */
3281
- bonus?: Array<SmartContract.Bonus> | null;
5645
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3282
5646
 
3283
5647
  /**
3284
5648
  * ID of the smart contract.
@@ -3290,68 +5654,31 @@ export namespace RuleUpdateParams {
3290
5654
  */
3291
5655
  criteria?: 'everyEvent' | 'byParameter' | null;
3292
5656
 
3293
- /**
3294
- * Time range applied to the rule.
3295
- */
3296
- customRange?: SmartContract.CustomRange | null;
3297
-
3298
5657
  /**
3299
5658
  * Event emitted by the smart contract.
3300
5659
  */
3301
5660
  event?: string | null;
3302
5661
 
3303
- /**
3304
- * Maximum value allowed for the parameter.
3305
- */
3306
- max?: number | null;
3307
-
3308
5662
  /**
3309
5663
  * Array of parameters for the smart contract.
3310
5664
  */
3311
5665
  params?: Array<SmartContract.Param> | null;
3312
5666
 
3313
5667
  /**
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.
5668
+ * Type of the smart contract interaction.
3325
5669
  */
3326
- withMax?: boolean | null;
5670
+ type?: 'function' | 'event' | null;
3327
5671
  }
3328
5672
 
3329
5673
  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
5674
  /**
3343
- * Time range applied to the rule.
5675
+ * Object containing details of the amount multiplier from the event.
3344
5676
  */
3345
- export interface CustomRange {
3346
- /**
3347
- * End time of the custom range.
3348
- */
3349
- endsAt?: string | null;
3350
-
5677
+ export interface AmountMultiplier {
3351
5678
  /**
3352
- * Start time of the custom range.
5679
+ * Mapping of the value for the smart contract.
3353
5680
  */
3354
- startsAt?: string | null;
5681
+ valueMapping?: string | null;
3355
5682
  }
3356
5683
 
3357
5684
  export interface Param {
@@ -3395,61 +5722,78 @@ export namespace RuleUpdateParams {
3395
5722
  */
3396
5723
  streakMilestone: number;
3397
5724
  }
3398
- }
3399
5725
 
3400
- export interface Collection {
3401
5726
  /**
3402
- * Blockchain address of the collection
5727
+ * Metadata for swap loyalty rules
3403
5728
  */
3404
- address: string;
5729
+ export interface Swap {
5730
+ provider?: 'any' | 'relay' | 'lifi';
3405
5731
 
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';
5732
+ relayReferrerId?: string;
5733
+
5734
+ requireCrossChainSwap?: boolean;
5735
+
5736
+ swappedToChain?: 'any' | number | string;
5737
+
5738
+ swappedToTokens?: Array<Swap.SwappedToToken>;
5739
+
5740
+ tokenMode?: 'any' | 'specific';
5741
+
5742
+ trackTokenAmount?: boolean;
5743
+ }
5744
+
5745
+ export namespace Swap {
5746
+ export interface SwappedToToken {
5747
+ address: string;
5748
+
5749
+ chainId: string;
5750
+ }
5751
+ }
3439
5752
  }
3440
5753
  }
3441
5754
 
3442
5755
  export interface RuleListParams {
5756
+ /**
5757
+ * IDs of the users to filter results by
5758
+ */
5759
+ allotedToUserId?: string | Array<string>;
5760
+
5761
+ /**
5762
+ * ID of the user group to filter results by
5763
+ */
5764
+ allotedUserGroupId?: string;
5765
+
3443
5766
  /**
3444
5767
  * Address of the collection to filter by
3445
5768
  */
3446
5769
  collectionAddress?: string;
3447
5770
 
3448
5771
  /**
3449
- * Maximum number of records to return (max 1000)
5772
+ * If true this will only return loyalty rule chains
5773
+ */
5774
+ includeLoyaltyRuleChains?: 'true' | 'false';
5775
+
5776
+ /**
5777
+ * If true this will only return active rules, the rules for which the startTime is
5778
+ * in the past and the endTime is in the future
5779
+ */
5780
+ isActive?: 'true' | 'false';
5781
+
5782
+ /**
5783
+ * Maximum number of records to return (max 100)
3450
5784
  */
3451
5785
  limit?: number;
3452
5786
 
5787
+ /**
5788
+ * ID of the loyalty rule group to filter results
5789
+ */
5790
+ loyaltyRuleGroupId?: string;
5791
+
5792
+ /**
5793
+ * The IDs of the loyalty rule
5794
+ */
5795
+ loyaltyRuleId?: string | Array<string>;
5796
+
3453
5797
  /**
3454
5798
  * Unique identifier for the organization to filter by
3455
5799
  */
@@ -3466,11 +5810,39 @@ export interface RuleListParams {
3466
5810
  websiteId?: string;
3467
5811
  }
3468
5812
 
5813
+ export interface RuleDeleteParams {
5814
+ /**
5815
+ * Whether to debit loyalty points
5816
+ */
5817
+ debitLoyaltyPoints?: string;
5818
+ }
5819
+
3469
5820
  export interface RuleCompleteParams {
3470
5821
  /**
3471
- * Link to the comment made by user
5822
+ * Override amount for the reward (rounded to nearest whole number). This will
5823
+ * override the rule amount and reward the integer passed.
5824
+ */
5825
+ amount?: number | null;
5826
+
5827
+ /**
5828
+ * Link to the post/comment made by user
5829
+ */
5830
+ contentUrl?: string;
5831
+
5832
+ /**
5833
+ * Unique key to ensure idempotent requests.
5834
+ */
5835
+ idempotencyKey?: string;
5836
+
5837
+ /**
5838
+ * ID of the choice selected by the user
5839
+ */
5840
+ loyaltyQuestionChoiceId?: string;
5841
+
5842
+ /**
5843
+ * Value to compare with the range
3472
5844
  */
3473
- commentLink?: string;
5845
+ rangeValue?: number | null;
3474
5846
 
3475
5847
  /**
3476
5848
  * Unique identifier for the user
@@ -3482,18 +5854,26 @@ export interface RuleCompleteParams {
3482
5854
  */
3483
5855
  verificationCode?: string;
3484
5856
 
5857
+ /**
5858
+ * Flag indicating if only verification is required, this will not create a
5859
+ * transaction and reward the user.
5860
+ */
5861
+ verifyOnly?: string;
5862
+
3485
5863
  /**
3486
5864
  * Wallet address of the user can only be used if userId is not provided
3487
5865
  */
3488
5866
  walletAddress?: string;
3489
5867
  }
3490
5868
 
3491
- export interface RuleStatusParams {
3492
- organizationId: string;
3493
-
3494
- websiteId: string;
5869
+ export interface RuleGetStatusParams {
5870
+ organizationId?: string;
3495
5871
 
3496
5872
  userId?: string;
5873
+
5874
+ walletAddress?: string;
5875
+
5876
+ websiteId?: string;
3497
5877
  }
3498
5878
 
3499
5879
  export declare namespace Rules {
@@ -3503,11 +5883,12 @@ export declare namespace Rules {
3503
5883
  type RuleListResponse as RuleListResponse,
3504
5884
  type RuleDeleteResponse as RuleDeleteResponse,
3505
5885
  type RuleCompleteResponse as RuleCompleteResponse,
3506
- type RuleStatusResponse as RuleStatusResponse,
5886
+ type RuleGetStatusResponse as RuleGetStatusResponse,
3507
5887
  type RuleCreateParams as RuleCreateParams,
3508
5888
  type RuleUpdateParams as RuleUpdateParams,
3509
5889
  type RuleListParams as RuleListParams,
5890
+ type RuleDeleteParams as RuleDeleteParams,
3510
5891
  type RuleCompleteParams as RuleCompleteParams,
3511
- type RuleStatusParams as RuleStatusParams,
5892
+ type RuleGetStatusParams as RuleGetStatusParams,
3512
5893
  };
3513
5894
  }