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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/CHANGELOG.md +970 -0
  2. package/README.md +24 -28
  3. package/_shims/index.d.ts +2 -0
  4. package/_shims/index.js +5 -1
  5. package/_shims/index.mjs +5 -1
  6. package/core.d.ts +19 -5
  7. package/core.d.ts.map +1 -1
  8. package/core.js +35 -19
  9. package/core.js.map +1 -1
  10. package/core.mjs +36 -20
  11. package/core.mjs.map +1 -1
  12. package/index.d.mts +25 -16
  13. package/index.d.ts +25 -16
  14. package/index.d.ts.map +1 -1
  15. package/index.js +20 -10
  16. package/index.js.map +1 -1
  17. package/index.mjs +21 -11
  18. package/index.mjs.map +1 -1
  19. package/package.json +4 -5
  20. package/resource.d.ts +1 -1
  21. package/resource.d.ts.map +1 -1
  22. package/resource.js.map +1 -1
  23. package/resource.mjs.map +1 -1
  24. package/resources/assets.d.ts +22 -8
  25. package/resources/assets.d.ts.map +1 -1
  26. package/resources/assets.js +12 -4
  27. package/resources/assets.js.map +1 -1
  28. package/resources/assets.mjs +12 -4
  29. package/resources/assets.mjs.map +1 -1
  30. package/resources/auctions/auctions.d.ts +285 -0
  31. package/resources/auctions/auctions.d.ts.map +1 -0
  32. package/resources/auctions/auctions.js +76 -0
  33. package/resources/auctions/auctions.js.map +1 -0
  34. package/resources/auctions/auctions.mjs +49 -0
  35. package/resources/auctions/auctions.mjs.map +1 -0
  36. package/resources/auctions/index.d.ts +3 -0
  37. package/resources/auctions/index.d.ts.map +1 -0
  38. package/resources/auctions/index.js +9 -0
  39. package/resources/auctions/index.js.map +1 -0
  40. package/resources/auctions/index.mjs +4 -0
  41. package/resources/auctions/index.mjs.map +1 -0
  42. package/resources/auctions/website-user-attributes/index.d.ts +3 -0
  43. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
  44. package/resources/auctions/website-user-attributes/index.js +9 -0
  45. package/resources/auctions/website-user-attributes/index.js.map +1 -0
  46. package/resources/auctions/website-user-attributes/index.mjs +4 -0
  47. package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
  48. package/resources/auctions/website-user-attributes/values.d.ts +122 -0
  49. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  50. package/resources/auctions/website-user-attributes/values.js +49 -0
  51. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  52. package/resources/auctions/website-user-attributes/values.mjs +45 -0
  53. package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
  54. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +132 -0
  55. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
  56. package/resources/auctions/website-user-attributes/website-user-attributes.js +76 -0
  57. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
  58. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +49 -0
  59. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
  60. package/resources/auctions/website-user-attributes.d.ts +2 -0
  61. package/resources/auctions/website-user-attributes.d.ts.map +1 -0
  62. package/resources/auctions/website-user-attributes.js +19 -0
  63. package/resources/auctions/website-user-attributes.js.map +1 -0
  64. package/resources/auctions/website-user-attributes.mjs +3 -0
  65. package/resources/auctions/website-user-attributes.mjs.map +1 -0
  66. package/resources/auctions.d.ts +2 -0
  67. package/resources/auctions.d.ts.map +1 -0
  68. package/resources/auctions.js +19 -0
  69. package/resources/auctions.js.map +1 -0
  70. package/resources/auctions.mjs +3 -0
  71. package/resources/auctions.mjs.map +1 -0
  72. package/resources/auth.d.ts +44 -0
  73. package/resources/auth.d.ts.map +1 -0
  74. package/resources/auth.js +16 -0
  75. package/resources/auth.js.map +1 -0
  76. package/resources/auth.mjs +12 -0
  77. package/resources/auth.mjs.map +1 -0
  78. package/resources/index.d.ts +7 -5
  79. package/resources/index.d.ts.map +1 -1
  80. package/resources/index.js +10 -6
  81. package/resources/index.js.map +1 -1
  82. package/resources/index.mjs +6 -4
  83. package/resources/index.mjs.map +1 -1
  84. package/resources/loyalty/account-streaks.d.ts +81 -0
  85. package/resources/loyalty/account-streaks.d.ts.map +1 -0
  86. package/resources/loyalty/account-streaks.js +24 -0
  87. package/resources/loyalty/account-streaks.js.map +1 -0
  88. package/resources/loyalty/account-streaks.mjs +20 -0
  89. package/resources/loyalty/account-streaks.mjs.map +1 -0
  90. package/resources/loyalty/accounts.d.ts +62 -15
  91. package/resources/loyalty/accounts.d.ts.map +1 -1
  92. package/resources/loyalty/accounts.js +22 -1
  93. package/resources/loyalty/accounts.js.map +1 -1
  94. package/resources/loyalty/accounts.mjs +22 -1
  95. package/resources/loyalty/accounts.mjs.map +1 -1
  96. package/resources/loyalty/badges.d.ts +876 -77
  97. package/resources/loyalty/badges.d.ts.map +1 -1
  98. package/resources/loyalty/badges.js +19 -1
  99. package/resources/loyalty/badges.js.map +1 -1
  100. package/resources/loyalty/badges.mjs +19 -1
  101. package/resources/loyalty/badges.mjs.map +1 -1
  102. package/resources/loyalty/currencies.d.ts +20 -1
  103. package/resources/loyalty/currencies.d.ts.map +1 -1
  104. package/resources/loyalty/currencies.js +19 -0
  105. package/resources/loyalty/currencies.js.map +1 -1
  106. package/resources/loyalty/currencies.mjs +19 -0
  107. package/resources/loyalty/currencies.mjs.map +1 -1
  108. package/resources/loyalty/index.d.ts +9 -5
  109. package/resources/loyalty/index.d.ts.map +1 -1
  110. package/resources/loyalty/index.js +11 -3
  111. package/resources/loyalty/index.js.map +1 -1
  112. package/resources/loyalty/index.mjs +6 -2
  113. package/resources/loyalty/index.mjs.map +1 -1
  114. package/resources/loyalty/loyalty.d.ts +33 -17
  115. package/resources/loyalty/loyalty.d.ts.map +1 -1
  116. package/resources/loyalty/loyalty.js +28 -12
  117. package/resources/loyalty/loyalty.js.map +1 -1
  118. package/resources/loyalty/loyalty.mjs +29 -13
  119. package/resources/loyalty/loyalty.mjs.map +1 -1
  120. package/resources/loyalty/multipliers.d.ts +97 -4
  121. package/resources/loyalty/multipliers.d.ts.map +1 -1
  122. package/resources/loyalty/multipliers.js +29 -0
  123. package/resources/loyalty/multipliers.js.map +1 -1
  124. package/resources/loyalty/multipliers.mjs +29 -0
  125. package/resources/loyalty/multipliers.mjs.map +1 -1
  126. package/resources/loyalty/questions-responses.d.ts +112 -0
  127. package/resources/loyalty/questions-responses.d.ts.map +1 -0
  128. package/resources/loyalty/questions-responses.js +31 -0
  129. package/resources/loyalty/questions-responses.js.map +1 -0
  130. package/resources/loyalty/questions-responses.mjs +27 -0
  131. package/resources/loyalty/questions-responses.mjs.map +1 -0
  132. package/resources/loyalty/questions.d.ts +183 -0
  133. package/resources/loyalty/questions.d.ts.map +1 -0
  134. package/resources/loyalty/questions.js +60 -0
  135. package/resources/loyalty/questions.js.map +1 -0
  136. package/resources/loyalty/questions.mjs +56 -0
  137. package/resources/loyalty/questions.mjs.map +1 -0
  138. package/resources/loyalty/rule-edits.d.ts +2489 -11
  139. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  140. package/resources/loyalty/rule-edits.js +16 -2
  141. package/resources/loyalty/rule-edits.js.map +1 -1
  142. package/resources/loyalty/rule-edits.mjs +16 -2
  143. package/resources/loyalty/rule-edits.mjs.map +1 -1
  144. package/resources/loyalty/rule-groups.d.ts +738 -0
  145. package/resources/loyalty/rule-groups.d.ts.map +1 -0
  146. package/resources/loyalty/rule-groups.js +52 -0
  147. package/resources/loyalty/rule-groups.js.map +1 -0
  148. package/resources/loyalty/rule-groups.mjs +48 -0
  149. package/resources/loyalty/rule-groups.mjs.map +1 -0
  150. package/resources/loyalty/rules.d.ts +1717 -280
  151. package/resources/loyalty/rules.d.ts.map +1 -1
  152. package/resources/loyalty/rules.js +40 -9
  153. package/resources/loyalty/rules.js.map +1 -1
  154. package/resources/loyalty/rules.mjs +40 -9
  155. package/resources/loyalty/rules.mjs.map +1 -1
  156. package/resources/loyalty/transactions/index.d.ts +3 -0
  157. package/resources/loyalty/transactions/index.d.ts.map +1 -0
  158. package/resources/loyalty/transactions/index.js +9 -0
  159. package/resources/loyalty/transactions/index.js.map +1 -0
  160. package/resources/loyalty/transactions/index.mjs +4 -0
  161. package/resources/loyalty/transactions/index.mjs.map +1 -0
  162. package/resources/loyalty/transactions/rule-statuses.d.ts +120 -0
  163. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  164. package/resources/loyalty/transactions/rule-statuses.js +30 -0
  165. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  166. package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
  167. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  168. package/resources/loyalty/transactions/transactions.d.ts +410 -0
  169. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  170. package/resources/loyalty/transactions/transactions.js +76 -0
  171. package/resources/loyalty/transactions/transactions.js.map +1 -0
  172. package/resources/loyalty/transactions/transactions.mjs +49 -0
  173. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  174. package/resources/loyalty/transactions.d.ts +2 -0
  175. package/resources/loyalty/transactions.d.ts.map +1 -0
  176. package/resources/loyalty/transactions.js +19 -0
  177. package/resources/loyalty/transactions.js.map +1 -0
  178. package/resources/loyalty/transactions.mjs +3 -0
  179. package/resources/loyalty/transactions.mjs.map +1 -0
  180. package/resources/loyalty.d.ts +2 -0
  181. package/resources/loyalty.d.ts.map +1 -0
  182. package/resources/loyalty.js +19 -0
  183. package/resources/loyalty.js.map +1 -0
  184. package/resources/loyalty.mjs +3 -0
  185. package/resources/loyalty.mjs.map +1 -0
  186. package/resources/minting.d.ts +95 -0
  187. package/resources/minting.d.ts.map +1 -0
  188. package/resources/minting.js +15 -0
  189. package/resources/minting.js.map +1 -0
  190. package/resources/minting.mjs +11 -0
  191. package/resources/minting.mjs.map +1 -0
  192. package/resources/referral/index.d.ts +3 -0
  193. package/resources/referral/index.d.ts.map +1 -0
  194. package/resources/referral/index.js +9 -0
  195. package/resources/referral/index.js.map +1 -0
  196. package/resources/referral/index.mjs +4 -0
  197. package/resources/referral/index.mjs.map +1 -0
  198. package/resources/referral/referral.d.ts +39 -0
  199. package/resources/referral/referral.d.ts.map +1 -0
  200. package/resources/{drip/drip.js → referral/referral.js} +21 -12
  201. package/resources/referral/referral.js.map +1 -0
  202. package/resources/referral/referral.mjs +25 -0
  203. package/resources/referral/referral.mjs.map +1 -0
  204. package/resources/referral/users.d.ts +83 -0
  205. package/resources/referral/users.d.ts.map +1 -0
  206. package/resources/referral/users.js +35 -0
  207. package/resources/referral/users.js.map +1 -0
  208. package/resources/referral/users.mjs +31 -0
  209. package/resources/referral/users.mjs.map +1 -0
  210. package/resources/referral.d.ts +2 -0
  211. package/resources/referral.d.ts.map +1 -0
  212. package/resources/referral.js +19 -0
  213. package/resources/referral.js.map +1 -0
  214. package/resources/referral.mjs +3 -0
  215. package/resources/referral.mjs.map +1 -0
  216. package/resources/users/index.d.ts +2 -3
  217. package/resources/users/index.d.ts.map +1 -1
  218. package/resources/users/index.js +1 -3
  219. package/resources/users/index.js.map +1 -1
  220. package/resources/users/index.mjs +2 -3
  221. package/resources/users/index.mjs.map +1 -1
  222. package/resources/users/metadatas.d.ts +109 -9
  223. package/resources/users/metadatas.d.ts.map +1 -1
  224. package/resources/users/metadatas.js +6 -0
  225. package/resources/users/metadatas.js.map +1 -1
  226. package/resources/users/metadatas.mjs +6 -0
  227. package/resources/users/metadatas.mjs.map +1 -1
  228. package/resources/users/users.d.ts +414 -6
  229. package/resources/users/users.d.ts.map +1 -1
  230. package/resources/users/users.js +77 -4
  231. package/resources/users/users.js.map +1 -1
  232. package/resources/users/users.mjs +78 -5
  233. package/resources/users/users.mjs.map +1 -1
  234. package/resources/users.d.ts +2 -0
  235. package/resources/users.d.ts.map +1 -0
  236. package/resources/users.js +19 -0
  237. package/resources/users.js.map +1 -0
  238. package/resources/users.mjs +3 -0
  239. package/resources/users.mjs.map +1 -0
  240. package/resources/websites/index.d.ts +4 -0
  241. package/resources/websites/index.d.ts.map +1 -0
  242. package/resources/websites/index.js +11 -0
  243. package/resources/websites/index.js.map +1 -0
  244. package/resources/websites/index.mjs +5 -0
  245. package/resources/websites/index.mjs.map +1 -0
  246. package/resources/websites/website-collections.d.ts +94 -0
  247. package/resources/websites/website-collections.d.ts.map +1 -0
  248. package/resources/websites/website-collections.js +46 -0
  249. package/resources/websites/website-collections.js.map +1 -0
  250. package/resources/websites/website-collections.mjs +42 -0
  251. package/resources/websites/website-collections.mjs.map +1 -0
  252. package/resources/websites/website-user-roles.d.ts +96 -0
  253. package/resources/websites/website-user-roles.d.ts.map +1 -0
  254. package/resources/websites/website-user-roles.js +45 -0
  255. package/resources/websites/website-user-roles.js.map +1 -0
  256. package/resources/websites/website-user-roles.mjs +41 -0
  257. package/resources/websites/website-user-roles.mjs.map +1 -0
  258. package/resources/websites/websites.d.ts +223 -0
  259. package/resources/websites/websites.d.ts.map +1 -0
  260. package/resources/websites/websites.js +63 -0
  261. package/resources/websites/websites.js.map +1 -0
  262. package/resources/websites/websites.mjs +36 -0
  263. package/resources/websites/websites.mjs.map +1 -0
  264. package/resources/websites.d.ts +1 -202
  265. package/resources/websites.d.ts.map +1 -1
  266. package/resources/websites.js +15 -18
  267. package/resources/websites.js.map +1 -1
  268. package/resources/websites.mjs +1 -16
  269. package/resources/websites.mjs.map +1 -1
  270. package/resources.d.ts +2 -0
  271. package/resources.d.ts.map +1 -0
  272. package/resources.js +18 -0
  273. package/resources.js.map +1 -0
  274. package/resources.mjs +2 -0
  275. package/resources.mjs.map +1 -0
  276. package/src/_shims/index.d.ts +2 -0
  277. package/src/_shims/index.js +5 -1
  278. package/src/_shims/index.mjs +5 -1
  279. package/src/core.ts +56 -20
  280. package/src/index.ts +96 -24
  281. package/src/resource.ts +1 -1
  282. package/src/resources/assets.ts +29 -8
  283. package/src/resources/auctions/auctions.ts +436 -0
  284. package/src/resources/auctions/index.ts +18 -0
  285. package/src/resources/auctions/website-user-attributes/index.ts +18 -0
  286. package/src/resources/auctions/website-user-attributes/values.ts +165 -0
  287. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +207 -0
  288. package/src/resources/auctions/website-user-attributes.ts +3 -0
  289. package/src/resources/auctions.ts +3 -0
  290. package/src/resources/auth.ts +74 -0
  291. package/src/resources/index.ts +31 -5
  292. package/src/resources/loyalty/account-streaks.ts +110 -0
  293. package/src/resources/loyalty/accounts.ts +79 -16
  294. package/src/resources/loyalty/badges.ts +1055 -83
  295. package/src/resources/loyalty/currencies.ts +20 -1
  296. package/src/resources/loyalty/index.ts +53 -9
  297. package/src/resources/loyalty/loyalty.ts +160 -60
  298. package/src/resources/loyalty/multipliers.ts +124 -4
  299. package/src/resources/loyalty/questions-responses.ts +161 -0
  300. package/src/resources/loyalty/questions.ts +241 -0
  301. package/src/resources/loyalty/rule-edits.ts +3486 -63
  302. package/src/resources/loyalty/rule-groups.ts +1145 -0
  303. package/src/resources/loyalty/rules.ts +2854 -579
  304. package/src/resources/loyalty/transactions/index.ts +18 -0
  305. package/src/resources/loyalty/transactions/rule-statuses.ts +178 -0
  306. package/src/resources/loyalty/transactions/transactions.ts +671 -0
  307. package/src/resources/loyalty/transactions.ts +3 -0
  308. package/src/resources/loyalty.ts +3 -0
  309. package/src/resources/minting.ts +168 -0
  310. package/src/resources/referral/index.ts +10 -0
  311. package/src/resources/referral/referral.ts +72 -0
  312. package/src/resources/referral/users.ts +122 -0
  313. package/src/resources/referral.ts +3 -0
  314. package/src/resources/users/index.ts +21 -9
  315. package/src/resources/users/metadatas.ts +161 -8
  316. package/src/resources/users/users.ts +581 -17
  317. package/src/resources/users.ts +3 -0
  318. package/src/resources/websites/index.ts +22 -0
  319. package/src/resources/websites/website-collections.ts +180 -0
  320. package/src/resources/websites/website-user-roles.ts +130 -0
  321. package/src/resources/websites/websites.ts +311 -0
  322. package/src/resources/websites.ts +1 -257
  323. package/src/resources.ts +1 -0
  324. package/src/version.ts +1 -1
  325. package/version.d.ts +1 -1
  326. package/version.d.ts.map +1 -1
  327. package/version.js +1 -1
  328. package/version.js.map +1 -1
  329. package/version.mjs +1 -1
  330. package/version.mjs.map +1 -1
  331. package/resources/auction-bids.d.ts +0 -81
  332. package/resources/auction-bids.d.ts.map +0 -1
  333. package/resources/auction-bids.js +0 -30
  334. package/resources/auction-bids.js.map +0 -1
  335. package/resources/auction-bids.mjs +0 -26
  336. package/resources/auction-bids.mjs.map +0 -1
  337. package/resources/drip/drip.d.ts +0 -14
  338. package/resources/drip/drip.d.ts.map +0 -1
  339. package/resources/drip/drip.js.map +0 -1
  340. package/resources/drip/drip.mjs +0 -16
  341. package/resources/drip/drip.mjs.map +0 -1
  342. package/resources/drip/index.d.ts +0 -4
  343. package/resources/drip/index.d.ts.map +0 -1
  344. package/resources/drip/index.js +0 -11
  345. package/resources/drip/index.js.map +0 -1
  346. package/resources/drip/index.mjs +0 -5
  347. package/resources/drip/index.mjs.map +0 -1
  348. package/resources/drip/quests.d.ts +0 -168
  349. package/resources/drip/quests.d.ts.map +0 -1
  350. package/resources/drip/quests.js +0 -17
  351. package/resources/drip/quests.js.map +0 -1
  352. package/resources/drip/quests.mjs +0 -13
  353. package/resources/drip/quests.mjs.map +0 -1
  354. package/resources/drip/status.d.ts +0 -26
  355. package/resources/drip/status.d.ts.map +0 -1
  356. package/resources/drip/status.js +0 -16
  357. package/resources/drip/status.js.map +0 -1
  358. package/resources/drip/status.mjs +0 -12
  359. package/resources/drip/status.mjs.map +0 -1
  360. package/resources/loyalty/transaction-entries.d.ts +0 -175
  361. package/resources/loyalty/transaction-entries.d.ts.map +0 -1
  362. package/resources/loyalty/transaction-entries.js +0 -16
  363. package/resources/loyalty/transaction-entries.js.map +0 -1
  364. package/resources/loyalty/transaction-entries.mjs +0 -12
  365. package/resources/loyalty/transaction-entries.mjs.map +0 -1
  366. package/resources/users/wallets.d.ts +0 -193
  367. package/resources/users/wallets.d.ts.map +0 -1
  368. package/resources/users/wallets.js +0 -28
  369. package/resources/users/wallets.js.map +0 -1
  370. package/resources/users/wallets.mjs +0 -24
  371. package/resources/users/wallets.mjs.map +0 -1
  372. package/src/resources/auction-bids.ts +0 -123
  373. package/src/resources/drip/drip.ts +0 -25
  374. package/src/resources/drip/index.ts +0 -5
  375. package/src/resources/drip/quests.ts +0 -210
  376. package/src/resources/drip/status.ts +0 -33
  377. package/src/resources/loyalty/transaction-entries.ts +0 -229
  378. package/src/resources/users/wallets.ts +0 -271
