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

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