@snagsolutions/sdk 0.1.0-alpha.10

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 (342) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/LICENSE +201 -0
  3. package/README.md +297 -0
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +16 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +12 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/_shims/auto/runtime-bun.js +21 -0
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +2 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +21 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +2 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +21 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +2 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +21 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +2 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +101 -0
  36. package/_shims/auto/types.js +3 -0
  37. package/_shims/auto/types.mjs +3 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +14 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +10 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +81 -0
  45. package/_shims/index.js +13 -0
  46. package/_shims/index.mjs +7 -0
  47. package/_shims/manual-types.d.ts +12 -0
  48. package/_shims/manual-types.js +3 -0
  49. package/_shims/manual-types.mjs +3 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +89 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +56 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +42 -0
  57. package/_shims/node-types.js +3 -0
  58. package/_shims/node-types.mjs +3 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +41 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +37 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +78 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +71 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +83 -0
  72. package/_shims/web-types.js +3 -0
  73. package/_shims/web-types.mjs +3 -0
  74. package/core.d.ts +241 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +908 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +876 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +47 -0
  81. package/error.d.ts.map +1 -0
  82. package/error.js +113 -0
  83. package/error.js.map +1 -0
  84. package/error.mjs +97 -0
  85. package/error.mjs.map +1 -0
  86. package/index.d.mts +126 -0
  87. package/index.d.ts +126 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +141 -0
  90. package/index.js.map +1 -0
  91. package/index.mjs +98 -0
  92. package/index.mjs.map +1 -0
  93. package/internal/qs/formats.d.ts +6 -0
  94. package/internal/qs/formats.d.ts.map +1 -0
  95. package/internal/qs/formats.js +11 -0
  96. package/internal/qs/formats.js.map +1 -0
  97. package/internal/qs/formats.mjs +8 -0
  98. package/internal/qs/formats.mjs.map +1 -0
  99. package/internal/qs/index.d.ts +10 -0
  100. package/internal/qs/index.d.ts.map +1 -0
  101. package/internal/qs/index.js +14 -0
  102. package/internal/qs/index.js.map +1 -0
  103. package/internal/qs/index.mjs +10 -0
  104. package/internal/qs/index.mjs.map +1 -0
  105. package/internal/qs/stringify.d.ts +3 -0
  106. package/internal/qs/stringify.d.ts.map +1 -0
  107. package/internal/qs/stringify.js +280 -0
  108. package/internal/qs/stringify.js.map +1 -0
  109. package/internal/qs/stringify.mjs +276 -0
  110. package/internal/qs/stringify.mjs.map +1 -0
  111. package/internal/qs/types.d.ts +57 -0
  112. package/internal/qs/types.d.ts.map +1 -0
  113. package/internal/qs/types.js +3 -0
  114. package/internal/qs/types.js.map +1 -0
  115. package/internal/qs/types.mjs +2 -0
  116. package/internal/qs/types.mjs.map +1 -0
  117. package/internal/qs/utils.d.ts +14 -0
  118. package/internal/qs/utils.d.ts.map +1 -0
  119. package/internal/qs/utils.js +229 -0
  120. package/internal/qs/utils.js.map +1 -0
  121. package/internal/qs/utils.mjs +217 -0
  122. package/internal/qs/utils.mjs.map +1 -0
  123. package/package.json +103 -0
  124. package/resource.d.ts +6 -0
  125. package/resource.d.ts.map +1 -0
  126. package/resource.js +11 -0
  127. package/resource.js.map +1 -0
  128. package/resource.mjs +7 -0
  129. package/resource.mjs.map +1 -0
  130. package/resources/assets.d.ts +50 -0
  131. package/resources/assets.d.ts.map +1 -0
  132. package/resources/assets.js +17 -0
  133. package/resources/assets.js.map +1 -0
  134. package/resources/assets.mjs +13 -0
  135. package/resources/assets.mjs.map +1 -0
  136. package/resources/auction-bids.d.ts +81 -0
  137. package/resources/auction-bids.d.ts.map +1 -0
  138. package/resources/auction-bids.js +30 -0
  139. package/resources/auction-bids.js.map +1 -0
  140. package/resources/auction-bids.mjs +26 -0
  141. package/resources/auction-bids.mjs.map +1 -0
  142. package/resources/drip/drip.d.ts +14 -0
  143. package/resources/drip/drip.d.ts.map +1 -0
  144. package/resources/drip/drip.js +43 -0
  145. package/resources/drip/drip.js.map +1 -0
  146. package/resources/drip/drip.mjs +16 -0
  147. package/resources/drip/drip.mjs.map +1 -0
  148. package/resources/drip/index.d.ts +4 -0
  149. package/resources/drip/index.d.ts.map +1 -0
  150. package/resources/drip/index.js +11 -0
  151. package/resources/drip/index.js.map +1 -0
  152. package/resources/drip/index.mjs +5 -0
  153. package/resources/drip/index.mjs.map +1 -0
  154. package/resources/drip/quests.d.ts +168 -0
  155. package/resources/drip/quests.d.ts.map +1 -0
  156. package/resources/drip/quests.js +17 -0
  157. package/resources/drip/quests.js.map +1 -0
  158. package/resources/drip/quests.mjs +13 -0
  159. package/resources/drip/quests.mjs.map +1 -0
  160. package/resources/drip/status.d.ts +26 -0
  161. package/resources/drip/status.d.ts.map +1 -0
  162. package/resources/drip/status.js +16 -0
  163. package/resources/drip/status.js.map +1 -0
  164. package/resources/drip/status.mjs +12 -0
  165. package/resources/drip/status.mjs.map +1 -0
  166. package/resources/index.d.ts +7 -0
  167. package/resources/index.d.ts.map +1 -0
  168. package/resources/index.js +17 -0
  169. package/resources/index.js.map +1 -0
  170. package/resources/index.mjs +8 -0
  171. package/resources/index.mjs.map +1 -0
  172. package/resources/loyalty/accounts.d.ts +157 -0
  173. package/resources/loyalty/accounts.d.ts.map +1 -0
  174. package/resources/loyalty/accounts.js +16 -0
  175. package/resources/loyalty/accounts.js.map +1 -0
  176. package/resources/loyalty/accounts.mjs +12 -0
  177. package/resources/loyalty/accounts.mjs.map +1 -0
  178. package/resources/loyalty/badges.d.ts +299 -0
  179. package/resources/loyalty/badges.d.ts.map +1 -0
  180. package/resources/loyalty/badges.js +46 -0
  181. package/resources/loyalty/badges.js.map +1 -0
  182. package/resources/loyalty/badges.mjs +42 -0
  183. package/resources/loyalty/badges.mjs.map +1 -0
  184. package/resources/loyalty/currencies.d.ts +252 -0
  185. package/resources/loyalty/currencies.d.ts.map +1 -0
  186. package/resources/loyalty/currencies.js +21 -0
  187. package/resources/loyalty/currencies.js.map +1 -0
  188. package/resources/loyalty/currencies.mjs +17 -0
  189. package/resources/loyalty/currencies.mjs.map +1 -0
  190. package/resources/loyalty/index.d.ts +9 -0
  191. package/resources/loyalty/index.d.ts.map +1 -0
  192. package/resources/loyalty/index.js +21 -0
  193. package/resources/loyalty/index.js.map +1 -0
  194. package/resources/loyalty/index.mjs +10 -0
  195. package/resources/loyalty/index.mjs.map +1 -0
  196. package/resources/loyalty/loyalty.d.ts +34 -0
  197. package/resources/loyalty/loyalty.d.ts.map +1 -0
  198. package/resources/loyalty/loyalty.js +63 -0
  199. package/resources/loyalty/loyalty.js.map +1 -0
  200. package/resources/loyalty/loyalty.mjs +36 -0
  201. package/resources/loyalty/loyalty.mjs.map +1 -0
  202. package/resources/loyalty/multipliers.d.ts +129 -0
  203. package/resources/loyalty/multipliers.d.ts.map +1 -0
  204. package/resources/loyalty/multipliers.js +34 -0
  205. package/resources/loyalty/multipliers.js.map +1 -0
  206. package/resources/loyalty/multipliers.mjs +30 -0
  207. package/resources/loyalty/multipliers.mjs.map +1 -0
  208. package/resources/loyalty/rule-edits.d.ts +330 -0
  209. package/resources/loyalty/rule-edits.d.ts.map +1 -0
  210. package/resources/loyalty/rule-edits.js +21 -0
  211. package/resources/loyalty/rule-edits.js.map +1 -0
  212. package/resources/loyalty/rule-edits.mjs +17 -0
  213. package/resources/loyalty/rule-edits.mjs.map +1 -0
  214. package/resources/loyalty/rules.d.ts +2430 -0
  215. package/resources/loyalty/rules.d.ts.map +1 -0
  216. package/resources/loyalty/rules.js +46 -0
  217. package/resources/loyalty/rules.js.map +1 -0
  218. package/resources/loyalty/rules.mjs +42 -0
  219. package/resources/loyalty/rules.mjs.map +1 -0
  220. package/resources/loyalty/transaction-entries.d.ts +175 -0
  221. package/resources/loyalty/transaction-entries.d.ts.map +1 -0
  222. package/resources/loyalty/transaction-entries.js +16 -0
  223. package/resources/loyalty/transaction-entries.js.map +1 -0
  224. package/resources/loyalty/transaction-entries.mjs +12 -0
  225. package/resources/loyalty/transaction-entries.mjs.map +1 -0
  226. package/resources/users/index.d.ts +4 -0
  227. package/resources/users/index.d.ts.map +1 -0
  228. package/resources/users/index.js +11 -0
  229. package/resources/users/index.js.map +1 -0
  230. package/resources/users/index.mjs +5 -0
  231. package/resources/users/index.mjs.map +1 -0
  232. package/resources/users/metadatas.d.ts +64 -0
  233. package/resources/users/metadatas.d.ts.map +1 -0
  234. package/resources/users/metadatas.js +16 -0
  235. package/resources/users/metadatas.js.map +1 -0
  236. package/resources/users/metadatas.mjs +12 -0
  237. package/resources/users/metadatas.mjs.map +1 -0
  238. package/resources/users/users.d.ts +14 -0
  239. package/resources/users/users.d.ts.map +1 -0
  240. package/resources/users/users.js +43 -0
  241. package/resources/users/users.js.map +1 -0
  242. package/resources/users/users.mjs +16 -0
  243. package/resources/users/users.mjs.map +1 -0
  244. package/resources/users/wallets.d.ts +193 -0
  245. package/resources/users/wallets.d.ts.map +1 -0
  246. package/resources/users/wallets.js +28 -0
  247. package/resources/users/wallets.js.map +1 -0
  248. package/resources/users/wallets.mjs +24 -0
  249. package/resources/users/wallets.mjs.map +1 -0
  250. package/resources/websites.d.ts +203 -0
  251. package/resources/websites.d.ts.map +1 -0
  252. package/resources/websites.js +22 -0
  253. package/resources/websites.js.map +1 -0
  254. package/resources/websites.mjs +18 -0
  255. package/resources/websites.mjs.map +1 -0
  256. package/shims/node.d.ts +30 -0
  257. package/shims/node.d.ts.map +1 -0
  258. package/shims/node.js +31 -0
  259. package/shims/node.js.map +1 -0
  260. package/shims/node.mjs +5 -0
  261. package/shims/node.mjs.map +1 -0
  262. package/shims/web.d.ts +26 -0
  263. package/shims/web.d.ts.map +1 -0
  264. package/shims/web.js +31 -0
  265. package/shims/web.js.map +1 -0
  266. package/shims/web.mjs +5 -0
  267. package/shims/web.mjs.map +1 -0
  268. package/src/_shims/MultipartBody.ts +9 -0
  269. package/src/_shims/README.md +46 -0
  270. package/src/_shims/auto/runtime-bun.ts +4 -0
  271. package/src/_shims/auto/runtime-node.ts +4 -0
  272. package/src/_shims/auto/runtime.ts +4 -0
  273. package/src/_shims/auto/types-node.ts +4 -0
  274. package/src/_shims/auto/types.d.ts +101 -0
  275. package/src/_shims/auto/types.js +3 -0
  276. package/src/_shims/auto/types.mjs +3 -0
  277. package/src/_shims/bun-runtime.ts +14 -0
  278. package/src/_shims/index.d.ts +81 -0
  279. package/src/_shims/index.js +13 -0
  280. package/src/_shims/index.mjs +7 -0
  281. package/src/_shims/manual-types.d.ts +12 -0
  282. package/src/_shims/manual-types.js +3 -0
  283. package/src/_shims/manual-types.mjs +3 -0
  284. package/src/_shims/node-runtime.ts +81 -0
  285. package/src/_shims/node-types.d.ts +42 -0
  286. package/src/_shims/node-types.js +3 -0
  287. package/src/_shims/node-types.mjs +3 -0
  288. package/src/_shims/registry.ts +67 -0
  289. package/src/_shims/web-runtime.ts +103 -0
  290. package/src/_shims/web-types.d.ts +83 -0
  291. package/src/_shims/web-types.js +3 -0
  292. package/src/_shims/web-types.mjs +3 -0
  293. package/src/core.ts +1201 -0
  294. package/src/error.ts +130 -0
  295. package/src/index.ts +235 -0
  296. package/src/internal/qs/LICENSE.md +13 -0
  297. package/src/internal/qs/README.md +3 -0
  298. package/src/internal/qs/formats.ts +9 -0
  299. package/src/internal/qs/index.ts +13 -0
  300. package/src/internal/qs/stringify.ts +388 -0
  301. package/src/internal/qs/types.ts +71 -0
  302. package/src/internal/qs/utils.ts +265 -0
  303. package/src/lib/.keep +4 -0
  304. package/src/resource.ts +11 -0
  305. package/src/resources/assets.ts +71 -0
  306. package/src/resources/auction-bids.ts +123 -0
  307. package/src/resources/drip/drip.ts +25 -0
  308. package/src/resources/drip/index.ts +5 -0
  309. package/src/resources/drip/quests.ts +210 -0
  310. package/src/resources/drip/status.ts +33 -0
  311. package/src/resources/index.ts +14 -0
  312. package/src/resources/loyalty/accounts.ts +199 -0
  313. package/src/resources/loyalty/badges.ts +435 -0
  314. package/src/resources/loyalty/currencies.ts +321 -0
  315. package/src/resources/loyalty/index.ts +61 -0
  316. package/src/resources/loyalty/loyalty.ts +159 -0
  317. package/src/resources/loyalty/multipliers.ts +238 -0
  318. package/src/resources/loyalty/rule-edits.ts +421 -0
  319. package/src/resources/loyalty/rules.ts +3513 -0
  320. package/src/resources/loyalty/transaction-entries.ts +229 -0
  321. package/src/resources/users/index.ts +12 -0
  322. package/src/resources/users/metadatas.ts +103 -0
  323. package/src/resources/users/users.ts +39 -0
  324. package/src/resources/users/wallets.ts +271 -0
  325. package/src/resources/websites.ts +259 -0
  326. package/src/shims/node.ts +50 -0
  327. package/src/shims/web.ts +50 -0
  328. package/src/tsconfig.json +11 -0
  329. package/src/uploads.ts +255 -0
  330. package/src/version.ts +1 -0
  331. package/uploads.d.ts +75 -0
  332. package/uploads.d.ts.map +1 -0
  333. package/uploads.js +171 -0
  334. package/uploads.js.map +1 -0
  335. package/uploads.mjs +158 -0
  336. package/uploads.mjs.map +1 -0
  337. package/version.d.ts +2 -0
  338. package/version.d.ts.map +1 -0
  339. package/version.js +5 -0
  340. package/version.js.map +1 -0
  341. package/version.mjs +2 -0
  342. package/version.mjs.map +1 -0