@@ -7,6 +7,24 @@ import * as Core from '../../core';
7
7
  export class Rules extends APIResource {
8
8
  /**
9
9
  * Create a new Loyalty Rule
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const rule = await client.loyalty.rules.create({
14
+ * amount: '10.5',
15
+ * effectiveEndTime: '2024-12-31T23:59:00Z',
16
+ * effectiveStartTime: '2024-01-01T00:00:00Z',
17
+ * endTime: '2024-12-31T23:59:00Z',
18
+ * frequency: 'daily',
19
+ * loyaltyCurrencyId: '456e1234-e89b-12d3-a456-426614174003',
20
+ * metadata: {},
21
+ * name: 'Referral Bonus Rule',
22
+ * organizationId: '123e4567-e89b-12d3-a456-426614174001',
23
+ * startTime: '2024-01-01T00:00:00Z',
24
+ * type: 'Bonus',
25
+ * websiteId: '123e4567-e89b-12d3-a456-426614174002',
26
+ * });
27
+ * ```
10
28
  */
11
29
  create(body: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse> {
12
30
  return this._client.post('/api/loyalty/rules', { body, ...options });
@@ -14,6 +32,18 @@ export class Rules extends APIResource {
14
32
 
15
33
  /**
16
34
  * Update an existing Loyalty Rule
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const rule = await client.loyalty.rules.update(
39
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
40
+ * {
41
+ * amount: '10.5',
42
+ * endTime: '2024-12-31T23:59:00Z',
43
+ * name: 'Daily Rewards Program',
44
+ * },
45
+ * );
46
+ * ```
17
47
  */
18
48
  update(
19
49
  id: string,
@@ -25,6 +55,11 @@ export class Rules extends APIResource {
25
55
 
26
56
  /**
27
57
  * Retrieve configured loyalty rules with optional pagination and filters
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const rules = await client.loyalty.rules.list();
62
+ * ```
28
63
  */
29
64
  list(query?: RuleListParams, options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
30
65
  list(options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
@@ -40,17 +75,46 @@ export class Rules extends APIResource {
40
75
 
41
76
  /**
42
77
  * Delete an existing Loyalty Rule
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * const rule = await client.loyalty.rules.delete(
82
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
83
+ * );
84
+ * ```
43
85
  */
44
- delete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse> {
45
- return this._client.delete(`/api/loyalty/rules/${id}`, options);
86
+ delete(
87
+ id: string,
88
+ params?: RuleDeleteParams,
89
+ options?: Core.RequestOptions,
90
+ ): Core.APIPromise<RuleDeleteResponse>;
91
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse>;
92
+ delete(
93
+ id: string,
94
+ params: RuleDeleteParams | Core.RequestOptions = {},
95
+ options?: Core.RequestOptions,
96
+ ): Core.APIPromise<RuleDeleteResponse> {
97
+ if (isRequestOptions(params)) {
98
+ return this.delete(id, {}, params);
99
+ }
100
+ const { debitLoyaltyPoints } = params;
101
+ return this._client.delete(`/api/loyalty/rules/${id}`, { query: { debitLoyaltyPoints }, ...options });
46
102
  }
47
103
 
48
104
  /**
49
105
  * Verify a loyalty rule based on user action and reward them if applicable. This
50
- * endpoint currenlty onlu supports following rule types code_entry, text_input,
106
+ * endpoint currently only supports following rule types code_entry, text_input,
51
107
  * link_click, discord_member, connect_wallet, check_in, external_rule,
52
108
  * drip_x_follow, drip_x_new_tweet, drip_x_text_in_bio, drip_x_text_in_name,
53
- * drip_x_text_in_comment, drip_x_tweet, telegram_join
109
+ * drip_x_text_in_comment, drip_x_tweet, telegram_join, DiscordMessages,
110
+ * youtube_subscribers, youtube_comment, steam_wishlist
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * const response = await client.loyalty.rules.complete(
115
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
116
+ * );
117
+ * ```
54
118
  */
55
119
  complete(
56
120
  id: string,
@@ -71,8 +135,24 @@ export class Rules extends APIResource {
71
135
 
72
136
  /**
73
137
  * This will return the processing status of quests for a specific user
138
+ *
139
+ * @example
140
+ * ```ts
141
+ * const response = await client.loyalty.rules.getStatus();
142
+ * ```
74
143
  */
75
- status(query: RuleStatusParams, options?: Core.RequestOptions): Core.APIPromise<RuleStatusResponse> {
144
+ getStatus(
145
+ query?: RuleGetStatusParams,
146
+ options?: Core.RequestOptions,
147
+ ): Core.APIPromise<RuleGetStatusResponse>;
148
+ getStatus(options?: Core.RequestOptions): Core.APIPromise<RuleGetStatusResponse>;
149
+ getStatus(
150
+ query: RuleGetStatusParams | Core.RequestOptions = {},
151
+ options?: Core.RequestOptions,
152
+ ): Core.APIPromise<RuleGetStatusResponse> {
153
+ if (isRequestOptions(query)) {
154
+ return this.getStatus({}, query);
155
+ }
76
156
  return this._client.get('/api/loyalty/rules/status', { query, ...options });
77
157
  }
78
158
  }
@@ -184,7 +264,18 @@ export interface RuleCreateResponse {
184
264
  | 'twitter_follow'
185
265
  | 'twitter_followers'
186
266
  | 'twitter_like'
187
- | 'twitter_post_hashtag';
267
+ | 'twitter_post_hashtag'
268
+ | 'quiz'
269
+ | 'poll'
270
+ | 'steam_wishlist'
271
+ | 'liquidity_uniswap_v2'
272
+ | 'liquidity_uniswap_v3'
273
+ | 'points_airdrop'
274
+ | 'youtube_subscribers'
275
+ | 'youtube_comment'
276
+ | 'shopify_spend'
277
+ | 'swap'
278
+ | 'tiktok_post';
188
279
 
189
280
  /**
190
281
  * Unique identifier for the associated website
@@ -221,6 +312,11 @@ export interface RuleCreateResponse {
221
312
  */
222
313
  description?: string;
223
314
 
315
+ /**
316
+ * ID of the external integration
317
+ */
318
+ externalIntegrationId?: string | null;
319
+
224
320
  /**
225
321
  * Whether to hide this rule in the user interface
226
322
  */
@@ -229,51 +325,93 @@ export interface RuleCreateResponse {
229
325
  /**
230
326
  * Interval between rule executions
231
327
  */
232
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
328
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
233
329
 
234
330
  /**
235
331
  * Whether this rule is mandatory
236
332
  */
237
333
  isRequired?: boolean;
238
334
 
335
+ /**
336
+ * Unique identifier for the loyalty badge
337
+ */
338
+ loyaltyBadgeId?: string | null;
339
+
239
340
  /**
240
341
  * Unique identifier for the loyalty rule group
241
342
  */
242
343
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
243
344
 
345
+ /**
346
+ * URL for uploading loyalty user allotment via CSV
347
+ */
348
+ loyaltyUserAllotmentCsvUrl?: string;
349
+
350
+ /**
351
+ * The interval for the max amount. Available for the smart contract and external
352
+ * rules.
353
+ */
354
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
355
+
356
+ /**
357
+ * The maximum amount of points a user can earn per interval. Available for the
358
+ * smart contract and external rules.
359
+ */
360
+ maxAmountPerInterval?: number | null;
361
+
362
+ /**
363
+ * URL of the media to be displayed
364
+ */
365
+ mediaUrl?: string | null;
366
+
244
367
  /**
245
368
  * Blockchain network where the rule will apply
246
369
  */
247
370
  network?:
248
- | 'mainnet'
249
- | 'polygon'
250
- | 'polygon_mumbai'
251
- | 'optimism'
371
+ | 'abstract'
372
+ | 'abstractTestnet'
373
+ | 'apechain'
252
374
  | 'arbitrum'
253
- | 'binance'
254
- | 'bscTestnet'
255
375
  | 'avalanche'
256
376
  | 'avalancheFuji'
257
- | 'zksync'
258
- | 'fantom'
259
- | 'fantomTestnet'
260
377
  | 'base'
261
378
  | 'baseSepolia'
262
- | 'skaleNebula'
263
- | 'xai'
379
+ | 'berachain'
264
380
  | 'berachainArtio'
265
- | 'solana'
266
- | 'apechain'
267
- | 'flowMainnet'
381
+ | 'berachainBepolia'
382
+ | 'binance'
383
+ | 'bscTestnet'
268
384
  | 'campTestnet'
385
+ | 'fantom'
386
+ | 'fantomTestnet'
387
+ | 'flowMainnet'
388
+ | 'mainnet'
389
+ | 'optimism'
390
+ | 'polygon'
391
+ | 'polygon_mumbai'
392
+ | 'skaleNebula'
393
+ | 'solana'
394
+ | 'sophon'
395
+ | 'sophonTestnet'
269
396
  | 'sui'
397
+ | 'superseed'
398
+ | 'superseedSepolia'
270
399
  | 'vanar'
400
+ | 'xai'
401
+ | 'zksync'
402
+ | 'coti'
403
+ | 'cotiTestnet'
404
+ | 'morph'
405
+ | 'morphTestnet'
406
+ | 'morphHolesky'
407
+ | 'nitrograph'
271
408
  | 'sepolia'
272
409
  | 'optimism_sepolia'
273
410
  | 'arbitrumSepolia'
274
411
  | 'goerli'
275
412
  | 'optimism_goerli'
276
- | 'arbitrumGoerli';
413
+ | 'arbitrumGoerli'
414
+ | 'basecamp';
277
415
 
278
416
  /**
279
417
  * OAuth credentials associated with the rule
@@ -283,12 +421,17 @@ export interface RuleCreateResponse {
283
421
  /**
284
422
  * Type of reward issued by the rule
285
423
  */
286
- rewardType?: 'points' | 'multiplier';
424
+ rewardType?: 'points' | 'multiplier' | 'badge';
425
+
426
+ /**
427
+ * URL of the Shopify store
428
+ */
429
+ shopifyStoreUrl?: string | null;
287
430
 
288
431
  /**
289
- * Identifier for associated subscriptions
432
+ * Optional subscription id for the rule
290
433
  */
291
- subscriptionIdentifier?: string | null;
434
+ subscriptionId?: string | null;
292
435
  }
293
436
 
294
437
  export namespace RuleCreateResponse {
@@ -296,6 +439,11 @@ export namespace RuleCreateResponse {
296
439
  * Additional metadata for the loyalty rule
297
440
  */
298
441
  export interface Metadata {
442
+ /**
443
+ * Number of tokens per batch.
444
+ */
445
+ batchSize?: number | null;
446
+
299
447
  /**
300
448
  * Text displayed on the action button.
301
449
  */
@@ -326,6 +474,11 @@ export namespace RuleCreateResponse {
326
474
  */
327
475
  collection?: Array<Metadata.Collection>;
328
476
 
477
+ /**
478
+ * Conditions for completing the profile.
479
+ */
480
+ completeProfileConditions?: { [key: string]: boolean } | null;
481
+
329
482
  /**
330
483
  * Object containing details for the call-to-action.
331
484
  */
@@ -361,11 +514,21 @@ export namespace RuleCreateResponse {
361
514
  */
362
515
  enableVerifiedMultiplier?: boolean;
363
516
 
517
+ /**
518
+ * Fill source of the order for the token sale
519
+ */
520
+ fillSource?: string;
521
+
364
522
  /**
365
523
  * Percentage reward given to a user for their first referral.
366
524
  */
367
525
  firstReferralReward?: number | null;
368
526
 
527
+ /**
528
+ * Flag indicating whether the fill source is included.
529
+ */
530
+ hasFillSource?: boolean;
531
+
369
532
  /**
370
533
  * Indicates if the item has never been sold.
371
534
  */
@@ -391,11 +554,21 @@ export namespace RuleCreateResponse {
391
554
  */
392
555
  imageUrl?: string | null;
393
556
 
557
+ /**
558
+ * If enabled, the first transaction done on the platform will complete this rule
559
+ */
560
+ isCheckInOnEveryTxn?: boolean;
561
+
394
562
  /**
395
563
  * Indicates if the multiplier has been applied to rewards.
396
564
  */
397
565
  isMultiplierApplied?: boolean;
398
566
 
567
+ /**
568
+ * Flag indicating if the rule is restricted to new users.
569
+ */
570
+ isRestrictedToNewUsers?: boolean;
571
+
399
572
  /**
400
573
  * Flag indicating if rewards are applied retroactively.
401
574
  */
@@ -411,6 +584,11 @@ export namespace RuleCreateResponse {
411
584
  */
412
585
  link?: string | null;
413
586
 
587
+ /**
588
+ * Liquidity pool details.
589
+ */
590
+ liquidity?: Metadata.Liquidity;
591
+
414
592
  /**
415
593
  * Maximum quantity constraint for token holding.
416
594
  */
@@ -441,11 +619,36 @@ export namespace RuleCreateResponse {
441
619
  */
442
620
  onlyNonListed?: boolean;
443
621
 
622
+ /**
623
+ * Indicates if only existing users are rewarded.
624
+ */
625
+ onlyRewardExistingUser?: boolean;
626
+
627
+ /**
628
+ * give points for only one token ownership per contract
629
+ */
630
+ onlyRewardSingleTokenOwnership?: boolean | null;
631
+
444
632
  /**
445
633
  * Promotional code associated with the rule.
446
634
  */
447
635
  promoCode?: string;
448
636
 
637
+ /**
638
+ * URL of the CSV file containing promo codes.
639
+ */
640
+ promoCodeCsvUrl?: string;
641
+
642
+ /**
643
+ * Numbers of the promotional code to be generated.
644
+ */
645
+ promoCodeLength?: number | null;
646
+
647
+ /**
648
+ * Type of the promotional code.
649
+ */
650
+ promoCodeType?: 'code' | 'csv' | 'generate';
651
+
449
652
  /**
450
653
  * Array defining ranges and corresponding rewards.
451
654
  */
@@ -461,11 +664,32 @@ export namespace RuleCreateResponse {
461
664
  */
462
665
  referrerReward?: number | null;
463
666
 
667
+ /**
668
+ * Loyalty currency ID of the referrer reward.
669
+ */
670
+ referrerRewardLoyaltyCurrencyId?: string | null;
671
+
672
+ /**
673
+ * Flag indicating if the rule can also reward badges per range.
674
+ */
675
+ rewardBadgePerRange?: boolean;
676
+
677
+ /**
678
+ * Flag indicating if the reward is rewarded by batch.
679
+ */
680
+ rewardByBatch?: boolean | null;
681
+
464
682
  /**
465
683
  * Flag indicating if rewards are given per impression.
466
684
  */
467
685
  rewardPerImpression?: boolean | null;
468
686
 
687
+ /**
688
+ * Flag indicating if the rule should reward based on value of traded tokens
689
+ * instead of count.
690
+ */
691
+ rewardPerValue?: boolean;
692
+
469
693
  /**
470
694
  * Currency associated with sales.
471
695
  */
@@ -476,6 +700,11 @@ export namespace RuleCreateResponse {
476
700
  */
477
701
  secondReferralReward?: number | null;
478
702
 
703
+ /**
704
+ * Flag indicating if the multiplier is skipped.
705
+ */
706
+ skipMultiplier?: boolean | null;
707
+
479
708
  /**
480
709
  * Object containing details of the associated smart contract.
481
710
  */
@@ -490,14 +719,17 @@ export namespace RuleCreateResponse {
490
719
  * Social media platform associated with the rule.
491
720
  */
492
721
  socialPlatform?:
493
- | 'Twitch'
722
+ | 'Custom'
723
+ | 'Discord'
724
+ | 'EpicGames'
725
+ | 'Instagram'
726
+ | 'Steam'
727
+ | 'Telegram'
494
728
  | 'TikTok'
729
+ | 'Twitch'
495
730
  | 'X(Twitter)'
496
- | 'Instagram'
497
- | 'EpicGames'
498
731
  | 'YouTube'
499
- | 'Discord'
500
- | 'Custom'
732
+ | 'Google'
501
733
  | null;
502
734
 
503
735
  /**
@@ -510,11 +742,21 @@ export namespace RuleCreateResponse {
510
742
  */
511
743
  socialPlatformName?: string | null;
512
744
 
745
+ /**
746
+ * ID of the Steam app.
747
+ */
748
+ steamAppId?: string | null;
749
+
513
750
  /**
514
751
  * Array of streak milestones and corresponding rewards.
515
752
  */
516
753
  streakArray?: Array<Metadata.StreakArray> | null;
517
754
 
755
+ /**
756
+ * Metadata for swap loyalty rules
757
+ */
758
+ swap?: Metadata.Swap;
759
+
518
760
  /**
519
761
  * ID of the Telegram channel.
520
762
  */
@@ -530,6 +772,12 @@ export namespace RuleCreateResponse {
530
772
  */
531
773
  trackAllContracts?: boolean | null;
532
774
 
775
+ /**
776
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
777
+ * completed once the progress is 100%.
778
+ */
779
+ trackProgress?: boolean | null;
780
+
533
781
  /**
534
782
  * URL of the associated Twitter account.
535
783
  */
@@ -573,7 +821,17 @@ export namespace RuleCreateResponse {
573
821
  /**
574
822
  * Type of wallet associated with the rule.
575
823
  */
576
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
824
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
825
+
826
+ /**
827
+ * ID of the Youtube channel.
828
+ */
829
+ youtubeChannelId?: string | null;
830
+
831
+ /**
832
+ * ID of the Youtube video.
833
+ */
834
+ youtubeVideoId?: string | null;
577
835
  }
578
836
 
579
837
  export namespace Metadata {
@@ -592,35 +850,50 @@ export namespace RuleCreateResponse {
592
850
  * Blockchain network of the collection.
593
851
  */
594
852
  network?:
595
- | 'mainnet'
596
- | 'polygon'
597
- | 'polygon_mumbai'
598
- | 'optimism'
853
+ | 'abstract'
854
+ | 'abstractTestnet'
855
+ | 'apechain'
599
856
  | 'arbitrum'
600
- | 'binance'
601
- | 'bscTestnet'
602
857
  | 'avalanche'
603
858
  | 'avalancheFuji'
604
- | 'zksync'
605
- | 'fantom'
606
- | 'fantomTestnet'
607
859
  | 'base'
608
860
  | 'baseSepolia'
609
- | 'skaleNebula'
610
- | 'xai'
861
+ | 'berachain'
611
862
  | 'berachainArtio'
612
- | 'solana'
613
- | 'apechain'
614
- | 'flowMainnet'
863
+ | 'berachainBepolia'
864
+ | 'binance'
865
+ | 'bscTestnet'
615
866
  | 'campTestnet'
867
+ | 'fantom'
868
+ | 'fantomTestnet'
869
+ | 'flowMainnet'
870
+ | 'mainnet'
871
+ | 'optimism'
872
+ | 'polygon'
873
+ | 'polygon_mumbai'
874
+ | 'skaleNebula'
875
+ | 'solana'
876
+ | 'sophon'
877
+ | 'sophonTestnet'
616
878
  | 'sui'
879
+ | 'superseed'
880
+ | 'superseedSepolia'
617
881
  | 'vanar'
882
+ | 'xai'
883
+ | 'zksync'
884
+ | 'coti'
885
+ | 'cotiTestnet'
886
+ | 'morph'
887
+ | 'morphTestnet'
888
+ | 'morphHolesky'
889
+ | 'nitrograph'
618
890
  | 'sepolia'
619
891
  | 'optimism_sepolia'
620
892
  | 'arbitrumSepolia'
621
893
  | 'goerli'
622
894
  | 'optimism_goerli'
623
- | 'arbitrumGoerli';
895
+ | 'arbitrumGoerli'
896
+ | 'basecamp';
624
897
  }
625
898
 
626
899
  /**
@@ -666,6 +939,11 @@ export namespace RuleCreateResponse {
666
939
  * Array of emojis used in the channel.
667
940
  */
668
941
  emojis?: Array<Channel.Emoji>;
942
+
943
+ /**
944
+ * Phrase of text to be present in the discord message
945
+ */
946
+ text?: string;
669
947
  }
670
948
 
671
949
  export namespace Channel {
@@ -692,6 +970,101 @@ export namespace RuleCreateResponse {
692
970
  id: string;
693
971
  }
694
972
 
973
+ /**
974
+ * Liquidity pool details.
975
+ */
976
+ export interface Liquidity {
977
+ /**
978
+ * Calculation type of the liquidity pool.
979
+ */
980
+ calculationType?: 'fixed' | 'custom';
981
+
982
+ /**
983
+ * Custom function to calculate the the reward amount based on the liquidity
984
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
985
+ * USD.
986
+ */
987
+ customFunction?: string;
988
+
989
+ /**
990
+ * Liquidity provided per day in USD
991
+ */
992
+ liquidityPerDay?: number;
993
+
994
+ /**
995
+ * Blockchain network of the liquidity pool.
996
+ */
997
+ network?:
998
+ | 'abstract'
999
+ | 'abstractTestnet'
1000
+ | 'apechain'
1001
+ | 'arbitrum'
1002
+ | 'avalanche'
1003
+ | 'avalancheFuji'
1004
+ | 'base'
1005
+ | 'baseSepolia'
1006
+ | 'berachain'
1007
+ | 'berachainArtio'
1008
+ | 'berachainBepolia'
1009
+ | 'binance'
1010
+ | 'bscTestnet'
1011
+ | 'campTestnet'
1012
+ | 'fantom'
1013
+ | 'fantomTestnet'
1014
+ | 'flowMainnet'
1015
+ | 'mainnet'
1016
+ | 'optimism'
1017
+ | 'polygon'
1018
+ | 'polygon_mumbai'
1019
+ | 'skaleNebula'
1020
+ | 'solana'
1021
+ | 'sophon'
1022
+ | 'sophonTestnet'
1023
+ | 'sui'
1024
+ | 'superseed'
1025
+ | 'superseedSepolia'
1026
+ | 'vanar'
1027
+ | 'xai'
1028
+ | 'zksync'
1029
+ | 'coti'
1030
+ | 'cotiTestnet'
1031
+ | 'morph'
1032
+ | 'morphTestnet'
1033
+ | 'morphHolesky'
1034
+ | 'nitrograph'
1035
+ | 'sepolia'
1036
+ | 'optimism_sepolia'
1037
+ | 'arbitrumSepolia'
1038
+ | 'goerli'
1039
+ | 'optimism_goerli'
1040
+ | 'arbitrumGoerli'
1041
+ | 'basecamp';
1042
+
1043
+ /**
1044
+ * Indicates if only in-range liquidity is rewarded.
1045
+ */
1046
+ onlyRewardInRangeLiquidity?: boolean;
1047
+
1048
+ /**
1049
+ * Array of liquidity pools associated with the rule.
1050
+ */
1051
+ pools?: Array<Liquidity.Pool>;
1052
+
1053
+ /**
1054
+ * Protocol of the liquidity pool.
1055
+ */
1056
+ protocol?: string;
1057
+ }
1058
+
1059
+ export namespace Liquidity {
1060
+ export interface Pool {
1061
+ /**
1062
+ * Unique identifier of the liquidity pool.
1063
+ */
1064
+ id: string;
1065
+ }
1066
+ }
1067
+
695
1068
  export interface Range {
696
1069
  /**
697
1070
  * Reward amount for this range.
@@ -707,6 +1080,16 @@ export namespace RuleCreateResponse {
707
1080
  * Start value of the range.
708
1081
  */
709
1082
  startRange: number;
1083
+
1084
+ /**
1085
+ * ID of the loyalty badge for this range.
1086
+ */
1087
+ loyaltyBadgeId?: string;
1088
+
1089
+ /**
1090
+ * Amount of the loyalty multiplier for this range.
1091
+ */
1092
+ loyaltyMultiplierAmount?: number;
710
1093
  }
711
1094
 
712
1095
  /**
@@ -759,20 +1142,15 @@ export namespace RuleCreateResponse {
759
1142
  * Object containing details of the associated smart contract.
760
1143
  */
761
1144
  export interface SmartContract {
762
- /**
763
- * ABI of the smart contract.
764
- */
765
- abi?: string | null;
766
-
767
1145
  /**
768
1146
  * Mapping of addresses for the smart contract.
769
1147
  */
770
1148
  addressMapping?: string | null;
771
1149
 
772
1150
  /**
773
- * Array of bonus details applied to the rule.
1151
+ * Object containing details of the amount multiplier from the event.
774
1152
  */
775
- bonus?: Array<SmartContract.Bonus> | null;
1153
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
776
1154
 
777
1155
  /**
778
1156
  * ID of the smart contract.
@@ -784,68 +1162,31 @@ export namespace RuleCreateResponse {
784
1162
  */
785
1163
  criteria?: 'everyEvent' | 'byParameter' | null;
786
1164
 
787
- /**
788
- * Time range applied to the rule.
789
- */
790
- customRange?: SmartContract.CustomRange | null;
791
-
792
1165
  /**
793
1166
  * Event emitted by the smart contract.
794
1167
  */
795
1168
  event?: string | null;
796
1169
 
797
- /**
798
- * Maximum value allowed for the parameter.
799
- */
800
- max?: number | null;
801
-
802
1170
  /**
803
1171
  * Array of parameters for the smart contract.
804
1172
  */
805
1173
  params?: Array<SmartContract.Param> | null;
806
1174
 
807
1175
  /**
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.
1176
+ * Type of the smart contract interaction.
819
1177
  */
820
- withMax?: boolean | null;
1178
+ type?: 'function' | 'event' | null;
821
1179
  }
822
1180
 
823
1181
  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
1182
  /**
837
- * Time range applied to the rule.
1183
+ * Object containing details of the amount multiplier from the event.
838
1184
  */
839
- export interface CustomRange {
840
- /**
841
- * End time of the custom range.
842
- */
843
- endsAt?: string | null;
844
-
1185
+ export interface AmountMultiplier {
845
1186
  /**
846
- * Start time of the custom range.
1187
+ * Mapping of the value for the smart contract.
847
1188
  */
848
- startsAt?: string | null;
1189
+ valueMapping?: string | null;
849
1190
  }
850
1191
 
851
1192
  export interface Param {
@@ -889,6 +1230,33 @@ export namespace RuleCreateResponse {
889
1230
  */
890
1231
  streakMilestone: number;
891
1232
  }
1233
+
1234
+ /**
1235
+ * Metadata for swap loyalty rules
1236
+ */
1237
+ export interface Swap {
1238
+ provider?: 'any' | 'relay' | 'lifi';
1239
+
1240
+ relayReferrerId?: string;
1241
+
1242
+ requireCrossChainSwap?: boolean;
1243
+
1244
+ swappedToChain?: 'any' | number | string;
1245
+
1246
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1247
+
1248
+ tokenMode?: 'any' | 'specific';
1249
+
1250
+ trackTokenAmount?: boolean;
1251
+ }
1252
+
1253
+ export namespace Swap {
1254
+ export interface SwappedToToken {
1255
+ address: string;
1256
+
1257
+ chainId: string;
1258
+ }
1259
+ }
892
1260
  }
893
1261
 
894
1262
  export interface Collection {
@@ -901,35 +1269,50 @@ export namespace RuleCreateResponse {
901
1269
  * Blockchain network for the collection
902
1270
  */
903
1271
  network:
904
- | 'mainnet'
905
- | 'polygon'
906
- | 'polygon_mumbai'
907
- | 'optimism'
1272
+ | 'abstract'
1273
+ | 'abstractTestnet'
1274
+ | 'apechain'
908
1275
  | 'arbitrum'
909
- | 'binance'
910
- | 'bscTestnet'
911
1276
  | 'avalanche'
912
1277
  | 'avalancheFuji'
913
- | 'zksync'
914
- | 'fantom'
915
- | 'fantomTestnet'
916
1278
  | 'base'
917
1279
  | 'baseSepolia'
918
- | 'skaleNebula'
919
- | 'xai'
1280
+ | 'berachain'
920
1281
  | 'berachainArtio'
921
- | 'solana'
922
- | 'apechain'
923
- | 'flowMainnet'
1282
+ | 'berachainBepolia'
1283
+ | 'binance'
1284
+ | 'bscTestnet'
924
1285
  | 'campTestnet'
1286
+ | 'fantom'
1287
+ | 'fantomTestnet'
1288
+ | 'flowMainnet'
1289
+ | 'mainnet'
1290
+ | 'optimism'
1291
+ | 'polygon'
1292
+ | 'polygon_mumbai'
1293
+ | 'skaleNebula'
1294
+ | 'solana'
1295
+ | 'sophon'
1296
+ | 'sophonTestnet'
925
1297
  | 'sui'
1298
+ | 'superseed'
1299
+ | 'superseedSepolia'
926
1300
  | 'vanar'
1301
+ | 'xai'
1302
+ | 'zksync'
1303
+ | 'coti'
1304
+ | 'cotiTestnet'
1305
+ | 'morph'
1306
+ | 'morphTestnet'
1307
+ | 'morphHolesky'
1308
+ | 'nitrograph'
927
1309
  | 'sepolia'
928
1310
  | 'optimism_sepolia'
929
1311
  | 'arbitrumSepolia'
930
1312
  | 'goerli'
931
1313
  | 'optimism_goerli'
932
- | 'arbitrumGoerli';
1314
+ | 'arbitrumGoerli'
1315
+ | 'basecamp';
933
1316
  }
934
1317
  }
935
1318
 
@@ -941,41 +1324,16 @@ export interface RuleUpdateResponse {
941
1324
  */
942
1325
  amount: unknown;
943
1326
 
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
1327
  /**
955
1328
  * End time for the loyalty rule
956
1329
  */
957
1330
  endTime: string | null;
958
1331
 
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
1332
  /**
970
1333
  * Name of the loyalty rule
971
1334
  */
972
1335
  name: string;
973
1336
 
974
- /**
975
- * Start time for the loyalty rule
976
- */
977
- startTime: string | null;
978
-
979
1337
  /**
980
1338
  * Blockchain address of the associated collection
981
1339
  */
@@ -1001,6 +1359,26 @@ export interface RuleUpdateResponse {
1001
1359
  */
1002
1360
  description?: string;
1003
1361
 
1362
+ /**
1363
+ * Effective end time of the rule
1364
+ */
1365
+ effectiveEndTime?: string | null;
1366
+
1367
+ /**
1368
+ * Effective start time of the rule
1369
+ */
1370
+ effectiveStartTime?: string | null;
1371
+
1372
+ /**
1373
+ * ID of the external integration
1374
+ */
1375
+ externalIntegrationId?: string | null;
1376
+
1377
+ /**
1378
+ * Frequency of the rule execution
1379
+ */
1380
+ frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
1381
+
1004
1382
  /**
1005
1383
  * Whether to hide this rule in the user interface
1006
1384
  */
@@ -1009,7 +1387,7 @@ export interface RuleUpdateResponse {
1009
1387
  /**
1010
1388
  * Time interval for recurring rule execution
1011
1389
  */
1012
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
1390
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1013
1391
 
1014
1392
  /**
1015
1393
  * Whether this rule is required for participation
@@ -1021,39 +1399,76 @@ export interface RuleUpdateResponse {
1021
1399
  */
1022
1400
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
1023
1401
 
1402
+ /**
1403
+ * The interval for the max amount. Available for the smart contract and external
1404
+ * rules.
1405
+ */
1406
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
1407
+
1408
+ /**
1409
+ * The maximum amount of points a user can earn per interval. Available for the
1410
+ * smart contract and external rules.
1411
+ */
1412
+ maxAmountPerInterval?: number | null;
1413
+
1414
+ /**
1415
+ * URL of the media to be displayed
1416
+ */
1417
+ mediaUrl?: string | null;
1418
+
1419
+ /**
1420
+ * Additional metadata for the loyalty rule
1421
+ */
1422
+ metadata?: RuleUpdateResponse.Metadata;
1423
+
1024
1424
  /**
1025
1425
  * Blockchain network where the rule will apply
1026
1426
  */
1027
1427
  network?:
1028
- | 'mainnet'
1029
- | 'polygon'
1030
- | 'polygon_mumbai'
1031
- | 'optimism'
1428
+ | 'abstract'
1429
+ | 'abstractTestnet'
1430
+ | 'apechain'
1032
1431
  | 'arbitrum'
1033
- | 'binance'
1034
- | 'bscTestnet'
1035
1432
  | 'avalanche'
1036
1433
  | 'avalancheFuji'
1037
- | 'zksync'
1038
- | 'fantom'
1039
- | 'fantomTestnet'
1040
1434
  | 'base'
1041
1435
  | 'baseSepolia'
1042
- | 'skaleNebula'
1043
- | 'xai'
1436
+ | 'berachain'
1044
1437
  | 'berachainArtio'
1045
- | 'solana'
1046
- | 'apechain'
1047
- | 'flowMainnet'
1438
+ | 'berachainBepolia'
1439
+ | 'binance'
1440
+ | 'bscTestnet'
1048
1441
  | 'campTestnet'
1442
+ | 'fantom'
1443
+ | 'fantomTestnet'
1444
+ | 'flowMainnet'
1445
+ | 'mainnet'
1446
+ | 'optimism'
1447
+ | 'polygon'
1448
+ | 'polygon_mumbai'
1449
+ | 'skaleNebula'
1450
+ | 'solana'
1451
+ | 'sophon'
1452
+ | 'sophonTestnet'
1049
1453
  | 'sui'
1454
+ | 'superseed'
1455
+ | 'superseedSepolia'
1050
1456
  | 'vanar'
1457
+ | 'xai'
1458
+ | 'zksync'
1459
+ | 'coti'
1460
+ | 'cotiTestnet'
1461
+ | 'morph'
1462
+ | 'morphTestnet'
1463
+ | 'morphHolesky'
1464
+ | 'nitrograph'
1051
1465
  | 'sepolia'
1052
1466
  | 'optimism_sepolia'
1053
1467
  | 'arbitrumSepolia'
1054
1468
  | 'goerli'
1055
1469
  | 'optimism_goerli'
1056
- | 'arbitrumGoerli';
1470
+ | 'arbitrumGoerli'
1471
+ | 'basecamp';
1057
1472
 
1058
1473
  /**
1059
1474
  * ID for associated OAuth credentials
@@ -1063,19 +1478,90 @@ export interface RuleUpdateResponse {
1063
1478
  /**
1064
1479
  * Type of reward issued by this rule
1065
1480
  */
1066
- rewardType?: 'points' | 'multiplier';
1481
+ rewardType?: 'points' | 'multiplier' | 'badge';
1482
+
1483
+ /**
1484
+ * URL of the Shopify store
1485
+ */
1486
+ shopifyStoreUrl?: string | null;
1487
+
1488
+ /**
1489
+ * Start time for the loyalty rule
1490
+ */
1491
+ startTime?: string | null;
1067
1492
 
1068
1493
  /**
1069
- * Optional subscription identifier for the rule
1494
+ * Optional subscription id for the rule
1070
1495
  */
1071
- subscriptionIdentifier?: string | null;
1496
+ subscriptionId?: string | null;
1072
1497
  }
1073
1498
 
1074
1499
  export namespace RuleUpdateResponse {
1500
+ export interface Collection {
1501
+ /**
1502
+ * Blockchain address of the collection
1503
+ */
1504
+ address: string;
1505
+
1506
+ /**
1507
+ * Blockchain network for the collection
1508
+ */
1509
+ network:
1510
+ | 'abstract'
1511
+ | 'abstractTestnet'
1512
+ | 'apechain'
1513
+ | 'arbitrum'
1514
+ | 'avalanche'
1515
+ | 'avalancheFuji'
1516
+ | 'base'
1517
+ | 'baseSepolia'
1518
+ | 'berachain'
1519
+ | 'berachainArtio'
1520
+ | 'berachainBepolia'
1521
+ | 'binance'
1522
+ | 'bscTestnet'
1523
+ | 'campTestnet'
1524
+ | 'fantom'
1525
+ | 'fantomTestnet'
1526
+ | 'flowMainnet'
1527
+ | 'mainnet'
1528
+ | 'optimism'
1529
+ | 'polygon'
1530
+ | 'polygon_mumbai'
1531
+ | 'skaleNebula'
1532
+ | 'solana'
1533
+ | 'sophon'
1534
+ | 'sophonTestnet'
1535
+ | 'sui'
1536
+ | 'superseed'
1537
+ | 'superseedSepolia'
1538
+ | 'vanar'
1539
+ | 'xai'
1540
+ | 'zksync'
1541
+ | 'coti'
1542
+ | 'cotiTestnet'
1543
+ | 'morph'
1544
+ | 'morphTestnet'
1545
+ | 'morphHolesky'
1546
+ | 'nitrograph'
1547
+ | 'sepolia'
1548
+ | 'optimism_sepolia'
1549
+ | 'arbitrumSepolia'
1550
+ | 'goerli'
1551
+ | 'optimism_goerli'
1552
+ | 'arbitrumGoerli'
1553
+ | 'basecamp';
1554
+ }
1555
+
1075
1556
  /**
1076
1557
  * Additional metadata for the loyalty rule
1077
1558
  */
1078
1559
  export interface Metadata {
1560
+ /**
1561
+ * Number of tokens per batch.
1562
+ */
1563
+ batchSize?: number | null;
1564
+
1079
1565
  /**
1080
1566
  * Text displayed on the action button.
1081
1567
  */
@@ -1106,6 +1592,11 @@ export namespace RuleUpdateResponse {
1106
1592
  */
1107
1593
  collection?: Array<Metadata.Collection>;
1108
1594
 
1595
+ /**
1596
+ * Conditions for completing the profile.
1597
+ */
1598
+ completeProfileConditions?: { [key: string]: boolean } | null;
1599
+
1109
1600
  /**
1110
1601
  * Object containing details for the call-to-action.
1111
1602
  */
@@ -1141,11 +1632,21 @@ export namespace RuleUpdateResponse {
1141
1632
  */
1142
1633
  enableVerifiedMultiplier?: boolean;
1143
1634
 
1635
+ /**
1636
+ * Fill source of the order for the token sale
1637
+ */
1638
+ fillSource?: string;
1639
+
1144
1640
  /**
1145
1641
  * Percentage reward given to a user for their first referral.
1146
1642
  */
1147
1643
  firstReferralReward?: number | null;
1148
1644
 
1645
+ /**
1646
+ * Flag indicating whether the fill source is included.
1647
+ */
1648
+ hasFillSource?: boolean;
1649
+
1149
1650
  /**
1150
1651
  * Indicates if the item has never been sold.
1151
1652
  */
@@ -1171,11 +1672,21 @@ export namespace RuleUpdateResponse {
1171
1672
  */
1172
1673
  imageUrl?: string | null;
1173
1674
 
1675
+ /**
1676
+ * If enabled, the first transaction done on the platform will complete this rule
1677
+ */
1678
+ isCheckInOnEveryTxn?: boolean;
1679
+
1174
1680
  /**
1175
1681
  * Indicates if the multiplier has been applied to rewards.
1176
1682
  */
1177
1683
  isMultiplierApplied?: boolean;
1178
1684
 
1685
+ /**
1686
+ * Flag indicating if the rule is restricted to new users.
1687
+ */
1688
+ isRestrictedToNewUsers?: boolean;
1689
+
1179
1690
  /**
1180
1691
  * Flag indicating if rewards are applied retroactively.
1181
1692
  */
@@ -1191,6 +1702,11 @@ export namespace RuleUpdateResponse {
1191
1702
  */
1192
1703
  link?: string | null;
1193
1704
 
1705
+ /**
1706
+ * Liquidity pool details.
1707
+ */
1708
+ liquidity?: Metadata.Liquidity;
1709
+
1194
1710
  /**
1195
1711
  * Maximum quantity constraint for token holding.
1196
1712
  */
@@ -1221,11 +1737,36 @@ export namespace RuleUpdateResponse {
1221
1737
  */
1222
1738
  onlyNonListed?: boolean;
1223
1739
 
1740
+ /**
1741
+ * Indicates if only existing users are rewarded.
1742
+ */
1743
+ onlyRewardExistingUser?: boolean;
1744
+
1745
+ /**
1746
+ * give points for only one token ownership per contract
1747
+ */
1748
+ onlyRewardSingleTokenOwnership?: boolean | null;
1749
+
1224
1750
  /**
1225
1751
  * Promotional code associated with the rule.
1226
1752
  */
1227
1753
  promoCode?: string;
1228
1754
 
1755
+ /**
1756
+ * URL of the CSV file containing promo codes.
1757
+ */
1758
+ promoCodeCsvUrl?: string;
1759
+
1760
+ /**
1761
+ * Numbers of the promotional code to be generated.
1762
+ */
1763
+ promoCodeLength?: number | null;
1764
+
1765
+ /**
1766
+ * Type of the promotional code.
1767
+ */
1768
+ promoCodeType?: 'code' | 'csv' | 'generate';
1769
+
1229
1770
  /**
1230
1771
  * Array defining ranges and corresponding rewards.
1231
1772
  */
@@ -1241,11 +1782,32 @@ export namespace RuleUpdateResponse {
1241
1782
  */
1242
1783
  referrerReward?: number | null;
1243
1784
 
1785
+ /**
1786
+ * Loyalty currency ID of the referrer reward.
1787
+ */
1788
+ referrerRewardLoyaltyCurrencyId?: string | null;
1789
+
1790
+ /**
1791
+ * Flag indicating if the rule can also reward badges per range.
1792
+ */
1793
+ rewardBadgePerRange?: boolean;
1794
+
1795
+ /**
1796
+ * Flag indicating if the reward is rewarded by batch.
1797
+ */
1798
+ rewardByBatch?: boolean | null;
1799
+
1244
1800
  /**
1245
1801
  * Flag indicating if rewards are given per impression.
1246
1802
  */
1247
1803
  rewardPerImpression?: boolean | null;
1248
1804
 
1805
+ /**
1806
+ * Flag indicating if the rule should reward based on value of traded tokens
1807
+ * instead of count.
1808
+ */
1809
+ rewardPerValue?: boolean;
1810
+
1249
1811
  /**
1250
1812
  * Currency associated with sales.
1251
1813
  */
@@ -1256,6 +1818,11 @@ export namespace RuleUpdateResponse {
1256
1818
  */
1257
1819
  secondReferralReward?: number | null;
1258
1820
 
1821
+ /**
1822
+ * Flag indicating if the multiplier is skipped.
1823
+ */
1824
+ skipMultiplier?: boolean | null;
1825
+
1259
1826
  /**
1260
1827
  * Object containing details of the associated smart contract.
1261
1828
  */
@@ -1270,14 +1837,17 @@ export namespace RuleUpdateResponse {
1270
1837
  * Social media platform associated with the rule.
1271
1838
  */
1272
1839
  socialPlatform?:
1273
- | 'Twitch'
1840
+ | 'Custom'
1841
+ | 'Discord'
1842
+ | 'EpicGames'
1843
+ | 'Instagram'
1844
+ | 'Steam'
1845
+ | 'Telegram'
1274
1846
  | 'TikTok'
1847
+ | 'Twitch'
1275
1848
  | 'X(Twitter)'
1276
- | 'Instagram'
1277
- | 'EpicGames'
1278
1849
  | 'YouTube'
1279
- | 'Discord'
1280
- | 'Custom'
1850
+ | 'Google'
1281
1851
  | null;
1282
1852
 
1283
1853
  /**
@@ -1290,11 +1860,21 @@ export namespace RuleUpdateResponse {
1290
1860
  */
1291
1861
  socialPlatformName?: string | null;
1292
1862
 
1863
+ /**
1864
+ * ID of the Steam app.
1865
+ */
1866
+ steamAppId?: string | null;
1867
+
1293
1868
  /**
1294
1869
  * Array of streak milestones and corresponding rewards.
1295
1870
  */
1296
1871
  streakArray?: Array<Metadata.StreakArray> | null;
1297
1872
 
1873
+ /**
1874
+ * Metadata for swap loyalty rules
1875
+ */
1876
+ swap?: Metadata.Swap;
1877
+
1298
1878
  /**
1299
1879
  * ID of the Telegram channel.
1300
1880
  */
@@ -1310,6 +1890,12 @@ export namespace RuleUpdateResponse {
1310
1890
  */
1311
1891
  trackAllContracts?: boolean | null;
1312
1892
 
1893
+ /**
1894
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
1895
+ * completed once the progress is 100%.
1896
+ */
1897
+ trackProgress?: boolean | null;
1898
+
1313
1899
  /**
1314
1900
  * URL of the associated Twitter account.
1315
1901
  */
@@ -1353,7 +1939,17 @@ export namespace RuleUpdateResponse {
1353
1939
  /**
1354
1940
  * Type of wallet associated with the rule.
1355
1941
  */
1356
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
1942
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
1943
+
1944
+ /**
1945
+ * ID of the Youtube channel.
1946
+ */
1947
+ youtubeChannelId?: string | null;
1948
+
1949
+ /**
1950
+ * ID of the Youtube video.
1951
+ */
1952
+ youtubeVideoId?: string | null;
1357
1953
  }
1358
1954
 
1359
1955
  export namespace Metadata {
@@ -1372,35 +1968,50 @@ export namespace RuleUpdateResponse {
1372
1968
  * Blockchain network of the collection.
1373
1969
  */
1374
1970
  network?:
1375
- | 'mainnet'
1376
- | 'polygon'
1377
- | 'polygon_mumbai'
1378
- | 'optimism'
1971
+ | 'abstract'
1972
+ | 'abstractTestnet'
1973
+ | 'apechain'
1379
1974
  | 'arbitrum'
1380
- | 'binance'
1381
- | 'bscTestnet'
1382
1975
  | 'avalanche'
1383
1976
  | 'avalancheFuji'
1384
- | 'zksync'
1385
- | 'fantom'
1386
- | 'fantomTestnet'
1387
1977
  | 'base'
1388
1978
  | 'baseSepolia'
1389
- | 'skaleNebula'
1390
- | 'xai'
1979
+ | 'berachain'
1391
1980
  | 'berachainArtio'
1392
- | 'solana'
1393
- | 'apechain'
1394
- | 'flowMainnet'
1981
+ | 'berachainBepolia'
1982
+ | 'binance'
1983
+ | 'bscTestnet'
1395
1984
  | 'campTestnet'
1985
+ | 'fantom'
1986
+ | 'fantomTestnet'
1987
+ | 'flowMainnet'
1988
+ | 'mainnet'
1989
+ | 'optimism'
1990
+ | 'polygon'
1991
+ | 'polygon_mumbai'
1992
+ | 'skaleNebula'
1993
+ | 'solana'
1994
+ | 'sophon'
1995
+ | 'sophonTestnet'
1396
1996
  | 'sui'
1997
+ | 'superseed'
1998
+ | 'superseedSepolia'
1397
1999
  | 'vanar'
2000
+ | 'xai'
2001
+ | 'zksync'
2002
+ | 'coti'
2003
+ | 'cotiTestnet'
2004
+ | 'morph'
2005
+ | 'morphTestnet'
2006
+ | 'morphHolesky'
2007
+ | 'nitrograph'
1398
2008
  | 'sepolia'
1399
2009
  | 'optimism_sepolia'
1400
2010
  | 'arbitrumSepolia'
1401
2011
  | 'goerli'
1402
2012
  | 'optimism_goerli'
1403
- | 'arbitrumGoerli';
2013
+ | 'arbitrumGoerli'
2014
+ | 'basecamp';
1404
2015
  }
1405
2016
 
1406
2017
  /**
@@ -1446,6 +2057,11 @@ export namespace RuleUpdateResponse {
1446
2057
  * Array of emojis used in the channel.
1447
2058
  */
1448
2059
  emojis?: Array<Channel.Emoji>;
2060
+
2061
+ /**
2062
+ * Phrase of text to be present in the discord message
2063
+ */
2064
+ text?: string;
1449
2065
  }
1450
2066
 
1451
2067
  export namespace Channel {
@@ -1472,6 +2088,101 @@ export namespace RuleUpdateResponse {
1472
2088
  id: string;
1473
2089
  }
1474
2090
 
2091
+ /**
2092
+ * Liquidity pool details.
2093
+ */
2094
+ export interface Liquidity {
2095
+ /**
2096
+ * Calculation type of the liquidity pool.
2097
+ */
2098
+ calculationType?: 'fixed' | 'custom';
2099
+
2100
+ /**
2101
+ * Custom function to calculate the the reward amount based on the liquidity
2102
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
2103
+ * USD.
2104
+ */
2105
+ customFunction?: string;
2106
+
2107
+ /**
2108
+ * Liquidity provided per day in USD
2109
+ */
2110
+ liquidityPerDay?: number;
2111
+
2112
+ /**
2113
+ * Blockchain network of the liquidity pool.
2114
+ */
2115
+ network?:
2116
+ | 'abstract'
2117
+ | 'abstractTestnet'
2118
+ | 'apechain'
2119
+ | 'arbitrum'
2120
+ | 'avalanche'
2121
+ | 'avalancheFuji'
2122
+ | 'base'
2123
+ | 'baseSepolia'
2124
+ | 'berachain'
2125
+ | 'berachainArtio'
2126
+ | 'berachainBepolia'
2127
+ | 'binance'
2128
+ | 'bscTestnet'
2129
+ | 'campTestnet'
2130
+ | 'fantom'
2131
+ | 'fantomTestnet'
2132
+ | 'flowMainnet'
2133
+ | 'mainnet'
2134
+ | 'optimism'
2135
+ | 'polygon'
2136
+ | 'polygon_mumbai'
2137
+ | 'skaleNebula'
2138
+ | 'solana'
2139
+ | 'sophon'
2140
+ | 'sophonTestnet'
2141
+ | 'sui'
2142
+ | 'superseed'
2143
+ | 'superseedSepolia'
2144
+ | 'vanar'
2145
+ | 'xai'
2146
+ | 'zksync'
2147
+ | 'coti'
2148
+ | 'cotiTestnet'
2149
+ | 'morph'
2150
+ | 'morphTestnet'
2151
+ | 'morphHolesky'
2152
+ | 'nitrograph'
2153
+ | 'sepolia'
2154
+ | 'optimism_sepolia'
2155
+ | 'arbitrumSepolia'
2156
+ | 'goerli'
2157
+ | 'optimism_goerli'
2158
+ | 'arbitrumGoerli'
2159
+ | 'basecamp';
2160
+
2161
+ /**
2162
+ * Indicates if only in-range liquidity is rewarded.
2163
+ */
2164
+ onlyRewardInRangeLiquidity?: boolean;
2165
+
2166
+ /**
2167
+ * Array of liquidity pools associated with the rule.
2168
+ */
2169
+ pools?: Array<Liquidity.Pool>;
2170
+
2171
+ /**
2172
+ * Protocol of the liquidity pool.
2173
+ */
2174
+ protocol?: string;
2175
+ }
2176
+
2177
+ export namespace Liquidity {
2178
+ export interface Pool {
2179
+ /**
2180
+ * Unique identifier of the liquidity pool.
2181
+ */
2182
+ id: string;
2183
+ }
2184
+ }
2185
+
1475
2186
  export interface Range {
1476
2187
  /**
1477
2188
  * Reward amount for this range.
@@ -1487,6 +2198,16 @@ export namespace RuleUpdateResponse {
1487
2198
  * Start value of the range.
1488
2199
  */
1489
2200
  startRange: number;
2201
+
2202
+ /**
2203
+ * ID of the loyalty badge for this range.
2204
+ */
2205
+ loyaltyBadgeId?: string;
2206
+
2207
+ /**
2208
+ * Amount of the loyalty multiplier for this range.
2209
+ */
2210
+ loyaltyMultiplierAmount?: number;
1490
2211
  }
1491
2212
 
1492
2213
  /**
@@ -1539,20 +2260,15 @@ export namespace RuleUpdateResponse {
1539
2260
  * Object containing details of the associated smart contract.
1540
2261
  */
1541
2262
  export interface SmartContract {
1542
- /**
1543
- * ABI of the smart contract.
1544
- */
1545
- abi?: string | null;
1546
-
1547
2263
  /**
1548
2264
  * Mapping of addresses for the smart contract.
1549
2265
  */
1550
2266
  addressMapping?: string | null;
1551
2267
 
1552
2268
  /**
1553
- * Array of bonus details applied to the rule.
2269
+ * Object containing details of the amount multiplier from the event.
1554
2270
  */
1555
- bonus?: Array<SmartContract.Bonus> | null;
2271
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
1556
2272
 
1557
2273
  /**
1558
2274
  * ID of the smart contract.
@@ -1564,68 +2280,31 @@ export namespace RuleUpdateResponse {
1564
2280
  */
1565
2281
  criteria?: 'everyEvent' | 'byParameter' | null;
1566
2282
 
1567
- /**
1568
- * Time range applied to the rule.
1569
- */
1570
- customRange?: SmartContract.CustomRange | null;
1571
-
1572
2283
  /**
1573
2284
  * Event emitted by the smart contract.
1574
2285
  */
1575
2286
  event?: string | null;
1576
2287
 
1577
- /**
1578
- * Maximum value allowed for the parameter.
1579
- */
1580
- max?: number | null;
1581
-
1582
2288
  /**
1583
2289
  * Array of parameters for the smart contract.
1584
2290
  */
1585
2291
  params?: Array<SmartContract.Param> | null;
1586
2292
 
1587
2293
  /**
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.
2294
+ * Type of the smart contract interaction.
1599
2295
  */
1600
- withMax?: boolean | null;
2296
+ type?: 'function' | 'event' | null;
1601
2297
  }
1602
2298
 
1603
2299
  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
2300
  /**
1617
- * Time range applied to the rule.
2301
+ * Object containing details of the amount multiplier from the event.
1618
2302
  */
1619
- export interface CustomRange {
2303
+ export interface AmountMultiplier {
1620
2304
  /**
1621
- * End time of the custom range.
2305
+ * Mapping of the value for the smart contract.
1622
2306
  */
1623
- endsAt?: string | null;
1624
-
1625
- /**
1626
- * Start time of the custom range.
1627
- */
1628
- startsAt?: string | null;
2307
+ valueMapping?: string | null;
1629
2308
  }
1630
2309
 
1631
2310
  export interface Param {
@@ -1669,47 +2348,33 @@ export namespace RuleUpdateResponse {
1669
2348
  */
1670
2349
  streakMilestone: number;
1671
2350
  }
1672
- }
1673
2351
 
1674
- export interface Collection {
1675
2352
  /**
1676
- * Blockchain address of the collection
2353
+ * Metadata for swap loyalty rules
1677
2354
  */
1678
- address: string;
2355
+ export interface Swap {
2356
+ provider?: 'any' | 'relay' | 'lifi';
1679
2357
 
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';
2358
+ relayReferrerId?: string;
2359
+
2360
+ requireCrossChainSwap?: boolean;
2361
+
2362
+ swappedToChain?: 'any' | number | string;
2363
+
2364
+ swappedToTokens?: Array<Swap.SwappedToToken>;
2365
+
2366
+ tokenMode?: 'any' | 'specific';
2367
+
2368
+ trackTokenAmount?: boolean;
2369
+ }
2370
+
2371
+ export namespace Swap {
2372
+ export interface SwappedToToken {
2373
+ address: string;
2374
+
2375
+ chainId: string;
2376
+ }
2377
+ }
1713
2378
  }
1714
2379
  }
1715
2380
 
@@ -1720,9 +2385,6 @@ export interface RuleListResponse {
1720
2385
  }
1721
2386
 
1722
2387
  export namespace RuleListResponse {
1723
- /**
1724
- * Schema for a loyalty rule
1725
- */
1726
2388
  export interface Data {
1727
2389
  /**
1728
2390
  * Unique identifier for the loyalty rule
@@ -1739,45 +2401,1003 @@ export namespace RuleListResponse {
1739
2401
  */
1740
2402
  createdAt: string;
1741
2403
 
1742
- /**
1743
- * Timestamp when the loyalty rule was deleted (if applicable)
1744
- */
1745
- deletedAt: string | null;
2404
+ /**
2405
+ * Timestamp when the loyalty rule was deleted (if applicable)
2406
+ */
2407
+ deletedAt: string | null;
2408
+
2409
+ /**
2410
+ * Description of the loyalty rule
2411
+ */
2412
+ description: string;
2413
+
2414
+ /**
2415
+ * End time of the loyalty rule
2416
+ */
2417
+ endTime: string;
2418
+
2419
+ /**
2420
+ * Frequency of the loyalty rule
2421
+ */
2422
+ frequency: string;
2423
+
2424
+ /**
2425
+ * Chains attached to the loyalty rule
2426
+ */
2427
+ loyaltyRuleChain: Array<Data.LoyaltyRuleChain>;
2428
+
2429
+ /**
2430
+ * Name of the loyalty rule
2431
+ */
2432
+ name: string;
2433
+
2434
+ /**
2435
+ * Unique identifier for the organization
2436
+ */
2437
+ organizationId: string;
2438
+
2439
+ /**
2440
+ * Type of the reward
2441
+ */
2442
+ rewardType: 'points' | 'multiplier' | 'badge';
2443
+
2444
+ /**
2445
+ * Start time of the loyalty rule
2446
+ */
2447
+ startTime: string;
2448
+
2449
+ /**
2450
+ * Type of the loyalty rule
2451
+ */
2452
+ type: string;
2453
+
2454
+ /**
2455
+ * Timestamp when the loyalty rule was last updated
2456
+ */
2457
+ updatedAt: string;
2458
+
2459
+ /**
2460
+ * Unique identifier for the website
2461
+ */
2462
+ websiteId: string;
2463
+
2464
+ /**
2465
+ * Optional address of the collection
2466
+ */
2467
+ collectionAddress?: string;
2468
+
2469
+ /**
2470
+ * URL of the media associated with the loyalty rule
2471
+ */
2472
+ mediaUrl?: string | null;
2473
+
2474
+ /**
2475
+ * Optional metadata for the loyalty rule
2476
+ */
2477
+ metadata?: { [key: string]: Data.Metadata };
2478
+ }
2479
+
2480
+ export namespace Data {
2481
+ export interface LoyaltyRuleChain {
2482
+ /**
2483
+ * Unique identifier for the rule chain
2484
+ */
2485
+ id: string;
2486
+
2487
+ loyaltyConditions: Array<LoyaltyRuleChain.LoyaltyCondition>;
2488
+
2489
+ /**
2490
+ * Unique identifier for the loyalty rule
2491
+ */
2492
+ loyaltyRuleId: string;
2493
+
2494
+ /**
2495
+ * Name of the rule chain
2496
+ */
2497
+ name: string;
2498
+ }
2499
+
2500
+ export namespace LoyaltyRuleChain {
2501
+ export interface LoyaltyCondition {
2502
+ /**
2503
+ * Unique identifier for the condition
2504
+ */
2505
+ id: string;
2506
+
2507
+ /**
2508
+ * Amount of the condition
2509
+ */
2510
+ amount: number | null;
2511
+
2512
+ association: Array<LoyaltyCondition.Association>;
2513
+
2514
+ /**
2515
+ * URL of the CSV file
2516
+ */
2517
+ csvUrl: string | null;
2518
+
2519
+ /**
2520
+ * Description of the condition
2521
+ */
2522
+ description: string | null;
2523
+
2524
+ /**
2525
+ * Number of times the condition must be met
2526
+ */
2527
+ repeatCount: number | null;
2528
+
2529
+ /**
2530
+ * Number of times the condition must be met
2531
+ */
2532
+ requiredCount: number | null;
2533
+
2534
+ /**
2535
+ * Type of the condition
2536
+ */
2537
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
2538
+ }
2539
+
2540
+ export namespace LoyaltyCondition {
2541
+ export interface Association {
2542
+ /**
2543
+ * Unique identifier for the association
2544
+ */
2545
+ id: string;
2546
+
2547
+ /**
2548
+ * Unique identifier for the loyalty badge
2549
+ */
2550
+ loyaltyBadgeId: string | null;
2551
+
2552
+ /**
2553
+ * Unique identifier for the loyalty currency
2554
+ */
2555
+ loyaltyCurrencyId: string | null;
2556
+
2557
+ loyaltyRule: Association.LoyaltyRule | null;
2558
+
2559
+ /**
2560
+ * Unique identifier for the loyalty rule group
2561
+ */
2562
+ loyaltyRuleGroupId: string | null;
2563
+
2564
+ /**
2565
+ * Unique identifier for the loyalty rule
2566
+ */
2567
+ loyaltyRuleId: string | null;
2568
+ }
2569
+
2570
+ export namespace Association {
2571
+ export interface LoyaltyRule {
2572
+ /**
2573
+ * Name of the loyalty rule
2574
+ */
2575
+ name: string;
2576
+ }
2577
+ }
2578
+ }
2579
+ }
2580
+
2581
+ export interface Metadata {
2582
+ /**
2583
+ * Number of tokens per batch.
2584
+ */
2585
+ batchSize?: number | null;
2586
+
2587
+ /**
2588
+ * Text displayed on the action button.
2589
+ */
2590
+ buttonText?: string | null;
2591
+
2592
+ /**
2593
+ * Flag indicating if commenting is required.
2594
+ */
2595
+ checkComment?: boolean | null;
2596
+
2597
+ /**
2598
+ * Flag indicating if liking the post is required.
2599
+ */
2600
+ checkLike?: boolean | null;
2601
+
2602
+ /**
2603
+ * Flag indicating if reposting is required.
2604
+ */
2605
+ checkRepost?: boolean | null;
2606
+
2607
+ /**
2608
+ * Text to check in the Twitter post, username, or bio.
2609
+ */
2610
+ checkText?: string | null;
2611
+
2612
+ /**
2613
+ * Array of collections associated with the rule.
2614
+ */
2615
+ collection?: Array<Metadata.Collection>;
2616
+
2617
+ /**
2618
+ * Conditions for completing the profile.
2619
+ */
2620
+ completeProfileConditions?: { [key: string]: boolean } | null;
2621
+
2622
+ /**
2623
+ * Object containing details for the call-to-action.
2624
+ */
2625
+ cta?: Metadata.Cta | null;
2626
+
2627
+ /**
2628
+ * API key for custom rewards integration.
2629
+ */
2630
+ customRewardsApiKey?: string;
2631
+
2632
+ /**
2633
+ * Array of Discord servers, channels, and roles to join.
2634
+ */
2635
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2636
+
2637
+ /**
2638
+ * Array of drip quests required to complete the rule.
2639
+ */
2640
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2641
+
2642
+ /**
2643
+ * Flag indicating whether joining Discord servers is required.
2644
+ */
2645
+ enableJoinDiscordServers?: boolean | null;
2646
+
2647
+ /**
2648
+ * Flag indicating whether streaks are enabled.
2649
+ */
2650
+ enableStreaks?: boolean | null;
2651
+
2652
+ /**
2653
+ * Flag indicating whether the verified multiplier is enabled.
2654
+ */
2655
+ enableVerifiedMultiplier?: boolean;
2656
+
2657
+ /**
2658
+ * Fill source of the order for the token sale
2659
+ */
2660
+ fillSource?: string;
2661
+
2662
+ /**
2663
+ * Percentage reward given to a user for their first referral.
2664
+ */
2665
+ firstReferralReward?: number | null;
2666
+
2667
+ /**
2668
+ * Flag indicating whether the fill source is included.
2669
+ */
2670
+ hasFillSource?: boolean;
2671
+
2672
+ /**
2673
+ * Indicates if the item has never been sold.
2674
+ */
2675
+ hasNeverSold?: boolean;
2676
+
2677
+ /**
2678
+ * Indicates if the full royalty has been paid for items.
2679
+ */
2680
+ hasPaidFullRoyalty?: boolean;
2681
+
2682
+ /**
2683
+ * Flag indicating if the sale currency is included.
2684
+ */
2685
+ hasSaleCurrency?: boolean;
2686
+
2687
+ /**
2688
+ * Indicates if the user has a verified Twitter account.
2689
+ */
2690
+ hasVerifiedTwitter?: boolean;
2691
+
2692
+ /**
2693
+ * URL of the image associated with the rule.
2694
+ */
2695
+ imageUrl?: string | null;
2696
+
2697
+ /**
2698
+ * If enabled, the first transaction done on the platform will complete this rule
2699
+ */
2700
+ isCheckInOnEveryTxn?: boolean;
2701
+
2702
+ /**
2703
+ * Indicates if the multiplier has been applied to rewards.
2704
+ */
2705
+ isMultiplierApplied?: boolean;
2706
+
2707
+ /**
2708
+ * Flag indicating if the rule is restricted to new users.
2709
+ */
2710
+ isRestrictedToNewUsers?: boolean;
2711
+
2712
+ /**
2713
+ * Flag indicating if rewards are applied retroactively.
2714
+ */
2715
+ isRetroactive?: boolean | null;
2716
+
2717
+ /**
2718
+ * Flag indicating if the token hold multiplier is applied.
2719
+ */
2720
+ isTokenHoldMultiplier?: boolean;
2721
+
2722
+ /**
2723
+ * Optional link associated with the metadata.
2724
+ */
2725
+ link?: string | null;
2726
+
2727
+ /**
2728
+ * Liquidity pool details.
2729
+ */
2730
+ liquidity?: Metadata.Liquidity;
2731
+
2732
+ /**
2733
+ * Maximum quantity constraint for token holding.
2734
+ */
2735
+ maxQty?: number | null;
2736
+
2737
+ /**
2738
+ * Minimum quantity constraint for token holding.
2739
+ */
2740
+ minQty?: number | null;
2741
+
2742
+ /**
2743
+ * Array of loyalty currency IDs used for multipliers.
2744
+ */
2745
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
2746
+
2747
+ /**
2748
+ * Flag indicating whether to include only known users.
2749
+ */
2750
+ onlyKnownUsers?: boolean;
2751
+
2752
+ /**
2753
+ * Flag indicating whether to include only native tokens.
2754
+ */
2755
+ onlyNative?: boolean;
2756
+
2757
+ /**
2758
+ * Flag indicating whether to include only non-listed items.
2759
+ */
2760
+ onlyNonListed?: boolean;
2761
+
2762
+ /**
2763
+ * Indicates if only existing users are rewarded.
2764
+ */
2765
+ onlyRewardExistingUser?: boolean;
2766
+
2767
+ /**
2768
+ * give points for only one token ownership per contract
2769
+ */
2770
+ onlyRewardSingleTokenOwnership?: boolean | null;
2771
+
2772
+ /**
2773
+ * Promotional code associated with the rule.
2774
+ */
2775
+ promoCode?: string;
2776
+
2777
+ /**
2778
+ * URL of the CSV file containing promo codes.
2779
+ */
2780
+ promoCodeCsvUrl?: string;
2781
+
2782
+ /**
2783
+ * Numbers of the promotional code to be generated.
2784
+ */
2785
+ promoCodeLength?: number | null;
2786
+
2787
+ /**
2788
+ * Type of the promotional code.
2789
+ */
2790
+ promoCodeType?: 'code' | 'csv' | 'generate';
2791
+
2792
+ /**
2793
+ * Array defining ranges and corresponding rewards.
2794
+ */
2795
+ range?: Array<Metadata.Range>;
2796
+
2797
+ /**
2798
+ * Object defining referral requirements.
2799
+ */
2800
+ referralRequirements?: Metadata.ReferralRequirements | null;
2801
+
2802
+ /**
2803
+ * Lump sum reward given to a referrer.
2804
+ */
2805
+ referrerReward?: number | null;
2806
+
2807
+ /**
2808
+ * Loyalty currency ID of the referrer reward.
2809
+ */
2810
+ referrerRewardLoyaltyCurrencyId?: string | null;
2811
+
2812
+ /**
2813
+ * Flag indicating if the rule can also reward badges per range.
2814
+ */
2815
+ rewardBadgePerRange?: boolean;
2816
+
2817
+ /**
2818
+ * Flag indicating if the reward is rewarded by batch.
2819
+ */
2820
+ rewardByBatch?: boolean | null;
2821
+
2822
+ /**
2823
+ * Flag indicating if rewards are given per impression.
2824
+ */
2825
+ rewardPerImpression?: boolean | null;
2826
+
2827
+ /**
2828
+ * Flag indicating if the rule should reward based on value of traded tokens
2829
+ * instead of count.
2830
+ */
2831
+ rewardPerValue?: boolean;
2832
+
2833
+ /**
2834
+ * Currency associated with sales.
2835
+ */
2836
+ saleCurrency?: string;
2837
+
2838
+ /**
2839
+ * Percentage reward given for a second-level referral.
2840
+ */
2841
+ secondReferralReward?: number | null;
2842
+
2843
+ /**
2844
+ * Flag indicating if the multiplier is skipped.
2845
+ */
2846
+ skipMultiplier?: boolean | null;
2847
+
2848
+ /**
2849
+ * Object containing details of the associated smart contract.
2850
+ */
2851
+ smartContract?: Metadata.SmartContract;
2852
+
2853
+ /**
2854
+ * Array of snapshot proposals for the rule.
2855
+ */
2856
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
2857
+
2858
+ /**
2859
+ * Social media platform associated with the rule.
2860
+ */
2861
+ socialPlatform?:
2862
+ | 'Custom'
2863
+ | 'Discord'
2864
+ | 'EpicGames'
2865
+ | 'Instagram'
2866
+ | 'Steam'
2867
+ | 'Telegram'
2868
+ | 'TikTok'
2869
+ | 'Twitch'
2870
+ | 'X(Twitter)'
2871
+ | 'YouTube'
2872
+ | 'Google'
2873
+ | null;
2874
+
2875
+ /**
2876
+ * URL of the social platform's logo.
2877
+ */
2878
+ socialPlatformLogo?: string | null;
2879
+
2880
+ /**
2881
+ * Name of the social platform.
2882
+ */
2883
+ socialPlatformName?: string | null;
2884
+
2885
+ /**
2886
+ * ID of the Steam app.
2887
+ */
2888
+ steamAppId?: string | null;
2889
+
2890
+ /**
2891
+ * Array of streak milestones and corresponding rewards.
2892
+ */
2893
+ streakArray?: Array<Metadata.StreakArray> | null;
2894
+
2895
+ /**
2896
+ * Metadata for swap loyalty rules
2897
+ */
2898
+ swap?: Metadata.Swap;
2899
+
2900
+ /**
2901
+ * ID of the Telegram channel.
2902
+ */
2903
+ telegramChannelId?: string | null;
2904
+
2905
+ /**
2906
+ * Time delay in seconds to verify actions.
2907
+ */
2908
+ timeDelayToVerifySeconds?: string | number | null;
2909
+
2910
+ /**
2911
+ * Flag indicating if all contracts are tracked.
2912
+ */
2913
+ trackAllContracts?: boolean | null;
2914
+
2915
+ /**
2916
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
2917
+ * completed once the progress is 100%.
2918
+ */
2919
+ trackProgress?: boolean | null;
2920
+
2921
+ /**
2922
+ * URL of the associated Twitter account.
2923
+ */
2924
+ twitterAccountUrl?: string;
2925
+
2926
+ /**
2927
+ * Hashtag associated with the Twitter post.
2928
+ */
2929
+ twitterHashtag?: string;
2930
+
2931
+ /**
2932
+ * URL of the associated Twitter post.
2933
+ */
2934
+ twitterPostUrl?: string;
2935
+
2936
+ /**
2937
+ * Unique identifier of the Twitter user.
2938
+ */
2939
+ twitterUserId?: string;
2940
+
2941
+ /**
2942
+ * Twitter username of the user.
2943
+ */
2944
+ twitterUsername?: string;
2945
+
2946
+ /**
2947
+ * Minimum length of the verification text.
2948
+ */
2949
+ verificationTextMinimumLength?: number | null;
2950
+
2951
+ /**
2952
+ * Multiplier applied to rewards for verified users.
2953
+ */
2954
+ verifiedMultiplier?: number | null;
2955
+
2956
+ /**
2957
+ * Placeholder text for verification input fields.
2958
+ */
2959
+ verifyPlaceHolderText?: string | null;
2960
+
2961
+ /**
2962
+ * Type of wallet associated with the rule.
2963
+ */
2964
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
2965
+
2966
+ /**
2967
+ * ID of the Youtube channel.
2968
+ */
2969
+ youtubeChannelId?: string | null;
2970
+
2971
+ /**
2972
+ * ID of the Youtube video.
2973
+ */
2974
+ youtubeVideoId?: string | null;
2975
+ }
2976
+
2977
+ export namespace Metadata {
2978
+ export interface Collection {
2979
+ /**
2980
+ * Blockchain address of the collection.
2981
+ */
2982
+ address?: string;
2983
+
2984
+ /**
2985
+ * Multiplier applied to the rewards for this collection.
2986
+ */
2987
+ multiplier?: number;
2988
+
2989
+ /**
2990
+ * Blockchain network of the collection.
2991
+ */
2992
+ network?:
2993
+ | 'abstract'
2994
+ | 'abstractTestnet'
2995
+ | 'apechain'
2996
+ | 'arbitrum'
2997
+ | 'avalanche'
2998
+ | 'avalancheFuji'
2999
+ | 'base'
3000
+ | 'baseSepolia'
3001
+ | 'berachain'
3002
+ | 'berachainArtio'
3003
+ | 'berachainBepolia'
3004
+ | 'binance'
3005
+ | 'bscTestnet'
3006
+ | 'campTestnet'
3007
+ | 'fantom'
3008
+ | 'fantomTestnet'
3009
+ | 'flowMainnet'
3010
+ | 'mainnet'
3011
+ | 'optimism'
3012
+ | 'polygon'
3013
+ | 'polygon_mumbai'
3014
+ | 'skaleNebula'
3015
+ | 'solana'
3016
+ | 'sophon'
3017
+ | 'sophonTestnet'
3018
+ | 'sui'
3019
+ | 'superseed'
3020
+ | 'superseedSepolia'
3021
+ | 'vanar'
3022
+ | 'xai'
3023
+ | 'zksync'
3024
+ | 'coti'
3025
+ | 'cotiTestnet'
3026
+ | 'morph'
3027
+ | 'morphTestnet'
3028
+ | 'morphHolesky'
3029
+ | 'nitrograph'
3030
+ | 'sepolia'
3031
+ | 'optimism_sepolia'
3032
+ | 'arbitrumSepolia'
3033
+ | 'goerli'
3034
+ | 'optimism_goerli'
3035
+ | 'arbitrumGoerli'
3036
+ | 'basecamp';
3037
+ }
3038
+
3039
+ /**
3040
+ * Object containing details for the call-to-action.
3041
+ */
3042
+ export interface Cta {
3043
+ /**
3044
+ * Link for the call-to-action.
3045
+ */
3046
+ href?: string | null;
3047
+
3048
+ /**
3049
+ * Label for the call-to-action.
3050
+ */
3051
+ label?: string | null;
3052
+ }
3053
+
3054
+ export interface DiscordServersToJoin {
3055
+ /**
3056
+ * ID of the Discord server to join.
3057
+ */
3058
+ id?: string;
3059
+
3060
+ /**
3061
+ * Array of Discord channels to join.
3062
+ */
3063
+ channels?: Array<DiscordServersToJoin.Channel>;
3064
+
3065
+ /**
3066
+ * Array of roles to assign in the Discord server.
3067
+ */
3068
+ roles?: Array<DiscordServersToJoin.Role>;
3069
+ }
3070
+
3071
+ export namespace DiscordServersToJoin {
3072
+ export interface Channel {
3073
+ /**
3074
+ * ID of the Discord channel.
3075
+ */
3076
+ id?: string;
3077
+
3078
+ /**
3079
+ * Array of emojis used in the channel.
3080
+ */
3081
+ emojis?: Array<Channel.Emoji>;
3082
+
3083
+ /**
3084
+ * Phrase of text to be present in the discord message
3085
+ */
3086
+ text?: string;
3087
+ }
3088
+
3089
+ export namespace Channel {
3090
+ export interface Emoji {
3091
+ /**
3092
+ * ID of the emoji used in the channel.
3093
+ */
3094
+ id?: string;
3095
+ }
3096
+ }
3097
+
3098
+ export interface Role {
3099
+ /**
3100
+ * ID of the role in the Discord server.
3101
+ */
3102
+ id: string;
3103
+ }
3104
+ }
3105
+
3106
+ export interface DripQuestsToComplete {
3107
+ /**
3108
+ * ID of the drip quest to complete.
3109
+ */
3110
+ id: string;
3111
+ }
3112
+
3113
+ /**
3114
+ * Liquidity pool details.
3115
+ */
3116
+ export interface Liquidity {
3117
+ /**
3118
+ * Calculation type of the liquidity pool.
3119
+ */
3120
+ calculationType?: 'fixed' | 'custom';
3121
+
3122
+ /**
3123
+ * Custom function to calculate the the reward amount based on the liquidity
3124
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
3125
+ * USD.
3126
+ */
3127
+ customFunction?: string;
3128
+
3129
+ /**
3130
+ * Liquidity provided per day in USD
3131
+ */
3132
+ liquidityPerDay?: number;
3133
+
3134
+ /**
3135
+ * Blockchain network of the liquidity pool.
3136
+ */
3137
+ network?:
3138
+ | 'abstract'
3139
+ | 'abstractTestnet'
3140
+ | 'apechain'
3141
+ | 'arbitrum'
3142
+ | 'avalanche'
3143
+ | 'avalancheFuji'
3144
+ | 'base'
3145
+ | 'baseSepolia'
3146
+ | 'berachain'
3147
+ | 'berachainArtio'
3148
+ | 'berachainBepolia'
3149
+ | 'binance'
3150
+ | 'bscTestnet'
3151
+ | 'campTestnet'
3152
+ | 'fantom'
3153
+ | 'fantomTestnet'
3154
+ | 'flowMainnet'
3155
+ | 'mainnet'
3156
+ | 'optimism'
3157
+ | 'polygon'
3158
+ | 'polygon_mumbai'
3159
+ | 'skaleNebula'
3160
+ | 'solana'
3161
+ | 'sophon'
3162
+ | 'sophonTestnet'
3163
+ | 'sui'
3164
+ | 'superseed'
3165
+ | 'superseedSepolia'
3166
+ | 'vanar'
3167
+ | 'xai'
3168
+ | 'zksync'
3169
+ | 'coti'
3170
+ | 'cotiTestnet'
3171
+ | 'morph'
3172
+ | 'morphTestnet'
3173
+ | 'morphHolesky'
3174
+ | 'nitrograph'
3175
+ | 'sepolia'
3176
+ | 'optimism_sepolia'
3177
+ | 'arbitrumSepolia'
3178
+ | 'goerli'
3179
+ | 'optimism_goerli'
3180
+ | 'arbitrumGoerli'
3181
+ | 'basecamp';
3182
+
3183
+ /**
3184
+ * Indicates if only in-range liquidity is rewarded.
3185
+ */
3186
+ onlyRewardInRangeLiquidity?: boolean;
3187
+
3188
+ /**
3189
+ * Array of liquidity pools associated with the rule.
3190
+ */
3191
+ pools?: Array<Liquidity.Pool>;
3192
+
3193
+ /**
3194
+ * Protocol of the liquidity pool.
3195
+ */
3196
+ protocol?: string;
3197
+ }
3198
+
3199
+ export namespace Liquidity {
3200
+ export interface Pool {
3201
+ /**
3202
+ * Unique identifier of the liquidity pool.
3203
+ */
3204
+ id: string;
3205
+ }
3206
+ }
3207
+
3208
+ export interface Range {
3209
+ /**
3210
+ * Reward amount for this range.
3211
+ */
3212
+ amount: number;
3213
+
3214
+ /**
3215
+ * End value of the range.
3216
+ */
3217
+ endRange: number;
3218
+
3219
+ /**
3220
+ * Start value of the range.
3221
+ */
3222
+ startRange: number;
3223
+
3224
+ /**
3225
+ * ID of the loyalty badge for this range.
3226
+ */
3227
+ loyaltyBadgeId?: string;
3228
+
3229
+ /**
3230
+ * Amount of the loyalty multiplier for this range.
3231
+ */
3232
+ loyaltyMultiplierAmount?: number;
3233
+ }
3234
+
3235
+ /**
3236
+ * Object defining referral requirements.
3237
+ */
3238
+ export interface ReferralRequirements {
3239
+ /**
3240
+ * Flag indicating if achieving points is required.
3241
+ */
3242
+ achievePoints?: boolean | null;
3243
+
3244
+ /**
3245
+ * Flag indicating if completing the profile is required.
3246
+ */
3247
+ completeProfile?: boolean | null;
3248
+
3249
+ /**
3250
+ * Flag indicating if connecting Discord is required.
3251
+ */
3252
+ connectDiscord?: boolean | null;
3253
+
3254
+ /**
3255
+ * Flag indicating if connecting email is required.
3256
+ */
3257
+ connectEmail?: boolean | null;
3258
+
3259
+ /**
3260
+ * Flag indicating if connecting Twitter is required.
3261
+ */
3262
+ connectTwitter?: boolean | null;
3263
+
3264
+ points?: ReferralRequirements.Points | null;
3265
+ }
3266
+
3267
+ export namespace ReferralRequirements {
3268
+ export interface Points {
3269
+ /**
3270
+ * Points required for referral.
3271
+ */
3272
+ amount?: number | null;
3273
+
3274
+ /**
3275
+ * ID of the loyalty currency for referral.
3276
+ */
3277
+ loyaltyCurrecyId?: string | null;
3278
+ }
3279
+ }
3280
+
3281
+ /**
3282
+ * Object containing details of the associated smart contract.
3283
+ */
3284
+ export interface SmartContract {
3285
+ /**
3286
+ * Mapping of addresses for the smart contract.
3287
+ */
3288
+ addressMapping?: string | null;
3289
+
3290
+ /**
3291
+ * Object containing details of the amount multiplier from the event.
3292
+ */
3293
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3294
+
3295
+ /**
3296
+ * ID of the smart contract.
3297
+ */
3298
+ contractId?: string | null;
3299
+
3300
+ /**
3301
+ * Criteria to evaluate the smart contract event.
3302
+ */
3303
+ criteria?: 'everyEvent' | 'byParameter' | null;
3304
+
3305
+ /**
3306
+ * Event emitted by the smart contract.
3307
+ */
3308
+ event?: string | null;
3309
+
3310
+ /**
3311
+ * Array of parameters for the smart contract.
3312
+ */
3313
+ params?: Array<SmartContract.Param> | null;
3314
+
3315
+ /**
3316
+ * Type of the smart contract interaction.
3317
+ */
3318
+ type?: 'function' | 'event' | null;
3319
+ }
3320
+
3321
+ export namespace SmartContract {
3322
+ /**
3323
+ * Object containing details of the amount multiplier from the event.
3324
+ */
3325
+ export interface AmountMultiplier {
3326
+ /**
3327
+ * Mapping of the value for the smart contract.
3328
+ */
3329
+ valueMapping?: string | null;
3330
+ }
3331
+
3332
+ export interface Param {
3333
+ /**
3334
+ * Condition to check for the parameter.
3335
+ */
3336
+ condition?: string | null;
3337
+
3338
+ /**
3339
+ * Name of the smart contract parameter.
3340
+ */
3341
+ name?: string | null;
3342
+
3343
+ /**
3344
+ * Value of the parameter.
3345
+ */
3346
+ value?: string | null;
3347
+ }
3348
+ }
3349
+
3350
+ export interface SnapshotProposal {
3351
+ /**
3352
+ * ID of the snapshot proposal.
3353
+ */
3354
+ id: string;
3355
+
3356
+ /**
3357
+ * Space associated with the snapshot proposal.
3358
+ */
3359
+ space: string;
3360
+ }
3361
+
3362
+ export interface StreakArray {
3363
+ /**
3364
+ * Reward amount for achieving the streak milestone.
3365
+ */
3366
+ streakAmount: number;
3367
+
3368
+ /**
3369
+ * Milestone required to achieve the streak.
3370
+ */
3371
+ streakMilestone: number;
3372
+ }
3373
+
3374
+ /**
3375
+ * Metadata for swap loyalty rules
3376
+ */
3377
+ export interface Swap {
3378
+ provider?: 'any' | 'relay' | 'lifi';
1746
3379
 
1747
- /**
1748
- * Frequency of the loyalty rule
1749
- */
1750
- frequency: string;
3380
+ relayReferrerId?: string;
1751
3381
 
1752
- /**
1753
- * Unique identifier for the organization
1754
- */
1755
- organizationId: string;
3382
+ requireCrossChainSwap?: boolean;
1756
3383
 
1757
- /**
1758
- * Type of the loyalty rule
1759
- */
1760
- type: string;
3384
+ swappedToChain?: 'any' | number | string;
1761
3385
 
1762
- /**
1763
- * Timestamp when the loyalty rule was last updated
1764
- */
1765
- updatedAt: string;
3386
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1766
3387
 
1767
- /**
1768
- * Unique identifier for the website
1769
- */
1770
- websiteId: string;
3388
+ tokenMode?: 'any' | 'specific';
1771
3389
 
1772
- /**
1773
- * Optional address of the collection
1774
- */
1775
- collectionAddress?: string;
3390
+ trackTokenAmount?: boolean;
3391
+ }
1776
3392
 
1777
- /**
1778
- * Optional metadata for the loyalty rule
1779
- */
1780
- metadata?: Record<string, unknown>;
3393
+ export namespace Swap {
3394
+ export interface SwappedToToken {
3395
+ address: string;
3396
+
3397
+ chainId: string;
3398
+ }
3399
+ }
3400
+ }
1781
3401
  }
1782
3402
  }
1783
3403
 
@@ -1788,14 +3408,16 @@ export interface RuleDeleteResponse {
1788
3408
  }
1789
3409
 
1790
3410
  export interface RuleCompleteResponse {
1791
- message: string;
3411
+ message:
3412
+ | 'Completion request added to queue'
3413
+ | 'Link click being verified, come back later to check the status';
1792
3414
  }
1793
3415
 
1794
- export interface RuleStatusResponse {
1795
- data: Array<RuleStatusResponse.Data>;
3416
+ export interface RuleGetStatusResponse {
3417
+ data: Array<RuleGetStatusResponse.Data>;
1796
3418
  }
1797
3419
 
1798
- export namespace RuleStatusResponse {
3420
+ export namespace RuleGetStatusResponse {
1799
3421
  export interface Data {
1800
3422
  loyaltyRuleId: string;
1801
3423
 
@@ -1912,7 +3534,18 @@ export interface RuleCreateParams {
1912
3534
  | 'twitter_follow'
1913
3535
  | 'twitter_followers'
1914
3536
  | 'twitter_like'
1915
- | 'twitter_post_hashtag';
3537
+ | 'twitter_post_hashtag'
3538
+ | 'quiz'
3539
+ | 'poll'
3540
+ | 'steam_wishlist'
3541
+ | 'liquidity_uniswap_v2'
3542
+ | 'liquidity_uniswap_v3'
3543
+ | 'points_airdrop'
3544
+ | 'youtube_subscribers'
3545
+ | 'youtube_comment'
3546
+ | 'shopify_spend'
3547
+ | 'swap'
3548
+ | 'tiktok_post';
1916
3549
 
1917
3550
  /**
1918
3551
  * Unique identifier for the associated website
@@ -1949,6 +3582,11 @@ export interface RuleCreateParams {
1949
3582
  */
1950
3583
  description?: string;
1951
3584
 
3585
+ /**
3586
+ * ID of the external integration
3587
+ */
3588
+ externalIntegrationId?: string | null;
3589
+
1952
3590
  /**
1953
3591
  * Whether to hide this rule in the user interface
1954
3592
  */
@@ -1957,51 +3595,93 @@ export interface RuleCreateParams {
1957
3595
  /**
1958
3596
  * Interval between rule executions
1959
3597
  */
1960
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
3598
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
1961
3599
 
1962
3600
  /**
1963
3601
  * Whether this rule is mandatory
1964
3602
  */
1965
3603
  isRequired?: boolean;
1966
3604
 
3605
+ /**
3606
+ * Unique identifier for the loyalty badge
3607
+ */
3608
+ loyaltyBadgeId?: string | null;
3609
+
1967
3610
  /**
1968
3611
  * Unique identifier for the loyalty rule group
1969
3612
  */
1970
3613
  loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
1971
3614
 
3615
+ /**
3616
+ * URL for uploading loyalty user allotment via CSV
3617
+ */
3618
+ loyaltyUserAllotmentCsvUrl?: string;
3619
+
3620
+ /**
3621
+ * The interval for the max amount. Available for the smart contract and external
3622
+ * rules.
3623
+ */
3624
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
3625
+
3626
+ /**
3627
+ * The maximum amount of points a user can earn per interval. Available for the
3628
+ * smart contract and external rules.
3629
+ */
3630
+ maxAmountPerInterval?: number | null;
3631
+
3632
+ /**
3633
+ * URL of the media to be displayed
3634
+ */
3635
+ mediaUrl?: string | null;
3636
+
1972
3637
  /**
1973
3638
  * Blockchain network where the rule will apply
1974
3639
  */
1975
3640
  network?:
1976
- | 'mainnet'
1977
- | 'polygon'
1978
- | 'polygon_mumbai'
1979
- | 'optimism'
3641
+ | 'abstract'
3642
+ | 'abstractTestnet'
3643
+ | 'apechain'
1980
3644
  | 'arbitrum'
1981
- | 'binance'
1982
- | 'bscTestnet'
1983
3645
  | 'avalanche'
1984
3646
  | 'avalancheFuji'
1985
- | 'zksync'
1986
- | 'fantom'
1987
- | 'fantomTestnet'
1988
3647
  | 'base'
1989
3648
  | 'baseSepolia'
1990
- | 'skaleNebula'
1991
- | 'xai'
3649
+ | 'berachain'
1992
3650
  | 'berachainArtio'
1993
- | 'solana'
1994
- | 'apechain'
1995
- | 'flowMainnet'
3651
+ | 'berachainBepolia'
3652
+ | 'binance'
3653
+ | 'bscTestnet'
1996
3654
  | 'campTestnet'
3655
+ | 'fantom'
3656
+ | 'fantomTestnet'
3657
+ | 'flowMainnet'
3658
+ | 'mainnet'
3659
+ | 'optimism'
3660
+ | 'polygon'
3661
+ | 'polygon_mumbai'
3662
+ | 'skaleNebula'
3663
+ | 'solana'
3664
+ | 'sophon'
3665
+ | 'sophonTestnet'
1997
3666
  | 'sui'
3667
+ | 'superseed'
3668
+ | 'superseedSepolia'
1998
3669
  | 'vanar'
3670
+ | 'xai'
3671
+ | 'zksync'
3672
+ | 'coti'
3673
+ | 'cotiTestnet'
3674
+ | 'morph'
3675
+ | 'morphTestnet'
3676
+ | 'morphHolesky'
3677
+ | 'nitrograph'
1999
3678
  | 'sepolia'
2000
3679
  | 'optimism_sepolia'
2001
3680
  | 'arbitrumSepolia'
2002
3681
  | 'goerli'
2003
3682
  | 'optimism_goerli'
2004
- | 'arbitrumGoerli';
3683
+ | 'arbitrumGoerli'
3684
+ | 'basecamp';
2005
3685
 
2006
3686
  /**
2007
3687
  * OAuth credentials associated with the rule
@@ -2011,12 +3691,17 @@ export interface RuleCreateParams {
2011
3691
  /**
2012
3692
  * Type of reward issued by the rule
2013
3693
  */
2014
- rewardType?: 'points' | 'multiplier';
3694
+ rewardType?: 'points' | 'multiplier' | 'badge';
3695
+
3696
+ /**
3697
+ * URL of the Shopify store
3698
+ */
3699
+ shopifyStoreUrl?: string | null;
2015
3700
 
2016
3701
  /**
2017
- * Identifier for associated subscriptions
3702
+ * Optional subscription id for the rule
2018
3703
  */
2019
- subscriptionIdentifier?: string | null;
3704
+ subscriptionId?: string | null;
2020
3705
  }
2021
3706
 
2022
3707
  export namespace RuleCreateParams {
@@ -2024,6 +3709,11 @@ export namespace RuleCreateParams {
2024
3709
  * Additional metadata for the loyalty rule
2025
3710
  */
2026
3711
  export interface Metadata {
3712
+ /**
3713
+ * Number of tokens per batch.
3714
+ */
3715
+ batchSize?: number | null;
3716
+
2027
3717
  /**
2028
3718
  * Text displayed on the action button.
2029
3719
  */
@@ -2054,6 +3744,11 @@ export namespace RuleCreateParams {
2054
3744
  */
2055
3745
  collection?: Array<Metadata.Collection>;
2056
3746
 
3747
+ /**
3748
+ * Conditions for completing the profile.
3749
+ */
3750
+ completeProfileConditions?: { [key: string]: boolean } | null;
3751
+
2057
3752
  /**
2058
3753
  * Object containing details for the call-to-action.
2059
3754
  */
@@ -2089,11 +3784,21 @@ export namespace RuleCreateParams {
2089
3784
  */
2090
3785
  enableVerifiedMultiplier?: boolean;
2091
3786
 
3787
+ /**
3788
+ * Fill source of the order for the token sale
3789
+ */
3790
+ fillSource?: string;
3791
+
2092
3792
  /**
2093
3793
  * Percentage reward given to a user for their first referral.
2094
3794
  */
2095
3795
  firstReferralReward?: number | null;
2096
3796
 
3797
+ /**
3798
+ * Flag indicating whether the fill source is included.
3799
+ */
3800
+ hasFillSource?: boolean;
3801
+
2097
3802
  /**
2098
3803
  * Indicates if the item has never been sold.
2099
3804
  */
@@ -2119,11 +3824,21 @@ export namespace RuleCreateParams {
2119
3824
  */
2120
3825
  imageUrl?: string | null;
2121
3826
 
3827
+ /**
3828
+ * If enabled, the first transaction done on the platform will complete this rule
3829
+ */
3830
+ isCheckInOnEveryTxn?: boolean;
3831
+
2122
3832
  /**
2123
3833
  * Indicates if the multiplier has been applied to rewards.
2124
3834
  */
2125
3835
  isMultiplierApplied?: boolean;
2126
3836
 
3837
+ /**
3838
+ * Flag indicating if the rule is restricted to new users.
3839
+ */
3840
+ isRestrictedToNewUsers?: boolean;
3841
+
2127
3842
  /**
2128
3843
  * Flag indicating if rewards are applied retroactively.
2129
3844
  */
@@ -2139,6 +3854,11 @@ export namespace RuleCreateParams {
2139
3854
  */
2140
3855
  link?: string | null;
2141
3856
 
3857
+ /**
3858
+ * Liquidity pool details.
3859
+ */
3860
+ liquidity?: Metadata.Liquidity;
3861
+
2142
3862
  /**
2143
3863
  * Maximum quantity constraint for token holding.
2144
3864
  */
@@ -2169,11 +3889,36 @@ export namespace RuleCreateParams {
2169
3889
  */
2170
3890
  onlyNonListed?: boolean;
2171
3891
 
3892
+ /**
3893
+ * Indicates if only existing users are rewarded.
3894
+ */
3895
+ onlyRewardExistingUser?: boolean;
3896
+
3897
+ /**
3898
+ * give points for only one token ownership per contract
3899
+ */
3900
+ onlyRewardSingleTokenOwnership?: boolean | null;
3901
+
2172
3902
  /**
2173
3903
  * Promotional code associated with the rule.
2174
3904
  */
2175
3905
  promoCode?: string;
2176
3906
 
3907
+ /**
3908
+ * URL of the CSV file containing promo codes.
3909
+ */
3910
+ promoCodeCsvUrl?: string;
3911
+
3912
+ /**
3913
+ * Numbers of the promotional code to be generated.
3914
+ */
3915
+ promoCodeLength?: number | null;
3916
+
3917
+ /**
3918
+ * Type of the promotional code.
3919
+ */
3920
+ promoCodeType?: 'code' | 'csv' | 'generate';
3921
+
2177
3922
  /**
2178
3923
  * Array defining ranges and corresponding rewards.
2179
3924
  */
@@ -2189,11 +3934,32 @@ export namespace RuleCreateParams {
2189
3934
  */
2190
3935
  referrerReward?: number | null;
2191
3936
 
3937
+ /**
3938
+ * Loyalty currency ID of the referrer reward.
3939
+ */
3940
+ referrerRewardLoyaltyCurrencyId?: string | null;
3941
+
3942
+ /**
3943
+ * Flag indicating if the rule can also reward badges per range.
3944
+ */
3945
+ rewardBadgePerRange?: boolean;
3946
+
3947
+ /**
3948
+ * Flag indicating if the reward is rewarded by batch.
3949
+ */
3950
+ rewardByBatch?: boolean | null;
3951
+
2192
3952
  /**
2193
3953
  * Flag indicating if rewards are given per impression.
2194
3954
  */
2195
3955
  rewardPerImpression?: boolean | null;
2196
3956
 
3957
+ /**
3958
+ * Flag indicating if the rule should reward based on value of traded tokens
3959
+ * instead of count.
3960
+ */
3961
+ rewardPerValue?: boolean;
3962
+
2197
3963
  /**
2198
3964
  * Currency associated with sales.
2199
3965
  */
@@ -2204,6 +3970,11 @@ export namespace RuleCreateParams {
2204
3970
  */
2205
3971
  secondReferralReward?: number | null;
2206
3972
 
3973
+ /**
3974
+ * Flag indicating if the multiplier is skipped.
3975
+ */
3976
+ skipMultiplier?: boolean | null;
3977
+
2207
3978
  /**
2208
3979
  * Object containing details of the associated smart contract.
2209
3980
  */
@@ -2218,14 +3989,17 @@ export namespace RuleCreateParams {
2218
3989
  * Social media platform associated with the rule.
2219
3990
  */
2220
3991
  socialPlatform?:
2221
- | 'Twitch'
3992
+ | 'Custom'
3993
+ | 'Discord'
3994
+ | 'EpicGames'
3995
+ | 'Instagram'
3996
+ | 'Steam'
3997
+ | 'Telegram'
2222
3998
  | 'TikTok'
3999
+ | 'Twitch'
2223
4000
  | 'X(Twitter)'
2224
- | 'Instagram'
2225
- | 'EpicGames'
2226
4001
  | 'YouTube'
2227
- | 'Discord'
2228
- | 'Custom'
4002
+ | 'Google'
2229
4003
  | null;
2230
4004
 
2231
4005
  /**
@@ -2238,11 +4012,21 @@ export namespace RuleCreateParams {
2238
4012
  */
2239
4013
  socialPlatformName?: string | null;
2240
4014
 
4015
+ /**
4016
+ * ID of the Steam app.
4017
+ */
4018
+ steamAppId?: string | null;
4019
+
2241
4020
  /**
2242
4021
  * Array of streak milestones and corresponding rewards.
2243
4022
  */
2244
4023
  streakArray?: Array<Metadata.StreakArray> | null;
2245
4024
 
4025
+ /**
4026
+ * Metadata for swap loyalty rules
4027
+ */
4028
+ swap?: Metadata.Swap;
4029
+
2246
4030
  /**
2247
4031
  * ID of the Telegram channel.
2248
4032
  */
@@ -2258,6 +4042,12 @@ export namespace RuleCreateParams {
2258
4042
  */
2259
4043
  trackAllContracts?: boolean | null;
2260
4044
 
4045
+ /**
4046
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
4047
+ * completed once the progress is 100%.
4048
+ */
4049
+ trackProgress?: boolean | null;
4050
+
2261
4051
  /**
2262
4052
  * URL of the associated Twitter account.
2263
4053
  */
@@ -2301,7 +4091,17 @@ export namespace RuleCreateParams {
2301
4091
  /**
2302
4092
  * Type of wallet associated with the rule.
2303
4093
  */
2304
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
4094
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
4095
+
4096
+ /**
4097
+ * ID of the Youtube channel.
4098
+ */
4099
+ youtubeChannelId?: string | null;
4100
+
4101
+ /**
4102
+ * ID of the Youtube video.
4103
+ */
4104
+ youtubeVideoId?: string | null;
2305
4105
  }
2306
4106
 
2307
4107
  export namespace Metadata {
@@ -2320,35 +4120,50 @@ export namespace RuleCreateParams {
2320
4120
  * Blockchain network of the collection.
2321
4121
  */
2322
4122
  network?:
2323
- | 'mainnet'
2324
- | 'polygon'
2325
- | 'polygon_mumbai'
2326
- | 'optimism'
4123
+ | 'abstract'
4124
+ | 'abstractTestnet'
4125
+ | 'apechain'
2327
4126
  | 'arbitrum'
2328
- | 'binance'
2329
- | 'bscTestnet'
2330
4127
  | 'avalanche'
2331
4128
  | 'avalancheFuji'
2332
- | 'zksync'
2333
- | 'fantom'
2334
- | 'fantomTestnet'
2335
4129
  | 'base'
2336
4130
  | 'baseSepolia'
2337
- | 'skaleNebula'
2338
- | 'xai'
4131
+ | 'berachain'
2339
4132
  | 'berachainArtio'
2340
- | 'solana'
2341
- | 'apechain'
2342
- | 'flowMainnet'
4133
+ | 'berachainBepolia'
4134
+ | 'binance'
4135
+ | 'bscTestnet'
2343
4136
  | 'campTestnet'
4137
+ | 'fantom'
4138
+ | 'fantomTestnet'
4139
+ | 'flowMainnet'
4140
+ | 'mainnet'
4141
+ | 'optimism'
4142
+ | 'polygon'
4143
+ | 'polygon_mumbai'
4144
+ | 'skaleNebula'
4145
+ | 'solana'
4146
+ | 'sophon'
4147
+ | 'sophonTestnet'
2344
4148
  | 'sui'
4149
+ | 'superseed'
4150
+ | 'superseedSepolia'
2345
4151
  | 'vanar'
4152
+ | 'xai'
4153
+ | 'zksync'
4154
+ | 'coti'
4155
+ | 'cotiTestnet'
4156
+ | 'morph'
4157
+ | 'morphTestnet'
4158
+ | 'morphHolesky'
4159
+ | 'nitrograph'
2346
4160
  | 'sepolia'
2347
4161
  | 'optimism_sepolia'
2348
4162
  | 'arbitrumSepolia'
2349
4163
  | 'goerli'
2350
4164
  | 'optimism_goerli'
2351
- | 'arbitrumGoerli';
4165
+ | 'arbitrumGoerli'
4166
+ | 'basecamp';
2352
4167
  }
2353
4168
 
2354
4169
  /**
@@ -2394,6 +4209,11 @@ export namespace RuleCreateParams {
2394
4209
  * Array of emojis used in the channel.
2395
4210
  */
2396
4211
  emojis?: Array<Channel.Emoji>;
4212
+
4213
+ /**
4214
+ * Phrase of text to be present in the discord message
4215
+ */
4216
+ text?: string;
2397
4217
  }
2398
4218
 
2399
4219
  export namespace Channel {
@@ -2405,21 +4225,116 @@ export namespace RuleCreateParams {
2405
4225
  }
2406
4226
  }
2407
4227
 
2408
- export interface Role {
4228
+ export interface Role {
4229
+ /**
4230
+ * ID of the role in the Discord server.
4231
+ */
4232
+ id: string;
4233
+ }
4234
+ }
4235
+
4236
+ export interface DripQuestsToComplete {
4237
+ /**
4238
+ * ID of the drip quest to complete.
4239
+ */
4240
+ id: string;
4241
+ }
4242
+
4243
+ /**
4244
+ * Liquidity pool details.
4245
+ */
4246
+ export interface Liquidity {
4247
+ /**
4248
+ * Calculation type of the liquidity pool.
4249
+ */
4250
+ calculationType?: 'fixed' | 'custom';
4251
+
4252
+ /**
4253
+ * Custom function to calculate the the reward amount based on the liquidity
4254
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
4255
+ * USD.
4256
+ */
4257
+ customFunction?: string;
4258
+
4259
+ /**
4260
+ * Liquidity provided per day in USD
4261
+ */
4262
+ liquidityPerDay?: number;
4263
+
4264
+ /**
4265
+ * Blockchain network of the liquidity pool.
4266
+ */
4267
+ network?:
4268
+ | 'abstract'
4269
+ | 'abstractTestnet'
4270
+ | 'apechain'
4271
+ | 'arbitrum'
4272
+ | 'avalanche'
4273
+ | 'avalancheFuji'
4274
+ | 'base'
4275
+ | 'baseSepolia'
4276
+ | 'berachain'
4277
+ | 'berachainArtio'
4278
+ | 'berachainBepolia'
4279
+ | 'binance'
4280
+ | 'bscTestnet'
4281
+ | 'campTestnet'
4282
+ | 'fantom'
4283
+ | 'fantomTestnet'
4284
+ | 'flowMainnet'
4285
+ | 'mainnet'
4286
+ | 'optimism'
4287
+ | 'polygon'
4288
+ | 'polygon_mumbai'
4289
+ | 'skaleNebula'
4290
+ | 'solana'
4291
+ | 'sophon'
4292
+ | 'sophonTestnet'
4293
+ | 'sui'
4294
+ | 'superseed'
4295
+ | 'superseedSepolia'
4296
+ | 'vanar'
4297
+ | 'xai'
4298
+ | 'zksync'
4299
+ | 'coti'
4300
+ | 'cotiTestnet'
4301
+ | 'morph'
4302
+ | 'morphTestnet'
4303
+ | 'morphHolesky'
4304
+ | 'nitrograph'
4305
+ | 'sepolia'
4306
+ | 'optimism_sepolia'
4307
+ | 'arbitrumSepolia'
4308
+ | 'goerli'
4309
+ | 'optimism_goerli'
4310
+ | 'arbitrumGoerli'
4311
+ | 'basecamp';
4312
+
4313
+ /**
4314
+ * Indicates if only in-range liquidity is rewarded.
4315
+ */
4316
+ onlyRewardInRangeLiquidity?: boolean;
4317
+
4318
+ /**
4319
+ * Array of liquidity pools associated with the rule.
4320
+ */
4321
+ pools?: Array<Liquidity.Pool>;
4322
+
4323
+ /**
4324
+ * Protocol of the liquidity pool.
4325
+ */
4326
+ protocol?: string;
4327
+ }
4328
+
4329
+ export namespace Liquidity {
4330
+ export interface Pool {
2409
4331
  /**
2410
- * ID of the role in the Discord server.
4332
+ * Unique identifier of the liquidity pool.
2411
4333
  */
2412
4334
  id: string;
2413
4335
  }
2414
4336
  }
2415
4337
 
2416
- export interface DripQuestsToComplete {
2417
- /**
2418
- * ID of the drip quest to complete.
2419
- */
2420
- id: string;
2421
- }
2422
-
2423
4338
  export interface Range {
2424
4339
  /**
2425
4340
  * Reward amount for this range.
@@ -2435,6 +4350,16 @@ export namespace RuleCreateParams {
2435
4350
  * Start value of the range.
2436
4351
  */
2437
4352
  startRange: number;
4353
+
4354
+ /**
4355
+ * ID of the loyalty badge for this range.
4356
+ */
4357
+ loyaltyBadgeId?: string;
4358
+
4359
+ /**
4360
+ * Amount of the loyalty multiplier for this range.
4361
+ */
4362
+ loyaltyMultiplierAmount?: number;
2438
4363
  }
2439
4364
 
2440
4365
  /**
@@ -2487,20 +4412,15 @@ export namespace RuleCreateParams {
2487
4412
  * Object containing details of the associated smart contract.
2488
4413
  */
2489
4414
  export interface SmartContract {
2490
- /**
2491
- * ABI of the smart contract.
2492
- */
2493
- abi?: string | null;
2494
-
2495
4415
  /**
2496
4416
  * Mapping of addresses for the smart contract.
2497
4417
  */
2498
4418
  addressMapping?: string | null;
2499
4419
 
2500
4420
  /**
2501
- * Array of bonus details applied to the rule.
4421
+ * Object containing details of the amount multiplier from the event.
2502
4422
  */
2503
- bonus?: Array<SmartContract.Bonus> | null;
4423
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
2504
4424
 
2505
4425
  /**
2506
4426
  * ID of the smart contract.
@@ -2512,68 +4432,31 @@ export namespace RuleCreateParams {
2512
4432
  */
2513
4433
  criteria?: 'everyEvent' | 'byParameter' | null;
2514
4434
 
2515
- /**
2516
- * Time range applied to the rule.
2517
- */
2518
- customRange?: SmartContract.CustomRange | null;
2519
-
2520
4435
  /**
2521
4436
  * Event emitted by the smart contract.
2522
4437
  */
2523
4438
  event?: string | null;
2524
4439
 
2525
- /**
2526
- * Maximum value allowed for the parameter.
2527
- */
2528
- max?: number | null;
2529
-
2530
4440
  /**
2531
4441
  * Array of parameters for the smart contract.
2532
4442
  */
2533
4443
  params?: Array<SmartContract.Param> | null;
2534
4444
 
2535
4445
  /**
2536
- * Flag indicating if a bonus is applied.
2537
- */
2538
- withBonus?: boolean | null;
2539
-
2540
- /**
2541
- * Flag indicating if a custom range is applied.
2542
- */
2543
- withCustomRange?: boolean | null;
2544
-
2545
- /**
2546
- * Flag indicating if a maximum limit is applied.
4446
+ * Type of the smart contract interaction.
2547
4447
  */
2548
- withMax?: boolean | null;
4448
+ type?: 'function' | 'event' | null;
2549
4449
  }
2550
4450
 
2551
4451
  export namespace SmartContract {
2552
- export interface Bonus {
2553
- /**
2554
- * Amount of the bonus.
2555
- */
2556
- amount?: number | null;
2557
-
2558
- /**
2559
- * Number of times the bonus is applied.
2560
- */
2561
- count?: number | null;
2562
- }
2563
-
2564
4452
  /**
2565
- * Time range applied to the rule.
4453
+ * Object containing details of the amount multiplier from the event.
2566
4454
  */
2567
- export interface CustomRange {
2568
- /**
2569
- * End time of the custom range.
2570
- */
2571
- endsAt?: string | null;
2572
-
4455
+ export interface AmountMultiplier {
2573
4456
  /**
2574
- * Start time of the custom range.
4457
+ * Mapping of the value for the smart contract.
2575
4458
  */
2576
- startsAt?: string | null;
4459
+ valueMapping?: string | null;
2577
4460
  }
2578
4461
 
2579
4462
  export interface Param {
@@ -2617,6 +4500,33 @@ export namespace RuleCreateParams {
2617
4500
  */
2618
4501
  streakMilestone: number;
2619
4502
  }
4503
+
4504
+ /**
4505
+ * Metadata for swap loyalty rules
4506
+ */
4507
+ export interface Swap {
4508
+ provider?: 'any' | 'relay' | 'lifi';
4509
+
4510
+ relayReferrerId?: string;
4511
+
4512
+ requireCrossChainSwap?: boolean;
4513
+
4514
+ swappedToChain?: 'any' | number | string;
4515
+
4516
+ swappedToTokens?: Array<Swap.SwappedToToken>;
4517
+
4518
+ tokenMode?: 'any' | 'specific';
4519
+
4520
+ trackTokenAmount?: boolean;
4521
+ }
4522
+
4523
+ export namespace Swap {
4524
+ export interface SwappedToToken {
4525
+ address: string;
4526
+
4527
+ chainId: string;
4528
+ }
4529
+ }
2620
4530
  }
2621
4531
 
2622
4532
  export interface Collection {
@@ -2629,35 +4539,50 @@ export namespace RuleCreateParams {
2629
4539
  * Blockchain network for the collection
2630
4540
  */
2631
4541
  network:
2632
- | 'mainnet'
2633
- | 'polygon'
2634
- | 'polygon_mumbai'
2635
- | 'optimism'
4542
+ | 'abstract'
4543
+ | 'abstractTestnet'
4544
+ | 'apechain'
2636
4545
  | 'arbitrum'
2637
- | 'binance'
2638
- | 'bscTestnet'
2639
4546
  | 'avalanche'
2640
4547
  | 'avalancheFuji'
2641
- | 'zksync'
2642
- | 'fantom'
2643
- | 'fantomTestnet'
2644
4548
  | 'base'
2645
4549
  | 'baseSepolia'
2646
- | 'skaleNebula'
2647
- | 'xai'
4550
+ | 'berachain'
2648
4551
  | 'berachainArtio'
2649
- | 'solana'
2650
- | 'apechain'
2651
- | 'flowMainnet'
4552
+ | 'berachainBepolia'
4553
+ | 'binance'
4554
+ | 'bscTestnet'
2652
4555
  | 'campTestnet'
4556
+ | 'fantom'
4557
+ | 'fantomTestnet'
4558
+ | 'flowMainnet'
4559
+ | 'mainnet'
4560
+ | 'optimism'
4561
+ | 'polygon'
4562
+ | 'polygon_mumbai'
4563
+ | 'skaleNebula'
4564
+ | 'solana'
4565
+ | 'sophon'
4566
+ | 'sophonTestnet'
2653
4567
  | 'sui'
4568
+ | 'superseed'
4569
+ | 'superseedSepolia'
2654
4570
  | 'vanar'
4571
+ | 'xai'
4572
+ | 'zksync'
4573
+ | 'coti'
4574
+ | 'cotiTestnet'
4575
+ | 'morph'
4576
+ | 'morphTestnet'
4577
+ | 'morphHolesky'
4578
+ | 'nitrograph'
2655
4579
  | 'sepolia'
2656
4580
  | 'optimism_sepolia'
2657
4581
  | 'arbitrumSepolia'
2658
4582
  | 'goerli'
2659
4583
  | 'optimism_goerli'
2660
- | 'arbitrumGoerli';
4584
+ | 'arbitrumGoerli'
4585
+ | 'basecamp';
2661
4586
  }
2662
4587
  }
2663
4588
 
@@ -2667,41 +4592,16 @@ export interface RuleUpdateParams {
2667
4592
  */
2668
4593
  amount: unknown;
2669
4594
 
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
4595
  /**
2681
4596
  * End time for the loyalty rule
2682
4597
  */
2683
4598
  endTime: string | null;
2684
4599
 
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
4600
  /**
2696
4601
  * Name of the loyalty rule
2697
4602
  */
2698
4603
  name: string;
2699
4604
 
2700
- /**
2701
- * Start time for the loyalty rule
2702
- */
2703
- startTime: string | null;
2704
-
2705
4605
  /**
2706
4606
  * Blockchain address of the associated collection
2707
4607
  */
@@ -2727,6 +4627,26 @@ export interface RuleUpdateParams {
2727
4627
  */
2728
4628
  description?: string;
2729
4629
 
4630
+ /**
4631
+ * Effective end time of the rule
4632
+ */
4633
+ effectiveEndTime?: string | null;
4634
+
4635
+ /**
4636
+ * Effective start time of the rule
4637
+ */
4638
+ effectiveStartTime?: string | null;
4639
+
4640
+ /**
4641
+ * ID of the external integration
4642
+ */
4643
+ externalIntegrationId?: string | null;
4644
+
4645
+ /**
4646
+ * Frequency of the rule execution
4647
+ */
4648
+ frequency?: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
4649
+
2730
4650
  /**
2731
4651
  * Whether to hide this rule in the user interface
2732
4652
  */
@@ -2735,7 +4655,7 @@ export interface RuleUpdateParams {
2735
4655
  /**
2736
4656
  * Time interval for recurring rule execution
2737
4657
  */
2738
- interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
4658
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | 'custom' | 'every_message' | null;
2739
4659
 
2740
4660
  /**
2741
4661
  * Whether this rule is required for participation
@@ -2747,39 +4667,76 @@ export interface RuleUpdateParams {
2747
4667
  */
2748
4668
  loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
2749
4669
 
4670
+ /**
4671
+ * The interval for the max amount. Available for the smart contract and external
4672
+ * rules.
4673
+ */
4674
+ maxAmountInterval?: 'daily' | 'weekly' | 'monthly' | 'lifetime' | null;
4675
+
4676
+ /**
4677
+ * The maximum amount of points a user can earn per interval. Available for the
4678
+ * smart contract and external rules.
4679
+ */
4680
+ maxAmountPerInterval?: number | null;
4681
+
4682
+ /**
4683
+ * URL of the media to be displayed
4684
+ */
4685
+ mediaUrl?: string | null;
4686
+
4687
+ /**
4688
+ * Additional metadata for the loyalty rule
4689
+ */
4690
+ metadata?: RuleUpdateParams.Metadata;
4691
+
2750
4692
  /**
2751
4693
  * Blockchain network where the rule will apply
2752
4694
  */
2753
4695
  network?:
2754
- | 'mainnet'
2755
- | 'polygon'
2756
- | 'polygon_mumbai'
2757
- | 'optimism'
4696
+ | 'abstract'
4697
+ | 'abstractTestnet'
4698
+ | 'apechain'
2758
4699
  | 'arbitrum'
2759
- | 'binance'
2760
- | 'bscTestnet'
2761
4700
  | 'avalanche'
2762
4701
  | 'avalancheFuji'
2763
- | 'zksync'
2764
- | 'fantom'
2765
- | 'fantomTestnet'
2766
4702
  | 'base'
2767
4703
  | 'baseSepolia'
2768
- | 'skaleNebula'
2769
- | 'xai'
4704
+ | 'berachain'
2770
4705
  | 'berachainArtio'
2771
- | 'solana'
2772
- | 'apechain'
2773
- | 'flowMainnet'
4706
+ | 'berachainBepolia'
4707
+ | 'binance'
4708
+ | 'bscTestnet'
2774
4709
  | 'campTestnet'
4710
+ | 'fantom'
4711
+ | 'fantomTestnet'
4712
+ | 'flowMainnet'
4713
+ | 'mainnet'
4714
+ | 'optimism'
4715
+ | 'polygon'
4716
+ | 'polygon_mumbai'
4717
+ | 'skaleNebula'
4718
+ | 'solana'
4719
+ | 'sophon'
4720
+ | 'sophonTestnet'
2775
4721
  | 'sui'
4722
+ | 'superseed'
4723
+ | 'superseedSepolia'
2776
4724
  | 'vanar'
4725
+ | 'xai'
4726
+ | 'zksync'
4727
+ | 'coti'
4728
+ | 'cotiTestnet'
4729
+ | 'morph'
4730
+ | 'morphTestnet'
4731
+ | 'morphHolesky'
4732
+ | 'nitrograph'
2777
4733
  | 'sepolia'
2778
4734
  | 'optimism_sepolia'
2779
4735
  | 'arbitrumSepolia'
2780
4736
  | 'goerli'
2781
4737
  | 'optimism_goerli'
2782
- | 'arbitrumGoerli';
4738
+ | 'arbitrumGoerli'
4739
+ | 'basecamp';
2783
4740
 
2784
4741
  /**
2785
4742
  * ID for associated OAuth credentials
@@ -2789,19 +4746,90 @@ export interface RuleUpdateParams {
2789
4746
  /**
2790
4747
  * Type of reward issued by this rule
2791
4748
  */
2792
- rewardType?: 'points' | 'multiplier';
4749
+ rewardType?: 'points' | 'multiplier' | 'badge';
4750
+
4751
+ /**
4752
+ * URL of the Shopify store
4753
+ */
4754
+ shopifyStoreUrl?: string | null;
4755
+
4756
+ /**
4757
+ * Start time for the loyalty rule
4758
+ */
4759
+ startTime?: string | null;
2793
4760
 
2794
4761
  /**
2795
- * Optional subscription identifier for the rule
4762
+ * Optional subscription id for the rule
2796
4763
  */
2797
- subscriptionIdentifier?: string | null;
4764
+ subscriptionId?: string | null;
2798
4765
  }
2799
4766
 
2800
4767
  export namespace RuleUpdateParams {
4768
+ export interface Collection {
4769
+ /**
4770
+ * Blockchain address of the collection
4771
+ */
4772
+ address: string;
4773
+
4774
+ /**
4775
+ * Blockchain network for the collection
4776
+ */
4777
+ network:
4778
+ | 'abstract'
4779
+ | 'abstractTestnet'
4780
+ | 'apechain'
4781
+ | 'arbitrum'
4782
+ | 'avalanche'
4783
+ | 'avalancheFuji'
4784
+ | 'base'
4785
+ | 'baseSepolia'
4786
+ | 'berachain'
4787
+ | 'berachainArtio'
4788
+ | 'berachainBepolia'
4789
+ | 'binance'
4790
+ | 'bscTestnet'
4791
+ | 'campTestnet'
4792
+ | 'fantom'
4793
+ | 'fantomTestnet'
4794
+ | 'flowMainnet'
4795
+ | 'mainnet'
4796
+ | 'optimism'
4797
+ | 'polygon'
4798
+ | 'polygon_mumbai'
4799
+ | 'skaleNebula'
4800
+ | 'solana'
4801
+ | 'sophon'
4802
+ | 'sophonTestnet'
4803
+ | 'sui'
4804
+ | 'superseed'
4805
+ | 'superseedSepolia'
4806
+ | 'vanar'
4807
+ | 'xai'
4808
+ | 'zksync'
4809
+ | 'coti'
4810
+ | 'cotiTestnet'
4811
+ | 'morph'
4812
+ | 'morphTestnet'
4813
+ | 'morphHolesky'
4814
+ | 'nitrograph'
4815
+ | 'sepolia'
4816
+ | 'optimism_sepolia'
4817
+ | 'arbitrumSepolia'
4818
+ | 'goerli'
4819
+ | 'optimism_goerli'
4820
+ | 'arbitrumGoerli'
4821
+ | 'basecamp';
4822
+ }
4823
+
2801
4824
  /**
2802
4825
  * Additional metadata for the loyalty rule
2803
4826
  */
2804
4827
  export interface Metadata {
4828
+ /**
4829
+ * Number of tokens per batch.
4830
+ */
4831
+ batchSize?: number | null;
4832
+
2805
4833
  /**
2806
4834
  * Text displayed on the action button.
2807
4835
  */
@@ -2832,6 +4860,11 @@ export namespace RuleUpdateParams {
2832
4860
  */
2833
4861
  collection?: Array<Metadata.Collection>;
2834
4862
 
4863
+ /**
4864
+ * Conditions for completing the profile.
4865
+ */
4866
+ completeProfileConditions?: { [key: string]: boolean } | null;
4867
+
2835
4868
  /**
2836
4869
  * Object containing details for the call-to-action.
2837
4870
  */
@@ -2867,11 +4900,21 @@ export namespace RuleUpdateParams {
2867
4900
  */
2868
4901
  enableVerifiedMultiplier?: boolean;
2869
4902
 
4903
+ /**
4904
+ * Fill source of the order for the token sale
4905
+ */
4906
+ fillSource?: string;
4907
+
2870
4908
  /**
2871
4909
  * Percentage reward given to a user for their first referral.
2872
4910
  */
2873
4911
  firstReferralReward?: number | null;
2874
4912
 
4913
+ /**
4914
+ * Flag indicating whether the fill source is included.
4915
+ */
4916
+ hasFillSource?: boolean;
4917
+
2875
4918
  /**
2876
4919
  * Indicates if the item has never been sold.
2877
4920
  */
@@ -2897,11 +4940,21 @@ export namespace RuleUpdateParams {
2897
4940
  */
2898
4941
  imageUrl?: string | null;
2899
4942
 
4943
+ /**
4944
+ * If enabled, the first transaction done on the platform will complete this rule
4945
+ */
4946
+ isCheckInOnEveryTxn?: boolean;
4947
+
2900
4948
  /**
2901
4949
  * Indicates if the multiplier has been applied to rewards.
2902
4950
  */
2903
4951
  isMultiplierApplied?: boolean;
2904
4952
 
4953
+ /**
4954
+ * Flag indicating if the rule is restricted to new users.
4955
+ */
4956
+ isRestrictedToNewUsers?: boolean;
4957
+
2905
4958
  /**
2906
4959
  * Flag indicating if rewards are applied retroactively.
2907
4960
  */
@@ -2917,6 +4970,11 @@ export namespace RuleUpdateParams {
2917
4970
  */
2918
4971
  link?: string | null;
2919
4972
 
4973
+ /**
4974
+ * Liquidity pool details.
4975
+ */
4976
+ liquidity?: Metadata.Liquidity;
4977
+
2920
4978
  /**
2921
4979
  * Maximum quantity constraint for token holding.
2922
4980
  */
@@ -2945,12 +5003,37 @@ export namespace RuleUpdateParams {
2945
5003
  /**
2946
5004
  * Flag indicating whether to include only non-listed items.
2947
5005
  */
2948
- onlyNonListed?: boolean;
5006
+ onlyNonListed?: boolean;
5007
+
5008
+ /**
5009
+ * Indicates if only existing users are rewarded.
5010
+ */
5011
+ onlyRewardExistingUser?: boolean;
5012
+
5013
+ /**
5014
+ * give points for only one token ownership per contract
5015
+ */
5016
+ onlyRewardSingleTokenOwnership?: boolean | null;
5017
+
5018
+ /**
5019
+ * Promotional code associated with the rule.
5020
+ */
5021
+ promoCode?: string;
5022
+
5023
+ /**
5024
+ * URL of the CSV file containing promo codes.
5025
+ */
5026
+ promoCodeCsvUrl?: string;
5027
+
5028
+ /**
5029
+ * Numbers of the promotional code to be generated.
5030
+ */
5031
+ promoCodeLength?: number | null;
2949
5032
 
2950
5033
  /**
2951
- * Promotional code associated with the rule.
5034
+ * Type of the promotional code.
2952
5035
  */
2953
- promoCode?: string;
5036
+ promoCodeType?: 'code' | 'csv' | 'generate';
2954
5037
 
2955
5038
  /**
2956
5039
  * Array defining ranges and corresponding rewards.
@@ -2967,11 +5050,32 @@ export namespace RuleUpdateParams {
2967
5050
  */
2968
5051
  referrerReward?: number | null;
2969
5052
 
5053
+ /**
5054
+ * Loyalty currency ID of the referrer reward.
5055
+ */
5056
+ referrerRewardLoyaltyCurrencyId?: string | null;
5057
+
5058
+ /**
5059
+ * Flag indicating if the rule can also reward badges per range.
5060
+ */
5061
+ rewardBadgePerRange?: boolean;
5062
+
5063
+ /**
5064
+ * Flag indicating if the reward is rewarded by batch.
5065
+ */
5066
+ rewardByBatch?: boolean | null;
5067
+
2970
5068
  /**
2971
5069
  * Flag indicating if rewards are given per impression.
2972
5070
  */
2973
5071
  rewardPerImpression?: boolean | null;
2974
5072
 
5073
+ /**
5074
+ * Flag indicating if the rule should reward based on value of traded tokens
5075
+ * instead of count.
5076
+ */
5077
+ rewardPerValue?: boolean;
5078
+
2975
5079
  /**
2976
5080
  * Currency associated with sales.
2977
5081
  */
@@ -2982,6 +5086,11 @@ export namespace RuleUpdateParams {
2982
5086
  */
2983
5087
  secondReferralReward?: number | null;
2984
5088
 
5089
+ /**
5090
+ * Flag indicating if the multiplier is skipped.
5091
+ */
5092
+ skipMultiplier?: boolean | null;
5093
+
2985
5094
  /**
2986
5095
  * Object containing details of the associated smart contract.
2987
5096
  */
@@ -2996,14 +5105,17 @@ export namespace RuleUpdateParams {
2996
5105
  * Social media platform associated with the rule.
2997
5106
  */
2998
5107
  socialPlatform?:
2999
- | 'Twitch'
5108
+ | 'Custom'
5109
+ | 'Discord'
5110
+ | 'EpicGames'
5111
+ | 'Instagram'
5112
+ | 'Steam'
5113
+ | 'Telegram'
3000
5114
  | 'TikTok'
5115
+ | 'Twitch'
3001
5116
  | 'X(Twitter)'
3002
- | 'Instagram'
3003
- | 'EpicGames'
3004
5117
  | 'YouTube'
3005
- | 'Discord'
3006
- | 'Custom'
5118
+ | 'Google'
3007
5119
  | null;
3008
5120
 
3009
5121
  /**
@@ -3016,11 +5128,21 @@ export namespace RuleUpdateParams {
3016
5128
  */
3017
5129
  socialPlatformName?: string | null;
3018
5130
 
5131
+ /**
5132
+ * ID of the Steam app.
5133
+ */
5134
+ steamAppId?: string | null;
5135
+
3019
5136
  /**
3020
5137
  * Array of streak milestones and corresponding rewards.
3021
5138
  */
3022
5139
  streakArray?: Array<Metadata.StreakArray> | null;
3023
5140
 
5141
+ /**
5142
+ * Metadata for swap loyalty rules
5143
+ */
5144
+ swap?: Metadata.Swap;
5145
+
3024
5146
  /**
3025
5147
  * ID of the Telegram channel.
3026
5148
  */
@@ -3036,6 +5158,12 @@ export namespace RuleUpdateParams {
3036
5158
  */
3037
5159
  trackAllContracts?: boolean | null;
3038
5160
 
5161
+ /**
5162
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
5163
+ * completed once the progress is 100%.
5164
+ */
5165
+ trackProgress?: boolean | null;
5166
+
3039
5167
  /**
3040
5168
  * URL of the associated Twitter account.
3041
5169
  */
@@ -3079,7 +5207,17 @@ export namespace RuleUpdateParams {
3079
5207
  /**
3080
5208
  * Type of wallet associated with the rule.
3081
5209
  */
3082
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
5210
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | 'cosmos' | 'ultra' | null;
5211
+
5212
+ /**
5213
+ * ID of the Youtube channel.
5214
+ */
5215
+ youtubeChannelId?: string | null;
5216
+
5217
+ /**
5218
+ * ID of the Youtube video.
5219
+ */
5220
+ youtubeVideoId?: string | null;
3083
5221
  }
3084
5222
 
3085
5223
  export namespace Metadata {
@@ -3098,35 +5236,50 @@ export namespace RuleUpdateParams {
3098
5236
  * Blockchain network of the collection.
3099
5237
  */
3100
5238
  network?:
3101
- | 'mainnet'
3102
- | 'polygon'
3103
- | 'polygon_mumbai'
3104
- | 'optimism'
5239
+ | 'abstract'
5240
+ | 'abstractTestnet'
5241
+ | 'apechain'
3105
5242
  | 'arbitrum'
3106
- | 'binance'
3107
- | 'bscTestnet'
3108
5243
  | 'avalanche'
3109
5244
  | 'avalancheFuji'
3110
- | 'zksync'
3111
- | 'fantom'
3112
- | 'fantomTestnet'
3113
5245
  | 'base'
3114
5246
  | 'baseSepolia'
3115
- | 'skaleNebula'
3116
- | 'xai'
5247
+ | 'berachain'
3117
5248
  | 'berachainArtio'
3118
- | 'solana'
3119
- | 'apechain'
3120
- | 'flowMainnet'
5249
+ | 'berachainBepolia'
5250
+ | 'binance'
5251
+ | 'bscTestnet'
3121
5252
  | 'campTestnet'
5253
+ | 'fantom'
5254
+ | 'fantomTestnet'
5255
+ | 'flowMainnet'
5256
+ | 'mainnet'
5257
+ | 'optimism'
5258
+ | 'polygon'
5259
+ | 'polygon_mumbai'
5260
+ | 'skaleNebula'
5261
+ | 'solana'
5262
+ | 'sophon'
5263
+ | 'sophonTestnet'
3122
5264
  | 'sui'
5265
+ | 'superseed'
5266
+ | 'superseedSepolia'
3123
5267
  | 'vanar'
5268
+ | 'xai'
5269
+ | 'zksync'
5270
+ | 'coti'
5271
+ | 'cotiTestnet'
5272
+ | 'morph'
5273
+ | 'morphTestnet'
5274
+ | 'morphHolesky'
5275
+ | 'nitrograph'
3124
5276
  | 'sepolia'
3125
5277
  | 'optimism_sepolia'
3126
5278
  | 'arbitrumSepolia'
3127
5279
  | 'goerli'
3128
5280
  | 'optimism_goerli'
3129
- | 'arbitrumGoerli';
5281
+ | 'arbitrumGoerli'
5282
+ | 'basecamp';
3130
5283
  }
3131
5284
 
3132
5285
  /**
@@ -3172,6 +5325,11 @@ export namespace RuleUpdateParams {
3172
5325
  * Array of emojis used in the channel.
3173
5326
  */
3174
5327
  emojis?: Array<Channel.Emoji>;
5328
+
5329
+ /**
5330
+ * Phrase of text to be present in the discord message
5331
+ */
5332
+ text?: string;
3175
5333
  }
3176
5334
 
3177
5335
  export namespace Channel {
@@ -3198,6 +5356,101 @@ export namespace RuleUpdateParams {
3198
5356
  id: string;
3199
5357
  }
3200
5358
 
5359
+ /**
5360
+ * Liquidity pool details.
5361
+ */
5362
+ export interface Liquidity {
5363
+ /**
5364
+ * Calculation type of the liquidity pool.
5365
+ */
5366
+ calculationType?: 'fixed' | 'custom';
5367
+
5368
+ /**
5369
+ * Custom function to calculate the the reward amount based on the liquidity
5370
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
5371
+ * USD.
5372
+ */
5373
+ customFunction?: string;
5374
+
5375
+ /**
5376
+ * Liquidity provided per day in USD
5377
+ */
5378
+ liquidityPerDay?: number;
5379
+
5380
+ /**
5381
+ * Blockchain network of the liquidity pool.
5382
+ */
5383
+ network?:
5384
+ | 'abstract'
5385
+ | 'abstractTestnet'
5386
+ | 'apechain'
5387
+ | 'arbitrum'
5388
+ | 'avalanche'
5389
+ | 'avalancheFuji'
5390
+ | 'base'
5391
+ | 'baseSepolia'
5392
+ | 'berachain'
5393
+ | 'berachainArtio'
5394
+ | 'berachainBepolia'
5395
+ | 'binance'
5396
+ | 'bscTestnet'
5397
+ | 'campTestnet'
5398
+ | 'fantom'
5399
+ | 'fantomTestnet'
5400
+ | 'flowMainnet'
5401
+ | 'mainnet'
5402
+ | 'optimism'
5403
+ | 'polygon'
5404
+ | 'polygon_mumbai'
5405
+ | 'skaleNebula'
5406
+ | 'solana'
5407
+ | 'sophon'
5408
+ | 'sophonTestnet'
5409
+ | 'sui'
5410
+ | 'superseed'
5411
+ | 'superseedSepolia'
5412
+ | 'vanar'
5413
+ | 'xai'
5414
+ | 'zksync'
5415
+ | 'coti'
5416
+ | 'cotiTestnet'
5417
+ | 'morph'
5418
+ | 'morphTestnet'
5419
+ | 'morphHolesky'
5420
+ | 'nitrograph'
5421
+ | 'sepolia'
5422
+ | 'optimism_sepolia'
5423
+ | 'arbitrumSepolia'
5424
+ | 'goerli'
5425
+ | 'optimism_goerli'
5426
+ | 'arbitrumGoerli'
5427
+ | 'basecamp';
5428
+
5429
+ /**
5430
+ * Indicates if only in-range liquidity is rewarded.
5431
+ */
5432
+ onlyRewardInRangeLiquidity?: boolean;
5433
+
5434
+ /**
5435
+ * Array of liquidity pools associated with the rule.
5436
+ */
5437
+ pools?: Array<Liquidity.Pool>;
5438
+
5439
+ /**
5440
+ * Protocol of the liquidity pool.
5441
+ */
5442
+ protocol?: string;
5443
+ }
5444
+
5445
+ export namespace Liquidity {
5446
+ export interface Pool {
5447
+ /**
5448
+ * Unique identifier of the liquidity pool.
5449
+ */
5450
+ id: string;
5451
+ }
5452
+ }
5453
+
3201
5454
  export interface Range {
3202
5455
  /**
3203
5456
  * Reward amount for this range.
@@ -3213,6 +5466,16 @@ export namespace RuleUpdateParams {
3213
5466
  * Start value of the range.
3214
5467
  */
3215
5468
  startRange: number;
5469
+
5470
+ /**
5471
+ * ID of the loyalty badge for this range.
5472
+ */
5473
+ loyaltyBadgeId?: string;
5474
+
5475
+ /**
5476
+ * Amount of the loyalty multiplier for this range.
5477
+ */
5478
+ loyaltyMultiplierAmount?: number;
3216
5479
  }
3217
5480
 
3218
5481
  /**
@@ -3265,20 +5528,15 @@ export namespace RuleUpdateParams {
3265
5528
  * Object containing details of the associated smart contract.
3266
5529
  */
3267
5530
  export interface SmartContract {
3268
- /**
3269
- * ABI of the smart contract.
3270
- */
3271
- abi?: string | null;
3272
-
3273
5531
  /**
3274
5532
  * Mapping of addresses for the smart contract.
3275
5533
  */
3276
5534
  addressMapping?: string | null;
3277
5535
 
3278
5536
  /**
3279
- * Array of bonus details applied to the rule.
5537
+ * Object containing details of the amount multiplier from the event.
3280
5538
  */
3281
- bonus?: Array<SmartContract.Bonus> | null;
5539
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
3282
5540
 
3283
5541
  /**
3284
5542
  * ID of the smart contract.
@@ -3290,68 +5548,31 @@ export namespace RuleUpdateParams {
3290
5548
  */
3291
5549
  criteria?: 'everyEvent' | 'byParameter' | null;
3292
5550
 
3293
- /**
3294
- * Time range applied to the rule.
3295
- */
3296
- customRange?: SmartContract.CustomRange | null;
3297
-
3298
5551
  /**
3299
5552
  * Event emitted by the smart contract.
3300
5553
  */
3301
5554
  event?: string | null;
3302
5555
 
3303
- /**
3304
- * Maximum value allowed for the parameter.
3305
- */
3306
- max?: number | null;
3307
-
3308
5556
  /**
3309
5557
  * Array of parameters for the smart contract.
3310
5558
  */
3311
5559
  params?: Array<SmartContract.Param> | null;
3312
5560
 
3313
5561
  /**
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.
5562
+ * Type of the smart contract interaction.
3325
5563
  */
3326
- withMax?: boolean | null;
5564
+ type?: 'function' | 'event' | null;
3327
5565
  }
3328
5566
 
3329
5567
  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
5568
  /**
3343
- * Time range applied to the rule.
5569
+ * Object containing details of the amount multiplier from the event.
3344
5570
  */
3345
- export interface CustomRange {
3346
- /**
3347
- * End time of the custom range.
3348
- */
3349
- endsAt?: string | null;
3350
-
5571
+ export interface AmountMultiplier {
3351
5572
  /**
3352
- * Start time of the custom range.
5573
+ * Mapping of the value for the smart contract.
3353
5574
  */
3354
- startsAt?: string | null;
5575
+ valueMapping?: string | null;
3355
5576
  }
3356
5577
 
3357
5578
  export interface Param {
@@ -3395,61 +5616,78 @@ export namespace RuleUpdateParams {
3395
5616
  */
3396
5617
  streakMilestone: number;
3397
5618
  }
3398
- }
3399
5619
 
3400
- export interface Collection {
3401
5620
  /**
3402
- * Blockchain address of the collection
5621
+ * Metadata for swap loyalty rules
3403
5622
  */
3404
- address: string;
5623
+ export interface Swap {
5624
+ provider?: 'any' | 'relay' | 'lifi';
3405
5625
 
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';
5626
+ relayReferrerId?: string;
5627
+
5628
+ requireCrossChainSwap?: boolean;
5629
+
5630
+ swappedToChain?: 'any' | number | string;
5631
+
5632
+ swappedToTokens?: Array<Swap.SwappedToToken>;
5633
+
5634
+ tokenMode?: 'any' | 'specific';
5635
+
5636
+ trackTokenAmount?: boolean;
5637
+ }
5638
+
5639
+ export namespace Swap {
5640
+ export interface SwappedToToken {
5641
+ address: string;
5642
+
5643
+ chainId: string;
5644
+ }
5645
+ }
3439
5646
  }
3440
5647
  }
3441
5648
 
3442
5649
  export interface RuleListParams {
5650
+ /**
5651
+ * IDs of the users to filter results by
5652
+ */
5653
+ allotedToUserId?: string | Array<string>;
5654
+
5655
+ /**
5656
+ * ID of the user group to filter results by
5657
+ */
5658
+ allotedUserGroupId?: string;
5659
+
3443
5660
  /**
3444
5661
  * Address of the collection to filter by
3445
5662
  */
3446
5663
  collectionAddress?: string;
3447
5664
 
3448
5665
  /**
3449
- * Maximum number of records to return (max 1000)
5666
+ * If true this will only return loyalty rule chains
5667
+ */
5668
+ includeLoyaltyRuleChains?: 'true' | 'false';
5669
+
5670
+ /**
5671
+ * If true this will only return active rules, the rules for which the startTime is
5672
+ * in the past and the endTime is in the future
5673
+ */
5674
+ isActive?: 'true' | 'false';
5675
+
5676
+ /**
5677
+ * Maximum number of records to return (max 100)
3450
5678
  */
3451
5679
  limit?: number;
3452
5680
 
5681
+ /**
5682
+ * ID of the loyalty rule group to filter results
5683
+ */
5684
+ loyaltyRuleGroupId?: string;
5685
+
5686
+ /**
5687
+ * The IDs of the loyalty rule
5688
+ */
5689
+ loyaltyRuleId?: string | Array<string>;
5690
+
3453
5691
  /**
3454
5692
  * Unique identifier for the organization to filter by
3455
5693
  */
@@ -3466,12 +5704,40 @@ export interface RuleListParams {
3466
5704
  websiteId?: string;
3467
5705
  }
3468
5706
 
5707
+ export interface RuleDeleteParams {
5708
+ /**
5709
+ * Whether to debit loyalty points
5710
+ */
5711
+ debitLoyaltyPoints?: string;
5712
+ }
5713
+
3469
5714
  export interface RuleCompleteParams {
5715
+ /**
5716
+ * Override amount for the reward (rounded to nearest whole number). This will
5717
+ * override the rule amount and reward the integer passed.
5718
+ */
5719
+ amount?: number | null;
5720
+
3470
5721
  /**
3471
5722
  * Link to the comment made by user
3472
5723
  */
3473
5724
  commentLink?: string;
3474
5725
 
5726
+ /**
5727
+ * Unique key to ensure idempotent requests.
5728
+ */
5729
+ idempotencyKey?: string;
5730
+
5731
+ /**
5732
+ * ID of the choice selected by the user
5733
+ */
5734
+ loyaltyQuestionChoiceId?: string;
5735
+
5736
+ /**
5737
+ * Value to compare with the range
5738
+ */
5739
+ rangeValue?: number | null;
5740
+
3475
5741
  /**
3476
5742
  * Unique identifier for the user
3477
5743
  */
@@ -3482,18 +5748,26 @@ export interface RuleCompleteParams {
3482
5748
  */
3483
5749
  verificationCode?: string;
3484
5750
 
5751
+ /**
5752
+ * Flag indicating if only verification is required, this will not create a
5753
+ * transaction and reward the user.
5754
+ */
5755
+ verifyOnly?: string;
5756
+
3485
5757
  /**
3486
5758
  * Wallet address of the user can only be used if userId is not provided
3487
5759
  */
3488
5760
  walletAddress?: string;
3489
5761
  }
3490
5762
 
3491
- export interface RuleStatusParams {
3492
- organizationId: string;
3493
-
3494
- websiteId: string;
5763
+ export interface RuleGetStatusParams {
5764
+ organizationId?: string;
3495
5765
 
3496
5766
  userId?: string;
5767
+
5768
+ walletAddress?: string;
5769
+
5770
+ websiteId?: string;
3497
5771
  }
3498
5772
 
3499
5773
  export declare namespace Rules {
@@ -3503,11 +5777,12 @@ export declare namespace Rules {
3503
5777
  type RuleListResponse as RuleListResponse,
3504
5778
  type RuleDeleteResponse as RuleDeleteResponse,
3505
5779
  type RuleCompleteResponse as RuleCompleteResponse,
3506
- type RuleStatusResponse as RuleStatusResponse,
5780
+ type RuleGetStatusResponse as RuleGetStatusResponse,
3507
5781
  type RuleCreateParams as RuleCreateParams,
3508
5782
  type RuleUpdateParams as RuleUpdateParams,
3509
5783
  type RuleListParams as RuleListParams,
5784
+ type RuleDeleteParams as RuleDeleteParams,
3510
5785
  type RuleCompleteParams as RuleCompleteParams,
3511
- type RuleStatusParams as RuleStatusParams,
5786
+ type RuleGetStatusParams as RuleGetStatusParams,
3512
5787
  };
3513
5788
  }