@snagsolutions/sdk 0.1.0-alpha.15 → 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 (335) hide show
  1. package/CHANGELOG.md +23 -48
  2. package/README.md +12 -14
  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 +2 -0
  8. package/core.js.map +1 -1
  9. package/core.mjs +3 -1
  10. package/core.mjs.map +1 -1
  11. package/index.d.mts +27 -6
  12. package/index.d.ts +27 -6
  13. package/index.d.ts.map +1 -1
  14. package/index.js +29 -8
  15. package/index.js.map +1 -1
  16. package/index.mjs +29 -8
  17. package/index.mjs.map +1 -1
  18. package/package.json +1 -1
  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/auctions.js +26 -0
  28. package/resources/auctions.js.map +1 -0
  29. package/resources/auctions.mjs +22 -0
  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 +8 -1
  38. package/resources/index.d.ts.map +1 -1
  39. package/resources/index.js +17 -3
  40. package/resources/index.js.map +1 -1
  41. package/resources/index.mjs +8 -1
  42. package/resources/index.mjs.map +1 -1
  43. package/resources/{api/loyalty → loyalty}/accounts.d.ts +9 -10
  44. package/resources/loyalty/accounts.d.ts.map +1 -0
  45. package/resources/{api/loyalty → loyalty}/accounts.js +4 -4
  46. package/resources/loyalty/accounts.js.map +1 -0
  47. package/resources/{api/loyalty → loyalty}/accounts.mjs +4 -4
  48. package/resources/loyalty/accounts.mjs.map +1 -0
  49. package/resources/{api/loyalty → loyalty}/badges.d.ts +2 -2
  50. package/resources/loyalty/badges.d.ts.map +1 -0
  51. package/resources/{api/loyalty → loyalty}/badges.js +2 -2
  52. package/resources/loyalty/badges.js.map +1 -0
  53. package/resources/{api/loyalty → loyalty}/badges.mjs +2 -2
  54. package/resources/loyalty/badges.mjs.map +1 -0
  55. package/resources/{api/loyalty → loyalty}/currencies.d.ts +8 -2
  56. package/resources/loyalty/currencies.d.ts.map +1 -0
  57. package/resources/{api/loyalty → loyalty}/currencies.js +1 -1
  58. package/resources/loyalty/currencies.js.map +1 -0
  59. package/resources/{api/loyalty → loyalty}/currencies.mjs +1 -1
  60. package/resources/loyalty/currencies.mjs.map +1 -0
  61. package/resources/{api/loyalty → loyalty}/index.d.ts +4 -2
  62. package/resources/loyalty/index.d.ts.map +1 -0
  63. package/resources/{api/loyalty → loyalty}/index.js +5 -1
  64. package/resources/loyalty/index.js.map +1 -0
  65. package/resources/{api/loyalty → loyalty}/index.mjs +3 -1
  66. package/resources/loyalty/index.mjs.map +1 -0
  67. package/resources/loyalty/loyalty.d.ts +46 -0
  68. package/resources/loyalty/loyalty.d.ts.map +1 -0
  69. package/resources/{api/loyalty → loyalty}/loyalty.js +9 -20
  70. package/resources/loyalty/loyalty.js.map +1 -0
  71. package/resources/{api/loyalty → loyalty}/loyalty.mjs +9 -20
  72. package/resources/loyalty/loyalty.mjs.map +1 -0
  73. package/resources/{api/loyalty → loyalty}/multipliers.d.ts +26 -2
  74. package/resources/loyalty/multipliers.d.ts.map +1 -0
  75. package/resources/{api/loyalty → loyalty}/multipliers.js +2 -2
  76. package/resources/loyalty/multipliers.js.map +1 -0
  77. package/resources/{api/loyalty → loyalty}/multipliers.mjs +2 -2
  78. package/resources/loyalty/multipliers.mjs.map +1 -0
  79. package/resources/{api/loyalty → loyalty}/questions-responses.d.ts +2 -2
  80. package/resources/loyalty/questions-responses.d.ts.map +1 -0
  81. package/resources/{api/loyalty → loyalty}/questions-responses.js +2 -2
  82. package/resources/loyalty/questions-responses.js.map +1 -0
  83. package/resources/{api/loyalty → loyalty}/questions-responses.mjs +2 -2
  84. package/resources/loyalty/questions-responses.mjs.map +1 -0
  85. package/resources/{api/loyalty → loyalty}/questions.d.ts +2 -2
  86. package/resources/loyalty/questions.d.ts.map +1 -0
  87. package/resources/{api/loyalty → loyalty}/questions.js +1 -1
  88. package/resources/loyalty/questions.js.map +1 -0
  89. package/resources/{api/loyalty → loyalty}/questions.mjs +1 -1
  90. package/resources/loyalty/questions.mjs.map +1 -0
  91. package/resources/{api/loyalty → loyalty}/rule-edits.d.ts +2 -2
  92. package/resources/loyalty/rule-edits.d.ts.map +1 -0
  93. package/resources/{api/loyalty → loyalty}/rule-edits.js +1 -1
  94. package/resources/loyalty/rule-edits.js.map +1 -0
  95. package/resources/{api/loyalty → loyalty}/rule-edits.mjs +1 -1
  96. package/resources/loyalty/rule-edits.mjs.map +1 -0
  97. package/resources/{api/loyalty/loyalty.d.ts → loyalty/rule-groups.d.ts} +37 -285
  98. package/resources/loyalty/rule-groups.d.ts.map +1 -0
  99. package/resources/loyalty/rule-groups.js +16 -0
  100. package/resources/loyalty/rule-groups.js.map +1 -0
  101. package/resources/loyalty/rule-groups.mjs +12 -0
  102. package/resources/loyalty/rule-groups.mjs.map +1 -0
  103. package/resources/{api/loyalty → loyalty}/rules.d.ts +119 -14
  104. package/resources/loyalty/rules.d.ts.map +1 -0
  105. package/resources/{api/loyalty → loyalty}/rules.js +2 -2
  106. package/resources/loyalty/rules.js.map +1 -0
  107. package/resources/{api/loyalty → loyalty}/rules.mjs +2 -2
  108. package/resources/loyalty/rules.mjs.map +1 -0
  109. package/resources/loyalty/transactions.d.ts +248 -0
  110. package/resources/loyalty/transactions.d.ts.map +1 -0
  111. package/resources/loyalty/transactions.js +22 -0
  112. package/resources/loyalty/transactions.js.map +1 -0
  113. package/resources/loyalty/transactions.mjs +18 -0
  114. package/resources/loyalty/transactions.mjs.map +1 -0
  115. package/resources/loyalty.d.ts.map +1 -0
  116. package/resources/loyalty.js.map +1 -0
  117. package/resources/loyalty.mjs.map +1 -0
  118. package/resources/{api/minting.d.ts → minting.d.ts} +3 -3
  119. package/resources/minting.d.ts.map +1 -0
  120. package/resources/{api/minting.js → minting.js} +1 -1
  121. package/resources/minting.js.map +1 -0
  122. package/resources/{api/minting.mjs → minting.mjs} +1 -1
  123. package/resources/minting.mjs.map +1 -0
  124. package/resources/referral/index.d.ts.map +1 -0
  125. package/resources/referral/index.js.map +1 -0
  126. package/resources/referral/index.mjs.map +1 -0
  127. package/resources/{api/referral → referral}/referral.d.ts +2 -2
  128. package/resources/referral/referral.d.ts.map +1 -0
  129. package/resources/{api/referral → referral}/referral.js +2 -2
  130. package/resources/referral/referral.js.map +1 -0
  131. package/resources/{api/referral → referral}/referral.mjs +2 -2
  132. package/resources/referral/referral.mjs.map +1 -0
  133. package/resources/{api/referral → referral}/users.d.ts +2 -2
  134. package/resources/referral/users.d.ts.map +1 -0
  135. package/resources/{api/referral → referral}/users.js +1 -1
  136. package/resources/referral/users.js.map +1 -0
  137. package/resources/{api/referral → referral}/users.mjs +1 -1
  138. package/resources/referral/users.mjs.map +1 -0
  139. package/resources/referral.d.ts.map +1 -0
  140. package/resources/referral.js.map +1 -0
  141. package/resources/referral.mjs.map +1 -0
  142. package/resources/users/index.d.ts +3 -0
  143. package/resources/users/index.d.ts.map +1 -0
  144. package/resources/users/index.js.map +1 -0
  145. package/resources/users/index.mjs.map +1 -0
  146. package/resources/{api/users → users}/metadatas.d.ts +7 -2
  147. package/resources/users/metadatas.d.ts.map +1 -0
  148. package/resources/{api/users → users}/metadatas.js +2 -2
  149. package/resources/users/metadatas.js.map +1 -0
  150. package/resources/{api/users → users}/metadatas.mjs +2 -2
  151. package/resources/users/metadatas.mjs.map +1 -0
  152. package/resources/users/users.d.ts +304 -0
  153. package/resources/users/users.d.ts.map +1 -0
  154. package/resources/{api/users → users}/users.js +8 -1
  155. package/resources/users/users.js.map +1 -0
  156. package/resources/{api/users → users}/users.mjs +8 -1
  157. package/resources/users/users.mjs.map +1 -0
  158. package/resources/users.d.ts.map +1 -0
  159. package/resources/users.js.map +1 -0
  160. package/resources/users.mjs.map +1 -0
  161. package/resources/websites/index.d.ts +4 -0
  162. package/resources/websites/index.d.ts.map +1 -0
  163. package/resources/websites/index.js +11 -0
  164. package/resources/websites/index.js.map +1 -0
  165. package/resources/{api → websites}/index.mjs +0 -5
  166. package/resources/websites/index.mjs.map +1 -0
  167. package/resources/{api → websites}/website-collections.d.ts +1 -1
  168. package/resources/websites/website-collections.d.ts.map +1 -0
  169. package/resources/websites/website-collections.js.map +1 -0
  170. package/resources/websites/website-collections.mjs.map +1 -0
  171. package/resources/websites/website-user-roles.d.ts.map +1 -0
  172. package/resources/websites/website-user-roles.js.map +1 -0
  173. package/resources/websites/website-user-roles.mjs.map +1 -0
  174. package/resources/{api → websites}/websites.d.ts +8 -0
  175. package/resources/websites/websites.d.ts.map +1 -0
  176. package/resources/websites/websites.js +56 -0
  177. package/resources/websites/websites.js.map +1 -0
  178. package/resources/websites/websites.mjs +29 -0
  179. package/resources/websites/websites.mjs.map +1 -0
  180. package/resources/websites.d.ts +2 -0
  181. package/resources/websites.d.ts.map +1 -0
  182. package/resources/{api.js → websites.js} +2 -2
  183. package/resources/websites.js.map +1 -0
  184. package/resources/{api.mjs → websites.mjs} +2 -2
  185. package/resources/websites.mjs.map +1 -0
  186. package/src/_shims/index.d.ts +2 -0
  187. package/src/_shims/index.js +5 -1
  188. package/src/_shims/index.mjs +5 -1
  189. package/src/core.ts +6 -1
  190. package/src/index.ts +98 -23
  191. package/src/resources/assets.ts +77 -0
  192. package/src/resources/auctions.ts +209 -0
  193. package/src/resources/auth.ts +69 -0
  194. package/src/resources/index.ts +27 -8
  195. package/src/resources/{api/loyalty → loyalty}/accounts.ts +15 -17
  196. package/src/resources/{api/loyalty → loyalty}/badges.ts +3 -3
  197. package/src/resources/{api/loyalty → loyalty}/currencies.ts +8 -2
  198. package/src/resources/{api/loyalty → loyalty}/index.ts +15 -11
  199. package/src/resources/loyalty/loyalty.ts +225 -0
  200. package/src/resources/{api/loyalty → loyalty}/multipliers.ts +27 -3
  201. package/src/resources/{api/loyalty → loyalty}/questions-responses.ts +3 -3
  202. package/src/resources/{api/loyalty → loyalty}/questions.ts +2 -2
  203. package/src/resources/{api/loyalty → loyalty}/rule-edits.ts +2 -2
  204. package/src/resources/{api/loyalty/loyalty.ts → loyalty/rule-groups.ts} +62 -541
  205. package/src/resources/{api/loyalty → loyalty}/rules.ts +326 -183
  206. package/src/resources/loyalty/transactions.ts +332 -0
  207. package/src/resources/{api/minting.ts → minting.ts} +18 -17
  208. package/src/resources/{api/referral → referral}/referral.ts +3 -3
  209. package/src/resources/{api/referral → referral}/users.ts +2 -2
  210. package/src/resources/{api/users → users}/index.ts +2 -0
  211. package/src/resources/{api/users → users}/metadatas.ts +10 -3
  212. package/src/resources/users/users.ts +447 -0
  213. package/src/resources/websites/index.ts +22 -0
  214. package/src/resources/{api → websites}/website-collections.ts +16 -15
  215. package/src/resources/{api → websites}/websites.ts +40 -0
  216. package/src/resources/{api.ts → websites.ts} +1 -1
  217. package/src/version.ts +1 -1
  218. package/version.d.ts +1 -1
  219. package/version.js +1 -1
  220. package/version.mjs +1 -1
  221. package/resources/api/api.d.ts +0 -365
  222. package/resources/api/api.d.ts.map +0 -1
  223. package/resources/api/api.js +0 -94
  224. package/resources/api/api.js.map +0 -1
  225. package/resources/api/api.mjs +0 -67
  226. package/resources/api/api.mjs.map +0 -1
  227. package/resources/api/index.d.ts +0 -9
  228. package/resources/api/index.d.ts.map +0 -1
  229. package/resources/api/index.js +0 -21
  230. package/resources/api/index.js.map +0 -1
  231. package/resources/api/index.mjs.map +0 -1
  232. package/resources/api/loyalty/accounts.d.ts.map +0 -1
  233. package/resources/api/loyalty/accounts.js.map +0 -1
  234. package/resources/api/loyalty/accounts.mjs.map +0 -1
  235. package/resources/api/loyalty/badges.d.ts.map +0 -1
  236. package/resources/api/loyalty/badges.js.map +0 -1
  237. package/resources/api/loyalty/badges.mjs.map +0 -1
  238. package/resources/api/loyalty/currencies.d.ts.map +0 -1
  239. package/resources/api/loyalty/currencies.js.map +0 -1
  240. package/resources/api/loyalty/currencies.mjs.map +0 -1
  241. package/resources/api/loyalty/index.d.ts.map +0 -1
  242. package/resources/api/loyalty/index.js.map +0 -1
  243. package/resources/api/loyalty/index.mjs.map +0 -1
  244. package/resources/api/loyalty/loyalty.d.ts.map +0 -1
  245. package/resources/api/loyalty/loyalty.js.map +0 -1
  246. package/resources/api/loyalty/loyalty.mjs.map +0 -1
  247. package/resources/api/loyalty/multipliers.d.ts.map +0 -1
  248. package/resources/api/loyalty/multipliers.js.map +0 -1
  249. package/resources/api/loyalty/multipliers.mjs.map +0 -1
  250. package/resources/api/loyalty/questions-responses.d.ts.map +0 -1
  251. package/resources/api/loyalty/questions-responses.js.map +0 -1
  252. package/resources/api/loyalty/questions-responses.mjs.map +0 -1
  253. package/resources/api/loyalty/questions.d.ts.map +0 -1
  254. package/resources/api/loyalty/questions.js.map +0 -1
  255. package/resources/api/loyalty/questions.mjs.map +0 -1
  256. package/resources/api/loyalty/rule-edits.d.ts.map +0 -1
  257. package/resources/api/loyalty/rule-edits.js.map +0 -1
  258. package/resources/api/loyalty/rule-edits.mjs.map +0 -1
  259. package/resources/api/loyalty/rules.d.ts.map +0 -1
  260. package/resources/api/loyalty/rules.js.map +0 -1
  261. package/resources/api/loyalty/rules.mjs.map +0 -1
  262. package/resources/api/loyalty.d.ts.map +0 -1
  263. package/resources/api/loyalty.js.map +0 -1
  264. package/resources/api/loyalty.mjs.map +0 -1
  265. package/resources/api/minting.d.ts.map +0 -1
  266. package/resources/api/minting.js.map +0 -1
  267. package/resources/api/minting.mjs.map +0 -1
  268. package/resources/api/referral/index.d.ts.map +0 -1
  269. package/resources/api/referral/index.js.map +0 -1
  270. package/resources/api/referral/index.mjs.map +0 -1
  271. package/resources/api/referral/referral.d.ts.map +0 -1
  272. package/resources/api/referral/referral.js.map +0 -1
  273. package/resources/api/referral/referral.mjs.map +0 -1
  274. package/resources/api/referral/users.d.ts.map +0 -1
  275. package/resources/api/referral/users.js.map +0 -1
  276. package/resources/api/referral/users.mjs.map +0 -1
  277. package/resources/api/referral.d.ts.map +0 -1
  278. package/resources/api/referral.js.map +0 -1
  279. package/resources/api/referral.mjs.map +0 -1
  280. package/resources/api/users/index.d.ts +0 -3
  281. package/resources/api/users/index.d.ts.map +0 -1
  282. package/resources/api/users/index.js.map +0 -1
  283. package/resources/api/users/index.mjs.map +0 -1
  284. package/resources/api/users/metadatas.d.ts.map +0 -1
  285. package/resources/api/users/metadatas.js.map +0 -1
  286. package/resources/api/users/metadatas.mjs.map +0 -1
  287. package/resources/api/users/users.d.ts +0 -133
  288. package/resources/api/users/users.d.ts.map +0 -1
  289. package/resources/api/users/users.js.map +0 -1
  290. package/resources/api/users/users.mjs.map +0 -1
  291. package/resources/api/users.d.ts.map +0 -1
  292. package/resources/api/users.js.map +0 -1
  293. package/resources/api/users.mjs.map +0 -1
  294. package/resources/api/website-collections.d.ts.map +0 -1
  295. package/resources/api/website-collections.js.map +0 -1
  296. package/resources/api/website-collections.mjs.map +0 -1
  297. package/resources/api/website-user-roles.d.ts.map +0 -1
  298. package/resources/api/website-user-roles.js.map +0 -1
  299. package/resources/api/website-user-roles.mjs.map +0 -1
  300. package/resources/api/websites.d.ts.map +0 -1
  301. package/resources/api/websites.js +0 -22
  302. package/resources/api/websites.js.map +0 -1
  303. package/resources/api/websites.mjs +0 -18
  304. package/resources/api/websites.mjs.map +0 -1
  305. package/resources/api.d.ts +0 -2
  306. package/resources/api.d.ts.map +0 -1
  307. package/resources/api.js.map +0 -1
  308. package/resources/api.mjs.map +0 -1
  309. package/src/resources/api/api.ts +0 -629
  310. package/src/resources/api/index.ts +0 -51
  311. package/src/resources/api/users/users.ts +0 -203
  312. /package/resources/{api/loyalty.d.ts → loyalty.d.ts} +0 -0
  313. /package/resources/{api/loyalty.js → loyalty.js} +0 -0
  314. /package/resources/{api/loyalty.mjs → loyalty.mjs} +0 -0
  315. /package/resources/{api/referral → referral}/index.d.ts +0 -0
  316. /package/resources/{api/referral → referral}/index.js +0 -0
  317. /package/resources/{api/referral → referral}/index.mjs +0 -0
  318. /package/resources/{api/referral.d.ts → referral.d.ts} +0 -0
  319. /package/resources/{api/referral.js → referral.js} +0 -0
  320. /package/resources/{api/referral.mjs → referral.mjs} +0 -0
  321. /package/resources/{api/users → users}/index.js +0 -0
  322. /package/resources/{api/users → users}/index.mjs +0 -0
  323. /package/resources/{api/users.d.ts → users.d.ts} +0 -0
  324. /package/resources/{api/users.js → users.js} +0 -0
  325. /package/resources/{api/users.mjs → users.mjs} +0 -0
  326. /package/resources/{api → websites}/website-collections.js +0 -0
  327. /package/resources/{api → websites}/website-collections.mjs +0 -0
  328. /package/resources/{api → websites}/website-user-roles.d.ts +0 -0
  329. /package/resources/{api → websites}/website-user-roles.js +0 -0
  330. /package/resources/{api → websites}/website-user-roles.mjs +0 -0
  331. /package/src/resources/{api/loyalty.ts → loyalty.ts} +0 -0
  332. /package/src/resources/{api/referral → referral}/index.ts +0 -0
  333. /package/src/resources/{api/referral.ts → referral.ts} +0 -0
  334. /package/src/resources/{api/users.ts → users.ts} +0 -0
  335. /package/src/resources/{api → websites}/website-user-roles.ts +0 -0
