@snagsolutions/sdk 0.1.0-alpha.21 → 0.1.0-alpha.211

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 (273) hide show
  1. package/CHANGELOG.md +1711 -0
  2. package/LICENSE +1 -1
  3. package/README.md +15 -23
  4. package/core.d.ts +19 -5
  5. package/core.d.ts.map +1 -1
  6. package/core.js +24 -17
  7. package/core.js.map +1 -1
  8. package/core.mjs +24 -17
  9. package/core.mjs.map +1 -1
  10. package/index.d.mts +7 -4
  11. package/index.d.ts +7 -4
  12. package/index.d.ts.map +1 -1
  13. package/index.js +8 -4
  14. package/index.js.map +1 -1
  15. package/index.mjs +8 -4
  16. package/index.mjs.map +1 -1
  17. package/package.json +4 -5
  18. package/resource.d.ts +1 -1
  19. package/resource.d.ts.map +1 -1
  20. package/resource.js.map +1 -1
  21. package/resource.mjs.map +1 -1
  22. package/resources/assets.d.ts +16 -2
  23. package/resources/assets.d.ts.map +1 -1
  24. package/resources/assets.js +8 -0
  25. package/resources/assets.js.map +1 -1
  26. package/resources/assets.mjs +8 -0
  27. package/resources/assets.mjs.map +1 -1
  28. package/resources/auctions/auctions.d.ts +368 -0
  29. package/resources/auctions/auctions.d.ts.map +1 -0
  30. package/resources/auctions/auctions.js +72 -0
  31. package/resources/auctions/auctions.js.map +1 -0
  32. package/resources/auctions/auctions.mjs +45 -0
  33. package/resources/auctions/auctions.mjs.map +1 -0
  34. package/resources/auctions/index.d.ts +3 -0
  35. package/resources/auctions/index.d.ts.map +1 -0
  36. package/resources/auctions/index.js +9 -0
  37. package/resources/auctions/index.js.map +1 -0
  38. package/resources/auctions/index.mjs +4 -0
  39. package/resources/auctions/index.mjs.map +1 -0
  40. package/resources/auctions/website-user-attributes/index.d.ts +3 -0
  41. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
  42. package/resources/auctions/website-user-attributes/index.js +9 -0
  43. package/resources/auctions/website-user-attributes/index.js.map +1 -0
  44. package/resources/auctions/website-user-attributes/index.mjs +4 -0
  45. package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
  46. package/resources/auctions/website-user-attributes/values.d.ts +126 -0
  47. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  48. package/resources/auctions/website-user-attributes/values.js +49 -0
  49. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  50. package/resources/auctions/website-user-attributes/values.mjs +45 -0
  51. package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
  52. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +136 -0
  53. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
  54. package/resources/auctions/website-user-attributes/website-user-attributes.js +76 -0
  55. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
  56. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +49 -0
  57. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
  58. package/resources/auctions/website-user-attributes.d.ts +2 -0
  59. package/resources/auctions/website-user-attributes.d.ts.map +1 -0
  60. package/resources/auctions/website-user-attributes.js +19 -0
  61. package/resources/auctions/website-user-attributes.js.map +1 -0
  62. package/resources/auctions/website-user-attributes.mjs +3 -0
  63. package/resources/auctions/website-user-attributes.mjs.map +1 -0
  64. package/resources/auctions.d.ts +1 -133
  65. package/resources/auctions.d.ts.map +1 -1
  66. package/resources/auctions.js +15 -22
  67. package/resources/auctions.js.map +1 -1
  68. package/resources/auctions.mjs +1 -20
  69. package/resources/auctions.mjs.map +1 -1
  70. package/resources/auth.d.ts +17 -4
  71. package/resources/auth.d.ts.map +1 -1
  72. package/resources/auth.js.map +1 -1
  73. package/resources/auth.mjs.map +1 -1
  74. package/resources/index.d.ts +2 -2
  75. package/resources/index.d.ts.map +1 -1
  76. package/resources/index.js +1 -1
  77. package/resources/index.js.map +1 -1
  78. package/resources/index.mjs +1 -1
  79. package/resources/index.mjs.map +1 -1
  80. package/resources/loyalty/account-streaks.d.ts +96 -0
  81. package/resources/loyalty/account-streaks.d.ts.map +1 -0
  82. package/resources/loyalty/account-streaks.js +24 -0
  83. package/resources/loyalty/account-streaks.js.map +1 -0
  84. package/resources/loyalty/account-streaks.mjs +20 -0
  85. package/resources/loyalty/account-streaks.mjs.map +1 -0
  86. package/resources/loyalty/accounts.d.ts +60 -16
  87. package/resources/loyalty/accounts.d.ts.map +1 -1
  88. package/resources/loyalty/accounts.js +14 -0
  89. package/resources/loyalty/accounts.js.map +1 -1
  90. package/resources/loyalty/accounts.mjs +14 -0
  91. package/resources/loyalty/accounts.mjs.map +1 -1
  92. package/resources/loyalty/badges.d.ts +666 -135
  93. package/resources/loyalty/badges.d.ts.map +1 -1
  94. package/resources/loyalty/badges.js +19 -1
  95. package/resources/loyalty/badges.js.map +1 -1
  96. package/resources/loyalty/badges.mjs +19 -1
  97. package/resources/loyalty/badges.mjs.map +1 -1
  98. package/resources/loyalty/currencies.d.ts +19 -0
  99. package/resources/loyalty/currencies.d.ts.map +1 -1
  100. package/resources/loyalty/currencies.js +19 -0
  101. package/resources/loyalty/currencies.js.map +1 -1
  102. package/resources/loyalty/currencies.mjs +19 -0
  103. package/resources/loyalty/currencies.mjs.map +1 -1
  104. package/resources/loyalty/index.d.ts +4 -4
  105. package/resources/loyalty/index.d.ts.map +1 -1
  106. package/resources/loyalty/index.js +5 -5
  107. package/resources/loyalty/index.js.map +1 -1
  108. package/resources/loyalty/index.mjs +3 -3
  109. package/resources/loyalty/index.mjs.map +1 -1
  110. package/resources/loyalty/loyalty.d.ts +11 -11
  111. package/resources/loyalty/loyalty.d.ts.map +1 -1
  112. package/resources/loyalty/loyalty.js +6 -6
  113. package/resources/loyalty/loyalty.js.map +1 -1
  114. package/resources/loyalty/loyalty.mjs +7 -7
  115. package/resources/loyalty/loyalty.mjs.map +1 -1
  116. package/resources/loyalty/multipliers.d.ts +39 -2
  117. package/resources/loyalty/multipliers.d.ts.map +1 -1
  118. package/resources/loyalty/multipliers.js +23 -0
  119. package/resources/loyalty/multipliers.js.map +1 -1
  120. package/resources/loyalty/multipliers.mjs +23 -0
  121. package/resources/loyalty/multipliers.mjs.map +1 -1
  122. package/resources/loyalty/questions-responses.d.ts +55 -4
  123. package/resources/loyalty/questions-responses.d.ts.map +1 -1
  124. package/resources/loyalty/questions-responses.js +9 -0
  125. package/resources/loyalty/questions-responses.js.map +1 -1
  126. package/resources/loyalty/questions-responses.mjs +9 -0
  127. package/resources/loyalty/questions-responses.mjs.map +1 -1
  128. package/resources/loyalty/questions.d.ts +60 -6
  129. package/resources/loyalty/questions.d.ts.map +1 -1
  130. package/resources/loyalty/questions.js +39 -0
  131. package/resources/loyalty/questions.js.map +1 -1
  132. package/resources/loyalty/questions.mjs +39 -0
  133. package/resources/loyalty/questions.mjs.map +1 -1
  134. package/resources/loyalty/rule-edits.d.ts +2730 -8
  135. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  136. package/resources/loyalty/rule-edits.js +14 -0
  137. package/resources/loyalty/rule-edits.js.map +1 -1
  138. package/resources/loyalty/rule-edits.mjs +14 -0
  139. package/resources/loyalty/rule-edits.mjs.map +1 -1
  140. package/resources/loyalty/rule-groups.d.ts +302 -62
  141. package/resources/loyalty/rule-groups.d.ts.map +1 -1
  142. package/resources/loyalty/rule-groups.js +38 -2
  143. package/resources/loyalty/rule-groups.js.map +1 -1
  144. package/resources/loyalty/rule-groups.mjs +38 -2
  145. package/resources/loyalty/rule-groups.mjs.map +1 -1
  146. package/resources/loyalty/rules.d.ts +2024 -258
  147. package/resources/loyalty/rules.d.ts.map +1 -1
  148. package/resources/loyalty/rules.js +40 -9
  149. package/resources/loyalty/rules.js.map +1 -1
  150. package/resources/loyalty/rules.mjs +40 -9
  151. package/resources/loyalty/rules.mjs.map +1 -1
  152. package/resources/loyalty/transactions/index.d.ts +3 -0
  153. package/resources/loyalty/transactions/index.d.ts.map +1 -0
  154. package/resources/loyalty/transactions/index.js +9 -0
  155. package/resources/loyalty/transactions/index.js.map +1 -0
  156. package/resources/loyalty/transactions/index.mjs +4 -0
  157. package/resources/loyalty/transactions/index.mjs.map +1 -0
  158. package/resources/loyalty/transactions/rule-statuses.d.ts +120 -0
  159. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  160. package/resources/loyalty/transactions/rule-statuses.js +30 -0
  161. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  162. package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
  163. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  164. package/resources/loyalty/transactions/transactions.d.ts +410 -0
  165. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  166. package/resources/loyalty/transactions/transactions.js +76 -0
  167. package/resources/loyalty/transactions/transactions.js.map +1 -0
  168. package/resources/loyalty/transactions/transactions.mjs +49 -0
  169. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  170. package/resources/loyalty/transactions.d.ts +1 -248
  171. package/resources/loyalty/transactions.d.ts.map +1 -1
  172. package/resources/loyalty/transactions.js +15 -18
  173. package/resources/loyalty/transactions.js.map +1 -1
  174. package/resources/loyalty/transactions.mjs +1 -16
  175. package/resources/loyalty/transactions.mjs.map +1 -1
  176. package/resources/minting.d.ts +5 -5
  177. package/resources/minting.d.ts.map +1 -1
  178. package/resources/referral/referral.d.ts +12 -3
  179. package/resources/referral/referral.d.ts.map +1 -1
  180. package/resources/referral/referral.js +11 -5
  181. package/resources/referral/referral.js.map +1 -1
  182. package/resources/referral/referral.mjs +11 -5
  183. package/resources/referral/referral.mjs.map +1 -1
  184. package/resources/referral/users.d.ts +30 -3
  185. package/resources/referral/users.d.ts.map +1 -1
  186. package/resources/referral/users.js +12 -4
  187. package/resources/referral/users.js.map +1 -1
  188. package/resources/referral/users.mjs +12 -4
  189. package/resources/referral/users.mjs.map +1 -1
  190. package/resources/users/index.d.ts +1 -1
  191. package/resources/users/index.d.ts.map +1 -1
  192. package/resources/users/index.js.map +1 -1
  193. package/resources/users/index.mjs.map +1 -1
  194. package/resources/users/metadatas.d.ts +36 -3
  195. package/resources/users/metadatas.d.ts.map +1 -1
  196. package/resources/users/metadatas.js.map +1 -1
  197. package/resources/users/metadatas.mjs.map +1 -1
  198. package/resources/users/users.d.ts +192 -35
  199. package/resources/users/users.d.ts.map +1 -1
  200. package/resources/users/users.js +58 -1
  201. package/resources/users/users.js.map +1 -1
  202. package/resources/users/users.mjs +58 -1
  203. package/resources/users/users.mjs.map +1 -1
  204. package/resources/websites/website-collections.d.ts +22 -1
  205. package/resources/websites/website-collections.d.ts.map +1 -1
  206. package/resources/websites/website-collections.js +21 -0
  207. package/resources/websites/website-collections.js.map +1 -1
  208. package/resources/websites/website-collections.mjs +21 -0
  209. package/resources/websites/website-collections.mjs.map +1 -1
  210. package/resources/websites/website-user-roles.d.ts +24 -1
  211. package/resources/websites/website-user-roles.d.ts.map +1 -1
  212. package/resources/websites/website-user-roles.js +23 -0
  213. package/resources/websites/website-user-roles.js.map +1 -1
  214. package/resources/websites/website-user-roles.mjs +23 -0
  215. package/resources/websites/website-user-roles.mjs.map +1 -1
  216. package/resources/websites/websites.d.ts +12 -0
  217. package/resources/websites/websites.d.ts.map +1 -1
  218. package/resources/websites/websites.js +7 -0
  219. package/resources/websites/websites.js.map +1 -1
  220. package/resources/websites/websites.mjs +7 -0
  221. package/resources/websites/websites.mjs.map +1 -1
  222. package/src/core.ts +39 -16
  223. package/src/index.ts +31 -2
  224. package/src/resource.ts +1 -1
  225. package/src/resources/assets.ts +18 -3
  226. package/src/resources/auctions/auctions.ts +561 -0
  227. package/src/resources/auctions/index.ts +19 -0
  228. package/src/resources/auctions/website-user-attributes/index.ts +18 -0
  229. package/src/resources/auctions/website-user-attributes/values.ts +170 -0
  230. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +212 -0
  231. package/src/resources/auctions/website-user-attributes.ts +3 -0
  232. package/src/resources/auctions.ts +1 -207
  233. package/src/resources/auth.ts +21 -5
  234. package/src/resources/index.ts +12 -1
  235. package/src/resources/loyalty/account-streaks.ts +128 -0
  236. package/src/resources/loyalty/accounts.ts +65 -18
  237. package/src/resources/loyalty/badges.ts +790 -146
  238. package/src/resources/loyalty/currencies.ts +19 -0
  239. package/src/resources/loyalty/index.ts +19 -3
  240. package/src/resources/loyalty/loyalty.ts +39 -15
  241. package/src/resources/loyalty/multipliers.ts +43 -4
  242. package/src/resources/loyalty/questions-responses.ts +64 -4
  243. package/src/resources/loyalty/questions.ts +64 -6
  244. package/src/resources/loyalty/rule-edits.ts +3962 -100
  245. package/src/resources/loyalty/rule-groups.ts +530 -74
  246. package/src/resources/loyalty/rules.ts +3162 -295
  247. package/src/resources/loyalty/transactions/index.ts +18 -0
  248. package/src/resources/loyalty/transactions/rule-statuses.ts +178 -0
  249. package/src/resources/loyalty/transactions/transactions.ts +699 -0
  250. package/src/resources/loyalty/transactions.ts +1 -440
  251. package/src/resources/minting.ts +25 -5
  252. package/src/resources/referral/referral.ts +15 -11
  253. package/src/resources/referral/users.ts +45 -5
  254. package/src/resources/users/index.ts +4 -0
  255. package/src/resources/users/metadatas.ts +61 -3
  256. package/src/resources/users/users.ts +259 -38
  257. package/src/resources/websites/website-collections.ts +42 -1
  258. package/src/resources/websites/website-user-roles.ts +25 -1
  259. package/src/resources/websites/websites.ts +12 -0
  260. package/src/version.ts +1 -1
  261. package/version.d.ts +1 -1
  262. package/version.d.ts.map +1 -1
  263. package/version.js +1 -1
  264. package/version.js.map +1 -1
  265. package/version.mjs +1 -1
  266. package/version.mjs.map +1 -1
  267. package/resources/loyalty/rule-chains.d.ts +0 -34
  268. package/resources/loyalty/rule-chains.d.ts.map +0 -1
  269. package/resources/loyalty/rule-chains.js +0 -15
  270. package/resources/loyalty/rule-chains.js.map +0 -1
  271. package/resources/loyalty/rule-chains.mjs +0 -11
  272. package/resources/loyalty/rule-chains.mjs.map +0 -1
  273. 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
