@snagsolutions/sdk 0.1.0-alpha.13 → 0.1.0-alpha.131

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 +1133 -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 +980 -77
  97. package/resources/loyalty/badges.d.ts.map +1 -1
  98. package/resources/loyalty/badges.js +19 -1
  99. package/resources/loyalty/badges.js.map +1 -1
  100. package/resources/loyalty/badges.mjs +19 -1
  101. package/resources/loyalty/badges.mjs.map +1 -1
  102. package/resources/loyalty/currencies.d.ts +20 -1
  103. package/resources/loyalty/currencies.d.ts.map +1 -1
  104. package/resources/loyalty/currencies.js +19 -0
  105. package/resources/loyalty/currencies.js.map +1 -1
  106. package/resources/loyalty/currencies.mjs +19 -0
  107. package/resources/loyalty/currencies.mjs.map +1 -1
  108. package/resources/loyalty/index.d.ts +9 -5
  109. package/resources/loyalty/index.d.ts.map +1 -1
  110. package/resources/loyalty/index.js +11 -3
  111. package/resources/loyalty/index.js.map +1 -1
  112. package/resources/loyalty/index.mjs +6 -2
  113. package/resources/loyalty/index.mjs.map +1 -1
  114. package/resources/loyalty/loyalty.d.ts +33 -17
  115. package/resources/loyalty/loyalty.d.ts.map +1 -1
  116. package/resources/loyalty/loyalty.js +28 -12
  117. package/resources/loyalty/loyalty.js.map +1 -1
  118. package/resources/loyalty/loyalty.mjs +29 -13
  119. package/resources/loyalty/loyalty.mjs.map +1 -1
  120. package/resources/loyalty/multipliers.d.ts +97 -4
  121. package/resources/loyalty/multipliers.d.ts.map +1 -1
  122. package/resources/loyalty/multipliers.js +29 -0
  123. package/resources/loyalty/multipliers.js.map +1 -1
  124. package/resources/loyalty/multipliers.mjs +29 -0
  125. package/resources/loyalty/multipliers.mjs.map +1 -1
  126. package/resources/loyalty/questions-responses.d.ts +136 -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 +185 -0
  133. package/resources/loyalty/questions.d.ts.map +1 -0
  134. package/resources/loyalty/questions.js +58 -0
  135. package/resources/loyalty/questions.js.map +1 -0
  136. package/resources/loyalty/questions.mjs +54 -0
  137. package/resources/loyalty/questions.mjs.map +1 -0
  138. package/resources/loyalty/rule-edits.d.ts +2585 -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 +762 -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 +1871 -296
  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 +112 -9
  223. package/resources/users/metadatas.d.ts.map +1 -1
  224. package/resources/users/metadatas.js +6 -0
  225. package/resources/users/metadatas.js.map +1 -1
  226. package/resources/users/metadatas.mjs +6 -0
  227. package/resources/users/metadatas.mjs.map +1 -1
  228. package/resources/users/users.d.ts +414 -6
  229. package/resources/users/users.d.ts.map +1 -1
  230. package/resources/users/users.js +77 -4
  231. package/resources/users/users.js.map +1 -1
  232. package/resources/users/users.mjs +78 -5
  233. package/resources/users/users.mjs.map +1 -1
  234. package/resources/users.d.ts +2 -0
  235. package/resources/users.d.ts.map +1 -0
  236. package/resources/users.js +19 -0
  237. package/resources/users.js.map +1 -0
  238. package/resources/users.mjs +3 -0
  239. package/resources/users.mjs.map +1 -0
  240. package/resources/websites/index.d.ts +4 -0
  241. package/resources/websites/index.d.ts.map +1 -0
  242. package/resources/websites/index.js +11 -0
  243. package/resources/websites/index.js.map +1 -0
  244. package/resources/websites/index.mjs +5 -0
  245. package/resources/websites/index.mjs.map +1 -0
  246. package/resources/websites/website-collections.d.ts +94 -0
  247. package/resources/websites/website-collections.d.ts.map +1 -0
  248. package/resources/websites/website-collections.js +46 -0
  249. package/resources/websites/website-collections.js.map +1 -0
  250. package/resources/websites/website-collections.mjs +42 -0
  251. package/resources/websites/website-collections.mjs.map +1 -0
  252. package/resources/websites/website-user-roles.d.ts +96 -0
  253. package/resources/websites/website-user-roles.d.ts.map +1 -0
  254. package/resources/websites/website-user-roles.js +45 -0
  255. package/resources/websites/website-user-roles.js.map +1 -0
  256. package/resources/websites/website-user-roles.mjs +41 -0
  257. package/resources/websites/website-user-roles.mjs.map +1 -0
  258. package/resources/websites/websites.d.ts +223 -0
  259. package/resources/websites/websites.d.ts.map +1 -0
  260. package/resources/websites/websites.js +63 -0
  261. package/resources/websites/websites.js.map +1 -0
  262. package/resources/websites/websites.mjs +36 -0
  263. package/resources/websites/websites.mjs.map +1 -0
  264. package/resources/websites.d.ts +1 -202
  265. package/resources/websites.d.ts.map +1 -1
  266. package/resources/websites.js +15 -18
  267. package/resources/websites.js.map +1 -1
  268. package/resources/websites.mjs +1 -16
  269. package/resources/websites.mjs.map +1 -1
  270. package/resources.d.ts +2 -0
  271. package/resources.d.ts.map +1 -0
  272. package/resources.js +18 -0
  273. package/resources.js.map +1 -0
  274. package/resources.mjs +2 -0
  275. package/resources.mjs.map +1 -0
  276. package/src/_shims/index.d.ts +2 -0
  277. package/src/_shims/index.js +5 -1
  278. package/src/_shims/index.mjs +5 -1
  279. package/src/core.ts +56 -20
  280. package/src/index.ts +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 +1192 -92
  295. package/src/resources/loyalty/currencies.ts +20 -1
  296. package/src/resources/loyalty/index.ts +53 -9
  297. package/src/resources/loyalty/loyalty.ts +160 -60
  298. package/src/resources/loyalty/multipliers.ts +124 -4
  299. package/src/resources/loyalty/questions-responses.ts +191 -0
  300. package/src/resources/loyalty/questions.ts +244 -0
  301. package/src/resources/loyalty/rule-edits.ts +3622 -63
  302. package/src/resources/loyalty/rule-groups.ts +1181 -0
  303. package/src/resources/loyalty/rules.ts +3068 -579
  304. package/src/resources/loyalty/transactions/index.ts +18 -0
  305. package/src/resources/loyalty/transactions/rule-statuses.ts +178 -0
  306. package/src/resources/loyalty/transactions/transactions.ts +675 -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 +167 -8
  316. package/src/resources/users/users.ts +581 -17
  317. package/src/resources/users.ts +3 -0
  318. package/src/resources/websites/index.ts +22 -0
  319. package/src/resources/websites/website-collections.ts +182 -0
  320. package/src/resources/websites/website-user-roles.ts +130 -0
  321. package/src/resources/websites/websites.ts +311 -0
  322. package/src/resources/websites.ts +1 -257
  323. package/src/resources.ts +1 -0
  324. package/src/version.ts +1 -1
  325. package/version.d.ts +1 -1
  326. package/version.d.ts.map +1 -1
  327. package/version.js +1 -1
  328. package/version.js.map +1 -1
  329. package/version.mjs +1 -1
  330. package/version.mjs.map +1 -1
  331. package/resources/auction-bids.d.ts +0 -81
  332. package/resources/auction-bids.d.ts.map +0 -1
  333. package/resources/auction-bids.js +0 -30
  334. package/resources/auction-bids.js.map +0 -1
  335. package/resources/auction-bids.mjs +0 -26
  336. package/resources/auction-bids.mjs.map +0 -1
  337. package/resources/drip/drip.d.ts +0 -14
  338. package/resources/drip/drip.d.ts.map +0 -1
  339. package/resources/drip/drip.js.map +0 -1
  340. package/resources/drip/drip.mjs +0 -16
  341. package/resources/drip/drip.mjs.map +0 -1
  342. package/resources/drip/index.d.ts +0 -4
  343. package/resources/drip/index.d.ts.map +0 -1
  344. package/resources/drip/index.js +0 -11
  345. package/resources/drip/index.js.map +0 -1
  346. package/resources/drip/index.mjs +0 -5
  347. package/resources/drip/index.mjs.map +0 -1
  348. package/resources/drip/quests.d.ts +0 -168
  349. package/resources/drip/quests.d.ts.map +0 -1
  350. package/resources/drip/quests.js +0 -17
  351. package/resources/drip/quests.js.map +0 -1
  352. package/resources/drip/quests.mjs +0 -13
  353. package/resources/drip/quests.mjs.map +0 -1
  354. package/resources/drip/status.d.ts +0 -26
  355. package/resources/drip/status.d.ts.map +0 -1
  356. package/resources/drip/status.js +0 -16
  357. package/resources/drip/status.js.map +0 -1
  358. package/resources/drip/status.mjs +0 -12
  359. package/resources/drip/status.mjs.map +0 -1
  360. package/resources/loyalty/transaction-entries.d.ts +0 -175
  361. package/resources/loyalty/transaction-entries.d.ts.map +0 -1
  362. package/resources/loyalty/transaction-entries.js +0 -16
  363. package/resources/loyalty/transaction-entries.js.map +0 -1
  364. package/resources/loyalty/transaction-entries.mjs +0 -12
  365. package/resources/loyalty/transaction-entries.mjs.map +0 -1
  366. package/resources/users/wallets.d.ts +0 -193
  367. package/resources/users/wallets.d.ts.map +0 -1
  368. package/resources/users/wallets.js +0 -28
  369. package/resources/users/wallets.js.map +0 -1
  370. package/resources/users/wallets.mjs +0 -24
  371. package/resources/users/wallets.mjs.map +0 -1
  372. package/src/resources/auction-bids.ts +0 -123
  373. package/src/resources/drip/drip.ts +0 -25
  374. package/src/resources/drip/index.ts +0 -5
  375. package/src/resources/drip/quests.ts +0 -210
  376. package/src/resources/drip/status.ts +0 -33
  377. package/src/resources/loyalty/transaction-entries.ts +0 -229
  378. package/src/resources/users/wallets.ts +0 -271
