@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,209 @@
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 Auctions extends APIResource {
8
+ /**
9
+ * Returns a list of auction bids with optional filtering and pagination.
10
+ */
11
+ listAuctionBids(query?: AuctionListAuctionBidsParams, options?: Core.RequestOptions): Core.APIPromise<void>;
12
+ listAuctionBids(options?: Core.RequestOptions): Core.APIPromise<void>;
13
+ listAuctionBids(
14
+ query: AuctionListAuctionBidsParams | Core.RequestOptions = {},
15
+ options?: Core.RequestOptions,
16
+ ): Core.APIPromise<void> {
17
+ if (isRequestOptions(query)) {
18
+ return this.listAuctionBids({}, query);
19
+ }
20
+ return this._client.get('/api/auction_bids', {
21
+ query,
22
+ ...options,
23
+ headers: { Accept: '*/*', ...options?.headers },
24
+ });
25
+ }
26
+
27
+ /**
28
+ * Returns a list of auctions with optional filtering and pagination.
29
+ */
30
+ listAuctions(options?: Core.RequestOptions): Core.APIPromise<AuctionListAuctionsResponse> {
31
+ return this._client.get('/api/auctions', options);
32
+ }
33
+ }
34
+
35
+ /**
36
+ * Schema for the response when fetching auctions
37
+ */
38
+ export interface AuctionListAuctionsResponse {
39
+ data: Array<AuctionListAuctionsResponse.Data>;
40
+
41
+ hasNextPage: boolean;
42
+ }
43
+
44
+ export namespace AuctionListAuctionsResponse {
45
+ export interface Data {
46
+ id: string;
47
+
48
+ auctionBids: Array<Data.AuctionBid>;
49
+
50
+ auctionItems: Array<Data.AuctionItem>;
51
+
52
+ biddersOwnCollectionAddresses: Array<string>;
53
+
54
+ createdAt: string;
55
+
56
+ currencyAddress: string | null;
57
+
58
+ currencyDecimals: number;
59
+
60
+ deletedAt: string | null;
61
+
62
+ description: string;
63
+
64
+ endsAt: string;
65
+
66
+ extendedDurationInSeconds: number | null;
67
+
68
+ hideBids: boolean;
69
+
70
+ /**
71
+ * Schema representing a loyalty currency
72
+ */
73
+ loyaltyCurrency: Data.LoyaltyCurrency | null;
74
+
75
+ loyaltyCurrencyId: string | null;
76
+
77
+ minBidAmount: string;
78
+
79
+ minBidIncrement: string | null;
80
+
81
+ mintingContractId: string;
82
+
83
+ name: string;
84
+
85
+ network: 'ethereum' | 'zksync';
86
+
87
+ organizationId: string;
88
+
89
+ reservePrice: string | null;
90
+
91
+ signature: string;
92
+
93
+ startsAt: string;
94
+
95
+ status: 'in_progress' | 'completed' | 'cancelled';
96
+
97
+ type: 'first_price' | 'second_price' | 'english';
98
+
99
+ updatedAt: string;
100
+
101
+ userId: string;
102
+
103
+ websiteId: string;
104
+ }
105
+
106
+ export namespace Data {
107
+ /**
108
+ * Schema representing an auction bid
109
+ */
110
+ export interface AuctionBid {
111
+ id: string;
112
+
113
+ amount: string;
114
+
115
+ createdAt: string;
116
+ }
117
+
118
+ export interface AuctionItem {
119
+ id: string;
120
+
121
+ /**
122
+ * Schema representing a minting contract asset
123
+ */
124
+ mintingContractAsset: AuctionItem.MintingContractAsset;
125
+
126
+ quantity: number;
127
+
128
+ sortId: number;
129
+ }
130
+
131
+ export namespace AuctionItem {
132
+ /**
133
+ * Schema representing a minting contract asset
134
+ */
135
+ export interface MintingContractAsset {
136
+ id: string;
137
+ }
138
+ }
139
+
140
+ /**
141
+ * Schema representing a loyalty currency
142
+ */
143
+ export interface LoyaltyCurrency {
144
+ id: string;
145
+
146
+ decimals: number;
147
+
148
+ imageUrl: string | null;
149
+
150
+ name: string;
151
+
152
+ symbol: string;
153
+ }
154
+ }
155
+ }
156
+
157
+ export interface AuctionListAuctionBidsParams {
158
+ /**
159
+ * The bid ID
160
+ */
161
+ id?: string;
162
+
163
+ /**
164
+ * ID of the auction
165
+ */
166
+ auctionId?: string;
167
+
168
+ /**
169
+ * Maximum number of bids to return
170
+ */
171
+ limit?: number;
172
+
173
+ /**
174
+ * ID of the organization
175
+ */
176
+ organizationId?: string;
177
+
178
+ /**
179
+ * Pagination cursor to start after a specific bid ID
180
+ */
181
+ startingAfter?: string;
182
+
183
+ /**
184
+ * Status of the bid
185
+ */
186
+ status?: 'submitted' | 'accepted' | 'rejected' | 'fulfilled';
187
+
188
+ /**
189
+ * ID of the user who made the bid
190
+ */
191
+ userId?: string;
192
+
193
+ /**
194
+ * Wallet address of the bidder
195
+ */
196
+ walletAddress?: string;
197
+
198
+ /**
199
+ * ID of the website
200
+ */
201
+ websiteId?: string;
202
+ }
203
+
204
+ export declare namespace Auctions {
205
+ export {
206
+ type AuctionListAuctionsResponse as AuctionListAuctionsResponse,
207
+ type AuctionListAuctionBidsParams as AuctionListAuctionBidsParams,
208
+ };
209
+ }
@@ -0,0 +1,69 @@
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 Auth extends APIResource {
8
+ /**
9
+ * This endpoint allows you to connect your Twitter account to a Snag account
10
+ */
11
+ connectAuth(
12
+ authType: 'twitter' | 'discord' | 'telegram' | 'epic' | 'steam',
13
+ query?: AuthConnectAuthParams,
14
+ options?: Core.RequestOptions,
15
+ ): Core.APIPromise<AuthConnectAuthResponse>;
16
+ connectAuth(
17
+ authType: 'twitter' | 'discord' | 'telegram' | 'epic' | 'steam',
18
+ options?: Core.RequestOptions,
19
+ ): Core.APIPromise<AuthConnectAuthResponse>;
20
+ connectAuth(
21
+ authType: 'twitter' | 'discord' | 'telegram' | 'epic' | 'steam',
22
+ query: AuthConnectAuthParams | Core.RequestOptions = {},
23
+ options?: Core.RequestOptions,
24
+ ): Core.APIPromise<AuthConnectAuthResponse> {
25
+ if (isRequestOptions(query)) {
26
+ return this.connectAuth(authType, {}, query);
27
+ }
28
+ return this._client.get(`/api/${authType}/auth`, { query, ...options });
29
+ }
30
+ }
31
+
32
+ /**
33
+ * Schema for a connect social auth response schema
34
+ */
35
+ export interface AuthConnectAuthResponse {
36
+ /**
37
+ * The URL to redirect to
38
+ */
39
+ url: string;
40
+ }
41
+
42
+ export interface AuthConnectAuthParams {
43
+ /**
44
+ * The redirect URL where the user will land after completing the auth
45
+ */
46
+ redirect?: string;
47
+
48
+ /**
49
+ * The type of response to return
50
+ */
51
+ responseType?: 'redirect' | 'json';
52
+
53
+ /**
54
+ * The ID of the user
55
+ */
56
+ userId?: string;
57
+
58
+ /**
59
+ * The ID of the website
60
+ */
61
+ websiteId?: string;
62
+ }
63
+
64
+ export declare namespace Auth {
65
+ export {
66
+ type AuthConnectAuthResponse as AuthConnectAuthResponse,
67
+ type AuthConnectAuthParams as AuthConnectAuthParams,
68
+ };
69
+ }
@@ -1,19 +1,30 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export {
4
- Assets,
5
- type AssetCreateResponse,
6
- type AssetGetAuctionsResponse,
7
- type AssetCreateParams,
8
- } from './assets/assets';
9
- export { AuctionBids, type AuctionBidListParams } from './auction-bids';
10
- export { Drip } from './drip/drip';
3
+ export { Assets, type AssetCreateAssetResponse, type AssetCreateAssetParams } from './assets';
4
+ export { Auctions, type AuctionListAuctionsResponse, type AuctionListAuctionBidsParams } from './auctions';
5
+ export { Auth, type AuthConnectAuthResponse, type AuthConnectAuthParams } from './auth';
11
6
  export { Loyalty } from './loyalty/loyalty';
