@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
@@ -1,203 +1,2 @@
1
- import { APIResource } from "../resource.js";
2
- import * as Core from "../core.js";
3
- export declare class Websites extends APIResource {
4
- /**
5
- * Creates a new website
6
- */
7
- create(body: WebsiteCreateParams, options?: Core.RequestOptions): Core.APIPromise<WebsiteCreateResponse>;
8
- /**
9
- * Returns a list of websites. Includes optional query parameters for filtering and
10
- * pagination.
11
- */
12
- list(query?: WebsiteListParams, options?: Core.RequestOptions): Core.APIPromise<WebsiteListResponse>;
13
- list(options?: Core.RequestOptions): Core.APIPromise<WebsiteListResponse>;
14
- }
15
- /**
16
- * Schema representing a website
17
- */
18
- export interface WebsiteCreateResponse {
19
- /**
20
- * Website ID
21
- */
22
- id: string;
23
- /**
24
- * Counts of related entities
25
- */
26
- _count: WebsiteCreateResponse._Count;
27
- /**
28
- * Collections associated with the website
29
- */
30
- collections: Array<WebsiteCreateResponse.Collection>;
31
- /**
32
- * Website name
33
- */
34
- name: string;
35
- /**
36
- * Date when terms were signed
37
- */
38
- termsSignedAt: string | null;
39
- }
40
- export declare namespace WebsiteCreateResponse {
41
- /**
42
- * Counts of related entities
43
- */
44
- interface _Count {
45
- /**
46
- * Count of minting contract assets
47
- */
48
- mintingContractAssets: number;
49
- }
50
- /**
51
- * Schema representing a collection
52
- */
53
- interface Collection {
54
- /**
55
- * Collection ID
56
- */
57
- id: string;
58
- /**
59
- * URL of the collection image
60
- */
61
- imageUrl: string | null;
62
- /**
63
- * Collection name
64
- */
65
- name: string;
66
- /**
67
- * Royalty fee percentage
68
- */
69
- royaltyFee: number;
70
- /**
71
- * Address to receive royalty fees
72
- */
73
- royaltyFeeAddress: string;
74
- }
75
- }
76
- /**
77
- * Response schema for fetching websites
78
- */
79
- export interface WebsiteListResponse {
80
- /**
81
- * Array of websites
82
- */
83
- data: Array<WebsiteListResponse.Data>;
84
- /**
85
- * Indicates if more pages are available
86
- */
87
- hasNextPage: boolean;
88
- }
89
- export declare namespace WebsiteListResponse {
90
- /**
91
- * Schema representing a website
92
- */
93
- interface Data {
94
- /**
95
- * Website ID
96
- */
97
- id: string;
98
- /**
99
- * Counts of related entities
100
- */
101
- _count: Data._Count;
102
- /**
103
- * Collections associated with the website
104
- */
105
- collections: Array<Data.Collection>;
106
- /**
107
- * Website name
108
- */
109
- name: string;
110
- /**
111
- * Date when terms were signed
112
- */
113
- termsSignedAt: string | null;
114
- }
115
- namespace Data {
116
- /**
117
- * Counts of related entities
118
- */
119
- interface _Count {
120
- /**
121
- * Count of minting contract assets
122
- */
123
- mintingContractAssets: number;
124
- }
125
- /**
126
- * Schema representing a collection
127
- */
128
- interface Collection {
129
- /**
130
- * Collection ID
131
- */
132
- id: string;
133
- /**
134
- * URL of the collection image
135
- */
136
- imageUrl: string | null;
137
- /**
138
- * Collection name
139
- */
140
- name: string;
141
- /**
142
- * Royalty fee percentage
143
- */
144
- royaltyFee: number;
145
- /**
146
- * Address to receive royalty fees
147
- */
148
- royaltyFeeAddress: string;
149
- }
150
- }
151
- }
152
- export interface WebsiteCreateParams {
153
- /**
154
- * Name of the website
155
- */
156
- name: string;
157
- /**
158
- * Discord URL of the website account
159
- */
160
- discordUrl?: string;
161
- /**
162
- * Home URL of the official website
163
- */
164
- homeUrl?: string;
165
- /**
166
- * Instagram username of the website account
167
- */
168
- instagramUsername?: string;
169
- /**
170
- * Organization ID for which this website is being created
171
- */
172
- organizationId?: string;
173
- /**
174
- * Telegram URL of the website account
175
- */
176
- telegramUrl?: string;
177
- /**
178
- * Twitter username of the website account
179
- */
180
- twitterUsername?: string;
181
- }
182
- export interface WebsiteListParams {
183
- /**
184
- * Number of items to return
185
- */
186
- limit?: number;
187
- /**
188
- * Filter by name
189
- */
190
- name?: string;
191
- /**
192
- * Filter by organization ID
193
- */
194
- organizationId?: string;
195
- /**
196
- * Pagination cursor, start after this ID
197
- */
198
- startingAfter?: string;
199
- }
200
- export declare namespace Websites {
201
- export { type WebsiteCreateResponse as WebsiteCreateResponse, type WebsiteListResponse as WebsiteListResponse, type WebsiteCreateParams as WebsiteCreateParams, type WebsiteListParams as WebsiteListParams, };
202
- }
1
+ export * from "./websites/index.js";
203
2
  //# sourceMappingURL=websites.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"websites.d.ts","sourceRoot":"","sources":["../src/resources/websites.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"websites.d.ts","sourceRoot":"","sources":["../src/resources/websites.ts"],"names":[],"mappings":"AAEA,cAAc,kBAAkB,CAAC"}