package/index.d.mts CHANGED
@@ -3,10 +3,17 @@ import * as Core from "./core.js";
3
3
  import * as Errors from "./error.js";
4
4
  import * as Uploads from "./uploads.js";
5
5
  import * as API from "./resources/index.js";
6
- import { API as ApiapiAPI, APICreateAssetUploadURLParams, APICreateAssetUploadURLResponse, APIListAuctionBidsParams, APIListAuctionsResponse, APIListUsersParams, APIListUsersResponse } from "./resources/api/api.js";
6
+ import { AssetCreateAssetParams, AssetCreateAssetResponse, Assets } from "./resources/assets.js";
7
+ import { AuctionListAuctionBidsParams, AuctionListAuctionsResponse, Auctions } from "./resources/auctions.js";
8
+ import { Auth, AuthConnectAuthParams, AuthConnectAuthResponse } from "./resources/auth.js";
9
+ import { Minting, MintingGetAssetsParams, MintingGetAssetsResponse } from "./resources/minting.js";
10
+ import { Loyalty } from "./resources/loyalty/loyalty.js";
11
+ import { Referral, ReferralCreateCodeParams, ReferralCreateCodeResponse } from "./resources/referral/referral.js";
12
+ import { UserConnectParams, UserConnectResponse, UserCountParams, UserCountResponse, UserDisconnectParams, UserDisconnectResponse, UserListParams, UserListResponse, Users } from "./resources/users/users.js";
13
+ import { WebsiteCreateParams, WebsiteCreateResponse, WebsiteListParams, WebsiteListResponse, Websites } from "./resources/websites/websites.js";
7
14
  export interface ClientOptions {
8
15
  /**
9
- * Defaults to process.env['SNAG_SOLUTIONS_API_KEY'].
16
+ * API key required to authenticate with the Snag Solutions API.
10
17
  */
11
18
  apiKey?: string | undefined;
12
19
  /**
@@ -68,8 +75,8 @@ export declare class SnagSolutions extends Core.APIClient {
68
75
  /**
69
76
  * API Client for interfacing with the Snag Solutions API.
70
77
  *
71
- * @param {string | undefined} [opts.apiKey=process.env['SNAG_SOLUTIONS_API_KEY'] ?? undefined]
72
- * @param {string} [opts.baseURL=process.env['SNAG_SOLUTIONS_BASE_URL'] ?? https://api.example.com] - Override the default base URL for the API.
78
+ * @param {string | undefined} [opts.apiKey=process.env['X_API_KEY'] ?? undefined]
79
+ * @param {string} [opts.baseURL=process.env['SNAG_SOLUTIONS_BASE_URL'] ?? https://admin.snagsolutions.io/] - Override the default base URL for the API.
73
80
  * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
74
81
  * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
75
82
  * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
@@ -78,7 +85,14 @@ export declare class SnagSolutions extends Core.APIClient {
78
85
  * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
79
86
  */
80
87
  constructor({ baseURL, apiKey, ...opts }?: ClientOptions);
81
- api: API.API;
88
+ assets: API.Assets;
89
+ auth: API.Auth;
90
+ auctions: API.Auctions;
91
+ users: API.Users;
92
+ loyalty: API.Loyalty;
93
+ minting: API.Minting;
94
+ referral: API.Referral;
95
+ websites: API.Websites;
82
96
  protected defaultQuery(): Core.DefaultQuery | undefined;
83
97
  protected defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers;
84
98
  protected authHeaders(opts: Core.FinalRequestOptions): Core.Headers;
@@ -103,7 +117,14 @@ export declare class SnagSolutions extends Core.APIClient {
103
117
  }
104
118
  export declare namespace SnagSolutions {
105
119
  export type RequestOptions = Core.RequestOptions;
106
- export { ApiapiAPI as API, type APICreateAssetUploadURLResponse as APICreateAssetUploadURLResponse, type APIListAuctionsResponse as APIListAuctionsResponse, type APIListUsersResponse as APIListUsersResponse, type APICreateAssetUploadURLParams as APICreateAssetUploadURLParams, type APIListAuctionBidsParams as APIListAuctionBidsParams, type APIListUsersParams as APIListUsersParams, };
120
+ export { Assets as Assets, type AssetCreateAssetResponse as AssetCreateAssetResponse, type AssetCreateAssetParams as AssetCreateAssetParams, };
121
+ export { Auth as Auth, type AuthConnectAuthResponse as AuthConnectAuthResponse, type AuthConnectAuthParams as AuthConnectAuthParams, };
122
+ export { Auctions as Auctions, type AuctionListAuctionsResponse as AuctionListAuctionsResponse, type AuctionListAuctionBidsParams as AuctionListAuctionBidsParams, };
123
+ export { Users as Users, type UserListResponse as UserListResponse, type UserConnectResponse as UserConnectResponse, type UserCountResponse as UserCountResponse, type UserDisconnectResponse as UserDisconnectResponse, type UserListParams as UserListParams, type UserConnectParams as UserConnectParams, type UserCountParams as UserCountParams, type UserDisconnectParams as UserDisconnectParams, };
124
+ export { Loyalty as Loyalty };
125
+ export { Minting as Minting, type MintingGetAssetsResponse as MintingGetAssetsResponse, type MintingGetAssetsParams as MintingGetAssetsParams, };
126
+ export { Referral as Referral, type ReferralCreateCodeResponse as ReferralCreateCodeResponse, type ReferralCreateCodeParams as ReferralCreateCodeParams, };
127
+ export { Websites as Websites, type WebsiteCreateResponse as WebsiteCreateResponse, type WebsiteListResponse as WebsiteListResponse, type WebsiteCreateParams as WebsiteCreateParams, type WebsiteListParams as WebsiteListParams, };
107
128
  }
108
129
  export { toFile, fileFromPath } from "./uploads.js";
109
130
  export { SnagSolutionsError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.js";
package/index.d.ts CHANGED
@@ -3,10 +3,17 @@ import * as Core from "./core.js";
3
3
  import * as Errors from "./error.js";
4
4
  import * as Uploads from "./uploads.js";
5
5
  import * as API from "./resources/index.js";
6
- import { API as ApiapiAPI, APICreateAssetUploadURLParams, APICreateAssetUploadURLResponse, APIListAuctionBidsParams, APIListAuctionsResponse, APIListUsersParams, APIListUsersResponse } from "./resources/api/api.js";
6
+ import { AssetCreateAssetParams, AssetCreateAssetResponse, Assets } from "./resources/assets.js";
7
+ import { AuctionListAuctionBidsParams, AuctionListAuctionsResponse, Auctions } from "./resources/auctions.js";
8
+ import { Auth, AuthConnectAuthParams, AuthConnectAuthResponse } from "./resources/auth.js";
9
+ import { Minting, MintingGetAssetsParams, MintingGetAssetsResponse } from "./resources/minting.js";
10
+ import { Loyalty } from "./resources/loyalty/loyalty.js";
11
+ import { Referral, ReferralCreateCodeParams, ReferralCreateCodeResponse } from "./resources/referral/referral.js";
12
+ import { UserConnectParams, UserConnectResponse, UserCountParams, UserCountResponse, UserDisconnectParams, UserDisconnectResponse, UserListParams, UserListResponse, Users } from "./resources/users/users.js";
13
+ import { WebsiteCreateParams, WebsiteCreateResponse, WebsiteListParams, WebsiteListResponse, Websites } from "./resources/websites/websites.js";
7
14
  export interface ClientOptions {
8
15
  /**
9
- * Defaults to process.env['SNAG_SOLUTIONS_API_KEY'].
16
+ * API key required to authenticate with the Snag Solutions API.
10
17
  */
11
18
  apiKey?: string | undefined;
12
19
  /**
@@ -68,8 +75,8 @@ export declare class SnagSolutions extends Core.APIClient {
68
75
  /**
69
76
  * API Client for interfacing with the Snag Solutions API.
70
77
  *
71
- * @param {string | undefined} [opts.apiKey=process.env['SNAG_SOLUTIONS_API_KEY'] ?? undefined]
72
- * @param {string} [opts.baseURL=process.env['SNAG_SOLUTIONS_BASE_URL'] ?? https://api.example.com] - Override the default base URL for the API.
78
+ * @param {string | undefined} [opts.apiKey=process.env['X_API_KEY'] ?? undefined]
79
+ * @param {string} [opts.baseURL=process.env['SNAG_SOLUTIONS_BASE_URL'] ?? https://admin.snagsolutions.io/] - Override the default base URL for the API.
73
80
  * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
74
81
  * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
75
82
  * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
@@ -78,7 +85,14 @@ export declare class SnagSolutions extends Core.APIClient {
78
85
  * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
79
86
  */
80
87
  constructor({ baseURL, apiKey, ...opts }?: ClientOptions);
81
- api: API.API;
88
+ assets: API.Assets;
89
+ auth: API.Auth;
90
+ auctions: API.Auctions;
91
+ users: API.Users;
92
+ loyalty: API.Loyalty;
93
+ minting: API.Minting;
94
+ referral: API.Referral;
95
+ websites: API.Websites;
82
96
  protected defaultQuery(): Core.DefaultQuery | undefined;
83
97
  protected defaultHeaders(opts: Core.FinalRequestOptions): Core.Headers;
84
98
  protected authHeaders(opts: Core.FinalRequestOptions): Core.Headers;
@@ -103,7 +117,14 @@ export declare class SnagSolutions extends Core.APIClient {
103
117
  }
104
118
  export declare namespace SnagSolutions {
105
119
  export type RequestOptions = Core.RequestOptions;
106
- export { ApiapiAPI as API, type APICreateAssetUploadURLResponse as APICreateAssetUploadURLResponse, type APIListAuctionsResponse as APIListAuctionsResponse, type APIListUsersResponse as APIListUsersResponse, type APICreateAssetUploadURLParams as APICreateAssetUploadURLParams, type APIListAuctionBidsParams as APIListAuctionBidsParams, type APIListUsersParams as APIListUsersParams, };
120
+ export { Assets as Assets, type AssetCreateAssetResponse as AssetCreateAssetResponse, type AssetCreateAssetParams as AssetCreateAssetParams, };
121
+ export { Auth as Auth, type AuthConnectAuthResponse as AuthConnectAuthResponse, type AuthConnectAuthParams as AuthConnectAuthParams, };
122
+ export { Auctions as Auctions, type AuctionListAuctionsResponse as AuctionListAuctionsResponse, type AuctionListAuctionBidsParams as AuctionListAuctionBidsParams, };
123
+ export { Users as Users, type UserListResponse as UserListResponse, type UserConnectResponse as UserConnectResponse, type UserCountResponse as UserCountResponse, type UserDisconnectResponse as UserDisconnectResponse, type UserListParams as UserListParams, type UserConnectParams as UserConnectParams, type UserCountParams as UserCountParams, type UserDisconnectParams as UserDisconnectParams, };
124
+ export { Loyalty as Loyalty };
125
+ export { Minting as Minting, type MintingGetAssetsResponse as MintingGetAssetsResponse, type MintingGetAssetsParams as MintingGetAssetsParams, };
126
+ export { Referral as Referral, type ReferralCreateCodeResponse as ReferralCreateCodeResponse, type ReferralCreateCodeParams as ReferralCreateCodeParams, };
127
+ export { Websites as Websites, type WebsiteCreateResponse as WebsiteCreateResponse, type WebsiteListResponse as WebsiteListResponse, type WebsiteCreateParams as WebsiteCreateParams, type WebsiteListParams as WebsiteListParams, };
107
128
  }
108
129
  export { toFile, fileFromPath } from "./uploads.js";
109
130
  export { SnagSolutionsError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.js";
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,KAAK,EAAE,MAA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2B,EAC/D,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,CAAC;IAE9B,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH;AAED,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EACL,kBAAkB,EAClB,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAEjB,eAAe,aAAa,CAAC"}
package/index.js CHANGED
@@ -31,7 +31,14 @@ const Core = __importStar(require("./core.js"));
31
31
  const Errors = __importStar(require("./error.js"));
32
32
  const Uploads = __importStar(require("./uploads.js"));
33
33
  const API = __importStar(require("./resources/index.js"));
34
- const api_1 = require("./resources/api/api.js");
34
+ const assets_1 = require("./resources/assets.js");
35
+ const auctions_1 = require("./resources/auctions.js");
36
+ const auth_1 = require("./resources/auth.js");
37
+ const minting_1 = require("./resources/minting.js");
38
+ const loyalty_1 = require("./resources/loyalty/loyalty.js");
39
+ const referral_1 = require("./resources/referral/referral.js");
40
+ const users_1 = require("./resources/users/users.js");
41
+ const websites_1 = require("./resources/websites/websites.js");
35
42
  /**
36
43
  * API Client for interfacing with the Snag Solutions API.
37
44
  */
@@ -39,8 +46,8 @@ class SnagSolutions extends Core.APIClient {
39
46
  /**
40
47
  * API Client for interfacing with the Snag Solutions API.
41
48
  *
42
- * @param {string | undefined} [opts.apiKey=process.env['SNAG_SOLUTIONS_API_KEY'] ?? undefined]
43
- * @param {string} [opts.baseURL=process.env['SNAG_SOLUTIONS_BASE_URL'] ?? https://api.example.com] - Override the default base URL for the API.
49
+ * @param {string | undefined} [opts.apiKey=process.env['X_API_KEY'] ?? undefined]
50
+ * @param {string} [opts.baseURL=process.env['SNAG_SOLUTIONS_BASE_URL'] ?? https://admin.snagsolutions.io/] - Override the default base URL for the API.
44
51
  * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
45
52
  * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
46
53
  * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
@@ -48,14 +55,14 @@ class SnagSolutions extends Core.APIClient {
48
55
  * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
49
56
  * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
50
57
  */
51
- constructor({ baseURL = Core.readEnv('SNAG_SOLUTIONS_BASE_URL'), apiKey = Core.readEnv('SNAG_SOLUTIONS_API_KEY'), ...opts } = {}) {
58
+ constructor({ baseURL = Core.readEnv('SNAG_SOLUTIONS_BASE_URL'), apiKey = Core.readEnv('X_API_KEY'), ...opts } = {}) {
52
59
  if (apiKey === undefined) {
53
- throw new Errors.SnagSolutionsError("The SNAG_SOLUTIONS_API_KEY environment variable is missing or empty; either provide it, or instantiate the SnagSolutions client with an apiKey option, like new SnagSolutions({ apiKey: 'My API Key' }).");
60
+ throw new Errors.SnagSolutionsError("The X_API_KEY environment variable is missing or empty; either provide it, or instantiate the SnagSolutions client with an apiKey option, like new SnagSolutions({ apiKey: 'My API Key' }).");
54
61
  }
55
62
  const options = {
56
63
  apiKey,
57
64
  ...opts,
58
- baseURL: baseURL || `https://api.example.com`,
65
+ baseURL: baseURL || `https://admin.snagsolutions.io/`,
59
66
  };
60
67
  super({
61
68
  baseURL: options.baseURL,
@@ -64,7 +71,14 @@ class SnagSolutions extends Core.APIClient {
64
71
  maxRetries: options.maxRetries,
65
72
  fetch: options.fetch,
66
73
  });
67
- this.api = new API.API(this);
74
+ this.assets = new API.Assets(this);
75
+ this.auth = new API.Auth(this);
76
+ this.auctions = new API.Auctions(this);
77
+ this.users = new API.Users(this);
78
+ this.loyalty = new API.Loyalty(this);
79
+ this.minting = new API.Minting(this);
80
+ this.referral = new API.Referral(this);
81
+ this.websites = new API.Websites(this);
68
82
  this._options = options;
69
83
  this.apiKey = apiKey;
70
84
  }
@@ -103,7 +117,14 @@ SnagSolutions.PermissionDeniedError = Errors.PermissionDeniedError;
103
117
  SnagSolutions.UnprocessableEntityError = Errors.UnprocessableEntityError;
104
118
  SnagSolutions.toFile = Uploads.toFile;
105
119
  SnagSolutions.fileFromPath = Uploads.fileFromPath;
106
- SnagSolutions.API = api_1.API;
120
+ SnagSolutions.Assets = assets_1.Assets;
121
+ SnagSolutions.Auth = auth_1.Auth;
122
+ SnagSolutions.Auctions = auctions_1.Auctions;
123
+ SnagSolutions.Users = users_1.Users;
124
+ SnagSolutions.Loyalty = loyalty_1.Loyalty;
125
+ SnagSolutions.Minting = minting_1.Minting;
126
+ SnagSolutions.Referral = referral_1.Referral;
127
+ SnagSolutions.Websites = websites_1.Websites;
107
128
  var uploads_1 = require("./uploads.js");
108
129
  Object.defineProperty(exports, "toFile", { enumerable: true, get: function () { return uploads_1.toFile; } });
109
130
  Object.defineProperty(exports, "fileFromPath", { enumerable: true, get: function () { return uploads_1.fileFromPath; } });
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,2DAAoC;AACpC,gDAA+B;AAC/B,mDAAkC;AAClC,sDAAqC;AACrC,0DAAyC;AACzC,gDAQ6B;AAiE7B;;GAEG;AACH,MAAa,aAAc,SAAQ,IAAI,CAAC,SAAS;IAK/C;;;;;;;;;;;OAWG;IACH,YAAY,EACV,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,EACjD,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAC/C,GAAG,IAAI,KACU,EAAE;QACnB,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM,IAAI,MAAM,CAAC,kBAAkB,CACjC,0MAA0M,CAC3M,CAAC;SACH;QAED,MAAM,OAAO,GAAkB;YAC7B,MAAM;YACN,GAAG,IAAI;YACP,OAAO,EAAE,OAAO,IAAI,yBAAyB;SAC9C,CAAC;QAEF,KAAK,CAAC;YACJ,OAAO,EAAE,OAAO,CAAC,OAAQ;YACzB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC,cAAc;YAChD,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;QAOL,QAAG,GAAY,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAL/B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QAExB,IA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AAChC,aAAa,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AAClC,aAAa,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AAyDlC,wCAAiD;AAAxC,iGAAA,MAAM,OAAA;AAAE,uGAAA,YAAY,OAAA;AAC7B,oCAciB;AAbf,2GAAA,kBAAkB,OAAA;AAClB,iGAAA,QAAQ,OAAA;AACR,2GAAA,kBAAkB,OAAA;AAClB,kHAAA,yBAAyB,OAAA;AACzB,0GAAA,iBAAiB,OAAA;AACjB,sGAAA,aAAa,OAAA;AACb,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,4GAAA,mBAAmB,OAAA;AACnB,4GAAA,mBAAmB,OAAA;AACnB,8GAAA,qBAAqB,OAAA;AACrB,iHAAA,wBAAwB,OAAA;AAG1B,kBAAe,aAAa,CAAC"}
package/index.mjs CHANGED
@@ -5,7 +5,14 @@ import * as Core from "./core.mjs";
5
5
  import * as Errors from "./error.mjs";
6
6
  import * as Uploads from "./uploads.mjs";
7
7
  import * as API from "./resources/index.mjs";
8
- import { API as ApiapiAPI, } from "./resources/api/api.mjs";
8
+ import { Assets } from "./resources/assets.mjs";
9
+ import { Auctions } from "./resources/auctions.mjs";
10
+ import { Auth } from "./resources/auth.mjs";
11
+ import { Minting } from "./resources/minting.mjs";
12
+ import { Loyalty } from "./resources/loyalty/loyalty.mjs";
13
+ import { Referral, } from "./resources/referral/referral.mjs";
14
+ import { Users, } from "./resources/users/users.mjs";
15
+ import { Websites, } from "./resources/websites/websites.mjs";
9
16
  /**
10
17
  * API Client for interfacing with the Snag Solutions API.
11
18
  */
@@ -13,8 +20,8 @@ export class SnagSolutions extends Core.APIClient {
13
20
  /**
14
21
  * API Client for interfacing with the Snag Solutions API.
15
22
  *
16
- * @param {string | undefined} [opts.apiKey=process.env['SNAG_SOLUTIONS_API_KEY'] ?? undefined]
17
- * @param {string} [opts.baseURL=process.env['SNAG_SOLUTIONS_BASE_URL'] ?? https://api.example.com] - Override the default base URL for the API.
23
+ * @param {string | undefined} [opts.apiKey=process.env['X_API_KEY'] ?? undefined]
24
+ * @param {string} [opts.baseURL=process.env['SNAG_SOLUTIONS_BASE_URL'] ?? https://admin.snagsolutions.io/] - Override the default base URL for the API.
18
25
  * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
19
26
  * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
20
27
  * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
@@ -22,14 +29,14 @@ export class SnagSolutions extends Core.APIClient {
22
29
  * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
23
30
  * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
24
31
  */
25
- constructor({ baseURL = Core.readEnv('SNAG_SOLUTIONS_BASE_URL'), apiKey = Core.readEnv('SNAG_SOLUTIONS_API_KEY'), ...opts } = {}) {
32
+ constructor({ baseURL = Core.readEnv('SNAG_SOLUTIONS_BASE_URL'), apiKey = Core.readEnv('X_API_KEY'), ...opts } = {}) {
26
33
  if (apiKey === undefined) {
27
- throw new Errors.SnagSolutionsError("The SNAG_SOLUTIONS_API_KEY environment variable is missing or empty; either provide it, or instantiate the SnagSolutions client with an apiKey option, like new SnagSolutions({ apiKey: 'My API Key' }).");
34
+ throw new Errors.SnagSolutionsError("The X_API_KEY environment variable is missing or empty; either provide it, or instantiate the SnagSolutions client with an apiKey option, like new SnagSolutions({ apiKey: 'My API Key' }).");
28
35
  }
29
36
  const options = {
30
37
  apiKey,
31
38
  ...opts,
32
- baseURL: baseURL || `https://api.example.com`,
39
+ baseURL: baseURL || `https://admin.snagsolutions.io/`,
33
40
  };
34
41
  super({
35
42
  baseURL: options.baseURL,
@@ -38,7 +45,14 @@ export class SnagSolutions extends Core.APIClient {
38
45
  maxRetries: options.maxRetries,
39
46
  fetch: options.fetch,
40
47
  });
41
- this.api = new API.API(this);
48
+ this.assets = new API.Assets(this);
49
+ this.auth = new API.Auth(this);
50
+ this.auctions = new API.Auctions(this);
51
+ this.users = new API.Users(this);
52
+ this.loyalty = new API.Loyalty(this);
53
+ this.minting = new API.Minting(this);
54
+ this.referral = new API.Referral(this);
55
+ this.websites = new API.Websites(this);
42
56
  this._options = options;
43
57
  this.apiKey = apiKey;
44
58
  }
@@ -76,7 +90,14 @@ SnagSolutions.PermissionDeniedError = Errors.PermissionDeniedError;
76
90
  SnagSolutions.UnprocessableEntityError = Errors.UnprocessableEntityError;
77
91
  SnagSolutions.toFile = Uploads.toFile;
78
92
  SnagSolutions.fileFromPath = Uploads.fileFromPath;
79
- SnagSolutions.API = ApiapiAPI;
93
+ SnagSolutions.Assets = Assets;
94
+ SnagSolutions.Auth = Auth;
95
+ SnagSolutions.Auctions = Auctions;
96
+ SnagSolutions.Users = Users;
97
+ SnagSolutions.Loyalty = Loyalty;
98
+ SnagSolutions.Minting = Minting;
99
+ SnagSolutions.Referral = Referral;
100
+ SnagSolutions.Websites = Websites;
80
101
  export { toFile, fileFromPath } from "./uploads.mjs";
81
102
  export { SnagSolutionsError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.mjs";
82
103
  export default SnagSolutions;
package/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,KAAK,EAAE;OACP,KAAK,IAAI;OACT,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EACL,GAAG,IAAI,SAAS,GAOjB;AAiED;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,IAAI,CAAC,SAAS;IAK/C;;;;;;;;;;;OAWG;IACH,YAAY,EACV,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAA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AmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,mCAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACrD,sCAAwB,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAE3D,oBAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AACxB,0BAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AAG7C,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC;AAC9B,aAAa,CAAC,IAAI,GAAG,IAAI,CAAC;AAC1B,aAAa,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAClC,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC;AAC5B,aAAa,CAAC,OAAO,GAAG,OAAO,CAAC;AAChC,aAAa,CAAC,OAAO,GAAG,OAAO,CAAC;AAChC,aAAa,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAClC,aAAa,CAAC,QAAQ,GAAG,QAAQ,CAAC;OAyD3B,EAAE,MAAM,EAAE,YAAY,EAAE;OACxB,EACL,kBAAkB,EAClB,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB;AAED,eAAe,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snagsolutions/sdk",
3
- "version": "0.1.0-alpha.15",
3
+ "version": "0.1.0-alpha.16",
4
4
  "description": "The official TypeScript library for the Snag Solutions API",
5
5
  "author": "Snag Solutions <dev-feedback@snag-solutions.com>",
6
6
  "types": "./index.d.ts",
@@ -0,0 +1,50 @@
1
+ import { APIResource } from "../resource.js";
2
+ import * as Core from "../core.js";
3
+ export declare class Assets extends APIResource {
4
+ /**
5
+ * This endpoint enables you to upload a file to the resource. Returns a presigned
6
+ * URL and the asset's public URL. Call PUT with the file as the body to upload the
7
+ * asset using the presigned URL.
8
+ */
9
+ createAsset(body: AssetCreateAssetParams, options?: Core.RequestOptions): Core.APIPromise<AssetCreateAssetResponse>;
10
+ }
11
+ /**
12
+ * Response returned upon successful generation of the signed URL for uploading the
13
+ * file.
14
+ */
15
+ export interface AssetCreateAssetResponse {
16
+ /**
17
+ * The pre-signed URL to be used for uploading the file.
18
+ */
19
+ signedUrl: string;
20
+ /**
21
+ * The URL of the uploaded file.
22
+ */
23
+ url: string;
24
+ }
25
+ export interface AssetCreateAssetParams {
26
+ /**
27
+ * The name of the file, must match the regex pattern (converted to lowercase)
28
+ */
29
+ fileName: string;
30
+ /**
31
+ * The file path, must be a valid enum value.
32
+ */
33
+ filePath?: 'announcements' | 'images' | 'videos' | 'banners' | 'fonts' | 'posts' | 'profiles' | 'minting' | 'loyalty';
34
+ /**
35
+ * UUID of the organization (optional, converted to lowercase)
36
+ */
37
+ organizationId?: string;
38
+ /**
39
+ * UUID of the user (optional, converted to lowercase)
40
+ */
41
+ userId?: string;
42
+ /**
43
+ * UUID of the website (optional, converted to lowercase)
44
+ */
45
+ websiteId?: string;
46
+ }
47
+ export declare namespace Assets {
48
+ export { type AssetCreateAssetResponse as AssetCreateAssetResponse, type AssetCreateAssetParams as AssetCreateAssetParams, };
49
+ }
50
+ //# sourceMappingURL=assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/resources/assets.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;OAIG;IACH,WAAW,CACT,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;CAG7C;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EACL,eAAe,GACf,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,UAAU,GACV,SAAS,GACT,SAAS,CAAC;IAEd;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Assets = void 0;
5
+ const resource_1 = require("../resource.js");
6
+ class Assets extends resource_1.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(body, options) {
13
+ return this._client.post('/api/assets', { body, ...options });
14
+ }
15
+ }
16
+ exports.Assets = Assets;
17
+ //# sourceMappingURL=assets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.js","sourceRoot":"","sources":["../src/resources/assets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;OAIG;IACH,WAAW,CACT,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;CACF;AAZD,wBAYC"}
@@ -0,0 +1,13 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../resource.mjs";
3
+ export class Assets extends APIResource {
4
+ /**
5
+ * This endpoint enables you to upload a file to the resource. Returns a presigned
6
+ * URL and the asset's public URL. Call PUT with the file as the body to upload the
7
+ * asset using the presigned URL.
8
+ */
9
+ createAsset(body, options) {
10
+ return this._client.post('/api/assets', { body, ...options });
11
+ }
12
+ }
13
+ //# sourceMappingURL=assets.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.mjs","sourceRoot":"","sources":["../src/resources/assets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;OAIG;IACH,WAAW,CACT,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;CACF"}
@@ -0,0 +1,134 @@
1
+ import { APIResource } from "../resource.js";
2
+ import * as Core from "../core.js";
3
+ export declare class Auctions extends APIResource {
4
+ /**
5
+ * Returns a list of auction bids with optional filtering and pagination.
6
+ */
7
+ listAuctionBids(query?: AuctionListAuctionBidsParams, options?: Core.RequestOptions): Core.APIPromise<void>;
8
+ listAuctionBids(options?: Core.RequestOptions): Core.APIPromise<void>;
9
+ /**
10
+ * Returns a list of auctions with optional filtering and pagination.
11
+ */
12
+ listAuctions(options?: Core.RequestOptions): Core.APIPromise<AuctionListAuctionsResponse>;
13
+ }
14
+ /**
15
+ * Schema for the response when fetching auctions
16
+ */
17
+ export interface AuctionListAuctionsResponse {
18
+ data: Array<AuctionListAuctionsResponse.Data>;
19
+ hasNextPage: boolean;
20
+ }
21
+ export declare namespace AuctionListAuctionsResponse {
22
+ interface Data {
23
+ id: string;
24
+ auctionBids: Array<Data.AuctionBid>;
25
+ auctionItems: Array<Data.AuctionItem>;
26
+ biddersOwnCollectionAddresses: Array<string>;
27
+ createdAt: string;
28
+ currencyAddress: string | null;
29
+ currencyDecimals: number;
30
+ deletedAt: string | null;
31
+ description: string;
32
+ endsAt: string;
33
+ extendedDurationInSeconds: number | null;
34
+ hideBids: boolean;
35
+ /**
36
+ * Schema representing a loyalty currency
37
+ */
38
+ loyaltyCurrency: Data.LoyaltyCurrency | null;
39
+ loyaltyCurrencyId: string | null;
40
+ minBidAmount: string;
41
+ minBidIncrement: string | null;
42
+ mintingContractId: string;
43
+ name: string;
44
+ network: 'ethereum' | 'zksync';
45
+ organizationId: string;
46
+ reservePrice: string | null;
47
+ signature: string;
48
+ startsAt: string;
49
+ status: 'in_progress' | 'completed' | 'cancelled';
50
+ type: 'first_price' | 'second_price' | 'english';
51
+ updatedAt: string;
52
+ userId: string;
53
+ websiteId: string;
54
+ }
55
+ namespace Data {
56
+ /**
57
+ * Schema representing an auction bid
58
+ */
59
+ interface AuctionBid {
60
+ id: string;
61
+ amount: string;
62
+ createdAt: string;
63
+ }
64
+ interface AuctionItem {
65
+ id: string;
66
+ /**
67
+ * Schema representing a minting contract asset
68
+ */
69
+ mintingContractAsset: AuctionItem.MintingContractAsset;
70
+ quantity: number;
71
+ sortId: number;
72
+ }
73
+ namespace AuctionItem {
74
+ /**
75
+ * Schema representing a minting contract asset
76
+ */
77
+ interface MintingContractAsset {
78
+ id: string;
79
+ }
80
+ }
81
+ /**
82
+ * Schema representing a loyalty currency
83
+ */
84
+ interface LoyaltyCurrency {
85
+ id: string;
86
+ decimals: number;
87
+ imageUrl: string | null;
88
+ name: string;
89
+ symbol: string;
90
+ }
91
+ }
92
+ }
93
+ export interface AuctionListAuctionBidsParams {
94
+ /**
95
+ * The bid ID
96
+ */
97
+ id?: string;
98
+ /**
99
+ * ID of the auction
100
+ */
101
+ auctionId?: string;
102
+ /**
103
+ * Maximum number of bids to return
104
+ */
105
+ limit?: number;
106
+ /**
107
+ * ID of the organization
108
+ */
109
+ organizationId?: string;
110
+ /**
111
+ * Pagination cursor to start after a specific bid ID
112
+ */
113
+ startingAfter?: string;
114
+ /**
115
+ * Status of the bid
116
+ */
117
+ status?: 'submitted' | 'accepted' | 'rejected' | 'fulfilled';
118
+ /**
119
+ * ID of the user who made the bid
120
+ */
121
+ userId?: string;
122
+ /**
123
+ * Wallet address of the bidder
124
+ */
125
+ walletAddress?: string;
126
+ /**
127
+ * ID of the website
128
+ */
129
+ websiteId?: string;
130
+ }
131
+ export declare namespace Auctions {
132
+ export { type AuctionListAuctionsResponse as AuctionListAuctionsResponse, type AuctionListAuctionBidsParams as AuctionListAuctionBidsParams, };
133
+ }
134
+ //# sourceMappingURL=auctions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auctions.d.ts","sourceRoot":"","sources":["../src/resources/auctions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,eAAe,CAAC,KAAK,CAAC,EAAE,4BAA4B,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;IAC3G,eAAe,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;IAerE;;OAEG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,2BAA2B,CAAC;CAG1F;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,KAAK,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;IAE9C,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,y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H"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Auctions = void 0;
5
+ const resource_1 = require("../resource.js");
6
+ const core_1 = require("../core.js");
7
+ class Auctions extends resource_1.APIResource {
8
+ listAuctionBids(query = {}, options) {
9
+ if ((0, core_1.isRequestOptions)(query)) {
10
+ return this.listAuctionBids({}, query);
11
+ }
12
+ return this._client.get('/api/auction_bids', {
13
+ query,
14
+ ...options,
15
+ headers: { Accept: '*/*', ...options?.headers },
16
+ });
17
+ }
18
+ /**
19
+ * Returns a list of auctions with optional filtering and pagination.
20
+ */
21
+ listAuctions(options) {
22
+ return this._client.get('/api/auctions', options);
23
+ }
24
+ }
25
+ exports.Auctions = Auctions;
26
+ //# sourceMappingURL=auctions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auctions.js","sourceRoot":"","sources":["../src/resources/auctions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAC1C,qCAA2C;AAG3C,MAAa,QAAS,SAAQ,sBAAW;IAMvC,eAAe,CACb,QAA4D,EAAE,EAC9D,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,eAAe,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SACxC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE;YAC3C,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,OAA6B;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;CACF;AA1BD,4BA0BC"}
@@ -0,0 +1,22 @@
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 Auctions extends APIResource {
5
+ listAuctionBids(query = {}, options) {
6
+ if (isRequestOptions(query)) {
7
+ return this.listAuctionBids({}, query);
8
+ }
9
+ return this._client.get('/api/auction_bids', {
10
+ query,
11
+ ...options,
12
+ headers: { Accept: '*/*', ...options?.headers },
13
+ });
14
+ }
15
+ /**
16
+ * Returns a list of auctions with optional filtering and pagination.
17
+ */
18
+ listAuctions(options) {
19
+ return this._client.get('/api/auctions', options);
20
+ }
21
+ }
22
+ //# sourceMappingURL=auctions.mjs.map