12
- export { Users } from './users/users';
7
+ export { Minting, type MintingGetAssetsResponse, type MintingGetAssetsParams } from './minting';
8
+ export {
9
+ Referral,
10
+ type ReferralCreateCodeResponse,
11
+ type ReferralCreateCodeParams,
12
+ } from './referral/referral';
13
+ export {
14
+ Users,
15
+ type UserListResponse,
16
+ type UserConnectResponse,
17
+ type UserCountResponse,
18
+ type UserDisconnectResponse,
19
+ type UserListParams,
20
+ type UserConnectParams,
21
+ type UserCountParams,
22
+ type UserDisconnectParams,
23
+ } from './users/users';
13
24
  export {
14
25
  Websites,
15
26
  type WebsiteCreateResponse,
16
27
  type WebsiteListResponse,
17
28
  type WebsiteCreateParams,
18
29
  type WebsiteListParams,
19
- } from './websites';
30
+ } from './websites/websites';
@@ -1,5 +1,254 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../resource';
4
+ import { isRequestOptions } from '../../core';
5
+ import * as Core from '../../core';
4
6
 
5
- export class Accounts extends APIResource {}
7
+ export class Accounts extends APIResource {
8
+ /**
9
+ * Get loyalty accounts
10
+ */
11
+ list(query?: AccountListParams, options?: Core.RequestOptions): Core.APIPromise<AccountListResponse>;
12
+ list(options?: Core.RequestOptions): Core.APIPromise<AccountListResponse>;
13
+ list(
14
+ query: AccountListParams | Core.RequestOptions = {},
15
+ options?: Core.RequestOptions,
16
+ ): Core.APIPromise<AccountListResponse> {
17
+ if (isRequestOptions(query)) {
18
+ return this.list({}, query);
19
+ }
20
+ return this._client.get('/api/loyalty/accounts', { query, ...options });
21
+ }
22
+
23
+ /**
24
+ * Returns the user's rank determined by their loyalty points for the specified
25
+ * loyalty currency. This can be a slow operation for large organizations. We
26
+ * recommend caching when possible.
27
+ */
28
+ retrieveRank(
29
+ id: string,
30
+ query: AccountRetrieveRankParams,
31
+ options?: Core.RequestOptions,
32
+ ): Core.APIPromise<AccountRetrieveRankResponse> {
33
+ return this._client.get(`/api/loyalty/accounts/${id}/rank`, { query, ...options });
34
+ }
35
+ }
36
+
37
+ /**
38
+ * Schema for the response of getting loyalty accounts
39
+ */
40
+ export interface AccountListResponse {
41
+ /**
42
+ * Array of loyalty accounts
43
+ */
44
+ data: Array<AccountListResponse.Data>;
45
+
46
+ /**
47
+ * Indicates if there is a next page of results
48
+ */
49
+ hasNextPage: boolean;
50
+
51
+ /**
52
+ * Optional message
53
+ */
54
+ message?: string;
55
+ }
56
+
57
+ export namespace AccountListResponse {
58
+ /**
59
+ * Schema for a loyalty account
60
+ */
61
+ export interface Data {
62
+ /**
63
+ * Unique identifier for the loyalty account
64
+ */
65
+ id: string;
66
+
67
+ /**
68
+ * Unique identifier for the loyalty currency
69
+ */
70
+ loyaltyCurrencyId: string;
71
+
72
+ /**
73
+ * User associated with the loyalty account
74
+ */
75
+ user: Data.User | null;
76
+
77
+ /**
78
+ * Unique identifier for the user
79
+ */
80
+ userId: string | null;
81
+
82
+ /**
83
+ * Balance amount in the loyalty account
84
+ */
85
+ amount?: unknown;
86
+
87
+ /**
88
+ * Version number used for optimistic locking
89
+ */
90
+ lockVersion?: unknown;
91
+ }
92
+
93
+ export namespace Data {
94
+ /**
95
+ * Schema for a user
96
+ */
97
+ export interface User {
98
+ /**
99
+ * Unique identifier for the user
100
+ */
101
+ id: string;
102
+
103
+ /**
104
+ * Array of metadata associated with the user
105
+ */
106
+ userMetadata: Array<User.UserMetadata>;
107
+
108
+ /**
109
+ * Ethereum wallet address of the user
110
+ */
111
+ walletAddress: string | null;
112
+ }
113
+
114
+ export namespace User {
115
+ /**
116
+ * Schema for user metadata
117
+ */
118
+ export interface UserMetadata {
119
+ /**
120
+ * Discord username associated with the user
121
+ */
122
+ discordUser: string | null;
123
+
124
+ /**
125
+ * Display name of the user
126
+ */
127
+ displayName: string | null;
128
+
129
+ /**
130
+ * URL of the user's logo
131
+ */
132
+ logoUrl: string | null;
133
+
134
+ /**
135
+ * Twitter username associated with the user
136
+ */
137
+ twitterUser: string | null;
138
+
139
+ /**
140
+ * Identifier for the wallet group
141
+ */
142
+ walletGroupIdentifier: string | null;
143
+ }
144
+ }
145
+ }
146
+ }
147
+
148
+ /**
149
+ * Schema for a get account rank response
150
+ */
151
+ export interface AccountRetrieveRankResponse {
152
+ /**
153
+ * Rank of the user
154
+ */
155
+ rank: number;
156
+ }
157
+
158
+ export interface AccountListParams {
159
+ /**
160
+ * Discord username to filter accounts by
161
+ */
162
+ discordUser?: string;
163
+
164
+ /**
165
+ * External identifier for the user
166
+ */
167
+ externalIdentifier?: string;
168
+
169
+ /**
170
+ * Maximum number of accounts to return
171
+ */
172
+ limit?: number;
173
+
174
+ /**
175
+ * Unique identifier for the loyalty currency
176
+ */
177
+ loyaltyCurrencyId?: string;
178
+
179
+ /**
180
+ * Order the accounts by amount in ascending or descending order
181
+ */
182
+ 'orderBy[amount]'?: 'asc' | 'desc';
183
+
184
+ /**
185
+ * Unique identifier for the organization to filter by
186
+ */
187
+ organizationId?: string;
188
+
189
+ /**
190
+ * Pagination cursor to start after a specific account ID
191
+ */
192
+ startingAfter?: string;
193
+
194
+ /**
195
+ * Twitter username to filter accounts by
196
+ */
197
+ twitterUser?: string;
198
+
199
+ /**
200
+ * External identifier for the user group controlled by you
201
+ */
202
+ userGroupExternalIdentifier?: string;
203
+
204
+ /**
205
+ * Unique identifier for the user group
206
+ */
207
+ userGroupId?: string;
208
+
209
+ /**
210
+ * User ID(s) to filter accounts by
211
+ */
212
+ userId?: string | Array<string>;
213
+
214
+ /**
215
+ * Wallet address(es) to filter accounts by
216
+ */
217
+ walletAddress?: string | Array<string>;
218
+
219
+ /**
220
+ * Wallet group identifier to filter accounts by
221
+ */
222
+ walletGroupIdentifier?: string;
223
+
224
+ /**
225
+ * Unique identifier for the website to filter by
226
+ */
227
+ websiteId?: string;
228
+ }
229
+
230
+ export interface AccountRetrieveRankParams {
231
+ /**
232
+ * UUID of the loyalty currency
233
+ */
234
+ loyaltyCurrencyId: string;
235
+
236
+ /**
237
+ * UUID of the organization
238
+ */
239
+ organizationId: string;
240
+
241
+ /**
242
+ * UUID of the website
243
+ */
244
+ websiteId: string;
245
+ }
246
+
247
+ export declare namespace Accounts {
248
+ export {
249
+ type AccountListResponse as AccountListResponse,
250
+ type AccountRetrieveRankResponse as AccountRetrieveRankResponse,
251
+ type AccountListParams as AccountListParams,
252
+ type AccountRetrieveRankParams as AccountRetrieveRankParams,
253
+ };
254
+ }
@@ -1020,6 +1020,11 @@ export namespace BadgeCreateParams {
1020
1020
  */
1021
1021
  loyaltyLeaderboardViewIds?: Array<string>;
1022
1022
 
1023
+ /**
1024
+ * UUID of the loyalty rule chain (optional, converted to lowercase)
1025
+ */
1026
+ loyaltyRuleChainId?: string;
1027
+
1023
1028
  /**
1024
1029
  * Array of UUIDs of the rule group (optional, converted to lowercase)
1025
1030
  */
@@ -19,6 +19,9 @@ export class Currencies extends APIResource {
19
19
  }
20
20
  }
