@snagsolutions/sdk 0.1.0-alpha.18 → 0.1.0-alpha.180

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 (272) hide show
  1. package/CHANGELOG.md +1472 -0
  2. package/README.md +13 -23
  3. package/core.d.ts +19 -5
  4. package/core.d.ts.map +1 -1
  5. package/core.js +24 -17
  6. package/core.js.map +1 -1
  7. package/core.mjs +24 -17
  8. package/core.mjs.map +1 -1
  9. package/index.d.mts +7 -4
  10. package/index.d.ts +7 -4
  11. package/index.d.ts.map +1 -1
  12. package/index.js +8 -4
  13. package/index.js.map +1 -1
  14. package/index.mjs +8 -4
  15. package/index.mjs.map +1 -1
  16. package/package.json +4 -5
  17. package/resource.d.ts +1 -1
  18. package/resource.d.ts.map +1 -1
  19. package/resource.js.map +1 -1
  20. package/resource.mjs.map +1 -1
  21. package/resources/assets.d.ts +16 -2
  22. package/resources/assets.d.ts.map +1 -1
  23. package/resources/assets.js +8 -0
  24. package/resources/assets.js.map +1 -1
  25. package/resources/assets.mjs +8 -0
  26. package/resources/assets.mjs.map +1 -1
  27. package/resources/auctions/auctions.d.ts +285 -0
  28. package/resources/auctions/auctions.d.ts.map +1 -0
  29. package/resources/auctions/auctions.js +76 -0
  30. package/resources/auctions/auctions.js.map +1 -0
  31. package/resources/auctions/auctions.mjs +49 -0
  32. package/resources/auctions/auctions.mjs.map +1 -0
  33. package/resources/auctions/index.d.ts +3 -0
  34. package/resources/auctions/index.d.ts.map +1 -0
  35. package/resources/auctions/index.js +9 -0
  36. package/resources/auctions/index.js.map +1 -0
  37. package/resources/auctions/index.mjs +4 -0
  38. package/resources/auctions/index.mjs.map +1 -0
  39. package/resources/auctions/website-user-attributes/index.d.ts +3 -0
  40. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
  41. package/resources/auctions/website-user-attributes/index.js +9 -0
  42. package/resources/auctions/website-user-attributes/index.js.map +1 -0
  43. package/resources/auctions/website-user-attributes/index.mjs +4 -0
  44. package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
  45. package/resources/auctions/website-user-attributes/values.d.ts +122 -0
  46. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  47. package/resources/auctions/website-user-attributes/values.js +49 -0
  48. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  49. package/resources/auctions/website-user-attributes/values.mjs +45 -0
  50. package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
  51. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +132 -0
  52. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
  53. package/resources/auctions/website-user-attributes/website-user-attributes.js +76 -0
  54. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
  55. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +49 -0
  56. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
  57. package/resources/auctions/website-user-attributes.d.ts +2 -0
  58. package/resources/auctions/website-user-attributes.d.ts.map +1 -0
  59. package/resources/auctions/website-user-attributes.js +19 -0
  60. package/resources/auctions/website-user-attributes.js.map +1 -0
  61. package/resources/auctions/website-user-attributes.mjs +3 -0
  62. package/resources/auctions/website-user-attributes.mjs.map +1 -0
  63. package/resources/auctions.d.ts +1 -133
  64. package/resources/auctions.d.ts.map +1 -1
  65. package/resources/auctions.js +15 -22
  66. package/resources/auctions.js.map +1 -1
  67. package/resources/auctions.mjs +1 -20
  68. package/resources/auctions.mjs.map +1 -1
  69. package/resources/auth.d.ts +17 -4
  70. package/resources/auth.d.ts.map +1 -1
  71. package/resources/auth.js.map +1 -1
  72. package/resources/auth.mjs.map +1 -1
  73. package/resources/index.d.ts +2 -2
  74. package/resources/index.d.ts.map +1 -1
  75. package/resources/index.js +1 -1
  76. package/resources/index.js.map +1 -1
  77. package/resources/index.mjs +1 -1
  78. package/resources/index.mjs.map +1 -1
  79. package/resources/loyalty/account-streaks.d.ts +81 -0
  80. package/resources/loyalty/account-streaks.d.ts.map +1 -0
  81. package/resources/loyalty/account-streaks.js +24 -0
  82. package/resources/loyalty/account-streaks.js.map +1 -0
  83. package/resources/loyalty/account-streaks.mjs +20 -0
  84. package/resources/loyalty/account-streaks.mjs.map +1 -0
  85. package/resources/loyalty/accounts.d.ts +60 -16
  86. package/resources/loyalty/accounts.d.ts.map +1 -1
  87. package/resources/loyalty/accounts.js +14 -0
  88. package/resources/loyalty/accounts.js.map +1 -1
  89. package/resources/loyalty/accounts.mjs +14 -0
  90. package/resources/loyalty/accounts.mjs.map +1 -1
  91. package/resources/loyalty/badges.d.ts +504 -22
  92. package/resources/loyalty/badges.d.ts.map +1 -1
  93. package/resources/loyalty/badges.js +19 -1
  94. package/resources/loyalty/badges.js.map +1 -1
  95. package/resources/loyalty/badges.mjs +19 -1
  96. package/resources/loyalty/badges.mjs.map +1 -1
  97. package/resources/loyalty/currencies.d.ts +19 -0
  98. package/resources/loyalty/currencies.d.ts.map +1 -1
  99. package/resources/loyalty/currencies.js +19 -0
  100. package/resources/loyalty/currencies.js.map +1 -1
  101. package/resources/loyalty/currencies.mjs +19 -0
  102. package/resources/loyalty/currencies.mjs.map +1 -1
  103. package/resources/loyalty/index.d.ts +4 -4
  104. package/resources/loyalty/index.d.ts.map +1 -1
  105. package/resources/loyalty/index.js +5 -5
  106. package/resources/loyalty/index.js.map +1 -1
  107. package/resources/loyalty/index.mjs +3 -3
  108. package/resources/loyalty/index.mjs.map +1 -1
  109. package/resources/loyalty/loyalty.d.ts +11 -11
  110. package/resources/loyalty/loyalty.d.ts.map +1 -1
  111. package/resources/loyalty/loyalty.js +6 -6
  112. package/resources/loyalty/loyalty.js.map +1 -1
  113. package/resources/loyalty/loyalty.mjs +7 -7
  114. package/resources/loyalty/loyalty.mjs.map +1 -1
  115. package/resources/loyalty/multipliers.d.ts +39 -2
  116. package/resources/loyalty/multipliers.d.ts.map +1 -1
  117. package/resources/loyalty/multipliers.js +23 -0
  118. package/resources/loyalty/multipliers.js.map +1 -1
  119. package/resources/loyalty/multipliers.mjs +23 -0
  120. package/resources/loyalty/multipliers.mjs.map +1 -1
  121. package/resources/loyalty/questions-responses.d.ts +39 -0
  122. package/resources/loyalty/questions-responses.d.ts.map +1 -1
  123. package/resources/loyalty/questions-responses.js +9 -0
  124. package/resources/loyalty/questions-responses.js.map +1 -1
  125. package/resources/loyalty/questions-responses.mjs +9 -0
  126. package/resources/loyalty/questions-responses.mjs.map +1 -1
  127. package/resources/loyalty/questions.d.ts +37 -2
  128. package/resources/loyalty/questions.d.ts.map +1 -1
  129. package/resources/loyalty/questions.js +31 -0
  130. package/resources/loyalty/questions.js.map +1 -1
  131. package/resources/loyalty/questions.mjs +31 -0
  132. package/resources/loyalty/questions.mjs.map +1 -1
  133. package/resources/loyalty/rule-edits.d.ts +2630 -8
  134. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  135. package/resources/loyalty/rule-edits.js +14 -0
  136. package/resources/loyalty/rule-edits.js.map +1 -1
  137. package/resources/loyalty/rule-edits.mjs +14 -0
  138. package/resources/loyalty/rule-edits.mjs.map +1 -1
  139. package/resources/loyalty/rule-groups.d.ts +279 -64
  140. package/resources/loyalty/rule-groups.d.ts.map +1 -1
  141. package/resources/loyalty/rule-groups.js +38 -2
  142. package/resources/loyalty/rule-groups.js.map +1 -1
  143. package/resources/loyalty/rule-groups.mjs +38 -2
  144. package/resources/loyalty/rule-groups.mjs.map +1 -1
  145. package/resources/loyalty/rules.d.ts +1902 -269
  146. package/resources/loyalty/rules.d.ts.map +1 -1
  147. package/resources/loyalty/rules.js +40 -9
  148. package/resources/loyalty/rules.js.map +1 -1
  149. package/resources/loyalty/rules.mjs +40 -9
  150. package/resources/loyalty/rules.mjs.map +1 -1
  151. package/resources/loyalty/transactions/index.d.ts +3 -0
  152. package/resources/loyalty/transactions/index.d.ts.map +1 -0
  153. package/resources/loyalty/transactions/index.js +9 -0
  154. package/resources/loyalty/transactions/index.js.map +1 -0
  155. package/resources/loyalty/transactions/index.mjs +4 -0
  156. package/resources/loyalty/transactions/index.mjs.map +1 -0
  157. package/resources/loyalty/transactions/rule-statuses.d.ts +120 -0
  158. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  159. package/resources/loyalty/transactions/rule-statuses.js +30 -0
  160. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  161. package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
  162. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  163. package/resources/loyalty/transactions/transactions.d.ts +410 -0
  164. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  165. package/resources/loyalty/transactions/transactions.js +76 -0
  166. package/resources/loyalty/transactions/transactions.js.map +1 -0
  167. package/resources/loyalty/transactions/transactions.mjs +49 -0
  168. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  169. package/resources/loyalty/transactions.d.ts +1 -247
  170. package/resources/loyalty/transactions.d.ts.map +1 -1
  171. package/resources/loyalty/transactions.js +15 -18
  172. package/resources/loyalty/transactions.js.map +1 -1
  173. package/resources/loyalty/transactions.mjs +1 -16
  174. package/resources/loyalty/transactions.mjs.map +1 -1
  175. package/resources/minting.d.ts +5 -5
  176. package/resources/minting.d.ts.map +1 -1
  177. package/resources/referral/referral.d.ts +11 -3
  178. package/resources/referral/referral.d.ts.map +1 -1
  179. package/resources/referral/referral.js +11 -5
  180. package/resources/referral/referral.js.map +1 -1
  181. package/resources/referral/referral.mjs +11 -5
  182. package/resources/referral/referral.mjs.map +1 -1
  183. package/resources/referral/users.d.ts +28 -1
  184. package/resources/referral/users.d.ts.map +1 -1
  185. package/resources/referral/users.js +14 -0
  186. package/resources/referral/users.js.map +1 -1
  187. package/resources/referral/users.mjs +14 -0
  188. package/resources/referral/users.mjs.map +1 -1
  189. package/resources/users/index.d.ts +1 -1
  190. package/resources/users/index.d.ts.map +1 -1
  191. package/resources/users/index.js.map +1 -1
  192. package/resources/users/index.mjs.map +1 -1
  193. package/resources/users/metadatas.d.ts +34 -3
  194. package/resources/users/metadatas.d.ts.map +1 -1
  195. package/resources/users/metadatas.js.map +1 -1
  196. package/resources/users/metadatas.mjs.map +1 -1
  197. package/resources/users/users.d.ts +159 -35
  198. package/resources/users/users.d.ts.map +1 -1
  199. package/resources/users/users.js +53 -1
  200. package/resources/users/users.js.map +1 -1
  201. package/resources/users/users.mjs +53 -1
  202. package/resources/users/users.mjs.map +1 -1
  203. package/resources/websites/website-collections.d.ts +22 -1
  204. package/resources/websites/website-collections.d.ts.map +1 -1
  205. package/resources/websites/website-collections.js +21 -0
  206. package/resources/websites/website-collections.js.map +1 -1
  207. package/resources/websites/website-collections.mjs +21 -0
  208. package/resources/websites/website-collections.mjs.map +1 -1
  209. package/resources/websites/website-user-roles.d.ts +23 -0
  210. package/resources/websites/website-user-roles.d.ts.map +1 -1
  211. package/resources/websites/website-user-roles.js +23 -0
  212. package/resources/websites/website-user-roles.js.map +1 -1
  213. package/resources/websites/website-user-roles.mjs +23 -0
  214. package/resources/websites/website-user-roles.mjs.map +1 -1
  215. package/resources/websites/websites.d.ts +12 -0
  216. package/resources/websites/websites.d.ts.map +1 -1
  217. package/resources/websites/websites.js +7 -0
  218. package/resources/websites/websites.js.map +1 -1
  219. package/resources/websites/websites.mjs +7 -0
  220. package/resources/websites/websites.mjs.map +1 -1
  221. package/src/core.ts +39 -16
  222. package/src/index.ts +29 -2
  223. package/src/resource.ts +1 -1
  224. package/src/resources/assets.ts +18 -3
  225. package/src/resources/auctions/auctions.ts +436 -0
  226. package/src/resources/auctions/index.ts +18 -0
  227. package/src/resources/auctions/website-user-attributes/index.ts +18 -0
  228. package/src/resources/auctions/website-user-attributes/values.ts +165 -0
  229. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +207 -0
  230. package/src/resources/auctions/website-user-attributes.ts +3 -0
  231. package/src/resources/auctions.ts +1 -207
  232. package/src/resources/auth.ts +21 -5
  233. package/src/resources/index.ts +11 -1
  234. package/src/resources/loyalty/account-streaks.ts +110 -0
  235. package/src/resources/loyalty/accounts.ts +65 -18
  236. package/src/resources/loyalty/badges.ts +607 -24
  237. package/src/resources/loyalty/currencies.ts +19 -0
  238. package/src/resources/loyalty/index.ts +19 -3
  239. package/src/resources/loyalty/loyalty.ts +39 -15
  240. package/src/resources/loyalty/multipliers.ts +43 -4
  241. package/src/resources/loyalty/questions-responses.ts +45 -0
  242. package/src/resources/loyalty/questions.ts +38 -2
  243. package/src/resources/loyalty/rule-edits.ts +3802 -100
  244. package/src/resources/loyalty/rule-groups.ts +483 -76
  245. package/src/resources/loyalty/rules.ts +2925 -310
  246. package/src/resources/loyalty/transactions/index.ts +18 -0
  247. package/src/resources/loyalty/transactions/rule-statuses.ts +178 -0
  248. package/src/resources/loyalty/transactions/transactions.ts +681 -0
  249. package/src/resources/loyalty/transactions.ts +1 -330
  250. package/src/resources/minting.ts +22 -5
  251. package/src/resources/referral/referral.ts +13 -11
  252. package/src/resources/referral/users.ts +33 -2
  253. package/src/resources/users/index.ts +4 -0
  254. package/src/resources/users/metadatas.ts +57 -3
  255. package/src/resources/users/users.ts +209 -38
  256. package/src/resources/websites/website-collections.ts +39 -1
  257. package/src/resources/websites/website-user-roles.ts +23 -0
  258. package/src/resources/websites/websites.ts +12 -0
  259. package/src/version.ts +1 -1
  260. package/version.d.ts +1 -1
  261. package/version.d.ts.map +1 -1
  262. package/version.js +1 -1
  263. package/version.js.map +1 -1
  264. package/version.mjs +1 -1
  265. package/version.mjs.map +1 -1
  266. package/resources/loyalty/rule-chains.d.ts +0 -34
  267. package/resources/loyalty/rule-chains.d.ts.map +0 -1
  268. package/resources/loyalty/rule-chains.js +0 -15
  269. package/resources/loyalty/rule-chains.js.map +0 -1
  270. package/resources/loyalty/rule-chains.mjs +0 -11
  271. package/resources/loyalty/rule-chains.mjs.map +0 -1
  272. package/src/resources/loyalty/rule-chains.ts +0 -45
