@snagsolutions/sdk 0.1.0-alpha.14 → 0.1.0-alpha.16

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 (352) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +19 -13
  3. package/_shims/index.d.ts +2 -0
  4. package/_shims/index.js +5 -1
  5. package/_shims/index.mjs +5 -1
  6. package/core.d.ts.map +1 -1
  7. package/core.js +4 -1
  8. package/core.js.map +1 -1
  9. package/core.mjs +5 -2
  10. package/core.mjs.map +1 -1
  11. package/index.d.mts +17 -11
  12. package/index.d.ts +17 -11
  13. package/index.d.ts.map +1 -1
  14. package/index.js +14 -8
  15. package/index.js.map +1 -1
  16. package/index.mjs +15 -9
  17. package/index.mjs.map +1 -1
  18. package/package.json +8 -29
  19. package/resources/assets.d.ts +50 -0
  20. package/resources/assets.d.ts.map +1 -0
  21. package/resources/assets.js +17 -0
  22. package/resources/assets.js.map +1 -0
  23. package/resources/assets.mjs +13 -0
  24. package/resources/assets.mjs.map +1 -0
  25. package/resources/auctions.d.ts +134 -0
  26. package/resources/auctions.d.ts.map +1 -0
  27. package/resources/{auction-bids.js → auctions.js} +12 -6
  28. package/resources/auctions.js.map +1 -0
  29. package/resources/{auction-bids.mjs → auctions.mjs} +10 -4
  30. package/resources/auctions.mjs.map +1 -0
  31. package/resources/auth.d.ts +40 -0
  32. package/resources/auth.d.ts.map +1 -0
  33. package/resources/auth.js +16 -0
  34. package/resources/auth.js.map +1 -0
  35. package/resources/auth.mjs +12 -0
  36. package/resources/auth.mjs.map +1 -0
  37. package/resources/index.d.ts +7 -5
  38. package/resources/index.d.ts.map +1 -1
  39. package/resources/index.js +11 -7
  40. package/resources/index.js.map +1 -1
  41. package/resources/index.mjs +7 -5
  42. package/resources/index.mjs.map +1 -1
  43. package/resources/loyalty/accounts.d.ts +190 -0
  44. package/resources/loyalty/accounts.d.ts.map +1 -1
  45. package/resources/loyalty/accounts.js +15 -0
  46. package/resources/loyalty/accounts.js.map +1 -1
  47. package/resources/loyalty/accounts.mjs +15 -0
  48. package/resources/loyalty/accounts.mjs.map +1 -1
  49. package/resources/loyalty/badges.d.ts +4 -0
  50. package/resources/loyalty/badges.d.ts.map +1 -1
  51. package/resources/loyalty/currencies.d.ts +6 -0
  52. package/resources/loyalty/currencies.d.ts.map +1 -1
  53. package/resources/loyalty/index.d.ts +8 -5
  54. package/resources/loyalty/index.d.ts.map +1 -1
  55. package/resources/loyalty/index.js +9 -3
  56. package/resources/loyalty/index.js.map +1 -1
  57. package/resources/loyalty/index.mjs +5 -2
  58. package/resources/loyalty/index.mjs.map +1 -1
  59. package/resources/loyalty/loyalty.d.ts +29 -17
  60. package/resources/loyalty/loyalty.d.ts.map +1 -1
  61. package/resources/loyalty/loyalty.js +24 -12
  62. package/resources/loyalty/loyalty.js.map +1 -1
  63. package/resources/loyalty/loyalty.mjs +25 -13
  64. package/resources/loyalty/loyalty.mjs.map +1 -1
  65. package/resources/loyalty/multipliers.d.ts +37 -6
  66. package/resources/loyalty/multipliers.d.ts.map +1 -1
  67. package/resources/loyalty/multipliers.js +7 -1
  68. package/resources/loyalty/multipliers.js.map +1 -1
  69. package/resources/loyalty/multipliers.mjs +7 -1
  70. package/resources/loyalty/multipliers.mjs.map +1 -1
  71. package/resources/loyalty/{transaction-entries/questions-responses.d.ts → questions-responses.d.ts} +2 -2
  72. package/resources/loyalty/questions-responses.d.ts.map +1 -0
  73. package/resources/loyalty/{transaction-entries/questions-responses.js → questions-responses.js} +2 -2
  74. package/resources/loyalty/questions-responses.js.map +1 -0
  75. package/resources/loyalty/{transaction-entries/questions-responses.mjs → questions-responses.mjs} +2 -2
  76. package/resources/loyalty/questions-responses.mjs.map +1 -0
  77. package/resources/loyalty/{transaction-entries/questions.d.ts → questions.d.ts} +2 -2
  78. package/resources/loyalty/questions.d.ts.map +1 -0
  79. package/resources/loyalty/{transaction-entries/questions.js → questions.js} +1 -1
  80. package/resources/loyalty/questions.js.map +1 -0
  81. package/resources/loyalty/{transaction-entries/questions.mjs → questions.mjs} +1 -1
  82. package/resources/loyalty/questions.mjs.map +1 -0
  83. package/resources/loyalty/rule-edits.d.ts +6 -6
  84. package/resources/loyalty/rule-edits.d.ts.map +1 -1
  85. package/resources/loyalty/rule-edits.js +1 -1
  86. package/resources/loyalty/rule-edits.js.map +1 -1
  87. package/resources/loyalty/rule-edits.mjs +1 -1
  88. package/resources/loyalty/rule-edits.mjs.map +1 -1
  89. package/resources/loyalty/rule-groups.d.ts +559 -0
  90. package/resources/loyalty/rule-groups.d.ts.map +1 -0
  91. package/resources/loyalty/rule-groups.js +16 -0
  92. package/resources/loyalty/rule-groups.js.map +1 -0
  93. package/resources/loyalty/rule-groups.mjs +12 -0
  94. package/resources/loyalty/rule-groups.mjs.map +1 -0
  95. package/resources/loyalty/rules.d.ts +144 -23
  96. package/resources/loyalty/rules.d.ts.map +1 -1
  97. package/resources/loyalty/rules.js +1 -1
  98. package/resources/loyalty/rules.js.map +1 -1
  99. package/resources/loyalty/rules.mjs +1 -1
  100. package/resources/loyalty/rules.mjs.map +1 -1
  101. package/resources/loyalty/transactions.d.ts +248 -0
  102. package/resources/loyalty/transactions.d.ts.map +1 -0
  103. package/resources/loyalty/transactions.js +22 -0
  104. package/resources/loyalty/transactions.js.map +1 -0
  105. package/resources/loyalty/transactions.mjs +18 -0
  106. package/resources/loyalty/transactions.mjs.map +1 -0
  107. package/resources/loyalty.d.ts +2 -0
  108. package/resources/loyalty.d.ts.map +1 -0
  109. package/resources/loyalty.js +19 -0
  110. package/resources/loyalty.js.map +1 -0
  111. package/resources/loyalty.mjs +3 -0
  112. package/resources/loyalty.mjs.map +1 -0
  113. package/resources/{assets/minting.d.ts → minting.d.ts} +10 -10
  114. package/resources/minting.d.ts.map +1 -0
  115. package/resources/{assets/minting.js → minting.js} +2 -2
  116. package/resources/minting.js.map +1 -0
  117. package/resources/{assets/minting.mjs → minting.mjs} +2 -2
  118. package/resources/minting.mjs.map +1 -0
  119. package/resources/referral/index.d.ts +3 -0
  120. package/resources/referral/index.d.ts.map +1 -0
  121. package/resources/referral/index.js.map +1 -0
  122. package/resources/{assets/referral → referral}/index.mjs +1 -1
  123. package/resources/referral/index.mjs.map +1 -0
  124. package/resources/referral/referral.d.ts +31 -0
  125. package/resources/referral/referral.d.ts.map +1 -0
  126. package/resources/{assets/referral → referral}/referral.js +4 -4
  127. package/resources/referral/referral.js.map +1 -0
  128. package/resources/{assets/referral → referral}/referral.mjs +5 -5
  129. package/resources/referral/referral.mjs.map +1 -0
  130. package/resources/{assets/referral → referral}/users.d.ts +11 -11
  131. package/resources/referral/users.d.ts.map +1 -0
  132. package/resources/{assets/referral → referral}/users.js +3 -3
  133. package/resources/referral/users.js.map +1 -0
  134. package/resources/{assets/referral → referral}/users.mjs +3 -3
  135. package/resources/referral/users.mjs.map +1 -0
  136. package/resources/referral.d.ts +2 -0
  137. package/resources/referral.d.ts.map +1 -0
  138. package/resources/referral.js +19 -0
  139. package/resources/referral.js.map +1 -0
  140. package/resources/referral.mjs +3 -0
  141. package/resources/referral.mjs.map +1 -0
  142. package/resources/users/index.d.ts +2 -3
  143. package/resources/users/index.d.ts.map +1 -1
  144. package/resources/users/index.js +1 -3
  145. package/resources/users/index.js.map +1 -1
  146. package/resources/users/index.mjs +1 -2
  147. package/resources/users/index.mjs.map +1 -1
  148. package/resources/users/metadatas.d.ts +17 -7
  149. package/resources/users/metadatas.d.ts.map +1 -1
  150. package/resources/users/metadatas.js +2 -2
  151. package/resources/users/metadatas.js.map +1 -1
  152. package/resources/users/metadatas.mjs +2 -2
  153. package/resources/users/metadatas.mjs.map +1 -1
  154. package/resources/users/users.d.ts +296 -6
  155. package/resources/users/users.d.ts.map +1 -1
  156. package/resources/users/users.js +25 -4
  157. package/resources/users/users.js.map +1 -1
  158. package/resources/users/users.mjs +25 -4
  159. package/resources/users/users.mjs.map +1 -1
  160. package/resources/users.d.ts +2 -0
  161. package/resources/users.d.ts.map +1 -0
  162. package/resources/users.js +19 -0
  163. package/resources/users.js.map +1 -0
  164. package/resources/users.mjs +3 -0
  165. package/resources/users.mjs.map +1 -0
  166. package/resources/websites/index.d.ts +4 -0
  167. package/resources/websites/index.d.ts.map +1 -0
  168. package/resources/websites/index.js +11 -0
  169. package/resources/websites/index.js.map +1 -0
  170. package/resources/{assets → websites}/index.mjs +1 -4
  171. package/resources/websites/index.mjs.map +1 -0
  172. package/resources/websites/website-collections.d.ts +73 -0
  173. package/resources/websites/website-collections.d.ts.map +1 -0
  174. package/resources/{assets → websites}/website-collections.js +2 -2
  175. package/resources/websites/website-collections.js.map +1 -0
  176. package/resources/{assets → websites}/website-collections.mjs +2 -2
  177. package/resources/websites/website-collections.mjs.map +1 -0
  178. package/resources/{assets → websites}/website-user-roles.d.ts +28 -28
  179. package/resources/websites/website-user-roles.d.ts.map +1 -0
  180. package/resources/{assets → websites}/website-user-roles.js +7 -7
  181. package/resources/websites/website-user-roles.js.map +1 -0
  182. package/resources/{assets → websites}/website-user-roles.mjs +7 -7
  183. package/resources/websites/website-user-roles.mjs.map +1 -0
  184. package/resources/websites/websites.d.ts +211 -0
  185. package/resources/websites/websites.d.ts.map +1 -0
  186. package/resources/{assets/assets.js → websites/websites.js} +14 -27
  187. package/resources/websites/websites.js.map +1 -0
  188. package/resources/websites/websites.mjs +29 -0
  189. package/resources/websites/websites.mjs.map +1 -0
  190. package/resources/websites.d.ts +1 -202
  191. package/resources/websites.d.ts.map +1 -1
  192. package/resources/websites.js +15 -18
  193. package/resources/websites.js.map +1 -1
  194. package/resources/websites.mjs +1 -16
  195. package/resources/websites.mjs.map +1 -1
  196. package/resources.d.ts +2 -0
  197. package/resources.d.ts.map +1 -0
  198. package/resources.js +18 -0
  199. package/resources.js.map +1 -0
  200. package/resources.mjs +2 -0
  201. package/resources.mjs.map +1 -0
  202. package/src/_shims/index.d.ts +2 -0
  203. package/src/_shims/index.js +5 -1
  204. package/src/_shims/index.mjs +5 -1
  205. package/src/core.ts +8 -3
  206. package/src/index.ts +66 -22
  207. package/src/resources/assets.ts +77 -0
  208. package/src/resources/auctions.ts +209 -0
  209. package/src/resources/auth.ts +69 -0
  210. package/src/resources/index.ts +21 -10
  211. package/src/resources/loyalty/accounts.ts +250 -1
  212. package/src/resources/loyalty/badges.ts +5 -0
  213. package/src/resources/loyalty/currencies.ts +6 -0
  214. package/src/resources/loyalty/index.ts +40 -14
  215. package/src/resources/loyalty/loyalty.ts +129 -69
  216. package/src/resources/loyalty/multipliers.ts +44 -8
  217. package/src/resources/loyalty/{transaction-entries/questions-responses.ts → questions-responses.ts} +3 -3
  218. package/src/resources/loyalty/{transaction-entries/questions.ts → questions.ts} +2 -2
  219. package/src/resources/loyalty/rule-edits.ts +7 -10
  220. package/src/resources/loyalty/rule-groups.ts +818 -0
  221. package/src/resources/loyalty/rules.ts +406 -192
  222. package/src/resources/loyalty/transactions.ts +332 -0
  223. package/src/resources/loyalty.ts +3 -0
  224. package/src/resources/{assets/minting.ts → minting.ts} +32 -27
  225. package/src/resources/referral/index.ts +10 -0
  226. package/src/resources/referral/referral.ts +70 -0
  227. package/src/resources/{assets/referral → referral}/users.ts +14 -20
  228. package/src/resources/referral.ts +3 -0
  229. package/src/resources/users/index.ts +13 -4
  230. package/src/resources/users/metadatas.ts +26 -15
  231. package/src/resources/users/users.ts +423 -9
  232. package/src/resources/users.ts +3 -0
  233. package/src/resources/websites/index.ts +22 -0
  234. package/src/resources/{assets → websites}/website-collections.ts +32 -30
  235. package/src/resources/{assets → websites}/website-user-roles.ts +40 -40
  236. package/src/resources/websites/websites.ts +299 -0
  237. package/src/resources/websites.ts +1 -257
  238. package/src/resources.ts +1 -0
  239. package/src/version.ts +1 -1
  240. package/version.d.ts +1 -1
  241. package/version.js +1 -1
  242. package/version.mjs +1 -1
  243. package/resources/assets/assets.d.ts +0 -153
  244. package/resources/assets/assets.d.ts.map +0 -1
  245. package/resources/assets/assets.js.map +0 -1
  246. package/resources/assets/assets.mjs +0 -42
  247. package/resources/assets/assets.mjs.map +0 -1
  248. package/resources/assets/index.d.ts +0 -7
  249. package/resources/assets/index.d.ts.map +0 -1
  250. package/resources/assets/index.js +0 -17
  251. package/resources/assets/index.js.map +0 -1
  252. package/resources/assets/index.mjs.map +0 -1
  253. package/resources/assets/minting.d.ts.map +0 -1
  254. package/resources/assets/minting.js.map +0 -1
  255. package/resources/assets/minting.mjs.map +0 -1
  256. package/resources/assets/referral/index.d.ts +0 -3
  257. package/resources/assets/referral/index.d.ts.map +0 -1
  258. package/resources/assets/referral/index.js.map +0 -1
  259. package/resources/assets/referral/index.mjs.map +0 -1
  260. package/resources/assets/referral/referral.d.ts +0 -30
  261. package/resources/assets/referral/referral.d.ts.map +0 -1
  262. package/resources/assets/referral/referral.js.map +0 -1
  263. package/resources/assets/referral/referral.mjs.map +0 -1
  264. package/resources/assets/referral/users.d.ts.map +0 -1
  265. package/resources/assets/referral/users.js.map +0 -1
  266. package/resources/assets/referral/users.mjs.map +0 -1
  267. package/resources/assets/users.d.ts +0 -285
  268. package/resources/assets/users.d.ts.map +0 -1
  269. package/resources/assets/users.js +0 -34
  270. package/resources/assets/users.js.map +0 -1
  271. package/resources/assets/users.mjs +0 -30
  272. package/resources/assets/users.mjs.map +0 -1
  273. package/resources/assets/website-collections.d.ts +0 -73
  274. package/resources/assets/website-collections.d.ts.map +0 -1
  275. package/resources/assets/website-collections.js.map +0 -1
  276. package/resources/assets/website-collections.mjs.map +0 -1
  277. package/resources/assets/website-user-roles.d.ts.map +0 -1
  278. package/resources/assets/website-user-roles.js.map +0 -1
  279. package/resources/assets/website-user-roles.mjs.map +0 -1
  280. package/resources/auction-bids.d.ts +0 -51
  281. package/resources/auction-bids.d.ts.map +0 -1
  282. package/resources/auction-bids.js.map +0 -1
  283. package/resources/auction-bids.mjs.map +0 -1
  284. package/resources/drip/drip.d.ts +0 -14
  285. package/resources/drip/drip.d.ts.map +0 -1
  286. package/resources/drip/drip.js +0 -43
  287. package/resources/drip/drip.js.map +0 -1
  288. package/resources/drip/drip.mjs +0 -16
  289. package/resources/drip/drip.mjs.map +0 -1
  290. package/resources/drip/index.d.ts +0 -4
  291. package/resources/drip/index.d.ts.map +0 -1
  292. package/resources/drip/index.js +0 -11
  293. package/resources/drip/index.js.map +0 -1
  294. package/resources/drip/index.mjs +0 -5
  295. package/resources/drip/index.mjs.map +0 -1
  296. package/resources/drip/quests.d.ts +0 -4
  297. package/resources/drip/quests.d.ts.map +0 -1
  298. package/resources/drip/quests.js +0 -9
  299. package/resources/drip/quests.js.map +0 -1
  300. package/resources/drip/quests.mjs +0 -5
  301. package/resources/drip/quests.mjs.map +0 -1
  302. package/resources/drip/status.d.ts +0 -4
  303. package/resources/drip/status.d.ts.map +0 -1
  304. package/resources/drip/status.js +0 -9
  305. package/resources/drip/status.js.map +0 -1
  306. package/resources/drip/status.mjs +0 -5
  307. package/resources/drip/status.mjs.map +0 -1
  308. package/resources/loyalty/transaction-entries/accounts.d.ts +0 -191
  309. package/resources/loyalty/transaction-entries/accounts.d.ts.map +0 -1
  310. package/resources/loyalty/transaction-entries/accounts.js +0 -24
  311. package/resources/loyalty/transaction-entries/accounts.js.map +0 -1
  312. package/resources/loyalty/transaction-entries/accounts.mjs +0 -20
  313. package/resources/loyalty/transaction-entries/accounts.mjs.map +0 -1
  314. package/resources/loyalty/transaction-entries/index.d.ts +0 -5
  315. package/resources/loyalty/transaction-entries/index.d.ts.map +0 -1
  316. package/resources/loyalty/transaction-entries/index.js +0 -13
  317. package/resources/loyalty/transaction-entries/index.js.map +0 -1
  318. package/resources/loyalty/transaction-entries/index.mjs +0 -6
  319. package/resources/loyalty/transaction-entries/index.mjs.map +0 -1
  320. package/resources/loyalty/transaction-entries/questions-responses.d.ts.map +0 -1
  321. package/resources/loyalty/transaction-entries/questions-responses.js.map +0 -1
  322. package/resources/loyalty/transaction-entries/questions-responses.mjs.map +0 -1
  323. package/resources/loyalty/transaction-entries/questions.d.ts.map +0 -1
  324. package/resources/loyalty/transaction-entries/questions.js.map +0 -1
  325. package/resources/loyalty/transaction-entries/questions.mjs.map +0 -1
  326. package/resources/loyalty/transaction-entries/transaction-entries.d.ts +0 -300
  327. package/resources/loyalty/transaction-entries/transaction-entries.d.ts.map +0 -1
  328. package/resources/loyalty/transaction-entries/transaction-entries.js +0 -66
  329. package/resources/loyalty/transaction-entries/transaction-entries.js.map +0 -1
  330. package/resources/loyalty/transaction-entries/transaction-entries.mjs +0 -39
  331. package/resources/loyalty/transaction-entries/transaction-entries.mjs.map +0 -1
  332. package/resources/users/wallets.d.ts +0 -4
  333. package/resources/users/wallets.d.ts.map +0 -1
  334. package/resources/users/wallets.js +0 -9
  335. package/resources/users/wallets.js.map +0 -1
  336. package/resources/users/wallets.mjs +0 -5
  337. package/resources/users/wallets.mjs.map +0 -1
  338. package/src/resources/assets/assets.ts +0 -294
  339. package/src/resources/assets/index.ts +0 -38
  340. package/src/resources/assets/referral/index.ts +0 -14
  341. package/src/resources/assets/referral/referral.ts +0 -74
  342. package/src/resources/assets/users.ts +0 -415
  343. package/src/resources/auction-bids.ts +0 -77
  344. package/src/resources/drip/drip.ts +0 -21
  345. package/src/resources/drip/index.ts +0 -5
  346. package/src/resources/drip/quests.ts +0 -5
  347. package/src/resources/drip/status.ts +0 -5
  348. package/src/resources/loyalty/transaction-entries/accounts.ts +0 -251
  349. package/src/resources/loyalty/transaction-entries/index.ts +0 -34
  350. package/src/resources/loyalty/transaction-entries/transaction-entries.ts +0 -525
  351. package/src/resources/users/wallets.ts +0 -5
  352. /package/resources/{assets/referral → referral}/index.js +0 -0
