@snagsolutions/sdk 0.1.0-alpha.19 → 0.1.0-alpha.191

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 +1552 -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 +343 -0
  28. package/resources/auctions/auctions.d.ts.map +1 -0
  29. package/resources/auctions/auctions.js +72 -0
  30. package/resources/auctions/auctions.js.map +1 -0
  31. package/resources/auctions/auctions.mjs +45 -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 +126 -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 +136 -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 +666 -135
  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 +55 -4
  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 +52 -6
  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 -248
  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 +29 -3
  184. package/resources/referral/users.d.ts.map +1 -1
  185. package/resources/referral/users.js +12 -4
  186. package/resources/referral/users.js.map +1 -1
  187. package/resources/referral/users.mjs +12 -4
  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 +184 -35
  198. package/resources/users/users.d.ts.map +1 -1
  199. package/resources/users/users.js +58 -1
  200. package/resources/users/users.js.map +1 -1
  201. package/resources/users/users.mjs +58 -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 +24 -1
  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 +31 -2
  223. package/src/resource.ts +1 -1
  224. package/src/resources/assets.ts +18 -3
  225. package/src/resources/auctions/auctions.ts +528 -0
  226. package/src/resources/auctions/index.ts +19 -0
  227. package/src/resources/auctions/website-user-attributes/index.ts +18 -0
  228. package/src/resources/auctions/website-user-attributes/values.ts +170 -0
  229. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +212 -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 +12 -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 +790 -146
  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 +64 -4
  242. package/src/resources/loyalty/questions.ts +56 -6
  243. package/src/resources/loyalty/rule-edits.ts +3830 -100
  244. package/src/resources/loyalty/rule-groups.ts +491 -76
  245. package/src/resources/loyalty/rules.ts +2986 -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 +683 -0
  249. package/src/resources/loyalty/transactions.ts +1 -440
  250. package/src/resources/minting.ts +25 -5
  251. package/src/resources/referral/referral.ts +13 -11
  252. package/src/resources/referral/users.ts +43 -5
  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 +249 -38
  256. package/src/resources/websites/website-collections.ts +42 -1
  257. package/src/resources/websites/website-user-roles.ts +25 -1
  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