21
21
 
22
+ /**
23
+ * Schema for a loyalty currency
24
+ */
22
25
  export interface CurrencyCreateResponse {
23
26
  /**
24
27
  * Unique identifier for the loyalty currency
@@ -118,6 +121,9 @@ export interface CurrencyListResponse {
118
121
  }
119
122
 
120
123
  export namespace CurrencyListResponse {
124
+ /**
125
+ * Schema for a loyalty currency
126
+ */
121
127
  export interface Data {
122
128
  /**
123
129
  * Unique identifier for the loyalty currency
@@ -1,6 +1,12 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { Accounts } from './accounts';
3
+ export {
4
+ Accounts,
5
+ type AccountListResponse,
6
+ type AccountRetrieveRankResponse,
7
+ type AccountListParams,
8
+ type AccountRetrieveRankParams,
9
+ } from './accounts';
4
10
  export {
5
11
  Badges,
6
12
  type BadgeCreateResponse,
@@ -29,18 +35,40 @@ export {
29
35
  type MultiplierUpdateResponse,
30
36
  type MultiplierListResponse,
31
37
  type MultiplierDeleteResponse,
38
+ type MultiplierDeleteByExternalIDResponse,
32
39
  type MultiplierCreateParams,
33
40
  type MultiplierUpdateParams,
34
41
  type MultiplierListParams,
35
- type MultiplierDeleteParams,
42
+ type MultiplierDeleteByExternalIDParams,
36
43
  } from './multipliers';
44
+ export {
45
+ Questions,
46
+ type QuestionCreateResponse,
47
+ type QuestionUpdateResponse,
48
+ type QuestionListResponse,
49
+ type QuestionCreateParams,
50
+ type QuestionUpdateParams,
51
+ type QuestionListParams,
52
+ } from './questions';
53
+ export {
54
+ QuestionsResponses,
55
+ type QuestionsResponseListResponse,
56
+ type QuestionsResponseSubmitResponse,
57
+ type QuestionsResponseListParams,
58
+ type QuestionsResponseSubmitParams,
59
+ } from './questions-responses';
37
60
  export {
38
61
  RuleEdits,
39
- type RuleEditRetrieveResponse,
62
+ type RuleEditListResponse,
40
63
  type RuleEditRestoreResponse,
41
- type RuleEditRetrieveParams,
64
+ type RuleEditListParams,
42
65
  type RuleEditRestoreParams,
43
66
  } from './rule-edits';
67
+ export {
68
+ RuleGroups,
69
+ type RuleGroupGetRuleGroupsResponse,
70
+ type RuleGroupGetRuleGroupsParams,
71
+ } from './rule-groups';
44
72
  export {
45
73
  Rules,
46
74
  type RuleCreateResponse,
@@ -48,19 +76,17 @@ export {
48
76
  type RuleListResponse,
49
77
  type RuleDeleteResponse,
50
78
  type RuleCompleteResponse,
51
- type RuleStatusResponse,
79
+ type RuleGetStatusResponse,
52
80
  type RuleCreateParams,
53
81
  type RuleUpdateParams,
54
82
  type RuleListParams,
55
83
  type RuleCompleteParams,
56
- type RuleStatusParams,
84
+ type RuleGetStatusParams,
57
85
  } from './rules';
58
86
  export {
59
- TransactionEntries,
60
- type TransactionEntryListResponse,
61
- type TransactionEntryCreateTransactionResponse,
62
- type TransactionEntryListRuleGroupsResponse,
63
- type TransactionEntryListParams,
64
- type TransactionEntryCreateTransactionParams,
65
- type TransactionEntryListRuleGroupsParams,
66
- } from './transaction-entries/index';
87
+ Transactions,
88
+ type TransactionCreateTransactionResponse,
89
+ type TransactionGetTransactionEntriesResponse,
90
+ type TransactionCreateTransactionParams,
91
+ type TransactionGetTransactionEntriesParams,
92
+ } from './transactions';