@@ -0,0 +1,332 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import { isRequestOptions } from '../../core';
5
+ import * as Core from '../../core';
6
+
7
+ export class Transactions extends APIResource {
8
+ /**
9
+ * Create a loyalty transaction to update account balances.
10
+ */
11
+ createTransaction(
12
+ body: TransactionCreateTransactionParams,
13
+ options?: Core.RequestOptions,
14
+ ): Core.APIPromise<TransactionCreateTransactionResponse> {
15
+ return this._client.post('/api/loyalty/transactions', { body, ...options });
16
+ }
17
+
18
+ /**
19
+ * Fetch loyalty transaction entries for wallets or users, representing account
20
+ * balance changes.
21
+ */
22
+ getTransactionEntries(
23
+ query?: TransactionGetTransactionEntriesParams,
24
+ options?: Core.RequestOptions,
25
+ ): Core.APIPromise<TransactionGetTransactionEntriesResponse>;
26
+ getTransactionEntries(
27
+ options?: Core.RequestOptions,
28
+ ): Core.APIPromise<TransactionGetTransactionEntriesResponse>;
29
+ getTransactionEntries(
30
+ query: TransactionGetTransactionEntriesParams | Core.RequestOptions = {},
31
+ options?: Core.RequestOptions,
32
+ ): Core.APIPromise<TransactionGetTransactionEntriesResponse> {
33
+ if (isRequestOptions(query)) {
34
+ return this.getTransactionEntries({}, query);
35
+ }
36
+ return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
37
+ }
38
+ }
39
+
40
+ export interface TransactionCreateTransactionResponse {
41
+ id: string;
42
+
43
+ createdAt: string;
44
+
45
+ description: string;
46
+
47
+ entries: Array<TransactionCreateTransactionResponse.Entry>;
48
+
49
+ updatedAt: string;
50
+ }
51
+
52
+ export namespace TransactionCreateTransactionResponse {
53
+ export interface Entry {
54
+ amount: number;
55
+
56
+ /**
57
+ * Direction of the transaction entry
58
+ */
59
+ direction: 'credit' | 'debit';
60
+
61
+ walletAddress: string;
62
+
63
+ idempotencyKey?: string;
64
+ }
65
+ }
66
+
67
+ export interface TransactionGetTransactionEntriesResponse {
68
+ data: Array<TransactionGetTransactionEntriesResponse.Data>;
69
+
70
+ hasNextPage: boolean;
71
+ }
72
+
73
+ export namespace TransactionGetTransactionEntriesResponse {
74
+ /**
75
+ * Schema for a loyalty transaction entry
76
+ */
77
+ export interface Data {
78
+ /**
79
+ * Unique identifier for the transaction entry
80
+ */
81
+ id: string;
82
+
83
+ /**
84
+ * Amount involved in the transaction
85
+ */
86
+ amount: number;
87
+
88
+ /**
89
+ * Timestamp when the transaction entry was created
90
+ */
91
+ createdAt: string;
92
+
93
+ /**
94
+ * Direction of the transaction entry
95
+ */
96
+ direction: 'credit' | 'debit';
97
+
98
+ /**
99
+ * Unique identifier for the loyalty account
100
+ */
101
+ loyaltyAccountId: string;
102
+
103
+ /**
104
+ * Details of the loyalty transaction
105
+ */
106
+ loyaltyTransaction: Data.LoyaltyTransaction;
107
+
108
+ /**
109
+ * Unique identifier for the organization
110
+ */
111
+ organizationId: string;
112
+
113
+ /**
114
+ * Type of the loyalty transaction
115
+ */
116
+ type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
117
+
118
+ /**
119
+ * Timestamp when the transaction entry was last updated
120
+ */
121
+ updatedAt: string;
122
+
123
+ /**
124
+ * Unique identifier for the website
125
+ */
126
+ websiteId: string;
127
+
128
+ /**
129
+ * Optional metadata for the transaction entry
130
+ */
131
+ metadata?: Record<string, unknown>;
132
+ }
133
+
134
+ export namespace Data {
135
+ /**
136
+ * Details of the loyalty transaction
137
+ */
138
+ export interface LoyaltyTransaction {
139
+ /**
140
+ * Unique identifier for the loyalty transaction
141
+ */
142
+ id: string;
143
+
144
+ /**
145
+ * Type of the loyalty transaction
146
+ */
147
+ type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
148
+
149
+ /**
150
+ * Details of the loyalty rule associated with the transaction
151
+ */
152
+ loyaltyRule?: LoyaltyTransaction.LoyaltyRule;
153
+ }
154
+
155
+ export namespace LoyaltyTransaction {
156
+ /**
157
+ * Details of the loyalty rule associated with the transaction
158
+ */
159
+ export interface LoyaltyRule {
160
+ /**
161
+ * Unique identifier for the loyalty rule
162
+ */
163
+ id: string;
164
+
165
+ /**
166
+ * Type of the loyalty rule
167
+ */
168
+ type: string;
169
+
170
+ /**
171
+ * Description of the loyalty rule
172
+ */
173
+ description?: string;
174
+
175
+ /**
176
+ * Optional metadata for the loyalty rule
177
+ */
178
+ metadata?: Record<string, unknown>;
179
+
180
+ /**
181
+ * Name of the loyalty rule
182
+ */
183
+ name?: string;
184
+ }
185
+ }
186
+ }
187
+ }
188
+
189
+ export interface TransactionCreateTransactionParams {
190
+ /**
191
+ * Description of the loyalty transaction
192
+ */
193
+ description: string;
194
+
195
+ /**
196
+ * Array of transaction entries
197
+ */
198
+ entries: Array<TransactionCreateTransactionParams.Entry>;
199
+
200
+ /**
201
+ * Unique identifier for the loyalty currency
202
+ */
203
+ loyaltyCurrencyId?: string;
204
+ }
205
+
206
+ export namespace TransactionCreateTransactionParams {
207
+ export interface Entry {
208
+ /**
209
+ * Transaction entry amount.
210
+ */
211
+ amount: number;
212
+
213
+ /**
214
+ * Direction of the transaction entry for this wallet address
215
+ */
216
+ direction?: 'credit' | 'debit';
217
+
218
+ /**
219
+ * Idempotency key for the transaction entry. Creation will fail if already exists
220
+ * for this wallet address.
221
+ */
222
+ idempotencyKey?: string;
223
+
224
+ /**
225
+ * The wallet address of the user
226
+ */
227
+ walletAddress?: string;
228
+ }
229
+ }
230
+
231
+ export interface TransactionGetTransactionEntriesParams {
232
+ /**
233
+ * End date to filter by (exclusive, less than)
234
+ */
235
+ createdAtEnd?: string;
236
+
237
+ /**
238
+ * Start date to filter by (inclusive, greater than or equal to)
239
+ */
240
+ createdAtStart?: string;
241
+
242
+ /**
243
+ * Direction of the transaction entry to filter by
244
+ */
245
+ direction?: 'credit' | 'debit';
246
+
247
+ /**
248
+ * Key to ensure idempotency of the request
249
+ */
250
+ idempotencyKey?: string;
251
+
252
+ /**
253
+ * Maximum number of records to return (max 1000)
254
+ */
255
+ limit?: number;
256
+
257
+ /**
258
+ * Unique identifier for the loyalty rule to filter by
259
+ */
260
+ loyaltyRuleId?: string;
261
+
262
+ /**
263
+ * Unique identifier for the loyalty transaction to filter by
264
+ */
265
+ loyaltyTransactionId?: string;
266
+
267
+ /**
268
+ * Field to order the results by
269
+ */
270
+ orderBy?: 'createdAt' | 'updatedAt' | 'loyaltyAccountLockVersion';
271
+
272
+ /**
273
+ * Unique identifier for the organization to filter by
274
+ */
275
+ organizationId?: string;
276
+
277
+ /**
278
+ * Pagination cursor to start after a specific resource ID
279
+ */
280
+ startingAfter?: string;
281
+
282
+ /**
283
+ * Type of the loyalty transaction to filter by
284
+ */
285
+ type?: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
286
+
287
+ /**
288
+ * When passed in return the list of fulfilled entries for loyalty rules. If a
289
+ * loyalty rule has a fulfilled entry this means the user cannot currently complete
290
+ * the rule. Must be passed in with userId or walletAddress.
291
+ */
292
+ userCompletedLoyaltyRuleId?: string | Array<string>;
293
+
294
+ /**
295
+ * External identifier for the user group controlled by you
296
+ */
297
+ userGroupExternalIdentifier?: string;
298
+
299
+ /**
300
+ * Unique identifier for the user group
301
+ */
302
+ userGroupId?: string;
303
+
304
+ /**
305
+ * User ID or array of User IDs to filter by
306
+ */
307
+ userId?: string | Array<string>;
308
+
309
+ /**
310
+ * Wallet address or array of wallet addresses to filter by
311
+ */
312
+ walletAddress?: string | Array<string>;
313
+
314
+ /**
315
+ * Identifier for the wallet group to filter by
316
+ */
317
+ walletGroupIdentifier?: string;
318
+
319
+ /**
320
+ * Unique identifier for the website to filter by
321
+ */
322
+ websiteId?: string;
323
+ }
324
+
325
+ export declare namespace Transactions {
326
+ export {
327
+ type TransactionCreateTransactionResponse as TransactionCreateTransactionResponse,
328
+ type TransactionGetTransactionEntriesResponse as TransactionGetTransactionEntriesResponse,
329
+ type TransactionCreateTransactionParams as TransactionCreateTransactionParams,
330
+ type TransactionGetTransactionEntriesParams as TransactionGetTransactionEntriesParams,
331
+ };
332
+ }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './loyalty/index';
@@ -1,16 +1,16 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../resource';
4
- import * as Core from '../../core';
3
+ import { APIResource } from '../resource';
4
+ import * as Core from '../core';
5
5
 
