@snagsolutions/sdk 0.1.0-alpha.15 → 0.1.0-alpha.17
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.
- package/CHANGELOG.md +31 -48
- package/README.md +12 -14
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts.map +1 -1
- package/core.js +2 -0
- package/core.js.map +1 -1
- package/core.mjs +3 -1
- package/core.mjs.map +1 -1
- package/index.d.mts +27 -6
- package/index.d.ts +27 -6
- package/index.d.ts.map +1 -1
- package/index.js +29 -8
- package/index.js.map +1 -1
- package/index.mjs +29 -8
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/assets.d.ts +50 -0
- package/resources/assets.d.ts.map +1 -0
- package/resources/assets.js +17 -0
- package/resources/assets.js.map +1 -0
- package/resources/assets.mjs +13 -0
- package/resources/assets.mjs.map +1 -0
- package/resources/auctions.d.ts +134 -0
- package/resources/auctions.d.ts.map +1 -0
- package/resources/auctions.js +26 -0
- package/resources/auctions.js.map +1 -0
- package/resources/auctions.mjs +22 -0
- package/resources/auctions.mjs.map +1 -0
- package/resources/auth.d.ts +40 -0
- package/resources/auth.d.ts.map +1 -0
- package/resources/auth.js +16 -0
- package/resources/auth.js.map +1 -0
- package/resources/auth.mjs +12 -0
- package/resources/auth.mjs.map +1 -0
- package/resources/index.d.ts +8 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +17 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +8 -1
- package/resources/index.mjs.map +1 -1
- package/resources/{api/loyalty → loyalty}/accounts.d.ts +9 -10
- package/resources/loyalty/accounts.d.ts.map +1 -0
- package/resources/{api/loyalty → loyalty}/accounts.js +4 -4
- package/resources/loyalty/accounts.js.map +1 -0
- package/resources/{api/loyalty → loyalty}/accounts.mjs +4 -4
- package/resources/loyalty/accounts.mjs.map +1 -0
- package/resources/{api/loyalty → loyalty}/badges.d.ts +2 -2
- package/resources/loyalty/badges.d.ts.map +1 -0
- package/resources/{api/loyalty → loyalty}/badges.js +2 -2
- package/resources/loyalty/badges.js.map +1 -0
- package/resources/{api/loyalty → loyalty}/badges.mjs +2 -2
- package/resources/loyalty/badges.mjs.map +1 -0
- package/resources/{api/loyalty → loyalty}/currencies.d.ts +8 -2
- package/resources/loyalty/currencies.d.ts.map +1 -0
- package/resources/{api/loyalty → loyalty}/currencies.js +1 -1
- package/resources/loyalty/currencies.js.map +1 -0
- package/resources/{api/loyalty → loyalty}/currencies.mjs +1 -1
- package/resources/loyalty/currencies.mjs.map +1 -0
- package/resources/{api/loyalty → loyalty}/index.d.ts +5 -2
- package/resources/loyalty/index.d.ts.map +1 -0
- package/resources/{api/loyalty → loyalty}/index.js +7 -1
- package/resources/loyalty/index.js.map +1 -0
- package/resources/{api/loyalty → loyalty}/index.mjs +4 -1
- package/resources/loyalty/index.mjs.map +1 -0
- package/resources/loyalty/loyalty.d.ts +50 -0
- package/resources/loyalty/loyalty.d.ts.map +1 -0
- package/resources/{api/loyalty → loyalty}/loyalty.js +13 -20
- package/resources/loyalty/loyalty.js.map +1 -0
- package/resources/{api/loyalty → loyalty}/loyalty.mjs +13 -20
- package/resources/loyalty/loyalty.mjs.map +1 -0
- package/resources/{api/loyalty → loyalty}/multipliers.d.ts +26 -2
- package/resources/loyalty/multipliers.d.ts.map +1 -0
- package/resources/{api/loyalty → loyalty}/multipliers.js +2 -2
- package/resources/loyalty/multipliers.js.map +1 -0
- package/resources/{api/loyalty → loyalty}/multipliers.mjs +2 -2
- package/resources/loyalty/multipliers.mjs.map +1 -0
- package/resources/{api/loyalty → loyalty}/questions-responses.d.ts +2 -2
- package/resources/loyalty/questions-responses.d.ts.map +1 -0
- package/resources/{api/loyalty → loyalty}/questions-responses.js +2 -2
- package/resources/loyalty/questions-responses.js.map +1 -0
- package/resources/{api/loyalty → loyalty}/questions-responses.mjs +2 -2
- package/resources/loyalty/questions-responses.mjs.map +1 -0
- package/resources/{api/loyalty → loyalty}/questions.d.ts +2 -2
- package/resources/loyalty/questions.d.ts.map +1 -0
- package/resources/{api/loyalty → loyalty}/questions.js +1 -1
- package/resources/loyalty/questions.js.map +1 -0
- package/resources/{api/loyalty → loyalty}/questions.mjs +1 -1
- package/resources/loyalty/questions.mjs.map +1 -0
- package/resources/loyalty/rule-chains.d.ts +4 -0
- package/resources/loyalty/rule-chains.d.ts.map +1 -0
- package/resources/loyalty/rule-chains.js +9 -0
- package/resources/loyalty/rule-chains.js.map +1 -0
- package/resources/loyalty/rule-chains.mjs +5 -0
- package/resources/loyalty/rule-chains.mjs.map +1 -0
- package/resources/{api/loyalty → loyalty}/rule-edits.d.ts +2 -2
- package/resources/loyalty/rule-edits.d.ts.map +1 -0
- package/resources/{api/loyalty → loyalty}/rule-edits.js +1 -1
- package/resources/loyalty/rule-edits.js.map +1 -0
- package/resources/{api/loyalty → loyalty}/rule-edits.mjs +1 -1
- package/resources/loyalty/rule-edits.mjs.map +1 -0
- package/resources/{api/loyalty/loyalty.d.ts → loyalty/rule-groups.d.ts} +37 -285
- package/resources/loyalty/rule-groups.d.ts.map +1 -0
- package/resources/loyalty/rule-groups.js +16 -0
- package/resources/loyalty/rule-groups.js.map +1 -0
- package/resources/loyalty/rule-groups.mjs +12 -0
- package/resources/loyalty/rule-groups.mjs.map +1 -0
- package/resources/{api/loyalty → loyalty}/rules.d.ts +119 -14
- package/resources/loyalty/rules.d.ts.map +1 -0
- package/resources/{api/loyalty → loyalty}/rules.js +2 -2
- package/resources/loyalty/rules.js.map +1 -0
- package/resources/{api/loyalty → loyalty}/rules.mjs +2 -2
- package/resources/loyalty/rules.mjs.map +1 -0
- package/resources/loyalty/transactions.d.ts +248 -0
- package/resources/loyalty/transactions.d.ts.map +1 -0
- package/resources/loyalty/transactions.js +22 -0
- package/resources/loyalty/transactions.js.map +1 -0
- package/resources/loyalty/transactions.mjs +18 -0
- package/resources/loyalty/transactions.mjs.map +1 -0
- package/resources/loyalty.d.ts.map +1 -0
- package/resources/loyalty.js.map +1 -0
- package/resources/loyalty.mjs.map +1 -0
- package/resources/{api/minting.d.ts → minting.d.ts} +3 -3
- package/resources/minting.d.ts.map +1 -0
- package/resources/{api/minting.js → minting.js} +1 -1
- package/resources/minting.js.map +1 -0
- package/resources/{api/minting.mjs → minting.mjs} +1 -1
- package/resources/minting.mjs.map +1 -0
- package/resources/referral/index.d.ts.map +1 -0
- package/resources/referral/index.js.map +1 -0
- package/resources/referral/index.mjs.map +1 -0
- package/resources/{api/referral → referral}/referral.d.ts +2 -2
- package/resources/referral/referral.d.ts.map +1 -0
- package/resources/{api/referral → referral}/referral.js +2 -2
- package/resources/referral/referral.js.map +1 -0
- package/resources/{api/referral → referral}/referral.mjs +2 -2
- package/resources/referral/referral.mjs.map +1 -0
- package/resources/{api/referral → referral}/users.d.ts +2 -2
- package/resources/referral/users.d.ts.map +1 -0
- package/resources/{api/referral → referral}/users.js +1 -1
- package/resources/referral/users.js.map +1 -0
- package/resources/{api/referral → referral}/users.mjs +1 -1
- package/resources/referral/users.mjs.map +1 -0
- package/resources/referral.d.ts.map +1 -0
- package/resources/referral.js.map +1 -0
- package/resources/referral.mjs.map +1 -0
- package/resources/users/index.d.ts +3 -0
- package/resources/users/index.d.ts.map +1 -0
- package/resources/users/index.js.map +1 -0
- package/resources/users/index.mjs.map +1 -0
- package/resources/{api/users → users}/metadatas.d.ts +7 -2
- package/resources/users/metadatas.d.ts.map +1 -0
- package/resources/{api/users → users}/metadatas.js +2 -2
- package/resources/users/metadatas.js.map +1 -0
- package/resources/{api/users → users}/metadatas.mjs +2 -2
- package/resources/users/metadatas.mjs.map +1 -0
- package/resources/users/users.d.ts +304 -0
- package/resources/users/users.d.ts.map +1 -0
- package/resources/{api/users → users}/users.js +8 -1
- package/resources/users/users.js.map +1 -0
- package/resources/{api/users → users}/users.mjs +8 -1
- package/resources/users/users.mjs.map +1 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs.map +1 -0
- package/resources/websites/index.d.ts +4 -0
- package/resources/websites/index.d.ts.map +1 -0
- package/resources/websites/index.js +11 -0
- package/resources/websites/index.js.map +1 -0
- package/resources/{api → websites}/index.mjs +0 -5
- package/resources/websites/index.mjs.map +1 -0
- package/resources/{api → websites}/website-collections.d.ts +1 -1
- package/resources/websites/website-collections.d.ts.map +1 -0
- package/resources/websites/website-collections.js.map +1 -0
- package/resources/websites/website-collections.mjs.map +1 -0
- package/resources/websites/website-user-roles.d.ts.map +1 -0
- package/resources/websites/website-user-roles.js.map +1 -0
- package/resources/websites/website-user-roles.mjs.map +1 -0
- package/resources/{api → websites}/websites.d.ts +8 -0
- package/resources/websites/websites.d.ts.map +1 -0
- package/resources/websites/websites.js +56 -0
- package/resources/websites/websites.js.map +1 -0
- package/resources/websites/websites.mjs +29 -0
- package/resources/websites/websites.mjs.map +1 -0
- package/resources/websites.d.ts +2 -0
- package/resources/websites.d.ts.map +1 -0
- package/resources/{api.js → websites.js} +2 -2
- package/resources/websites.js.map +1 -0
- package/resources/{api.mjs → websites.mjs} +2 -2
- package/resources/websites.mjs.map +1 -0
- package/src/_shims/index.d.ts +2 -0
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +5 -1
- package/src/core.ts +6 -1
- package/src/index.ts +98 -23
- package/src/resources/assets.ts +77 -0
- package/src/resources/auctions.ts +209 -0
- package/src/resources/auth.ts +69 -0
- package/src/resources/index.ts +27 -8
- package/src/resources/{api/loyalty → loyalty}/accounts.ts +15 -17
- package/src/resources/{api/loyalty → loyalty}/badges.ts +3 -3
- package/src/resources/{api/loyalty → loyalty}/currencies.ts +8 -2
- package/src/resources/{api/loyalty → loyalty}/index.ts +16 -11
- package/src/resources/loyalty/loyalty.ts +231 -0
- package/src/resources/{api/loyalty → loyalty}/multipliers.ts +27 -3
- package/src/resources/{api/loyalty → loyalty}/questions-responses.ts +3 -3
- package/src/resources/{api/loyalty → loyalty}/questions.ts +2 -2
- package/src/resources/loyalty/rule-chains.ts +5 -0
- package/src/resources/{api/loyalty → loyalty}/rule-edits.ts +2 -2
- package/src/resources/{api/loyalty/loyalty.ts → loyalty/rule-groups.ts} +62 -541
- package/src/resources/{api/loyalty → loyalty}/rules.ts +326 -183
- package/src/resources/loyalty/transactions.ts +332 -0
- package/src/resources/{api/minting.ts → minting.ts} +18 -17
- package/src/resources/{api/referral → referral}/referral.ts +3 -3
- package/src/resources/{api/referral → referral}/users.ts +2 -2
- package/src/resources/{api/users → users}/index.ts +2 -0
- package/src/resources/{api/users → users}/metadatas.ts +10 -3
- package/src/resources/users/users.ts +447 -0
- package/src/resources/websites/index.ts +22 -0
- package/src/resources/{api → websites}/website-collections.ts +16 -15
- package/src/resources/{api → websites}/websites.ts +40 -0
- package/src/resources/{api.ts → websites.ts} +1 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/api/api.d.ts +0 -365
- package/resources/api/api.d.ts.map +0 -1
- package/resources/api/api.js +0 -94
- package/resources/api/api.js.map +0 -1
- package/resources/api/api.mjs +0 -67
- package/resources/api/api.mjs.map +0 -1
- package/resources/api/index.d.ts +0 -9
- package/resources/api/index.d.ts.map +0 -1
- package/resources/api/index.js +0 -21
- package/resources/api/index.js.map +0 -1
- package/resources/api/index.mjs.map +0 -1
- package/resources/api/loyalty/accounts.d.ts.map +0 -1
- package/resources/api/loyalty/accounts.js.map +0 -1
- package/resources/api/loyalty/accounts.mjs.map +0 -1
- package/resources/api/loyalty/badges.d.ts.map +0 -1
- package/resources/api/loyalty/badges.js.map +0 -1
- package/resources/api/loyalty/badges.mjs.map +0 -1
- package/resources/api/loyalty/currencies.d.ts.map +0 -1
- package/resources/api/loyalty/currencies.js.map +0 -1
- package/resources/api/loyalty/currencies.mjs.map +0 -1
- package/resources/api/loyalty/index.d.ts.map +0 -1
- package/resources/api/loyalty/index.js.map +0 -1
- package/resources/api/loyalty/index.mjs.map +0 -1
- package/resources/api/loyalty/loyalty.d.ts.map +0 -1
- package/resources/api/loyalty/loyalty.js.map +0 -1
- package/resources/api/loyalty/loyalty.mjs.map +0 -1
- package/resources/api/loyalty/multipliers.d.ts.map +0 -1
- package/resources/api/loyalty/multipliers.js.map +0 -1
- package/resources/api/loyalty/multipliers.mjs.map +0 -1
- package/resources/api/loyalty/questions-responses.d.ts.map +0 -1
- package/resources/api/loyalty/questions-responses.js.map +0 -1
- package/resources/api/loyalty/questions-responses.mjs.map +0 -1
- package/resources/api/loyalty/questions.d.ts.map +0 -1
- package/resources/api/loyalty/questions.js.map +0 -1
- package/resources/api/loyalty/questions.mjs.map +0 -1
- package/resources/api/loyalty/rule-edits.d.ts.map +0 -1
- package/resources/api/loyalty/rule-edits.js.map +0 -1
- package/resources/api/loyalty/rule-edits.mjs.map +0 -1
- package/resources/api/loyalty/rules.d.ts.map +0 -1
- package/resources/api/loyalty/rules.js.map +0 -1
- package/resources/api/loyalty/rules.mjs.map +0 -1
- package/resources/api/loyalty.d.ts.map +0 -1
- package/resources/api/loyalty.js.map +0 -1
- package/resources/api/loyalty.mjs.map +0 -1
- package/resources/api/minting.d.ts.map +0 -1
- package/resources/api/minting.js.map +0 -1
- package/resources/api/minting.mjs.map +0 -1
- package/resources/api/referral/index.d.ts.map +0 -1
- package/resources/api/referral/index.js.map +0 -1
- package/resources/api/referral/index.mjs.map +0 -1
- package/resources/api/referral/referral.d.ts.map +0 -1
- package/resources/api/referral/referral.js.map +0 -1
- package/resources/api/referral/referral.mjs.map +0 -1
- package/resources/api/referral/users.d.ts.map +0 -1
- package/resources/api/referral/users.js.map +0 -1
- package/resources/api/referral/users.mjs.map +0 -1
- package/resources/api/referral.d.ts.map +0 -1
- package/resources/api/referral.js.map +0 -1
- package/resources/api/referral.mjs.map +0 -1
- package/resources/api/users/index.d.ts +0 -3
- package/resources/api/users/index.d.ts.map +0 -1
- package/resources/api/users/index.js.map +0 -1
- package/resources/api/users/index.mjs.map +0 -1
- package/resources/api/users/metadatas.d.ts.map +0 -1
- package/resources/api/users/metadatas.js.map +0 -1
- package/resources/api/users/metadatas.mjs.map +0 -1
- package/resources/api/users/users.d.ts +0 -133
- package/resources/api/users/users.d.ts.map +0 -1
- package/resources/api/users/users.js.map +0 -1
- package/resources/api/users/users.mjs.map +0 -1
- package/resources/api/users.d.ts.map +0 -1
- package/resources/api/users.js.map +0 -1
- package/resources/api/users.mjs.map +0 -1
- package/resources/api/website-collections.d.ts.map +0 -1
- package/resources/api/website-collections.js.map +0 -1
- package/resources/api/website-collections.mjs.map +0 -1
- package/resources/api/website-user-roles.d.ts.map +0 -1
- package/resources/api/website-user-roles.js.map +0 -1
- package/resources/api/website-user-roles.mjs.map +0 -1
- package/resources/api/websites.d.ts.map +0 -1
- package/resources/api/websites.js +0 -22
- package/resources/api/websites.js.map +0 -1
- package/resources/api/websites.mjs +0 -18
- package/resources/api/websites.mjs.map +0 -1
- package/resources/api.d.ts +0 -2
- package/resources/api.d.ts.map +0 -1
- package/resources/api.js.map +0 -1
- package/resources/api.mjs.map +0 -1
- package/src/resources/api/api.ts +0 -629
- package/src/resources/api/index.ts +0 -51
- package/src/resources/api/users/users.ts +0 -203
- /package/resources/{api/loyalty.d.ts → loyalty.d.ts} +0 -0
- /package/resources/{api/loyalty.js → loyalty.js} +0 -0
- /package/resources/{api/loyalty.mjs → loyalty.mjs} +0 -0
- /package/resources/{api/referral → referral}/index.d.ts +0 -0
- /package/resources/{api/referral → referral}/index.js +0 -0
- /package/resources/{api/referral → referral}/index.mjs +0 -0
- /package/resources/{api/referral.d.ts → referral.d.ts} +0 -0
- /package/resources/{api/referral.js → referral.js} +0 -0
- /package/resources/{api/referral.mjs → referral.mjs} +0 -0
- /package/resources/{api/users → users}/index.js +0 -0
- /package/resources/{api/users → users}/index.mjs +0 -0
- /package/resources/{api/users.d.ts → users.d.ts} +0 -0
- /package/resources/{api/users.js → users.js} +0 -0
- /package/resources/{api/users.mjs → users.mjs} +0 -0
- /package/resources/{api → websites}/website-collections.js +0 -0
- /package/resources/{api → websites}/website-collections.mjs +0 -0
- /package/resources/{api → websites}/website-user-roles.d.ts +0 -0
- /package/resources/{api → websites}/website-user-roles.js +0 -0
- /package/resources/{api → websites}/website-user-roles.mjs +0 -0
- /package/src/resources/{api/loyalty.ts → loyalty.ts} +0 -0
- /package/src/resources/{api/referral → referral}/index.ts +0 -0
- /package/src/resources/{api/referral.ts → referral.ts} +0 -0
- /package/src/resources/{api/users.ts → users.ts} +0 -0
- /package/src/resources/{api → websites}/website-user-roles.ts +0 -0
package/src/_shims/index.js
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
const shims = require('./registry');
|
|
5
5
|
const auto = require('@snagsolutions/sdk/_shims/auto/runtime');
|
|
6
|
-
|
|
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();
|
package/src/_shims/index.mjs
CHANGED
|
@@ -3,5 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as shims from './registry.mjs';
|
|
5
5
|
import * as auto from "./auto/runtime";
|
|
6
|
-
|
|
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 {
|
|
@@ -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,19 +6,38 @@ 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 { 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';
|
|
9
14
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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';
|
|
30
|
+
import {
|
|
31
|
+
WebsiteCreateParams,
|
|
32
|
+
WebsiteCreateResponse,
|
|
33
|
+
WebsiteListParams,
|
|
34
|
+
WebsiteListResponse,
|
|
35
|
+
Websites,
|
|
36
|
+
} from './resources/websites/websites';
|
|
18
37
|
|
|
19
38
|
export interface ClientOptions {
|
|
20
39
|
/**
|
|
21
|
-
*
|
|
40
|
+
* API key required to authenticate with the Snag Solutions API.
|
|
22
41
|
*/
|
|
23
42
|
apiKey?: string | undefined;
|
|
24
43
|
|
|
@@ -90,8 +109,8 @@ export class SnagSolutions extends Core.APIClient {
|
|
|
90
109
|
/**
|
|
91
110
|
* API Client for interfacing with the Snag Solutions API.
|
|
92
111
|
*
|
|
93
|
-
* @param {string | undefined} [opts.apiKey=process.env['
|
|
94
|
-
* @param {string} [opts.baseURL=process.env['SNAG_SOLUTIONS_BASE_URL'] ?? https://
|
|
112
|
+
* @param {string | undefined} [opts.apiKey=process.env['X_API_KEY'] ?? undefined]
|
|
113
|
+
* @param {string} [opts.baseURL=process.env['SNAG_SOLUTIONS_BASE_URL'] ?? https://admin.snagsolutions.io/] - Override the default base URL for the API.
|
|
95
114
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
96
115
|
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
97
116
|
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
@@ -101,19 +120,19 @@ export class SnagSolutions extends Core.APIClient {
|
|
|
101
120
|
*/
|
|
102
121
|
constructor({
|
|
103
122
|
baseURL = Core.readEnv('SNAG_SOLUTIONS_BASE_URL'),
|
|
104
|
-
apiKey = Core.readEnv('
|
|
123
|
+
apiKey = Core.readEnv('X_API_KEY'),
|
|
105
124
|
...opts
|
|
106
125
|
}: ClientOptions = {}) {
|
|
107
126
|
if (apiKey === undefined) {
|
|
108
127
|
throw new Errors.SnagSolutionsError(
|
|
109
|
-
"The
|
|
128
|
+
"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' }).",
|
|
110
129
|
);
|
|
111
130
|
}
|
|
112
131
|
|
|
113
132
|
const options: ClientOptions = {
|
|
114
133
|
apiKey,
|
|
115
134
|
...opts,
|
|
116
|
-
baseURL: baseURL || `https://
|
|
135
|
+
baseURL: baseURL || `https://admin.snagsolutions.io/`,
|
|
117
136
|
};
|
|
118
137
|
|
|
119
138
|
super({
|
|
@@ -129,7 +148,14 @@ export class SnagSolutions extends Core.APIClient {
|
|
|
129
148
|
this.apiKey = apiKey;
|
|
130
149
|
}
|
|
131
150
|
|
|
132
|
-
|
|
151
|
+
assets: API.Assets = new API.Assets(this);
|
|
152
|
+
auth: API.Auth = new API.Auth(this);
|
|
153
|
+
auctions: API.Auctions = new API.Auctions(this);
|
|
154
|
+
users: API.Users = new API.Users(this);
|
|
155
|
+
loyalty: API.Loyalty = new API.Loyalty(this);
|
|
156
|
+
minting: API.Minting = new API.Minting(this);
|
|
157
|
+
referral: API.Referral = new API.Referral(this);
|
|
158
|
+
websites: API.Websites = new API.Websites(this);
|
|
133
159
|
|
|
134
160
|
protected override defaultQuery(): Core.DefaultQuery | undefined {
|
|
135
161
|
return this._options.defaultQuery;
|
|
@@ -171,18 +197,67 @@ export class SnagSolutions extends Core.APIClient {
|
|
|
171
197
|
static fileFromPath = Uploads.fileFromPath;
|
|
172
198
|
}
|
|
173
199
|
|
|
174
|
-
SnagSolutions.
|
|
200
|
+
SnagSolutions.Assets = Assets;
|
|
201
|
+
SnagSolutions.Auth = Auth;
|
|
202
|
+
SnagSolutions.Auctions = Auctions;
|
|
203
|
+
SnagSolutions.Users = Users;
|
|
204
|
+
SnagSolutions.Loyalty = Loyalty;
|
|
205
|
+
SnagSolutions.Minting = Minting;
|
|
206
|
+
SnagSolutions.Referral = Referral;
|
|
207
|
+
SnagSolutions.Websites = Websites;
|
|
175
208
|
export declare namespace SnagSolutions {
|
|
176
209
|
export type RequestOptions = Core.RequestOptions;
|
|
177
210
|
|
|
178
211
|
export {
|
|
179
|
-
|
|
180
|
-
type
|
|
181
|
-
type
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
212
|
+
Assets as Assets,
|
|
213
|
+
type AssetCreateAssetResponse as AssetCreateAssetResponse,
|
|
214
|
+
type AssetCreateAssetParams as AssetCreateAssetParams,
|
|
215
|
+
};
|
|
216
|
+
|
|
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
|
+
};
|
|
240
|
+
|
|
241
|
+
export { Loyalty as Loyalty };
|
|
242
|
+
|
|
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
|
+
};
|
|
254
|
+
|
|
255
|
+
export {
|
|
256
|
+
Websites as Websites,
|
|
257
|
+
type WebsiteCreateResponse as WebsiteCreateResponse,
|
|
258
|
+
type WebsiteListResponse as WebsiteListResponse,
|
|
259
|
+
type WebsiteCreateParams as WebsiteCreateParams,
|
|
260
|
+
type WebsiteListParams as WebsiteListParams,
|
|
186
261
|
};
|
|
187
262
|
}
|
|
188
263
|
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../resource';
|
|
4
|
+
import { isRequestOptions } from '../core';
|
|
5
|
+
import * as Core from '../core';
|
|
6
|
+
|
|
7
|
+
export class Auctions extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Returns a list of auction bids with optional filtering and pagination.
|
|
10
|
+
*/
|
|
11
|
+
listAuctionBids(query?: AuctionListAuctionBidsParams, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
12
|
+
listAuctionBids(options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
13
|
+
listAuctionBids(
|
|
14
|
+
query: AuctionListAuctionBidsParams | Core.RequestOptions = {},
|
|
15
|
+
options?: Core.RequestOptions,
|
|
16
|
+
): Core.APIPromise<void> {
|
|
17
|
+
if (isRequestOptions(query)) {
|
|
18
|
+
return this.listAuctionBids({}, query);
|
|
19
|
+
}
|
|
20
|
+
return this._client.get('/api/auction_bids', {
|
|
21
|
+
query,
|
|
22
|
+
...options,
|
|
23
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Returns a list of auctions with optional filtering and pagination.
|
|
29
|
+
*/
|
|
30
|
+
listAuctions(options?: Core.RequestOptions): Core.APIPromise<AuctionListAuctionsResponse> {
|
|
31
|
+
return this._client.get('/api/auctions', options);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Schema for the response when fetching auctions
|
|
37
|
+
*/
|
|
38
|
+
export interface AuctionListAuctionsResponse {
|
|
39
|
+
data: Array<AuctionListAuctionsResponse.Data>;
|
|
40
|
+
|
|
41
|
+
hasNextPage: boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export namespace AuctionListAuctionsResponse {
|
|
45
|
+
export interface Data {
|
|
46
|
+
id: string;
|
|
47
|
+
|
|
48
|
+
auctionBids: Array<Data.AuctionBid>;
|
|
49
|
+
|
|
50
|
+
auctionItems: Array<Data.AuctionItem>;
|
|
51
|
+
|
|
52
|
+
biddersOwnCollectionAddresses: Array<string>;
|
|
53
|
+
|
|
54
|
+
createdAt: string;
|
|
55
|
+
|
|
56
|
+
currencyAddress: string | null;
|
|
57
|
+
|
|
58
|
+
currencyDecimals: number;
|
|
59
|
+
|
|
60
|
+
deletedAt: string | null;
|
|
61
|
+
|
|
62
|
+
description: string;
|
|
63
|
+
|
|
64
|
+
endsAt: string;
|
|
65
|
+
|
|
66
|
+
extendedDurationInSeconds: number | null;
|
|
67
|
+
|
|
68
|
+
hideBids: boolean;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Schema representing a loyalty currency
|
|
72
|
+
*/
|
|
73
|
+
loyaltyCurrency: Data.LoyaltyCurrency | null;
|
|
74
|
+
|
|
75
|
+
loyaltyCurrencyId: string | null;
|
|
76
|
+
|
|
77
|
+
minBidAmount: string;
|
|
78
|
+
|
|
79
|
+
minBidIncrement: string | null;
|
|
80
|
+
|
|
81
|
+
mintingContractId: string;
|
|
82
|
+
|
|
83
|
+
name: string;
|
|
84
|
+
|
|
85
|
+
network: 'ethereum' | 'zksync';
|
|
86
|
+
|
|
87
|
+
organizationId: string;
|
|
88
|
+
|
|
89
|
+
reservePrice: string | null;
|
|
90
|
+
|
|
91
|
+
signature: string;
|
|
92
|
+
|
|
93
|
+
startsAt: string;
|
|
94
|
+
|
|
95
|
+
status: 'in_progress' | 'completed' | 'cancelled';
|
|
96
|
+
|
|
97
|
+
type: 'first_price' | 'second_price' | 'english';
|
|
98
|
+
|
|
99
|
+
updatedAt: string;
|
|
100
|
+
|
|
101
|
+
userId: string;
|
|
102
|
+
|
|
103
|
+
websiteId: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export namespace Data {
|
|
107
|
+
/**
|
|
108
|
+
* Schema representing an auction bid
|
|
109
|
+
*/
|
|
110
|
+
export interface AuctionBid {
|
|
111
|
+
id: string;
|
|
112
|
+
|
|
113
|
+
amount: string;
|
|
114
|
+
|
|
115
|
+
createdAt: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface AuctionItem {
|
|
119
|
+
id: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Schema representing a minting contract asset
|
|
123
|
+
*/
|
|
124
|
+
mintingContractAsset: AuctionItem.MintingContractAsset;
|
|
125
|
+
|
|
126
|
+
quantity: number;
|
|
127
|
+
|
|
128
|
+
sortId: number;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export namespace AuctionItem {
|
|
132
|
+
/**
|
|
133
|
+
* Schema representing a minting contract asset
|
|
134
|
+
*/
|
|
135
|
+
export interface MintingContractAsset {
|
|
136
|
+
id: string;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Schema representing a loyalty currency
|
|
142
|
+
*/
|
|
143
|
+
export interface LoyaltyCurrency {
|
|
144
|
+
id: string;
|
|
145
|
+
|
|
146
|
+
decimals: number;
|
|
147
|
+
|
|
148
|
+
imageUrl: string | null;
|
|
149
|
+
|
|
150
|
+
name: string;
|
|
151
|
+
|
|
152
|
+
symbol: string;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface AuctionListAuctionBidsParams {
|
|
158
|
+
/**
|
|
159
|
+
* The bid ID
|
|
160
|
+
*/
|
|
161
|
+
id?: string;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* ID of the auction
|
|
165
|
+
*/
|
|
166
|
+
auctionId?: string;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Maximum number of bids to return
|
|
170
|
+
*/
|
|
171
|
+
limit?: number;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* ID of the organization
|
|
175
|
+
*/
|
|
176
|
+
organizationId?: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Pagination cursor to start after a specific bid ID
|
|
180
|
+
*/
|
|
181
|
+
startingAfter?: string;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Status of the bid
|
|
185
|
+
*/
|
|
186
|
+
status?: 'submitted' | 'accepted' | 'rejected' | 'fulfilled';
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* ID of the user who made the bid
|
|
190
|
+
*/
|
|
191
|
+
userId?: string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Wallet address of the bidder
|
|
195
|
+
*/
|
|
196
|
+
walletAddress?: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* ID of the website
|
|
200
|
+
*/
|
|
201
|
+
websiteId?: string;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export declare namespace Auctions {
|
|
205
|
+
export {
|
|
206
|
+
type AuctionListAuctionsResponse as AuctionListAuctionsResponse,
|
|
207
|
+
type AuctionListAuctionBidsParams as AuctionListAuctionBidsParams,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../resource';
|
|
4
|
+
import { isRequestOptions } from '../core';
|
|
5
|
+
import * as Core from '../core';
|
|
6
|
+
|
|
7
|
+
export class Auth extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* This endpoint allows you to connect your Twitter account to a Snag account
|
|
10
|
+
*/
|
|
11
|
+
connectAuth(
|
|
12
|
+
authType: 'twitter' | 'discord' | 'telegram' | 'epic' | 'steam',
|
|
13
|
+
query?: AuthConnectAuthParams,
|
|
14
|
+
options?: Core.RequestOptions,
|
|
15
|
+
): Core.APIPromise<AuthConnectAuthResponse>;
|
|
16
|
+
connectAuth(
|
|
17
|
+
authType: 'twitter' | 'discord' | 'telegram' | 'epic' | 'steam',
|
|
18
|
+
options?: Core.RequestOptions,
|
|
19
|
+
): Core.APIPromise<AuthConnectAuthResponse>;
|
|
20
|
+
connectAuth(
|
|
21
|
+
authType: 'twitter' | 'discord' | 'telegram' | 'epic' | 'steam',
|
|
22
|
+
query: AuthConnectAuthParams | Core.RequestOptions = {},
|
|
23
|
+
options?: Core.RequestOptions,
|
|
24
|
+
): Core.APIPromise<AuthConnectAuthResponse> {
|
|
25
|
+
if (isRequestOptions(query)) {
|
|
26
|
+
return this.connectAuth(authType, {}, query);
|
|
27
|
+
}
|
|
28
|
+
return this._client.get(`/api/${authType}/auth`, { query, ...options });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Schema for a connect social auth response schema
|
|
34
|
+
*/
|
|
35
|
+
export interface AuthConnectAuthResponse {
|
|
36
|
+
/**
|
|
37
|
+
* The URL to redirect to
|
|
38
|
+
*/
|
|
39
|
+
url: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface AuthConnectAuthParams {
|
|
43
|
+
/**
|
|
44
|
+
* The redirect URL where the user will land after completing the auth
|
|
45
|
+
*/
|
|
46
|
+
redirect?: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The type of response to return
|
|
50
|
+
*/
|
|
51
|
+
responseType?: 'redirect' | 'json';
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The ID of the user
|
|
55
|
+
*/
|
|
56
|
+
userId?: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The ID of the website
|
|
60
|
+
*/
|
|
61
|
+
websiteId?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export declare namespace Auth {
|
|
65
|
+
export {
|
|
66
|
+
type AuthConnectAuthResponse as AuthConnectAuthResponse,
|
|
67
|
+
type AuthConnectAuthParams as AuthConnectAuthParams,
|
|
68
|
+
};
|
|
69
|
+
}
|
package/src/resources/index.ts
CHANGED
|
@@ -1,11 +1,30 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export { Assets, type AssetCreateAssetResponse, type AssetCreateAssetParams } from './assets';
|
|
4
|
+
export { Auctions, type AuctionListAuctionsResponse, type AuctionListAuctionBidsParams } from './auctions';
|
|
5
|
+
export { Auth, type AuthConnectAuthResponse, type AuthConnectAuthParams } from './auth';
|
|
6
|
+
export { Loyalty } from './loyalty/loyalty';
|
|
7
|
+
export { Minting, type MintingGetAssetsResponse, type MintingGetAssetsParams } from './minting';
|
|
3
8
|
export {
|
|
4
|
-
|
|
5
|
-
type
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type
|
|
11
|
-
|
|
9
|
+
Referral,
|
|
10
|
+
type ReferralCreateCodeResponse,
|
|
11
|
+
type ReferralCreateCodeParams,
|
|
12
|
+
} from './referral/referral';
|
|
13
|
+
export {
|
|
14
|
+
Users,
|
|
15
|
+
type UserListResponse,
|
|
16
|
+
type UserConnectResponse,
|
|
17
|
+
type UserCountResponse,
|
|
18
|
+
type UserDisconnectResponse,
|
|
19
|
+
type UserListParams,
|
|
20
|
+
type UserConnectParams,
|
|
21
|
+
type UserCountParams,
|
|
22
|
+
type UserDisconnectParams,
|
|
23
|
+
} from './users/users';
|
|
24
|
+
export {
|
|
25
|
+
Websites,
|
|
26
|
+
type WebsiteCreateResponse,
|
|
27
|
+
type WebsiteListResponse,
|
|
28
|
+
type WebsiteCreateParams,
|
|
29
|
+
type WebsiteListParams,
|
|
30
|
+
} from './websites/websites';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
4
|
-
import { isRequestOptions } from '
|
|
5
|
-
import * as Core from '
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
6
|
|
|
7
7
|
export class Accounts extends APIResource {
|
|
8
8
|
/**
|
|
@@ -25,12 +25,12 @@ export class Accounts extends APIResource {
|
|
|
25
25
|
* loyalty currency. This can be a slow operation for large organizations. We
|
|
26
26
|
* recommend caching when possible.
|
|
27
27
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
query:
|
|
28
|
+
retrieveRank(
|
|
29
|
+
id: string,
|
|
30
|
+
query: AccountRetrieveRankParams,
|
|
31
31
|
options?: Core.RequestOptions,
|
|
32
|
-
): Core.APIPromise<
|
|
33
|
-
return this._client.get(`/api/loyalty/accounts/${
|
|
32
|
+
): Core.APIPromise<AccountRetrieveRankResponse> {
|
|
33
|
+
return this._client.get(`/api/loyalty/accounts/${id}/rank`, { query, ...options });
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -145,7 +145,10 @@ export namespace AccountListResponse {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
/**
|
|
149
|
+
* Schema for a get account rank response
|
|
150
|
+
*/
|
|
151
|
+
export interface AccountRetrieveRankResponse {
|
|
149
152
|
/**
|
|
150
153
|
* Rank of the user
|
|
151
154
|
*/
|
|
@@ -224,12 +227,7 @@ export interface AccountListParams {
|
|
|
224
227
|
websiteId?: string;
|
|
225
228
|
}
|
|
226
229
|
|
|
227
|
-
export interface
|
|
228
|
-
/**
|
|
229
|
-
* UUID of the account
|
|
230
|
-
*/
|
|
231
|
-
query_id: string;
|
|
232
|
-
|
|
230
|
+
export interface AccountRetrieveRankParams {
|
|
233
231
|
/**
|
|
234
232
|
* UUID of the loyalty currency
|
|
235
233
|
*/
|
|
@@ -249,8 +247,8 @@ export interface AccountGetRankParams {
|
|
|
249
247
|
export declare namespace Accounts {
|
|
250
248
|
export {
|
|
251
249
|
type AccountListResponse as AccountListResponse,
|
|
252
|
-
type
|
|
250
|
+
type AccountRetrieveRankResponse as AccountRetrieveRankResponse,
|
|
253
251
|
type AccountListParams as AccountListParams,
|
|
254
|
-
type
|
|
252
|
+
type AccountRetrieveRankParams as AccountRetrieveRankParams,
|
|
255
253
|
};
|
|
256
254
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
4
|
-
import { isRequestOptions } from '
|
|
5
|
-
import * as Core from '
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
6
|
|
|
7
7
|
export class Badges extends APIResource {
|
|
8
8
|
/**
|