@snagsolutions/sdk 0.1.0-alpha.215 → 0.1.0-alpha.217
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 +16 -0
- package/index.d.mts +5 -2
- package/index.d.ts +5 -2
- package/index.d.ts.map +1 -1
- package/index.js +4 -1
- package/index.js.map +1 -1
- package/index.mjs +4 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/loyalty/index.d.ts +1 -1
- package/resources/loyalty/index.d.ts.map +1 -1
- package/resources/loyalty/index.js.map +1 -1
- package/resources/loyalty/index.mjs.map +1 -1
- package/resources/loyalty/loyalty.d.ts +2 -2
- package/resources/loyalty/loyalty.d.ts.map +1 -1
- package/resources/loyalty/loyalty.js.map +1 -1
- package/resources/loyalty/loyalty.mjs.map +1 -1
- package/resources/loyalty/transactions/index.d.ts +2 -1
- package/resources/loyalty/transactions/index.d.ts.map +1 -1
- package/resources/loyalty/transactions/index.js +3 -1
- package/resources/loyalty/transactions/index.js.map +1 -1
- package/resources/loyalty/transactions/index.mjs +1 -0
- package/resources/loyalty/transactions/index.mjs.map +1 -1
- 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/transactions.d.ts +143 -1
- package/resources/loyalty/transactions/transactions.d.ts.map +1 -1
- package/resources/loyalty/transactions/transactions.js +34 -0
- package/resources/loyalty/transactions/transactions.js.map +1 -1
- package/resources/loyalty/transactions/transactions.mjs +34 -0
- package/resources/loyalty/transactions/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 +164 -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 +142 -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/token-claims.d.ts +160 -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/src/index.ts +42 -1
- package/src/resources/index.ts +22 -1
- package/src/resources/loyalty/index.ts +4 -0
- package/src/resources/loyalty/loyalty.ts +8 -0
- package/src/resources/loyalty/transactions/index.ts +11 -0
- package/src/resources/loyalty/transactions/posts.ts +221 -0
- package/src/resources/loyalty/transactions/transactions.ts +194 -0
- package/src/resources/minting/allowlist.ts +116 -0
- package/src/resources/minting/contracts.ts +405 -0
- package/src/resources/minting/index.ts +29 -0
- package/src/resources/minting/minting.ts +277 -0
- package/src/resources/minting/status.ts +70 -0
- package/src/resources/minting.ts +1 -176
- package/src/resources/token-claims.ts +307 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,405 @@
|
|
|
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 Contracts extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get minting contracts
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const contracts = await client.minting.contracts.list();
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
list(query?: ContractListParams, options?: Core.RequestOptions): Core.APIPromise<ContractListResponse>;
|
|
17
|
+
list(options?: Core.RequestOptions): Core.APIPromise<ContractListResponse>;
|
|
18
|
+
list(
|
|
19
|
+
query: ContractListParams | Core.RequestOptions = {},
|
|
20
|
+
options?: Core.RequestOptions,
|
|
21
|
+
): Core.APIPromise<ContractListResponse> {
|
|
22
|
+
if (isRequestOptions(query)) {
|
|
23
|
+
return this.list({}, query);
|
|
24
|
+
}
|
|
25
|
+
return this._client.get('/api/minting/contracts', { query, ...options });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Generates a signature for minting an asset on a given contract
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const response = await client.minting.contracts.mint({
|
|
34
|
+
* assetId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
35
|
+
* contractId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
mint(body: ContractMintParams, options?: Core.RequestOptions): Core.APIPromise<ContractMintResponse> {
|
|
40
|
+
return this._client.post('/api/minting/contracts/mint', { body, ...options });
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ContractListResponse {
|
|
45
|
+
data: Array<ContractListResponse.Data>;
|
|
46
|
+
|
|
47
|
+
hasNextPage: boolean;
|
|
48
|
+
|
|
49
|
+
stats: Array<ContractListResponse.Stat>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export namespace ContractListResponse {
|
|
53
|
+
export interface Data {
|
|
54
|
+
id: string;
|
|
55
|
+
|
|
56
|
+
_count: Data._Count;
|
|
57
|
+
|
|
58
|
+
address: string;
|
|
59
|
+
|
|
60
|
+
description: string | null;
|
|
61
|
+
|
|
62
|
+
enableGasless: boolean;
|
|
63
|
+
|
|
64
|
+
externalLinkUrl: string | null;
|
|
65
|
+
|
|
66
|
+
hasRevealMechanic: boolean;
|
|
67
|
+
|
|
68
|
+
hideInactiveListings: boolean;
|
|
69
|
+
|
|
70
|
+
imageUrl: string | null;
|
|
71
|
+
|
|
72
|
+
isFreeClaimForBadgeHolders: boolean;
|
|
73
|
+
|
|
74
|
+
isFreeClaimForTokenHolders: boolean;
|
|
75
|
+
|
|
76
|
+
isListed: boolean;
|
|
77
|
+
|
|
78
|
+
isPerAssetMintLimit: boolean;
|
|
79
|
+
|
|
80
|
+
isSoulbound: boolean;
|
|
81
|
+
|
|
82
|
+
mintingContractAssets: Array<Data.MintingContractAsset>;
|
|
83
|
+
|
|
84
|
+
mintingContractBadgeAssociation: Array<Data.MintingContractBadgeAssociation>;
|
|
85
|
+
|
|
86
|
+
mustOwnCollections: Array<Data.MustOwnCollection>;
|
|
87
|
+
|
|
88
|
+
name: string;
|
|
89
|
+
|
|
90
|
+
network:
|
|
91
|
+
| 'abstract'
|
|
92
|
+
| 'abstractTestnet'
|
|
93
|
+
| 'apechain'
|
|
94
|
+
| 'arbitrum'
|
|
95
|
+
| 'avalanche'
|
|
96
|
+
| 'avalancheFuji'
|
|
97
|
+
| 'base'
|
|
98
|
+
| 'baseSepolia'
|
|
99
|
+
| 'berachain'
|
|
100
|
+
| 'berachainArtio'
|
|
101
|
+
| 'berachainBepolia'
|
|
102
|
+
| 'binance'
|
|
103
|
+
| 'bscTestnet'
|
|
104
|
+
| 'campTestnet'
|
|
105
|
+
| 'fantom'
|
|
106
|
+
| 'fantomTestnet'
|
|
107
|
+
| 'flowMainnet'
|
|
108
|
+
| 'mainnet'
|
|
109
|
+
| 'nexusTestnet'
|
|
110
|
+
| 'optimism'
|
|
111
|
+
| 'polygon'
|
|
112
|
+
| 'polygon_mumbai'
|
|
113
|
+
| 'skaleNebula'
|
|
114
|
+
| 'skaleEuropa'
|
|
115
|
+
| 'skaleCalypso'
|
|
116
|
+
| 'solana'
|
|
117
|
+
| 'sophon'
|
|
118
|
+
| 'sophonTestnet'
|
|
119
|
+
| 'sui'
|
|
120
|
+
| 'superseed'
|
|
121
|
+
| 'superseedSepolia'
|
|
122
|
+
| 'vanar'
|
|
123
|
+
| 'xai'
|
|
124
|
+
| 'zksync'
|
|
125
|
+
| 'coti'
|
|
126
|
+
| 'cotiTestnet'
|
|
127
|
+
| 'morph'
|
|
128
|
+
| 'morphTestnet'
|
|
129
|
+
| 'morphHolesky'
|
|
130
|
+
| 'ultra'
|
|
131
|
+
| 'ultraTestnet'
|
|
132
|
+
| 'nitrograph'
|
|
133
|
+
| 'sepolia'
|
|
134
|
+
| 'optimism_sepolia'
|
|
135
|
+
| 'arbitrumSepolia'
|
|
136
|
+
| 'goerli'
|
|
137
|
+
| 'optimism_goerli'
|
|
138
|
+
| 'arbitrumGoerli'
|
|
139
|
+
| 'basecamp'
|
|
140
|
+
| 'somnia'
|
|
141
|
+
| 'zkverify'
|
|
142
|
+
| 'polkadot'
|
|
143
|
+
| 'kusama'
|
|
144
|
+
| 'flow_cadence';
|
|
145
|
+
|
|
146
|
+
organizationId: string;
|
|
147
|
+
|
|
148
|
+
preRevealMedia: string | null;
|
|
149
|
+
|
|
150
|
+
primarySaleRecipientAddress: string;
|
|
151
|
+
|
|
152
|
+
relayerId: string | null;
|
|
153
|
+
|
|
154
|
+
requireHoldingAllGatedItems: boolean;
|
|
155
|
+
|
|
156
|
+
revealAvailableAt: string | null;
|
|
157
|
+
|
|
158
|
+
royaltyFee: unknown;
|
|
159
|
+
|
|
160
|
+
royaltyFeeAddress: string;
|
|
161
|
+
|
|
162
|
+
shouldCollectEmail: boolean;
|
|
163
|
+
|
|
164
|
+
showOnMarketplace: boolean;
|
|
165
|
+
|
|
166
|
+
sortId: number | null;
|
|
167
|
+
|
|
168
|
+
symbol: string;
|
|
169
|
+
|
|
170
|
+
tokenType: 'erc721' | 'erc1155' | 'erc721c';
|
|
171
|
+
|
|
172
|
+
websiteCollectionId: string | null;
|
|
173
|
+
|
|
174
|
+
websiteId: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export namespace Data {
|
|
178
|
+
export interface _Count {
|
|
179
|
+
mintingContractAssets: number;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface MintingContractAsset {
|
|
183
|
+
id: string;
|
|
184
|
+
|
|
185
|
+
animationUrl: string | null;
|
|
186
|
+
|
|
187
|
+
assetNr: number;
|
|
188
|
+
|
|
189
|
+
auctionItems: Array<MintingContractAsset.AuctionItem>;
|
|
190
|
+
|
|
191
|
+
collectInfoType: 'customInput' | 'freeText' | 'shippingDetails' | null;
|
|
192
|
+
|
|
193
|
+
currencyAddress: string | null;
|
|
194
|
+
|
|
195
|
+
currencyDecimals: number | null;
|
|
196
|
+
|
|
197
|
+
description: string | null;
|
|
198
|
+
|
|
199
|
+
imageUrl: string | null;
|
|
200
|
+
|
|
201
|
+
isHidden: boolean;
|
|
202
|
+
|
|
203
|
+
isListed: boolean;
|
|
204
|
+
|
|
205
|
+
isPhygitalItem: boolean;
|
|
206
|
+
|
|
207
|
+
listingEndsAt: string | null;
|
|
208
|
+
|
|
209
|
+
listingStartsAt: string | null;
|
|
210
|
+
|
|
211
|
+
loyaltyCurrencyId: string | null;
|
|
212
|
+
|
|
213
|
+
name: string;
|
|
214
|
+
|
|
215
|
+
organizationId: string;
|
|
216
|
+
|
|
217
|
+
price: unknown;
|
|
218
|
+
|
|
219
|
+
quantity: number;
|
|
220
|
+
|
|
221
|
+
quantityMinted: number;
|
|
222
|
+
|
|
223
|
+
revealedAt: string | null;
|
|
224
|
+
|
|
225
|
+
shouldCollectUserInfo: boolean;
|
|
226
|
+
|
|
227
|
+
tokenId: number | null;
|
|
228
|
+
|
|
229
|
+
unlimitedQty: boolean;
|
|
230
|
+
|
|
231
|
+
websiteId: string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export namespace MintingContractAsset {
|
|
235
|
+
export interface AuctionItem {
|
|
236
|
+
id: string;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface MintingContractBadgeAssociation {
|
|
241
|
+
loyaltyBadge: MintingContractBadgeAssociation.LoyaltyBadge;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export namespace MintingContractBadgeAssociation {
|
|
245
|
+
export interface LoyaltyBadge {
|
|
246
|
+
id: string;
|
|
247
|
+
|
|
248
|
+
imageUrl: string | null;
|
|
249
|
+
|
|
250
|
+
name: string;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export interface MustOwnCollection {
|
|
255
|
+
address: string;
|
|
256
|
+
|
|
257
|
+
network:
|
|
258
|
+
| 'abstract'
|
|
259
|
+
| 'abstractTestnet'
|
|
260
|
+
| 'apechain'
|
|
261
|
+
| 'arbitrum'
|
|
262
|
+
| 'avalanche'
|
|
263
|
+
| 'avalancheFuji'
|
|
264
|
+
| 'base'
|
|
265
|
+
| 'baseSepolia'
|
|
266
|
+
| 'berachain'
|
|
267
|
+
| 'berachainArtio'
|
|
268
|
+
| 'berachainBepolia'
|
|
269
|
+
| 'binance'
|
|
270
|
+
| 'bscTestnet'
|
|
271
|
+
| 'campTestnet'
|
|
272
|
+
| 'fantom'
|
|
273
|
+
| 'fantomTestnet'
|
|
274
|
+
| 'flowMainnet'
|
|
275
|
+
| 'mainnet'
|
|
276
|
+
| 'nexusTestnet'
|
|
277
|
+
| 'optimism'
|
|
278
|
+
| 'polygon'
|
|
279
|
+
| 'polygon_mumbai'
|
|
280
|
+
| 'skaleNebula'
|
|
281
|
+
| 'skaleEuropa'
|
|
282
|
+
| 'skaleCalypso'
|
|
283
|
+
| 'solana'
|
|
284
|
+
| 'sophon'
|
|
285
|
+
| 'sophonTestnet'
|
|
286
|
+
| 'sui'
|
|
287
|
+
| 'superseed'
|
|
288
|
+
| 'superseedSepolia'
|
|
289
|
+
| 'vanar'
|
|
290
|
+
| 'xai'
|
|
291
|
+
| 'zksync'
|
|
292
|
+
| 'coti'
|
|
293
|
+
| 'cotiTestnet'
|
|
294
|
+
| 'morph'
|
|
295
|
+
| 'morphTestnet'
|
|
296
|
+
| 'morphHolesky'
|
|
297
|
+
| 'ultra'
|
|
298
|
+
| 'ultraTestnet'
|
|
299
|
+
| 'nitrograph'
|
|
300
|
+
| 'sepolia'
|
|
301
|
+
| 'optimism_sepolia'
|
|
302
|
+
| 'arbitrumSepolia'
|
|
303
|
+
| 'goerli'
|
|
304
|
+
| 'optimism_goerli'
|
|
305
|
+
| 'arbitrumGoerli'
|
|
306
|
+
| 'basecamp'
|
|
307
|
+
| 'somnia'
|
|
308
|
+
| 'zkverify'
|
|
309
|
+
| 'polkadot'
|
|
310
|
+
| 'kusama'
|
|
311
|
+
| 'flow_cadence';
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export interface Stat {
|
|
316
|
+
_count: Stat._Count;
|
|
317
|
+
|
|
318
|
+
_sum: Stat._Sum;
|
|
319
|
+
|
|
320
|
+
mintingContractId: string;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export namespace Stat {
|
|
324
|
+
export interface _Count {
|
|
325
|
+
isListed: number;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export interface _Sum {
|
|
329
|
+
quantity: number | null;
|
|
330
|
+
|
|
331
|
+
quantityMinted: number | null;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Use the id returned here to fetch the status and signature of the mint from the
|
|
338
|
+
* `/api/minting/status/:id` endpoint
|
|
339
|
+
*/
|
|
340
|
+
export interface ContractMintResponse {
|
|
341
|
+
mintingContractAssetMintStatusId: string;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export interface ContractListParams {
|
|
345
|
+
includeDeleted?: boolean | null;
|
|
346
|
+
|
|
347
|
+
limit?: number;
|
|
348
|
+
|
|
349
|
+
organizationId?: string;
|
|
350
|
+
|
|
351
|
+
showOnMarketplace?: boolean | null;
|
|
352
|
+
|
|
353
|
+
startingAfter?: string;
|
|
354
|
+
|
|
355
|
+
websiteId?: string;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export interface ContractMintParams {
|
|
359
|
+
assetId: string;
|
|
360
|
+
|
|
361
|
+
contractId: string;
|
|
362
|
+
|
|
363
|
+
agreedToSendW9?: boolean | null;
|
|
364
|
+
|
|
365
|
+
customInputValue?: string | null;
|
|
366
|
+
|
|
367
|
+
emailAddress?: string;
|
|
368
|
+
|
|
369
|
+
quantity?: number;
|
|
370
|
+
|
|
371
|
+
shippingId?: string;
|
|
372
|
+
|
|
373
|
+
shippingOrderType?:
|
|
374
|
+
| 'stripe'
|
|
375
|
+
| 'shipstation'
|
|
376
|
+
| 'drip'
|
|
377
|
+
| 'twitter_bearer'
|
|
378
|
+
| 'epic_games'
|
|
379
|
+
| 'stardust'
|
|
380
|
+
| 'twitter_clientsecret'
|
|
381
|
+
| 'immutable_passport'
|
|
382
|
+
| 'sequence'
|
|
383
|
+
| 'google'
|
|
384
|
+
| 'walletConnect'
|
|
385
|
+
| 'auth0'
|
|
386
|
+
| 'privy'
|
|
387
|
+
| 'thirdweb'
|
|
388
|
+
| 'steam'
|
|
389
|
+
| 'discord'
|
|
390
|
+
| 'google_api'
|
|
391
|
+
| 'shopify'
|
|
392
|
+
| 'ultra'
|
|
393
|
+
| 'github';
|
|
394
|
+
|
|
395
|
+
walletAddress?: string;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export declare namespace Contracts {
|
|
399
|
+
export {
|
|
400
|
+
type ContractListResponse as ContractListResponse,
|
|
401
|
+
type ContractMintResponse as ContractMintResponse,
|
|
402
|
+
type ContractListParams as ContractListParams,
|
|
403
|
+
type ContractMintParams as ContractMintParams,
|
|
404
|
+
};
|
|
405
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Allowlist,
|
|
5
|
+
type AllowlistListResponse,
|
|
6
|
+
type AllowlistUpsertResponse,
|
|
7
|
+
type AllowlistListParams,
|
|
8
|
+
type AllowlistUpsertParams,
|
|
9
|
+
} from './allowlist';
|
|
10
|
+
export {
|
|
11
|
+
Contracts,
|
|
12
|
+
type ContractListResponse,
|
|
13
|
+
type ContractMintResponse,
|
|
14
|
+
type ContractListParams,
|
|
15
|
+
type ContractMintParams,
|
|
16
|
+
} from './contracts';
|
|
17
|
+
export {
|
|
18
|
+
Minting,
|
|
19
|
+
type MintingGetAssetsResponse,
|
|
20
|
+
type MintingGetTokenGateStatusResponse,
|
|
21
|
+
type MintingGetAssetsParams,
|
|
22
|
+
type MintingGetTokenGateStatusParams,
|
|
23
|
+
} from './minting';
|
|
24
|
+
export {
|
|
25
|
+
Status,
|
|
26
|
+
type StatusRetrieveResponse,
|
|
27
|
+
type StatusUpdateResponse,
|
|
28
|
+
type StatusUpdateParams,
|
|
29
|
+
} from './status';
|
|
@@ -0,0 +1,277 @@
|
|
|
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
|
+
import * as AllowlistAPI from './allowlist';
|
|
6
|
+
import {
|
|
7
|
+
Allowlist,
|
|
8
|
+
AllowlistListParams,
|
|
9
|
+
AllowlistListResponse,
|
|
10
|
+
AllowlistUpsertParams,
|
|
11
|
+
AllowlistUpsertResponse,
|
|
12
|
+
} from './allowlist';
|
|
13
|
+
import * as ContractsAPI from './contracts';
|
|
14
|
+
import {
|
|
15
|
+
ContractListParams,
|
|
16
|
+
ContractListResponse,
|
|
17
|
+
ContractMintParams,
|
|
18
|
+
ContractMintResponse,
|
|
19
|
+
Contracts,
|
|
20
|
+
} from './contracts';
|
|
21
|
+
import * as StatusAPI from './status';
|
|
22
|
+
import { Status, StatusRetrieveResponse, StatusUpdateParams, StatusUpdateResponse } from './status';
|
|
23
|
+
|
|
24
|
+
export class Minting extends APIResource {
|
|
25
|
+
status: StatusAPI.Status = new StatusAPI.Status(this._client);
|
|
26
|
+
allowlist: AllowlistAPI.Allowlist = new AllowlistAPI.Allowlist(this._client);
|
|
27
|
+
contracts: ContractsAPI.Contracts = new ContractsAPI.Contracts(this._client);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Returns minting assets and any relevant context
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const response = await client.minting.getAssets({
|
|
35
|
+
* organizationId: '00000000-0000-0000-0000-000000000000',
|
|
36
|
+
* websiteId: '00000000-0000-0000-0000-000000000000',
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
getAssets(
|
|
41
|
+
query: MintingGetAssetsParams,
|
|
42
|
+
options?: Core.RequestOptions,
|
|
43
|
+
): Core.APIPromise<MintingGetAssetsResponse> {
|
|
44
|
+
return this._client.get('/api/minting/assets', { query, ...options });
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Pass in to see if a token is eligible for minting
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const response = await client.minting.getTokenGateStatus({
|
|
53
|
+
* collectionAddress: 'collectionAddress',
|
|
54
|
+
* mintingContractAssetId:
|
|
55
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
56
|
+
* mintingContractId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
57
|
+
* network: 'network',
|
|
58
|
+
* tokenId: 'tokenId',
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
getTokenGateStatus(
|
|
63
|
+
query: MintingGetTokenGateStatusParams,
|
|
64
|
+
options?: Core.RequestOptions,
|
|
65
|
+
): Core.APIPromise<MintingGetTokenGateStatusResponse> {
|
|
66
|
+
return this._client.get('/api/minting/token_gate', { query, ...options });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Schema for getting minting assets response
|
|
72
|
+
*/
|
|
73
|
+
export interface MintingGetAssetsResponse {
|
|
74
|
+
/**
|
|
75
|
+
* Array of minting assets
|
|
76
|
+
*/
|
|
77
|
+
data: Array<MintingGetAssetsResponse.Data>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Indicates if more pages are available
|
|
81
|
+
*/
|
|
82
|
+
hasNextPage: boolean;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export namespace MintingGetAssetsResponse {
|
|
86
|
+
export interface Data {
|
|
87
|
+
/**
|
|
88
|
+
* UUID of the minting asset
|
|
89
|
+
*/
|
|
90
|
+
id: string;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface MintingGetTokenGateStatusResponse {
|
|
95
|
+
eligible: boolean;
|
|
96
|
+
|
|
97
|
+
message: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface MintingGetAssetsParams {
|
|
101
|
+
/**
|
|
102
|
+
* Organization ID
|
|
103
|
+
*/
|
|
104
|
+
organizationId: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Website ID
|
|
108
|
+
*/
|
|
109
|
+
websiteId: string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Contract Address
|
|
113
|
+
*/
|
|
114
|
+
contractAddress?: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Currency Type
|
|
118
|
+
*/
|
|
119
|
+
currencyType?: 'loyalty' | 'native' | null;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Whether to include deleted assets in the response
|
|
123
|
+
*/
|
|
124
|
+
includeDeleted?: boolean | null;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Whether to include metadata in the response
|
|
128
|
+
*/
|
|
129
|
+
includeMetadata?: boolean | null;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Whether to include listed assets in the response
|
|
133
|
+
*/
|
|
134
|
+
isListed?: boolean | null;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Minting Contract Asset ID
|
|
138
|
+
*/
|
|
139
|
+
mintingContractAssetId?: string | null;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Comma-separated list of Minting Contract UUIDs
|
|
143
|
+
*/
|
|
144
|
+
mintingContractIds?: string | null;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Network
|
|
148
|
+
*/
|
|
149
|
+
network?:
|
|
150
|
+
| 'abstract'
|
|
151
|
+
| 'abstractTestnet'
|
|
152
|
+
| 'apechain'
|
|
153
|
+
| 'arbitrum'
|
|
154
|
+
| 'avalanche'
|
|
155
|
+
| 'avalancheFuji'
|
|
156
|
+
| 'base'
|
|
157
|
+
| 'baseSepolia'
|
|
158
|
+
| 'berachain'
|
|
159
|
+
| 'berachainArtio'
|
|
160
|
+
| 'berachainBepolia'
|
|
161
|
+
| 'binance'
|
|
162
|
+
| 'bscTestnet'
|
|
163
|
+
| 'campTestnet'
|
|
164
|
+
| 'fantom'
|
|
165
|
+
| 'fantomTestnet'
|
|
166
|
+
| 'flowMainnet'
|
|
167
|
+
| 'mainnet'
|
|
168
|
+
| 'nexusTestnet'
|
|
169
|
+
| 'optimism'
|
|
170
|
+
| 'polygon'
|
|
171
|
+
| 'polygon_mumbai'
|
|
172
|
+
| 'skaleNebula'
|
|
173
|
+
| 'skaleEuropa'
|
|
174
|
+
| 'skaleCalypso'
|
|
175
|
+
| 'solana'
|
|
176
|
+
| 'sophon'
|
|
177
|
+
| 'sophonTestnet'
|
|
178
|
+
| 'sui'
|
|
179
|
+
| 'superseed'
|
|
180
|
+
| 'superseedSepolia'
|
|
181
|
+
| 'vanar'
|
|
182
|
+
| 'xai'
|
|
183
|
+
| 'zksync'
|
|
184
|
+
| 'coti'
|
|
185
|
+
| 'cotiTestnet'
|
|
186
|
+
| 'morph'
|
|
187
|
+
| 'morphTestnet'
|
|
188
|
+
| 'morphHolesky'
|
|
189
|
+
| 'ultra'
|
|
190
|
+
| 'ultraTestnet'
|
|
191
|
+
| 'nitrograph'
|
|
192
|
+
| 'sepolia'
|
|
193
|
+
| 'optimism_sepolia'
|
|
194
|
+
| 'arbitrumSepolia'
|
|
195
|
+
| 'goerli'
|
|
196
|
+
| 'optimism_goerli'
|
|
197
|
+
| 'arbitrumGoerli'
|
|
198
|
+
| 'basecamp'
|
|
199
|
+
| 'somnia'
|
|
200
|
+
| 'zkverify'
|
|
201
|
+
| 'polkadot'
|
|
202
|
+
| 'kusama'
|
|
203
|
+
| 'flow_cadence';
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Sort Key
|
|
207
|
+
*/
|
|
208
|
+
sortBy?: 'price' | 'startsAt' | 'assetNr' | null;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Sort Dir
|
|
212
|
+
*/
|
|
213
|
+
sortDir?: 'asc' | 'desc' | null;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Status
|
|
217
|
+
*/
|
|
218
|
+
status?: 'active' | 'past' | null;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Token ID
|
|
222
|
+
*/
|
|
223
|
+
tokenId?: string | Array<number> | null;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Wallet Address
|
|
227
|
+
*/
|
|
228
|
+
walletAddress?: string | Array<string>;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface MintingGetTokenGateStatusParams {
|
|
232
|
+
collectionAddress: string;
|
|
233
|
+
|
|
234
|
+
mintingContractAssetId: string;
|
|
235
|
+
|
|
236
|
+
mintingContractId: string;
|
|
237
|
+
|
|
238
|
+
network: string;
|
|
239
|
+
|
|
240
|
+
tokenId: string;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
Minting.Status = Status;
|
|
244
|
+
Minting.Allowlist = Allowlist;
|
|
245
|
+
Minting.Contracts = Contracts;
|
|
246
|
+
|
|
247
|
+
export declare namespace Minting {
|
|
248
|
+
export {
|
|
249
|
+
type MintingGetAssetsResponse as MintingGetAssetsResponse,
|
|
250
|
+
type MintingGetTokenGateStatusResponse as MintingGetTokenGateStatusResponse,
|
|
251
|
+
type MintingGetAssetsParams as MintingGetAssetsParams,
|
|
252
|
+
type MintingGetTokenGateStatusParams as MintingGetTokenGateStatusParams,
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
export {
|
|
256
|
+
Status as Status,
|
|
257
|
+
type StatusRetrieveResponse as StatusRetrieveResponse,
|
|
258
|
+
type StatusUpdateResponse as StatusUpdateResponse,
|
|
259
|
+
type StatusUpdateParams as StatusUpdateParams,
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
export {
|
|
263
|
+
Allowlist as Allowlist,
|
|
264
|
+
type AllowlistListResponse as AllowlistListResponse,
|
|
265
|
+
type AllowlistUpsertResponse as AllowlistUpsertResponse,
|
|
266
|
+
type AllowlistListParams as AllowlistListParams,
|
|
267
|
+
type AllowlistUpsertParams as AllowlistUpsertParams,
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
export {
|
|
271
|
+
Contracts as Contracts,
|
|
272
|
+
type ContractListResponse as ContractListResponse,
|
|
273
|
+
type ContractMintResponse as ContractMintResponse,
|
|
274
|
+
type ContractListParams as ContractListParams,
|
|
275
|
+
type ContractMintParams as ContractMintParams,
|
|
276
|
+
};
|
|
277
|
+
}
|