6
6
  export class Minting extends APIResource {
7
7
  /**
8
8
  * Returns minting assets and any relevant context
9
9
  */
10
- getMintingAssets(
11
- query: MintingGetMintingAssetsParams,
10
+ getAssets(
11
+ query: MintingGetAssetsParams,
12
12
  options?: Core.RequestOptions,
13
- ): Core.APIPromise<MintingGetMintingAssetsResponse> {
13
+ ): Core.APIPromise<MintingGetAssetsResponse> {
14
14
  return this._client.get('/api/minting/assets', { query, ...options });
15
15
  }
16
16
  }
@@ -18,11 +18,11 @@ export class Minting extends APIResource {
18
18
  /**
19
19
  * Schema for getting minting assets response
20
20
  */
21
- export interface MintingGetMintingAssetsResponse {
21
+ export interface MintingGetAssetsResponse {
22
22
  /**
23
23
  * Array of minting assets
24
24
  */
25
- data: Array<MintingGetMintingAssetsResponse.Data>;
25
+ data: Array<MintingGetAssetsResponse.Data>;
26
26
 
27
27
  /**
28
28
  * Indicates if more pages are available
@@ -30,7 +30,7 @@ export interface MintingGetMintingAssetsResponse {
30
30
  hasNextPage: boolean;
31
31
  }
32
32
 
33
- export namespace MintingGetMintingAssetsResponse {
33
+ export namespace MintingGetAssetsResponse {
34
34
  export interface Data {
35
35
  /**
36
36
  * UUID of the minting asset
@@ -39,7 +39,7 @@ export namespace MintingGetMintingAssetsResponse {
39
39
  }
40
40
  }
41
41
 
42
- export interface MintingGetMintingAssetsParams {
42
+ export interface MintingGetAssetsParams {
43
43
  /**
44
44
  * Organization ID
45
45
  */
@@ -81,7 +81,7 @@ export interface MintingGetMintingAssetsParams {
81
81
  mintingContractAssetId?: string | null;
82
82
 
83
83
  /**
84
- * Minting Contract IDs
84
+ * Comma-separated list of Minting Contract UUIDs
85
85
  */
86
86
  mintingContractIds?: string | null;
87
87
 
@@ -89,35 +89,40 @@ export interface MintingGetMintingAssetsParams {
89
89
  * Network
90
90
  */
91
91
  network?:
92
- | 'mainnet'
93
- | 'polygon'
94
- | 'polygon_mumbai'
95
- | 'optimism'
92
+ | 'apechain'
96
93
  | 'arbitrum'
97
- | 'binance'
98
- | 'bscTestnet'
99
94
  | 'avalanche'
100
95
  | 'avalancheFuji'
101
- | 'zksync'
102
- | 'fantom'
103
- | 'fantomTestnet'
104
96
  | 'base'
105
97
  | 'baseSepolia'
106
- | 'skaleNebula'
107
- | 'xai'
108
98
  | 'berachainArtio'
109
- | 'solana'
110
- | 'apechain'
111
- | 'flowMainnet'
99
+ | 'binance'
100
+ | 'bscTestnet'
112
101
  | 'campTestnet'
102
+ | 'fantom'
103
+ | 'fantomTestnet'
104
+ | 'flowMainnet'
105
+ | 'mainnet'
106
+ | 'optimism'
107
+ | 'polygon'
108
+ | 'polygon_mumbai'
109
+ | 'skaleNebula'
110
+ | 'solana'
111
+ | 'sophon'
113
112
  | 'sui'
113
+ | 'superseed'
114
+ | 'superseedSepolia'
114
115
  | 'vanar'
116
+ | 'xai'
117
+ | 'zksync'
115
118
  | 'sepolia'
116
119
  | 'optimism_sepolia'
117
120
  | 'arbitrumSepolia'
118
121
  | 'goerli'
119
122
  | 'optimism_goerli'
120
- | 'arbitrumGoerli';
123
+ | 'arbitrumGoerli'
124
+ | 'basecamp'
125
+ | 'abstract';
121
126
 
122
127
  /**
123
128
  * Sort Dir
@@ -147,7 +152,7 @@ export interface MintingGetMintingAssetsParams {
147
152
 
148
153
  export declare namespace Minting {
149
154
  export {
150
- type MintingGetMintingAssetsResponse as MintingGetMintingAssetsResponse,
151
- type MintingGetMintingAssetsParams as MintingGetMintingAssetsParams,
155
+ type MintingGetAssetsResponse as MintingGetAssetsResponse,
156
+ type MintingGetAssetsParams as MintingGetAssetsParams,
152
157
  };
153
158
  }
@@ -0,0 +1,10 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Referral, type ReferralCreateCodeResponse, type ReferralCreateCodeParams } from './referral';
4
+ export {
5
+ Users,
6
+ type UserCreateResponse,
7
+ type UserListResponse,
8
+ type UserCreateParams,
9
+ type UserListParams,
10
+ } from './users';
@@ -0,0 +1,70 @@
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 UsersAPI from './users';
7
+ import { UserCreateParams, UserCreateResponse, UserListParams, UserListResponse, Users } from './users';
8
+
9
+ export class Referral extends APIResource {
10
+ users: UsersAPI.Users = new UsersAPI.Users(this._client);
11
+
12
+ /**
13
+ * This endpoint allows you to create a referral code
14
+ */
15
+ createCode(
16
+ body?: ReferralCreateCodeParams,
17
+ options?: Core.RequestOptions,
18
+ ): Core.APIPromise<ReferralCreateCodeResponse>;
19
+ createCode(options?: Core.RequestOptions): Core.APIPromise<ReferralCreateCodeResponse>;
20
+ createCode(
21
+ body: ReferralCreateCodeParams | Core.RequestOptions = {},
22
+ options?: Core.RequestOptions,
23
+ ): Core.APIPromise<ReferralCreateCodeResponse> {
24
+ if (isRequestOptions(body)) {
25
+ return this.createCode({}, body);
26
+ }
27
+ return this._client.post('/api/referral/codes', { body, ...options });
28
+ }
29
+ }
30
+
31
+ export interface ReferralCreateCodeResponse {
32
+ id: string;
33
+
34
+ createdAt: string;
35
+
36
+ deletedAt: string | null;
37
+
38
+ organizationId: string;
39
+
40
+ referralCode: string;
41
+
42
+ updatedAt: string;
43
+
44
+ userId: string;
45
+
46
+ websiteId: string;
47
+ }
48
+
49
+ export interface ReferralCreateCodeParams {
50
+ loyaltyRuleId?: string;
51
+
52
+ userId?: string;
53
+ }
54
+
55
+ Referral.Users = Users;
56
+
57
+ export declare namespace Referral {
58
+ export {
59
+ type ReferralCreateCodeResponse as ReferralCreateCodeResponse,
60
+ type ReferralCreateCodeParams as ReferralCreateCodeParams,
61
+ };
62
+
63
+ export {
64
+ Users as Users,
65
+ type UserCreateResponse as UserCreateResponse,
66
+ type UserListResponse as UserListResponse,
67
+ type UserCreateParams as UserCreateParams,
68
+ type UserListParams as UserListParams,
69
+ };
70
+ }
@@ -1,41 +1,35 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../../resource';
4
- import * as Core from '../../../core';
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
5
 
6
6
  export class Users extends APIResource {
7
7
  /**
8
8
  * This endpoint allows you to create a referral user
9
9
  */
10
- createReferralUser(
11
- body: UserCreateReferralUserParams,
12
- options?: Core.RequestOptions,
13
- ): Core.APIPromise<UserCreateReferralUserResponse> {
10
+ create(body: UserCreateParams, options?: Core.RequestOptions): Core.APIPromise<UserCreateResponse> {
14
11
  return this._client.post('/api/referral/users', { body, ...options });
15
12
  }
16
13
 
17
14
  /**
18
15
  * This endpoint allows you to get referrals
19
16
  */
20
- getReferrals(
21
- query: UserGetReferralsParams,
22
- options?: Core.RequestOptions,
23
- ): Core.APIPromise<UserGetReferralsResponse> {
17
+ list(query: UserListParams, options?: Core.RequestOptions): Core.APIPromise<UserListResponse> {
24
18
  return this._client.get('/api/referral/users', { query, ...options });
25
19
  }
26
20
  }
27
21
 
28
- export interface UserCreateReferralUserResponse {
22
+ export interface UserCreateResponse {
29
23
  message: string;
30
24
  }
31
25
 
32
- export interface UserGetReferralsResponse {
33
- data: Array<UserGetReferralsResponse.Data>;
26
+ export interface UserListResponse {
27
+ data: Array<UserListResponse.Data>;
34
28
 
35
29
  hasNextPage: boolean;
36
30
  }
37
31
 
38
- export namespace UserGetReferralsResponse {
32
+ export namespace UserListResponse {
39
33
  export interface Data {
40
34
  id: string;
41
35
 
@@ -67,7 +61,7 @@ export namespace UserGetReferralsResponse {
67
61
  }
68
62
  }
69
63
 
70
- export interface UserCreateReferralUserParams {
64
+ export interface UserCreateParams {
71
65
  userIds: Array<string>;
72
66
 
73
67
  referralCode?: string;
@@ -75,7 +69,7 @@ export interface UserCreateReferralUserParams {
75
69
  referralCodeId?: string;
76
70
  }
77
71
 
78
- export interface UserGetReferralsParams {
72
+ export interface UserListParams {
79
73
  walletAddress: string | Array<string>;
80
74
 
81
75
  includeEligibility?: boolean | null;
@@ -91,9 +85,9 @@ export interface UserGetReferralsParams {
91
85
 
92
86
  export declare namespace Users {
93
87
  export {
94
- type UserCreateReferralUserResponse as UserCreateReferralUserResponse,
95
- type UserGetReferralsResponse as UserGetReferralsResponse,
96
- type UserCreateReferralUserParams as UserCreateReferralUserParams,
97
- type UserGetReferralsParams as UserGetReferralsParams,
88
+ type UserCreateResponse as UserCreateResponse,
89
+ type UserListResponse as UserListResponse,
90
+ type UserCreateParams as UserCreateParams,
91
+ type UserListParams as UserListParams,
98
92
  };
99
93
  }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './referral/index';
@@ -3,9 +3,18 @@
3
3
  export {
4
4
  Metadatas,
5
5
  type MetadataCreateResponse,
6
- type MetadataRetrieveResponse,
6
+ type MetadataListResponse,
7
7
  type MetadataCreateParams,
8
- type MetadataRetrieveParams,
8
+ type MetadataListParams,
9
9
  } from './metadatas';
10
- export { Users } from './users';
11
- export { Wallets } from './wallets';
10
+ export {
11
+ Users,
12
+ type UserListResponse,
13
+ type UserConnectResponse,
14
+ type UserCountResponse,
15
+ type UserDisconnectResponse,
16
+ type UserListParams,
17
+ type UserConnectParams,
18
+ type UserCountParams,
19
+ type UserDisconnectParams,
20
+ } from './users';