@snagsolutions/sdk 0.1.0-alpha.26 → 0.1.0-alpha.260
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 +140 -153
- package/LICENSE +1 -1
- package/README.md +15 -23
- package/core.d.ts +9 -6
- package/core.d.ts.map +1 -1
- package/core.js +36 -33
- package/core.js.map +1 -1
- package/core.mjs +36 -33
- package/core.mjs.map +1 -1
- package/index.d.mts +15 -9
- package/index.d.ts +15 -9
- package/index.d.ts.map +1 -1
- package/index.js +13 -6
- package/index.js.map +1 -1
- package/index.mjs +14 -7
- package/index.mjs.map +1 -1
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +33 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/package.json +4 -5
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/assets.d.ts +16 -2
- package/resources/assets.d.ts.map +1 -1
- package/resources/assets.js +8 -0
- package/resources/assets.js.map +1 -1
- package/resources/assets.mjs +8 -0
- package/resources/assets.mjs.map +1 -1
- package/resources/auctions/auctions.d.ts +341 -0
- package/resources/auctions/auctions.d.ts.map +1 -0
- package/resources/auctions/auctions.js +72 -0
- package/resources/auctions/auctions.js.map +1 -0
- package/resources/auctions/auctions.mjs +45 -0
- package/resources/auctions/auctions.mjs.map +1 -0
- package/resources/auctions/index.d.ts +3 -0
- package/resources/auctions/index.d.ts.map +1 -0
- package/resources/auctions/index.js +9 -0
- package/resources/auctions/index.js.map +1 -0
- package/resources/auctions/index.mjs +4 -0
- package/resources/auctions/index.mjs.map +1 -0
- package/resources/auctions/website-user-attributes/index.d.ts +3 -0
- package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
- package/resources/auctions/website-user-attributes/index.js +9 -0
- package/resources/auctions/website-user-attributes/index.js.map +1 -0
- package/resources/auctions/website-user-attributes/index.mjs +4 -0
- package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
- package/resources/auctions/website-user-attributes/values.d.ts +126 -0
- package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
- package/resources/auctions/website-user-attributes/values.js +49 -0
- package/resources/auctions/website-user-attributes/values.js.map +1 -0
- package/resources/auctions/website-user-attributes/values.mjs +45 -0
- package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +136 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.js +76 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.mjs +49 -0
- package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
- package/resources/auctions/website-user-attributes.d.ts +2 -0
- package/resources/auctions/website-user-attributes.d.ts.map +1 -0
- package/resources/auctions/website-user-attributes.js +19 -0
- package/resources/auctions/website-user-attributes.js.map +1 -0
- package/resources/auctions/website-user-attributes.mjs +3 -0
- package/resources/auctions/website-user-attributes.mjs.map +1 -0
- package/resources/auctions.d.ts +1 -133
- package/resources/auctions.d.ts.map +1 -1
- package/resources/auctions.js +15 -22
- package/resources/auctions.js.map +1 -1
- package/resources/auctions.mjs +1 -20
- package/resources/auctions.mjs.map +1 -1
- package/resources/auth.d.ts +66 -6
- package/resources/auth.d.ts.map +1 -1
- package/resources/auth.js +6 -0
- package/resources/auth.js.map +1 -1
- package/resources/auth.mjs +6 -0
- package/resources/auth.mjs.map +1 -1
- package/resources/index.d.ts +5 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -3
- package/resources/index.mjs.map +1 -1
- package/resources/loyalty/account-streaks.d.ts +96 -0
- package/resources/loyalty/account-streaks.d.ts.map +1 -0
- package/resources/loyalty/account-streaks.js +24 -0
- package/resources/loyalty/account-streaks.js.map +1 -0
- package/resources/loyalty/account-streaks.mjs +20 -0
- package/resources/loyalty/account-streaks.mjs.map +1 -0
- package/resources/loyalty/accounts.d.ts +60 -16
- package/resources/loyalty/accounts.d.ts.map +1 -1
- package/resources/loyalty/accounts.js +14 -0
- package/resources/loyalty/accounts.js.map +1 -1
- package/resources/loyalty/accounts.mjs +14 -0
- package/resources/loyalty/accounts.mjs.map +1 -1
- package/resources/loyalty/badges.d.ts +885 -136
- package/resources/loyalty/badges.d.ts.map +1 -1
- package/resources/loyalty/badges.js +19 -1
- package/resources/loyalty/badges.js.map +1 -1
- package/resources/loyalty/badges.mjs +19 -1
- package/resources/loyalty/badges.mjs.map +1 -1
- package/resources/loyalty/currencies.d.ts +19 -0
- package/resources/loyalty/currencies.d.ts.map +1 -1
- package/resources/loyalty/currencies.js +19 -0
- package/resources/loyalty/currencies.js.map +1 -1
- package/resources/loyalty/currencies.mjs +19 -0
- package/resources/loyalty/currencies.mjs.map +1 -1
- package/resources/loyalty/index.d.ts +3 -3
- package/resources/loyalty/index.d.ts.map +1 -1
- package/resources/loyalty/index.js +5 -5
- package/resources/loyalty/index.js.map +1 -1
- package/resources/loyalty/index.mjs +2 -2
- package/resources/loyalty/index.mjs.map +1 -1
- package/resources/loyalty/loyalty.d.ts +9 -9
- package/resources/loyalty/loyalty.d.ts.map +1 -1
- package/resources/loyalty/loyalty.js +6 -6
- package/resources/loyalty/loyalty.js.map +1 -1
- package/resources/loyalty/loyalty.mjs +6 -6
- package/resources/loyalty/loyalty.mjs.map +1 -1
- package/resources/loyalty/multipliers.d.ts +39 -2
- package/resources/loyalty/multipliers.d.ts.map +1 -1
- package/resources/loyalty/multipliers.js +23 -0
- package/resources/loyalty/multipliers.js.map +1 -1
- package/resources/loyalty/multipliers.mjs +23 -0
- package/resources/loyalty/multipliers.mjs.map +1 -1
- package/resources/loyalty/questions-responses.d.ts +55 -4
- package/resources/loyalty/questions-responses.d.ts.map +1 -1
- package/resources/loyalty/questions-responses.js +9 -0
- package/resources/loyalty/questions-responses.js.map +1 -1
- package/resources/loyalty/questions-responses.mjs +9 -0
- package/resources/loyalty/questions-responses.mjs.map +1 -1
- package/resources/loyalty/questions.d.ts +60 -6
- package/resources/loyalty/questions.d.ts.map +1 -1
- package/resources/loyalty/questions.js +39 -0
- package/resources/loyalty/questions.js.map +1 -1
- package/resources/loyalty/questions.mjs +39 -0
- package/resources/loyalty/questions.mjs.map +1 -1
- package/resources/loyalty/rule-edits.d.ts +2898 -8
- package/resources/loyalty/rule-edits.d.ts.map +1 -1
- package/resources/loyalty/rule-edits.js +14 -0
- package/resources/loyalty/rule-edits.js.map +1 -1
- package/resources/loyalty/rule-edits.mjs +14 -0
- package/resources/loyalty/rule-edits.mjs.map +1 -1
- package/resources/loyalty/rule-groups.d.ts +284 -56
- package/resources/loyalty/rule-groups.d.ts.map +1 -1
- package/resources/loyalty/rule-groups.js +18 -0
- package/resources/loyalty/rule-groups.js.map +1 -1
- package/resources/loyalty/rule-groups.mjs +18 -0
- package/resources/loyalty/rule-groups.mjs.map +1 -1
- package/resources/loyalty/rules.d.ts +2368 -346
- package/resources/loyalty/rules.d.ts.map +1 -1
- package/resources/loyalty/rules.js +40 -9
- package/resources/loyalty/rules.js.map +1 -1
- package/resources/loyalty/rules.mjs +40 -9
- package/resources/loyalty/rules.mjs.map +1 -1
- package/resources/loyalty/transactions/index.d.ts +4 -0
- package/resources/loyalty/transactions/index.d.ts.map +1 -0
- package/resources/loyalty/transactions/index.js +11 -0
- package/resources/loyalty/transactions/index.js.map +1 -0
- package/resources/loyalty/transactions/index.mjs +5 -0
- package/resources/loyalty/transactions/index.mjs.map +1 -0
- package/resources/loyalty/transactions/posts.d.ts +145 -0
- package/resources/loyalty/transactions/posts.d.ts.map +1 -0
- package/resources/loyalty/transactions/posts.js +32 -0
- package/resources/loyalty/transactions/posts.js.map +1 -0
- package/resources/loyalty/transactions/posts.mjs +28 -0
- package/resources/loyalty/transactions/posts.mjs.map +1 -0
- package/resources/loyalty/transactions/rule-statuses.d.ts +121 -0
- package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
- package/resources/loyalty/transactions/rule-statuses.js +30 -0
- package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
- package/resources/loyalty/transactions/rule-statuses.mjs +26 -0
- package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
- package/resources/loyalty/transactions/transactions.d.ts +566 -0
- package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
- package/resources/loyalty/transactions/transactions.js +110 -0
- package/resources/loyalty/transactions/transactions.js.map +1 -0
- package/resources/loyalty/transactions/transactions.mjs +83 -0
- package/resources/loyalty/transactions/transactions.mjs.map +1 -0
- package/resources/loyalty/transactions.d.ts +1 -253
- package/resources/loyalty/transactions.d.ts.map +1 -1
- package/resources/loyalty/transactions.js +15 -18
- package/resources/loyalty/transactions.js.map +1 -1
- package/resources/loyalty/transactions.mjs +1 -16
- package/resources/loyalty/transactions.mjs.map +1 -1
- package/resources/minting/allowlist.d.ts +84 -0
- package/resources/minting/allowlist.d.ts.map +1 -0
- package/resources/minting/allowlist.js +42 -0
- package/resources/minting/allowlist.js.map +1 -0
- package/resources/minting/allowlist.mjs +38 -0
- package/resources/minting/allowlist.mjs.map +1 -0
- package/resources/minting/contracts.d.ts +165 -0
- package/resources/minting/contracts.d.ts.map +1 -0
- package/resources/minting/contracts.js +30 -0
- package/resources/minting/contracts.js.map +1 -0
- package/resources/minting/contracts.mjs +26 -0
- package/resources/minting/contracts.mjs.map +1 -0
- package/resources/minting/index.d.ts +5 -0
- package/resources/minting/index.d.ts.map +1 -0
- package/resources/minting/index.js +13 -0
- package/resources/minting/index.js.map +1 -0
- package/resources/minting/index.mjs +6 -0
- package/resources/minting/index.mjs.map +1 -0
- package/resources/minting/minting.d.ts +146 -0
- package/resources/minting/minting.d.ts.map +1 -0
- package/resources/minting/minting.js +79 -0
- package/resources/minting/minting.js.map +1 -0
- package/resources/minting/minting.mjs +52 -0
- package/resources/minting/minting.mjs.map +1 -0
- package/resources/minting/status.d.ts +44 -0
- package/resources/minting/status.d.ts.map +1 -0
- package/resources/minting/status.js +33 -0
- package/resources/minting/status.js.map +1 -0
- package/resources/minting/status.mjs +29 -0
- package/resources/minting/status.mjs.map +1 -0
- package/resources/minting.d.ts +1 -94
- package/resources/minting.d.ts.map +1 -1
- package/resources/minting.js +15 -11
- package/resources/minting.js.map +1 -1
- package/resources/minting.mjs +1 -9
- package/resources/minting.mjs.map +1 -1
- package/resources/referral/referral.d.ts +12 -3
- package/resources/referral/referral.d.ts.map +1 -1
- package/resources/referral/referral.js +11 -5
- package/resources/referral/referral.js.map +1 -1
- package/resources/referral/referral.mjs +11 -5
- package/resources/referral/referral.mjs.map +1 -1
- package/resources/referral/users.d.ts +30 -3
- package/resources/referral/users.d.ts.map +1 -1
- package/resources/referral/users.js +12 -4
- package/resources/referral/users.js.map +1 -1
- package/resources/referral/users.mjs +12 -4
- package/resources/referral/users.mjs.map +1 -1
- package/resources/token-claims.d.ts +162 -0
- package/resources/token-claims.d.ts.map +1 -0
- package/resources/token-claims.js +46 -0
- package/resources/token-claims.js.map +1 -0
- package/resources/token-claims.mjs +42 -0
- package/resources/token-claims.mjs.map +1 -0
- package/resources/users/index.d.ts +1 -1
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/index.js.map +1 -1
- package/resources/users/index.mjs.map +1 -1
- package/resources/users/metadatas.d.ts +40 -3
- package/resources/users/metadatas.d.ts.map +1 -1
- package/resources/users/metadatas.js.map +1 -1
- package/resources/users/metadatas.mjs.map +1 -1
- package/resources/users/users.d.ts +203 -36
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js +58 -1
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs +58 -1
- package/resources/users/users.mjs.map +1 -1
- package/resources/websites/index.d.ts +1 -1
- package/resources/websites/index.d.ts.map +1 -1
- package/resources/websites/index.js.map +1 -1
- package/resources/websites/index.mjs +1 -1
- package/resources/websites/index.mjs.map +1 -1
- package/resources/websites/website-collections.d.ts +0 -69
- package/resources/websites/website-collections.d.ts.map +1 -1
- package/resources/websites/website-collections.js +0 -16
- package/resources/websites/website-collections.js.map +1 -1
- package/resources/websites/website-collections.mjs +0 -16
- package/resources/websites/website-collections.mjs.map +1 -1
- package/resources/websites/website-user-roles.d.ts +24 -1
- package/resources/websites/website-user-roles.d.ts.map +1 -1
- package/resources/websites/website-user-roles.js +23 -0
- package/resources/websites/website-user-roles.js.map +1 -1
- package/resources/websites/website-user-roles.mjs +23 -0
- package/resources/websites/website-user-roles.mjs.map +1 -1
- package/resources/websites/websites.d.ts +21 -99
- package/resources/websites/websites.d.ts.map +1 -1
- package/resources/websites/websites.js +9 -1
- package/resources/websites/websites.js.map +1 -1
- package/resources/websites/websites.mjs +10 -2
- package/resources/websites/websites.mjs.map +1 -1
- package/src/core.ts +40 -36
- package/src/index.ts +84 -6
- package/src/internal/utils/query.ts +7 -0
- package/src/resource.ts +1 -1
- package/src/resources/assets.ts +18 -3
- package/src/resources/auctions/auctions.ts +523 -0
- package/src/resources/auctions/index.ts +19 -0
- package/src/resources/auctions/website-user-attributes/index.ts +18 -0
- package/src/resources/auctions/website-user-attributes/values.ts +170 -0
- package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +212 -0
- package/src/resources/auctions/website-user-attributes.ts +3 -0
- package/src/resources/auctions.ts +1 -207
- package/src/resources/auth.ts +124 -6
- package/src/resources/index.ts +41 -3
- package/src/resources/loyalty/account-streaks.ts +128 -0
- package/src/resources/loyalty/accounts.ts +65 -18
- package/src/resources/loyalty/badges.ts +1058 -146
- package/src/resources/loyalty/currencies.ts +19 -0
- package/src/resources/loyalty/index.ts +13 -2
- package/src/resources/loyalty/loyalty.ts +30 -12
- package/src/resources/loyalty/multipliers.ts +43 -4
- package/src/resources/loyalty/questions-responses.ts +64 -4
- package/src/resources/loyalty/questions.ts +64 -6
- package/src/resources/loyalty/rule-edits.ts +4208 -94
- package/src/resources/loyalty/rule-groups.ts +473 -64
- package/src/resources/loyalty/rules.ts +3706 -403
- package/src/resources/loyalty/transactions/index.ts +29 -0
- package/src/resources/loyalty/transactions/posts.ts +221 -0
- package/src/resources/loyalty/transactions/rule-statuses.ts +179 -0
- package/src/resources/loyalty/transactions/transactions.ts +930 -0
- package/src/resources/loyalty/transactions.ts +1 -446
- package/src/resources/minting/allowlist.ts +116 -0
- package/src/resources/minting/contracts.ts +415 -0
- package/src/resources/minting/index.ts +29 -0
- package/src/resources/minting/minting.ts +285 -0
- package/src/resources/minting/status.ts +70 -0
- package/src/resources/minting.ts +1 -157
- package/src/resources/referral/referral.ts +15 -11
- package/src/resources/referral/users.ts +45 -5
- package/src/resources/token-claims.ts +311 -0
- package/src/resources/users/index.ts +4 -0
- package/src/resources/users/metadatas.ts +66 -3
- package/src/resources/users/users.ts +277 -39
- package/src/resources/websites/index.ts +1 -6
- package/src/resources/websites/website-collections.ts +1 -146
- package/src/resources/websites/website-user-roles.ts +26 -1
- package/src/resources/websites/websites.ts +22 -127
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/loyalty/rule-chains.d.ts +0 -34
- package/resources/loyalty/rule-chains.d.ts.map +0 -1
- package/resources/loyalty/rule-chains.js +0 -15
- package/resources/loyalty/rule-chains.js.map +0 -1
- package/resources/loyalty/rule-chains.mjs +0 -11
- package/resources/loyalty/rule-chains.mjs.map +0 -1
- package/src/resources/loyalty/rule-chains.ts +0 -45
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
|
3
|
+
import * as AllowlistAPI from "./allowlist.mjs";
|
|
4
|
+
import { Allowlist, } from "./allowlist.mjs";
|
|
5
|
+
import * as ContractsAPI from "./contracts.mjs";
|
|
6
|
+
import { Contracts, } from "./contracts.mjs";
|
|
7
|
+
import * as StatusAPI from "./status.mjs";
|
|
8
|
+
import { Status } from "./status.mjs";
|
|
9
|
+
export class Minting extends APIResource {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.status = new StatusAPI.Status(this._client);
|
|
13
|
+
this.allowlist = new AllowlistAPI.Allowlist(this._client);
|
|
14
|
+
this.contracts = new ContractsAPI.Contracts(this._client);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns minting assets and any relevant context
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const response = await client.minting.getAssets({
|
|
22
|
+
* organizationId: '00000000-0000-0000-0000-000000000000',
|
|
23
|
+
* websiteId: '00000000-0000-0000-0000-000000000000',
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
getAssets(query, options) {
|
|
28
|
+
return this._client.get('/api/minting/assets', { query, ...options });
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Pass in to see if a token is eligible for minting
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.minting.getTokenGateStatus({
|
|
36
|
+
* collectionAddress: 'collectionAddress',
|
|
37
|
+
* mintingContractAssetId:
|
|
38
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
39
|
+
* mintingContractId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
40
|
+
* network: 'network',
|
|
41
|
+
* tokenId: 'tokenId',
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
getTokenGateStatus(query, options) {
|
|
46
|
+
return this._client.get('/api/minting/token_gate', { query, ...options });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
Minting.Status = Status;
|
|
50
|
+
Minting.Allowlist = Allowlist;
|
|
51
|
+
Minting.Contracts = Contracts;
|
|
52
|
+
//# sourceMappingURL=minting.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minting.mjs","sourceRoot":"","sources":["../../src/resources/minting/minting.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,YAAY;OACjB,EACL,SAAS,GAKV;OACM,KAAK,YAAY;OACjB,EAKL,SAAS,GACV;OACM,KAAK,SAAS;OACd,EAAE,MAAM,EAAoE;AAEnF,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAyC/E,CAAC;IAvCC;;;;;;;;;;OAUG;IACH,SAAS,CACP,KAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,kBAAkB,CAChB,KAAsC,EACtC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF;AAuLD,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;AACxB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;AAC9B,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { APIResource } from "../../resource.js";
|
|
2
|
+
import * as Core from "../../core.js";
|
|
3
|
+
export declare class Status extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Get the status of a mint
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const status = await client.minting.status.retrieve('id');
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<StatusRetrieveResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Update the status of a mint
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const status = await client.minting.status.update('id', {
|
|
19
|
+
* status: 'failed',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
update(id: string, body: StatusUpdateParams, options?: Core.RequestOptions): Core.APIPromise<StatusUpdateResponse>;
|
|
24
|
+
}
|
|
25
|
+
export interface StatusRetrieveResponse {
|
|
26
|
+
errorCode: number | null;
|
|
27
|
+
errorMessage: string | null;
|
|
28
|
+
price: number | null;
|
|
29
|
+
relayerTxId: string | null;
|
|
30
|
+
status: 'minted' | 'minting' | 'failed' | 'generatingSignature';
|
|
31
|
+
txHash: string | null;
|
|
32
|
+
signature?: unknown;
|
|
33
|
+
}
|
|
34
|
+
export interface StatusUpdateResponse {
|
|
35
|
+
message: string;
|
|
36
|
+
}
|
|
37
|
+
export interface StatusUpdateParams {
|
|
38
|
+
status: 'failed' | 'minted';
|
|
39
|
+
txHash?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare namespace Status {
|
|
42
|
+
export { type StatusRetrieveResponse as StatusRetrieveResponse, type StatusUpdateResponse as StatusUpdateResponse, type StatusUpdateParams as StatusUpdateParams, };
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/resources/minting/status.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAI5F;;;;;;;;;OASG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,kBAAkB,EACxB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC;CAGzC;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,qBAAqB,CAAC;IAEhE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAE5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.Status = void 0;
|
|
5
|
+
const resource_1 = require("../../resource.js");
|
|
6
|
+
class Status extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Get the status of a mint
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const status = await client.minting.status.retrieve('id');
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
retrieve(id, options) {
|
|
16
|
+
return this._client.get(`/api/minting/status/${id}`, options);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Update the status of a mint
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const status = await client.minting.status.update('id', {
|
|
24
|
+
* status: 'failed',
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
update(id, body, options) {
|
|
29
|
+
return this._client.post(`/api/minting/status/${id}`, { body, ...options });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.Status = Status;
|
|
33
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/resources/minting/status.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CACJ,EAAU,EACV,IAAwB,EACxB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AA9BD,wBA8BC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
|
3
|
+
export class Status extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Get the status of a mint
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const status = await client.minting.status.retrieve('id');
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
retrieve(id, options) {
|
|
13
|
+
return this._client.get(`/api/minting/status/${id}`, options);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Update the status of a mint
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const status = await client.minting.status.update('id', {
|
|
21
|
+
* status: 'failed',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
update(id, body, options) {
|
|
26
|
+
return this._client.post(`/api/minting/status/${id}`, { body, ...options });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=status.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.mjs","sourceRoot":"","sources":["../../src/resources/minting/status.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,OAA6B;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CACJ,EAAU,EACV,IAAwB,EACxB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF"}
|
package/resources/minting.d.ts
CHANGED
|
@@ -1,95 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import * as Core from "../core.js";
|
|
3
|
-
export declare class Minting extends APIResource {
|
|
4
|
-
/**
|
|
5
|
-
* Returns minting assets and any relevant context
|
|
6
|
-
*/
|
|
7
|
-
getAssets(query: MintingGetAssetsParams, options?: Core.RequestOptions): Core.APIPromise<MintingGetAssetsResponse>;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Schema for getting minting assets response
|
|
11
|
-
*/
|
|
12
|
-
export interface MintingGetAssetsResponse {
|
|
13
|
-
/**
|
|
14
|
-
* Array of minting assets
|
|
15
|
-
*/
|
|
16
|
-
data: Array<MintingGetAssetsResponse.Data>;
|
|
17
|
-
/**
|
|
18
|
-
* Indicates if more pages are available
|
|
19
|
-
*/
|
|
20
|
-
hasNextPage: boolean;
|
|
21
|
-
}
|
|
22
|
-
export declare namespace MintingGetAssetsResponse {
|
|
23
|
-
interface Data {
|
|
24
|
-
/**
|
|
25
|
-
* UUID of the minting asset
|
|
26
|
-
*/
|
|
27
|
-
id: string;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export interface MintingGetAssetsParams {
|
|
31
|
-
/**
|
|
32
|
-
* Organization ID
|
|
33
|
-
*/
|
|
34
|
-
organizationId: string;
|
|
35
|
-
/**
|
|
36
|
-
* Website ID
|
|
37
|
-
*/
|
|
38
|
-
websiteId: string;
|
|
39
|
-
/**
|
|
40
|
-
* Contract Address
|
|
41
|
-
*/
|
|
42
|
-
contractAddress?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Currency Type
|
|
45
|
-
*/
|
|
46
|
-
currencyType?: 'loyalty' | 'native' | null;
|
|
47
|
-
/**
|
|
48
|
-
* Whether to include deleted assets in the response
|
|
49
|
-
*/
|
|
50
|
-
includeDeleted?: boolean | null;
|
|
51
|
-
/**
|
|
52
|
-
* Whether to include metadata in the response
|
|
53
|
-
*/
|
|
54
|
-
includeMetadata?: boolean | null;
|
|
55
|
-
/**
|
|
56
|
-
* Whether to include listed assets in the response
|
|
57
|
-
*/
|
|
58
|
-
isListed?: boolean | null;
|
|
59
|
-
/**
|
|
60
|
-
* Minting Contract Asset ID
|
|
61
|
-
*/
|
|
62
|
-
mintingContractAssetId?: string | null;
|
|
63
|
-
/**
|
|
64
|
-
* Comma-separated list of Minting Contract UUIDs
|
|
65
|
-
*/
|
|
66
|
-
mintingContractIds?: string | null;
|
|
67
|
-
/**
|
|
68
|
-
* Network
|
|
69
|
-
*/
|
|
70
|
-
network?: 'abstract' | 'abstractTestnet' | 'apechain' | 'arbitrum' | 'avalanche' | 'avalancheFuji' | 'base' | 'baseSepolia' | 'berachainArtio' | 'binance' | 'bscTestnet' | 'campTestnet' | 'fantom' | 'fantomTestnet' | 'flowMainnet' | 'mainnet' | 'optimism' | 'polygon' | 'polygon_mumbai' | 'skaleNebula' | 'solana' | 'sophon' | 'sui' | 'superseed' | 'superseedSepolia' | 'vanar' | 'xai' | 'zksync' | 'sepolia' | 'optimism_sepolia' | 'arbitrumSepolia' | 'goerli' | 'optimism_goerli' | 'arbitrumGoerli' | 'basecamp';
|
|
71
|
-
/**
|
|
72
|
-
* Sort Dir
|
|
73
|
-
*/
|
|
74
|
-
sortDir?: 'asc' | 'desc' | null;
|
|
75
|
-
/**
|
|
76
|
-
* Sort Key
|
|
77
|
-
*/
|
|
78
|
-
sortKey?: 'price' | 'startsAt' | 'assetNr' | null;
|
|
79
|
-
/**
|
|
80
|
-
* Status
|
|
81
|
-
*/
|
|
82
|
-
status?: 'active' | 'past' | null;
|
|
83
|
-
/**
|
|
84
|
-
* Token ID
|
|
85
|
-
*/
|
|
86
|
-
tokenId?: string | Array<number> | null;
|
|
87
|
-
/**
|
|
88
|
-
* Wallet Address
|
|
89
|
-
*/
|
|
90
|
-
walletAddress?: string | Array<string>;
|
|
91
|
-
}
|
|
92
|
-
export declare namespace Minting {
|
|
93
|
-
export { type MintingGetAssetsResponse as MintingGetAssetsResponse, type MintingGetAssetsParams as MintingGetAssetsParams, };
|
|
94
|
-
}
|
|
1
|
+
export * from "./minting/index.js";
|
|
95
2
|
//# sourceMappingURL=minting.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minting.d.ts","sourceRoot":"","sources":["../src/resources/minting.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"minting.d.ts","sourceRoot":"","sources":["../src/resources/minting.ts"],"names":[],"mappings":"AAEA,cAAc,iBAAiB,CAAC"}
|
package/resources/minting.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* Returns minting assets and any relevant context
|
|
9
|
-
*/
|
|
10
|
-
getAssets(query, options) {
|
|
11
|
-
return this._client.get('/api/minting/assets', { query, ...options });
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
8
|
}
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./minting/index.js"), exports);
|
|
15
19
|
//# sourceMappingURL=minting.js.map
|
package/resources/minting.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minting.js","sourceRoot":"","sources":["../src/resources/minting.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"minting.js","sourceRoot":"","sources":["../src/resources/minting.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;AAEtF,qDAAgC"}
|
package/resources/minting.mjs
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
export class Minting extends APIResource {
|
|
4
|
-
/**
|
|
5
|
-
* Returns minting assets and any relevant context
|
|
6
|
-
*/
|
|
7
|
-
getAssets(query, options) {
|
|
8
|
-
return this._client.get('/api/minting/assets', { query, ...options });
|
|
9
|
-
}
|
|
10
|
-
}
|
|
2
|
+
export * from "./minting/index.mjs";
|
|
11
3
|
//# sourceMappingURL=minting.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minting.mjs","sourceRoot":"","sources":["../src/resources/minting.ts"],"names":[],"mappings":"AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"minting.mjs","sourceRoot":"","sources":["../src/resources/minting.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -6,9 +6,15 @@ export declare class Referral extends APIResource {
|
|
|
6
6
|
users: UsersAPI.Users;
|
|
7
7
|
/**
|
|
8
8
|
* This endpoint allows you to create a referral code
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const response = await client.referral.createCode({
|
|
13
|
+
* loyaltyRuleId: '558bcf56-24f1-4ef4-9787-043086295780',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
9
16
|
*/
|
|
10
|
-
createCode(body
|
|
11
|
-
createCode(options?: Core.RequestOptions): Core.APIPromise<ReferralCreateCodeResponse>;
|
|
17
|
+
createCode(body: ReferralCreateCodeParams, options?: Core.RequestOptions): Core.APIPromise<ReferralCreateCodeResponse>;
|
|
12
18
|
}
|
|
13
19
|
export interface ReferralCreateCodeResponse {
|
|
14
20
|
id: string;
|
|
@@ -21,8 +27,11 @@ export interface ReferralCreateCodeResponse {
|
|
|
21
27
|
websiteId: string;
|
|
22
28
|
}
|
|
23
29
|
export interface ReferralCreateCodeParams {
|
|
24
|
-
loyaltyRuleId
|
|
30
|
+
loyaltyRuleId: string;
|
|
31
|
+
customReferralCode?: string;
|
|
32
|
+
organizationId?: string;
|
|
25
33
|
userId?: string;
|
|
34
|
+
websiteId?: string;
|
|
26
35
|
}
|
|
27
36
|
export declare namespace Referral {
|
|
28
37
|
export { type ReferralCreateCodeResponse as ReferralCreateCodeResponse, type ReferralCreateCodeParams as ReferralCreateCodeParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referral.d.ts","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"referral.d.ts","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAAc,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAExG,qBAAa,QAAS,SAAQ,WAAW;IACvC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;;;;;;;;OASG;IACH,UAAU,CACR,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,0BAA0B,CAAC;CAG/C;AAED,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,cAAc,EAAE,MAAM,CAAC;IAEvB,YAAY,EAAE,MAAM,CAAC;IAErB,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,MAAM,CAAC;IAEf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,MAAM,CAAC;IAEtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
|
@@ -26,7 +26,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.Referral = void 0;
|
|
28
28
|
const resource_1 = require("../../resource.js");
|
|
29
|
-
const core_1 = require("../../core.js");
|
|
30
29
|
const UsersAPI = __importStar(require("./users.js"));
|
|
31
30
|
const users_1 = require("./users.js");
|
|
32
31
|
class Referral extends resource_1.APIResource {
|
|
@@ -34,10 +33,17 @@ class Referral extends resource_1.APIResource {
|
|
|
34
33
|
super(...arguments);
|
|
35
34
|
this.users = new UsersAPI.Users(this._client);
|
|
36
35
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
/**
|
|
37
|
+
* This endpoint allows you to create a referral code
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const response = await client.referral.createCode({
|
|
42
|
+
* loyaltyRuleId: '558bcf56-24f1-4ef4-9787-043086295780',
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
createCode(body, options) {
|
|
41
47
|
return this._client.post('/api/referral/codes', { body, ...options });
|
|
42
48
|
}
|
|
43
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referral.js","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;
|
|
1
|
+
{"version":3,"file":"referral.js","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAE7C,qDAAoC;AACpC,sCAAwG;AAExG,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkB3D,CAAC;IAhBC;;;;;;;;;OASG;IACH,UAAU,CACR,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AAnBD,4BAmBC;AAgCD,QAAQ,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../resource.mjs";
|
|
3
|
-
import { isRequestOptions } from "../../core.mjs";
|
|
4
3
|
import * as UsersAPI from "./users.mjs";
|
|
5
4
|
import { Users } from "./users.mjs";
|
|
6
5
|
export class Referral extends APIResource {
|
|
@@ -8,10 +7,17 @@ export class Referral extends APIResource {
|
|
|
8
7
|
super(...arguments);
|
|
9
8
|
this.users = new UsersAPI.Users(this._client);
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
/**
|
|
11
|
+
* This endpoint allows you to create a referral code
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response = await client.referral.createCode({
|
|
16
|
+
* loyaltyRuleId: '558bcf56-24f1-4ef4-9787-043086295780',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
createCode(body, options) {
|
|
15
21
|
return this._client.post('/api/referral/codes', { body, ...options });
|
|
16
22
|
}
|
|
17
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referral.mjs","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"referral.mjs","sourceRoot":"","sources":["../../src/resources/referral/referral.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,QAAQ;OACb,EAA0E,KAAK,EAAE;AAExF,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkB3D,CAAC;IAhBC;;;;;;;;;OASG;IACH,UAAU,CACR,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AAgCD,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
|
@@ -3,12 +3,25 @@ import * as Core from "../../core.js";
|
|
|
3
3
|
export declare class Users extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* This endpoint allows you to create a referral user
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const user = await client.referral.users.create({
|
|
10
|
+
* userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
|
|
11
|
+
* });
|
|
12
|
+
* ```
|
|
6
13
|
*/
|
|
7
14
|
create(body: UserCreateParams, options?: Core.RequestOptions): Core.APIPromise<UserCreateResponse>;
|
|
8
15
|
/**
|
|
9
16
|
* This endpoint allows you to get referrals
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const users = await client.referral.users.list();
|
|
21
|
+
* ```
|
|
10
22
|
*/
|
|
11
|
-
list(query
|
|
23
|
+
list(query?: UserListParams, options?: Core.RequestOptions): Core.APIPromise<UserListResponse>;
|
|
24
|
+
list(options?: Core.RequestOptions): Core.APIPromise<UserListResponse>;
|
|
12
25
|
}
|
|
13
26
|
export interface UserCreateResponse {
|
|
14
27
|
message: string;
|
|
@@ -20,8 +33,21 @@ export interface UserListResponse {
|
|
|
20
33
|
export declare namespace UserListResponse {
|
|
21
34
|
interface Data {
|
|
22
35
|
id: string;
|
|
36
|
+
/**
|
|
37
|
+
* This will only return data for earnings after 2025-04-24
|
|
38
|
+
*/
|
|
39
|
+
amount: number;
|
|
23
40
|
referralCode: Data.ReferralCode;
|
|
41
|
+
/**
|
|
42
|
+
* This will only return data for earnings after 2025-04-24
|
|
43
|
+
*/
|
|
44
|
+
tier1Amount: number;
|
|
45
|
+
/**
|
|
46
|
+
* This will only return data for earnings after 2025-04-24
|
|
47
|
+
*/
|
|
48
|
+
tier2Amount: number;
|
|
24
49
|
user: Data.User;
|
|
50
|
+
eligible?: boolean | null;
|
|
25
51
|
}
|
|
26
52
|
namespace Data {
|
|
27
53
|
interface ReferralCode {
|
|
@@ -31,6 +57,7 @@ export declare namespace UserListResponse {
|
|
|
31
57
|
referralCode: string;
|
|
32
58
|
updatedAt: string;
|
|
33
59
|
userId: string;
|
|
60
|
+
loyaltyRuleId?: string;
|
|
34
61
|
}
|
|
35
62
|
interface User {
|
|
36
63
|
id: string;
|
|
@@ -44,11 +71,11 @@ export interface UserCreateParams {
|
|
|
44
71
|
referralCodeId?: string;
|
|
45
72
|
}
|
|
46
73
|
export interface UserListParams {
|
|
47
|
-
walletAddress: string | Array<string>;
|
|
48
|
-
includeEligibility?: boolean | null;
|
|
49
74
|
limit?: number;
|
|
75
|
+
loyaltyRuleId?: string;
|
|
50
76
|
organizationId?: string;
|
|
51
77
|
startingAfter?: string;
|
|
78
|
+
walletAddress?: string | Array<string>;
|
|
52
79
|
websiteId?: string;
|
|
53
80
|
}
|
|
54
81
|
export declare namespace Users {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAIlG;;;;;;;OAOG;IACH,IAAI,CAAC,KAAK,CAAC,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC;IAC9F,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC;CAUvE;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAEnC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,yBAAiB,gBAAgB,CAAC;IAChC,UAAiB,IAAI;QACnB,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC;QAEhC;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;QAEhB,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KAC3B;IAED,UAAiB,IAAI,CAAC;QACpB,UAAiB,YAAY;YAC3B,EAAE,EAAE,MAAM,CAAC;YAEX,SAAS,EAAE,MAAM,CAAC;YAElB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;YAEzB,YAAY,EAAE,MAAM,CAAC;YAErB,SAAS,EAAE,MAAM,CAAC;YAElB,MAAM,EAAE,MAAM,CAAC;YAEf,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;QAED,UAAiB,IAAI;YACnB,EAAE,EAAE,MAAM,CAAC;YAEX,aAAa,EAAE,MAAM,CAAC;SACvB;KACF;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEvB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAEvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
|
@@ -3,17 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Users = void 0;
|
|
5
5
|
const resource_1 = require("../../resource.js");
|
|
6
|
+
const core_1 = require("../../core.js");
|
|
6
7
|
class Users extends resource_1.APIResource {
|
|
7
8
|
/**
|
|
8
9
|
* This endpoint allows you to create a referral user
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const user = await client.referral.users.create({
|
|
14
|
+
* userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
9
17
|
*/
|
|
10
18
|
create(body, options) {
|
|
11
19
|
return this._client.post('/api/referral/users', { body, ...options });
|
|
12
20
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
list(query = {}, options) {
|
|
22
|
+
if ((0, core_1.isRequestOptions)(query)) {
|
|
23
|
+
return this.list({}, query);
|
|
24
|
+
}
|
|
17
25
|
return this._client.get('/api/referral/users', { query, ...options });
|
|
18
26
|
}
|
|
19
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;
|
|
1
|
+
{"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAC7C,wCAA8C;AAG9C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAYD,IAAI,CACF,QAA8C,EAAE,EAChD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AAlCD,sBAkCC"}
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../resource.mjs";
|
|
3
|
+
import { isRequestOptions } from "../../core.mjs";
|
|
3
4
|
export class Users extends APIResource {
|
|
4
5
|
/**
|
|
5
6
|
* This endpoint allows you to create a referral user
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const user = await client.referral.users.create({
|
|
11
|
+
* userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
|
|
12
|
+
* });
|
|
13
|
+
* ```
|
|
6
14
|
*/
|
|
7
15
|
create(body, options) {
|
|
8
16
|
return this._client.post('/api/referral/users', { body, ...options });
|
|
9
17
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
list(query = {}, options) {
|
|
19
|
+
if (isRequestOptions(query)) {
|
|
20
|
+
return this.list({}, query);
|
|
21
|
+
}
|
|
14
22
|
return this._client.get('/api/referral/users', { query, ...options });
|
|
15
23
|
}
|
|
16
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.mjs","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"users.mjs","sourceRoot":"","sources":["../../src/resources/referral/users.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAYD,IAAI,CACF,QAA8C,EAAE,EAChD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF"}
|