+ }
97
+ }
98
+
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;
22
119
  }
23
120
 
24
- export interface RuleGroupGetResponse {
25
- data: Array<RuleGroupGetResponse.Data>;
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
 
@@ -110,6 +211,7 @@ export namespace RuleGroupGetResponse {
110
211
  | 'connected_discord'
111
212
  | 'connected_email'
112
213
  | 'connected_epic'
214
+ | 'connected_github'
113
215
  | 'connected_steam'
114
216
  | 'connected_telegram'
115
217
  | 'connected_twitter'
@@ -139,11 +241,54 @@ export namespace RuleGroupGetResponse {
139
241
  | 'twitter_like'
140
242
  | 'twitter_post_hashtag'
141
243
  | 'quiz'
142
- | 'poll';
244
+ | 'poll'
245
+ | 'steam_wishlist'
246
+ | 'liquidity_uniswap_v2'
247
+ | 'liquidity_uniswap_v3'
248
+ | 'points_airdrop'
249
+ | 'youtube_subscribers'
250
+ | 'youtube_comment'
251
+ | 'shopify_spend'
252
+ | 'swap'
253
+ | 'tiktok_post'
254
+ | 'post_impressions'
255
+ | 'discord_join'
256
+ | 'connected_youtube'
257
+ | 'stratus_function'
258
+ | 'connected_tiktok'
259
+ | 'tiktok_follow'
260
+ | 'github_repo_star'
261
+ | 'github_repo_fork'
262
+ | 'github_repo_collaborator'
263
+ | 'github_merge_PR'
264
+ | 'discord_role_grant'
265
+ | 'connected_reddit'
266
+ | 'reddit_comment';
143
267
  }
144
268
 
145
269
  export namespace LoyaltyRule {
270
+ export interface LoyaltyBadge {
271
+ id: string;
272
+
273
+ description: string | null;
274
+
275
+ imageUrl: string | null;
276
+
277
+ name: string;
278
+ }
279
+
146
280
  export interface Metadata {
281
+ /**
282
+ * Array of loyalty rule IDs that count as check-in when completed. If ["any"] then
283
+ * any rule completions count as check-in.
284
+ */
285
+ autoCheckInRuleIds?: Array<(string & {}) | 'any'> | null;
286
+
287
+ /**
288
+ * Number of tokens per batch.
289
+ */
290
+ batchSize?: number | null;
291
+
147
292
  /**
148
293
  * Text displayed on the action button.
149
294
  */
@@ -167,7 +312,7 @@ export namespace RuleGroupGetResponse {
167
312
  /**
168
313
  * Text to check in the Twitter post, username, or bio.
169
314
  */
170
- checkText?: string | null;
315
+ checkText?: string | Array<string> | null;
171
316
 
172
317
  /**
173
318
  * Array of collections associated with the rule.
@@ -177,7 +322,12 @@ export namespace RuleGroupGetResponse {
177
322
  /**
178
323
  * Conditions for completing the profile.
179
324
  */
180
- completeProfileConditions?: Record<string, boolean> | null;
325
+ completeProfileConditions?: { [key: string]: boolean } | null;
326
+
327
+ /**
328
+ * Description of the external rule condition (only for external rules)
329
+ */
330
+ conditionDescription?: string;
181
331
 
182
332
  /**
183
333
  * Object containing details for the call-to-action.
@@ -189,6 +339,11 @@ export namespace RuleGroupGetResponse {
189
339
  */
190
340
  customRewardsApiKey?: string;
191
341
 
342
+ /**
343
+ * Flag indicating if the rule should use direct RPC to get the balance of tokens.
344
+ */
345
+ directRpc?: boolean;
346
+
192
347
  /**
193
348
  * Array of Discord servers, channels, and roles to join.
194
349
  */
@@ -214,6 +369,11 @@ export namespace RuleGroupGetResponse {
214
369
  */
215
370
  enableVerifiedMultiplier?: boolean;
216
371
 
372
+ /**
373
+ * Type of ERC20 token for the loyalty rule.
374
+ */
375
+ erc20Type?: 'erc20' | 'native';
376
+
217
377
  /**
218
378
  * Fill source of the order for the token sale
219
379
  */
@@ -224,6 +384,16 @@ export namespace RuleGroupGetResponse {
224
384
  */
225
385
  firstReferralReward?: number | null;
226
386
 
387
+ /**
388
+ * Name of the GitHub branch to check for PR merge.
389
+ */
390
+ githubBranchName?: string | null;
391
+
392
+ /**
393
+ * URL of the GitHub repository to check for star.
394
+ */
395
+ githubRepoUrl?: string | null;
396
+
227
397
  /**
228
398
  * Flag indicating whether the fill source is included.
229
399
  */
@@ -234,11 +404,6 @@ export namespace RuleGroupGetResponse {
234
404
  */
235
405
  hasNeverSold?: boolean;
236
406
 
237
- /**
238
- * Flag indicating whether the order source is included.
239
- */
240
- hasOrderSource?: boolean;
241
-
242
407
  /**
243
408
  * Indicates if the full royalty has been paid for items.
244
409
  */
@@ -259,11 +424,21 @@ export namespace RuleGroupGetResponse {
259
424
  */
260
425
  imageUrl?: string | null;
261
426
 
427
+ /**
428
+ * If enabled, the first transaction done on the platform will complete this rule
429
+ */
430
+ isCheckInOnEveryTxn?: boolean;
431
+
262
432
  /**
263
433
  * Indicates if the multiplier has been applied to rewards.
264
434
  */
265
435
  isMultiplierApplied?: boolean;
266
436
 
437
+ /**
438
+ * Flag indicating if the rule is restricted to new users.
439
+ */
440
+ isRestrictedToNewUsers?: boolean;
441
+
267
442
  /**
268
443
  * Flag indicating if rewards are applied retroactively.
269
444
  */
@@ -279,6 +454,11 @@ export namespace RuleGroupGetResponse {
279
454
  */
280
455
  link?: string | null;
281
456
 
457
+ /**
458
+ * Liquidity pool details.
459
+ */
460
+ liquidity?: Metadata.Liquidity;
461
+
282
462
  /**
283
463
  * Maximum quantity constraint for token holding.
284
464
  */
@@ -320,20 +500,40 @@ export namespace RuleGroupGetResponse {
320
500
  onlyRewardSingleTokenOwnership?: boolean | null;
321
501
 
322
502
  /**
323
- * Order source of the order for the token sale
503
+ * Pre-generated text template that will be used to prefill the post content.
324
504
  */
325
- orderSource?: string;
505
+ preGeneratedPostText?: string | null;
326
506
 
327
507
  /**
328
508
  * Promotional code associated with the rule.
329
509
  */
330
510
  promoCode?: string;
331
511
 
512
+ /**
513
+ * URL of the CSV file containing promo codes.
514
+ */
515
+ promoCodeCsvUrl?: string;
516
+
517
+ /**
518
+ * Numbers of the promotional code to be generated.
519
+ */
520
+ promoCodeLength?: number | null;
521
+
522
+ /**
523
+ * Type of the promotional code.
524
+ */
525
+ promoCodeType?: 'code' | 'csv' | 'generate';
526
+
332
527
  /**
333
528
  * Array defining ranges and corresponding rewards.
334
529
  */
335
530
  range?: Array<Metadata.Range>;
336
531
 
532
+ /**
533
+ * ID of the Reddit post.
534
+ */
535
+ redditPostId?: string | null;
536
+
337
537
  /**
338
538
  * Object defining referral requirements.
339
539
  */
@@ -344,11 +544,67 @@ export namespace RuleGroupGetResponse {
344
544
  */
345
545
  referrerReward?: number | null;
346
546
 
547
+ /**
548
+ * Loyalty currency ID of the referrer reward.
549
+ */
550
+ referrerRewardLoyaltyCurrencyId?: string | null;
551
+
552
+ /**
553
+ * Flag indicating if the post link is required.
554
+ */
555
+ requirePostLink?: boolean | null;
556
+
557
+ /**
558
+ * Flag indicating if media metadata is required.
559
+ */
560
+ requirePostMediaLink?: boolean | null;
561
+
562
+ /**
563
+ * Flag indicating if the rule can also reward badges per range.
564
+ */
565
+ rewardBadgePerRange?: boolean;
566
+
567
+ /**
568
+ * Flag indicating if the reward is rewarded by batch.
569
+ */
570
+ rewardByBatch?: boolean | null;
571
+
572
+ /**
573
+ * Criteria to evaluate the reward.
574
+ */
575
+ rewardCriteria?: 'IMPRESSIONS_COUNT' | 'ELIGIBLE_POST' | null;
576
+
577
+ /**
578
+ * Flag indicating if the reward is rewarded per action.
579
+ */
580
+ rewardPerAction?: boolean | null;
581
+
347
582
  /**
348
583
  * Flag indicating if rewards are given per impression.
349
584
  */
350
585
  rewardPerImpression?: boolean | null;
351
586
 
587
+ /**
588
+ * Flag indicating if the rule should reward based on value of traded tokens
589
+ * instead of count.
590
+ */
591
+ rewardPerValue?: boolean;
592
+
593
+ /**
594
+ * Flag indicating if the rule should reward quality posts.
595
+ */
596
+ rewardQualityPosts?: boolean;
597
+
598
+ /**
599
+ * Wallet address of the user can only be used if userId is not provided
600
+ */
601
+ royaltyAddress?: string;
602
+
603
+ /**
604
+ * Royalty percentage of the item.
605
+ */
606
+ royaltyPercentage?: number;
607
+
352
608
  /**
353
609
  * Currency associated with sales.
354
610
  */
@@ -388,6 +644,9 @@ export namespace RuleGroupGetResponse {
388
644
  | 'Twitch'
389
645
  | 'X(Twitter)'
390
646
  | 'YouTube'
647
+ | 'Google'
648
+ | 'GitHub'
649
+ | 'Reddit'
391
650
  | null;
392
651
 
393
652
  /**
@@ -400,11 +659,21 @@ export namespace RuleGroupGetResponse {
400
659
  */
401
660
  socialPlatformName?: string | null;
402
661
 
662
+ /**
663
+ * ID of the Steam app.
664
+ */
665
+ steamAppId?: string | null;
666
+
403
667
  /**
404
668
  * Array of streak milestones and corresponding rewards.
405
669
  */
406
670
  streakArray?: Array<Metadata.StreakArray> | null;
407
671
 
672
+ /**
673
+ * Metadata for swap loyalty rules
674
+ */
675
+ swap?: Metadata.Swap;
676
+
408
677
  /**
409
678
  * ID of the Telegram channel.
410
679
  */
@@ -420,6 +689,12 @@ export namespace RuleGroupGetResponse {
420
689
  */
421
690
  trackAllContracts?: boolean | null;
422
691
 
692
+ /**
693
+ * Flag indicating if the progress is tracked. If enabled, the rule can only be
694
+ * completed once the progress is 100%.
695
+ */
696
+ trackProgress?: boolean | null;
697
+
423
698
  /**
424
699
  * URL of the associated Twitter account.
425
700
  */
@@ -463,7 +738,28 @@ export namespace RuleGroupGetResponse {
463
738
  /**
464
739
  * Type of wallet associated with the rule.
465
740
  */
466
- walletType?: 'evm' | 'solana' | 'imx' | 'sui' | 'ton' | null;
741
+ walletType?:
742
+ | 'evm'
743
+ | 'solana'
744
+ | 'imx'
745
+ | 'sui'
746
+ | 'ton'
747
+ | 'cosmos'
748
+ | 'ultra'
749
+ | 'agw'
750
+ | 'flow_cadence'
751
+ | 'substrate'
752
+ | null;
753
+
754
+ /**
755
+ * ID of the Youtube channel.
756
+ */
757
+ youtubeChannelId?: string | null;
758
+
759
+ /**
760
+ * ID of the Youtube video.
761
+ */
762
+ youtubeVideoId?: string | null;
467
763
  }
468
764
 
469
765
  export namespace Metadata {
@@ -482,13 +778,17 @@ export namespace RuleGroupGetResponse {
482
778
  * Blockchain network of the collection.
483
779
  */
484
780
  network?:
781
+ | 'abstract'
782
+ | 'abstractTestnet'
485
783
  | 'apechain'
486
784
  | 'arbitrum'
487
785
  | 'avalanche'
488
786
  | 'avalancheFuji'
489
787
  | 'base'
490
788
  | 'baseSepolia'
789
+ | 'berachain'
491
790
  | 'berachainArtio'
791
+ | 'berachainBepolia'
492
792
  | 'binance'
493
793
  | 'bscTestnet'
494
794
  | 'campTestnet'
@@ -496,18 +796,30 @@ export namespace RuleGroupGetResponse {
496
796
  | 'fantomTestnet'
497
797
  | 'flowMainnet'
498
798
  | 'mainnet'
799
+ | 'nexusTestnet'
499
800
  | 'optimism'
500
801
  | 'polygon'
501
802
  | 'polygon_mumbai'
502
803
  | 'skaleNebula'
804
+ | 'skaleEuropa'
805
+ | 'skaleCalypso'
503
806
  | 'solana'
504
807
  | 'sophon'
808
+ | 'sophonTestnet'
505
809
  | 'sui'
506
810
  | 'superseed'
507
811
  | 'superseedSepolia'
508
812
  | 'vanar'
509
813
  | 'xai'
510
814
  | 'zksync'
815
+ | 'coti'
816
+ | 'cotiTestnet'
817
+ | 'morph'
818
+ | 'morphTestnet'
819
+ | 'morphHolesky'
820
+ | 'ultra'
821
+ | 'ultraTestnet'
822
+ | 'nitrograph'
511
823
  | 'sepolia'
512
824
  | 'optimism_sepolia'
513
825
  | 'arbitrumSepolia'
@@ -515,7 +827,11 @@ export namespace RuleGroupGetResponse {
515
827
  | 'optimism_goerli'
516
828
  | 'arbitrumGoerli'
517
829
  | 'basecamp'
518
- | 'abstract';
830
+ | 'somnia'
831
+ | 'zkverify'
832
+ | 'polkadot'
833
+ | 'kusama'
834
+ | 'flow_cadence';
519
835
  }
520
836
 
521
837
  /**
@@ -592,6 +908,111 @@ export namespace RuleGroupGetResponse {
592
908
  id: string;
593
909
  }
594
910
 
911
+ /**
912
+ * Liquidity pool details.
913
+ */
914
+ export interface Liquidity {
915
+ /**
916
+ * Calculation type of the liquidity pool.
917
+ */
918
+ calculationType?: 'fixed' | 'custom';
919
+
920
+ /**
921
+ * Custom function to calculate the the reward amount based on the liquidity
922
+ * provided per day. X is the reward amount, Y is the liquidity provided per day in
923
+ * USD.
924
+ */
925
+ customFunction?: string;
926
+
927
+ /**
928
+ * Liquidity provided per day in USD
929
+ */
930
+ liquidityPerDay?: number;
931
+
932
+ /**
933
+ * Blockchain network of the liquidity pool.
934
+ */
935
+ network?:
936
+ | 'abstract'
937
+ | 'abstractTestnet'
938
+ | 'apechain'
939
+ | 'arbitrum'
940
+ | 'avalanche'
941
+ | 'avalancheFuji'
942
+ | 'base'
943
+ | 'baseSepolia'
944
+ | 'berachain'
945
+ | 'berachainArtio'
946
+ | 'berachainBepolia'
947
+ | 'binance'
948
+ | 'bscTestnet'
949
+ | 'campTestnet'
950
+ | 'fantom'
951
+ | 'fantomTestnet'
952
+ | 'flowMainnet'
953
+ | 'mainnet'
954
+ | 'nexusTestnet'
955
+ | 'optimism'
956
+ | 'polygon'
957
+ | 'polygon_mumbai'
958
+ | 'skaleNebula'
959
+ | 'skaleEuropa'
960
+ | 'skaleCalypso'
961
+ | 'solana'
962
+ | 'sophon'
963
+ | 'sophonTestnet'
964
+ | 'sui'
965
+ | 'superseed'
966
+ | 'superseedSepolia'
967
+ | 'vanar'
968
+ | 'xai'
969
+ | 'zksync'
970
+ | 'coti'
971
+ | 'cotiTestnet'
972
+ | 'morph'
973
+ | 'morphTestnet'
974
+ | 'morphHolesky'
975
+ | 'ultra'
976
+ | 'ultraTestnet'
977
+ | 'nitrograph'
978
+ | 'sepolia'
979
+ | 'optimism_sepolia'
980
+ | 'arbitrumSepolia'
981
+ | 'goerli'
982
+ | 'optimism_goerli'
983
+ | 'arbitrumGoerli'
984
+ | 'basecamp'
985
+ | 'somnia'
986
+ | 'zkverify'
987
+ | 'polkadot'
988
+ | 'kusama'
989
+ | 'flow_cadence';
990
+
991
+ /**
992
+ * Indicates if only in-range liquidity is rewarded.
993
+ */
994
+ onlyRewardInRangeLiquidity?: boolean;
995
+
996
+ /**
997
+ * Array of liquidity pools associated with the rule.
998
+ */
999
+ pools?: Array<Liquidity.Pool>;
1000
+
1001
+ /**
1002
+ * Protocol of the liquidity pool.
1003
+ */
1004
+ protocol?: string;
1005
+ }
1006
+
1007
+ export namespace Liquidity {
1008
+ export interface Pool {
1009
+ /**
1010
+ * Unique identifier of the liquidity pool.
1011
+ */
1012
+ id: string;
1013
+ }
1014
+ }
1015
+
595
1016
  export interface Range {
596
1017
  /**
597
1018
  * Reward amount for this range.
@@ -607,6 +1028,16 @@ export namespace RuleGroupGetResponse {
607
1028
  * Start value of the range.
608
1029
  */
609
1030
  startRange: number;
1031
+
1032
+ /**
1033
+ * ID of the loyalty badge for this range.
1034
+ */
1035
+ loyaltyBadgeId?: string;
1036
+
1037
+ /**
1038
+ * Amount of the loyalty multiplier for this range.
1039
+ */
1040
+ loyaltyMultiplierAmount?: number;
610
1041
  }
611
1042
 
612
1043
  /**
@@ -659,20 +1090,15 @@ export namespace RuleGroupGetResponse {
659
1090
  * Object containing details of the associated smart contract.
660
1091
  */
661
1092
  export interface SmartContract {
662
- /**
663
- * ABI of the smart contract.
664
- */
665
- abi?: string | null;
666
-
667
1093
  /**
668
1094
  * Mapping of addresses for the smart contract.
669
1095
  */
670
1096
  addressMapping?: string | null;
671
1097
 
672
1098
  /**
673
- * Array of bonus details applied to the rule.
1099
+ * Object containing details of the amount multiplier from the event.
674
1100
  */
675
- bonus?: Array<SmartContract.Bonus> | null;
1101
+ amountMultiplier?: SmartContract.AmountMultiplier | null;
676
1102
 
677
1103
  /**
678
1104
  * ID of the smart contract.
@@ -684,68 +1110,31 @@ export namespace RuleGroupGetResponse {
684
1110
  */
685
1111
  criteria?: 'everyEvent' | 'byParameter' | null;
686
1112
 
687
- /**
688
- * Time range applied to the rule.
689
- */
690
- customRange?: SmartContract.CustomRange | null;
691
-
692
1113
  /**
693
1114
  * Event emitted by the smart contract.
694
1115
  */
695
1116
  event?: string | null;
696
1117
 
697
- /**
698
- * Maximum value allowed for the parameter.
699
- */
700
- max?: number | null;
701
-
702
1118
  /**
703
1119
  * Array of parameters for the smart contract.
704
1120
  */
705
1121
  params?: Array<SmartContract.Param> | null;
706
1122
 
707
1123
  /**
708
- * Flag indicating if a bonus is applied.
709
- */
710
- withBonus?: boolean | null;
711
-
712
- /**
713
- * Flag indicating if a custom range is applied.
1124
+ * Type of the smart contract interaction.
714
1125
  */
715
- withCustomRange?: boolean | null;
716
-
717
- /**
718
- * Flag indicating if a maximum limit is applied.
719
- */
720
- withMax?: boolean | null;
1126
+ type?: 'function' | 'event' | null;
721
1127
  }
722
1128
 
723
1129
  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
1130
  /**
737
- * Time range applied to the rule.
1131
+ * Object containing details of the amount multiplier from the event.
738
1132
  */
739
- export interface CustomRange {
740
- /**
741
- * End time of the custom range.
742
- */
743
- endsAt?: string | null;
744
-
1133
+ export interface AmountMultiplier {
745
1134
  /**
746
- * Start time of the custom range.
1135
+ * Mapping of the value for the smart contract.
747
1136
  */
748
- startsAt?: string | null;
1137
+ valueMapping?: string | null;
749
1138
  }
750
1139
 
751
1140
  export interface Param {
@@ -789,13 +1178,64 @@ export namespace RuleGroupGetResponse {
789
1178
  */
790
1179
  streakMilestone: number;
791
1180
  }
1181
+
1182
+ /**
1183
+ * Metadata for swap loyalty rules
1184
+ */
1185
+ export interface Swap {
1186
+ provider?: 'any' | 'relay' | 'lifi';
1187
+
1188
+ relayReferrerId?: string;
1189
+
1190
+ requireCrossChainSwap?: boolean;
1191
+
1192
+ swappedToChain?: 'any' | number | string;
1193
+
1194
+ swappedToTokens?: Array<Swap.SwappedToToken>;
1195
+
1196
+ tokenMode?: 'any' | 'specific';
1197
+
1198
+ trackTokenAmount?: boolean;
1199
+ }
1200
+
1201
+ export namespace Swap {
1202
+ export interface SwappedToToken {
1203
+ address: string;
1204
+
1205
+ chainId: string;
1206
+ }
1207
+ }
792
1208
  }
793
1209
  }
794
1210
  }
795
1211
  }
796
1212
  }
797
1213
 
798
- export interface RuleGroupGetParams {
1214
+ export interface RuleGroupUpdateRuleGroupResponse {
1215
+ isCollapsible?: boolean;
1216
+
1217
+ name?: string;
1218
+
1219
+ subTitle?: string;
1220
+ }
1221
+
1222
+ export interface RuleGroupCreateRuleGroupParams {
1223
+ name: string;
1224
+
1225
+ organizationId: string;
1226
+
1227
+ websiteId: string;
1228
+
1229
+ isCollapsible?: boolean;
1230
+
1231
+ isRequired?: boolean;
1232
+
1233
+ sortId?: number;
1234
+
1235
+ subTitle?: string;
1236
+ }
1237
+
1238
+ export interface RuleGroupGetRuleGroupsParams {
799
1239
  excludeHidden?: string;
800
1240
 
801
1241
  limit?: number;
@@ -807,6 +1247,22 @@ export interface RuleGroupGetParams {
807
1247
  websiteId?: string;
808
1248
  }
809
1249
 
1250
+ export interface RuleGroupUpdateRuleGroupParams {
1251
+ isCollapsible?: boolean;
1252
+
1253
+ name?: string | null;
1254
+
1255
+ subtitle?: string | null;
1256
+ }
1257
+
810
1258
  export declare namespace RuleGroups {
811
- export { type RuleGroupGetResponse as RuleGroupGetResponse, type RuleGroupGetParams as RuleGroupGetParams };
1259
+ export {
1260
+ type RuleGroupCreateRuleGroupResponse as RuleGroupCreateRuleGroupResponse,
1261
+ type RuleGroupDeleteRuleGroupResponse as RuleGroupDeleteRuleGroupResponse,
1262
+ type RuleGroupGetRuleGroupsResponse as RuleGroupGetRuleGroupsResponse,
1263
+ type RuleGroupUpdateRuleGroupResponse as RuleGroupUpdateRuleGroupResponse,
1264
+ type RuleGroupCreateRuleGroupParams as RuleGroupCreateRuleGroupParams,
1265
+ type RuleGroupGetRuleGroupsParams as RuleGroupGetRuleGroupsParams,
1266
+ type RuleGroupUpdateRuleGroupParams as RuleGroupUpdateRuleGroupParams,
1267
+ };
812
1268
  }