@@ -0,0 +1,3513 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import { isRequestOptions } from '../../core';
5
+ import * as Core from '../../core';
6
+
7
+ export class Rules extends APIResource {
8
+ /**
9
+ * Create a new Loyalty Rule
10
+ */
11
+ create(body: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise<RuleCreateResponse> {
12
+ return this._client.post('/api/loyalty/rules', { body, ...options });
13
+ }
14
+
15
+ /**
16
+ * Update an existing Loyalty Rule
17
+ */
18
+ update(
19
+ id: string,
20
+ body: RuleUpdateParams,
21
+ options?: Core.RequestOptions,
22
+ ): Core.APIPromise<RuleUpdateResponse> {
23
+ return this._client.post(`/api/loyalty/rules/${id}`, { body, ...options });
24
+ }
25
+
26
+ /**
27
+ * Retrieve configured loyalty rules with optional pagination and filters
28
+ */
29
+ list(query?: RuleListParams, options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
30
+ list(options?: Core.RequestOptions): Core.APIPromise<RuleListResponse>;
31
+ list(
32
+ query: RuleListParams | Core.RequestOptions = {},
33
+ options?: Core.RequestOptions,
34
+ ): Core.APIPromise<RuleListResponse> {
35
+ if (isRequestOptions(query)) {
36
+ return this.list({}, query);
37
+ }
38
+ return this._client.get('/api/loyalty/rules', { query, ...options });
39
+ }
40
+
41
+ /**
42
+ * Delete an existing Loyalty Rule
43
+ */
44
+ delete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleDeleteResponse> {
45
+ return this._client.delete(`/api/loyalty/rules/${id}`, options);
46
+ }
47
+
48
+ /**
49
+ * 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,
51
+ * link_click, discord_member, connect_wallet, check_in, external_rule,
52
+ * 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
54
+ */
55
+ complete(
56
+ id: string,
57
+ body?: RuleCompleteParams,
58
+ options?: Core.RequestOptions,
59
+ ): Core.APIPromise<RuleCompleteResponse>;
60
+ complete(id: string, options?: Core.RequestOptions): Core.APIPromise<RuleCompleteResponse>;
61
+ complete(
62
+ id: string,
63
+ body: RuleCompleteParams | Core.RequestOptions = {},
64
+ options?: Core.RequestOptions,
65
+ ): Core.APIPromise<RuleCompleteResponse> {
66
+ if (isRequestOptions(body)) {
67
+ return this.complete(id, {}, body);
68
+ }
69
+ return this._client.post(`/api/loyalty/rules/${id}/complete`, { body, ...options });
70
+ }
71
+
72
+ /**
73
+ * This will return the processing status of quests for a specific user
74
+ */
75
+ status(query: RuleStatusParams, options?: Core.RequestOptions): Core.APIPromise<RuleStatusResponse> {
76
+ return this._client.get('/api/loyalty/rules/status', { query, ...options });
77
+ }
78
+ }
79
+
80
+ export interface RuleCreateResponse {
81
+ id: string;
82
+
83
+ /**
84
+ * Reward amount associated with the rule
85
+ */
86
+ amount: unknown;
87
+
88
+ /**
89
+ * The effective end time of the rule
90
+ */
91
+ effectiveEndTime: string | null;
92
+
93
+ /**
94
+ * The effective start time of the rule
95
+ */
96
+ effectiveStartTime: string | null;
97
+
98
+ /**
99
+ * When the rule becomes inactive
100
+ */
101
+ endTime: string | null;
102
+
103
+ /**
104
+ * Execution frequency of the loyalty rule
105
+ */
106
+ frequency: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
107
+
108
+ /**
109
+ * Unique identifier for the loyalty currency
110
+ */
111
+ loyaltyCurrencyId: string;
112
+
113
+ /**
114
+ * Additional metadata for the loyalty rule
115
+ */
116
+ metadata: RuleCreateResponse.Metadata;
117
+
118
+ /**
119
+ * Name of the loyalty rule
120
+ */
121
+ name: string;
122
+
123
+ /**
124
+ * Unique identifier for the organization creating the rule
125
+ */
126
+ organizationId: string;
127
+
128
+ /**
129
+ * When the rule becomes active
130
+ */
131
+ startTime: string | null;
132
+
133
+ /**
134
+ * Type of loyalty rule being created
135
+ */
136
+ type:
137
+ | 'Bonus'
138
+ | 'BoughtOn'
139
+ | 'BoughtWithRoyalties'
140
+ | 'DiscordMessages'
141
+ | 'Listing'
142
+ | 'Lodging'
143
+ | 'MintOn'
144
+ | 'PoapClaim'
145
+ | 'SnagSocialsConnected'
146
+ | 'SnapshotFullset'
147
+ | 'SnapshotHold'
148
+ | 'SoldOn'
149
+ | 'SoldWithRoyalties'
150
+ | 'TokenHold'
151
+ | 'TwitterBio'
152
+ | 'TwitterHashTagPost'
153
+ | 'Retweet'
154
+ | 'check_in'
155
+ | 'code_entry'
156
+ | 'connect_wallet'
157
+ | 'connected_discord'
158
+ | 'connected_email'
159
+ | 'connected_epic'
160
+ | 'connected_steam'
161
+ | 'connected_telegram'
162
+ | 'connected_twitter'
163
+ | 'create_partner_account'
164
+ | 'discord_member'
165
+ | 'drip_x_follow'
166
+ | 'drip_x_new_tweet'
167
+ | 'drip_x_text_in_bio'
168
+ | 'drip_x_text_in_comment'
169
+ | 'drip_x_text_in_name'
170
+ | 'drip_x_tweet'
171
+ | 'external_rule'
172
+ | 'link_click'
173
+ | 'manual_upload'
174
+ | 'profile_completed'
175
+ | 'referred_user'
176
+ | 'smart_contract_event'
177
+ | 'snapshot_governance'
178
+ | 'telegram_join'
179
+ | 'telegram_messages'
180
+ | 'text_input'
181
+ | 'token_hold_erc20'
182
+ | 'tweet_liked_by_project'
183
+ | 'twitter_comment'
184
+ | 'twitter_follow'
185
+ | 'twitter_followers'
186
+ | 'twitter_like'
187
+ | 'twitter_post_hashtag';
188
+
189
+ /**
190
+ * Unique identifier for the associated website
191
+ */
192
+ websiteId: string;
193
+
194
+ /**
195
+ * URL of the background asset to be displayed
196
+ */
197
+ backgroundAssetUrl?: string;
198
+
199
+ /**
200
+ * Blockchain address of the associated collection
201
+ */
202
+ collectionAddress?: string;
203
+
204
+ /**
205
+ * List of associated collections
206
+ */
207
+ collections?: Array<RuleCreateResponse.Collection> | null;
208
+
209
+ /**
210
+ * URL for fetching custom rewards
211
+ */
212
+ customRewardsApiUrl?: string | null;
213
+
214
+ /**
215
+ * URL for uploading custom rewards via CSV
216
+ */
217
+ customRewardsCsvUrl?: string | null;
218
+
219
+ /**
220
+ * Optional detailed description of the rule
221
+ */
222
+ description?: string;
223
+
224
+ /**
225
+ * Whether to hide this rule in the user interface
226
+ */
227
+ hideInUi?: boolean;
228
+
229
+ /**
230
+ * Interval between rule executions
231
+ */
232
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
233
+
234
+ /**
235
+ * Whether this rule is mandatory
236
+ */
237
+ isRequired?: boolean;
238
+
239
+ /**
240
+ * Unique identifier for the loyalty rule group
241
+ */
242
+ loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
243
+
244
+ /**
245
+ * Blockchain network where the rule will apply
246
+ */
247
+ network?:
248
+ | 'mainnet'
249
+ | 'polygon'
250
+ | 'polygon_mumbai'
251
+ | 'optimism'
252
+ | 'arbitrum'
253
+ | 'binance'
254
+ | 'bscTestnet'
255
+ | 'avalanche'
256
+ | 'avalancheFuji'
257
+ | 'zksync'
258
+ | 'fantom'
259
+ | 'fantomTestnet'
260
+ | 'base'
261
+ | 'baseSepolia'
262
+ | 'skaleNebula'
263
+ | 'xai'
264
+ | 'berachainArtio'
265
+ | 'solana'
266
+ | 'apechain'
267
+ | 'flowMainnet'
268
+ | 'campTestnet'
269
+ | 'sui'
270
+ | 'vanar'
271
+ | 'sepolia'
272
+ | 'optimism_sepolia'
273
+ | 'arbitrumSepolia'
274
+ | 'goerli'
275
+ | 'optimism_goerli'
276
+ | 'arbitrumGoerli';
277
+
278
+ /**
279
+ * OAuth credentials associated with the rule
280
+ */
281
+ oauthCredentialsId?: string | null;
282
+
283
+ /**
284
+ * Type of reward issued by the rule
285
+ */
286
+ rewardType?: 'points' | 'multiplier';
287
+
288
+ /**
289
+ * Identifier for associated subscriptions
290
+ */
291
+ subscriptionIdentifier?: string | null;
292
+ }
293
+
294
+ export namespace RuleCreateResponse {
295
+ /**
296
+ * Additional metadata for the loyalty rule
297
+ */
298
+ export interface Metadata {
299
+ /**
300
+ * Text displayed on the action button.
301
+ */
302
+ buttonText?: string | null;
303
+
304
+ /**
305
+ * Flag indicating if commenting is required.
306
+ */
307
+ checkComment?: boolean | null;
308
+
309
+ /**
310
+ * Flag indicating if liking the post is required.
311
+ */
312
+ checkLike?: boolean | null;
313
+
314
+ /**
315
+ * Flag indicating if reposting is required.
316
+ */
317
+ checkRepost?: boolean | null;
318
+
319
+ /**
320
+ * Text to check in the Twitter post, username, or bio.
321
+ */
322
+ checkText?: string | null;
323
+
324
+ /**
325
+ * Array of collections associated with the rule.
326
+ */
327
+ collection?: Array<Metadata.Collection>;
328
+
329
+ /**
330
+ * Object containing details for the call-to-action.
331
+ */
332
+ cta?: Metadata.Cta | null;
333
+
334
+ /**
335
+ * API key for custom rewards integration.
336
+ */
337
+ customRewardsApiKey?: string;
338
+
339
+ /**
340
+ * Array of Discord servers, channels, and roles to join.
341
+ */
342
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
343
+
344
+ /**
345
+ * Array of drip quests required to complete the rule.
346
+ */
347
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
348
+
349
+ /**
350
+ * Flag indicating whether joining Discord servers is required.
351
+ */
352
+ enableJoinDiscordServers?: boolean | null;
353
+
354
+ /**
355
+ * Flag indicating whether streaks are enabled.
356
+ */
357
+ enableStreaks?: boolean | null;
358
+
359
+ /**
360
+ * Flag indicating whether the verified multiplier is enabled.
361
+ */
362
+ enableVerifiedMultiplier?: boolean;
363
+
364
+ /**
365
+ * Percentage reward given to a user for their first referral.
366
+ */
367
+ firstReferralReward?: number | null;
368
+
369
+ /**
370
+ * Indicates if the item has never been sold.
371
+ */
372
+ hasNeverSold?: boolean;
373
+
374
+ /**
375
+ * Indicates if the full royalty has been paid for items.
376
+ */
377
+ hasPaidFullRoyalty?: boolean;
378
+
379
+ /**
380
+ * Flag indicating if the sale currency is included.
381
+ */
382
+ hasSaleCurrency?: boolean;
383
+
384
+ /**
385
+ * Indicates if the user has a verified Twitter account.
386
+ */
387
+ hasVerifiedTwitter?: boolean;
388
+
389
+ /**
390
+ * URL of the image associated with the rule.
391
+ */
392
+ imageUrl?: string | null;
393
+
394
+ /**
395
+ * Indicates if the multiplier has been applied to rewards.
396
+ */
397
+ isMultiplierApplied?: boolean;
398
+
399
+ /**
400
+ * Flag indicating if rewards are applied retroactively.
401
+ */
402
+ isRetroactive?: boolean | null;
403
+
404
+ /**
405
+ * Flag indicating if the token hold multiplier is applied.
406
+ */
407
+ isTokenHoldMultiplier?: boolean;
408
+
409
+ /**
410
+ * Optional link associated with the metadata.
411
+ */
412
+ link?: string | null;
413
+
414
+ /**
415
+ * Maximum quantity constraint for token holding.
416
+ */
417
+ maxQty?: number | null;
418
+
419
+ /**
420
+ * Minimum quantity constraint for token holding.
421
+ */
422
+ minQty?: number | null;
423
+
424
+ /**
425
+ * Array of loyalty currency IDs used for multipliers.
426
+ */
427
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
428
+
429
+ /**
430
+ * Flag indicating whether to include only known users.
431
+ */
432
+ onlyKnownUsers?: boolean;
433
+
434
+ /**
435
+ * Flag indicating whether to include only native tokens.
436
+ */
437
+ onlyNative?: boolean;
438
+
439
+ /**
440
+ * Flag indicating whether to include only non-listed items.
441
+ */
442
+ onlyNonListed?: boolean;
443
+
444
+ /**
445
+ * Promotional code associated with the rule.
446
+ */
447
+ promoCode?: string;
448
+
449
+ /**
450
+ * Array defining ranges and corresponding rewards.
451
+ */
452
+ range?: Array<Metadata.Range>;
453
+
454
+ /**
455
+ * Object defining referral requirements.
456
+ */
457
+ referralRequirements?: Metadata.ReferralRequirements | null;
458
+
459
+ /**
460
+ * Lump sum reward given to a referrer.
461
+ */
462
+ referrerReward?: number | null;
463
+
464
+ /**
465
+ * Flag indicating if rewards are given per impression.
466
+ */
467
+ rewardPerImpression?: boolean | null;
468
+
469
+ /**
470
+ * Currency associated with sales.
471
+ */
472
+ saleCurrency?: string;
473
+
474
+ /**
475
+ * Percentage reward given for a second-level referral.
476
+ */
477
+ secondReferralReward?: number | null;
478
+
479
+ /**
480
+ * Object containing details of the associated smart contract.
481
+ */
482
+ smartContract?: Metadata.SmartContract;
483
+
484
+ /**
485
+ * Array of snapshot proposals for the rule.
486
+ */
487
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
488
+
489
+ /**
490
+ * Social media platform associated with the rule.
491
+ */
492
+ socialPlatform?:
493
+ | 'Twitch'
494
+ | 'TikTok'
495
+ | 'X(Twitter)'
496
+ | 'Instagram'
497
+ | 'EpicGames'
498
+ | 'YouTube'
499
+ | 'Discord'
500
+ | 'Custom'
501
+ | null;
502
+
503
+ /**
504
+ * URL of the social platform's logo.
505
+ */
506
+ socialPlatformLogo?: string | null;
507
+
508
+ /**
509
+ * Name of the social platform.
510
+ */
511
+ socialPlatformName?: string | null;
512
+
513
+ /**
514
+ * Array of streak milestones and corresponding rewards.
515
+ */
516
+ streakArray?: Array<Metadata.StreakArray> | null;
517
+
518
+ /**
519
+ * ID of the Telegram channel.
520
+ */
521
+ telegramChannelId?: string | null;
522
+
523
+ /**
524
+ * Time delay in seconds to verify actions.
525
+ */
526
+ timeDelayToVerifySeconds?: string | number | null;
527
+
528
+ /**
529
+ * Flag indicating if all contracts are tracked.
530
+ */
531
+ trackAllContracts?: boolean | null;
532
+
533
+ /**
534
+ * URL of the associated Twitter account.
535
+ */
536
+ twitterAccountUrl?: string;
537
+
538
+ /**
539
+ * Hashtag associated with the Twitter post.
540
+ */
541
+ twitterHashtag?: string;
542
+
543
+ /**
544
+ * URL of the associated Twitter post.
545
+ */
546
+ twitterPostUrl?: string;
547
+
548
+ /**
549
+ * Unique identifier of the Twitter user.
550
+ */
551
+ twitterUserId?: string;
552
+
553
+ /**
554
+ * Twitter username of the user.
555
+ */
556
+ twitterUsername?: string;
557
+
558
+ /**
559
+ * Minimum length of the verification text.
560
+ */
561
+ verificationTextMinimumLength?: number | null;
562
+
563
+ /**
564
+ * Multiplier applied to rewards for verified users.
565
+ */
566
+ verifiedMultiplier?: number | null;
567
+
568
+ /**
569
+ * Placeholder text for verification input fields.
570
+ */
571
+ verifyPlaceHolderText?: string | null;
572
+
573
+ /**
574
+ * Type of wallet associated with the rule.
575
+ */
576
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
577
+ }
578
+
579
+ export namespace Metadata {
580
+ export interface Collection {
581
+ /**
582
+ * Blockchain address of the collection.
583
+ */
584
+ address?: string;
585
+
586
+ /**
587
+ * Multiplier applied to the rewards for this collection.
588
+ */
589
+ multiplier?: number;
590
+
591
+ /**
592
+ * Blockchain network of the collection.
593
+ */
594
+ network?:
595
+ | 'mainnet'
596
+ | 'polygon'
597
+ | 'polygon_mumbai'
598
+ | 'optimism'
599
+ | 'arbitrum'
600
+ | 'binance'
601
+ | 'bscTestnet'
602
+ | 'avalanche'
603
+ | 'avalancheFuji'
604
+ | 'zksync'
605
+ | 'fantom'
606
+ | 'fantomTestnet'
607
+ | 'base'
608
+ | 'baseSepolia'
609
+ | 'skaleNebula'
610
+ | 'xai'
611
+ | 'berachainArtio'
612
+ | 'solana'
613
+ | 'apechain'
614
+ | 'flowMainnet'
615
+ | 'campTestnet'
616
+ | 'sui'
617
+ | 'vanar'
618
+ | 'sepolia'
619
+ | 'optimism_sepolia'
620
+ | 'arbitrumSepolia'
621
+ | 'goerli'
622
+ | 'optimism_goerli'
623
+ | 'arbitrumGoerli';
624
+ }
625
+
626
+ /**
627
+ * Object containing details for the call-to-action.
628
+ */
629
+ export interface Cta {
630
+ /**
631
+ * Link for the call-to-action.
632
+ */
633
+ href?: string | null;
634
+
635
+ /**
636
+ * Label for the call-to-action.
637
+ */
638
+ label?: string | null;
639
+ }
640
+
641
+ export interface DiscordServersToJoin {
642
+ /**
643
+ * ID of the Discord server to join.
644
+ */
645
+ id?: string;
646
+
647
+ /**
648
+ * Array of Discord channels to join.
649
+ */
650
+ channels?: Array<DiscordServersToJoin.Channel>;
651
+
652
+ /**
653
+ * Array of roles to assign in the Discord server.
654
+ */
655
+ roles?: Array<DiscordServersToJoin.Role>;
656
+ }
657
+
658
+ export namespace DiscordServersToJoin {
659
+ export interface Channel {
660
+ /**
661
+ * ID of the Discord channel.
662
+ */
663
+ id?: string;
664
+
665
+ /**
666
+ * Array of emojis used in the channel.
667
+ */
668
+ emojis?: Array<Channel.Emoji>;
669
+ }
670
+
671
+ export namespace Channel {
672
+ export interface Emoji {
673
+ /**
674
+ * ID of the emoji used in the channel.
675
+ */
676
+ id?: string;
677
+ }
678
+ }
679
+
680
+ export interface Role {
681
+ /**
682
+ * ID of the role in the Discord server.
683
+ */
684
+ id: string;
685
+ }
686
+ }
687
+
688
+ export interface DripQuestsToComplete {
689
+ /**
690
+ * ID of the drip quest to complete.
691
+ */
692
+ id: string;
693
+ }
694
+
695
+ export interface Range {
696
+ /**
697
+ * Reward amount for this range.
698
+ */
699
+ amount: number;
700
+
701
+ /**
702
+ * End value of the range.
703
+ */
704
+ endRange: number;
705
+
706
+ /**
707
+ * Start value of the range.
708
+ */
709
+ startRange: number;
710
+ }
711
+
712
+ /**
713
+ * Object defining referral requirements.
714
+ */
715
+ export interface ReferralRequirements {
716
+ /**
717
+ * Flag indicating if achieving points is required.
718
+ */
719
+ achievePoints?: boolean | null;
720
+
721
+ /**
722
+ * Flag indicating if completing the profile is required.
723
+ */
724
+ completeProfile?: boolean | null;
725
+
726
+ /**
727
+ * Flag indicating if connecting Discord is required.
728
+ */
729
+ connectDiscord?: boolean | null;
730
+
731
+ /**
732
+ * Flag indicating if connecting email is required.
733
+ */
734
+ connectEmail?: boolean | null;
735
+
736
+ /**
737
+ * Flag indicating if connecting Twitter is required.
738
+ */
739
+ connectTwitter?: boolean | null;
740
+
741
+ points?: ReferralRequirements.Points | null;
742
+ }
743
+
744
+ export namespace ReferralRequirements {
745
+ export interface Points {
746
+ /**
747
+ * Points required for referral.
748
+ */
749
+ amount?: number | null;
750
+
751
+ /**
752
+ * ID of the loyalty currency for referral.
753
+ */
754
+ loyaltyCurrecyId?: string | null;
755
+ }
756
+ }
757
+
758
+ /**
759
+ * Object containing details of the associated smart contract.
760
+ */
761
+ export interface SmartContract {
762
+ /**
763
+ * ABI of the smart contract.
764
+ */
765
+ abi?: string | null;
766
+
767
+ /**
768
+ * Mapping of addresses for the smart contract.
769
+ */
770
+ addressMapping?: string | null;
771
+
772
+ /**
773
+ * Array of bonus details applied to the rule.
774
+ */
775
+ bonus?: Array<SmartContract.Bonus> | null;
776
+
777
+ /**
778
+ * ID of the smart contract.
779
+ */
780
+ contractId?: string | null;
781
+
782
+ /**
783
+ * Criteria to evaluate the smart contract event.
784
+ */
785
+ criteria?: 'everyEvent' | 'byParameter' | null;
786
+
787
+ /**
788
+ * Time range applied to the rule.
789
+ */
790
+ customRange?: SmartContract.CustomRange | null;
791
+
792
+ /**
793
+ * Event emitted by the smart contract.
794
+ */
795
+ event?: string | null;
796
+
797
+ /**
798
+ * Maximum value allowed for the parameter.
799
+ */
800
+ max?: number | null;
801
+
802
+ /**
803
+ * Array of parameters for the smart contract.
804
+ */
805
+ params?: Array<SmartContract.Param> | null;
806
+
807
+ /**
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.
819
+ */
820
+ withMax?: boolean | null;
821
+ }
822
+
823
+ 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
+ /**
837
+ * Time range applied to the rule.
838
+ */
839
+ export interface CustomRange {
840
+ /**
841
+ * End time of the custom range.
842
+ */
843
+ endsAt?: string | null;
844
+
845
+ /**
846
+ * Start time of the custom range.
847
+ */
848
+ startsAt?: string | null;
849
+ }
850
+
851
+ export interface Param {
852
+ /**
853
+ * Condition to check for the parameter.
854
+ */
855
+ condition?: string | null;
856
+
857
+ /**
858
+ * Name of the smart contract parameter.
859
+ */
860
+ name?: string | null;
861
+
862
+ /**
863
+ * Value of the parameter.
864
+ */
865
+ value?: string | null;
866
+ }
867
+ }
868
+
869
+ export interface SnapshotProposal {
870
+ /**
871
+ * ID of the snapshot proposal.
872
+ */
873
+ id: string;
874
+
875
+ /**
876
+ * Space associated with the snapshot proposal.
877
+ */
878
+ space: string;
879
+ }
880
+
881
+ export interface StreakArray {
882
+ /**
883
+ * Reward amount for achieving the streak milestone.
884
+ */
885
+ streakAmount: number;
886
+
887
+ /**
888
+ * Milestone required to achieve the streak.
889
+ */
890
+ streakMilestone: number;
891
+ }
892
+ }
893
+
894
+ export interface Collection {
895
+ /**
896
+ * Blockchain address of the collection
897
+ */
898
+ address: string;
899
+
900
+ /**
901
+ * Blockchain network for the collection
902
+ */
903
+ network:
904
+ | 'mainnet'
905
+ | 'polygon'
906
+ | 'polygon_mumbai'
907
+ | 'optimism'
908
+ | 'arbitrum'
909
+ | 'binance'
910
+ | 'bscTestnet'
911
+ | 'avalanche'
912
+ | 'avalancheFuji'
913
+ | 'zksync'
914
+ | 'fantom'
915
+ | 'fantomTestnet'
916
+ | 'base'
917
+ | 'baseSepolia'
918
+ | 'skaleNebula'
919
+ | 'xai'
920
+ | 'berachainArtio'
921
+ | 'solana'
922
+ | 'apechain'
923
+ | 'flowMainnet'
924
+ | 'campTestnet'
925
+ | 'sui'
926
+ | 'vanar'
927
+ | 'sepolia'
928
+ | 'optimism_sepolia'
929
+ | 'arbitrumSepolia'
930
+ | 'goerli'
931
+ | 'optimism_goerli'
932
+ | 'arbitrumGoerli';
933
+ }
934
+ }
935
+
936
+ export interface RuleUpdateResponse {
937
+ id: string;
938
+
939
+ /**
940
+ * Reward amount for the loyalty rule
941
+ */
942
+ amount: unknown;
943
+
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
+ /**
955
+ * End time for the loyalty rule
956
+ */
957
+ endTime: string | null;
958
+
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
+ /**
970
+ * Name of the loyalty rule
971
+ */
972
+ name: string;
973
+
974
+ /**
975
+ * Start time for the loyalty rule
976
+ */
977
+ startTime: string | null;
978
+
979
+ /**
980
+ * Blockchain address of the associated collection
981
+ */
982
+ collectionAddress?: string;
983
+
984
+ /**
985
+ * List of associated collections
986
+ */
987
+ collections?: Array<RuleUpdateResponse.Collection> | null;
988
+
989
+ /**
990
+ * API URL for custom rewards integration
991
+ */
992
+ customRewardsApiUrl?: string | null;
993
+
994
+ /**
995
+ * URL for uploading custom rewards via CSV
996
+ */
997
+ customRewardsCsvUrl?: string | null;
998
+
999
+ /**
1000
+ * Optional description of the loyalty rule
1001
+ */
1002
+ description?: string;
1003
+
1004
+ /**
1005
+ * Whether to hide this rule in the user interface
1006
+ */
1007
+ hideInUi?: boolean;
1008
+
1009
+ /**
1010
+ * Time interval for recurring rule execution
1011
+ */
1012
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
1013
+
1014
+ /**
1015
+ * Whether this rule is required for participation
1016
+ */
1017
+ isRequired?: boolean;
1018
+
1019
+ /**
1020
+ * ID of the rule group section to associate with the rule
1021
+ */
1022
+ loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
1023
+
1024
+ /**
1025
+ * Blockchain network where the rule will apply
1026
+ */
1027
+ network?:
1028
+ | 'mainnet'
1029
+ | 'polygon'
1030
+ | 'polygon_mumbai'
1031
+ | 'optimism'
1032
+ | 'arbitrum'
1033
+ | 'binance'
1034
+ | 'bscTestnet'
1035
+ | 'avalanche'
1036
+ | 'avalancheFuji'
1037
+ | 'zksync'
1038
+ | 'fantom'
1039
+ | 'fantomTestnet'
1040
+ | 'base'
1041
+ | 'baseSepolia'
1042
+ | 'skaleNebula'
1043
+ | 'xai'
1044
+ | 'berachainArtio'
1045
+ | 'solana'
1046
+ | 'apechain'
1047
+ | 'flowMainnet'
1048
+ | 'campTestnet'
1049
+ | 'sui'
1050
+ | 'vanar'
1051
+ | 'sepolia'
1052
+ | 'optimism_sepolia'
1053
+ | 'arbitrumSepolia'
1054
+ | 'goerli'
1055
+ | 'optimism_goerli'
1056
+ | 'arbitrumGoerli';
1057
+
1058
+ /**
1059
+ * ID for associated OAuth credentials
1060
+ */
1061
+ oauthCredentialsId?: string | null;
1062
+
1063
+ /**
1064
+ * Type of reward issued by this rule
1065
+ */
1066
+ rewardType?: 'points' | 'multiplier';
1067
+
1068
+ /**
1069
+ * Optional subscription identifier for the rule
1070
+ */
1071
+ subscriptionIdentifier?: string | null;
1072
+ }
1073
+
1074
+ export namespace RuleUpdateResponse {
1075
+ /**
1076
+ * Additional metadata for the loyalty rule
1077
+ */
1078
+ export interface Metadata {
1079
+ /**
1080
+ * Text displayed on the action button.
1081
+ */
1082
+ buttonText?: string | null;
1083
+
1084
+ /**
1085
+ * Flag indicating if commenting is required.
1086
+ */
1087
+ checkComment?: boolean | null;
1088
+
1089
+ /**
1090
+ * Flag indicating if liking the post is required.
1091
+ */
1092
+ checkLike?: boolean | null;
1093
+
1094
+ /**
1095
+ * Flag indicating if reposting is required.
1096
+ */
1097
+ checkRepost?: boolean | null;
1098
+
1099
+ /**
1100
+ * Text to check in the Twitter post, username, or bio.
1101
+ */
1102
+ checkText?: string | null;
1103
+
1104
+ /**
1105
+ * Array of collections associated with the rule.
1106
+ */
1107
+ collection?: Array<Metadata.Collection>;
1108
+
1109
+ /**
1110
+ * Object containing details for the call-to-action.
1111
+ */
1112
+ cta?: Metadata.Cta | null;
1113
+
1114
+ /**
1115
+ * API key for custom rewards integration.
1116
+ */
1117
+ customRewardsApiKey?: string;
1118
+
1119
+ /**
1120
+ * Array of Discord servers, channels, and roles to join.
1121
+ */
1122
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
1123
+
1124
+ /**
1125
+ * Array of drip quests required to complete the rule.
1126
+ */
1127
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
1128
+
1129
+ /**
1130
+ * Flag indicating whether joining Discord servers is required.
1131
+ */
1132
+ enableJoinDiscordServers?: boolean | null;
1133
+
1134
+ /**
1135
+ * Flag indicating whether streaks are enabled.
1136
+ */
1137
+ enableStreaks?: boolean | null;
1138
+
1139
+ /**
1140
+ * Flag indicating whether the verified multiplier is enabled.
1141
+ */
1142
+ enableVerifiedMultiplier?: boolean;
1143
+
1144
+ /**
1145
+ * Percentage reward given to a user for their first referral.
1146
+ */
1147
+ firstReferralReward?: number | null;
1148
+
1149
+ /**
1150
+ * Indicates if the item has never been sold.
1151
+ */
1152
+ hasNeverSold?: boolean;
1153
+
1154
+ /**
1155
+ * Indicates if the full royalty has been paid for items.
1156
+ */
1157
+ hasPaidFullRoyalty?: boolean;
1158
+
1159
+ /**
1160
+ * Flag indicating if the sale currency is included.
1161
+ */
1162
+ hasSaleCurrency?: boolean;
1163
+
1164
+ /**
1165
+ * Indicates if the user has a verified Twitter account.
1166
+ */
1167
+ hasVerifiedTwitter?: boolean;
1168
+
1169
+ /**
1170
+ * URL of the image associated with the rule.
1171
+ */
1172
+ imageUrl?: string | null;
1173
+
1174
+ /**
1175
+ * Indicates if the multiplier has been applied to rewards.
1176
+ */
1177
+ isMultiplierApplied?: boolean;
1178
+
1179
+ /**
1180
+ * Flag indicating if rewards are applied retroactively.
1181
+ */
1182
+ isRetroactive?: boolean | null;
1183
+
1184
+ /**
1185
+ * Flag indicating if the token hold multiplier is applied.
1186
+ */
1187
+ isTokenHoldMultiplier?: boolean;
1188
+
1189
+ /**
1190
+ * Optional link associated with the metadata.
1191
+ */
1192
+ link?: string | null;
1193
+
1194
+ /**
1195
+ * Maximum quantity constraint for token holding.
1196
+ */
1197
+ maxQty?: number | null;
1198
+
1199
+ /**
1200
+ * Minimum quantity constraint for token holding.
1201
+ */
1202
+ minQty?: number | null;
1203
+
1204
+ /**
1205
+ * Array of loyalty currency IDs used for multipliers.
1206
+ */
1207
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
1208
+
1209
+ /**
1210
+ * Flag indicating whether to include only known users.
1211
+ */
1212
+ onlyKnownUsers?: boolean;
1213
+
1214
+ /**
1215
+ * Flag indicating whether to include only native tokens.
1216
+ */
1217
+ onlyNative?: boolean;
1218
+
1219
+ /**
1220
+ * Flag indicating whether to include only non-listed items.
1221
+ */
1222
+ onlyNonListed?: boolean;
1223
+
1224
+ /**
1225
+ * Promotional code associated with the rule.
1226
+ */
1227
+ promoCode?: string;
1228
+
1229
+ /**
1230
+ * Array defining ranges and corresponding rewards.
1231
+ */
1232
+ range?: Array<Metadata.Range>;
1233
+
1234
+ /**
1235
+ * Object defining referral requirements.
1236
+ */
1237
+ referralRequirements?: Metadata.ReferralRequirements | null;
1238
+
1239
+ /**
1240
+ * Lump sum reward given to a referrer.
1241
+ */
1242
+ referrerReward?: number | null;
1243
+
1244
+ /**
1245
+ * Flag indicating if rewards are given per impression.
1246
+ */
1247
+ rewardPerImpression?: boolean | null;
1248
+
1249
+ /**
1250
+ * Currency associated with sales.
1251
+ */
1252
+ saleCurrency?: string;
1253
+
1254
+ /**
1255
+ * Percentage reward given for a second-level referral.
1256
+ */
1257
+ secondReferralReward?: number | null;
1258
+
1259
+ /**
1260
+ * Object containing details of the associated smart contract.
1261
+ */
1262
+ smartContract?: Metadata.SmartContract;
1263
+
1264
+ /**
1265
+ * Array of snapshot proposals for the rule.
1266
+ */
1267
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
1268
+
1269
+ /**
1270
+ * Social media platform associated with the rule.
1271
+ */
1272
+ socialPlatform?:
1273
+ | 'Twitch'
1274
+ | 'TikTok'
1275
+ | 'X(Twitter)'
1276
+ | 'Instagram'
1277
+ | 'EpicGames'
1278
+ | 'YouTube'
1279
+ | 'Discord'
1280
+ | 'Custom'
1281
+ | null;
1282
+
1283
+ /**
1284
+ * URL of the social platform's logo.
1285
+ */
1286
+ socialPlatformLogo?: string | null;
1287
+
1288
+ /**
1289
+ * Name of the social platform.
1290
+ */
1291
+ socialPlatformName?: string | null;
1292
+
1293
+ /**
1294
+ * Array of streak milestones and corresponding rewards.
1295
+ */
1296
+ streakArray?: Array<Metadata.StreakArray> | null;
1297
+
1298
+ /**
1299
+ * ID of the Telegram channel.
1300
+ */
1301
+ telegramChannelId?: string | null;
1302
+
1303
+ /**
1304
+ * Time delay in seconds to verify actions.
1305
+ */
1306
+ timeDelayToVerifySeconds?: string | number | null;
1307
+
1308
+ /**
1309
+ * Flag indicating if all contracts are tracked.
1310
+ */
1311
+ trackAllContracts?: boolean | null;
1312
+
1313
+ /**
1314
+ * URL of the associated Twitter account.
1315
+ */
1316
+ twitterAccountUrl?: string;
1317
+
1318
+ /**
1319
+ * Hashtag associated with the Twitter post.
1320
+ */
1321
+ twitterHashtag?: string;
1322
+
1323
+ /**
1324
+ * URL of the associated Twitter post.
1325
+ */
1326
+ twitterPostUrl?: string;
1327
+
1328
+ /**
1329
+ * Unique identifier of the Twitter user.
1330
+ */
1331
+ twitterUserId?: string;
1332
+
1333
+ /**
1334
+ * Twitter username of the user.
1335
+ */
1336
+ twitterUsername?: string;
1337
+
1338
+ /**
1339
+ * Minimum length of the verification text.
1340
+ */
1341
+ verificationTextMinimumLength?: number | null;
1342
+
1343
+ /**
1344
+ * Multiplier applied to rewards for verified users.
1345
+ */
1346
+ verifiedMultiplier?: number | null;
1347
+
1348
+ /**
1349
+ * Placeholder text for verification input fields.
1350
+ */
1351
+ verifyPlaceHolderText?: string | null;
1352
+
1353
+ /**
1354
+ * Type of wallet associated with the rule.
1355
+ */
1356
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
1357
+ }
1358
+
1359
+ export namespace Metadata {
1360
+ export interface Collection {
1361
+ /**
1362
+ * Blockchain address of the collection.
1363
+ */
1364
+ address?: string;
1365
+
1366
+ /**
1367
+ * Multiplier applied to the rewards for this collection.
1368
+ */
1369
+ multiplier?: number;
1370
+
1371
+ /**
1372
+ * Blockchain network of the collection.
1373
+ */
1374
+ network?:
1375
+ | 'mainnet'
1376
+ | 'polygon'
1377
+ | 'polygon_mumbai'
1378
+ | 'optimism'
1379
+ | 'arbitrum'
1380
+ | 'binance'
1381
+ | 'bscTestnet'
1382
+ | 'avalanche'
1383
+ | 'avalancheFuji'
1384
+ | 'zksync'
1385
+ | 'fantom'
1386
+ | 'fantomTestnet'
1387
+ | 'base'
1388
+ | 'baseSepolia'
1389
+ | 'skaleNebula'
1390
+ | 'xai'
1391
+ | 'berachainArtio'
1392
+ | 'solana'
1393
+ | 'apechain'
1394
+ | 'flowMainnet'
1395
+ | 'campTestnet'
1396
+ | 'sui'
1397
+ | 'vanar'
1398
+ | 'sepolia'
1399
+ | 'optimism_sepolia'
1400
+ | 'arbitrumSepolia'
1401
+ | 'goerli'
1402
+ | 'optimism_goerli'
1403
+ | 'arbitrumGoerli';
1404
+ }
1405
+
1406
+ /**
1407
+ * Object containing details for the call-to-action.
1408
+ */
1409
+ export interface Cta {
1410
+ /**
1411
+ * Link for the call-to-action.
1412
+ */
1413
+ href?: string | null;
1414
+
1415
+ /**
1416
+ * Label for the call-to-action.
1417
+ */
1418
+ label?: string | null;
1419
+ }
1420
+
1421
+ export interface DiscordServersToJoin {
1422
+ /**
1423
+ * ID of the Discord server to join.
1424
+ */
1425
+ id?: string;
1426
+
1427
+ /**
1428
+ * Array of Discord channels to join.
1429
+ */
1430
+ channels?: Array<DiscordServersToJoin.Channel>;
1431
+
1432
+ /**
1433
+ * Array of roles to assign in the Discord server.
1434
+ */
1435
+ roles?: Array<DiscordServersToJoin.Role>;
1436
+ }
1437
+
1438
+ export namespace DiscordServersToJoin {
1439
+ export interface Channel {
1440
+ /**
1441
+ * ID of the Discord channel.
1442
+ */
1443
+ id?: string;
1444
+
1445
+ /**
1446
+ * Array of emojis used in the channel.
1447
+ */
1448
+ emojis?: Array<Channel.Emoji>;
1449
+ }
1450
+
1451
+ export namespace Channel {
1452
+ export interface Emoji {
1453
+ /**
1454
+ * ID of the emoji used in the channel.
1455
+ */
1456
+ id?: string;
1457
+ }
1458
+ }
1459
+
1460
+ export interface Role {
1461
+ /**
1462
+ * ID of the role in the Discord server.
1463
+ */
1464
+ id: string;
1465
+ }
1466
+ }
1467
+
1468
+ export interface DripQuestsToComplete {
1469
+ /**
1470
+ * ID of the drip quest to complete.
1471
+ */
1472
+ id: string;
1473
+ }
1474
+
1475
+ export interface Range {
1476
+ /**
1477
+ * Reward amount for this range.
1478
+ */
1479
+ amount: number;
1480
+
1481
+ /**
1482
+ * End value of the range.
1483
+ */
1484
+ endRange: number;
1485
+
1486
+ /**
1487
+ * Start value of the range.
1488
+ */
1489
+ startRange: number;
1490
+ }
1491
+
1492
+ /**
1493
+ * Object defining referral requirements.
1494
+ */
1495
+ export interface ReferralRequirements {
1496
+ /**
1497
+ * Flag indicating if achieving points is required.
1498
+ */
1499
+ achievePoints?: boolean | null;
1500
+
1501
+ /**
1502
+ * Flag indicating if completing the profile is required.
1503
+ */
1504
+ completeProfile?: boolean | null;
1505
+
1506
+ /**
1507
+ * Flag indicating if connecting Discord is required.
1508
+ */
1509
+ connectDiscord?: boolean | null;
1510
+
1511
+ /**
1512
+ * Flag indicating if connecting email is required.
1513
+ */
1514
+ connectEmail?: boolean | null;
1515
+
1516
+ /**
1517
+ * Flag indicating if connecting Twitter is required.
1518
+ */
1519
+ connectTwitter?: boolean | null;
1520
+
1521
+ points?: ReferralRequirements.Points | null;
1522
+ }
1523
+
1524
+ export namespace ReferralRequirements {
1525
+ export interface Points {
1526
+ /**
1527
+ * Points required for referral.
1528
+ */
1529
+ amount?: number | null;
1530
+
1531
+ /**
1532
+ * ID of the loyalty currency for referral.
1533
+ */
1534
+ loyaltyCurrecyId?: string | null;
1535
+ }
1536
+ }
1537
+
1538
+ /**
1539
+ * Object containing details of the associated smart contract.
1540
+ */
1541
+ export interface SmartContract {
1542
+ /**
1543
+ * ABI of the smart contract.
1544
+ */
1545
+ abi?: string | null;
1546
+
1547
+ /**
1548
+ * Mapping of addresses for the smart contract.
1549
+ */
1550
+ addressMapping?: string | null;
1551
+
1552
+ /**
1553
+ * Array of bonus details applied to the rule.
1554
+ */
1555
+ bonus?: Array<SmartContract.Bonus> | null;
1556
+
1557
+ /**
1558
+ * ID of the smart contract.
1559
+ */
1560
+ contractId?: string | null;
1561
+
1562
+ /**
1563
+ * Criteria to evaluate the smart contract event.
1564
+ */
1565
+ criteria?: 'everyEvent' | 'byParameter' | null;
1566
+
1567
+ /**
1568
+ * Time range applied to the rule.
1569
+ */
1570
+ customRange?: SmartContract.CustomRange | null;
1571
+
1572
+ /**
1573
+ * Event emitted by the smart contract.
1574
+ */
1575
+ event?: string | null;
1576
+
1577
+ /**
1578
+ * Maximum value allowed for the parameter.
1579
+ */
1580
+ max?: number | null;
1581
+
1582
+ /**
1583
+ * Array of parameters for the smart contract.
1584
+ */
1585
+ params?: Array<SmartContract.Param> | null;
1586
+
1587
+ /**
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.
1599
+ */
1600
+ withMax?: boolean | null;
1601
+ }
1602
+
1603
+ 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
+ /**
1617
+ * Time range applied to the rule.
1618
+ */
1619
+ export interface CustomRange {
1620
+ /**
1621
+ * End time of the custom range.
1622
+ */
1623
+ endsAt?: string | null;
1624
+
1625
+ /**
1626
+ * Start time of the custom range.
1627
+ */
1628
+ startsAt?: string | null;
1629
+ }
1630
+
1631
+ export interface Param {
1632
+ /**
1633
+ * Condition to check for the parameter.
1634
+ */
1635
+ condition?: string | null;
1636
+
1637
+ /**
1638
+ * Name of the smart contract parameter.
1639
+ */
1640
+ name?: string | null;
1641
+
1642
+ /**
1643
+ * Value of the parameter.
1644
+ */
1645
+ value?: string | null;
1646
+ }
1647
+ }
1648
+
1649
+ export interface SnapshotProposal {
1650
+ /**
1651
+ * ID of the snapshot proposal.
1652
+ */
1653
+ id: string;
1654
+
1655
+ /**
1656
+ * Space associated with the snapshot proposal.
1657
+ */
1658
+ space: string;
1659
+ }
1660
+
1661
+ export interface StreakArray {
1662
+ /**
1663
+ * Reward amount for achieving the streak milestone.
1664
+ */
1665
+ streakAmount: number;
1666
+
1667
+ /**
1668
+ * Milestone required to achieve the streak.
1669
+ */
1670
+ streakMilestone: number;
1671
+ }
1672
+ }
1673
+
1674
+ export interface Collection {
1675
+ /**
1676
+ * Blockchain address of the collection
1677
+ */
1678
+ address: string;
1679
+
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';
1713
+ }
1714
+ }
1715
+
1716
+ export interface RuleListResponse {
1717
+ data: Array<RuleListResponse.Data>;
1718
+
1719
+ hasNextPage: boolean;
1720
+ }
1721
+
1722
+ export namespace RuleListResponse {
1723
+ /**
1724
+ * Schema for a loyalty rule
1725
+ */
1726
+ export interface Data {
1727
+ /**
1728
+ * Unique identifier for the loyalty rule
1729
+ */
1730
+ id: string;
1731
+
1732
+ /**
1733
+ * Amount associated with the loyalty rule
1734
+ */
1735
+ amount: number;
1736
+
1737
+ /**
1738
+ * Timestamp when the loyalty rule was created
1739
+ */
1740
+ createdAt: string;
1741
+
1742
+ /**
1743
+ * Timestamp when the loyalty rule was deleted (if applicable)
1744
+ */
1745
+ deletedAt: string | null;
1746
+
1747
+ /**
1748
+ * Frequency of the loyalty rule
1749
+ */
1750
+ frequency: string;
1751
+
1752
+ /**
1753
+ * Unique identifier for the organization
1754
+ */
1755
+ organizationId: string;
1756
+
1757
+ /**
1758
+ * Type of the loyalty rule
1759
+ */
1760
+ type: string;
1761
+
1762
+ /**
1763
+ * Timestamp when the loyalty rule was last updated
1764
+ */
1765
+ updatedAt: string;
1766
+
1767
+ /**
1768
+ * Unique identifier for the website
1769
+ */
1770
+ websiteId: string;
1771
+
1772
+ /**
1773
+ * Optional address of the collection
1774
+ */
1775
+ collectionAddress?: string;
1776
+
1777
+ /**
1778
+ * Optional metadata for the loyalty rule
1779
+ */
1780
+ metadata?: Record<string, unknown>;
1781
+ }
1782
+ }
1783
+
1784
+ export interface RuleDeleteResponse {
1785
+ id: string;
1786
+
1787
+ deletedAt: string;
1788
+ }
1789
+
1790
+ export interface RuleCompleteResponse {
1791
+ message: string;
1792
+ }
1793
+
1794
+ export interface RuleStatusResponse {
1795
+ data: Array<RuleStatusResponse.Data>;
1796
+ }
1797
+
1798
+ export namespace RuleStatusResponse {
1799
+ export interface Data {
1800
+ loyaltyRuleId: string;
1801
+
1802
+ status: 'pending' | 'processing' | 'completed' | 'failed';
1803
+
1804
+ userId: string;
1805
+
1806
+ message?: string;
1807
+ }
1808
+ }
1809
+
1810
+ export interface RuleCreateParams {
1811
+ /**
1812
+ * Reward amount associated with the rule
1813
+ */
1814
+ amount: unknown;
1815
+
1816
+ /**
1817
+ * The effective end time of the rule
1818
+ */
1819
+ effectiveEndTime: string | null;
1820
+
1821
+ /**
1822
+ * The effective start time of the rule
1823
+ */
1824
+ effectiveStartTime: string | null;
1825
+
1826
+ /**
1827
+ * When the rule becomes inactive
1828
+ */
1829
+ endTime: string | null;
1830
+
1831
+ /**
1832
+ * Execution frequency of the loyalty rule
1833
+ */
1834
+ frequency: 'none' | 'once' | 'daily' | 'weekly' | 'monthly' | 'immediately';
1835
+
1836
+ /**
1837
+ * Unique identifier for the loyalty currency
1838
+ */
1839
+ loyaltyCurrencyId: string;
1840
+
1841
+ /**
1842
+ * Additional metadata for the loyalty rule
1843
+ */
1844
+ metadata: RuleCreateParams.Metadata;
1845
+
1846
+ /**
1847
+ * Name of the loyalty rule
1848
+ */
1849
+ name: string;
1850
+
1851
+ /**
1852
+ * Unique identifier for the organization creating the rule
1853
+ */
1854
+ organizationId: string;
1855
+
1856
+ /**
1857
+ * When the rule becomes active
1858
+ */
1859
+ startTime: string | null;
1860
+
1861
+ /**
1862
+ * Type of loyalty rule being created
1863
+ */
1864
+ type:
1865
+ | 'Bonus'
1866
+ | 'BoughtOn'
1867
+ | 'BoughtWithRoyalties'
1868
+ | 'DiscordMessages'
1869
+ | 'Listing'
1870
+ | 'Lodging'
1871
+ | 'MintOn'
1872
+ | 'PoapClaim'
1873
+ | 'SnagSocialsConnected'
1874
+ | 'SnapshotFullset'
1875
+ | 'SnapshotHold'
1876
+ | 'SoldOn'
1877
+ | 'SoldWithRoyalties'
1878
+ | 'TokenHold'
1879
+ | 'TwitterBio'
1880
+ | 'TwitterHashTagPost'
1881
+ | 'Retweet'
1882
+ | 'check_in'
1883
+ | 'code_entry'
1884
+ | 'connect_wallet'
1885
+ | 'connected_discord'
1886
+ | 'connected_email'
1887
+ | 'connected_epic'
1888
+ | 'connected_steam'
1889
+ | 'connected_telegram'
1890
+ | 'connected_twitter'
1891
+ | 'create_partner_account'
1892
+ | 'discord_member'
1893
+ | 'drip_x_follow'
1894
+ | 'drip_x_new_tweet'
1895
+ | 'drip_x_text_in_bio'
1896
+ | 'drip_x_text_in_comment'
1897
+ | 'drip_x_text_in_name'
1898
+ | 'drip_x_tweet'
1899
+ | 'external_rule'
1900
+ | 'link_click'
1901
+ | 'manual_upload'
1902
+ | 'profile_completed'
1903
+ | 'referred_user'
1904
+ | 'smart_contract_event'
1905
+ | 'snapshot_governance'
1906
+ | 'telegram_join'
1907
+ | 'telegram_messages'
1908
+ | 'text_input'
1909
+ | 'token_hold_erc20'
1910
+ | 'tweet_liked_by_project'
1911
+ | 'twitter_comment'
1912
+ | 'twitter_follow'
1913
+ | 'twitter_followers'
1914
+ | 'twitter_like'
1915
+ | 'twitter_post_hashtag';
1916
+
1917
+ /**
1918
+ * Unique identifier for the associated website
1919
+ */
1920
+ websiteId: string;
1921
+
1922
+ /**
1923
+ * URL of the background asset to be displayed
1924
+ */
1925
+ backgroundAssetUrl?: string;
1926
+
1927
+ /**
1928
+ * Blockchain address of the associated collection
1929
+ */
1930
+ collectionAddress?: string;
1931
+
1932
+ /**
1933
+ * List of associated collections
1934
+ */
1935
+ collections?: Array<RuleCreateParams.Collection> | null;
1936
+
1937
+ /**
1938
+ * URL for fetching custom rewards
1939
+ */
1940
+ customRewardsApiUrl?: string | null;
1941
+
1942
+ /**
1943
+ * URL for uploading custom rewards via CSV
1944
+ */
1945
+ customRewardsCsvUrl?: string | null;
1946
+
1947
+ /**
1948
+ * Optional detailed description of the rule
1949
+ */
1950
+ description?: string;
1951
+
1952
+ /**
1953
+ * Whether to hide this rule in the user interface
1954
+ */
1955
+ hideInUi?: boolean;
1956
+
1957
+ /**
1958
+ * Interval between rule executions
1959
+ */
1960
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
1961
+
1962
+ /**
1963
+ * Whether this rule is mandatory
1964
+ */
1965
+ isRequired?: boolean;
1966
+
1967
+ /**
1968
+ * Unique identifier for the loyalty rule group
1969
+ */
1970
+ loyaltyRuleGroupId?: 'no-section' | (string & {}) | null;
1971
+
1972
+ /**
1973
+ * Blockchain network where the rule will apply
1974
+ */
1975
+ network?:
1976
+ | 'mainnet'
1977
+ | 'polygon'
1978
+ | 'polygon_mumbai'
1979
+ | 'optimism'
1980
+ | 'arbitrum'
1981
+ | 'binance'
1982
+ | 'bscTestnet'
1983
+ | 'avalanche'
1984
+ | 'avalancheFuji'
1985
+ | 'zksync'
1986
+ | 'fantom'
1987
+ | 'fantomTestnet'
1988
+ | 'base'
1989
+ | 'baseSepolia'
1990
+ | 'skaleNebula'
1991
+ | 'xai'
1992
+ | 'berachainArtio'
1993
+ | 'solana'
1994
+ | 'apechain'
1995
+ | 'flowMainnet'
1996
+ | 'campTestnet'
1997
+ | 'sui'
1998
+ | 'vanar'
1999
+ | 'sepolia'
2000
+ | 'optimism_sepolia'
2001
+ | 'arbitrumSepolia'
2002
+ | 'goerli'
2003
+ | 'optimism_goerli'
2004
+ | 'arbitrumGoerli';
2005
+
2006
+ /**
2007
+ * OAuth credentials associated with the rule
2008
+ */
2009
+ oauthCredentialsId?: string | null;
2010
+
2011
+ /**
2012
+ * Type of reward issued by the rule
2013
+ */
2014
+ rewardType?: 'points' | 'multiplier';
2015
+
2016
+ /**
2017
+ * Identifier for associated subscriptions
2018
+ */
2019
+ subscriptionIdentifier?: string | null;
2020
+ }
2021
+
2022
+ export namespace RuleCreateParams {
2023
+ /**
2024
+ * Additional metadata for the loyalty rule
2025
+ */
2026
+ export interface Metadata {
2027
+ /**
2028
+ * Text displayed on the action button.
2029
+ */
2030
+ buttonText?: string | null;
2031
+
2032
+ /**
2033
+ * Flag indicating if commenting is required.
2034
+ */
2035
+ checkComment?: boolean | null;
2036
+
2037
+ /**
2038
+ * Flag indicating if liking the post is required.
2039
+ */
2040
+ checkLike?: boolean | null;
2041
+
2042
+ /**
2043
+ * Flag indicating if reposting is required.
2044
+ */
2045
+ checkRepost?: boolean | null;
2046
+
2047
+ /**
2048
+ * Text to check in the Twitter post, username, or bio.
2049
+ */
2050
+ checkText?: string | null;
2051
+
2052
+ /**
2053
+ * Array of collections associated with the rule.
2054
+ */
2055
+ collection?: Array<Metadata.Collection>;
2056
+
2057
+ /**
2058
+ * Object containing details for the call-to-action.
2059
+ */
2060
+ cta?: Metadata.Cta | null;
2061
+
2062
+ /**
2063
+ * API key for custom rewards integration.
2064
+ */
2065
+ customRewardsApiKey?: string;
2066
+
2067
+ /**
2068
+ * Array of Discord servers, channels, and roles to join.
2069
+ */
2070
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2071
+
2072
+ /**
2073
+ * Array of drip quests required to complete the rule.
2074
+ */
2075
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2076
+
2077
+ /**
2078
+ * Flag indicating whether joining Discord servers is required.
2079
+ */
2080
+ enableJoinDiscordServers?: boolean | null;
2081
+
2082
+ /**
2083
+ * Flag indicating whether streaks are enabled.
2084
+ */
2085
+ enableStreaks?: boolean | null;
2086
+
2087
+ /**
2088
+ * Flag indicating whether the verified multiplier is enabled.
2089
+ */
2090
+ enableVerifiedMultiplier?: boolean;
2091
+
2092
+ /**
2093
+ * Percentage reward given to a user for their first referral.
2094
+ */
2095
+ firstReferralReward?: number | null;
2096
+
2097
+ /**
2098
+ * Indicates if the item has never been sold.
2099
+ */
2100
+ hasNeverSold?: boolean;
2101
+
2102
+ /**
2103
+ * Indicates if the full royalty has been paid for items.
2104
+ */
2105
+ hasPaidFullRoyalty?: boolean;
2106
+
2107
+ /**
2108
+ * Flag indicating if the sale currency is included.
2109
+ */
2110
+ hasSaleCurrency?: boolean;
2111
+
2112
+ /**
2113
+ * Indicates if the user has a verified Twitter account.
2114
+ */
2115
+ hasVerifiedTwitter?: boolean;
2116
+
2117
+ /**
2118
+ * URL of the image associated with the rule.
2119
+ */
2120
+ imageUrl?: string | null;
2121
+
2122
+ /**
2123
+ * Indicates if the multiplier has been applied to rewards.
2124
+ */
2125
+ isMultiplierApplied?: boolean;
2126
+
2127
+ /**
2128
+ * Flag indicating if rewards are applied retroactively.
2129
+ */
2130
+ isRetroactive?: boolean | null;
2131
+
2132
+ /**
2133
+ * Flag indicating if the token hold multiplier is applied.
2134
+ */
2135
+ isTokenHoldMultiplier?: boolean;
2136
+
2137
+ /**
2138
+ * Optional link associated with the metadata.
2139
+ */
2140
+ link?: string | null;
2141
+
2142
+ /**
2143
+ * Maximum quantity constraint for token holding.
2144
+ */
2145
+ maxQty?: number | null;
2146
+
2147
+ /**
2148
+ * Minimum quantity constraint for token holding.
2149
+ */
2150
+ minQty?: number | null;
2151
+
2152
+ /**
2153
+ * Array of loyalty currency IDs used for multipliers.
2154
+ */
2155
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
2156
+
2157
+ /**
2158
+ * Flag indicating whether to include only known users.
2159
+ */
2160
+ onlyKnownUsers?: boolean;
2161
+
2162
+ /**
2163
+ * Flag indicating whether to include only native tokens.
2164
+ */
2165
+ onlyNative?: boolean;
2166
+
2167
+ /**
2168
+ * Flag indicating whether to include only non-listed items.
2169
+ */
2170
+ onlyNonListed?: boolean;
2171
+
2172
+ /**
2173
+ * Promotional code associated with the rule.
2174
+ */
2175
+ promoCode?: string;
2176
+
2177
+ /**
2178
+ * Array defining ranges and corresponding rewards.
2179
+ */
2180
+ range?: Array<Metadata.Range>;
2181
+
2182
+ /**
2183
+ * Object defining referral requirements.
2184
+ */
2185
+ referralRequirements?: Metadata.ReferralRequirements | null;
2186
+
2187
+ /**
2188
+ * Lump sum reward given to a referrer.
2189
+ */
2190
+ referrerReward?: number | null;
2191
+
2192
+ /**
2193
+ * Flag indicating if rewards are given per impression.
2194
+ */
2195
+ rewardPerImpression?: boolean | null;
2196
+
2197
+ /**
2198
+ * Currency associated with sales.
2199
+ */
2200
+ saleCurrency?: string;
2201
+
2202
+ /**
2203
+ * Percentage reward given for a second-level referral.
2204
+ */
2205
+ secondReferralReward?: number | null;
2206
+
2207
+ /**
2208
+ * Object containing details of the associated smart contract.
2209
+ */
2210
+ smartContract?: Metadata.SmartContract;
2211
+
2212
+ /**
2213
+ * Array of snapshot proposals for the rule.
2214
+ */
2215
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
2216
+
2217
+ /**
2218
+ * Social media platform associated with the rule.
2219
+ */
2220
+ socialPlatform?:
2221
+ | 'Twitch'
2222
+ | 'TikTok'
2223
+ | 'X(Twitter)'
2224
+ | 'Instagram'
2225
+ | 'EpicGames'
2226
+ | 'YouTube'
2227
+ | 'Discord'
2228
+ | 'Custom'
2229
+ | null;
2230
+
2231
+ /**
2232
+ * URL of the social platform's logo.
2233
+ */
2234
+ socialPlatformLogo?: string | null;
2235
+
2236
+ /**
2237
+ * Name of the social platform.
2238
+ */
2239
+ socialPlatformName?: string | null;
2240
+
2241
+ /**
2242
+ * Array of streak milestones and corresponding rewards.
2243
+ */
2244
+ streakArray?: Array<Metadata.StreakArray> | null;
2245
+
2246
+ /**
2247
+ * ID of the Telegram channel.
2248
+ */
2249
+ telegramChannelId?: string | null;
2250
+
2251
+ /**
2252
+ * Time delay in seconds to verify actions.
2253
+ */
2254
+ timeDelayToVerifySeconds?: string | number | null;
2255
+
2256
+ /**
2257
+ * Flag indicating if all contracts are tracked.
2258
+ */
2259
+ trackAllContracts?: boolean | null;
2260
+
2261
+ /**
2262
+ * URL of the associated Twitter account.
2263
+ */
2264
+ twitterAccountUrl?: string;
2265
+
2266
+ /**
2267
+ * Hashtag associated with the Twitter post.
2268
+ */
2269
+ twitterHashtag?: string;
2270
+
2271
+ /**
2272
+ * URL of the associated Twitter post.
2273
+ */
2274
+ twitterPostUrl?: string;
2275
+
2276
+ /**
2277
+ * Unique identifier of the Twitter user.
2278
+ */
2279
+ twitterUserId?: string;
2280
+
2281
+ /**
2282
+ * Twitter username of the user.
2283
+ */
2284
+ twitterUsername?: string;
2285
+
2286
+ /**
2287
+ * Minimum length of the verification text.
2288
+ */
2289
+ verificationTextMinimumLength?: number | null;
2290
+
2291
+ /**
2292
+ * Multiplier applied to rewards for verified users.
2293
+ */
2294
+ verifiedMultiplier?: number | null;
2295
+
2296
+ /**
2297
+ * Placeholder text for verification input fields.
2298
+ */
2299
+ verifyPlaceHolderText?: string | null;
2300
+
2301
+ /**
2302
+ * Type of wallet associated with the rule.
2303
+ */
2304
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
2305
+ }
2306
+
2307
+ export namespace Metadata {
2308
+ export interface Collection {
2309
+ /**
2310
+ * Blockchain address of the collection.
2311
+ */
2312
+ address?: string;
2313
+
2314
+ /**
2315
+ * Multiplier applied to the rewards for this collection.
2316
+ */
2317
+ multiplier?: number;
2318
+
2319
+ /**
2320
+ * Blockchain network of the collection.
2321
+ */
2322
+ network?:
2323
+ | 'mainnet'
2324
+ | 'polygon'
2325
+ | 'polygon_mumbai'
2326
+ | 'optimism'
2327
+ | 'arbitrum'
2328
+ | 'binance'
2329
+ | 'bscTestnet'
2330
+ | 'avalanche'
2331
+ | 'avalancheFuji'
2332
+ | 'zksync'
2333
+ | 'fantom'
2334
+ | 'fantomTestnet'
2335
+ | 'base'
2336
+ | 'baseSepolia'
2337
+ | 'skaleNebula'
2338
+ | 'xai'
2339
+ | 'berachainArtio'
2340
+ | 'solana'
2341
+ | 'apechain'
2342
+ | 'flowMainnet'
2343
+ | 'campTestnet'
2344
+ | 'sui'
2345
+ | 'vanar'
2346
+ | 'sepolia'
2347
+ | 'optimism_sepolia'
2348
+ | 'arbitrumSepolia'
2349
+ | 'goerli'
2350
+ | 'optimism_goerli'
2351
+ | 'arbitrumGoerli';
2352
+ }
2353
+
2354
+ /**
2355
+ * Object containing details for the call-to-action.
2356
+ */
2357
+ export interface Cta {
2358
+ /**
2359
+ * Link for the call-to-action.
2360
+ */
2361
+ href?: string | null;
2362
+
2363
+ /**
2364
+ * Label for the call-to-action.
2365
+ */
2366
+ label?: string | null;
2367
+ }
2368
+
2369
+ export interface DiscordServersToJoin {
2370
+ /**
2371
+ * ID of the Discord server to join.
2372
+ */
2373
+ id?: string;
2374
+
2375
+ /**
2376
+ * Array of Discord channels to join.
2377
+ */
2378
+ channels?: Array<DiscordServersToJoin.Channel>;
2379
+
2380
+ /**
2381
+ * Array of roles to assign in the Discord server.
2382
+ */
2383
+ roles?: Array<DiscordServersToJoin.Role>;
2384
+ }
2385
+
2386
+ export namespace DiscordServersToJoin {
2387
+ export interface Channel {
2388
+ /**
2389
+ * ID of the Discord channel.
2390
+ */
2391
+ id?: string;
2392
+
2393
+ /**
2394
+ * Array of emojis used in the channel.
2395
+ */
2396
+ emojis?: Array<Channel.Emoji>;
2397
+ }
2398
+
2399
+ export namespace Channel {
2400
+ export interface Emoji {
2401
+ /**
2402
+ * ID of the emoji used in the channel.
2403
+ */
2404
+ id?: string;
2405
+ }
2406
+ }
2407
+
2408
+ export interface Role {
2409
+ /**
2410
+ * ID of the role in the Discord server.
2411
+ */
2412
+ id: string;
2413
+ }
2414
+ }
2415
+
2416
+ export interface DripQuestsToComplete {
2417
+ /**
2418
+ * ID of the drip quest to complete.
2419
+ */
2420
+ id: string;
2421
+ }
2422
+
2423
+ export interface Range {
2424
+ /**
2425
+ * Reward amount for this range.
2426
+ */
2427
+ amount: number;
2428
+
2429
+ /**
2430
+ * End value of the range.
2431
+ */
2432
+ endRange: number;
2433
+
2434
+ /**
2435
+ * Start value of the range.
2436
+ */
2437
+ startRange: number;
2438
+ }
2439
+
2440
+ /**
2441
+ * Object defining referral requirements.
2442
+ */
2443
+ export interface ReferralRequirements {
2444
+ /**
2445
+ * Flag indicating if achieving points is required.
2446
+ */
2447
+ achievePoints?: boolean | null;
2448
+
2449
+ /**
2450
+ * Flag indicating if completing the profile is required.
2451
+ */
2452
+ completeProfile?: boolean | null;
2453
+
2454
+ /**
2455
+ * Flag indicating if connecting Discord is required.
2456
+ */
2457
+ connectDiscord?: boolean | null;
2458
+
2459
+ /**
2460
+ * Flag indicating if connecting email is required.
2461
+ */
2462
+ connectEmail?: boolean | null;
2463
+
2464
+ /**
2465
+ * Flag indicating if connecting Twitter is required.
2466
+ */
2467
+ connectTwitter?: boolean | null;
2468
+
2469
+ points?: ReferralRequirements.Points | null;
2470
+ }
2471
+
2472
+ export namespace ReferralRequirements {
2473
+ export interface Points {
2474
+ /**
2475
+ * Points required for referral.
2476
+ */
2477
+ amount?: number | null;
2478
+
2479
+ /**
2480
+ * ID of the loyalty currency for referral.
2481
+ */
2482
+ loyaltyCurrecyId?: string | null;
2483
+ }
2484
+ }
2485
+
2486
+ /**
2487
+ * Object containing details of the associated smart contract.
2488
+ */
2489
+ export interface SmartContract {
2490
+ /**
2491
+ * ABI of the smart contract.
2492
+ */
2493
+ abi?: string | null;
2494
+
2495
+ /**
2496
+ * Mapping of addresses for the smart contract.
2497
+ */
2498
+ addressMapping?: string | null;
2499
+
2500
+ /**
2501
+ * Array of bonus details applied to the rule.
2502
+ */
2503
+ bonus?: Array<SmartContract.Bonus> | null;
2504
+
2505
+ /**
2506
+ * ID of the smart contract.
2507
+ */
2508
+ contractId?: string | null;
2509
+
2510
+ /**
2511
+ * Criteria to evaluate the smart contract event.
2512
+ */
2513
+ criteria?: 'everyEvent' | 'byParameter' | null;
2514
+
2515
+ /**
2516
+ * Time range applied to the rule.
2517
+ */
2518
+ customRange?: SmartContract.CustomRange | null;
2519
+
2520
+ /**
2521
+ * Event emitted by the smart contract.
2522
+ */
2523
+ event?: string | null;
2524
+
2525
+ /**
2526
+ * Maximum value allowed for the parameter.
2527
+ */
2528
+ max?: number | null;
2529
+
2530
+ /**
2531
+ * Array of parameters for the smart contract.
2532
+ */
2533
+ params?: Array<SmartContract.Param> | null;
2534
+
2535
+ /**
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.
2547
+ */
2548
+ withMax?: boolean | null;
2549
+ }
2550
+
2551
+ export namespace SmartContract {
2552
+ export interface Bonus {
2553
+ /**
2554
+ * Amount of the bonus.
2555
+ */
2556
+ amount?: number | null;
2557
+
2558
+ /**
2559
+ * Number of times the bonus is applied.
2560
+ */
2561
+ count?: number | null;
2562
+ }
2563
+
2564
+ /**
2565
+ * Time range applied to the rule.
2566
+ */
2567
+ export interface CustomRange {
2568
+ /**
2569
+ * End time of the custom range.
2570
+ */
2571
+ endsAt?: string | null;
2572
+
2573
+ /**
2574
+ * Start time of the custom range.
2575
+ */
2576
+ startsAt?: string | null;
2577
+ }
2578
+
2579
+ export interface Param {
2580
+ /**
2581
+ * Condition to check for the parameter.
2582
+ */
2583
+ condition?: string | null;
2584
+
2585
+ /**
2586
+ * Name of the smart contract parameter.
2587
+ */
2588
+ name?: string | null;
2589
+
2590
+ /**
2591
+ * Value of the parameter.
2592
+ */
2593
+ value?: string | null;
2594
+ }
2595
+ }
2596
+
2597
+ export interface SnapshotProposal {
2598
+ /**
2599
+ * ID of the snapshot proposal.
2600
+ */
2601
+ id: string;
2602
+
2603
+ /**
2604
+ * Space associated with the snapshot proposal.
2605
+ */
2606
+ space: string;
2607
+ }
2608
+
2609
+ export interface StreakArray {
2610
+ /**
2611
+ * Reward amount for achieving the streak milestone.
2612
+ */
2613
+ streakAmount: number;
2614
+
2615
+ /**
2616
+ * Milestone required to achieve the streak.
2617
+ */
2618
+ streakMilestone: number;
2619
+ }
2620
+ }
2621
+
2622
+ export interface Collection {
2623
+ /**
2624
+ * Blockchain address of the collection
2625
+ */
2626
+ address: string;
2627
+
2628
+ /**
2629
+ * Blockchain network for the collection
2630
+ */
2631
+ network:
2632
+ | 'mainnet'
2633
+ | 'polygon'
2634
+ | 'polygon_mumbai'
2635
+ | 'optimism'
2636
+ | 'arbitrum'
2637
+ | 'binance'
2638
+ | 'bscTestnet'
2639
+ | 'avalanche'
2640
+ | 'avalancheFuji'
2641
+ | 'zksync'
2642
+ | 'fantom'
2643
+ | 'fantomTestnet'
2644
+ | 'base'
2645
+ | 'baseSepolia'
2646
+ | 'skaleNebula'
2647
+ | 'xai'
2648
+ | 'berachainArtio'
2649
+ | 'solana'
2650
+ | 'apechain'
2651
+ | 'flowMainnet'
2652
+ | 'campTestnet'
2653
+ | 'sui'
2654
+ | 'vanar'
2655
+ | 'sepolia'
2656
+ | 'optimism_sepolia'
2657
+ | 'arbitrumSepolia'
2658
+ | 'goerli'
2659
+ | 'optimism_goerli'
2660
+ | 'arbitrumGoerli';
2661
+ }
2662
+ }
2663
+
2664
+ export interface RuleUpdateParams {
2665
+ /**
2666
+ * Reward amount for the loyalty rule
2667
+ */
2668
+ amount: unknown;
2669
+
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
+ /**
2681
+ * End time for the loyalty rule
2682
+ */
2683
+ endTime: string | null;
2684
+
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
+ /**
2696
+ * Name of the loyalty rule
2697
+ */
2698
+ name: string;
2699
+
2700
+ /**
2701
+ * Start time for the loyalty rule
2702
+ */
2703
+ startTime: string | null;
2704
+
2705
+ /**
2706
+ * Blockchain address of the associated collection
2707
+ */
2708
+ collectionAddress?: string;
2709
+
2710
+ /**
2711
+ * List of associated collections
2712
+ */
2713
+ collections?: Array<RuleUpdateParams.Collection> | null;
2714
+
2715
+ /**
2716
+ * API URL for custom rewards integration
2717
+ */
2718
+ customRewardsApiUrl?: string | null;
2719
+
2720
+ /**
2721
+ * URL for uploading custom rewards via CSV
2722
+ */
2723
+ customRewardsCsvUrl?: string | null;
2724
+
2725
+ /**
2726
+ * Optional description of the loyalty rule
2727
+ */
2728
+ description?: string;
2729
+
2730
+ /**
2731
+ * Whether to hide this rule in the user interface
2732
+ */
2733
+ hideInUi?: boolean;
2734
+
2735
+ /**
2736
+ * Time interval for recurring rule execution
2737
+ */
2738
+ interval?: 'daily' | 'weekly' | 'monthly' | 'once' | null;
2739
+
2740
+ /**
2741
+ * Whether this rule is required for participation
2742
+ */
2743
+ isRequired?: boolean;
2744
+
2745
+ /**
2746
+ * ID of the rule group section to associate with the rule
2747
+ */
2748
+ loyaltyRuleGroupId?: (string & {}) | 'no-section' | null;
2749
+
2750
+ /**
2751
+ * Blockchain network where the rule will apply
2752
+ */
2753
+ network?:
2754
+ | 'mainnet'
2755
+ | 'polygon'
2756
+ | 'polygon_mumbai'
2757
+ | 'optimism'
2758
+ | 'arbitrum'
2759
+ | 'binance'
2760
+ | 'bscTestnet'
2761
+ | 'avalanche'
2762
+ | 'avalancheFuji'
2763
+ | 'zksync'
2764
+ | 'fantom'
2765
+ | 'fantomTestnet'
2766
+ | 'base'
2767
+ | 'baseSepolia'
2768
+ | 'skaleNebula'
2769
+ | 'xai'
2770
+ | 'berachainArtio'
2771
+ | 'solana'
2772
+ | 'apechain'
2773
+ | 'flowMainnet'
2774
+ | 'campTestnet'
2775
+ | 'sui'
2776
+ | 'vanar'
2777
+ | 'sepolia'
2778
+ | 'optimism_sepolia'
2779
+ | 'arbitrumSepolia'
2780
+ | 'goerli'
2781
+ | 'optimism_goerli'
2782
+ | 'arbitrumGoerli';
2783
+
2784
+ /**
2785
+ * ID for associated OAuth credentials
2786
+ */
2787
+ oauthCredentialsId?: string | null;
2788
+
2789
+ /**
2790
+ * Type of reward issued by this rule
2791
+ */
2792
+ rewardType?: 'points' | 'multiplier';
2793
+
2794
+ /**
2795
+ * Optional subscription identifier for the rule
2796
+ */
2797
+ subscriptionIdentifier?: string | null;
2798
+ }
2799
+
2800
+ export namespace RuleUpdateParams {
2801
+ /**
2802
+ * Additional metadata for the loyalty rule
2803
+ */
2804
+ export interface Metadata {
2805
+ /**
2806
+ * Text displayed on the action button.
2807
+ */
2808
+ buttonText?: string | null;
2809
+
2810
+ /**
2811
+ * Flag indicating if commenting is required.
2812
+ */
2813
+ checkComment?: boolean | null;
2814
+
2815
+ /**
2816
+ * Flag indicating if liking the post is required.
2817
+ */
2818
+ checkLike?: boolean | null;
2819
+
2820
+ /**
2821
+ * Flag indicating if reposting is required.
2822
+ */
2823
+ checkRepost?: boolean | null;
2824
+
2825
+ /**
2826
+ * Text to check in the Twitter post, username, or bio.
2827
+ */
2828
+ checkText?: string | null;
2829
+
2830
+ /**
2831
+ * Array of collections associated with the rule.
2832
+ */
2833
+ collection?: Array<Metadata.Collection>;
2834
+
2835
+ /**
2836
+ * Object containing details for the call-to-action.
2837
+ */
2838
+ cta?: Metadata.Cta | null;
2839
+
2840
+ /**
2841
+ * API key for custom rewards integration.
2842
+ */
2843
+ customRewardsApiKey?: string;
2844
+
2845
+ /**
2846
+ * Array of Discord servers, channels, and roles to join.
2847
+ */
2848
+ discordServersToJoin?: Array<Metadata.DiscordServersToJoin> | null;
2849
+
2850
+ /**
2851
+ * Array of drip quests required to complete the rule.
2852
+ */
2853
+ dripQuestsToComplete?: Array<Metadata.DripQuestsToComplete> | null;
2854
+
2855
+ /**
2856
+ * Flag indicating whether joining Discord servers is required.
2857
+ */
2858
+ enableJoinDiscordServers?: boolean | null;
2859
+
2860
+ /**
2861
+ * Flag indicating whether streaks are enabled.
2862
+ */
2863
+ enableStreaks?: boolean | null;
2864
+
2865
+ /**
2866
+ * Flag indicating whether the verified multiplier is enabled.
2867
+ */
2868
+ enableVerifiedMultiplier?: boolean;
2869
+
2870
+ /**
2871
+ * Percentage reward given to a user for their first referral.
2872
+ */
2873
+ firstReferralReward?: number | null;
2874
+
2875
+ /**
2876
+ * Indicates if the item has never been sold.
2877
+ */
2878
+ hasNeverSold?: boolean;
2879
+
2880
+ /**
2881
+ * Indicates if the full royalty has been paid for items.
2882
+ */
2883
+ hasPaidFullRoyalty?: boolean;
2884
+
2885
+ /**
2886
+ * Flag indicating if the sale currency is included.
2887
+ */
2888
+ hasSaleCurrency?: boolean;
2889
+
2890
+ /**
2891
+ * Indicates if the user has a verified Twitter account.
2892
+ */
2893
+ hasVerifiedTwitter?: boolean;
2894
+
2895
+ /**
2896
+ * URL of the image associated with the rule.
2897
+ */
2898
+ imageUrl?: string | null;
2899
+
2900
+ /**
2901
+ * Indicates if the multiplier has been applied to rewards.
2902
+ */
2903
+ isMultiplierApplied?: boolean;
2904
+
2905
+ /**
2906
+ * Flag indicating if rewards are applied retroactively.
2907
+ */
2908
+ isRetroactive?: boolean | null;
2909
+
2910
+ /**
2911
+ * Flag indicating if the token hold multiplier is applied.
2912
+ */
2913
+ isTokenHoldMultiplier?: boolean;
2914
+
2915
+ /**
2916
+ * Optional link associated with the metadata.
2917
+ */
2918
+ link?: string | null;
2919
+
2920
+ /**
2921
+ * Maximum quantity constraint for token holding.
2922
+ */
2923
+ maxQty?: number | null;
2924
+
2925
+ /**
2926
+ * Minimum quantity constraint for token holding.
2927
+ */
2928
+ minQty?: number | null;
2929
+
2930
+ /**
2931
+ * Array of loyalty currency IDs used for multipliers.
2932
+ */
2933
+ multiplierLoyaltyCurrencyIds?: Array<string> | null;
2934
+
2935
+ /**
2936
+ * Flag indicating whether to include only known users.
2937
+ */
2938
+ onlyKnownUsers?: boolean;
2939
+
2940
+ /**
2941
+ * Flag indicating whether to include only native tokens.
2942
+ */
2943
+ onlyNative?: boolean;
2944
+
2945
+ /**
2946
+ * Flag indicating whether to include only non-listed items.
2947
+ */
2948
+ onlyNonListed?: boolean;
2949
+
2950
+ /**
2951
+ * Promotional code associated with the rule.
2952
+ */
2953
+ promoCode?: string;
2954
+
2955
+ /**
2956
+ * Array defining ranges and corresponding rewards.
2957
+ */
2958
+ range?: Array<Metadata.Range>;
2959
+
2960
+ /**
2961
+ * Object defining referral requirements.
2962
+ */
2963
+ referralRequirements?: Metadata.ReferralRequirements | null;
2964
+
2965
+ /**
2966
+ * Lump sum reward given to a referrer.
2967
+ */
2968
+ referrerReward?: number | null;
2969
+
2970
+ /**
2971
+ * Flag indicating if rewards are given per impression.
2972
+ */
2973
+ rewardPerImpression?: boolean | null;
2974
+
2975
+ /**
2976
+ * Currency associated with sales.
2977
+ */
2978
+ saleCurrency?: string;
2979
+
2980
+ /**
2981
+ * Percentage reward given for a second-level referral.
2982
+ */
2983
+ secondReferralReward?: number | null;
2984
+
2985
+ /**
2986
+ * Object containing details of the associated smart contract.
2987
+ */
2988
+ smartContract?: Metadata.SmartContract;
2989
+
2990
+ /**
2991
+ * Array of snapshot proposals for the rule.
2992
+ */
2993
+ snapshotProposals?: Array<Metadata.SnapshotProposal> | null;
2994
+
2995
+ /**
2996
+ * Social media platform associated with the rule.
2997
+ */
2998
+ socialPlatform?:
2999
+ | 'Twitch'
3000
+ | 'TikTok'
3001
+ | 'X(Twitter)'
3002
+ | 'Instagram'
3003
+ | 'EpicGames'
3004
+ | 'YouTube'
3005
+ | 'Discord'
3006
+ | 'Custom'
3007
+ | null;
3008
+
3009
+ /**
3010
+ * URL of the social platform's logo.
3011
+ */
3012
+ socialPlatformLogo?: string | null;
3013
+
3014
+ /**
3015
+ * Name of the social platform.
3016
+ */
3017
+ socialPlatformName?: string | null;
3018
+
3019
+ /**
3020
+ * Array of streak milestones and corresponding rewards.
3021
+ */
3022
+ streakArray?: Array<Metadata.StreakArray> | null;
3023
+
3024
+ /**
3025
+ * ID of the Telegram channel.
3026
+ */
3027
+ telegramChannelId?: string | null;
3028
+
3029
+ /**
3030
+ * Time delay in seconds to verify actions.
3031
+ */
3032
+ timeDelayToVerifySeconds?: string | number | null;
3033
+
3034
+ /**
3035
+ * Flag indicating if all contracts are tracked.
3036
+ */
3037
+ trackAllContracts?: boolean | null;
3038
+
3039
+ /**
3040
+ * URL of the associated Twitter account.
3041
+ */
3042
+ twitterAccountUrl?: string;
3043
+
3044
+ /**
3045
+ * Hashtag associated with the Twitter post.
3046
+ */
3047
+ twitterHashtag?: string;
3048
+
3049
+ /**
3050
+ * URL of the associated Twitter post.
3051
+ */
3052
+ twitterPostUrl?: string;
3053
+
3054
+ /**
3055
+ * Unique identifier of the Twitter user.
3056
+ */
3057
+ twitterUserId?: string;
3058
+
3059
+ /**
3060
+ * Twitter username of the user.
3061
+ */
3062
+ twitterUsername?: string;
3063
+
3064
+ /**
3065
+ * Minimum length of the verification text.
3066
+ */
3067
+ verificationTextMinimumLength?: number | null;
3068
+
3069
+ /**
3070
+ * Multiplier applied to rewards for verified users.
3071
+ */
3072
+ verifiedMultiplier?: number | null;
3073
+
3074
+ /**
3075
+ * Placeholder text for verification input fields.
3076
+ */
3077
+ verifyPlaceHolderText?: string | null;
3078
+
3079
+ /**
3080
+ * Type of wallet associated with the rule.
3081
+ */
3082
+ walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
3083
+ }
3084
+
3085
+ export namespace Metadata {
3086
+ export interface Collection {
3087
+ /**
3088
+ * Blockchain address of the collection.
3089
+ */
3090
+ address?: string;
3091
+
3092
+ /**
3093
+ * Multiplier applied to the rewards for this collection.
3094
+ */
3095
+ multiplier?: number;
3096
+
3097
+ /**
3098
+ * Blockchain network of the collection.
3099
+ */
3100
+ network?:
3101
+ | 'mainnet'
3102
+ | 'polygon'
3103
+ | 'polygon_mumbai'
3104
+ | 'optimism'
3105
+ | 'arbitrum'
3106
+ | 'binance'
3107
+ | 'bscTestnet'
3108
+ | 'avalanche'
3109
+ | 'avalancheFuji'
3110
+ | 'zksync'
3111
+ | 'fantom'
3112
+ | 'fantomTestnet'
3113
+ | 'base'
3114
+ | 'baseSepolia'
3115
+ | 'skaleNebula'
3116
+ | 'xai'
3117
+ | 'berachainArtio'
3118
+ | 'solana'
3119
+ | 'apechain'
3120
+ | 'flowMainnet'
3121
+ | 'campTestnet'
3122
+ | 'sui'
3123
+ | 'vanar'
3124
+ | 'sepolia'
3125
+ | 'optimism_sepolia'
3126
+ | 'arbitrumSepolia'
3127
+ | 'goerli'
3128
+ | 'optimism_goerli'
3129
+ | 'arbitrumGoerli';
3130
+ }
3131
+
3132
+ /**
3133
+ * Object containing details for the call-to-action.
3134
+ */
3135
+ export interface Cta {
3136
+ /**
3137
+ * Link for the call-to-action.
3138
+ */
3139
+ href?: string | null;
3140
+
3141
+ /**
3142
+ * Label for the call-to-action.
3143
+ */
3144
+ label?: string | null;
3145
+ }
3146
+
3147
+ export interface DiscordServersToJoin {
3148
+ /**
3149
+ * ID of the Discord server to join.
3150
+ */
3151
+ id?: string;
3152
+
3153
+ /**
3154
+ * Array of Discord channels to join.
3155
+ */
3156
+ channels?: Array<DiscordServersToJoin.Channel>;
3157
+
3158
+ /**
3159
+ * Array of roles to assign in the Discord server.
3160
+ */
3161
+ roles?: Array<DiscordServersToJoin.Role>;
3162
+ }
3163
+
3164
+ export namespace DiscordServersToJoin {
3165
+ export interface Channel {
3166
+ /**
3167
+ * ID of the Discord channel.
3168
+ */
3169
+ id?: string;
3170
+
3171
+ /**
3172
+ * Array of emojis used in the channel.
3173
+ */
3174
+ emojis?: Array<Channel.Emoji>;
3175
+ }
3176
+
3177
+ export namespace Channel {
3178
+ export interface Emoji {
3179
+ /**
3180
+ * ID of the emoji used in the channel.
3181
+ */
3182
+ id?: string;
3183
+ }
3184
+ }
3185
+
3186
+ export interface Role {
3187
+ /**
3188
+ * ID of the role in the Discord server.
3189
+ */
3190
+ id: string;
3191
+ }
3192
+ }
3193
+
3194
+ export interface DripQuestsToComplete {
3195
+ /**
3196
+ * ID of the drip quest to complete.
3197
+ */
3198
+ id: string;
3199
+ }
3200
+
3201
+ export interface Range {
3202
+ /**
3203
+ * Reward amount for this range.
3204
+ */
3205
+ amount: number;
3206
+
3207
+ /**
3208
+ * End value of the range.
3209
+ */
3210
+ endRange: number;
3211
+
3212
+ /**
3213
+ * Start value of the range.
3214
+ */
3215
+ startRange: number;
3216
+ }
3217
+
3218
+ /**
3219
+ * Object defining referral requirements.
3220
+ */
3221
+ export interface ReferralRequirements {
3222
+ /**
3223
+ * Flag indicating if achieving points is required.
3224
+ */
3225
+ achievePoints?: boolean | null;
3226
+
3227
+ /**
3228
+ * Flag indicating if completing the profile is required.
3229
+ */
3230
+ completeProfile?: boolean | null;
3231
+
3232
+ /**
3233
+ * Flag indicating if connecting Discord is required.
3234
+ */
3235
+ connectDiscord?: boolean | null;
3236
+
3237
+ /**
3238
+ * Flag indicating if connecting email is required.
3239
+ */
3240
+ connectEmail?: boolean | null;
3241
+
3242
+ /**
3243
+ * Flag indicating if connecting Twitter is required.
3244
+ */
3245
+ connectTwitter?: boolean | null;
3246
+
3247
+ points?: ReferralRequirements.Points | null;
3248
+ }
3249
+
3250
+ export namespace ReferralRequirements {
3251
+ export interface Points {
3252
+ /**
3253
+ * Points required for referral.
3254
+ */
3255
+ amount?: number | null;
3256
+
3257
+ /**
3258
+ * ID of the loyalty currency for referral.
3259
+ */
3260
+ loyaltyCurrecyId?: string | null;
3261
+ }
3262
+ }
3263
+
3264
+ /**
3265
+ * Object containing details of the associated smart contract.
3266
+ */
3267
+ export interface SmartContract {
3268
+ /**
3269
+ * ABI of the smart contract.
3270
+ */
3271
+ abi?: string | null;
3272
+
3273
+ /**
3274
+ * Mapping of addresses for the smart contract.
3275
+ */
3276
+ addressMapping?: string | null;
3277
+
3278
+ /**
3279
+ * Array of bonus details applied to the rule.
3280
+ */
3281
+ bonus?: Array<SmartContract.Bonus> | null;
3282
+
3283
+ /**
3284
+ * ID of the smart contract.
3285
+ */
3286
+ contractId?: string | null;
3287
+
3288
+ /**
3289
+ * Criteria to evaluate the smart contract event.
3290
+ */
3291
+ criteria?: 'everyEvent' | 'byParameter' | null;
3292
+
3293
+ /**
3294
+ * Time range applied to the rule.
3295
+ */
3296
+ customRange?: SmartContract.CustomRange | null;
3297
+
3298
+ /**
3299
+ * Event emitted by the smart contract.
3300
+ */
3301
+ event?: string | null;
3302
+
3303
+ /**
3304
+ * Maximum value allowed for the parameter.
3305
+ */
3306
+ max?: number | null;
3307
+
3308
+ /**
3309
+ * Array of parameters for the smart contract.
3310
+ */
3311
+ params?: Array<SmartContract.Param> | null;
3312
+
3313
+ /**
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.
3325
+ */
3326
+ withMax?: boolean | null;
3327
+ }
3328
+
3329
+ 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
+ /**
3343
+ * Time range applied to the rule.
3344
+ */
3345
+ export interface CustomRange {
3346
+ /**
3347
+ * End time of the custom range.
3348
+ */
3349
+ endsAt?: string | null;
3350
+
3351
+ /**
3352
+ * Start time of the custom range.
3353
+ */
3354
+ startsAt?: string | null;
3355
+ }
3356
+
3357
+ export interface Param {
3358
+ /**
3359
+ * Condition to check for the parameter.
3360
+ */
3361
+ condition?: string | null;
3362
+
3363
+ /**
3364
+ * Name of the smart contract parameter.
3365
+ */
3366
+ name?: string | null;
3367
+
3368
+ /**
3369
+ * Value of the parameter.
3370
+ */
3371
+ value?: string | null;
3372
+ }
3373
+ }
3374
+
3375
+ export interface SnapshotProposal {
3376
+ /**
3377
+ * ID of the snapshot proposal.
3378
+ */
3379
+ id: string;
3380
+
3381
+ /**
3382
+ * Space associated with the snapshot proposal.
3383
+ */
3384
+ space: string;
3385
+ }
3386
+
3387
+ export interface StreakArray {
3388
+ /**
3389
+ * Reward amount for achieving the streak milestone.
3390
+ */
3391
+ streakAmount: number;
3392
+
3393
+ /**
3394
+ * Milestone required to achieve the streak.
3395
+ */
3396
+ streakMilestone: number;
3397
+ }
3398
+ }
3399
+
3400
+ export interface Collection {
3401
+ /**
3402
+ * Blockchain address of the collection
3403
+ */
3404
+ address: string;
3405
+
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';
3439
+ }
3440
+ }
3441
+
3442
+ export interface RuleListParams {
3443
+ /**
3444
+ * Address of the collection to filter by
3445
+ */
3446
+ collectionAddress?: string;
3447
+
3448
+ /**
3449
+ * Maximum number of records to return (max 1000)
3450
+ */
3451
+ limit?: number;
3452
+
3453
+ /**
3454
+ * Unique identifier for the organization to filter by
3455
+ */
3456
+ organizationId?: string;
3457
+
3458
+ /**
3459
+ * Pagination cursor to start after a specific resource ID
3460
+ */
3461
+ startingAfter?: string;
3462
+
3463
+ /**
3464
+ * Unique identifier for the website to filter by
3465
+ */
3466
+ websiteId?: string;
3467
+ }
3468
+
3469
+ export interface RuleCompleteParams {
3470
+ /**
3471
+ * Link to the comment made by user
3472
+ */
3473
+ commentLink?: string;
3474
+
3475
+ /**
3476
+ * Unique identifier for the user
3477
+ */
3478
+ userId?: string;
3479
+
3480
+ /**
3481
+ * Optional verification code for completing the loyalty rule
3482
+ */
3483
+ verificationCode?: string;
3484
+
3485
+ /**
3486
+ * Wallet address of the user can only be used if userId is not provided
3487
+ */
3488
+ walletAddress?: string;
3489
+ }
3490
+
3491
+ export interface RuleStatusParams {
3492
+ organizationId: string;
3493
+
3494
+ websiteId: string;
3495
+
3496
+ userId?: string;
3497
+ }
3498
+
3499
+ export declare namespace Rules {
3500
+ export {
3501
+ type RuleCreateResponse as RuleCreateResponse,
3502
+ type RuleUpdateResponse as RuleUpdateResponse,
3503
+ type RuleListResponse as RuleListResponse,
3504
+ type RuleDeleteResponse as RuleDeleteResponse,
3505
+ type RuleCompleteResponse as RuleCompleteResponse,
3506
+ type RuleStatusResponse as RuleStatusResponse,
3507
+ type RuleCreateParams as RuleCreateParams,
3508
+ type RuleUpdateParams as RuleUpdateParams,
3509
+ type RuleListParams as RuleListParams,
3510
+ type RuleCompleteParams as RuleCompleteParams,
3511
+ type RuleStatusParams as RuleStatusParams,
3512
+ };
3513
+ }