nmkr-studio-api
Version:
Typesafe API Client to work with the NMKR Studio V2 API
73 lines • 3.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.WhitelistsService = void 0;
class WhitelistsService {
constructor(httpRequest) {
this.httpRequest = httpRequest;
}
/**
* Gets all entries of a projects whitelist
* With this call you can retrieve all entries of a whitelist of a project (if the project has one)
* @returns GetWhitelistEntriesClass Returns the complete whitelist and how much are already sold
* @throws ApiError
*/
getV2ManageWhitelist({ projectuid, }) {
return this.httpRequest.request({
method: 'GET',
url: '/v2/ManageWhitelist/{projectuid}',
path: {
projectuid: projectuid,
},
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
404: `The project was not found in our database or not assiged to your account`,
406: `Some data are not correct - eg wrong wallet address`,
},
});
}
/**
* Adds an entry to a projects whitelist
* With this call you can add an entry to a whitelist of a project (if the project has one)
* @returns any Returns when the address was added to the whitelist
* @throws ApiError
*/
postV2ManageWhitelist({ projectuid, address, countofnfts, }) {
return this.httpRequest.request({
method: 'POST',
url: '/v2/ManageWhitelist/{projectuid}/{address}/{countofnfts}',
path: {
projectuid: projectuid,
address: address,
countofnfts: countofnfts,
},
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
404: `The project was not found in our database or not assiged to your account`,
406: `Some data are not correct - eg wrong wallet address`,
},
});
}
/**
* Deletes an entry from a projects whitelist
* With this call you can delete an entry from a whitelist of a project (if the project has one)
* @returns any Returns, when the address was successfully deleted from the list
* @throws ApiError
*/
deleteV2ManageWhitelist({ projectuid, address, }) {
return this.httpRequest.request({
method: 'DELETE',
url: '/v2/ManageWhitelist/{projectuid}/{address}',
path: {
projectuid: projectuid,
address: address,
},
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
404: `The project was not found in our database or not assiged to your account`,
406: `Some data are not correct - eg wrong wallet address`,
},
});
}
}
exports.WhitelistsService = WhitelistsService;
//# sourceMappingURL=WhitelistsService.js.map