@@ -7,6 +7,24 @@ import * as Core from '../../core';
7
7
  export class Rules extends APIResource {
8
8
  /**
9
9
  * Create a new Loyalty Rule
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const rule = await client.loyalty.rules.create({
14
+ * amount: '10.5',
15
+ * effectiveEndTime: '2024-12-31T23:59:00Z',
16
+ * effectiveStartTime: '2024-01-01T00:00:00Z',
17
+ * endTime: '2024-12-31T23:59:00Z',
18
+ * frequency: 'daily',
19
+ * loyaltyCurrencyId: '456e1234-e89b-12d3-a456-426614174003',
20
+ * metadata: {},
21
+ * name: 'Referral Bonus Rule',
22
+ * organizationId: '123e4567-e89b-12d3-a456-426614174001',
23
+ * startTime: '2024-01-01T00:00:00Z',
24
+ * type: 'Bonus',
25
+ * websiteId: '123e4567-e89b-12d3-a456-426614174002',
26
+ * });
27
+ * ```
10
28
  */
11
29
  create(body: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse> {
12
30
  return this._client.post('/api/loyalty/rules', { body, ...options });
@@ -14,6 +32,18 @@ export class Rules extends APIResource {
14
32
 
15
33
  /**
16
34
  * Update an existing Loyalty Rule
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const rule = await client.loyalty.rules.update(
39
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
40
+ * {
41
+ * amount: '10.5',
42
+ * endTime: '2024-12-31T23:59:00Z',
43
+ * name: 'Daily Rewards Program',
44
+ * },
45
+ * );
46
+ * ```
17
47
  */
18
48
  update(
19
49
  id: string,
@@ -25,6 +55,11 @@ export class Rules extends APIResource {
25
55
 
26
56
  /**
27
57
  * Retrieve configured loyalty rules with optional pagination and filters
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const rules = await client.loyalty.rules.list();
62
+ * ```
28
63
  */
29
64
  list(query?: RuleListParams, options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
30
65
  list(options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
@@ -40,17 +75,46 @@ export class Rules extends APIResource {
40
75
 
41
76
  /**
42
77
  * Delete an existing Loyalty Rule
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * const rule = await client.loyalty.rules.delete(
82
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
83
+ * );
84
+ * ```
43
85
  */
44
- delete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse> {
45
- return this._client.delete(`/api/loyalty/rules/${id}`, options);
86
+ delete(
87
+ id: string,
88
+ params?: RuleDeleteParams,
89
+ options?: Core.RequestOptions,
90
+ ): Core.APIPromise<RuleDeleteResponse>;
91
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse>;
92
+ delete(
93
+ id: string,
94
+ params: RuleDeleteParams | Core.RequestOptions = {},
95
+ options?: Core.RequestOptions,
96
+ ): Core.APIPromise<RuleDeleteResponse> {
97
+ if (isRequestOptions(params)) {
98
+ return this.delete(id, {}, params);
99
+ }
100
+ const { debitLoyaltyPoints } = params;
101
+ return this._client.delete(`/api/loyalty/rules/${id}`, { query: { debitLoyaltyPoints }, ...options });
46
102
  }
47
103
 
48
104
  /**
49
105
  * Verify a loyalty rule based on user action and reward them if applicable. This
50
- * endpoint currenlty onlu supports following rule types code_entry, text_input,
106
+ * endpoint currently only supports following rule types code_entry, text_input,
51
107
  * link_click, discord_member, connect_wallet, check_in, external_rule,
52
108
  * drip_x_follow, drip_x_new_tweet, drip_x_text_in_bio, drip_x_text_in_name,
53
- * drip_x_text_in_comment, drip_x_tweet, telegram_join
109
+ * drip_x_text_in_comment, drip_x_tweet, telegram_join, DiscordMessages,
110
+ * youtube_subscribers, youtube_comment, steam_wishlist
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * const response = await client.loyalty.rules.complete(
115
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
116
+ * );
117
+ * ```
54
118
  */
55
119
  complete(
56
120
  id: string,
@@ -71,8 +135,24 @@ export class Rules extends APIResource {
71
135
 
72
136
  /**
73
137
  * This will return the processing status of quests for a specific user
138
+ *
139
+ * @example
140
+ * ```ts
141
+ * const response = await client.loyalty.rules.getStatus();
142
+ * ```
74
143
  */
75
- status(query: RuleStatusParams, options?: Core.RequestOptions): Core.APIPromise<RuleStatusResponse> {
144
+ getStatus(
145
+ query?: RuleGetStatusParams,
146
+ options?: Core.RequestOptions,
147
+ ): Core.APIPromise<RuleGetStatusResponse>;
148
+ getStatus(options?: Core.RequestOptions): Core.APIPromise<RuleGetStatusResponse>;
149
+ getStatus(
150
+ query: RuleGetStatusParams | Core.RequestOptions = {},
151
+ options?: Core.RequestOptions,
152
+ ): Core.APIPromise<RuleGetStatusResponse> {
153
+ if (isRequestOptions(query)) {
154
+ return this.getStatus({}, query);
155
+ }
76
156
  return this._client.get('/api/loyalty/rules/status', { query, ...options });
77
157
  }
78
158
  }
@@ -184,7 +264,20 @@ 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'
280
+ | 'discord_join';
188
281
 
189
282
  /**
190
283
  * Unique identifier for the associated website
@@ -221,6 +314,13 @@ export interface RuleCreateResponse {
221
314
  */
222
315
  description?: string;
223
316
 
317
+ duplicatedFromId?: string | null;
318
+
319
+ /**
320
+ * ID of the external integration
321
+ */
322
+ externalIntegrationId?: string | null;
323
+
224
324
  /**
225
325
  * Whether to hide this rule in the user interface
226
326
  */
@@ -229,51 +329,95 @@ export interface RuleCreateResponse {
229
329
  /**
230
330
  * Interval between rule executions
231
331
  */
232
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
332
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
233
333
 
234
334
  /**
235
335
  * Whether this rule is mandatory
236
336
  */
237
337
  isRequired?: boolean;
238
338
 
339
+ /**
340
+ * Unique identifier for the loyalty badge
341
+ */
342
+ loyaltyBadgeId?: string | null;
343
+
239
344
  /**
240
345
  * Unique identifier for the loyalty rule group
241
346
  */
242
347
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
243
348
 
349
+ /**
350
+ * URL for uploading loyalty user allotment via CSV
351
+ */
352
+ loyaltyUserAllotmentCsvUrl?: string;
353
+
354
+ /**
355
+ * The interval for the max amount. Available for the smart contract and external
356
+ * rules.
357
+ */
358
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
359
+
360
+ /**
361
+ * The maximum amount of points a user can earn per interval. Available for the
362
+ * smart contract and external rules.
363
+ */
364
+ maxAmountPerInterval?: number | null;
365
+
366
+ /**
367
+ * URL of the media to be displayed
368
+ */
369
+ mediaUrl?: string | null;
370
+
244
371
  /**
245
372
  * Blockchain network where the rule will apply
246
373
  */
247
374
  network?:
248
- | 'mainnet'
249
- | 'polygon'
250
- | 'polygon_mumbai'
251
- | 'optimism'
375
+ | 'abstract'
376
+ | 'abstractTestnet'
377
+ | 'apechain'
252
378
  | 'arbitrum'
253
- | 'binance'
254
- | 'bscTestnet'
255
379
  | 'avalanche'
256
380
  | 'avalancheFuji'
257
- | 'zksync'
258
- | 'fantom'
259
- | 'fantomTestnet'
260
381
  | 'base'
261
382
  | 'baseSepolia'
262
- | 'skaleNebula'
263
- | 'xai'
383
+ | 'berachain'
264
384
  | 'berachainArtio'
265
- | 'solana'
266
- | 'apechain'
267
- | 'flowMainnet'
385
+ | 'berachainBepolia'
386
+ | 'binance'
387
+ | 'bscTestnet'
268
388
  | 'campTestnet'
389
+ | 'fantom'
390
+ | 'fantomTestnet'
391
+ | 'flowMainnet'
392
+ | 'mainnet'
393
+ | 'optimism'
394
+ | 'polygon'
395
+ | 'polygon_mumbai'
396
+ | 'skaleNebula'
397
+ | 'solana'
398
+ | 'sophon'
399
+ | 'sophonTestnet'
269
400
  | 'sui'
401
+ | 'superseed'
402
+ | 'superseedSepolia'
270
403
  | 'vanar'
404
+ | 'xai'
405
+ | 'zksync'
406
+ | 'coti'
407
+ | 'cotiTestnet'
408
+ | 'morph'
409
+ | 'morphTestnet'
410
+ | 'morphHolesky'
411
+ | 'ultra'
412
+ | 'ultraTestnet'
413
+ | 'nitrograph'
271
414
  | 'sepolia'
272
415
  | 'optimism_sepolia'
273
416
  | 'arbitrumSepolia'
274
417
  | 'goerli'
275
418
  | 'optimism_goerli'
276
- | 'arbitrumGoerli';
419
+ | 'arbitrumGoerli'
420
+ | 'basecamp';
277
421
 
278
422
  /**
279
423
  * OAuth credentials associated with the rule
@@ -283,12 +427,17 @@ export interface RuleCreateResponse {
283
427
  /**
284
428
  * Type of reward issued by the rule
285
429
  */
286
- rewardType?: 'points' | 'multiplier';
430
+ rewardType?: 'points' | 'multiplier' | 'badge';
287
431
 
288
432
  /**
289
- * Identifier for associated subscriptions
433
+ * URL of the Shopify store
290
434
  */
291
- subscriptionIdentifier?: string | null;
435
+ shopifyStoreUrl?: string | null;
436
+
437
+ /**
438
+ * Optional subscription id for the rule
439
+ */
440
+ subscriptionId?: string | null;
292
441
  }
293
442
 
294
443
  export namespace RuleCreateResponse {
@@ -296,6 +445,11 @@ export namespace RuleCreateResponse {
296
445
  * Additional metadata for the loyalty rule
297
446
  */
298
447
  export interface Metadata {
448
+ /**
449
+ * Number of tokens per batch.
450
+ */
451
+ batchSize?: number | null;
452
+
299
453
  /**
300
454
  * Text displayed on the action button.
301
455
  */
@@ -326,6 +480,16 @@ export namespace RuleCreateResponse {
326
480
  */
327
481
  collection?: Array<Metadata.Collection>;
328
482
 
483
+ /**
484
+ * Conditions for completing the profile.
485
+ */
486
+ completeProfileConditions?: { [key: string]: boolean } | null;
487
+
488
+ /**
489
+ * Description of the external rule condition (only for external rules)
490
+ */
491
+ conditionDescription?: string;
492
+
329
493
  /**
330
494
  * Object containing details for the call-to-action.
331
495
  */
@@ -336,6 +500,11 @@ export namespace RuleCreateResponse {
336
500
  */
337
501
  customRewardsApiKey?: string;
338
502
 
503
+ /**
504
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
505
+ */
506
+ directRpc?: boolean;
507
+
339
508
  /**
340
509
  * Array of Discord servers, channels, and roles to join.
341
510
  */
@@ -361,11 +530,21 @@ export namespace RuleCreateResponse {
361
530
  */
362
531
  enableVerifiedMultiplier?: boolean;
363
532
 
533
+ /**
534
+ * Fill source of the order for the token sale
535
+ */
536
+ fillSource?: string;
537
+
364
538
  /**
365
539
  * Percentage reward given to a user for their first referral.
366
540
  */
367
541
  firstReferralReward?: number | null;
368
542
 
543
+ /**
544
+ * Flag indicating whether the fill source is included.
545
+ */
546
+ hasFillSource?: boolean;
547
+
369
548
  /**
370
549
  * Indicates if the item has never been sold.
371
550
  */
@@ -391,11 +570,21 @@ export namespace RuleCreateResponse {
391
570
  */
392
571
  imageUrl?: string | null;
393
572
 
573
+ /**
574
+ * If enabled, the first transaction done on the platform will complete this rule
575
+ */
576
+ isCheckInOnEveryTxn?: boolean;
577
+
394
578
  /**
395
579
  * Indicates if the multiplier has been applied to rewards.
396
580
  */
397
581
  isMultiplierApplied?: boolean;
398
582
 
583
+ /**
584
+ * Flag indicating if the rule is restricted to new users.
585
+ */
586
+ isRestrictedToNewUsers?: boolean;
587
+
399
588
  /**
400
589
  * Flag indicating if rewards are applied retroactively.
401
590
  */
@@ -411,6 +600,11 @@ export namespace RuleCreateResponse {
411
600
  */
412
601
  link?: string | null;
413
602
 
603
+ /**
604
+ * Liquidity pool details.
605
+ */
606
+ liquidity?: Metadata.Liquidity;
607
+
414
608
  /**
415
609
  * Maximum quantity constraint for token holding.
416
610
  */
@@ -441,11 +635,36 @@ export namespace RuleCreateResponse {
441
635
  */
442
636
  onlyNonListed?: boolean;
443
637
 
638
+ /**
639
+ * Indicates if only existing users are rewarded.
640
+ */
641
+ onlyRewardExistingUser?: boolean;
642
+
643
+ /**
644
+ * give points for only one token ownership per contract
645
+ */
646
+ onlyRewardSingleTokenOwnership?: boolean | null;
647
+
444
648
  /**
445
649
  * Promotional code associated with the rule.
446
650
  */
447
651
  promoCode?: string;
448
652
 
653
+ /**
654
+ * URL of the CSV file containing promo codes.
655
+ */
656
+ promoCodeCsvUrl?: string;
657
+
658
+ /**
659
+ * Numbers of the promotional code to be generated.
660
+ */
661
+ promoCodeLength?: number | null;
662
+
663
+ /**
664
+ * Type of the promotional code.
665
+ */
666
+ promoCodeType?: 'code' | 'csv' | 'generate';
667
+
449
668
  /**
450
669
  * Array defining ranges and corresponding rewards.
451
670
  */
@@ -461,11 +680,52 @@ export namespace RuleCreateResponse {
461
680
  */
462
681
  referrerReward?: number | null;
463
682
 
683
+ /**
684
+ * Loyalty currency ID of the referrer reward.
685
+ */
686
+ referrerRewardLoyaltyCurrencyId?: string | null;
687
+
688
+ /**
689
+ * Flag indicating if the post link is required.
690
+ */
691
+ requirePostLink?: boolean | null;
692
+
693
+ /**
694
+ * Flag indicating if the rule can also reward badges per range.
695
+ */
696
+ rewardBadgePerRange?: boolean;
697
+
698
+ /**
699
+ * Flag indicating if the reward is rewarded by batch.
700
+ */
701
+ rewardByBatch?: boolean | null;
702
+
703
+ /**
704
+ * Flag indicating if the reward is rewarded per action.
705
+ */
706
+ rewardPerAction?: boolean | null;
707
+
464
708
  /**
465
709
  * Flag indicating if rewards are given per impression.
466
710
  */
467
711
  rewardPerImpression?: boolean | null;
468
712
 
713
+ /**
714
+ * Flag indicating if the rule should reward based on value of traded tokens
715
+ * instead of count.
716
+ */
717
+ rewardPerValue?: boolean;
718
+
719
+ /**
720
+ * Wallet address of the user can only be used if userId is not provided
721
+ */
722
+ royaltyAddress?: string;
723
+
724
+ /**
725
+ * Royalty percentage of the item.
726
+ */
727
+ royaltyPercentage?: number;
728
+
469
729
  /**
470
730
  * Currency associated with sales.
471
731
  */
@@ -476,6 +736,11 @@ export namespace RuleCreateResponse {
476
736
  */
477
737
  secondReferralReward?: number | null;
478
738
 
739
+ /**
740
+ * Flag indicating if the multiplier is skipped.
741
+ */
742
+ skipMultiplier?: boolean | null;
743
+
479
744
  /**
480
745
  * Object containing details of the associated smart contract.
481
746
  */
@@ -490,14 +755,17 @@ export namespace RuleCreateResponse {
490
755
  * Social media platform associated with the rule.
491
756
  */
492
757
  socialPlatform?:
493
- | 'Twitch'
758
+ | 'Custom'
759
+ | 'Discord'
760
+ | 'EpicGames'
761
+ | 'Instagram'
762
+ | 'Steam'
763
+ | 'Telegram'
494
764
  | 'TikTok'
765
+ | 'Twitch'
495
766
  | 'X(Twitter)'
496
- | 'Instagram'
497
- | 'EpicGames'
498
767
  | 'YouTube'
499
- | 'Discord'
500
- | 'Custom'
768
+ | 'Google'
501
769
  | null;
502
770
 
503
771
  /**
@@ -510,11 +778,21 @@ export namespace RuleCreateResponse {
510
778
  */
511
779
  socialPlatformName?: string | null;
512
780
 
781
+ /**
782
+ * ID of the Steam app.
783
+ */
784
+ steamAppId?: string | null;
785
+
513
786
  /**
514
787
  * Array of streak milestones and corresponding rewards.
515
788
  */
516
789
  streakArray?: Array<Metadata.StreakArray> | null;
517
790
 
791
+ /**
792
+ * Metadata for swap loyalty rules
793
+ */
794
+ swap?: Metadata.Swap;
795
+
518
796
  /**
519
797
  * ID of the Telegram channel.
520
798
  */
@@ -530,6 +808,12 @@ export namespace RuleCreateResponse {
530
808
  */
531
809
  trackAllContracts?: boolean | null;
532
810
 
811
+ /**
812
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
813
+ * completed once the progress is 100%.
814
+ */
815
+ trackProgress?: boolean | null;
816
+
533
817
  /**
534
818
  * URL of the associated Twitter account.
535
819
  */
@@ -573,7 +857,17 @@ export namespace RuleCreateResponse {
573
857
  /**
574
858
  * Type of wallet associated with the rule.
575
859
  */
576
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
860
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | null;
861
+
862
+ /**
863
+ * ID of the Youtube channel.
864
+ */
865
+ youtubeChannelId?: string | null;
866
+
867
+ /**
868
+ * ID of the Youtube video.
869
+ */
870
+ youtubeVideoId?: string | null;
577
871
  }
578
872
 
579
873
  export namespace Metadata {
@@ -592,35 +886,52 @@ export namespace RuleCreateResponse {
592
886
  * Blockchain network of the collection.
593
887
  */
594
888
  network?:
595
- | 'mainnet'
596
- | 'polygon'
597
- | 'polygon_mumbai'
598
- | 'optimism'
889
+ | 'abstract'
890
+ | 'abstractTestnet'
891
+ | 'apechain'
599
892
  | 'arbitrum'
600
- | 'binance'
601
- | 'bscTestnet'
602
893
  | 'avalanche'
603
894
  | 'avalancheFuji'
604
- | 'zksync'
605
- | 'fantom'
606
- | 'fantomTestnet'
607
895
  | 'base'
608
896
  | 'baseSepolia'
609
- | 'skaleNebula'
610
- | 'xai'
897
+ | 'berachain'
611
898
  | 'berachainArtio'
612
- | 'solana'
613
- | 'apechain'
614
- | 'flowMainnet'
899
+ | 'berachainBepolia'
900
+ | 'binance'
901
+ | 'bscTestnet'
615
902
  | 'campTestnet'
903
+ | 'fantom'
904
+ | 'fantomTestnet'
905
+ | 'flowMainnet'
906
+ | 'mainnet'
907
+ | 'optimism'
908
+ | 'polygon'
909
+ | 'polygon_mumbai'
910
+ | 'skaleNebula'
911
+ | 'solana'
912
+ | 'sophon'
913
+ | 'sophonTestnet'
616
914
  | 'sui'
915
+ | 'superseed'
916
+ | 'superseedSepolia'
617
917
  | 'vanar'
918
+ | 'xai'
919
+ | 'zksync'
920
+ | 'coti'
921
+ | 'cotiTestnet'
922
+ | 'morph'
923
+ | 'morphTestnet'
924
+ | 'morphHolesky'
925
+ | 'ultra'
926
+ | 'ultraTestnet'
927
+ | 'nitrograph'
618
928
  | 'sepolia'
619
929
  | 'optimism_sepolia'
620
930
  | 'arbitrumSepolia'
621
931
  | 'goerli'
622
932
  | 'optimism_goerli'
623
- | 'arbitrumGoerli';
933
+ | 'arbitrumGoerli'
934
+ | 'basecamp';
624
935
  }
625
936
 
626
937
  /**
@@ -666,6 +977,11 @@ export namespace RuleCreateResponse {
666
977
  * Array of emojis used in the channel.
667
978
  */
668
979
  emojis?: Array<Channel.Emoji>;
980
+
981
+ /**
982
+ * Phrase of text to be present in the discord message
983
+ */
984
+ text?: string;
669
985
  }
670
986
 
671
987
  export namespace Channel {
@@ -692,6 +1008,103 @@ export namespace RuleCreateResponse {
692
1008
  id: string;
693
1009
  }
694
1010
 
1011
+ /**
1012
+ * Liquidity pool details.
1013
+ */
1014
+ export interface Liquidity {
1015
+ /**
1016
+ * Calculation type of the liquidity pool.
1017
+ */
1018
+ calculationType?: 'fixed' | 'custom';
1019
+
1020
+ /**
1021
+ * Custom function to calculate the the reward amount based on the liquidity
1022
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
1023
+ * USD.
1024
+ */
1025
+ customFunction?: string;
1026
+
1027
+ /**
1028
+ * Liquidity provided per day in USD
1029
+ */
1030
+ liquidityPerDay?: number;
1031
+
1032
+ /**
1033
+ * Blockchain network of the liquidity pool.
1034
+ */
1035
+ network?:
1036
+ | 'abstract'
1037
+ | 'abstractTestnet'
1038
+ | 'apechain'
1039
+ | 'arbitrum'
1040
+ | 'avalanche'
1041
+ | 'avalancheFuji'
1042
+ | 'base'
1043
+ | 'baseSepolia'
1044
+ | 'berachain'
1045
+ | 'berachainArtio'
1046
+ | 'berachainBepolia'
1047
+ | 'binance'
1048
+ | 'bscTestnet'
1049
+ | 'campTestnet'
1050
+ | 'fantom'
1051
+ | 'fantomTestnet'
1052
+ | 'flowMainnet'
1053
+ | 'mainnet'
1054
+ | 'optimism'
1055
+ | 'polygon'
1056
+ | 'polygon_mumbai'
1057
+ | 'skaleNebula'
1058
+ | 'solana'
1059
+ | 'sophon'
1060
+ | 'sophonTestnet'
1061
+ | 'sui'
1062
+ | 'superseed'
1063
+ | 'superseedSepolia'
1064
+ | 'vanar'
1065
+ | 'xai'
1066
+ | 'zksync'
1067
+ | 'coti'
1068
+ | 'cotiTestnet'
1069
+ | 'morph'
1070
+ | 'morphTestnet'
1071
+ | 'morphHolesky'
1072
+ | 'ultra'
1073
+ | 'ultraTestnet'
1074
+ | 'nitrograph'
1075
+ | 'sepolia'
1076
+ | 'optimism_sepolia'
1077
+ | 'arbitrumSepolia'
1078
+ | 'goerli'
1079
+ | 'optimism_goerli'
1080
+ | 'arbitrumGoerli'
1081
+ | 'basecamp';
1082
+
1083
+ /**
1084
+ * Indicates if only in-range liquidity is rewarded.
1085
+ */
1086
+ onlyRewardInRangeLiquidity?: boolean;
1087
+
1088
+ /**
1089
+ * Array of liquidity pools associated with the rule.
1090
+ */
1091
+ pools?: Array<Liquidity.Pool>;
1092
+
1093
+ /**
1094
+ * Protocol of the liquidity pool.
1095
+ */
1096
+ protocol?: string;
1097
+ }
1098
+
1099
+ export namespace Liquidity {
1100
+ export interface Pool {
1101
+ /**
1102
+ * Unique identifier of the liquidity pool.
1103
+ */
1104
+ id: string;
1105
+ }
1106
+ }
1107
+
695
1108
  export interface Range {
696
1109
  /**
697
1110
  * Reward amount for this range.
@@ -707,6 +1120,16 @@ export namespace RuleCreateResponse {
707
1120
  * Start value of the range.
708
1121
  */
709
1122
  startRange: number;
1123
+
1124
+ /**
1125
+ * ID of the loyalty badge for this range.
1126
+ */
1127
+ loyaltyBadgeId?: string;
1128
+
1129
+ /**
1130
+ * Amount of the loyalty multiplier for this range.
1131
+ */
1132
+ loyaltyMultiplierAmount?: number;
710
1133
  }
711
1134
 
712
1135
  /**
@@ -759,20 +1182,15 @@ export namespace RuleCreateResponse {
759
1182
  * Object containing details of the associated smart contract.
760
1183
  */
761
1184
  export interface SmartContract {
762
- /**
763
- * ABI of the smart contract.
764
- */
765
- abi?: string | null;
766
-
767
1185
  /**
768
1186
  * Mapping of addresses for the smart contract.
769
1187
  */
770
1188
  addressMapping?: string | null;
771
1189
 
772
1190
  /**
773
- * Array of bonus details applied to the rule.
1191
+ * Object containing details of the amount multiplier from the event.
774
1192
  */
775
- bonus?: Array<SmartContract.Bonus> | null;
1193
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
776
1194
 
777
1195
  /**
778
1196
  * ID of the smart contract.
@@ -784,68 +1202,31 @@ export namespace RuleCreateResponse {
784
1202
  */
785
1203
  criteria?: 'everyEvent' | 'byParameter' | null;
786
1204
 
787
- /**
788
- * Time range applied to the rule.
789
- */
790
- customRange?: SmartContract.CustomRange | null;
791
-
792
1205
  /**
793
1206
  * Event emitted by the smart contract.
794
1207
  */
795
1208
  event?: string | null;
796
1209
 
797
1210
  /**
798
- * Maximum value allowed for the parameter.
799
- */
800
- max?: number | null;
801
-
802
- /**
803
- * Array of parameters for the smart contract.
1211
+ * Array of parameters for the smart contract.
804
1212
  */
805
1213
  params?: Array<SmartContract.Param> | null;
806
1214
 
807
1215
  /**
808
- * Flag indicating if a bonus is applied.
809
- */
810
- withBonus?: boolean | null;
811
-
812
- /**
813
- * Flag indicating if a custom range is applied.
814
- */
815
- withCustomRange?: boolean | null;
816
-
817
- /**
818
- * Flag indicating if a maximum limit is applied.
1216
+ * Type of the smart contract interaction.
819
1217
  */
820
- withMax?: boolean | null;
1218
+ type?: 'function' | 'event' | null;
821
1219
  }
822
1220
 
823
1221
  export namespace SmartContract {
824
- export interface Bonus {
825
- /**
826
- * Amount of the bonus.
827
- */
828
- amount?: number | null;
829
-
830
- /**
831
- * Number of times the bonus is applied.
832
- */
833
- count?: number | null;
834
- }
835
-
836
1222
  /**
837
- * Time range applied to the rule.
1223
+ * Object containing details of the amount multiplier from the event.
838
1224
  */
839
- export interface CustomRange {
840
- /**
841
- * End time of the custom range.
842
- */
843
- endsAt?: string | null;
844
-
1225
+ export interface AmountMultiplier {
845
1226
  /**
846
- * Start time of the custom range.
1227
+ * Mapping of the value for the smart contract.
847
1228
  */
848
- startsAt?: string | null;
1229
+ valueMapping?: string | null;
849
1230
  }
850
1231
 
851
1232
  export interface Param {
@@ -889,6 +1270,33 @@ export namespace RuleCreateResponse {
889
1270
  */
890
1271
  streakMilestone: number;
891
1272
  }
1273
+
1274
+ /**
1275
+ * Metadata for swap loyalty rules
1276
+ */
1277
+ export interface Swap {
1278
+ provider?: 'any' | 'relay' | 'lifi';
1279
+
1280
+ relayReferrerId?: string;
1281
+
1282
+ requireCrossChainSwap?: boolean;
1283
+
1284
+ swappedToChain?: 'any' | number | string;
1285
+
1286
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1287
+
1288
+ tokenMode?: 'any' | 'specific';
1289
+
1290
+ trackTokenAmount?: boolean;
1291
+ }
1292
+
1293
+ export namespace Swap {
1294
+ export interface SwappedToToken {
1295
+ address: string;
1296
+
1297
+ chainId: string;
1298
+ }
1299
+ }
892
1300
  }
893
1301
 
894
1302
  export interface Collection {
@@ -901,35 +1309,57 @@ export namespace RuleCreateResponse {
901
1309
  * Blockchain network for the collection
902
1310
  */
903
1311
  network:
904
- | 'mainnet'
905
- | 'polygon'
906
- | 'polygon_mumbai'
907
- | 'optimism'
1312
+ | 'abstract'
1313
+ | 'abstractTestnet'
1314
+ | 'apechain'
908
1315
  | 'arbitrum'
909
- | 'binance'
910
- | 'bscTestnet'
911
1316
  | 'avalanche'
912
1317
  | 'avalancheFuji'
913
- | 'zksync'
914
- | 'fantom'
915
- | 'fantomTestnet'
916
1318
  | 'base'
917
1319
  | 'baseSepolia'
918
- | 'skaleNebula'
919
- | 'xai'
1320
+ | 'berachain'
920
1321
  | 'berachainArtio'
921
- | 'solana'
922
- | 'apechain'
923
- | 'flowMainnet'
1322
+ | 'berachainBepolia'
1323
+ | 'binance'
1324
+ | 'bscTestnet'
924
1325
  | 'campTestnet'
1326
+ | 'fantom'
1327
+ | 'fantomTestnet'
1328
+ | 'flowMainnet'
1329
+ | 'mainnet'
1330
+ | 'optimism'
1331
+ | 'polygon'
1332
+ | 'polygon_mumbai'
1333
+ | 'skaleNebula'
1334
+ | 'solana'
1335
+ | 'sophon'
1336
+ | 'sophonTestnet'
925
1337
  | 'sui'
1338
+ | 'superseed'
1339
+ | 'superseedSepolia'
926
1340
  | 'vanar'
1341
+ | 'xai'
1342
+ | 'zksync'
1343
+ | 'coti'
1344
+ | 'cotiTestnet'
1345
+ | 'morph'
1346
+ | 'morphTestnet'
1347
+ | 'morphHolesky'
1348
+ | 'ultra'
1349
+ | 'ultraTestnet'
1350
+ | 'nitrograph'
927
1351
  | 'sepolia'
928
1352
  | 'optimism_sepolia'
929
1353
  | 'arbitrumSepolia'
930
1354
  | 'goerli'
931
1355
  | 'optimism_goerli'
932
- | 'arbitrumGoerli';
1356
+ | 'arbitrumGoerli'
1357
+ | 'basecamp';
1358
+
1359
+ /**
1360
+ * Symbol of the collection.
1361
+ */
1362
+ symbol?: string;
933
1363
  }
934
1364
  }
935
1365
 
@@ -941,41 +1371,16 @@ export interface RuleUpdateResponse {
941
1371
  */
942
1372
  amount: unknown;
943
1373
 
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
1374
  /**
955
1375
  * End time for the loyalty rule
956
1376
  */
957
1377
  endTime: string | null;
958
1378
 
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
1379
  /**
970
1380
  * Name of the loyalty rule
971
1381
  */
972
1382
  name: string;
973
1383
 
974
- /**
975
- * Start time for the loyalty rule
976
- */
977
- startTime: string | null;
978
-
979
1384
  /**
980
1385
  * Blockchain address of the associated collection
981
1386
  */
@@ -1001,6 +1406,26 @@ export interface RuleUpdateResponse {
1001
1406
  */
1002
1407
  description?: string;
1003
1408
 
1409
+ /**
1410
+ * Effective end time of the rule
1411
+ */
1412
+ effectiveEndTime?: string | null;
1413
+
1414
+ /**
1415
+ * Effective start time of the rule
1416
+ */
1417
+ effectiveStartTime?: string | null;
1418
+
1419
+ /**
1420
+ * ID of the external integration
1421
+ */
1422
+ externalIntegrationId?: string | null;
1423
+
1424
+ /**
1425
+ * Frequency of the rule execution
1426
+ */
1427
+ frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
1428
+
1004
1429
  /**
1005
1430
  * Whether to hide this rule in the user interface
1006
1431
  */
@@ -1009,7 +1434,7 @@ export interface RuleUpdateResponse {
1009
1434
  /**
1010
1435
  * Time interval for recurring rule execution
1011
1436
  */
1012
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
1437
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1013
1438
 
1014
1439
  /**
1015
1440
  * Whether this rule is required for participation
@@ -1021,39 +1446,78 @@ export interface RuleUpdateResponse {
1021
1446
  */
1022
1447
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
1023
1448
 
1449
+ /**
1450
+ * The interval for the max amount. Available for the smart contract and external
1451
+ * rules.
1452
+ */
1453
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
1454
+
1455
+ /**
1456
+ * The maximum amount of points a user can earn per interval. Available for the
1457
+ * smart contract and external rules.
1458
+ */
1459
+ maxAmountPerInterval?: number | null;
1460
+
1461
+ /**
1462
+ * URL of the media to be displayed
1463
+ */
1464
+ mediaUrl?: string | null;
1465
+
1466
+ /**
1467
+ * Additional metadata for the loyalty rule
1468
+ */
1469
+ metadata?: RuleUpdateResponse.Metadata;
1470
+
1024
1471
  /**
1025
1472
  * Blockchain network where the rule will apply
1026
1473
  */
1027
1474
  network?:
1028
- | 'mainnet'
1029
- | 'polygon'
1030
- | 'polygon_mumbai'
1031
- | 'optimism'
1475
+ | 'abstract'
1476
+ | 'abstractTestnet'
1477
+ | 'apechain'
1032
1478
  | 'arbitrum'
1033
- | 'binance'
1034
- | 'bscTestnet'
1035
1479
  | 'avalanche'
1036
1480
  | 'avalancheFuji'
1037
- | 'zksync'
1038
- | 'fantom'
1039
- | 'fantomTestnet'
1040
1481
  | 'base'
1041
1482
  | 'baseSepolia'
1042
- | 'skaleNebula'
1043
- | 'xai'
1483
+ | 'berachain'
1044
1484
  | 'berachainArtio'
1045
- | 'solana'
1046
- | 'apechain'
1047
- | 'flowMainnet'
1485
+ | 'berachainBepolia'
1486
+ | 'binance'
1487
+ | 'bscTestnet'
1048
1488
  | 'campTestnet'
1489
+ | 'fantom'
1490
+ | 'fantomTestnet'
1491
+ | 'flowMainnet'
1492
+ | 'mainnet'
1493
+ | 'optimism'
1494
+ | 'polygon'
1495
+ | 'polygon_mumbai'
1496
+ | 'skaleNebula'
1497
+ | 'solana'
1498
+ | 'sophon'
1499
+ | 'sophonTestnet'
1049
1500
  | 'sui'
1501
+ | 'superseed'
1502
+ | 'superseedSepolia'
1050
1503
  | 'vanar'
1504
+ | 'xai'
1505
+ | 'zksync'
1506
+ | 'coti'
1507
+ | 'cotiTestnet'
1508
+ | 'morph'
1509
+ | 'morphTestnet'
1510
+ | 'morphHolesky'
1511
+ | 'ultra'
1512
+ | 'ultraTestnet'
1513
+ | 'nitrograph'
1051
1514
  | 'sepolia'
1052
1515
  | 'optimism_sepolia'
1053
1516
  | 'arbitrumSepolia'
1054
1517
  | 'goerli'
1055
1518
  | 'optimism_goerli'
1056
- | 'arbitrumGoerli';
1519
+ | 'arbitrumGoerli'
1520
+ | 'basecamp';
1057
1521
 
1058
1522
  /**
1059
1523
  * ID for associated OAuth credentials
@@ -1063,19 +1527,97 @@ export interface RuleUpdateResponse {
1063
1527
  /**
1064
1528
  * Type of reward issued by this rule
1065
1529
  */
1066
- rewardType?: 'points' | 'multiplier';
1530
+ rewardType?: 'points' | 'multiplier' | 'badge';
1531
+
1532
+ /**
1533
+ * URL of the Shopify store
1534
+ */
1535
+ shopifyStoreUrl?: string | null;
1536
+
1537
+ /**
1538
+ * Start time for the loyalty rule
1539
+ */
1540
+ startTime?: string | null;
1067
1541
 
1068
1542
  /**
1069
- * Optional subscription identifier for the rule
1543
+ * Optional subscription id for the rule
1070
1544
  */
1071
- subscriptionIdentifier?: string | null;
1545
+ subscriptionId?: string | null;
1072
1546
  }
1073
1547
 
1074
1548
  export namespace RuleUpdateResponse {
1549
+ export interface Collection {
1550
+ /**
1551
+ * Blockchain address of the collection
1552
+ */
1553
+ address: string;
1554
+
1555
+ /**
1556
+ * Blockchain network for the collection
1557
+ */
1558
+ network:
1559
+ | 'abstract'
1560
+ | 'abstractTestnet'
1561
+ | 'apechain'
1562
+ | 'arbitrum'
1563
+ | 'avalanche'
1564
+ | 'avalancheFuji'
1565
+ | 'base'
1566
+ | 'baseSepolia'
1567
+ | 'berachain'
1568
+ | 'berachainArtio'
1569
+ | 'berachainBepolia'
1570
+ | 'binance'
1571
+ | 'bscTestnet'
1572
+ | 'campTestnet'
1573
+ | 'fantom'
1574
+ | 'fantomTestnet'
1575
+ | 'flowMainnet'
1576
+ | 'mainnet'
1577
+ | 'optimism'
1578
+ | 'polygon'
1579
+ | 'polygon_mumbai'
1580
+ | 'skaleNebula'
1581
+ | 'solana'
1582
+ | 'sophon'
1583
+ | 'sophonTestnet'
1584
+ | 'sui'
1585
+ | 'superseed'
1586
+ | 'superseedSepolia'
1587
+ | 'vanar'
1588
+ | 'xai'
1589
+ | 'zksync'
1590
+ | 'coti'
1591
+ | 'cotiTestnet'
1592
+ | 'morph'
1593
+ | 'morphTestnet'
1594
+ | 'morphHolesky'
1595
+ | 'ultra'
1596
+ | 'ultraTestnet'
1597
+ | 'nitrograph'
1598
+ | 'sepolia'
1599
+ | 'optimism_sepolia'
1600
+ | 'arbitrumSepolia'
1601
+ | 'goerli'
1602
+ | 'optimism_goerli'
1603
+ | 'arbitrumGoerli'
1604
+ | 'basecamp';
1605
+
1606
+ /**
1607
+ * Symbol of the collection.
1608
+ */
1609
+ symbol?: string;
1610
+ }
1611
+
1075
1612
  /**
1076
1613
  * Additional metadata for the loyalty rule
1077
1614
  */
1078
1615
  export interface Metadata {
1616
+ /**
1617
+ * Number of tokens per batch.
1618
+ */
1619
+ batchSize?: number | null;
1620
+
1079
1621
  /**
1080
1622
  * Text displayed on the action button.
1081
1623
  */
@@ -1106,6 +1648,16 @@ export namespace RuleUpdateResponse {
1106
1648
  */
1107
1649
  collection?: Array<Metadata.Collection>;
1108
1650
 
1651
+ /**
1652
+ * Conditions for completing the profile.
1653
+ */
1654
+ completeProfileConditions?: { [key: string]: boolean } | null;
1655
+
1656
+ /**
1657
+ * Description of the external rule condition (only for external rules)
1658
+ */
1659
+ conditionDescription?: string;
1660
+
1109
1661
  /**
1110
1662
  * Object containing details for the call-to-action.
1111
1663
  */
@@ -1116,6 +1668,11 @@ export namespace RuleUpdateResponse {
1116
1668
  */
1117
1669
  customRewardsApiKey?: string;
1118
1670
 
1671
+ /**
1672
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
1673
+ */
1674
+ directRpc?: boolean;
1675
+
1119
1676
  /**
1120
1677
  * Array of Discord servers, channels, and roles to join.
1121
1678
  */
@@ -1141,11 +1698,21 @@ export namespace RuleUpdateResponse {
1141
1698
  */
1142
1699
  enableVerifiedMultiplier?: boolean;
1143
1700
 
1701
+ /**
1702
+ * Fill source of the order for the token sale
1703
+ */
1704
+ fillSource?: string;
1705
+
1144
1706
  /**
1145
1707
  * Percentage reward given to a user for their first referral.
1146
1708
  */
1147
1709
  firstReferralReward?: number | null;
1148
1710
 
1711
+ /**
1712
+ * Flag indicating whether the fill source is included.
1713
+ */
1714
+ hasFillSource?: boolean;
1715
+
1149
1716
  /**
1150
1717
  * Indicates if the item has never been sold.
1151
1718
  */
@@ -1171,11 +1738,21 @@ export namespace RuleUpdateResponse {
1171
1738
  */
1172
1739
  imageUrl?: string | null;
1173
1740
 
1741
+ /**
1742
+ * If enabled, the first transaction done on the platform will complete this rule
1743
+ */
1744
+ isCheckInOnEveryTxn?: boolean;
1745
+
1174
1746
  /**
1175
1747
  * Indicates if the multiplier has been applied to rewards.
1176
1748
  */
1177
1749
  isMultiplierApplied?: boolean;
1178
1750
 
1751
+ /**
1752
+ * Flag indicating if the rule is restricted to new users.
1753
+ */
1754
+ isRestrictedToNewUsers?: boolean;
1755
+
1179
1756
  /**
1180
1757
  * Flag indicating if rewards are applied retroactively.
1181
1758
  */
@@ -1191,6 +1768,11 @@ export namespace RuleUpdateResponse {
1191
1768
  */
1192
1769
  link?: string | null;
1193
1770
 
1771
+ /**
1772
+ * Liquidity pool details.
1773
+ */
1774
+ liquidity?: Metadata.Liquidity;
1775
+
1194
1776
  /**
1195
1777
  * Maximum quantity constraint for token holding.
1196
1778
  */
@@ -1221,11 +1803,36 @@ export namespace RuleUpdateResponse {
1221
1803
  */
1222
1804
  onlyNonListed?: boolean;
1223
1805
 
1806
+ /**
1807
+ * Indicates if only existing users are rewarded.
1808
+ */
1809
+ onlyRewardExistingUser?: boolean;
1810
+
1811
+ /**
1812
+ * give points for only one token ownership per contract
1813
+ */
1814
+ onlyRewardSingleTokenOwnership?: boolean | null;
1815
+
1224
1816
  /**
1225
1817
  * Promotional code associated with the rule.
1226
1818
  */
1227
1819
  promoCode?: string;
1228
1820
 
1821
+ /**
1822
+ * URL of the CSV file containing promo codes.
1823
+ */
1824
+ promoCodeCsvUrl?: string;
1825
+
1826
+ /**
1827
+ * Numbers of the promotional code to be generated.
1828
+ */
1829
+ promoCodeLength?: number | null;
1830
+
1831
+ /**
1832
+ * Type of the promotional code.
1833
+ */
1834
+ promoCodeType?: 'code' | 'csv' | 'generate';
1835
+
1229
1836
  /**
1230
1837
  * Array defining ranges and corresponding rewards.
1231
1838
  */
@@ -1242,42 +1849,91 @@ export namespace RuleUpdateResponse {
1242
1849
  referrerReward?: number | null;
1243
1850
 
1244
1851
  /**
1245
- * Flag indicating if rewards are given per impression.
1852
+ * Loyalty currency ID of the referrer reward.
1246
1853
  */
1247
- rewardPerImpression?: boolean | null;
1854
+ referrerRewardLoyaltyCurrencyId?: string | null;
1248
1855
 
1249
1856
  /**
1250
- * Currency associated with sales.
1857
+ * Flag indicating if the post link is required.
1251
1858
  */
1252
- saleCurrency?: string;
1859
+ requirePostLink?: boolean | null;
1253
1860
 
1254
1861
  /**
1255
- * Percentage reward given for a second-level referral.
1862
+ * Flag indicating if the rule can also reward badges per range.
1256
1863
  */
1257
- secondReferralReward?: number | null;
1864
+ rewardBadgePerRange?: boolean;
1258
1865
 
1259
1866
  /**
1260
- * Object containing details of the associated smart contract.
1867
+ * Flag indicating if the reward is rewarded by batch.
1261
1868
  */
1262
- smartContract?: Metadata.SmartContract;
1869
+ rewardByBatch?: boolean | null;
1263
1870
 
1264
1871
  /**
1265
- * Array of snapshot proposals for the rule.
1872
+ * Flag indicating if the reward is rewarded per action.
1266
1873
  */
1267
- snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
1874
+ rewardPerAction?: boolean | null;
1268
1875
 
1269
1876
  /**
1270
- * Social media platform associated with the rule.
1877
+ * Flag indicating if rewards are given per impression.
1271
1878
  */
1272
- socialPlatform?:
1273
- | 'Twitch'
1274
- | 'TikTok'
1275
- | 'X(Twitter)'
1276
- | 'Instagram'
1277
- | 'EpicGames'
1278
- | 'YouTube'
1279
- | 'Discord'
1879
+ rewardPerImpression?: boolean | null;
1880
+
1881
+ /**
1882
+ * Flag indicating if the rule should reward based on value of traded tokens
1883
+ * instead of count.
1884
+ */
1885
+ rewardPerValue?: boolean;
1886
+
1887
+ /**
1888
+ * Wallet address of the user can only be used if userId is not provided
1889
+ */
1890
+ royaltyAddress?: string;
1891
+
1892
+ /**
1893
+ * Royalty percentage of the item.
1894
+ */
1895
+ royaltyPercentage?: number;
1896
+
1897
+ /**
1898
+ * Currency associated with sales.
1899
+ */
1900
+ saleCurrency?: string;
1901
+
1902
+ /**
1903
+ * Percentage reward given for a second-level referral.
1904
+ */
1905
+ secondReferralReward?: number | null;
1906
+
1907
+ /**
1908
+ * Flag indicating if the multiplier is skipped.
1909
+ */
1910
+ skipMultiplier?: boolean | null;
1911
+
1912
+ /**
1913
+ * Object containing details of the associated smart contract.
1914
+ */
1915
+ smartContract?: Metadata.SmartContract;
1916
+
1917
+ /**
1918
+ * Array of snapshot proposals for the rule.
1919
+ */
1920
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
1921
+
1922
+ /**
1923
+ * Social media platform associated with the rule.
1924
+ */
1925
+ socialPlatform?:
1280
1926
  | 'Custom'
1927
+ | 'Discord'
1928
+ | 'EpicGames'
1929
+ | 'Instagram'
1930
+ | 'Steam'
1931
+ | 'Telegram'
1932
+ | 'TikTok'
1933
+ | 'Twitch'
1934
+ | 'X(Twitter)'
1935
+ | 'YouTube'
1936
+ | 'Google'
1281
1937
  | null;
1282
1938
 
1283
1939
  /**
@@ -1290,11 +1946,21 @@ export namespace RuleUpdateResponse {
1290
1946
  */
1291
1947
  socialPlatformName?: string | null;
1292
1948
 
1949
+ /**
1950
+ * ID of the Steam app.
1951
+ */
1952
+ steamAppId?: string | null;
1953
+
1293
1954
  /**
1294
1955
  * Array of streak milestones and corresponding rewards.
1295
1956
  */
1296
1957
  streakArray?: Array<Metadata.StreakArray> | null;
1297
1958
 
1959
+ /**
1960
+ * Metadata for swap loyalty rules
1961
+ */
1962
+ swap?: Metadata.Swap;
1963
+
1298
1964
  /**
1299
1965
  * ID of the Telegram channel.
1300
1966
  */
@@ -1310,6 +1976,12 @@ export namespace RuleUpdateResponse {
1310
1976
  */
1311
1977
  trackAllContracts?: boolean | null;
1312
1978
 
1979
+ /**
1980
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
1981
+ * completed once the progress is 100%.
1982
+ */
1983
+ trackProgress?: boolean | null;
1984
+
1313
1985
  /**
1314
1986
  * URL of the associated Twitter account.
1315
1987
  */
@@ -1353,7 +2025,17 @@ export namespace RuleUpdateResponse {
1353
2025
  /**
1354
2026
  * Type of wallet associated with the rule.
1355
2027
  */
1356
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
2028
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | null;
2029
+
2030
+ /**
2031
+ * ID of the Youtube channel.
2032
+ */
2033
+ youtubeChannelId?: string | null;
2034
+
2035
+ /**
2036
+ * ID of the Youtube video.
2037
+ */
2038
+ youtubeVideoId?: string | null;
1357
2039
  }
1358
2040
 
1359
2041
  export namespace Metadata {
@@ -1372,35 +2054,52 @@ export namespace RuleUpdateResponse {
1372
2054
  * Blockchain network of the collection.
1373
2055
  */
1374
2056
  network?:
1375
- | 'mainnet'
1376
- | 'polygon'
1377
- | 'polygon_mumbai'
1378
- | 'optimism'
2057
+ | 'abstract'
2058
+ | 'abstractTestnet'
2059
+ | 'apechain'
1379
2060
  | 'arbitrum'
1380
- | 'binance'
1381
- | 'bscTestnet'
1382
2061
  | 'avalanche'
1383
2062
  | 'avalancheFuji'
1384
- | 'zksync'
1385
- | 'fantom'
1386
- | 'fantomTestnet'
1387
2063
  | 'base'
1388
2064
  | 'baseSepolia'
1389
- | 'skaleNebula'
1390
- | 'xai'
2065
+ | 'berachain'
1391
2066
  | 'berachainArtio'
1392
- | 'solana'
1393
- | 'apechain'
1394
- | 'flowMainnet'
2067
+ | 'berachainBepolia'
2068
+ | 'binance'
2069
+ | 'bscTestnet'
1395
2070
  | 'campTestnet'
2071
+ | 'fantom'
2072
+ | 'fantomTestnet'
2073
+ | 'flowMainnet'
2074
+ | 'mainnet'
2075
+ | 'optimism'
2076
+ | 'polygon'
2077
+ | 'polygon_mumbai'
2078
+ | 'skaleNebula'
2079
+ | 'solana'
2080
+ | 'sophon'
2081
+ | 'sophonTestnet'
1396
2082
  | 'sui'
2083
+ | 'superseed'
2084
+ | 'superseedSepolia'
1397
2085
  | 'vanar'
2086
+ | 'xai'
2087
+ | 'zksync'
2088
+ | 'coti'
2089
+ | 'cotiTestnet'
2090
+ | 'morph'
2091
+ | 'morphTestnet'
2092
+ | 'morphHolesky'
2093
+ | 'ultra'
2094
+ | 'ultraTestnet'
2095
+ | 'nitrograph'
1398
2096
  | 'sepolia'
1399
2097
  | 'optimism_sepolia'
1400
2098
  | 'arbitrumSepolia'
1401
2099
  | 'goerli'
1402
2100
  | 'optimism_goerli'
1403
- | 'arbitrumGoerli';
2101
+ | 'arbitrumGoerli'
2102
+ | 'basecamp';
1404
2103
  }
1405
2104
 
1406
2105
  /**
@@ -1446,6 +2145,11 @@ export namespace RuleUpdateResponse {
1446
2145
  * Array of emojis used in the channel.
1447
2146
  */
1448
2147
  emojis?: Array<Channel.Emoji>;
2148
+
2149
+ /**
2150
+ * Phrase of text to be present in the discord message
2151
+ */
2152
+ text?: string;
1449
2153
  }
1450
2154
 
1451
2155
  export namespace Channel {
@@ -1472,6 +2176,103 @@ export namespace RuleUpdateResponse {
1472
2176
  id: string;
1473
2177
  }
1474
2178
 
2179
+ /**
2180
+ * Liquidity pool details.
2181
+ */
2182
+ export interface Liquidity {
2183
+ /**
2184
+ * Calculation type of the liquidity pool.
2185
+ */
2186
+ calculationType?: 'fixed' | 'custom';
2187
+
2188
+ /**
2189
+ * Custom function to calculate the the reward amount based on the liquidity
2190
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2191
+ * USD.
2192
+ */
2193
+ customFunction?: string;
2194
+
2195
+ /**
2196
+ * Liquidity provided per day in USD
2197
+ */
2198
+ liquidityPerDay?: number;
2199
+
2200
+ /**
2201
+ * Blockchain network of the liquidity pool.
2202
+ */
2203
+ network?:
2204
+ | 'abstract'
2205
+ | 'abstractTestnet'
2206
+ | 'apechain'
2207
+ | 'arbitrum'
2208
+ | 'avalanche'
2209
+ | 'avalancheFuji'
2210
+ | 'base'
2211
+ | 'baseSepolia'
2212
+ | 'berachain'
2213
+ | 'berachainArtio'
2214
+ | 'berachainBepolia'
2215
+ | 'binance'
2216
+ | 'bscTestnet'
2217
+ | 'campTestnet'
2218
+ | 'fantom'
2219
+ | 'fantomTestnet'
2220
+ | 'flowMainnet'
2221
+ | 'mainnet'
2222
+ | 'optimism'
2223
+ | 'polygon'
2224
+ | 'polygon_mumbai'
2225
+ | 'skaleNebula'
2226
+ | 'solana'
2227
+ | 'sophon'
2228
+ | 'sophonTestnet'
2229
+ | 'sui'
2230
+ | 'superseed'
2231
+ | 'superseedSepolia'
2232
+ | 'vanar'
2233
+ | 'xai'
2234
+ | 'zksync'
2235
+ | 'coti'
2236
+ | 'cotiTestnet'
2237
+ | 'morph'
2238
+ | 'morphTestnet'
2239
+ | 'morphHolesky'
2240
+ | 'ultra'
2241
+ | 'ultraTestnet'
2242
+ | 'nitrograph'
2243
+ | 'sepolia'
2244
+ | 'optimism_sepolia'
2245
+ | 'arbitrumSepolia'
2246
+ | 'goerli'
2247
+ | 'optimism_goerli'
2248
+ | 'arbitrumGoerli'
2249
+ | 'basecamp';
2250
+
2251
+ /**
2252
+ * Indicates if only in-range liquidity is rewarded.
2253
+ */
2254
+ onlyRewardInRangeLiquidity?: boolean;
2255
+
2256
+ /**
2257
+ * Array of liquidity pools associated with the rule.
2258
+ */
2259
+ pools?: Array<Liquidity.Pool>;
2260
+
2261
+ /**
2262
+ * Protocol of the liquidity pool.
2263
+ */
2264
+ protocol?: string;
2265
+ }
2266
+
2267
+ export namespace Liquidity {
2268
+ export interface Pool {
2269
+ /**
2270
+ * Unique identifier of the liquidity pool.
2271
+ */
2272
+ id: string;
2273
+ }
2274
+ }
2275
+
1475
2276
  export interface Range {
1476
2277
  /**
1477
2278
  * Reward amount for this range.
@@ -1487,6 +2288,16 @@ export namespace RuleUpdateResponse {
1487
2288
  * Start value of the range.
1488
2289
  */
1489
2290
  startRange: number;
2291
+
2292
+ /**
2293
+ * ID of the loyalty badge for this range.
2294
+ */
2295
+ loyaltyBadgeId?: string;
2296
+
2297
+ /**
2298
+ * Amount of the loyalty multiplier for this range.
2299
+ */
2300
+ loyaltyMultiplierAmount?: number;
1490
2301
  }
1491
2302
 
1492
2303
  /**
@@ -1539,20 +2350,15 @@ export namespace RuleUpdateResponse {
1539
2350
  * Object containing details of the associated smart contract.
1540
2351
  */
1541
2352
  export interface SmartContract {
1542
- /**
1543
- * ABI of the smart contract.
1544
- */
1545
- abi?: string | null;
1546
-
1547
2353
  /**
1548
2354
  * Mapping of addresses for the smart contract.
1549
2355
  */
1550
2356
  addressMapping?: string | null;
1551
2357
 
1552
2358
  /**
1553
- * Array of bonus details applied to the rule.
2359
+ * Object containing details of the amount multiplier from the event.
1554
2360
  */
1555
- bonus?: Array<SmartContract.Bonus> | null;
2361
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1556
2362
 
1557
2363
  /**
1558
2364
  * ID of the smart contract.
@@ -1564,68 +2370,31 @@ export namespace RuleUpdateResponse {
1564
2370
  */
1565
2371
  criteria?: 'everyEvent' | 'byParameter' | null;
1566
2372
 
1567
- /**
1568
- * Time range applied to the rule.
1569
- */
1570
- customRange?: SmartContract.CustomRange | null;
1571
-
1572
2373
  /**
1573
2374
  * Event emitted by the smart contract.
1574
2375
  */
1575
2376
  event?: string | null;
1576
2377
 
1577
- /**
1578
- * Maximum value allowed for the parameter.
1579
- */
1580
- max?: number | null;
1581
-
1582
2378
  /**
1583
2379
  * Array of parameters for the smart contract.
1584
2380
  */
1585
2381
  params?: Array<SmartContract.Param> | null;
1586
2382
 
1587
2383
  /**
1588
- * Flag indicating if a bonus is applied.
1589
- */
1590
- withBonus?: boolean | null;
1591
-
1592
- /**
1593
- * Flag indicating if a custom range is applied.
1594
- */
1595
- withCustomRange?: boolean | null;
1596
-
1597
- /**
1598
- * Flag indicating if a maximum limit is applied.
2384
+ * Type of the smart contract interaction.
1599
2385
  */
1600
- withMax?: boolean | null;
2386
+ type?: 'function' | 'event' | null;
1601
2387
  }
1602
2388
 
1603
2389
  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
2390
  /**
1617
- * Time range applied to the rule.
2391
+ * Object containing details of the amount multiplier from the event.
1618
2392
  */
1619
- export interface CustomRange {
1620
- /**
1621
- * End time of the custom range.
1622
- */
1623
- endsAt?: string | null;
1624
-
2393
+ export interface AmountMultiplier {
1625
2394
  /**
1626
- * Start time of the custom range.
2395
+ * Mapping of the value for the smart contract.
1627
2396
  */
1628
- startsAt?: string | null;
2397
+ valueMapping?: string | null;
1629
2398
  }
1630
2399
 
1631
2400
  export interface Param {
@@ -1669,47 +2438,33 @@ export namespace RuleUpdateResponse {
1669
2438
  */
1670
2439
  streakMilestone: number;
1671
2440
  }
1672
- }
1673
2441
 
1674
- export interface Collection {
1675
2442
  /**
1676
- * Blockchain address of the collection
2443
+ * Metadata for swap loyalty rules
1677
2444
  */
1678
- address: string;
2445
+ export interface Swap {
2446
+ provider?: 'any' | 'relay' | 'lifi';
1679
2447
 
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';
2448
+ relayReferrerId?: string;
2449
+
2450
+ requireCrossChainSwap?: boolean;
2451
+
2452
+ swappedToChain?: 'any' | number | string;
2453
+
2454
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2455
+
2456
+ tokenMode?: 'any' | 'specific';
2457
+
2458
+ trackTokenAmount?: boolean;
2459
+ }
2460
+
2461
+ export namespace Swap {
2462
+ export interface SwappedToToken {
2463
+ address: string;
2464
+
2465
+ chainId: string;
2466
+ }
2467
+ }
1713
2468
  }
1714
2469
  }
1715
2470
 
@@ -1720,9 +2475,6 @@ export interface RuleListResponse {
1720
2475
  }
1721
2476
 
1722
2477
  export namespace RuleListResponse {
1723
- /**
1724
- * Schema for a loyalty rule
1725
- */
1726
2478
  export interface Data {
1727
2479
  /**
1728
2480
  * Unique identifier for the loyalty rule
@@ -1744,16 +2496,46 @@ export namespace RuleListResponse {
1744
2496
  */
1745
2497
  deletedAt: string | null;
1746
2498
 
2499
+ /**
2500
+ * Description of the loyalty rule
2501
+ */
2502
+ description: string;
2503
+
2504
+ /**
2505
+ * End time of the loyalty rule
2506
+ */
2507
+ endTime: string;
2508
+
1747
2509
  /**
1748
2510
  * Frequency of the loyalty rule
1749
2511
  */
1750
2512
  frequency: string;
1751
2513
 
2514
+ /**
2515
+ * Chains attached to the loyalty rule
2516
+ */
2517
+ loyaltyRuleChain: Array<Data.LoyaltyRuleChain>;
2518
+
2519
+ /**
2520
+ * Name of the loyalty rule
2521
+ */
2522
+ name: string;
2523
+
1752
2524
  /**
1753
2525
  * Unique identifier for the organization
1754
2526
  */
1755
2527
  organizationId: string;
1756
2528
 
2529
+ /**
2530
+ * Type of the reward
2531
+ */
2532
+ rewardType: 'points' | 'multiplier' | 'badge';
2533
+
2534
+ /**
2535
+ * Start time of the loyalty rule
2536
+ */
2537
+ startTime: string;
2538
+
1757
2539
  /**
1758
2540
  * Type of the loyalty rule
1759
2541
  */
@@ -1774,28 +2556,992 @@ export namespace RuleListResponse {
1774
2556
  */
1775
2557
  collectionAddress?: string;
1776
2558
 
2559
+ /**
2560
+ * URL of the media associated with the loyalty rule
2561
+ */
2562
+ mediaUrl?: string | null;
2563
+
1777
2564
  /**
1778
2565
  * Optional metadata for the loyalty rule
1779
2566
  */
1780
- metadata?: Record<string, unknown>;
2567
+ metadata?: { [key: string]: Data.Metadata };
1781
2568
  }
1782
- }
1783
2569
 
1784
- export interface RuleDeleteResponse {
1785
- id: string;
2570
+ export namespace Data {
2571
+ export interface LoyaltyRuleChain {
2572
+ /**
2573
+ * Unique identifier for the rule chain
2574
+ */
2575
+ id: string;
2576
+
2577
+ loyaltyConditions: Array<LoyaltyRuleChain.LoyaltyCondition>;
2578
+
2579
+ /**
2580
+ * Unique identifier for the loyalty rule
2581
+ */
2582
+ loyaltyRuleId: string;
2583
+
2584
+ /**
2585
+ * Name of the rule chain
2586
+ */
2587
+ name: string;
2588
+ }
2589
+
2590
+ export namespace LoyaltyRuleChain {
2591
+ export interface LoyaltyCondition {
2592
+ /**
2593
+ * Unique identifier for the condition
2594
+ */
2595
+ id: string;
2596
+
2597
+ /**
2598
+ * Amount of the condition
2599
+ */
2600
+ amount: number | null;
2601
+
2602
+ association: Array<LoyaltyCondition.Association>;
2603
+
2604
+ /**
2605
+ * URL of the CSV file
2606
+ */
2607
+ csvUrl: string | null;
2608
+
2609
+ /**
2610
+ * Description of the condition
2611
+ */
2612
+ description: string | null;
2613
+
2614
+ /**
2615
+ * Number of times the condition must be met
2616
+ */
2617
+ repeatCount: number | null;
2618
+
2619
+ /**
2620
+ * Number of times the condition must be met
2621
+ */
2622
+ requiredCount: number | null;
2623
+
2624
+ /**
2625
+ * Type of the condition
2626
+ */
2627
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
2628
+ }
2629
+
2630
+ export namespace LoyaltyCondition {
2631
+ export interface Association {
2632
+ /**
2633
+ * Unique identifier for the association
2634
+ */
2635
+ id: string;
2636
+
2637
+ /**
2638
+ * Unique identifier for the loyalty badge
2639
+ */
2640
+ loyaltyBadgeId: string | null;
2641
+
2642
+ /**
2643
+ * Unique identifier for the loyalty currency
2644
+ */
2645
+ loyaltyCurrencyId: string | null;
2646
+
2647
+ loyaltyRule: Association.LoyaltyRule | null;
2648
+
2649
+ /**
2650
+ * Unique identifier for the loyalty rule group
2651
+ */
2652
+ loyaltyRuleGroupId: string | null;
2653
+
2654
+ /**
2655
+ * Unique identifier for the loyalty rule
2656
+ */
2657
+ loyaltyRuleId: string | null;
2658
+ }
2659
+
2660
+ export namespace Association {
2661
+ export interface LoyaltyRule {
2662
+ /**
2663
+ * Name of the loyalty rule
2664
+ */
2665
+ name: string;
2666
+ }
2667
+ }
2668
+ }
2669
+ }
2670
+
2671
+ export interface Metadata {
2672
+ /**
2673
+ * Number of tokens per batch.
2674
+ */
2675
+ batchSize?: number | null;
2676
+
2677
+ /**
2678
+ * Text displayed on the action button.
2679
+ */
2680
+ buttonText?: string | null;
2681
+
2682
+ /**
2683
+ * Flag indicating if commenting is required.
2684
+ */
2685
+ checkComment?: boolean | null;
2686
+
2687
+ /**
2688
+ * Flag indicating if liking the post is required.
2689
+ */
2690
+ checkLike?: boolean | null;
2691
+
2692
+ /**
2693
+ * Flag indicating if reposting is required.
2694
+ */
2695
+ checkRepost?: boolean | null;
2696
+
2697
+ /**
2698
+ * Text to check in the Twitter post, username, or bio.
2699
+ */
2700
+ checkText?: string | null;
2701
+
2702
+ /**
2703
+ * Array of collections associated with the rule.
2704
+ */
2705
+ collection?: Array<Metadata.Collection>;
2706
+
2707
+ /**
2708
+ * Conditions for completing the profile.
2709
+ */
2710
+ completeProfileConditions?: { [key: string]: boolean } | null;
2711
+
2712
+ /**
2713
+ * Description of the external rule condition (only for external rules)
2714
+ */
2715
+ conditionDescription?: string;
2716
+
2717
+ /**
2718
+ * Object containing details for the call-to-action.
2719
+ */
2720
+ cta?: Metadata.Cta | null;
2721
+
2722
+ /**
2723
+ * API key for custom rewards integration.
2724
+ */
2725
+ customRewardsApiKey?: string;
2726
+
2727
+ /**
2728
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
2729
+ */
2730
+ directRpc?: boolean;
2731
+
2732
+ /**
2733
+ * Array of Discord servers, channels, and roles to join.
2734
+ */
2735
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2736
+
2737
+ /**
2738
+ * Array of drip quests required to complete the rule.
2739
+ */
2740
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2741
+
2742
+ /**
2743
+ * Flag indicating whether joining Discord servers is required.
2744
+ */
2745
+ enableJoinDiscordServers?: boolean | null;
2746
+
2747
+ /**
2748
+ * Flag indicating whether streaks are enabled.
2749
+ */
2750
+ enableStreaks?: boolean | null;
2751
+
2752
+ /**
2753
+ * Flag indicating whether the verified multiplier is enabled.
2754
+ */
2755
+ enableVerifiedMultiplier?: boolean;
2756
+
2757
+ /**
2758
+ * Fill source of the order for the token sale
2759
+ */
2760
+ fillSource?: string;
2761
+
2762
+ /**
2763
+ * Percentage reward given to a user for their first referral.
2764
+ */
2765
+ firstReferralReward?: number | null;
2766
+
2767
+ /**
2768
+ * Flag indicating whether the fill source is included.
2769
+ */
2770
+ hasFillSource?: boolean;
2771
+
2772
+ /**
2773
+ * Indicates if the item has never been sold.
2774
+ */
2775
+ hasNeverSold?: boolean;
2776
+
2777
+ /**
2778
+ * Indicates if the full royalty has been paid for items.
2779
+ */
2780
+ hasPaidFullRoyalty?: boolean;
2781
+
2782
+ /**
2783
+ * Flag indicating if the sale currency is included.
2784
+ */
2785
+ hasSaleCurrency?: boolean;
2786
+
2787
+ /**
2788
+ * Indicates if the user has a verified Twitter account.
2789
+ */
2790
+ hasVerifiedTwitter?: boolean;
2791
+
2792
+ /**
2793
+ * URL of the image associated with the rule.
2794
+ */
2795
+ imageUrl?: string | null;
2796
+
2797
+ /**
2798
+ * If enabled, the first transaction done on the platform will complete this rule
2799
+ */
2800
+ isCheckInOnEveryTxn?: boolean;
2801
+
2802
+ /**
2803
+ * Indicates if the multiplier has been applied to rewards.
2804
+ */
2805
+ isMultiplierApplied?: boolean;
2806
+
2807
+ /**
2808
+ * Flag indicating if the rule is restricted to new users.
2809
+ */
2810
+ isRestrictedToNewUsers?: boolean;
2811
+
2812
+ /**
2813
+ * Flag indicating if rewards are applied retroactively.
2814
+ */
2815
+ isRetroactive?: boolean | null;
2816
+
2817
+ /**
2818
+ * Flag indicating if the token hold multiplier is applied.
2819
+ */
2820
+ isTokenHoldMultiplier?: boolean;
2821
+
2822
+ /**
2823
+ * Optional link associated with the metadata.
2824
+ */
2825
+ link?: string | null;
2826
+
2827
+ /**
2828
+ * Liquidity pool details.
2829
+ */
2830
+ liquidity?: Metadata.Liquidity;
2831
+
2832
+ /**
2833
+ * Maximum quantity constraint for token holding.
2834
+ */
2835
+ maxQty?: number | null;
2836
+
2837
+ /**
2838
+ * Minimum quantity constraint for token holding.
2839
+ */
2840
+ minQty?: number | null;
2841
+
2842
+ /**
2843
+ * Array of loyalty currency IDs used for multipliers.
2844
+ */
2845
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
2846
+
2847
+ /**
2848
+ * Flag indicating whether to include only known users.
2849
+ */
2850
+ onlyKnownUsers?: boolean;
2851
+
2852
+ /**
2853
+ * Flag indicating whether to include only native tokens.
2854
+ */
2855
+ onlyNative?: boolean;
2856
+
2857
+ /**
2858
+ * Flag indicating whether to include only non-listed items.
2859
+ */
2860
+ onlyNonListed?: boolean;
2861
+
2862
+ /**
2863
+ * Indicates if only existing users are rewarded.
2864
+ */
2865
+ onlyRewardExistingUser?: boolean;
2866
+
2867
+ /**
2868
+ * give points for only one token ownership per contract
2869
+ */
2870
+ onlyRewardSingleTokenOwnership?: boolean | null;
2871
+
2872
+ /**
2873
+ * Promotional code associated with the rule.
2874
+ */
2875
+ promoCode?: string;
2876
+
2877
+ /**
2878
+ * URL of the CSV file containing promo codes.
2879
+ */
2880
+ promoCodeCsvUrl?: string;
2881
+
2882
+ /**
2883
+ * Numbers of the promotional code to be generated.
2884
+ */
2885
+ promoCodeLength?: number | null;
2886
+
2887
+ /**
2888
+ * Type of the promotional code.
2889
+ */
2890
+ promoCodeType?: 'code' | 'csv' | 'generate';
2891
+
2892
+ /**
2893
+ * Array defining ranges and corresponding rewards.
2894
+ */
2895
+ range?: Array<Metadata.Range>;
2896
+
2897
+ /**
2898
+ * Object defining referral requirements.
2899
+ */
2900
+ referralRequirements?: Metadata.ReferralRequirements | null;
2901
+
2902
+ /**
2903
+ * Lump sum reward given to a referrer.
2904
+ */
2905
+ referrerReward?: number | null;
2906
+
2907
+ /**
2908
+ * Loyalty currency ID of the referrer reward.
2909
+ */
2910
+ referrerRewardLoyaltyCurrencyId?: string | null;
2911
+
2912
+ /**
2913
+ * Flag indicating if the post link is required.
2914
+ */
2915
+ requirePostLink?: boolean | null;
2916
+
2917
+ /**
2918
+ * Flag indicating if the rule can also reward badges per range.
2919
+ */
2920
+ rewardBadgePerRange?: boolean;
2921
+
2922
+ /**
2923
+ * Flag indicating if the reward is rewarded by batch.
2924
+ */
2925
+ rewardByBatch?: boolean | null;
2926
+
2927
+ /**
2928
+ * Flag indicating if the reward is rewarded per action.
2929
+ */
2930
+ rewardPerAction?: boolean | null;
2931
+
2932
+ /**
2933
+ * Flag indicating if rewards are given per impression.
2934
+ */
2935
+ rewardPerImpression?: boolean | null;
2936
+
2937
+ /**
2938
+ * Flag indicating if the rule should reward based on value of traded tokens
2939
+ * instead of count.
2940
+ */
2941
+ rewardPerValue?: boolean;
2942
+
2943
+ /**
2944
+ * Wallet address of the user can only be used if userId is not provided
2945
+ */
2946
+ royaltyAddress?: string;
2947
+
2948
+ /**
2949
+ * Royalty percentage of the item.
2950
+ */
2951
+ royaltyPercentage?: number;
2952
+
2953
+ /**
2954
+ * Currency associated with sales.
2955
+ */
2956
+ saleCurrency?: string;
2957
+
2958
+ /**
2959
+ * Percentage reward given for a second-level referral.
2960
+ */
2961
+ secondReferralReward?: number | null;
2962
+
2963
+ /**
2964
+ * Flag indicating if the multiplier is skipped.
2965
+ */
2966
+ skipMultiplier?: boolean | null;
2967
+
2968
+ /**
2969
+ * Object containing details of the associated smart contract.
2970
+ */
2971
+ smartContract?: Metadata.SmartContract;
2972
+
2973
+ /**
2974
+ * Array of snapshot proposals for the rule.
2975
+ */
2976
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
2977
+
2978
+ /**
2979
+ * Social media platform associated with the rule.
2980
+ */
2981
+ socialPlatform?:
2982
+ | 'Custom'
2983
+ | 'Discord'
2984
+ | 'EpicGames'
2985
+ | 'Instagram'
2986
+ | 'Steam'
2987
+ | 'Telegram'
2988
+ | 'TikTok'
2989
+ | 'Twitch'
2990
+ | 'X(Twitter)'
2991
+ | 'YouTube'
2992
+ | 'Google'
2993
+ | null;
2994
+
2995
+ /**
2996
+ * URL of the social platform's logo.
2997
+ */
2998
+ socialPlatformLogo?: string | null;
2999
+
3000
+ /**
3001
+ * Name of the social platform.
3002
+ */
3003
+ socialPlatformName?: string | null;
3004
+
3005
+ /**
3006
+ * ID of the Steam app.
3007
+ */
3008
+ steamAppId?: string | null;
3009
+
3010
+ /**
3011
+ * Array of streak milestones and corresponding rewards.
3012
+ */
3013
+ streakArray?: Array<Metadata.StreakArray> | null;
3014
+
3015
+ /**
3016
+ * Metadata for swap loyalty rules
3017
+ */
3018
+ swap?: Metadata.Swap;
3019
+
3020
+ /**
3021
+ * ID of the Telegram channel.
3022
+ */
3023
+ telegramChannelId?: string | null;
3024
+
3025
+ /**
3026
+ * Time delay in seconds to verify actions.
3027
+ */
3028
+ timeDelayToVerifySeconds?: string | number | null;
3029
+
3030
+ /**
3031
+ * Flag indicating if all contracts are tracked.
3032
+ */
3033
+ trackAllContracts?: boolean | null;
3034
+
3035
+ /**
3036
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
3037
+ * completed once the progress is 100%.
3038
+ */
3039
+ trackProgress?: boolean | null;
3040
+
3041
+ /**
3042
+ * URL of the associated Twitter account.
3043
+ */
3044
+ twitterAccountUrl?: string;
3045
+
3046
+ /**
3047
+ * Hashtag associated with the Twitter post.
3048
+ */
3049
+ twitterHashtag?: string;
3050
+
3051
+ /**
3052
+ * URL of the associated Twitter post.
3053
+ */
3054
+ twitterPostUrl?: string;
3055
+
3056
+ /**
3057
+ * Unique identifier of the Twitter user.
3058
+ */
3059
+ twitterUserId?: string;
3060
+
3061
+ /**
3062
+ * Twitter username of the user.
3063
+ */
3064
+ twitterUsername?: string;
3065
+
3066
+ /**
3067
+ * Minimum length of the verification text.
3068
+ */
3069
+ verificationTextMinimumLength?: number | null;
3070
+
3071
+ /**
3072
+ * Multiplier applied to rewards for verified users.
3073
+ */
3074
+ verifiedMultiplier?: number | null;
3075
+
3076
+ /**
3077
+ * Placeholder text for verification input fields.
3078
+ */
3079
+ verifyPlaceHolderText?: string | null;
3080
+
3081
+ /**
3082
+ * Type of wallet associated with the rule.
3083
+ */
3084
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | null;
3085
+
3086
+ /**
3087
+ * ID of the Youtube channel.
3088
+ */
3089
+ youtubeChannelId?: string | null;
3090
+
3091
+ /**
3092
+ * ID of the Youtube video.
3093
+ */
3094
+ youtubeVideoId?: string | null;
3095
+ }
3096
+
3097
+ export namespace Metadata {
3098
+ export interface Collection {
3099
+ /**
3100
+ * Blockchain address of the collection.
3101
+ */
3102
+ address?: string;
3103
+
3104
+ /**
3105
+ * Multiplier applied to the rewards for this collection.
3106
+ */
3107
+ multiplier?: number;
3108
+
3109
+ /**
3110
+ * Blockchain network of the collection.
3111
+ */
3112
+ network?:
3113
+ | 'abstract'
3114
+ | 'abstractTestnet'
3115
+ | 'apechain'
3116
+ | 'arbitrum'
3117
+ | 'avalanche'
3118
+ | 'avalancheFuji'
3119
+ | 'base'
3120
+ | 'baseSepolia'
3121
+ | 'berachain'
3122
+ | 'berachainArtio'
3123
+ | 'berachainBepolia'
3124
+ | 'binance'
3125
+ | 'bscTestnet'
3126
+ | 'campTestnet'
3127
+ | 'fantom'
3128
+ | 'fantomTestnet'
3129
+ | 'flowMainnet'
3130
+ | 'mainnet'
3131
+ | 'optimism'
3132
+ | 'polygon'
3133
+ | 'polygon_mumbai'
3134
+ | 'skaleNebula'
3135
+ | 'solana'
3136
+ | 'sophon'
3137
+ | 'sophonTestnet'
3138
+ | 'sui'
3139
+ | 'superseed'
3140
+ | 'superseedSepolia'
3141
+ | 'vanar'
3142
+ | 'xai'
3143
+ | 'zksync'
3144
+ | 'coti'
3145
+ | 'cotiTestnet'
3146
+ | 'morph'
3147
+ | 'morphTestnet'
3148
+ | 'morphHolesky'
3149
+ | 'ultra'
3150
+ | 'ultraTestnet'
3151
+ | 'nitrograph'
3152
+ | 'sepolia'
3153
+ | 'optimism_sepolia'
3154
+ | 'arbitrumSepolia'
3155
+ | 'goerli'
3156
+ | 'optimism_goerli'
3157
+ | 'arbitrumGoerli'
3158
+ | 'basecamp';
3159
+ }
3160
+
3161
+ /**
3162
+ * Object containing details for the call-to-action.
3163
+ */
3164
+ export interface Cta {
3165
+ /**
3166
+ * Link for the call-to-action.
3167
+ */
3168
+ href?: string | null;
3169
+
3170
+ /**
3171
+ * Label for the call-to-action.
3172
+ */
3173
+ label?: string | null;
3174
+ }
3175
+
3176
+ export interface DiscordServersToJoin {
3177
+ /**
3178
+ * ID of the Discord server to join.
3179
+ */
3180
+ id?: string;
3181
+
3182
+ /**
3183
+ * Array of Discord channels to join.
3184
+ */
3185
+ channels?: Array<DiscordServersToJoin.Channel>;
3186
+
3187
+ /**
3188
+ * Array of roles to assign in the Discord server.
3189
+ */
3190
+ roles?: Array<DiscordServersToJoin.Role>;
3191
+ }
3192
+
3193
+ export namespace DiscordServersToJoin {
3194
+ export interface Channel {
3195
+ /**
3196
+ * ID of the Discord channel.
3197
+ */
3198
+ id?: string;
3199
+
3200
+ /**
3201
+ * Array of emojis used in the channel.
3202
+ */
3203
+ emojis?: Array<Channel.Emoji>;
3204
+
3205
+ /**
3206
+ * Phrase of text to be present in the discord message
3207
+ */
3208
+ text?: string;
3209
+ }
3210
+
3211
+ export namespace Channel {
3212
+ export interface Emoji {
3213
+ /**
3214
+ * ID of the emoji used in the channel.
3215
+ */
3216
+ id?: string;
3217
+ }
3218
+ }
3219
+
3220
+ export interface Role {
3221
+ /**
3222
+ * ID of the role in the Discord server.
3223
+ */
3224
+ id: string;
3225
+ }
3226
+ }
3227
+
3228
+ export interface DripQuestsToComplete {
3229
+ /**
3230
+ * ID of the drip quest to complete.
3231
+ */
3232
+ id: string;
3233
+ }
3234
+
3235
+ /**
3236
+ * Liquidity pool details.
3237
+ */
3238
+ export interface Liquidity {
3239
+ /**
3240
+ * Calculation type of the liquidity pool.
3241
+ */
3242
+ calculationType?: 'fixed' | 'custom';
3243
+
3244
+ /**
3245
+ * Custom function to calculate the the reward amount based on the liquidity
3246
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
3247
+ * USD.
3248
+ */
3249
+ customFunction?: string;
3250
+
3251
+ /**
3252
+ * Liquidity provided per day in USD
3253
+ */
3254
+ liquidityPerDay?: number;
3255
+
3256
+ /**
3257
+ * Blockchain network of the liquidity pool.
3258
+ */
3259
+ network?:
3260
+ | 'abstract'
3261
+ | 'abstractTestnet'
3262
+ | 'apechain'
3263
+ | 'arbitrum'
3264
+ | 'avalanche'
3265
+ | 'avalancheFuji'
3266
+ | 'base'
3267
+ | 'baseSepolia'
3268
+ | 'berachain'
3269
+ | 'berachainArtio'
3270
+ | 'berachainBepolia'
3271
+ | 'binance'
3272
+ | 'bscTestnet'
3273
+ | 'campTestnet'
3274
+ | 'fantom'
3275
+ | 'fantomTestnet'
3276
+ | 'flowMainnet'
3277
+ | 'mainnet'
3278
+ | 'optimism'
3279
+ | 'polygon'
3280
+ | 'polygon_mumbai'
3281
+ | 'skaleNebula'
3282
+ | 'solana'
3283
+ | 'sophon'
3284
+ | 'sophonTestnet'
3285
+ | 'sui'
3286
+ | 'superseed'
3287
+ | 'superseedSepolia'
3288
+ | 'vanar'
3289
+ | 'xai'
3290
+ | 'zksync'
3291
+ | 'coti'
3292
+ | 'cotiTestnet'
3293
+ | 'morph'
3294
+ | 'morphTestnet'
3295
+ | 'morphHolesky'
3296
+ | 'ultra'
3297
+ | 'ultraTestnet'
3298
+ | 'nitrograph'
3299
+ | 'sepolia'
3300
+ | 'optimism_sepolia'
3301
+ | 'arbitrumSepolia'
3302
+ | 'goerli'
3303
+ | 'optimism_goerli'
3304
+ | 'arbitrumGoerli'
3305
+ | 'basecamp';
3306
+
3307
+ /**
3308
+ * Indicates if only in-range liquidity is rewarded.
3309
+ */
3310
+ onlyRewardInRangeLiquidity?: boolean;
3311
+
3312
+ /**
3313
+ * Array of liquidity pools associated with the rule.
3314
+ */
3315
+ pools?: Array<Liquidity.Pool>;
3316
+
3317
+ /**
3318
+ * Protocol of the liquidity pool.
3319
+ */
3320
+ protocol?: string;
3321
+ }
3322
+
3323
+ export namespace Liquidity {
3324
+ export interface Pool {
3325
+ /**
3326
+ * Unique identifier of the liquidity pool.
3327
+ */
3328
+ id: string;
3329
+ }
3330
+ }
3331
+
3332
+ export interface Range {
3333
+ /**
3334
+ * Reward amount for this range.
3335
+ */
3336
+ amount: number;
3337
+
3338
+ /**
3339
+ * End value of the range.
3340
+ */
3341
+ endRange: number;
3342
+
3343
+ /**
3344
+ * Start value of the range.
3345
+ */
3346
+ startRange: number;
3347
+
3348
+ /**
3349
+ * ID of the loyalty badge for this range.
3350
+ */
3351
+ loyaltyBadgeId?: string;
3352
+
3353
+ /**
3354
+ * Amount of the loyalty multiplier for this range.
3355
+ */
3356
+ loyaltyMultiplierAmount?: number;
3357
+ }
3358
+
3359
+ /**
3360
+ * Object defining referral requirements.
3361
+ */
3362
+ export interface ReferralRequirements {
3363
+ /**
3364
+ * Flag indicating if achieving points is required.
3365
+ */
3366
+ achievePoints?: boolean | null;
3367
+
3368
+ /**
3369
+ * Flag indicating if completing the profile is required.
3370
+ */
3371
+ completeProfile?: boolean | null;
3372
+
3373
+ /**
3374
+ * Flag indicating if connecting Discord is required.
3375
+ */
3376
+ connectDiscord?: boolean | null;
3377
+
3378
+ /**
3379
+ * Flag indicating if connecting email is required.
3380
+ */
3381
+ connectEmail?: boolean | null;
3382
+
3383
+ /**
3384
+ * Flag indicating if connecting Twitter is required.
3385
+ */
3386
+ connectTwitter?: boolean | null;
3387
+
3388
+ points?: ReferralRequirements.Points | null;
3389
+ }
3390
+
3391
+ export namespace ReferralRequirements {
3392
+ export interface Points {
3393
+ /**
3394
+ * Points required for referral.
3395
+ */
3396
+ amount?: number | null;
3397
+
3398
+ /**
3399
+ * ID of the loyalty currency for referral.
3400
+ */
3401
+ loyaltyCurrecyId?: string | null;
3402
+ }
3403
+ }
3404
+
3405
+ /**
3406
+ * Object containing details of the associated smart contract.
3407
+ */
3408
+ export interface SmartContract {
3409
+ /**
3410
+ * Mapping of addresses for the smart contract.
3411
+ */
3412
+ addressMapping?: string | null;
3413
+
3414
+ /**
3415
+ * Object containing details of the amount multiplier from the event.
3416
+ */
3417
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3418
+
3419
+ /**
3420
+ * ID of the smart contract.
3421
+ */
3422
+ contractId?: string | null;
3423
+
3424
+ /**
3425
+ * Criteria to evaluate the smart contract event.
3426
+ */
3427
+ criteria?: 'everyEvent' | 'byParameter' | null;
3428
+
3429
+ /**
3430
+ * Event emitted by the smart contract.
3431
+ */
3432
+ event?: string | null;
3433
+
3434
+ /**
3435
+ * Array of parameters for the smart contract.
3436
+ */
3437
+ params?: Array<SmartContract.Param> | null;
3438
+
3439
+ /**
3440
+ * Type of the smart contract interaction.
3441
+ */
3442
+ type?: 'function' | 'event' | null;
3443
+ }
3444
+
3445
+ export namespace SmartContract {
3446
+ /**
3447
+ * Object containing details of the amount multiplier from the event.
3448
+ */
3449
+ export interface AmountMultiplier {
3450
+ /**
3451
+ * Mapping of the value for the smart contract.
3452
+ */
3453
+ valueMapping?: string | null;
3454
+ }
3455
+
3456
+ export interface Param {
3457
+ /**
3458
+ * Condition to check for the parameter.
3459
+ */
3460
+ condition?: string | null;
3461
+
3462
+ /**
3463
+ * Name of the smart contract parameter.
3464
+ */
3465
+ name?: string | null;
3466
+
3467
+ /**
3468
+ * Value of the parameter.
3469
+ */
3470
+ value?: string | null;
3471
+ }
3472
+ }
3473
+
3474
+ export interface SnapshotProposal {
3475
+ /**
3476
+ * ID of the snapshot proposal.
3477
+ */
3478
+ id: string;
3479
+
3480
+ /**
3481
+ * Space associated with the snapshot proposal.
3482
+ */
3483
+ space: string;
3484
+ }
3485
+
3486
+ export interface StreakArray {
3487
+ /**
3488
+ * Reward amount for achieving the streak milestone.
3489
+ */
3490
+ streakAmount: number;
3491
+
3492
+ /**
3493
+ * Milestone required to achieve the streak.
3494
+ */
3495
+ streakMilestone: number;
3496
+ }
3497
+
3498
+ /**
3499
+ * Metadata for swap loyalty rules
3500
+ */
3501
+ export interface Swap {
3502
+ provider?: 'any' | 'relay' | 'lifi';
3503
+
3504
+ relayReferrerId?: string;
3505
+
3506
+ requireCrossChainSwap?: boolean;
3507
+
3508
+ swappedToChain?: 'any' | number | string;
3509
+
3510
+ swappedToTokens?: Array<Swap.SwappedToToken>;
3511
+
3512
+ tokenMode?: 'any' | 'specific';
3513
+
3514
+ trackTokenAmount?: boolean;
3515
+ }
3516
+
3517
+ export namespace Swap {
3518
+ export interface SwappedToToken {
3519
+ address: string;
3520
+
3521
+ chainId: string;
3522
+ }
3523
+ }
3524
+ }
3525
+ }
3526
+ }
3527
+
3528
+ export interface RuleDeleteResponse {
3529
+ id: string;
1786
3530
 
1787
3531
  deletedAt: string;
1788
3532
  }
1789
3533
 
1790
3534
  export interface RuleCompleteResponse {
1791
- message: string;
3535
+ message:
3536
+ | 'Completion request added to queue'
3537
+ | 'Link click being verified, come back later to check the status';
1792
3538
  }
1793
3539
 
1794
- export interface RuleStatusResponse {
1795
- data: Array<RuleStatusResponse.Data>;
3540
+ export interface RuleGetStatusResponse {
3541
+ data: Array<RuleGetStatusResponse.Data>;
1796
3542
  }
1797
3543
 
1798
- export namespace RuleStatusResponse {
3544
+ export namespace RuleGetStatusResponse {
1799
3545
  export interface Data {
1800
3546
  loyaltyRuleId: string;
1801
3547
 
@@ -1912,7 +3658,20 @@ export interface RuleCreateParams {
1912
3658
  | 'twitter_follow'
1913
3659
  | 'twitter_followers'
1914
3660
  | 'twitter_like'
1915
- | 'twitter_post_hashtag';
3661
+ | 'twitter_post_hashtag'
3662
+ | 'quiz'
3663
+ | 'poll'
3664
+ | 'steam_wishlist'
3665
+ | 'liquidity_uniswap_v2'
3666
+ | 'liquidity_uniswap_v3'
3667
+ | 'points_airdrop'
3668
+ | 'youtube_subscribers'
3669
+ | 'youtube_comment'
3670
+ | 'shopify_spend'
3671
+ | 'swap'
3672
+ | 'tiktok_post'
3673
+ | 'post_impressions'
3674
+ | 'discord_join';
1916
3675
 
1917
3676
  /**
1918
3677
  * Unique identifier for the associated website
@@ -1945,63 +3704,114 @@ export interface RuleCreateParams {
1945
3704
  customRewardsCsvUrl?: string | null;
1946
3705
 
1947
3706
  /**
1948
- * Optional detailed description of the rule
3707
+ * Optional detailed description of the rule
3708
+ */
3709
+ description?: string;
3710
+
3711
+ duplicatedFromId?: string | null;
3712
+
3713
+ /**
3714
+ * ID of the external integration
3715
+ */
3716
+ externalIntegrationId?: string | null;
3717
+
3718
+ /**
3719
+ * Whether to hide this rule in the user interface
3720
+ */
3721
+ hideInUi?: boolean;
3722
+
3723
+ /**
3724
+ * Interval between rule executions
3725
+ */
3726
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
3727
+
3728
+ /**
3729
+ * Whether this rule is mandatory
3730
+ */
3731
+ isRequired?: boolean;
3732
+
3733
+ /**
3734
+ * Unique identifier for the loyalty badge
3735
+ */
3736
+ loyaltyBadgeId?: string | null;
3737
+
3738
+ /**
3739
+ * Unique identifier for the loyalty rule group
1949
3740
  */
1950
- description?: string;
3741
+ loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
1951
3742
 
1952
3743
  /**
1953
- * Whether to hide this rule in the user interface
3744
+ * URL for uploading loyalty user allotment via CSV
1954
3745
  */
1955
- hideInUi?: boolean;
3746
+ loyaltyUserAllotmentCsvUrl?: string;
1956
3747
 
1957
3748
  /**
1958
- * Interval between rule executions
3749
+ * The interval for the max amount. Available for the smart contract and external
3750
+ * rules.
1959
3751
  */
1960
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
3752
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
1961
3753
 
1962
3754
  /**
1963
- * Whether this rule is mandatory
3755
+ * The maximum amount of points a user can earn per interval. Available for the
3756
+ * smart contract and external rules.
1964
3757
  */
1965
- isRequired?: boolean;
3758
+ maxAmountPerInterval?: number | null;
1966
3759
 
1967
3760
  /**
1968
- * Unique identifier for the loyalty rule group
3761
+ * URL of the media to be displayed
1969
3762
  */
1970
- loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
3763
+ mediaUrl?: string | null;
1971
3764
 
1972
3765
  /**
1973
3766
  * Blockchain network where the rule will apply
1974
3767
  */
1975
3768
  network?:
1976
- | 'mainnet'
1977
- | 'polygon'
1978
- | 'polygon_mumbai'
1979
- | 'optimism'
3769
+ | 'abstract'
3770
+ | 'abstractTestnet'
3771
+ | 'apechain'
1980
3772
  | 'arbitrum'
1981
- | 'binance'
1982
- | 'bscTestnet'
1983
3773
  | 'avalanche'
1984
3774
  | 'avalancheFuji'
1985
- | 'zksync'
1986
- | 'fantom'
1987
- | 'fantomTestnet'
1988
3775
  | 'base'
1989
3776
  | 'baseSepolia'
1990
- | 'skaleNebula'
1991
- | 'xai'
3777
+ | 'berachain'
1992
3778
  | 'berachainArtio'
1993
- | 'solana'
1994
- | 'apechain'
1995
- | 'flowMainnet'
3779
+ | 'berachainBepolia'
3780
+ | 'binance'
3781
+ | 'bscTestnet'
1996
3782
  | 'campTestnet'
3783
+ | 'fantom'
3784
+ | 'fantomTestnet'
3785
+ | 'flowMainnet'
3786
+ | 'mainnet'
3787
+ | 'optimism'
3788
+ | 'polygon'
3789
+ | 'polygon_mumbai'
3790
+ | 'skaleNebula'
3791
+ | 'solana'
3792
+ | 'sophon'
3793
+ | 'sophonTestnet'
1997
3794
  | 'sui'
3795
+ | 'superseed'
3796
+ | 'superseedSepolia'
1998
3797
  | 'vanar'
3798
+ | 'xai'
3799
+ | 'zksync'
3800
+ | 'coti'
3801
+ | 'cotiTestnet'
3802
+ | 'morph'
3803
+ | 'morphTestnet'
3804
+ | 'morphHolesky'
3805
+ | 'ultra'
3806
+ | 'ultraTestnet'
3807
+ | 'nitrograph'
1999
3808
  | 'sepolia'
2000
3809
  | 'optimism_sepolia'
2001
3810
  | 'arbitrumSepolia'
2002
3811
  | 'goerli'
2003
3812
  | 'optimism_goerli'
2004
- | 'arbitrumGoerli';
3813
+ | 'arbitrumGoerli'
3814
+ | 'basecamp';
2005
3815
 
2006
3816
  /**
2007
3817
  * OAuth credentials associated with the rule
@@ -2011,12 +3821,17 @@ export interface RuleCreateParams {
2011
3821
  /**
2012
3822
  * Type of reward issued by the rule
2013
3823
  */
2014
- rewardType?: 'points' | 'multiplier';
3824
+ rewardType?: 'points' | 'multiplier' | 'badge';
3825
+
3826
+ /**
3827
+ * URL of the Shopify store
3828
+ */
3829
+ shopifyStoreUrl?: string | null;
2015
3830
 
2016
3831
  /**
2017
- * Identifier for associated subscriptions
3832
+ * Optional subscription id for the rule
2018
3833
  */
2019
- subscriptionIdentifier?: string | null;
3834
+ subscriptionId?: string | null;
2020
3835
  }
2021
3836
 
2022
3837
  export namespace RuleCreateParams {
@@ -2024,6 +3839,11 @@ export namespace RuleCreateParams {
2024
3839
  * Additional metadata for the loyalty rule
2025
3840
  */
2026
3841
  export interface Metadata {
3842
+ /**
3843
+ * Number of tokens per batch.
3844
+ */
3845
+ batchSize?: number | null;
3846
+
2027
3847
  /**
2028
3848
  * Text displayed on the action button.
2029
3849
  */
@@ -2054,6 +3874,16 @@ export namespace RuleCreateParams {
2054
3874
  */
2055
3875
  collection?: Array<Metadata.Collection>;
2056
3876
 
3877
+ /**
3878
+ * Conditions for completing the profile.
3879
+ */
3880
+ completeProfileConditions?: { [key: string]: boolean } | null;
3881
+
3882
+ /**
3883
+ * Description of the external rule condition (only for external rules)
3884
+ */
3885
+ conditionDescription?: string;
3886
+
2057
3887
  /**
2058
3888
  * Object containing details for the call-to-action.
2059
3889
  */
@@ -2064,6 +3894,11 @@ export namespace RuleCreateParams {
2064
3894
  */
2065
3895
  customRewardsApiKey?: string;
2066
3896
 
3897
+ /**
3898
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
3899
+ */
3900
+ directRpc?: boolean;
3901
+
2067
3902
  /**
2068
3903
  * Array of Discord servers, channels, and roles to join.
2069
3904
  */
@@ -2089,11 +3924,21 @@ export namespace RuleCreateParams {
2089
3924
  */
2090
3925
  enableVerifiedMultiplier?: boolean;
2091
3926
 
3927
+ /**
3928
+ * Fill source of the order for the token sale
3929
+ */
3930
+ fillSource?: string;
3931
+
2092
3932
  /**
2093
3933
  * Percentage reward given to a user for their first referral.
2094
3934
  */
2095
3935
  firstReferralReward?: number | null;
2096
3936
 
3937
+ /**
3938
+ * Flag indicating whether the fill source is included.
3939
+ */
3940
+ hasFillSource?: boolean;
3941
+
2097
3942
  /**
2098
3943
  * Indicates if the item has never been sold.
2099
3944
  */
@@ -2119,11 +3964,21 @@ export namespace RuleCreateParams {
2119
3964
  */
2120
3965
  imageUrl?: string | null;
2121
3966
 
3967
+ /**
3968
+ * If enabled, the first transaction done on the platform will complete this rule
3969
+ */
3970
+ isCheckInOnEveryTxn?: boolean;
3971
+
2122
3972
  /**
2123
3973
  * Indicates if the multiplier has been applied to rewards.
2124
3974
  */
2125
3975
  isMultiplierApplied?: boolean;
2126
3976
 
3977
+ /**
3978
+ * Flag indicating if the rule is restricted to new users.
3979
+ */
3980
+ isRestrictedToNewUsers?: boolean;
3981
+
2127
3982
  /**
2128
3983
  * Flag indicating if rewards are applied retroactively.
2129
3984
  */
@@ -2139,6 +3994,11 @@ export namespace RuleCreateParams {
2139
3994
  */
2140
3995
  link?: string | null;
2141
3996
 
3997
+ /**
3998
+ * Liquidity pool details.
3999
+ */
4000
+ liquidity?: Metadata.Liquidity;
4001
+
2142
4002
  /**
2143
4003
  * Maximum quantity constraint for token holding.
2144
4004
  */
@@ -2169,11 +4029,36 @@ export namespace RuleCreateParams {
2169
4029
  */
2170
4030
  onlyNonListed?: boolean;
2171
4031
 
4032
+ /**
4033
+ * Indicates if only existing users are rewarded.
4034
+ */
4035
+ onlyRewardExistingUser?: boolean;
4036
+
4037
+ /**
4038
+ * give points for only one token ownership per contract
4039
+ */
4040
+ onlyRewardSingleTokenOwnership?: boolean | null;
4041
+
2172
4042
  /**
2173
4043
  * Promotional code associated with the rule.
2174
4044
  */
2175
4045
  promoCode?: string;
2176
4046
 
4047
+ /**
4048
+ * URL of the CSV file containing promo codes.
4049
+ */
4050
+ promoCodeCsvUrl?: string;
4051
+
4052
+ /**
4053
+ * Numbers of the promotional code to be generated.
4054
+ */
4055
+ promoCodeLength?: number | null;
4056
+
4057
+ /**
4058
+ * Type of the promotional code.
4059
+ */
4060
+ promoCodeType?: 'code' | 'csv' | 'generate';
4061
+
2177
4062
  /**
2178
4063
  * Array defining ranges and corresponding rewards.
2179
4064
  */
@@ -2189,11 +4074,52 @@ export namespace RuleCreateParams {
2189
4074
  */
2190
4075
  referrerReward?: number | null;
2191
4076
 
4077
+ /**
4078
+ * Loyalty currency ID of the referrer reward.
4079
+ */
4080
+ referrerRewardLoyaltyCurrencyId?: string | null;
4081
+
4082
+ /**
4083
+ * Flag indicating if the post link is required.
4084
+ */
4085
+ requirePostLink?: boolean | null;
4086
+
4087
+ /**
4088
+ * Flag indicating if the rule can also reward badges per range.
4089
+ */
4090
+ rewardBadgePerRange?: boolean;
4091
+
4092
+ /**
4093
+ * Flag indicating if the reward is rewarded by batch.
4094
+ */
4095
+ rewardByBatch?: boolean | null;
4096
+
4097
+ /**
4098
+ * Flag indicating if the reward is rewarded per action.
4099
+ */
4100
+ rewardPerAction?: boolean | null;
4101
+
2192
4102
  /**
2193
4103
  * Flag indicating if rewards are given per impression.
2194
4104
  */
2195
4105
  rewardPerImpression?: boolean | null;
2196
4106
 
4107
+ /**
4108
+ * Flag indicating if the rule should reward based on value of traded tokens
4109
+ * instead of count.
4110
+ */
4111
+ rewardPerValue?: boolean;
4112
+
4113
+ /**
4114
+ * Wallet address of the user can only be used if userId is not provided
4115
+ */
4116
+ royaltyAddress?: string;
4117
+
4118
+ /**
4119
+ * Royalty percentage of the item.
4120
+ */
4121
+ royaltyPercentage?: number;
4122
+
2197
4123
  /**
2198
4124
  * Currency associated with sales.
2199
4125
  */
@@ -2204,6 +4130,11 @@ export namespace RuleCreateParams {
2204
4130
  */
2205
4131
  secondReferralReward?: number | null;
2206
4132
 
4133
+ /**
4134
+ * Flag indicating if the multiplier is skipped.
4135
+ */
4136
+ skipMultiplier?: boolean | null;
4137
+
2207
4138
  /**
2208
4139
  * Object containing details of the associated smart contract.
2209
4140
  */
@@ -2218,14 +4149,17 @@ export namespace RuleCreateParams {
2218
4149
  * Social media platform associated with the rule.
2219
4150
  */
2220
4151
  socialPlatform?:
2221
- | 'Twitch'
4152
+ | 'Custom'
4153
+ | 'Discord'
4154
+ | 'EpicGames'
4155
+ | 'Instagram'
4156
+ | 'Steam'
4157
+ | 'Telegram'
2222
4158
  | 'TikTok'
4159
+ | 'Twitch'
2223
4160
  | 'X(Twitter)'
2224
- | 'Instagram'
2225
- | 'EpicGames'
2226
4161
  | 'YouTube'
2227
- | 'Discord'
2228
- | 'Custom'
4162
+ | 'Google'
2229
4163
  | null;
2230
4164
 
2231
4165
  /**
@@ -2238,11 +4172,21 @@ export namespace RuleCreateParams {
2238
4172
  */
2239
4173
  socialPlatformName?: string | null;
2240
4174
 
4175
+ /**
4176
+ * ID of the Steam app.
4177
+ */
4178
+ steamAppId?: string | null;
4179
+
2241
4180
  /**
2242
4181
  * Array of streak milestones and corresponding rewards.
2243
4182
  */
2244
4183
  streakArray?: Array<Metadata.StreakArray> | null;
2245
4184
 
4185
+ /**
4186
+ * Metadata for swap loyalty rules
4187
+ */
4188
+ swap?: Metadata.Swap;
4189
+
2246
4190
  /**
2247
4191
  * ID of the Telegram channel.
2248
4192
  */
@@ -2258,6 +4202,12 @@ export namespace RuleCreateParams {
2258
4202
  */
2259
4203
  trackAllContracts?: boolean | null;
2260
4204
 
4205
+ /**
4206
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
4207
+ * completed once the progress is 100%.
4208
+ */
4209
+ trackProgress?: boolean | null;
4210
+
2261
4211
  /**
2262
4212
  * URL of the associated Twitter account.
2263
4213
  */
@@ -2301,7 +4251,17 @@ export namespace RuleCreateParams {
2301
4251
  /**
2302
4252
  * Type of wallet associated with the rule.
2303
4253
  */
2304
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
4254
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | null;
4255
+
4256
+ /**
4257
+ * ID of the Youtube channel.
4258
+ */
4259
+ youtubeChannelId?: string | null;
4260
+
4261
+ /**
4262
+ * ID of the Youtube video.
4263
+ */
4264
+ youtubeVideoId?: string | null;
2305
4265
  }
2306
4266
 
2307
4267
  export namespace Metadata {
@@ -2320,35 +4280,52 @@ export namespace RuleCreateParams {
2320
4280
  * Blockchain network of the collection.
2321
4281
  */
2322
4282
  network?:
2323
- | 'mainnet'
2324
- | 'polygon'
2325
- | 'polygon_mumbai'
2326
- | 'optimism'
4283
+ | 'abstract'
4284
+ | 'abstractTestnet'
4285
+ | 'apechain'
2327
4286
  | 'arbitrum'
2328
- | 'binance'
2329
- | 'bscTestnet'
2330
4287
  | 'avalanche'
2331
4288
  | 'avalancheFuji'
2332
- | 'zksync'
2333
- | 'fantom'
2334
- | 'fantomTestnet'
2335
4289
  | 'base'
2336
4290
  | 'baseSepolia'
2337
- | 'skaleNebula'
2338
- | 'xai'
4291
+ | 'berachain'
2339
4292
  | 'berachainArtio'
2340
- | 'solana'
2341
- | 'apechain'
2342
- | 'flowMainnet'
4293
+ | 'berachainBepolia'
4294
+ | 'binance'
4295
+ | 'bscTestnet'
2343
4296
  | 'campTestnet'
4297
+ | 'fantom'
4298
+ | 'fantomTestnet'
4299
+ | 'flowMainnet'
4300
+ | 'mainnet'
4301
+ | 'optimism'
4302
+ | 'polygon'
4303
+ | 'polygon_mumbai'
4304
+ | 'skaleNebula'
4305
+ | 'solana'
4306
+ | 'sophon'
4307
+ | 'sophonTestnet'
2344
4308
  | 'sui'
4309
+ | 'superseed'
4310
+ | 'superseedSepolia'
2345
4311
  | 'vanar'
4312
+ | 'xai'
4313
+ | 'zksync'
4314
+ | 'coti'
4315
+ | 'cotiTestnet'
4316
+ | 'morph'
4317
+ | 'morphTestnet'
4318
+ | 'morphHolesky'
4319
+ | 'ultra'
4320
+ | 'ultraTestnet'
4321
+ | 'nitrograph'
2346
4322
  | 'sepolia'
2347
4323
  | 'optimism_sepolia'
2348
4324
  | 'arbitrumSepolia'
2349
4325
  | 'goerli'
2350
4326
  | 'optimism_goerli'
2351
- | 'arbitrumGoerli';
4327
+ | 'arbitrumGoerli'
4328
+ | 'basecamp';
2352
4329
  }
2353
4330
 
2354
4331
  /**
@@ -2394,6 +4371,11 @@ export namespace RuleCreateParams {
2394
4371
  * Array of emojis used in the channel.
2395
4372
  */
2396
4373
  emojis?: Array<Channel.Emoji>;
4374
+
4375
+ /**
4376
+ * Phrase of text to be present in the discord message
4377
+ */
4378
+ text?: string;
2397
4379
  }
2398
4380
 
2399
4381
  export namespace Channel {
@@ -2420,6 +4402,103 @@ export namespace RuleCreateParams {
2420
4402
  id: string;
2421
4403
  }
2422
4404
 
4405
+ /**
4406
+ * Liquidity pool details.
4407
+ */
4408
+ export interface Liquidity {
4409
+ /**
4410
+ * Calculation type of the liquidity pool.
4411
+ */
4412
+ calculationType?: 'fixed' | 'custom';
4413
+
4414
+ /**
4415
+ * Custom function to calculate the the reward amount based on the liquidity
4416
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
4417
+ * USD.
4418
+ */
4419
+ customFunction?: string;
4420
+
4421
+ /**
4422
+ * Liquidity provided per day in USD
4423
+ */
4424
+ liquidityPerDay?: number;
4425
+
4426
+ /**
4427
+ * Blockchain network of the liquidity pool.
4428
+ */
4429
+ network?:
4430
+ | 'abstract'
4431
+ | 'abstractTestnet'
4432
+ | 'apechain'
4433
+ | 'arbitrum'
4434
+ | 'avalanche'
4435
+ | 'avalancheFuji'
4436
+ | 'base'
4437
+ | 'baseSepolia'
4438
+ | 'berachain'
4439
+ | 'berachainArtio'
4440
+ | 'berachainBepolia'
4441
+ | 'binance'
4442
+ | 'bscTestnet'
4443
+ | 'campTestnet'
4444
+ | 'fantom'
4445
+ | 'fantomTestnet'
4446
+ | 'flowMainnet'
4447
+ | 'mainnet'
4448
+ | 'optimism'
4449
+ | 'polygon'
4450
+ | 'polygon_mumbai'
4451
+ | 'skaleNebula'
4452
+ | 'solana'
4453
+ | 'sophon'
4454
+ | 'sophonTestnet'
4455
+ | 'sui'
4456
+ | 'superseed'
4457
+ | 'superseedSepolia'
4458
+ | 'vanar'
4459
+ | 'xai'
4460
+ | 'zksync'
4461
+ | 'coti'
4462
+ | 'cotiTestnet'
4463
+ | 'morph'
4464
+ | 'morphTestnet'
4465
+ | 'morphHolesky'
4466
+ | 'ultra'
4467
+ | 'ultraTestnet'
4468
+ | 'nitrograph'
4469
+ | 'sepolia'
4470
+ | 'optimism_sepolia'
4471
+ | 'arbitrumSepolia'
4472
+ | 'goerli'
4473
+ | 'optimism_goerli'
4474
+ | 'arbitrumGoerli'
4475
+ | 'basecamp';
4476
+
4477
+ /**
4478
+ * Indicates if only in-range liquidity is rewarded.
4479
+ */
4480
+ onlyRewardInRangeLiquidity?: boolean;
4481
+
4482
+ /**
4483
+ * Array of liquidity pools associated with the rule.
4484
+ */
4485
+ pools?: Array<Liquidity.Pool>;
4486
+
4487
+ /**
4488
+ * Protocol of the liquidity pool.
4489
+ */
4490
+ protocol?: string;
4491
+ }
4492
+
4493
+ export namespace Liquidity {
4494
+ export interface Pool {
4495
+ /**
4496
+ * Unique identifier of the liquidity pool.
4497
+ */
4498
+ id: string;
4499
+ }
4500
+ }
4501
+
2423
4502
  export interface Range {
2424
4503
  /**
2425
4504
  * Reward amount for this range.
@@ -2435,6 +4514,16 @@ export namespace RuleCreateParams {
2435
4514
  * Start value of the range.
2436
4515
  */
2437
4516
  startRange: number;
4517
+
4518
+ /**
4519
+ * ID of the loyalty badge for this range.
4520
+ */
4521
+ loyaltyBadgeId?: string;
4522
+
4523
+ /**
4524
+ * Amount of the loyalty multiplier for this range.
4525
+ */
4526
+ loyaltyMultiplierAmount?: number;
2438
4527
  }
2439
4528
 
2440
4529
  /**
@@ -2487,20 +4576,15 @@ export namespace RuleCreateParams {
2487
4576
  * Object containing details of the associated smart contract.
2488
4577
  */
2489
4578
  export interface SmartContract {
2490
- /**
2491
- * ABI of the smart contract.
2492
- */
2493
- abi?: string | null;
2494
-
2495
4579
  /**
2496
4580
  * Mapping of addresses for the smart contract.
2497
4581
  */
2498
4582
  addressMapping?: string | null;
2499
4583
 
2500
4584
  /**
2501
- * Array of bonus details applied to the rule.
4585
+ * Object containing details of the amount multiplier from the event.
2502
4586
  */
2503
- bonus?: Array<SmartContract.Bonus> | null;
4587
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2504
4588
 
2505
4589
  /**
2506
4590
  * ID of the smart contract.
@@ -2512,68 +4596,31 @@ export namespace RuleCreateParams {
2512
4596
  */
2513
4597
  criteria?: 'everyEvent' | 'byParameter' | null;
2514
4598
 
2515
- /**
2516
- * Time range applied to the rule.
2517
- */
2518
- customRange?: SmartContract.CustomRange | null;
2519
-
2520
4599
  /**
2521
4600
  * Event emitted by the smart contract.
2522
4601
  */
2523
4602
  event?: string | null;
2524
4603
 
2525
- /**
2526
- * Maximum value allowed for the parameter.
2527
- */
2528
- max?: number | null;
2529
-
2530
4604
  /**
2531
4605
  * Array of parameters for the smart contract.
2532
4606
  */
2533
4607
  params?: Array<SmartContract.Param> | null;
2534
4608
 
2535
4609
  /**
2536
- * Flag indicating if a bonus is applied.
2537
- */
2538
- withBonus?: boolean | null;
2539
-
2540
- /**
2541
- * Flag indicating if a custom range is applied.
4610
+ * Type of the smart contract interaction.
2542
4611
  */
2543
- withCustomRange?: boolean | null;
2544
-
2545
- /**
2546
- * Flag indicating if a maximum limit is applied.
2547
- */
2548
- withMax?: boolean | null;
4612
+ type?: 'function' | 'event' | null;
2549
4613
  }
2550
4614
 
2551
- 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
-
4615
+ export namespace SmartContract {
2564
4616
  /**
2565
- * Time range applied to the rule.
4617
+ * Object containing details of the amount multiplier from the event.
2566
4618
  */
2567
- export interface CustomRange {
2568
- /**
2569
- * End time of the custom range.
2570
- */
2571
- endsAt?: string | null;
2572
-
4619
+ export interface AmountMultiplier {
2573
4620
  /**
2574
- * Start time of the custom range.
4621
+ * Mapping of the value for the smart contract.
2575
4622
  */
2576
- startsAt?: string | null;
4623
+ valueMapping?: string | null;
2577
4624
  }
2578
4625
 
2579
4626
  export interface Param {
@@ -2617,6 +4664,33 @@ export namespace RuleCreateParams {
2617
4664
  */
2618
4665
  streakMilestone: number;
2619
4666
  }
4667
+
4668
+ /**
4669
+ * Metadata for swap loyalty rules
4670
+ */
4671
+ export interface Swap {
4672
+ provider?: 'any' | 'relay' | 'lifi';
4673
+
4674
+ relayReferrerId?: string;
4675
+
4676
+ requireCrossChainSwap?: boolean;
4677
+
4678
+ swappedToChain?: 'any' | number | string;
4679
+
4680
+ swappedToTokens?: Array<Swap.SwappedToToken>;
4681
+
4682
+ tokenMode?: 'any' | 'specific';
4683
+
4684
+ trackTokenAmount?: boolean;
4685
+ }
4686
+
4687
+ export namespace Swap {
4688
+ export interface SwappedToToken {
4689
+ address: string;
4690
+
4691
+ chainId: string;
4692
+ }
4693
+ }
2620
4694
  }
2621
4695
 
2622
4696
  export interface Collection {
@@ -2629,35 +4703,57 @@ export namespace RuleCreateParams {
2629
4703
  * Blockchain network for the collection
2630
4704
  */
2631
4705
  network:
2632
- | 'mainnet'
2633
- | 'polygon'
2634
- | 'polygon_mumbai'
2635
- | 'optimism'
4706
+ | 'abstract'
4707
+ | 'abstractTestnet'
4708
+ | 'apechain'
2636
4709
  | 'arbitrum'
2637
- | 'binance'
2638
- | 'bscTestnet'
2639
4710
  | 'avalanche'
2640
4711
  | 'avalancheFuji'
2641
- | 'zksync'
2642
- | 'fantom'
2643
- | 'fantomTestnet'
2644
4712
  | 'base'
2645
4713
  | 'baseSepolia'
2646
- | 'skaleNebula'
2647
- | 'xai'
4714
+ | 'berachain'
2648
4715
  | 'berachainArtio'
2649
- | 'solana'
2650
- | 'apechain'
2651
- | 'flowMainnet'
4716
+ | 'berachainBepolia'
4717
+ | 'binance'
4718
+ | 'bscTestnet'
2652
4719
  | 'campTestnet'
4720
+ | 'fantom'
4721
+ | 'fantomTestnet'
4722
+ | 'flowMainnet'
4723
+ | 'mainnet'
4724
+ | 'optimism'
4725
+ | 'polygon'
4726
+ | 'polygon_mumbai'
4727
+ | 'skaleNebula'
4728
+ | 'solana'
4729
+ | 'sophon'
4730
+ | 'sophonTestnet'
2653
4731
  | 'sui'
4732
+ | 'superseed'
4733
+ | 'superseedSepolia'
2654
4734
  | 'vanar'
4735
+ | 'xai'
4736
+ | 'zksync'
4737
+ | 'coti'
4738
+ | 'cotiTestnet'
4739
+ | 'morph'
4740
+ | 'morphTestnet'
4741
+ | 'morphHolesky'
4742
+ | 'ultra'
4743
+ | 'ultraTestnet'
4744
+ | 'nitrograph'
2655
4745
  | 'sepolia'
2656
4746
  | 'optimism_sepolia'
2657
4747
  | 'arbitrumSepolia'
2658
4748
  | 'goerli'
2659
4749
  | 'optimism_goerli'
2660
- | 'arbitrumGoerli';
4750
+ | 'arbitrumGoerli'
4751
+ | 'basecamp';
4752
+
4753
+ /**
4754
+ * Symbol of the collection.
4755
+ */
4756
+ symbol?: string;
2661
4757
  }
2662
4758
  }
2663
4759
 
@@ -2667,41 +4763,16 @@ export interface RuleUpdateParams {
2667
4763
  */
2668
4764
  amount: unknown;
2669
4765
 
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
4766
  /**
2681
4767
  * End time for the loyalty rule
2682
4768
  */
2683
4769
  endTime: string | null;
2684
4770
 
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
4771
  /**
2696
4772
  * Name of the loyalty rule
2697
4773
  */
2698
4774
  name: string;
2699
4775
 
2700
- /**
2701
- * Start time for the loyalty rule
2702
- */
2703
- startTime: string | null;
2704
-
2705
4776
  /**
2706
4777
  * Blockchain address of the associated collection
2707
4778
  */
@@ -2727,6 +4798,26 @@ export interface RuleUpdateParams {
2727
4798
  */
2728
4799
  description?: string;
2729
4800
 
4801
+ /**
4802
+ * Effective end time of the rule
4803
+ */
4804
+ effectiveEndTime?: string | null;
4805
+
4806
+ /**
4807
+ * Effective start time of the rule
4808
+ */
4809
+ effectiveStartTime?: string | null;
4810
+
4811
+ /**
4812
+ * ID of the external integration
4813
+ */
4814
+ externalIntegrationId?: string | null;
4815
+
4816
+ /**
4817
+ * Frequency of the rule execution
4818
+ */
4819
+ frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
4820
+
2730
4821
  /**
2731
4822
  * Whether to hide this rule in the user interface
2732
4823
  */
@@ -2735,7 +4826,7 @@ export interface RuleUpdateParams {
2735
4826
  /**
2736
4827
  * Time interval for recurring rule execution
2737
4828
  */
2738
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
4829
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
2739
4830
 
2740
4831
  /**
2741
4832
  * Whether this rule is required for participation
@@ -2747,39 +4838,78 @@ export interface RuleUpdateParams {
2747
4838
  */
2748
4839
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
2749
4840
 
4841
+ /**
4842
+ * The interval for the max amount. Available for the smart contract and external
4843
+ * rules.
4844
+ */
4845
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
4846
+
4847
+ /**
4848
+ * The maximum amount of points a user can earn per interval. Available for the
4849
+ * smart contract and external rules.
4850
+ */
4851
+ maxAmountPerInterval?: number | null;
4852
+
4853
+ /**
4854
+ * URL of the media to be displayed
4855
+ */
4856
+ mediaUrl?: string | null;
4857
+
4858
+ /**
4859
+ * Additional metadata for the loyalty rule
4860
+ */
4861
+ metadata?: RuleUpdateParams.Metadata;
4862
+
2750
4863
  /**
2751
4864
  * Blockchain network where the rule will apply
2752
4865
  */
2753
4866
  network?:
2754
- | 'mainnet'
2755
- | 'polygon'
2756
- | 'polygon_mumbai'
2757
- | 'optimism'
4867
+ | 'abstract'
4868
+ | 'abstractTestnet'
4869
+ | 'apechain'
2758
4870
  | 'arbitrum'
2759
- | 'binance'
2760
- | 'bscTestnet'
2761
4871
  | 'avalanche'
2762
4872
  | 'avalancheFuji'
2763
- | 'zksync'
2764
- | 'fantom'
2765
- | 'fantomTestnet'
2766
4873
  | 'base'
2767
4874
  | 'baseSepolia'
2768
- | 'skaleNebula'
2769
- | 'xai'
4875
+ | 'berachain'
2770
4876
  | 'berachainArtio'
2771
- | 'solana'
2772
- | 'apechain'
2773
- | 'flowMainnet'
4877
+ | 'berachainBepolia'
4878
+ | 'binance'
4879
+ | 'bscTestnet'
2774
4880
  | 'campTestnet'
4881
+ | 'fantom'
4882
+ | 'fantomTestnet'
4883
+ | 'flowMainnet'
4884
+ | 'mainnet'
4885
+ | 'optimism'
4886
+ | 'polygon'
4887
+ | 'polygon_mumbai'
4888
+ | 'skaleNebula'
4889
+ | 'solana'
4890
+ | 'sophon'
4891
+ | 'sophonTestnet'
2775
4892
  | 'sui'
4893
+ | 'superseed'
4894
+ | 'superseedSepolia'
2776
4895
  | 'vanar'
4896
+ | 'xai'
4897
+ | 'zksync'
4898
+ | 'coti'
4899
+ | 'cotiTestnet'
4900
+ | 'morph'
4901
+ | 'morphTestnet'
4902
+ | 'morphHolesky'
4903
+ | 'ultra'
4904
+ | 'ultraTestnet'
4905
+ | 'nitrograph'
2777
4906
  | 'sepolia'
2778
4907
  | 'optimism_sepolia'
2779
4908
  | 'arbitrumSepolia'
2780
4909
  | 'goerli'
2781
4910
  | 'optimism_goerli'
2782
- | 'arbitrumGoerli';
4911
+ | 'arbitrumGoerli'
4912
+ | 'basecamp';
2783
4913
 
2784
4914
  /**
2785
4915
  * ID for associated OAuth credentials
@@ -2789,19 +4919,97 @@ export interface RuleUpdateParams {
2789
4919
  /**
2790
4920
  * Type of reward issued by this rule
2791
4921
  */
2792
- rewardType?: 'points' | 'multiplier';
4922
+ rewardType?: 'points' | 'multiplier' | 'badge';
4923
+
4924
+ /**
4925
+ * URL of the Shopify store
4926
+ */
4927
+ shopifyStoreUrl?: string | null;
4928
+
4929
+ /**
4930
+ * Start time for the loyalty rule
4931
+ */
4932
+ startTime?: string | null;
2793
4933
 
2794
4934
  /**
2795
- * Optional subscription identifier for the rule
4935
+ * Optional subscription id for the rule
2796
4936
  */
2797
- subscriptionIdentifier?: string | null;
4937
+ subscriptionId?: string | null;
2798
4938
  }
2799
4939
 
2800
4940
  export namespace RuleUpdateParams {
4941
+ export interface Collection {
4942
+ /**
4943
+ * Blockchain address of the collection
4944
+ */
4945
+ address: string;
4946
+
4947
+ /**
4948
+ * Blockchain network for the collection
4949
+ */
4950
+ network:
4951
+ | 'abstract'
4952
+ | 'abstractTestnet'
4953
+ | 'apechain'
4954
+ | 'arbitrum'
4955
+ | 'avalanche'
4956
+ | 'avalancheFuji'
4957
+ | 'base'
4958
+ | 'baseSepolia'
4959
+ | 'berachain'
4960
+ | 'berachainArtio'
4961
+ | 'berachainBepolia'
4962
+ | 'binance'
4963
+ | 'bscTestnet'
4964
+ | 'campTestnet'
4965
+ | 'fantom'
4966
+ | 'fantomTestnet'
4967
+ | 'flowMainnet'
4968
+ | 'mainnet'
4969
+ | 'optimism'
4970
+ | 'polygon'
4971
+ | 'polygon_mumbai'
4972
+ | 'skaleNebula'
4973
+ | 'solana'
4974
+ | 'sophon'
4975
+ | 'sophonTestnet'
4976
+ | 'sui'
4977
+ | 'superseed'
4978
+ | 'superseedSepolia'
4979
+ | 'vanar'
4980
+ | 'xai'
4981
+ | 'zksync'
4982
+ | 'coti'
4983
+ | 'cotiTestnet'
4984
+ | 'morph'
4985
+ | 'morphTestnet'
4986
+ | 'morphHolesky'
4987
+ | 'ultra'
4988
+ | 'ultraTestnet'
4989
+ | 'nitrograph'
4990
+ | 'sepolia'
4991
+ | 'optimism_sepolia'
4992
+ | 'arbitrumSepolia'
4993
+ | 'goerli'
4994
+ | 'optimism_goerli'
4995
+ | 'arbitrumGoerli'
4996
+ | 'basecamp';
4997
+
4998
+ /**
4999
+ * Symbol of the collection.
5000
+ */
5001
+ symbol?: string;
5002
+ }
5003
+
2801
5004
  /**
2802
5005
  * Additional metadata for the loyalty rule
2803
5006
  */
2804
5007
  export interface Metadata {
5008
+ /**
5009
+ * Number of tokens per batch.
5010
+ */
5011
+ batchSize?: number | null;
5012
+
2805
5013
  /**
2806
5014
  * Text displayed on the action button.
2807
5015
  */
@@ -2832,6 +5040,16 @@ export namespace RuleUpdateParams {
2832
5040
  */
2833
5041
  collection?: Array<Metadata.Collection>;
2834
5042
 
5043
+ /**
5044
+ * Conditions for completing the profile.
5045
+ */
5046
+ completeProfileConditions?: { [key: string]: boolean } | null;
5047
+
5048
+ /**
5049
+ * Description of the external rule condition (only for external rules)
5050
+ */
5051
+ conditionDescription?: string;
5052
+
2835
5053
  /**
2836
5054
  * Object containing details for the call-to-action.
2837
5055
  */
@@ -2842,6 +5060,11 @@ export namespace RuleUpdateParams {
2842
5060
  */
2843
5061
  customRewardsApiKey?: string;
2844
5062
 
5063
+ /**
5064
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
5065
+ */
5066
+ directRpc?: boolean;
5067
+
2845
5068
  /**
2846
5069
  * Array of Discord servers, channels, and roles to join.
2847
5070
  */
@@ -2867,11 +5090,21 @@ export namespace RuleUpdateParams {
2867
5090
  */
2868
5091
  enableVerifiedMultiplier?: boolean;
2869
5092
 
5093
+ /**
5094
+ * Fill source of the order for the token sale
5095
+ */
5096
+ fillSource?: string;
5097
+
2870
5098
  /**
2871
5099
  * Percentage reward given to a user for their first referral.
2872
5100
  */
2873
5101
  firstReferralReward?: number | null;
2874
5102
 
5103
+ /**
5104
+ * Flag indicating whether the fill source is included.
5105
+ */
5106
+ hasFillSource?: boolean;
5107
+
2875
5108
  /**
2876
5109
  * Indicates if the item has never been sold.
2877
5110
  */
@@ -2897,11 +5130,21 @@ export namespace RuleUpdateParams {
2897
5130
  */
2898
5131
  imageUrl?: string | null;
2899
5132
 
5133
+ /**
5134
+ * If enabled, the first transaction done on the platform will complete this rule
5135
+ */
5136
+ isCheckInOnEveryTxn?: boolean;
5137
+
2900
5138
  /**
2901
5139
  * Indicates if the multiplier has been applied to rewards.
2902
5140
  */
2903
5141
  isMultiplierApplied?: boolean;
2904
5142
 
5143
+ /**
5144
+ * Flag indicating if the rule is restricted to new users.
5145
+ */
5146
+ isRestrictedToNewUsers?: boolean;
5147
+
2905
5148
  /**
2906
5149
  * Flag indicating if rewards are applied retroactively.
2907
5150
  */
@@ -2917,6 +5160,11 @@ export namespace RuleUpdateParams {
2917
5160
  */
2918
5161
  link?: string | null;
2919
5162
 
5163
+ /**
5164
+ * Liquidity pool details.
5165
+ */
5166
+ liquidity?: Metadata.Liquidity;
5167
+
2920
5168
  /**
2921
5169
  * Maximum quantity constraint for token holding.
2922
5170
  */
@@ -2940,37 +5188,103 @@ export namespace RuleUpdateParams {
2940
5188
  /**
2941
5189
  * Flag indicating whether to include only native tokens.
2942
5190
  */
2943
- onlyNative?: boolean;
5191
+ onlyNative?: boolean;
5192
+
5193
+ /**
5194
+ * Flag indicating whether to include only non-listed items.
5195
+ */
5196
+ onlyNonListed?: boolean;
5197
+
5198
+ /**
5199
+ * Indicates if only existing users are rewarded.
5200
+ */
5201
+ onlyRewardExistingUser?: boolean;
5202
+
5203
+ /**
5204
+ * give points for only one token ownership per contract
5205
+ */
5206
+ onlyRewardSingleTokenOwnership?: boolean | null;
5207
+
5208
+ /**
5209
+ * Promotional code associated with the rule.
5210
+ */
5211
+ promoCode?: string;
5212
+
5213
+ /**
5214
+ * URL of the CSV file containing promo codes.
5215
+ */
5216
+ promoCodeCsvUrl?: string;
5217
+
5218
+ /**
5219
+ * Numbers of the promotional code to be generated.
5220
+ */
5221
+ promoCodeLength?: number | null;
5222
+
5223
+ /**
5224
+ * Type of the promotional code.
5225
+ */
5226
+ promoCodeType?: 'code' | 'csv' | 'generate';
5227
+
5228
+ /**
5229
+ * Array defining ranges and corresponding rewards.
5230
+ */
5231
+ range?: Array<Metadata.Range>;
5232
+
5233
+ /**
5234
+ * Object defining referral requirements.
5235
+ */
5236
+ referralRequirements?: Metadata.ReferralRequirements | null;
5237
+
5238
+ /**
5239
+ * Lump sum reward given to a referrer.
5240
+ */
5241
+ referrerReward?: number | null;
5242
+
5243
+ /**
5244
+ * Loyalty currency ID of the referrer reward.
5245
+ */
5246
+ referrerRewardLoyaltyCurrencyId?: string | null;
5247
+
5248
+ /**
5249
+ * Flag indicating if the post link is required.
5250
+ */
5251
+ requirePostLink?: boolean | null;
5252
+
5253
+ /**
5254
+ * Flag indicating if the rule can also reward badges per range.
5255
+ */
5256
+ rewardBadgePerRange?: boolean;
2944
5257
 
2945
5258
  /**
2946
- * Flag indicating whether to include only non-listed items.
5259
+ * Flag indicating if the reward is rewarded by batch.
2947
5260
  */
2948
- onlyNonListed?: boolean;
5261
+ rewardByBatch?: boolean | null;
2949
5262
 
2950
5263
  /**
2951
- * Promotional code associated with the rule.
5264
+ * Flag indicating if the reward is rewarded per action.
2952
5265
  */
2953
- promoCode?: string;
5266
+ rewardPerAction?: boolean | null;
2954
5267
 
2955
5268
  /**
2956
- * Array defining ranges and corresponding rewards.
5269
+ * Flag indicating if rewards are given per impression.
2957
5270
  */
2958
- range?: Array<Metadata.Range>;
5271
+ rewardPerImpression?: boolean | null;
2959
5272
 
2960
5273
  /**
2961
- * Object defining referral requirements.
5274
+ * Flag indicating if the rule should reward based on value of traded tokens
5275
+ * instead of count.
2962
5276
  */
2963
- referralRequirements?: Metadata.ReferralRequirements | null;
5277
+ rewardPerValue?: boolean;
2964
5278
 
2965
5279
  /**
2966
- * Lump sum reward given to a referrer.
5280
+ * Wallet address of the user can only be used if userId is not provided
2967
5281
  */
2968
- referrerReward?: number | null;
5282
+ royaltyAddress?: string;
2969
5283
 
2970
5284
  /**
2971
- * Flag indicating if rewards are given per impression.
5285
+ * Royalty percentage of the item.
2972
5286
  */
2973
- rewardPerImpression?: boolean | null;
5287
+ royaltyPercentage?: number;
2974
5288
 
2975
5289
  /**
2976
5290
  * Currency associated with sales.
@@ -2982,6 +5296,11 @@ export namespace RuleUpdateParams {
2982
5296
  */
2983
5297
  secondReferralReward?: number | null;
2984
5298
 
5299
+ /**
5300
+ * Flag indicating if the multiplier is skipped.
5301
+ */
5302
+ skipMultiplier?: boolean | null;
5303
+
2985
5304
  /**
2986
5305
  * Object containing details of the associated smart contract.
2987
5306
  */
@@ -2996,14 +5315,17 @@ export namespace RuleUpdateParams {
2996
5315
  * Social media platform associated with the rule.
2997
5316
  */
2998
5317
  socialPlatform?:
2999
- | 'Twitch'
5318
+ | 'Custom'
5319
+ | 'Discord'
5320
+ | 'EpicGames'
5321
+ | 'Instagram'
5322
+ | 'Steam'
5323
+ | 'Telegram'
3000
5324
  | 'TikTok'
5325
+ | 'Twitch'
3001
5326
  | 'X(Twitter)'
3002
- | 'Instagram'
3003
- | 'EpicGames'
3004
5327
  | 'YouTube'
3005
- | 'Discord'
3006
- | 'Custom'
5328
+ | 'Google'
3007
5329
  | null;
3008
5330
 
3009
5331
  /**
@@ -3016,11 +5338,21 @@ export namespace RuleUpdateParams {
3016
5338
  */
3017
5339
  socialPlatformName?: string | null;
3018
5340
 
5341
+ /**
5342
+ * ID of the Steam app.
5343
+ */
5344
+ steamAppId?: string | null;
5345
+
3019
5346
  /**
3020
5347
  * Array of streak milestones and corresponding rewards.
3021
5348
  */
3022
5349
  streakArray?: Array<Metadata.StreakArray> | null;
3023
5350
 
5351
+ /**
5352
+ * Metadata for swap loyalty rules
5353
+ */
5354
+ swap?: Metadata.Swap;
5355
+
3024
5356
  /**
3025
5357
  * ID of the Telegram channel.
3026
5358
  */
@@ -3036,6 +5368,12 @@ export namespace RuleUpdateParams {
3036
5368
  */
3037
5369
  trackAllContracts?: boolean | null;
3038
5370
 
5371
+ /**
5372
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
5373
+ * completed once the progress is 100%.
5374
+ */
5375
+ trackProgress?: boolean | null;
5376
+
3039
5377
  /**
3040
5378
  * URL of the associated Twitter account.
3041
5379
  */
@@ -3079,7 +5417,17 @@ export namespace RuleUpdateParams {
3079
5417
  /**
3080
5418
  * Type of wallet associated with the rule.
3081
5419
  */
3082
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
5420
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | 'agw' | null;
5421
+
5422
+ /**
5423
+ * ID of the Youtube channel.
5424
+ */
5425
+ youtubeChannelId?: string | null;
5426
+
5427
+ /**
5428
+ * ID of the Youtube video.
5429
+ */
5430
+ youtubeVideoId?: string | null;
3083
5431
  }
3084
5432
 
3085
5433
  export namespace Metadata {
@@ -3098,35 +5446,52 @@ export namespace RuleUpdateParams {
3098
5446
  * Blockchain network of the collection.
3099
5447
  */
3100
5448
  network?:
3101
- | 'mainnet'
3102
- | 'polygon'
3103
- | 'polygon_mumbai'
3104
- | 'optimism'
5449
+ | 'abstract'
5450
+ | 'abstractTestnet'
5451
+ | 'apechain'
3105
5452
  | 'arbitrum'
3106
- | 'binance'
3107
- | 'bscTestnet'
3108
5453
  | 'avalanche'
3109
5454
  | 'avalancheFuji'
3110
- | 'zksync'
3111
- | 'fantom'
3112
- | 'fantomTestnet'
3113
5455
  | 'base'
3114
5456
  | 'baseSepolia'
3115
- | 'skaleNebula'
3116
- | 'xai'
5457
+ | 'berachain'
3117
5458
  | 'berachainArtio'
3118
- | 'solana'
3119
- | 'apechain'
3120
- | 'flowMainnet'
5459
+ | 'berachainBepolia'
5460
+ | 'binance'
5461
+ | 'bscTestnet'
3121
5462
  | 'campTestnet'
5463
+ | 'fantom'
5464
+ | 'fantomTestnet'
5465
+ | 'flowMainnet'
5466
+ | 'mainnet'
5467
+ | 'optimism'
5468
+ | 'polygon'
5469
+ | 'polygon_mumbai'
5470
+ | 'skaleNebula'
5471
+ | 'solana'
5472
+ | 'sophon'
5473
+ | 'sophonTestnet'
3122
5474
  | 'sui'
5475
+ | 'superseed'
5476
+ | 'superseedSepolia'
3123
5477
  | 'vanar'
5478
+ | 'xai'
5479
+ | 'zksync'
5480
+ | 'coti'
5481
+ | 'cotiTestnet'
5482
+ | 'morph'
5483
+ | 'morphTestnet'
5484
+ | 'morphHolesky'
5485
+ | 'ultra'
5486
+ | 'ultraTestnet'
5487
+ | 'nitrograph'
3124
5488
  | 'sepolia'
3125
5489
  | 'optimism_sepolia'
3126
5490
  | 'arbitrumSepolia'
3127
5491
  | 'goerli'
3128
5492
  | 'optimism_goerli'
3129
- | 'arbitrumGoerli';
5493
+ | 'arbitrumGoerli'
5494
+ | 'basecamp';
3130
5495
  }
3131
5496
 
3132
5497
  /**
@@ -3172,6 +5537,11 @@ export namespace RuleUpdateParams {
3172
5537
  * Array of emojis used in the channel.
3173
5538
  */
3174
5539
  emojis?: Array<Channel.Emoji>;
5540
+
5541
+ /**
5542
+ * Phrase of text to be present in the discord message
5543
+ */
5544
+ text?: string;
3175
5545
  }
3176
5546
 
3177
5547
  export namespace Channel {
@@ -3198,6 +5568,103 @@ export namespace RuleUpdateParams {
3198
5568
  id: string;
3199
5569
  }
3200
5570
 
5571
+ /**
5572
+ * Liquidity pool details.
5573
+ */
5574
+ export interface Liquidity {
5575
+ /**
5576
+ * Calculation type of the liquidity pool.
5577
+ */
5578
+ calculationType?: 'fixed' | 'custom';
5579
+
5580
+ /**
5581
+ * Custom function to calculate the the reward amount based on the liquidity
5582
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
5583
+ * USD.
5584
+ */
5585
+ customFunction?: string;
5586
+
5587
+ /**
5588
+ * Liquidity provided per day in USD
5589
+ */
5590
+ liquidityPerDay?: number;
5591
+
5592
+ /**
5593
+ * Blockchain network of the liquidity pool.
5594
+ */
5595
+ network?:
5596
+ | 'abstract'
5597
+ | 'abstractTestnet'
5598
+ | 'apechain'
5599
+ | 'arbitrum'
5600
+ | 'avalanche'
5601
+ | 'avalancheFuji'
5602
+ | 'base'
5603
+ | 'baseSepolia'
5604
+ | 'berachain'
5605
+ | 'berachainArtio'
5606
+ | 'berachainBepolia'
5607
+ | 'binance'
5608
+ | 'bscTestnet'
5609
+ | 'campTestnet'
5610
+ | 'fantom'
5611
+ | 'fantomTestnet'
5612
+ | 'flowMainnet'
5613
+ | 'mainnet'
5614
+ | 'optimism'
5615
+ | 'polygon'
5616
+ | 'polygon_mumbai'
5617
+ | 'skaleNebula'
5618
+ | 'solana'
5619
+ | 'sophon'
5620
+ | 'sophonTestnet'
5621
+ | 'sui'
5622
+ | 'superseed'
5623
+ | 'superseedSepolia'
5624
+ | 'vanar'
5625
+ | 'xai'
5626
+ | 'zksync'
5627
+ | 'coti'
5628
+ | 'cotiTestnet'
5629
+ | 'morph'
5630
+ | 'morphTestnet'
5631
+ | 'morphHolesky'
5632
+ | 'ultra'
5633
+ | 'ultraTestnet'
5634
+ | 'nitrograph'
5635
+ | 'sepolia'
5636
+ | 'optimism_sepolia'
5637
+ | 'arbitrumSepolia'
5638
+ | 'goerli'
5639
+ | 'optimism_goerli'
5640
+ | 'arbitrumGoerli'
5641
+ | 'basecamp';
5642
+
5643
+ /**
5644
+ * Indicates if only in-range liquidity is rewarded.
5645
+ */
5646
+ onlyRewardInRangeLiquidity?: boolean;
5647
+
5648
+ /**
5649
+ * Array of liquidity pools associated with the rule.
5650
+ */
5651
+ pools?: Array<Liquidity.Pool>;
5652
+
5653
+ /**
5654
+ * Protocol of the liquidity pool.
5655
+ */
5656
+ protocol?: string;
5657
+ }
5658
+
5659
+ export namespace Liquidity {
5660
+ export interface Pool {
5661
+ /**
5662
+ * Unique identifier of the liquidity pool.
5663
+ */
5664
+ id: string;
5665
+ }
5666
+ }
5667
+
3201
5668
  export interface Range {
3202
5669
  /**
3203
5670
  * Reward amount for this range.
@@ -3213,6 +5680,16 @@ export namespace RuleUpdateParams {
3213
5680
  * Start value of the range.
3214
5681
  */
3215
5682
  startRange: number;
5683
+
5684
+ /**
5685
+ * ID of the loyalty badge for this range.
5686
+ */
5687
+ loyaltyBadgeId?: string;
5688
+
5689
+ /**
5690
+ * Amount of the loyalty multiplier for this range.
5691
+ */
5692
+ loyaltyMultiplierAmount?: number;
3216
5693
  }
3217
5694
 
3218
5695
  /**
@@ -3265,20 +5742,15 @@ export namespace RuleUpdateParams {
3265
5742
  * Object containing details of the associated smart contract.
3266
5743
  */
3267
5744
  export interface SmartContract {
3268
- /**
3269
- * ABI of the smart contract.
3270
- */
3271
- abi?: string | null;
3272
-
3273
5745
  /**
3274
5746
  * Mapping of addresses for the smart contract.
3275
5747
  */
3276
5748
  addressMapping?: string | null;
3277
5749
 
3278
5750
  /**
3279
- * Array of bonus details applied to the rule.
5751
+ * Object containing details of the amount multiplier from the event.
3280
5752
  */
3281
- bonus?: Array<SmartContract.Bonus> | null;
5753
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3282
5754
 
3283
5755
  /**
3284
5756
  * ID of the smart contract.
@@ -3290,68 +5762,31 @@ export namespace RuleUpdateParams {
3290
5762
  */
3291
5763
  criteria?: 'everyEvent' | 'byParameter' | null;
3292
5764
 
3293
- /**
3294
- * Time range applied to the rule.
3295
- */
3296
- customRange?: SmartContract.CustomRange | null;
3297
-
3298
5765
  /**
3299
5766
  * Event emitted by the smart contract.
3300
5767
  */
3301
5768
  event?: string | null;
3302
5769
 
3303
- /**
3304
- * Maximum value allowed for the parameter.
3305
- */
3306
- max?: number | null;
3307
-
3308
5770
  /**
3309
5771
  * Array of parameters for the smart contract.
3310
5772
  */
3311
5773
  params?: Array<SmartContract.Param> | null;
3312
5774
 
3313
5775
  /**
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.
5776
+ * Type of the smart contract interaction.
3325
5777
  */
3326
- withMax?: boolean | null;
5778
+ type?: 'function' | 'event' | null;
3327
5779
  }
3328
5780
 
3329
5781
  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
5782
  /**
3343
- * Time range applied to the rule.
5783
+ * Object containing details of the amount multiplier from the event.
3344
5784
  */
3345
- export interface CustomRange {
3346
- /**
3347
- * End time of the custom range.
3348
- */
3349
- endsAt?: string | null;
3350
-
5785
+ export interface AmountMultiplier {
3351
5786
  /**
3352
- * Start time of the custom range.
5787
+ * Mapping of the value for the smart contract.
3353
5788
  */
3354
- startsAt?: string | null;
5789
+ valueMapping?: string | null;
3355
5790
  }
3356
5791
 
3357
5792
  export interface Param {
@@ -3395,61 +5830,78 @@ export namespace RuleUpdateParams {
3395
5830
  */
3396
5831
  streakMilestone: number;
3397
5832
  }
3398
- }
3399
5833
 
3400
- export interface Collection {
3401
5834
  /**
3402
- * Blockchain address of the collection
5835
+ * Metadata for swap loyalty rules
3403
5836
  */
3404
- address: string;
5837
+ export interface Swap {
5838
+ provider?: 'any' | 'relay' | 'lifi';
3405
5839
 
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';
5840
+ relayReferrerId?: string;
5841
+
5842
+ requireCrossChainSwap?: boolean;
5843
+
5844
+ swappedToChain?: 'any' | number | string;
5845
+
5846
+ swappedToTokens?: Array<Swap.SwappedToToken>;
5847
+
5848
+ tokenMode?: 'any' | 'specific';
5849
+
5850
+ trackTokenAmount?: boolean;
5851
+ }
5852
+
5853
+ export namespace Swap {
5854
+ export interface SwappedToToken {
5855
+ address: string;
5856
+
5857
+ chainId: string;
5858
+ }
5859
+ }
3439
5860
  }
3440
5861
  }
3441
5862
 
3442
5863
  export interface RuleListParams {
5864
+ /**
5865
+ * IDs of the users to filter results by
5866
+ */
5867
+ allotedToUserId?: string | Array<string>;
5868
+
5869
+ /**
5870
+ * ID of the user group to filter results by
5871
+ */
5872
+ allotedUserGroupId?: string;
5873
+
3443
5874
  /**
3444
5875
  * Address of the collection to filter by
3445
5876
  */
3446
5877
  collectionAddress?: string;
3447
5878
 
3448
5879
  /**
3449
- * Maximum number of records to return (max 1000)
5880
+ * If true this will only return loyalty rule chains
5881
+ */
5882
+ includeLoyaltyRuleChains?: 'true' | 'false';
5883
+
5884
+ /**
5885
+ * If true this will only return active rules, the rules for which the startTime is
5886
+ * in the past and the endTime is in the future
5887
+ */
5888
+ isActive?: 'true' | 'false';
5889
+
5890
+ /**
5891
+ * Maximum number of records to return (max 100)
3450
5892
  */
3451
5893
  limit?: number;
3452
5894
 
5895
+ /**
5896
+ * ID of the loyalty rule group to filter results
5897
+ */
5898
+ loyaltyRuleGroupId?: string;
5899
+
5900
+ /**
5901
+ * The IDs of the loyalty rule
5902
+ */
5903
+ loyaltyRuleId?: string | Array<string>;
5904
+
3453
5905
  /**
3454
5906
  * Unique identifier for the organization to filter by
3455
5907
  */
@@ -3466,11 +5918,39 @@ export interface RuleListParams {
3466
5918
  websiteId?: string;
3467
5919
  }
3468
5920
 
5921
+ export interface RuleDeleteParams {
5922
+ /**
5923
+ * Whether to debit loyalty points
5924
+ */
5925
+ debitLoyaltyPoints?: string;
5926
+ }
5927
+
3469
5928
  export interface RuleCompleteParams {
3470
5929
  /**
3471
- * Link to the comment made by user
5930
+ * Override amount for the reward (rounded to nearest whole number). This will
5931
+ * override the rule amount and reward the integer passed.
5932
+ */
5933
+ amount?: number | null;
5934
+
5935
+ /**
5936
+ * Link to the post/comment made by user
5937
+ */
5938
+ contentUrl?: string;
5939
+
5940
+ /**
5941
+ * Unique key to ensure idempotent requests.
5942
+ */
5943
+ idempotencyKey?: string;
5944
+
5945
+ /**
5946
+ * ID of the choice selected by the user
5947
+ */
5948
+ loyaltyQuestionChoiceId?: string;
5949
+
5950
+ /**
5951
+ * Value to compare with the range
3472
5952
  */
3473
- commentLink?: string;
5953
+ rangeValue?: number | null;
3474
5954
 
3475
5955
  /**
3476
5956
  * Unique identifier for the user
@@ -3482,18 +5962,26 @@ export interface RuleCompleteParams {
3482
5962
  */
3483
5963
  verificationCode?: string;
3484
5964
 
5965
+ /**
5966
+ * Flag indicating if only verification is required, this will not create a
5967
+ * transaction and reward the user.
5968
+ */
5969
+ verifyOnly?: string;
5970
+
3485
5971
  /**
3486
5972
  * Wallet address of the user can only be used if userId is not provided
3487
5973
  */
3488
5974
  walletAddress?: string;
3489
5975
  }
3490
5976
 
3491
- export interface RuleStatusParams {
3492
- organizationId: string;
3493
-
3494
- websiteId: string;
5977
+ export interface RuleGetStatusParams {
5978
+ organizationId?: string;
3495
5979
 
3496
5980
  userId?: string;
5981
+
5982
+ walletAddress?: string;
5983
+
5984
+ websiteId?: string;
3497
5985
  }
3498
5986
 
3499
5987
  export declare namespace Rules {
@@ -3503,11 +5991,12 @@ export declare namespace Rules {
3503
5991
  type RuleListResponse as RuleListResponse,
3504
5992
  type RuleDeleteResponse as RuleDeleteResponse,
3505
5993
  type RuleCompleteResponse as RuleCompleteResponse,
3506
- type RuleStatusResponse as RuleStatusResponse,
5994
+ type RuleGetStatusResponse as RuleGetStatusResponse,
3507
5995
  type RuleCreateParams as RuleCreateParams,
3508
5996
  type RuleUpdateParams as RuleUpdateParams,
3509
5997
  type RuleListParams as RuleListParams,
5998
+ type RuleDeleteParams as RuleDeleteParams,
3510
5999
  type RuleCompleteParams as RuleCompleteParams,
3511
- type RuleStatusParams as RuleStatusParams,
6000
+ type RuleGetStatusParams as RuleGetStatusParams,
3512
6001
  };
3513
6002
  }