@@ -1,22 +1,19 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Websites = void 0;
5
- const resource_1 = require("../resource.js");
6
- const core_1 = require("../core.js");
7
- class Websites extends resource_1.APIResource {
8
- /**
9
- * Creates a new website
10
- */
11
- create(body, options) {
12
- return this._client.post('/api/websites', { body, ...options });
13
- }
14
- list(query = {}, options) {
15
- if ((0, core_1.isRequestOptions)(query)) {
16
- return this.list({}, query);
17
- }
18
- return this._client.get('/api/websites', { query, ...options });
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
19
8
  }
20
- }
21
- exports.Websites = Websites;
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ __exportStar(require("./websites/index.js"), exports);
22
19
  //# sourceMappingURL=websites.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"websites.js","sourceRoot":"","sources":["../src/resources/websites.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAG3C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAQD,IAAI,CACF,QAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AAvBD,4BAuBC"}
1
+ {"version":3,"file":"websites.js","sourceRoot":"","sources":["../src/resources/websites.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;AAEtF,sDAAiC"}
@@ -1,18 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../resource.mjs";
3
- import { isRequestOptions } from "../core.mjs";
4
- export class Websites extends APIResource {
5
- /**
6
- * Creates a new website
7
- */
8
- create(body, options) {
9
- return this._client.post('/api/websites', { body, ...options });
10
- }
11
- list(query = {}, options) {
12
- if (isRequestOptions(query)) {
13
- return this.list({}, query);
14
- }
15
- return this._client.get('/api/websites', { query, ...options });
16
- }
17
- }
2
+ export * from "./websites/index.mjs";
18
3
  //# sourceMappingURL=websites.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"websites.mjs","sourceRoot":"","sources":["../src/resources/websites.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAQD,IAAI,CACF,QAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF"}
1
+ {"version":3,"file":"websites.mjs","sourceRoot":"","sources":["../src/resources/websites.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
package/resources.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./resources/index.js";
2
+ //# sourceMappingURL=resources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
package/resources.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./resources/index.js"), exports);
18
+ //# sourceMappingURL=resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.js","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAkC"}
package/resources.mjs ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./resources/index.mjs";
2
+ //# sourceMappingURL=resources.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
@@ -79,3 +79,5 @@ export function fileFromPath(path: string, options?: FileFromPathOptions): Promi
79
79
  export function fileFromPath(path: string, filename?: string, options?: FileFromPathOptions): Promise<File>;
80
80
 
81
81
  export function isFsReadStream(value: any): value is FsReadStream;
82
+
83
+ export const init: () => void;
@@ -3,7 +3,9 @@
3
3
  */
4
4
  const shims = require('./registry');
5
5
  const auto = require('@snagsolutions/sdk/_shims/auto/runtime');
6
- if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
6
+ exports.init = () => {
7
+ if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
8
+ };
7
9
  for (const property of Object.keys(shims)) {
8
10
  Object.defineProperty(exports, property, {
9
11
  get() {
@@ -11,3 +13,5 @@ for (const property of Object.keys(shims)) {
11
13
  },
12
14
  });
13
15
  }
16
+
17
+ exports.init();
@@ -3,5 +3,9 @@
3
3
  */
4
4
  import * as shims from './registry.mjs';
5
5
  import * as auto from "./auto/runtime";
6
- if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
6
+ export const init = () => {
7
+ if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
8
+ };
7
9
  export * from './registry.mjs';
10
+
11
+ init();
package/src/core.ts CHANGED
@@ -16,7 +16,12 @@ import {
16
16
  type RequestInit,
17
17
  type Response,
18
18
  type HeadersInit,
19
+ init,
19
20
  } from './_shims/index';
21
+
22
+ // try running side effects outside of _shims/index to workaround https://github.com/vercel/next.js/issues/76881
23
+ init();
24
+
20
25
  export { type Response };
21
26
  import { BlobLike, isBlobLike, isMultipartBody } from './uploads';
22
27
  export {
@@ -48,8 +53,8 @@ async function defaultParseResponse<T>(props: APIResponseProps): Promise<T> {
48
53
  }
49
54
 
50
55
  const contentType = response.headers.get('content-type');
51
- const isJSON =
52
- contentType?.includes('application/json') || contentType?.includes('application/vnd.api+json');
56
+ const mediaType = contentType?.split(';')[0]?.trim();
57
+ const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
53
58
  if (isJSON) {
54
59
  const json = await response.json();
55
60
 
@@ -395,7 +400,7 @@ export abstract class APIClient {
395
400
  !headers ? {}
396
401
  : Symbol.iterator in headers ?
397
402
  Object.fromEntries(Array.from(headers as Iterable<string[]>).map((header) => [...header]))
398
- : { ...headers }
403
+ : { ...(headers as any as Record<string, string>) }
399
404
  );
400
405
  }
401
406
 
package/src/index.ts CHANGED
@@ -6,23 +6,34 @@ import * as Core from './core';
6
6
  import * as Errors from './error';
7
7
  import * as Uploads from './uploads';
8
8
  import * as API from './resources/index';
9
- import { AuctionBidListParams, AuctionBids } from './resources/auction-bids';
9
+ import { AssetCreateAssetParams, AssetCreateAssetResponse, Assets } from './resources/assets';
10
+ import { AuctionListAuctionBidsParams, AuctionListAuctionsResponse, Auctions } from './resources/auctions';
11
+ import { Auth, AuthConnectAuthParams, AuthConnectAuthResponse } from './resources/auth';
12
+ import { Minting, MintingGetAssetsParams, MintingGetAssetsResponse } from './resources/minting';
13
+ import { Loyalty } from './resources/loyalty/loyalty';
14
+ import {
15
+ Referral,
16
+ ReferralCreateCodeParams,
17
+ ReferralCreateCodeResponse,
18
+ } from './resources/referral/referral';
19
+ import {
20
+ UserConnectParams,
21
+ UserConnectResponse,
22
+ UserCountParams,
23
+ UserCountResponse,
24
+ UserDisconnectParams,
25
+ UserDisconnectResponse,
26
+ UserListParams,
27
+ UserListResponse,
28
+ Users,
29
+ } from './resources/users/users';
10
30
  import {
11
31
  WebsiteCreateParams,
12
32
  WebsiteCreateResponse,
13
33
  WebsiteListParams,
14
34
  WebsiteListResponse,
15
35
  Websites,
16
- } from './resources/websites';
17
- import {
18
- AssetCreateParams,
19
- AssetCreateResponse,
20
- AssetGetAuctionsResponse,
21
- Assets,
22
- } from './resources/assets/assets';
23
- import { Drip } from './resources/drip/drip';
24
- import { Loyalty } from './resources/loyalty/loyalty';
25
- import { Users } from './resources/users/users';
36
+ } from './resources/websites/websites';
26
37
 
27
38
  export interface ClientOptions {
28
39
  /**
@@ -138,11 +149,13 @@ export class SnagSolutions extends Core.APIClient {
138
149
  }
139
150
 
140
151
  assets: API.Assets = new API.Assets(this);
152
+ auth: API.Auth = new API.Auth(this);
153
+ auctions: API.Auctions = new API.Auctions(this);
141
154
  users: API.Users = new API.Users(this);
142
155
  loyalty: API.Loyalty = new API.Loyalty(this);
143
- auctionBids: API.AuctionBids = new API.AuctionBids(this);
156
+ minting: API.Minting = new API.Minting(this);
157
+ referral: API.Referral = new API.Referral(this);
144
158
  websites: API.Websites = new API.Websites(this);
145
- drip: API.Drip = new API.Drip(this);
146
159
 
147
160
  protected override defaultQuery(): Core.DefaultQuery | undefined {
148
161
  return this._options.defaultQuery;
@@ -185,26 +198,59 @@ export class SnagSolutions extends Core.APIClient {
185
198
  }
186
199
 
187
200
  SnagSolutions.Assets = Assets;
201
+ SnagSolutions.Auth = Auth;
202
+ SnagSolutions.Auctions = Auctions;
188
203
  SnagSolutions.Users = Users;
189
204
  SnagSolutions.Loyalty = Loyalty;
190
- SnagSolutions.AuctionBids = AuctionBids;
205
+ SnagSolutions.Minting = Minting;
206
+ SnagSolutions.Referral = Referral;
191
207
  SnagSolutions.Websites = Websites;
192
- SnagSolutions.Drip = Drip;
193
208
  export declare namespace SnagSolutions {
194
209
  export type RequestOptions = Core.RequestOptions;
195
210
 
196
211
  export {
197
212
  Assets as Assets,
198
- type AssetCreateResponse as AssetCreateResponse,
199
- type AssetGetAuctionsResponse as AssetGetAuctionsResponse,
200
- type AssetCreateParams as AssetCreateParams,
213
+ type AssetCreateAssetResponse as AssetCreateAssetResponse,
214
+ type AssetCreateAssetParams as AssetCreateAssetParams,
201
215
  };
202
216
 
203
- export { Users as Users };
217
+ export {
218
+ Auth as Auth,
219
+ type AuthConnectAuthResponse as AuthConnectAuthResponse,
220
+ type AuthConnectAuthParams as AuthConnectAuthParams,
221
+ };
222
+
223
+ export {
224
+ Auctions as Auctions,
225
+ type AuctionListAuctionsResponse as AuctionListAuctionsResponse,
226
+ type AuctionListAuctionBidsParams as AuctionListAuctionBidsParams,
227
+ };
228
+
229
+ export {
230
+ Users as Users,
231
+ type UserListResponse as UserListResponse,
232
+ type UserConnectResponse as UserConnectResponse,
233
+ type UserCountResponse as UserCountResponse,
234
+ type UserDisconnectResponse as UserDisconnectResponse,
235
+ type UserListParams as UserListParams,
236
+ type UserConnectParams as UserConnectParams,
237
+ type UserCountParams as UserCountParams,
238
+ type UserDisconnectParams as UserDisconnectParams,
239
+ };
204
240
 
205
241
  export { Loyalty as Loyalty };
206
242
 
207
- export { AuctionBids as AuctionBids, type AuctionBidListParams as AuctionBidListParams };
243
+ export {
244
+ Minting as Minting,
245
+ type MintingGetAssetsResponse as MintingGetAssetsResponse,
246
+ type MintingGetAssetsParams as MintingGetAssetsParams,
247
+ };
248
+
249
+ export {
250
+ Referral as Referral,
251
+ type ReferralCreateCodeResponse as ReferralCreateCodeResponse,
252
+ type ReferralCreateCodeParams as ReferralCreateCodeParams,
253
+ };
208
254
 
209
255
  export {
210
256
  Websites as Websites,
@@ -213,8 +259,6 @@ export declare namespace SnagSolutions {
213
259
  type WebsiteCreateParams as WebsiteCreateParams,
214
260
  type WebsiteListParams as WebsiteListParams,
215
261
  };
216
-
217
- export { Drip as Drip };
218
262
  }
219
263
 
220
264
  export { toFile, fileFromPath } from './uploads';
@@ -0,0 +1,77 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../resource';
4
+ import * as Core from '../core';
5
+
6
+ export class Assets extends APIResource {
7
+ /**
8
+ * This endpoint enables you to upload a file to the resource. Returns a presigned
9
+ * URL and the asset's public URL. Call PUT with the file as the body to upload the
10
+ * asset using the presigned URL.
11
+ */
12
+ createAsset(
13
+ body: AssetCreateAssetParams,
14
+ options?: Core.RequestOptions,
15
+ ): Core.APIPromise<AssetCreateAssetResponse> {
16
+ return this._client.post('/api/assets', { body, ...options });
17
+ }
18
+ }
19
+
20
+ /**
21
+ * Response returned upon successful generation of the signed URL for uploading the
22
+ * file.
23
+ */
24
+ export interface AssetCreateAssetResponse {
25
+ /**
26
+ * The pre-signed URL to be used for uploading the file.
27
+ */
28
+ signedUrl: string;
29
+
30
+ /**
31
+ * The URL of the uploaded file.
32
+ */
33
+ url: string;
34
+ }
35
+
36
+ export interface AssetCreateAssetParams {
37
+ /**
38
+ * The name of the file, must match the regex pattern (converted to lowercase)
39
+ */
40
+ fileName: string;
41
+
42
+ /**
43
+ * The file path, must be a valid enum value.
44
+ */
45
+ filePath?:
46
+ | 'announcements'
47
+ | 'images'
48
+ | 'videos'
49
+ | 'banners'
50
+ | 'fonts'
51
+ | 'posts'
52
+ | 'profiles'
53
+ | 'minting'
54
+ | 'loyalty';
55
+
56
+ /**
57
+ * UUID of the organization (optional, converted to lowercase)
58
+ */
59
+ organizationId?: string;
60
+
61
+ /**
62
+ * UUID of the user (optional, converted to lowercase)
63
+ */
64
+ userId?: string;
65
+
66
+ /**
67
+ * UUID of the website (optional, converted to lowercase)
68
+ */
69
+ websiteId?: string;
70
+ }
71
+
72
+ export declare namespace Assets {
73
+ export {
74
+ type AssetCreateAssetResponse as AssetCreateAssetResponse,
75
+ type AssetCreateAssetParams as AssetCreateAssetParams,
76
+ };
77
+ }