@@ -0,0 +1,683 @@
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
+ import * as RuleStatusesAPI from './rule-statuses';
7
+ import {
8
+ RuleStatusListParams,
9
+ RuleStatusListResponse,
10
+ RuleStatusUpdateParams,
11
+ RuleStatusUpdateResponse,
12
+ RuleStatuses,
13
+ } from './rule-statuses';
14
+
15
+ export class Transactions extends APIResource {
16
+ ruleStatuses: RuleStatusesAPI.RuleStatuses = new RuleStatusesAPI.RuleStatuses(this._client);
17
+
18
+ /**
19
+ * Create a loyalty transaction to update account balances.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const response =
24
+ * await client.loyalty.transactions.createTransaction({
25
+ * description: 'Purchase of item X',
26
+ * entries: [{ amount: 5 }],
27
+ * });
28
+ * ```
29
+ */
30
+ createTransaction(
31
+ body: TransactionCreateTransactionParams,
32
+ options?: Core.RequestOptions,
33
+ ): Core.APIPromise<TransactionCreateTransactionResponse> {
34
+ return this._client.post('/api/loyalty/transactions', { body, ...options });
35
+ }
36
+
37
+ /**
38
+ * Fetch loyalty transaction entries for wallets or users, representing account
39
+ * balance changes.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const response =
44
+ * await client.loyalty.transactions.getTransactionEntries();
45
+ * ```
46
+ */
47
+ getTransactionEntries(
48
+ query?: TransactionGetTransactionEntriesParams,
49
+ options?: Core.RequestOptions,
50
+ ): Core.APIPromise<TransactionGetTransactionEntriesResponse>;
51
+ getTransactionEntries(
52
+ options?: Core.RequestOptions,
53
+ ): Core.APIPromise<TransactionGetTransactionEntriesResponse>;
54
+ getTransactionEntries(
55
+ query: TransactionGetTransactionEntriesParams | Core.RequestOptions = {},
56
+ options?: Core.RequestOptions,
57
+ ): Core.APIPromise<TransactionGetTransactionEntriesResponse> {
58
+ if (isRequestOptions(query)) {
59
+ return this.getTransactionEntries({}, query);
60
+ }
61
+ return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
62
+ }
63
+
64
+ /**
65
+ * Retrieve configured loyalty rule chains
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const response =
70
+ * await client.loyalty.transactions.listRuleChains({
71
+ * organizationId: '123e4567-e89b-12d3-a456-426614174001',
72
+ * websiteId: '123e4567-e89b-12d3-a456-426614174002',
73
+ * });
74
+ * ```
75
+ */
76
+ listRuleChains(
77
+ query: TransactionListRuleChainsParams,
78
+ options?: Core.RequestOptions,
79
+ ): Core.APIPromise<TransactionListRuleChainsResponse> {
80
+ return this._client.get('/api/loyalty/rule_chains', { query, ...options });
81
+ }
82
+ }
83
+
84
+ export interface TransactionCreateTransactionResponse {
85
+ id: string;
86
+
87
+ createdAt: string;
88
+
89
+ description: string;
90
+
91
+ entries: Array<TransactionCreateTransactionResponse.Entry>;
92
+
93
+ updatedAt: string;
94
+ }
95
+
96
+ export namespace TransactionCreateTransactionResponse {
97
+ export interface Entry {
98
+ amount: number;
99
+
100
+ /**
101
+ * Direction of the transaction entry
102
+ */
103
+ direction: 'credit' | 'debit';
104
+
105
+ walletAddress: string;
106
+
107
+ idempotencyKey?: string;
108
+ }
109
+ }
110
+
111
+ export interface TransactionGetTransactionEntriesResponse {
112
+ data: Array<TransactionGetTransactionEntriesResponse.Data>;
113
+
114
+ hasNextPage: boolean;
115
+ }
116
+
117
+ export namespace TransactionGetTransactionEntriesResponse {
118
+ /**
119
+ * Schema for a loyalty transaction entry
120
+ */
121
+ export interface Data {
122
+ /**
123
+ * Unique identifier for the transaction entry
124
+ */
125
+ id: string;
126
+
127
+ /**
128
+ * Amount involved in the transaction
129
+ */
130
+ amount: number;
131
+
132
+ /**
133
+ * Timestamp when the transaction entry was created
134
+ */
135
+ createdAt: string;
136
+
137
+ /**
138
+ * Direction of the transaction entry
139
+ */
140
+ direction: 'credit' | 'debit';
141
+
142
+ /**
143
+ * Unique identifier for the loyalty account
144
+ */
145
+ loyaltyAccountId: string;
146
+
147
+ /**
148
+ * Details of the loyalty transaction
149
+ */
150
+ loyaltyTransaction: Data.LoyaltyTransaction;
151
+
152
+ /**
153
+ * Unique identifier for the organization
154
+ */
155
+ organizationId: string;
156
+
157
+ /**
158
+ * Type of the loyalty transaction
159
+ */
160
+ type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order' | null;
161
+
162
+ /**
163
+ * Timestamp when the transaction entry was last updated
164
+ */
165
+ updatedAt: string;
166
+
167
+ /**
168
+ * Unique identifier for the website
169
+ */
170
+ websiteId: string;
171
+
172
+ /**
173
+ * Optional metadata for the transaction entry
174
+ */
175
+ metadata?: { [key: string]: unknown };
176
+ }
177
+
178
+ export namespace Data {
179
+ /**
180
+ * Details of the loyalty transaction
181
+ */
182
+ export interface LoyaltyTransaction {
183
+ /**
184
+ * Unique identifier for the loyalty transaction
185
+ */
186
+ id: string;
187
+
188
+ /**
189
+ * Type of the loyalty transaction
190
+ */
191
+ type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order' | null;
192
+
193
+ /**
194
+ * Details of the loyalty rule associated with the transaction
195
+ */
196
+ loyaltyRule?: LoyaltyTransaction.LoyaltyRule;
197
+ }
198
+
199
+ export namespace LoyaltyTransaction {
200
+ /**
201
+ * Details of the loyalty rule associated with the transaction
202
+ */
203
+ export interface LoyaltyRule {
204
+ /**
205
+ * Unique identifier for the loyalty rule
206
+ */
207
+ id: string;
208
+
209
+ /**
210
+ * Type of the loyalty rule
211
+ */
212
+ type: string;
213
+
214
+ /**
215
+ * Description of the loyalty rule
216
+ */
217
+ description?: string;
218
+
219
+ loyaltyRuleGroupItem?: LoyaltyRule.LoyaltyRuleGroupItem;
220
+
221
+ /**
222
+ * Optional metadata for the loyalty rule
223
+ */
224
+ metadata?: { [key: string]: unknown };
225
+
226
+ /**
227
+ * Name of the loyalty rule
228
+ */
229
+ name?: string;
230
+ }
231
+
232
+ export namespace LoyaltyRule {
233
+ export interface LoyaltyRuleGroupItem {
234
+ loyaltyRuleGroupId: string;
235
+ }
236
+ }
237
+ }
238
+ }
239
+ }
240
+
241
+ export interface TransactionListRuleChainsResponse {
242
+ data: Array<TransactionListRuleChainsResponse.Data>;
243
+
244
+ hasNextPage: boolean;
245
+ }
246
+
247
+ export namespace TransactionListRuleChainsResponse {
248
+ export interface Data {
249
+ /**
250
+ * Unique identifier for the rule chain
251
+ */
252
+ id: string;
253
+
254
+ loyaltyConditions: Array<Data.LoyaltyCondition>;
255
+
256
+ /**
257
+ * Unique identifier for the loyalty rule
258
+ */
259
+ loyaltyRuleId: string;
260
+
261
+ /**
262
+ * Name of the rule chain
263
+ */
264
+ name: string;
265
+ }
266
+
267
+ export namespace Data {
268
+ export interface LoyaltyCondition {
269
+ /**
270
+ * Unique identifier for the condition
271
+ */
272
+ id: string;
273
+
274
+ /**
275
+ * Amount of the condition
276
+ */
277
+ amount: number | null;
278
+
279
+ association: Array<LoyaltyCondition.Association>;
280
+
281
+ /**
282
+ * URL of the CSV file
283
+ */
284
+ csvUrl: string | null;
285
+
286
+ /**
287
+ * Description of the condition
288
+ */
289
+ description: string | null;
290
+
291
+ /**
292
+ * Number of times the condition must be met
293
+ */
294
+ repeatCount: number | null;
295
+
296
+ /**
297
+ * Number of times the condition must be met
298
+ */
299
+ requiredCount: number | null;
300
+
301
+ /**
302
+ * Type of the condition
303
+ */
304
+ type: 'rule' | 'rules' | 'points' | 'section' | 'level' | 'api' | 'badge' | 'badges' | 'csv';
305
+ }
306
+
307
+ export namespace LoyaltyCondition {
308
+ export interface Association {
309
+ /**
310
+ * Unique identifier for the association
311
+ */
312
+ id: string;
313
+
314
+ /**
315
+ * Unique identifier for the loyalty badge
316
+ */
317
+ loyaltyBadgeId: string | null;
318
+
319
+ /**
320
+ * Unique identifier for the loyalty currency
321
+ */
322
+ loyaltyCurrencyId: string | null;
323
+
324
+ loyaltyRule: Association.LoyaltyRule | null;
325
+
326
+ /**
327
+ * Unique identifier for the loyalty rule group
328
+ */
329
+ loyaltyRuleGroupId: string | null;
330
+
331
+ /**
332
+ * Unique identifier for the loyalty rule
333
+ */
334
+ loyaltyRuleId: string | null;
335
+ }
336
+
337
+ export namespace Association {
338
+ export interface LoyaltyRule {
339
+ /**
340
+ * Name of the loyalty rule
341
+ */
342
+ name: string;
343
+ }
344
+ }
345
+ }
346
+ }
347
+ }
348
+
349
+ export interface TransactionCreateTransactionParams {
350
+ /**
351
+ * Description of the loyalty transaction
352
+ */
353
+ description: string;
354
+
355
+ /**
356
+ * Array of transaction entries
357
+ */
358
+ entries: Array<TransactionCreateTransactionParams.Entry>;
359
+
360
+ /**
361
+ * Unique identifier for the loyalty currency
362
+ */
363
+ loyaltyCurrencyId?: string;
364
+ }
365
+
366
+ export namespace TransactionCreateTransactionParams {
367
+ export interface Entry {
368
+ /**
369
+ * Transaction entry amount.
370
+ */
371
+ amount: number;
372
+
373
+ /**
374
+ * Direction of the transaction entry for this wallet address
375
+ */
376
+ direction?: 'credit' | 'debit';
377
+
378
+ /**
379
+ * Idempotency key for the transaction entry. Creation will fail if already exists
380
+ * for this wallet address.
381
+ */
382
+ idempotencyKey?: string;
383
+
384
+ /**
385
+ * Unique identifier for the loyalty currency for the wallet. Can only use
386
+ * entry-level currency or transaction-level currency.
387
+ */
388
+ loyaltyCurrencyId?: string;
389
+
390
+ /**
391
+ * The wallet address of the user
392
+ */
393
+ walletAddress?: string;
394
+ }
395
+ }
396
+
397
+ export interface TransactionGetTransactionEntriesParams {
398
+ /**
399
+ * End date to filter by (exclusive, less than)
400
+ */
401
+ createdAtEnd?: string;
402
+
403
+ /**
404
+ * Start date to filter by (inclusive, greater than or equal to)
405
+ */
406
+ createdAtStart?: string;
407
+
408
+ /**
409
+ * Key to ensure idempotency of the request
410
+ */
411
+ idempotencyKey?: string;
412
+
413
+ /**
414
+ * Maximum number of records to return (max 100)
415
+ */
416
+ limit?: number;
417
+
418
+ /**
419
+ * UUID of the loyalty currency IDs to filter by. Use this to exclude deleted
420
+ * currencies
421
+ */
422
+ loyaltyCurrencyId?: string | Array<string>;
423
+
424
+ /**
425
+ * UUID of the rule group (converted to lowercase)
426
+ */
427
+ loyaltyRuleGroupId?: string;
428
+
429
+ /**
430
+ * Unique identifier for the loyalty rule to filter by
431
+ */
432
+ loyaltyRuleId?: string;
433
+
434
+ loyaltyRuleType?:
435
+ | 'Bonus'
436
+ | 'BoughtOn'
437
+ | 'BoughtWithRoyalties'
438
+ | 'DiscordMessages'
439
+ | 'Listing'
440
+ | 'Lodging'
441
+ | 'MintOn'
442
+ | 'PoapClaim'
443
+ | 'SnagSocialsConnected'
444
+ | 'SnapshotFullset'
445
+ | 'SnapshotHold'
446
+ | 'SoldOn'
447
+ | 'SoldWithRoyalties'
448
+ | 'TokenHold'
449
+ | 'TwitterBio'
450
+ | 'TwitterHashTagPost'
451
+ | 'Retweet'
452
+ | 'check_in'
453
+ | 'code_entry'
454
+ | 'connect_wallet'
455
+ | 'connected_discord'
456
+ | 'connected_email'
457
+ | 'connected_epic'
458
+ | 'connected_steam'
459
+ | 'connected_telegram'
460
+ | 'connected_twitter'
461
+ | 'create_partner_account'
462
+ | 'discord_member'
463
+ | 'drip_x_follow'
464
+ | 'drip_x_new_tweet'
465
+ | 'drip_x_text_in_bio'
466
+ | 'drip_x_text_in_comment'
467
+ | 'drip_x_text_in_name'
468
+ | 'drip_x_tweet'
469
+ | 'external_rule'
470
+ | 'link_click'
471
+ | 'manual_upload'
472
+ | 'profile_completed'
473
+ | 'referred_user'
474
+ | 'smart_contract_event'
475
+ | 'snapshot_governance'
476
+ | 'telegram_join'
477
+ | 'telegram_messages'
478
+ | 'text_input'
479
+ | 'token_hold_erc20'
480
+ | 'tweet_liked_by_project'
481
+ | 'twitter_comment'
482
+ | 'twitter_follow'
483
+ | 'twitter_followers'
484
+ | 'twitter_like'
485
+ | 'twitter_post_hashtag'
486
+ | 'quiz'
487
+ | 'poll'
488
+ | 'steam_wishlist'
489
+ | 'liquidity_uniswap_v2'
490
+ | 'liquidity_uniswap_v3'
491
+ | 'points_airdrop'
492
+ | 'youtube_subscribers'
493
+ | 'youtube_comment'
494
+ | 'shopify_spend'
495
+ | 'swap'
496
+ | 'tiktok_post'
497
+ | 'post_impressions'
498
+ | 'discord_join'
499
+ | 'connected_youtube'
500
+ | 'stratus_function'
501
+ | 'connected_tiktok'
502
+ | 'tiktok_follow'
503
+ | Array<
504
+ | 'Bonus'
505
+ | 'BoughtOn'
506
+ | 'BoughtWithRoyalties'
507
+ | 'DiscordMessages'
508
+ | 'Listing'
509
+ | 'Lodging'
510
+ | 'MintOn'
511
+ | 'PoapClaim'
512
+ | 'SnagSocialsConnected'
513
+ | 'SnapshotFullset'
514
+ | 'SnapshotHold'
515
+ | 'SoldOn'
516
+ | 'SoldWithRoyalties'
517
+ | 'TokenHold'
518
+ | 'TwitterBio'
519
+ | 'TwitterHashTagPost'
520
+ | 'Retweet'
521
+ | 'check_in'
522
+ | 'code_entry'
523
+ | 'connect_wallet'
524
+ | 'connected_discord'
525
+ | 'connected_email'
526
+ | 'connected_epic'
527
+ | 'connected_steam'
528
+ | 'connected_telegram'
529
+ | 'connected_twitter'
530
+ | 'create_partner_account'
531
+ | 'discord_member'
532
+ | 'drip_x_follow'
533
+ | 'drip_x_new_tweet'
534
+ | 'drip_x_text_in_bio'
535
+ | 'drip_x_text_in_comment'
536
+ | 'drip_x_text_in_name'
537
+ | 'drip_x_tweet'
538
+ | 'external_rule'
539
+ | 'link_click'
540
+ | 'manual_upload'
541
+ | 'profile_completed'
542
+ | 'referred_user'
543
+ | 'smart_contract_event'
544
+ | 'snapshot_governance'
545
+ | 'telegram_join'
546
+ | 'telegram_messages'
547
+ | 'text_input'
548
+ | 'token_hold_erc20'
549
+ | 'tweet_liked_by_project'
550
+ | 'twitter_comment'
551
+ | 'twitter_follow'
552
+ | 'twitter_followers'
553
+ | 'twitter_like'
554
+ | 'twitter_post_hashtag'
555
+ | 'quiz'
556
+ | 'poll'
557
+ | 'steam_wishlist'
558
+ | 'liquidity_uniswap_v2'
559
+ | 'liquidity_uniswap_v3'
560
+ | 'points_airdrop'
561
+ | 'youtube_subscribers'
562
+ | 'youtube_comment'
563
+ | 'shopify_spend'
564
+ | 'swap'
565
+ | 'tiktok_post'
566
+ | 'post_impressions'
567
+ | 'discord_join'
568
+ | 'connected_youtube'
569
+ | 'stratus_function'
570
+ | 'connected_tiktok'
571
+ | 'tiktok_follow'
572
+ >;
573
+
574
+ /**
575
+ * Unique identifier for the loyalty transaction to filter by
576
+ */
577
+ loyaltyTransactionId?: string;
578
+
579
+ /**
580
+ * Unique identifier for the organization to filter by
581
+ */
582
+ organizationId?: string;
583
+
584
+ /**
585
+ * Field to sort the results by
586
+ */
587
+ sortBy?: 'createdAt' | 'updatedAt' | 'loyaltyAccountLockVersion';
588
+
589
+ /**
590
+ * Direction to sort the results by
591
+ */
592
+ sortDir?: 'asc' | 'desc';
593
+
594
+ /**
595
+ * Pagination cursor to start after a specific resource ID
596
+ */
597
+ startingAfter?: string;
598
+
599
+ /**
600
+ * Type of the loyalty transaction to filter by
601
+ */
602
+ type?: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
603
+
604
+ /**
605
+ * When passed in return the list of fulfilled entries for loyalty rules. If a
606
+ * loyalty rule has a fulfilled entry this means the user cannot currently complete
607
+ * the rule. Must be passed in with userId or walletAddress.
608
+ */
609
+ userCompletedLoyaltyRuleId?: string | Array<string>;
610
+
611
+ /**
612
+ * External identifier for the user group controlled by you.
613
+ */
614
+ userGroupExternalIdentifier?: string;
615
+
616
+ /**
617
+ * Unique identifier for the user group
618
+ */
619
+ userGroupId?: string;
620
+
621
+ /**
622
+ * User ID or array of User IDs to filter by
623
+ */
624
+ userId?: string | Array<string>;
625
+
626
+ /**
627
+ * Wallet address or array of wallet addresses to filter by
628
+ */
629
+ walletAddress?: string | Array<string>;
630
+
631
+ /**
632
+ * Identifier for the wallet group to filter by
633
+ */
634
+ walletGroupIdentifier?: string;
635
+
636
+ /**
637
+ * Unique identifier for the website to filter by
638
+ */
639
+ websiteId?: string;
640
+ }
641
+
642
+ export interface TransactionListRuleChainsParams {
643
+ /**
644
+ * Unique identifier for the organization
645
+ */
646
+ organizationId: string;
647
+
648
+ /**
649
+ * Unique identifier for the website
650
+ */
651
+ websiteId: string;
652
+
653
+ /**
654
+ * Number of rule chains to return
655
+ */
656
+ limit?: number;
657
+
658
+ /**
659
+ * Starting after the given rule chain ID
660
+ */
661
+ startingAfter?: string;
662
+ }
663
+
664
+ Transactions.RuleStatuses = RuleStatuses;
665
+
666
+ export declare namespace Transactions {
667
+ export {
668
+ type TransactionCreateTransactionResponse as TransactionCreateTransactionResponse,
669
+ type TransactionGetTransactionEntriesResponse as TransactionGetTransactionEntriesResponse,
670
+ type TransactionListRuleChainsResponse as TransactionListRuleChainsResponse,
671
+ type TransactionCreateTransactionParams as TransactionCreateTransactionParams,
672
+ type TransactionGetTransactionEntriesParams as TransactionGetTransactionEntriesParams,
673
+ type TransactionListRuleChainsParams as TransactionListRuleChainsParams,
674
+ };
675
+
676
+ export {
677
+ RuleStatuses as RuleStatuses,
678
+ type RuleStatusUpdateResponse as RuleStatusUpdateResponse,
679
+ type RuleStatusListResponse as RuleStatusListResponse,
680
+ type RuleStatusUpdateParams as RuleStatusUpdateParams,
681
+ type RuleStatusListParams as RuleStatusListParams,
682
+ };
683
+ }