@@ -5,29 +5,128 @@ import { isRequestOptions } from '../../core';
5
5
  import * as Core from '../../core';
6
6
 
7
7
  export class RuleGroups extends APIResource {
8
+ /**
9
+ * Create a new loyalty rule groups
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const response =
14
+ * await client.loyalty.ruleGroups.createRuleGroup({
15
+ * name: 'name',
16
+ * organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
17
+ * websiteId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
18
+ * });
19
+ * ```
20
+ */
21
+ createRuleGroup(
22
+ body: RuleGroupCreateRuleGroupParams,
23
+ options?: Core.RequestOptions,
24
+ ): Core.APIPromise<RuleGroupCreateRuleGroupResponse> {
25
+ return this._client.post('/api/loyalty/rule_groups/create', { body, ...options });
26
+ }
27
+
28
+ /**
29
+ * Delete loyalty rule group by ID
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const response =
34
+ * await client.loyalty.ruleGroups.deleteRuleGroup(
35
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
36
+ * );
37
+ * ```
38
+ */
39
+ deleteRuleGroup(id: string, options?: Core.RequestOptions): Core.APIPromise<unknown> {
40
+ return this._client.delete(`/api/loyalty/rule_groups/${id}`, options);
41
+ }
42
+
8
43
  /**
9
44
  * Retrieve configured loyalty rule groups
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const response =
49
+ * await client.loyalty.ruleGroups.getRuleGroups();
50
+ * ```
10
51
  */
11
- get(query?: RuleGroupGetParams, options?: Core.RequestOptions): Core.APIPromise<RuleGroupGetResponse>;
12
- get(options?: Core.RequestOptions): Core.APIPromise<RuleGroupGetResponse>;
13
- get(
14
- query: RuleGroupGetParams | Core.RequestOptions = {},
52
+ getRuleGroups(
53
+ query?: RuleGroupGetRuleGroupsParams,
54
+ options?: Core.RequestOptions,
55
+ ): Core.APIPromise<RuleGroupGetRuleGroupsResponse>;
56
+ getRuleGroups(options?: Core.RequestOptions): Core.APIPromise<RuleGroupGetRuleGroupsResponse>;
57
+ getRuleGroups(
58
+ query: RuleGroupGetRuleGroupsParams | Core.RequestOptions = {},
15
59
  options?: Core.RequestOptions,
16
- ): Core.APIPromise<RuleGroupGetResponse> {
60
+ ): Core.APIPromise<RuleGroupGetRuleGroupsResponse> {
17
61
  if (isRequestOptions(query)) {
18
- return this.get({}, query);
62
+ return this.getRuleGroups({}, query);
19
63
  }
20
64
  return this._client.get('/api/loyalty/rule_groups', { query, ...options });
21
65
  }
66
+
67
+ /**
68
+ * Update loyalty rule group by ID
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * const response =
73
+ * await client.loyalty.ruleGroups.updateRuleGroup(
74
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
75
+ * );
76
+ * ```
77
+ */
78
+ updateRuleGroup(
79
+ id: string,
80
+ body?: RuleGroupUpdateRuleGroupParams,
81
+ options?: Core.RequestOptions,
82
+ ): Core.APIPromise<RuleGroupUpdateRuleGroupResponse>;
83
+ updateRuleGroup(
84
+ id: string,
85
+ options?: Core.RequestOptions,
86
+ ): Core.APIPromise<RuleGroupUpdateRuleGroupResponse>;
87
+ updateRuleGroup(
88
+ id: string,
89
+ body: RuleGroupUpdateRuleGroupParams | Core.RequestOptions = {},
90
+ options?: Core.RequestOptions,
91
+ ): Core.APIPromise<RuleGroupUpdateRuleGroupResponse> {
92
+ if (isRequestOptions(body)) {
93
+ return this.updateRuleGroup(id, {}, body);
94
+ }
95
+ return this._client.post(`/api/loyalty/rule_groups/${id}`, { body, ...options });
96
+ }
22
97
  }
23
98
 
24
- export interface RuleGroupGetResponse {
25
- data: Array<RuleGroupGetResponse.Data>;
99
+ export interface RuleGroupCreateRuleGroupResponse {
100
+ id: string;
101
+
102
+ createdAt: string;
103
+
104
+ isCollapsible: boolean;
105
+
106
+ isRequired: boolean;
107
+
108
+ name: string;
109
+
110
+ organizationId: string;
111
+
112
+ sortId: number;
113
+
114
+ subTitle: string | null;
115
+
116
+ updatedAt: string;
117
+
118
+ websiteId: string;
119
+ }
120
+
121
+ export type RuleGroupDeleteRuleGroupResponse = unknown;
122
+
123
+ export interface RuleGroupGetRuleGroupsResponse {
124
+ data: Array<RuleGroupGetRuleGroupsResponse.Data>;
26
125
 
27
126
  hasNextPage: boolean;
28
127
  }
29
128
 
30
- export namespace RuleGroupGetResponse {
129
+ export namespace RuleGroupGetRuleGroupsResponse {
31
130
  /**
32
131
  * Schema for a get loyalty rule groups response
33
132
  */
@@ -74,6 +173,8 @@ export namespace RuleGroupGetResponse {
74
173
 
75
174
  isRequired: boolean;
76
175
 
176
+ loyaltyBadge: LoyaltyRule.LoyaltyBadge;
177
+
77
178
  loyaltyCurrencyId: string;
78
179
 
79
180
  mediaUrl: string | null;
@@ -82,7 +183,7 @@ export namespace RuleGroupGetResponse {
82
183
 
83
184
  name: string;
84
185
 
85
- rewardType: 'points' | 'multiplier';
186
+ rewardType: 'points' | 'multiplier' | 'badge';
86
187
 
87
188
  startTime: string | null;
88
189
 
@@ -139,11 +240,40 @@ export namespace RuleGroupGetResponse {
139
240
  | 'twitter_like'
140
241
  | 'twitter_post_hashtag'
141
242
  | 'quiz'
142
- | 'poll';
243
+ | 'poll'
244
+ | 'steam_wishlist'
245
+ | 'liquidity_uniswap_v2'
246
+ | 'liquidity_uniswap_v3'
247
+ | 'points_airdrop'
248
+ | 'youtube_subscribers'
249
+ | 'youtube_comment'
250
+ | 'shopify_spend'
251
+ | 'swap'
252
+ | 'tiktok_post'
253
+ | 'post_impressions'
254
+ | 'discord_join'
255
+ | 'connected_youtube'
256
+ | 'stratus_function'
257
+ | 'connected_tiktok';
143
258
  }
144
259
 
145
260
  export namespace LoyaltyRule {
261
+ export interface LoyaltyBadge {
262
+ id: string;
263
+
264
+ description: string | null;
265
+
266
+ imageUrl: string | null;
267
+
268
+ name: string;
269
+ }
270
+
146
271
  export interface Metadata {
272
+ /**
273
+ * Number of tokens per batch.
274
+ */
275
+ batchSize?: number | null;
276
+
147
277
  /**
148
278
  * Text displayed on the action button.
149
279
  */
@@ -167,7 +297,7 @@ export namespace RuleGroupGetResponse {
167
297
  /**
168
298
  * Text to check in the Twitter post, username, or bio.
169
299
  */
170
- checkText?: string | null;
300
+ checkText?: string | Array<string> | null;
171
301
 
172
302
  /**
173
303
  * Array of collections associated with the rule.
@@ -177,7 +307,12 @@ export namespace RuleGroupGetResponse {
177
307
  /**
178
308
  * Conditions for completing the profile.
179
309
  */
180
- completeProfileConditions?: Record<string, boolean> | null;
310
+ completeProfileConditions?: { [key: string]: boolean } | null;
311
+
312
+ /**
313
+ * Description of the external rule condition (only for external rules)
314
+ */
315
+ conditionDescription?: string;
181
316
 
182
317
  /**
183
318
  * Object containing details for the call-to-action.
@@ -189,6 +324,11 @@ export namespace RuleGroupGetResponse {
189
324
  */
190
325
  customRewardsApiKey?: string;
191
326
 
327
+ /**
328
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
329
+ */
330
+ directRpc?: boolean;
331
+
192
332
  /**
193
333
  * Array of Discord servers, channels, and roles to join.
194
334
  */
@@ -214,6 +354,11 @@ export namespace RuleGroupGetResponse {
214
354
  */
215
355
  enableVerifiedMultiplier?: boolean;
216
356
 
357
+ /**
358
+ * Type of ERC20 token for the loyalty rule.
359
+ */
360
+ erc20Type?: 'erc20' | 'native';
361
+
217
362
  /**
218
363
  * Fill source of the order for the token sale
219
364
  */
@@ -234,11 +379,6 @@ export namespace RuleGroupGetResponse {
234
379
  */
235
380
  hasNeverSold?: boolean;
236
381
 
237
- /**
238
- * Flag indicating whether the order source is included.
239
- */
240
- hasOrderSource?: boolean;
241
-
242
382
  /**
243
383
  * Indicates if the full royalty has been paid for items.
244
384
  */
@@ -259,11 +399,21 @@ export namespace RuleGroupGetResponse {
259
399
  */
260
400
  imageUrl?: string | null;
261
401
 
402
+ /**
403
+ * If enabled, the first transaction done on the platform will complete this rule
404
+ */
405
+ isCheckInOnEveryTxn?: boolean;
406
+
262
407
  /**
263
408
  * Indicates if the multiplier has been applied to rewards.
264
409
  */
265
410
  isMultiplierApplied?: boolean;
266
411
 
412
+ /**
413
+ * Flag indicating if the rule is restricted to new users.
414
+ */
415
+ isRestrictedToNewUsers?: boolean;
416
+
267
417
  /**
268
418
  * Flag indicating if rewards are applied retroactively.
269
419
  */
@@ -279,6 +429,11 @@ export namespace RuleGroupGetResponse {
279
429
  */
280
430
  link?: string | null;
281
431
 
432
+ /**
433
+ * Liquidity pool details.
434
+ */
435
+ liquidity?: Metadata.Liquidity;
436
+
282
437
  /**
283
438
  * Maximum quantity constraint for token holding.
284
439
  */
@@ -320,14 +475,24 @@ export namespace RuleGroupGetResponse {
320
475
  onlyRewardSingleTokenOwnership?: boolean | null;
321
476
 
322
477
  /**
323
- * Order source of the order for the token sale
478
+ * Promotional code associated with the rule.
324
479
  */
325
- orderSource?: string;
480
+ promoCode?: string;
326
481
 
327
482
  /**
328
- * Promotional code associated with the rule.
483
+ * URL of the CSV file containing promo codes.
329
484
  */
330
- promoCode?: string;
485
+ promoCodeCsvUrl?: string;
486
+
487
+ /**
488
+ * Numbers of the promotional code to be generated.
489
+ */
490
+ promoCodeLength?: number | null;
491
+
492
+ /**
493
+ * Type of the promotional code.
494
+ */
495
+ promoCodeType?: 'code' | 'csv' | 'generate';
331
496
 
332
497
  /**
333
498
  * Array defining ranges and corresponding rewards.
@@ -344,11 +509,62 @@ export namespace RuleGroupGetResponse {
344
509
  */
345
510
  referrerReward?: number | null;
346
511
 
512
+ /**
513
+ * Loyalty currency ID of the referrer reward.
514
+ */
515
+ referrerRewardLoyaltyCurrencyId?: string | null;
516
+
517
+ /**
518
+ * Flag indicating if the post link is required.
519
+ */
520
+ requirePostLink?: boolean | null;
521
+
522
+ /**
523
+ * Flag indicating if media metadata is required.
524
+ */
525
+ requirePostMediaLink?: boolean | null;
526
+
527
+ /**
528
+ * Flag indicating if the rule can also reward badges per range.
529
+ */
530
+ rewardBadgePerRange?: boolean;
531
+
532
+ /**
533
+ * Flag indicating if the reward is rewarded by batch.
534
+ */
535
+ rewardByBatch?: boolean | null;
536
+
537
+ /**
538
+ * Criteria to evaluate the reward.
539
+ */
540
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
541
+
542
+ /**
543
+ * Flag indicating if the reward is rewarded per action.
544
+ */
545
+ rewardPerAction?: boolean | null;
546
+
347
547
  /**
348
548
  * Flag indicating if rewards are given per impression.
349
549
  */
350
550
  rewardPerImpression?: boolean | null;
351
551
 
552
+ /**
553
+ * Flag indicating if the rule should reward based on value of traded tokens
554
+ * instead of count.
555
+ */
556
+ rewardPerValue?: boolean;
557
+
558
+ /**
559
+ * Wallet address of the user can only be used if userId is not provided
560
+ */
561
+ royaltyAddress?: string;
562
+
563
+ /**
564
+ * Royalty percentage of the item.
565
+ */
566
+ royaltyPercentage?: number;
567
+
352
568
  /**
353
569
  * Currency associated with sales.
354
570
  */
@@ -388,6 +604,7 @@ export namespace RuleGroupGetResponse {
388
604
  | 'Twitch'
389
605
  | 'X(Twitter)'
390
606
  | 'YouTube'
607
+ | 'Google'
391
608
  | null;
392
609
 
393
610
  /**
@@ -400,11 +617,21 @@ export namespace RuleGroupGetResponse {
400
617
  */
401
618
  socialPlatformName?: string | null;
402
619
 
620
+ /**
621
+ * ID of the Steam app.
622
+ */
623
+ steamAppId?: string | null;
624
+
403
625
  /**
404
626
  * Array of streak milestones and corresponding rewards.
405
627
  */
406
628
  streakArray?: Array<Metadata.StreakArray> | null;
407
629
 
630
+ /**
631
+ * Metadata for swap loyalty rules
632
+ */
633
+ swap?: Metadata.Swap;
634
+
408
635
  /**
409
636
  * ID of the Telegram channel.
410
637
  */
@@ -420,6 +647,12 @@ export namespace RuleGroupGetResponse {
420
647
  */
421
648
  trackAllContracts?: boolean | null;
422
649
 
650
+ /**
651
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
652
+ * completed once the progress is 100%.
653
+ */
654
+ trackProgress?: boolean | null;
655
+
423
656
  /**
424
657
  * URL of the associated Twitter account.
425
658
  */
@@ -463,7 +696,27 @@ export namespace RuleGroupGetResponse {
463
696
  /**
464
697
  * Type of wallet associated with the rule.
465
698
  */
466
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
699
+ walletType?:
700
+ | 'evm'
701
+ | 'solana'
702
+ | 'imx'
703
+ | 'sui'
704
+ | 'ton'
705
+ | 'cosmos'
706
+ | 'ultra'
707
+ | 'agw'
708
+ | 'flow_cadence'
709
+ | null;
710
+
711
+ /**
712
+ * ID of the Youtube channel.
713
+ */
714
+ youtubeChannelId?: string | null;
715
+
716
+ /**
717
+ * ID of the Youtube video.
718
+ */
719
+ youtubeVideoId?: string | null;
467
720
  }
468
721
 
469
722
  export namespace Metadata {
@@ -482,13 +735,17 @@ export namespace RuleGroupGetResponse {
482
735
  * Blockchain network of the collection.
483
736
  */
484
737
  network?:
738
+ | 'abstract'
739
+ | 'abstractTestnet'
485
740
  | 'apechain'
486
741
  | 'arbitrum'
487
742
  | 'avalanche'
488
743
  | 'avalancheFuji'
489
744
  | 'base'
490
745
  | 'baseSepolia'
746
+ | 'berachain'
491
747
  | 'berachainArtio'
748
+ | 'berachainBepolia'
492
749
  | 'binance'
493
750
  | 'bscTestnet'
494
751
  | 'campTestnet'
@@ -496,18 +753,30 @@ export namespace RuleGroupGetResponse {
496
753
  | 'fantomTestnet'
497
754
  | 'flowMainnet'
498
755
  | 'mainnet'
756
+ | 'nexusTestnet'
499
757
  | 'optimism'
500
758
  | 'polygon'
501
759
  | 'polygon_mumbai'
502
760
  | 'skaleNebula'
761
+ | 'skaleEuropa'
762
+ | 'skaleCalypso'
503
763
  | 'solana'
504
764
  | 'sophon'
765
+ | 'sophonTestnet'
505
766
  | 'sui'
506
767
  | 'superseed'
507
768
  | 'superseedSepolia'
508
769
  | 'vanar'
509
770
  | 'xai'
510
771
  | 'zksync'
772
+ | 'coti'
773
+ | 'cotiTestnet'
774
+ | 'morph'
775
+ | 'morphTestnet'
776
+ | 'morphHolesky'
777
+ | 'ultra'
778
+ | 'ultraTestnet'
779
+ | 'nitrograph'
511
780
  | 'sepolia'
512
781
  | 'optimism_sepolia'
513
782
  | 'arbitrumSepolia'
@@ -515,7 +784,8 @@ export namespace RuleGroupGetResponse {
515
784
  | 'optimism_goerli'
516
785
  | 'arbitrumGoerli'
517
786
  | 'basecamp'
518
- | 'abstract';
787
+ | 'somnia'
788
+ | 'flow_cadence';
519
789
  }
520
790
 
521
791
  /**
@@ -592,6 +862,108 @@ export namespace RuleGroupGetResponse {
592
862
  id: string;
593
863
  }
594
864
 
865
+ /**
866
+ * Liquidity pool details.
867
+ */
868
+ export interface Liquidity {
869
+ /**
870
+ * Calculation type of the liquidity pool.
871
+ */
872
+ calculationType?: 'fixed' | 'custom';
873
+
874
+ /**
875
+ * Custom function to calculate the the reward amount based on the liquidity
876
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
877
+ * USD.
878
+ */
879
+ customFunction?: string;
880
+
881
+ /**
882
+ * Liquidity provided per day in USD
883
+ */
884
+ liquidityPerDay?: number;
885
+
886
+ /**
887
+ * Blockchain network of the liquidity pool.
888
+ */
889
+ network?:
890
+ | 'abstract'
891
+ | 'abstractTestnet'
892
+ | 'apechain'
893
+ | 'arbitrum'
894
+ | 'avalanche'
895
+ | 'avalancheFuji'
896
+ | 'base'
897
+ | 'baseSepolia'
898
+ | 'berachain'
899
+ | 'berachainArtio'
900
+ | 'berachainBepolia'
901
+ | 'binance'
902
+ | 'bscTestnet'
903
+ | 'campTestnet'
904
+ | 'fantom'
905
+ | 'fantomTestnet'
906
+ | 'flowMainnet'
907
+ | 'mainnet'
908
+ | 'nexusTestnet'
909
+ | 'optimism'
910
+ | 'polygon'
911
+ | 'polygon_mumbai'
912
+ | 'skaleNebula'
913
+ | 'skaleEuropa'
914
+ | 'skaleCalypso'
915
+ | 'solana'
916
+ | 'sophon'
917
+ | 'sophonTestnet'
918
+ | 'sui'
919
+ | 'superseed'
920
+ | 'superseedSepolia'
921
+ | 'vanar'
922
+ | 'xai'
923
+ | 'zksync'
924
+ | 'coti'
925
+ | 'cotiTestnet'
926
+ | 'morph'
927
+ | 'morphTestnet'
928
+ | 'morphHolesky'
929
+ | 'ultra'
930
+ | 'ultraTestnet'
931
+ | 'nitrograph'
932
+ | 'sepolia'
933
+ | 'optimism_sepolia'
934
+ | 'arbitrumSepolia'
935
+ | 'goerli'
936
+ | 'optimism_goerli'
937
+ | 'arbitrumGoerli'
938
+ | 'basecamp'
939
+ | 'somnia'
940
+ | 'flow_cadence';
941
+
942
+ /**
943
+ * Indicates if only in-range liquidity is rewarded.
944
+ */
945
+ onlyRewardInRangeLiquidity?: boolean;
946
+
947
+ /**
948
+ * Array of liquidity pools associated with the rule.
949
+ */
950
+ pools?: Array<Liquidity.Pool>;
951
+
952
+ /**
953
+ * Protocol of the liquidity pool.
954
+ */
955
+ protocol?: string;
956
+ }
957
+
958
+ export namespace Liquidity {
959
+ export interface Pool {
960
+ /**
961
+ * Unique identifier of the liquidity pool.
962
+ */
963
+ id: string;
964
+ }
965
+ }
966
+
595
967
  export interface Range {
596
968
  /**
597
969
  * Reward amount for this range.
@@ -607,6 +979,16 @@ export namespace RuleGroupGetResponse {
607
979
  * Start value of the range.
608
980
  */
609
981
  startRange: number;
982
+
983
+ /**
984
+ * ID of the loyalty badge for this range.
985
+ */
986
+ loyaltyBadgeId?: string;
987
+
988
+ /**
989
+ * Amount of the loyalty multiplier for this range.
990
+ */
991
+ loyaltyMultiplierAmount?: number;
610
992
  }
611
993
 
612
994
  /**
@@ -659,20 +1041,15 @@ export namespace RuleGroupGetResponse {
659
1041
  * Object containing details of the associated smart contract.
660
1042
  */
661
1043
  export interface SmartContract {
662
- /**
663
- * ABI of the smart contract.
664
- */
665
- abi?: string | null;
666
-
667
1044
  /**
668
1045
  * Mapping of addresses for the smart contract.
669
1046
  */
670
1047
  addressMapping?: string | null;
671
1048
 
672
1049
  /**
673
- * Array of bonus details applied to the rule.
1050
+ * Object containing details of the amount multiplier from the event.
674
1051
  */
675
- bonus?: Array<SmartContract.Bonus> | null;
1052
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
676
1053
 
677
1054
  /**
678
1055
  * ID of the smart contract.
@@ -684,68 +1061,31 @@ export namespace RuleGroupGetResponse {
684
1061
  */
685
1062
  criteria?: 'everyEvent' | 'byParameter' | null;
686
1063
 
687
- /**
688
- * Time range applied to the rule.
689
- */
690
- customRange?: SmartContract.CustomRange | null;
691
-
692
1064
  /**
693
1065
  * Event emitted by the smart contract.
694
1066
  */
695
1067
  event?: string | null;
696
1068
 
697
- /**
698
- * Maximum value allowed for the parameter.
699
- */
700
- max?: number | null;
701
-
702
1069
  /**
703
1070
  * Array of parameters for the smart contract.
704
1071
  */
705
1072
  params?: Array<SmartContract.Param> | null;
706
1073
 
707
1074
  /**
708
- * Flag indicating if a bonus is applied.
709
- */
710
- withBonus?: boolean | null;
711
-
712
- /**
713
- * Flag indicating if a custom range is applied.
714
- */
715
- withCustomRange?: boolean | null;
716
-
717
- /**
718
- * Flag indicating if a maximum limit is applied.
1075
+ * Type of the smart contract interaction.
719
1076
  */
720
- withMax?: boolean | null;
1077
+ type?: 'function' | 'event' | null;
721
1078
  }
722
1079
 
723
1080
  export namespace SmartContract {
724
- export interface Bonus {
725
- /**
726
- * Amount of the bonus.
727
- */
728
- amount?: number | null;
729
-
730
- /**
731
- * Number of times the bonus is applied.
732
- */
733
- count?: number | null;
734
- }
735
-
736
1081
  /**
737
- * Time range applied to the rule.
1082
+ * Object containing details of the amount multiplier from the event.
738
1083
  */
739
- export interface CustomRange {
740
- /**
741
- * End time of the custom range.
742
- */
743
- endsAt?: string | null;
744
-
1084
+ export interface AmountMultiplier {
745
1085
  /**
746
- * Start time of the custom range.
1086
+ * Mapping of the value for the smart contract.
747
1087
  */
748
- startsAt?: string | null;
1088
+ valueMapping?: string | null;
749
1089
  }
750
1090
 
751
1091
  export interface Param {
@@ -789,13 +1129,64 @@ export namespace RuleGroupGetResponse {
789
1129
  */
790
1130
  streakMilestone: number;
791
1131
  }
1132
+
1133
+ /**
1134
+ * Metadata for swap loyalty rules
1135
+ */
1136
+ export interface Swap {
1137
+ provider?: 'any' | 'relay' | 'lifi';
1138
+
1139
+ relayReferrerId?: string;
1140
+
1141
+ requireCrossChainSwap?: boolean;
1142
+
1143
+ swappedToChain?: 'any' | number | string;
1144
+
1145
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1146
+
1147
+ tokenMode?: 'any' | 'specific';
1148
+
1149
+ trackTokenAmount?: boolean;
1150
+ }
1151
+
1152
+ export namespace Swap {
1153
+ export interface SwappedToToken {
1154
+ address: string;
1155
+
1156
+ chainId: string;
1157
+ }
1158
+ }
792
1159
  }
793
1160
  }
794
1161
  }
795
1162
  }
796
1163
  }
797
1164
 
798
- export interface RuleGroupGetParams {
1165
+ export interface RuleGroupUpdateRuleGroupResponse {
1166
+ isCollapsible?: boolean;
1167
+
1168
+ name?: string;
1169
+
1170
+ subTitle?: string;
1171
+ }
1172
+
1173
+ export interface RuleGroupCreateRuleGroupParams {
1174
+ name: string;
1175
+
1176
+ organizationId: string;
1177
+
1178
+ websiteId: string;
1179
+
1180
+ isCollapsible?: boolean;
1181
+
1182
+ isRequired?: boolean;
1183
+
1184
+ sortId?: number;
1185
+
1186
+ subTitle?: string;
1187
+ }
1188
+
1189
+ export interface RuleGroupGetRuleGroupsParams {
799
1190
  excludeHidden?: string;
800
1191
 
801
1192
  limit?: number;
@@ -807,6 +1198,22 @@ export interface RuleGroupGetParams {
807
1198
  websiteId?: string;
808
1199
  }
809
1200
 
1201
+ export interface RuleGroupUpdateRuleGroupParams {
1202
+ isCollapsible?: boolean;
1203
+
1204
+ name?: string | null;
1205
+
1206
+ subtitle?: string | null;
1207
+ }
1208
+
810
1209
  export declare namespace RuleGroups {
811
- export { type RuleGroupGetResponse as RuleGroupGetResponse, type RuleGroupGetParams as RuleGroupGetParams };
1210
+ export {
1211
+ type RuleGroupCreateRuleGroupResponse as RuleGroupCreateRuleGroupResponse,
1212
+ type RuleGroupDeleteRuleGroupResponse as RuleGroupDeleteRuleGroupResponse,
1213
+ type RuleGroupGetRuleGroupsResponse as RuleGroupGetRuleGroupsResponse,
1214
+ type RuleGroupUpdateRuleGroupResponse as RuleGroupUpdateRuleGroupResponse,
1215
+ type RuleGroupCreateRuleGroupParams as RuleGroupCreateRuleGroupParams,
1216
+ type RuleGroupGetRuleGroupsParams as RuleGroupGetRuleGroupsParams,
1217
+ type RuleGroupUpdateRuleGroupParams as RuleGroupUpdateRuleGroupParams,
1218
+ };
812
1219
  }