Socket
Socket
Sign inDemoInstall

@0xsequence/api

Package Overview
Dependencies
Maintainers
6
Versions
468
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/api - npm Package Compare versions

Comparing version 0.0.0-20240812142652 to 0.0.0-20240814043648

201

dist/0xsequence-api.cjs.dev.js

@@ -21,5 +21,5 @@ 'use strict';

/* eslint-disable */
// sequence-api v0.4.0 da72de09959c34a964bb84662ed6bd510f78f5cb
// sequence-api v0.4.0 d3f5f1338693d60d58f87bc408a076218201a097
// --
// Code generated by webrpc-gen@v0.18.6 with typescript generator. DO NOT EDIT.
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
//

@@ -35,3 +35,3 @@ // webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts

// Schema hash generated from your RIDL schema
const WebRPCSchemaHash = 'da72de09959c34a964bb84662ed6bd510f78f5cb';
const WebRPCSchemaHash = 'd3f5f1338693d60d58f87bc408a076218201a097';

@@ -47,2 +47,8 @@ //

}({});
let TokenType = /*#__PURE__*/function (TokenType) {
TokenType["ERC20"] = "ERC20";
TokenType["ERC721"] = "ERC721";
TokenType["ERC1155"] = "ERC1155";
return TokenType;
}({});
//

@@ -627,2 +633,181 @@ // Client

};
this.removeLinkedWallet = (args, headers, signal) => {
return this.fetch(this.url('RemoveLinkedWallet'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
status: _data.status
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.generateWaaSVerificationURL = (args, headers, signal) => {
return this.fetch(this.url('GenerateWaaSVerificationURL'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
nonce: _data.nonce,
verificationURL: _data.verificationURL
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.validateWaaSVerificationNonce = (args, headers, signal) => {
return this.fetch(this.url('ValidateWaaSVerificationNonce'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
walletAddress: _data.walletAddress
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.getSwapQuotes = (args, headers, signal) => {
return this.fetch(this.url('GetSwapQuotes'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
swapQuotes: _data.swapQuotes
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.addCurrencyGroup = (args, headers, signal) => {
return this.fetch(this.url('AddCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
groupId: _data.groupId
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.updateCurrencyGroup = (args, headers, signal) => {
return this.fetch(this.url('UpdateCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.listCurrencyGroups = (headers, signal) => {
return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
currencyGroups: _data.currencyGroups
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.deleteCurrencyGroup = (args, headers, signal) => {
return this.fetch(this.url('DeleteCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
ok: _data.ok
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.addInventoryPaymentConfig = (args, headers, signal) => {
return this.fetch(this.url('AddInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
configId: _data.configId
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.getInventoryPaymentConfig = (args, headers, signal) => {
return this.fetch(this.url('GetInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
config: _data.config
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.listInventoryPaymentConfigs = (args, headers, signal) => {
return this.fetch(this.url('ListInventoryPaymentConfigs'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
configs: _data.configs
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.updateInventoryPaymentConfig = (args, headers, signal) => {
return this.fetch(this.url('UpdateInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.deleteInventoryPaymentConfig = (args, headers, signal) => {
return this.fetch(this.url('DeleteInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
ok: _data.ok
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.requestInventoryPayment = (args, headers, signal) => {
return this.fetch(this.url('RequestInventoryPayment'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
payment: _data.payment
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.hostname = hostname;

@@ -790,2 +975,8 @@ this.fetch = (input, init) => fetch(input, init);

}
class GeoblockedError extends WebrpcError {
constructor(name = 'Geoblocked', code = 1006, message = 'Geoblocked region', status = 0, cause) {
super(name, code, message, status, cause);
Object.setPrototypeOf(this, GeoblockedError.prototype);
}
}
class InvalidArgumentError extends WebrpcError {

@@ -831,2 +1022,3 @@ constructor(name = 'InvalidArgument', code = 2000, message = 'Invalid argument', status = 0, cause) {

errors["Aborted"] = "Aborted";
errors["Geoblocked"] = "Geoblocked";
errors["InvalidArgument"] = "InvalidArgument";

@@ -854,2 +1046,3 @@ errors["Unavailable"] = "Unavailable";

[1005]: AbortedError,
[1006]: GeoblockedError,
[2000]: InvalidArgumentError,

@@ -890,2 +1083,3 @@ [2002]: UnavailableError,

exports.AbortedError = AbortedError;
exports.GeoblockedError = GeoblockedError;
exports.InvalidArgumentError = InvalidArgumentError;

@@ -898,2 +1092,3 @@ exports.NotFoundError = NotFoundError;

exports.SortOrder = SortOrder;
exports.TokenType = TokenType;
exports.UnauthorizedError = UnauthorizedError;

@@ -900,0 +1095,0 @@ exports.UnavailableError = UnavailableError;

@@ -21,5 +21,5 @@ 'use strict';

/* eslint-disable */
// sequence-api v0.4.0 da72de09959c34a964bb84662ed6bd510f78f5cb
// sequence-api v0.4.0 d3f5f1338693d60d58f87bc408a076218201a097
// --
// Code generated by webrpc-gen@v0.18.6 with typescript generator. DO NOT EDIT.
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
//

@@ -35,3 +35,3 @@ // webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts

// Schema hash generated from your RIDL schema
const WebRPCSchemaHash = 'da72de09959c34a964bb84662ed6bd510f78f5cb';
const WebRPCSchemaHash = 'd3f5f1338693d60d58f87bc408a076218201a097';

@@ -47,2 +47,8 @@ //

}({});
let TokenType = /*#__PURE__*/function (TokenType) {
TokenType["ERC20"] = "ERC20";
TokenType["ERC721"] = "ERC721";
TokenType["ERC1155"] = "ERC1155";
return TokenType;
}({});
//

@@ -627,2 +633,181 @@ // Client

};
this.removeLinkedWallet = (args, headers, signal) => {
return this.fetch(this.url('RemoveLinkedWallet'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
status: _data.status
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.generateWaaSVerificationURL = (args, headers, signal) => {
return this.fetch(this.url('GenerateWaaSVerificationURL'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
nonce: _data.nonce,
verificationURL: _data.verificationURL
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.validateWaaSVerificationNonce = (args, headers, signal) => {
return this.fetch(this.url('ValidateWaaSVerificationNonce'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
walletAddress: _data.walletAddress
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.getSwapQuotes = (args, headers, signal) => {
return this.fetch(this.url('GetSwapQuotes'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
swapQuotes: _data.swapQuotes
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.addCurrencyGroup = (args, headers, signal) => {
return this.fetch(this.url('AddCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
groupId: _data.groupId
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.updateCurrencyGroup = (args, headers, signal) => {
return this.fetch(this.url('UpdateCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.listCurrencyGroups = (headers, signal) => {
return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
currencyGroups: _data.currencyGroups
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.deleteCurrencyGroup = (args, headers, signal) => {
return this.fetch(this.url('DeleteCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
ok: _data.ok
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.addInventoryPaymentConfig = (args, headers, signal) => {
return this.fetch(this.url('AddInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
configId: _data.configId
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.getInventoryPaymentConfig = (args, headers, signal) => {
return this.fetch(this.url('GetInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
config: _data.config
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.listInventoryPaymentConfigs = (args, headers, signal) => {
return this.fetch(this.url('ListInventoryPaymentConfigs'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
configs: _data.configs
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.updateInventoryPaymentConfig = (args, headers, signal) => {
return this.fetch(this.url('UpdateInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.deleteInventoryPaymentConfig = (args, headers, signal) => {
return this.fetch(this.url('DeleteInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
ok: _data.ok
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.requestInventoryPayment = (args, headers, signal) => {
return this.fetch(this.url('RequestInventoryPayment'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
payment: _data.payment
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.hostname = hostname;

@@ -790,2 +975,8 @@ this.fetch = (input, init) => fetch(input, init);

}
class GeoblockedError extends WebrpcError {
constructor(name = 'Geoblocked', code = 1006, message = 'Geoblocked region', status = 0, cause) {
super(name, code, message, status, cause);
Object.setPrototypeOf(this, GeoblockedError.prototype);
}
}
class InvalidArgumentError extends WebrpcError {

@@ -831,2 +1022,3 @@ constructor(name = 'InvalidArgument', code = 2000, message = 'Invalid argument', status = 0, cause) {

errors["Aborted"] = "Aborted";
errors["Geoblocked"] = "Geoblocked";
errors["InvalidArgument"] = "InvalidArgument";

@@ -854,2 +1046,3 @@ errors["Unavailable"] = "Unavailable";

[1005]: AbortedError,
[1006]: GeoblockedError,
[2000]: InvalidArgumentError,

@@ -890,2 +1083,3 @@ [2002]: UnavailableError,

exports.AbortedError = AbortedError;
exports.GeoblockedError = GeoblockedError;
exports.InvalidArgumentError = InvalidArgumentError;

@@ -898,2 +1092,3 @@ exports.NotFoundError = NotFoundError;

exports.SortOrder = SortOrder;
exports.TokenType = TokenType;
exports.UnauthorizedError = UnauthorizedError;

@@ -900,0 +1095,0 @@ exports.UnavailableError = UnavailableError;

@@ -17,5 +17,5 @@ function _extends() {

/* eslint-disable */
// sequence-api v0.4.0 da72de09959c34a964bb84662ed6bd510f78f5cb
// sequence-api v0.4.0 d3f5f1338693d60d58f87bc408a076218201a097
// --
// Code generated by webrpc-gen@v0.18.6 with typescript generator. DO NOT EDIT.
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
//

@@ -31,3 +31,3 @@ // webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts

// Schema hash generated from your RIDL schema
const WebRPCSchemaHash = 'da72de09959c34a964bb84662ed6bd510f78f5cb';
const WebRPCSchemaHash = 'd3f5f1338693d60d58f87bc408a076218201a097';

@@ -43,2 +43,8 @@ //

}({});
let TokenType = /*#__PURE__*/function (TokenType) {
TokenType["ERC20"] = "ERC20";
TokenType["ERC721"] = "ERC721";
TokenType["ERC1155"] = "ERC1155";
return TokenType;
}({});
//

@@ -623,2 +629,181 @@ // Client

};
this.removeLinkedWallet = (args, headers, signal) => {
return this.fetch(this.url('RemoveLinkedWallet'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
status: _data.status
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.generateWaaSVerificationURL = (args, headers, signal) => {
return this.fetch(this.url('GenerateWaaSVerificationURL'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
nonce: _data.nonce,
verificationURL: _data.verificationURL
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.validateWaaSVerificationNonce = (args, headers, signal) => {
return this.fetch(this.url('ValidateWaaSVerificationNonce'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
walletAddress: _data.walletAddress
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.getSwapQuotes = (args, headers, signal) => {
return this.fetch(this.url('GetSwapQuotes'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
swapQuotes: _data.swapQuotes
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.addCurrencyGroup = (args, headers, signal) => {
return this.fetch(this.url('AddCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
groupId: _data.groupId
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.updateCurrencyGroup = (args, headers, signal) => {
return this.fetch(this.url('UpdateCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.listCurrencyGroups = (headers, signal) => {
return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
currencyGroups: _data.currencyGroups
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.deleteCurrencyGroup = (args, headers, signal) => {
return this.fetch(this.url('DeleteCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
ok: _data.ok
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.addInventoryPaymentConfig = (args, headers, signal) => {
return this.fetch(this.url('AddInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
configId: _data.configId
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.getInventoryPaymentConfig = (args, headers, signal) => {
return this.fetch(this.url('GetInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
config: _data.config
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.listInventoryPaymentConfigs = (args, headers, signal) => {
return this.fetch(this.url('ListInventoryPaymentConfigs'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
configs: _data.configs
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.updateInventoryPaymentConfig = (args, headers, signal) => {
return this.fetch(this.url('UpdateInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.deleteInventoryPaymentConfig = (args, headers, signal) => {
return this.fetch(this.url('DeleteInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
ok: _data.ok
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.requestInventoryPayment = (args, headers, signal) => {
return this.fetch(this.url('RequestInventoryPayment'), createHTTPRequest(args, headers, signal)).then(res => {
return buildResponse(res).then(_data => {
return {
payment: _data.payment
};
});
}, error => {
throw WebrpcRequestFailedError.new({
cause: `fetch(): ${error.message || ''}`
});
});
};
this.hostname = hostname;

@@ -786,2 +971,8 @@ this.fetch = (input, init) => fetch(input, init);

}
class GeoblockedError extends WebrpcError {
constructor(name = 'Geoblocked', code = 1006, message = 'Geoblocked region', status = 0, cause) {
super(name, code, message, status, cause);
Object.setPrototypeOf(this, GeoblockedError.prototype);
}
}
class InvalidArgumentError extends WebrpcError {

@@ -827,2 +1018,3 @@ constructor(name = 'InvalidArgument', code = 2000, message = 'Invalid argument', status = 0, cause) {

errors["Aborted"] = "Aborted";
errors["Geoblocked"] = "Geoblocked";
errors["InvalidArgument"] = "InvalidArgument";

@@ -850,2 +1042,3 @@ errors["Unavailable"] = "Unavailable";

[1005]: AbortedError,
[1006]: GeoblockedError,
[2000]: InvalidArgumentError,

@@ -884,2 +1077,2 @@ [2002]: UnavailableError,

export { API, AbortedError, InvalidArgumentError, NotFoundError, PermissionDeniedError, QueryFailedError, SequenceAPIClient, SessionExpiredError, SortOrder, UnauthorizedError, UnavailableError, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion, WebrpcBadMethodError, WebrpcBadRequestError, WebrpcBadResponseError, WebrpcBadRouteError, WebrpcClientDisconnectedError, WebrpcEndpointError, WebrpcError, WebrpcInternalErrorError, WebrpcRequestFailedError, WebrpcServerPanicError, WebrpcStreamFinishedError, WebrpcStreamLostError, errors };
export { API, AbortedError, GeoblockedError, InvalidArgumentError, NotFoundError, PermissionDeniedError, QueryFailedError, SequenceAPIClient, SessionExpiredError, SortOrder, TokenType, UnauthorizedError, UnavailableError, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion, WebrpcBadMethodError, WebrpcBadRequestError, WebrpcBadResponseError, WebrpcBadRouteError, WebrpcClientDisconnectedError, WebrpcEndpointError, WebrpcError, WebrpcInternalErrorError, WebrpcRequestFailedError, WebrpcServerPanicError, WebrpcStreamFinishedError, WebrpcStreamLostError, errors };
export declare const WebRPCVersion = "v1";
export declare const WebRPCSchemaVersion = "v0.4.0";
export declare const WebRPCSchemaHash = "da72de09959c34a964bb84662ed6bd510f78f5cb";
export declare const WebRPCSchemaHash = "d3f5f1338693d60d58f87bc408a076218201a097";
export declare enum SortOrder {

@@ -8,2 +8,7 @@ DESC = "DESC",

}
export declare enum TokenType {
ERC20 = "ERC20",
ERC721 = "ERC721",
ERC1155 = "ERC1155"
}
export interface Version {

@@ -166,2 +171,9 @@ webrpcVersion: string;

decimals?: number;
tokenAmount: string;
tokenAddress: string;
tokenSymbol: string;
tokenDecimals?: number;
calldata: string;
platform: string;
approvedSpenderAddress?: string;
}

@@ -196,2 +208,64 @@ export interface NftCheckout {

}
export interface SwapQuote {
currencyAddress: string;
currencyBalance: string;
price: string;
maxPrice: string;
to: string;
transactionData: string;
approveData: string;
}
export interface CurrencyGroup {
id: number;
name: string;
tokens: Array<CurrencyGroupToken>;
}
export interface CurrencyGroupToken {
id: number;
currencyGroupId: number;
chainId: number;
tokenAddress: string;
}
export interface InventoryPaymentConfig {
id: number;
projectId: number;
chainId: number;
externalProductId: string;
paymentTokenAddress: string;
paymentTokenType: TokenType;
paymentTokenId: number;
paymentAmount: number;
paymentRecipient: string;
chainedCallAddress?: string;
chainedCallData?: string;
allowCrossChainPayments?: boolean;
callbackURL?: string;
createdAt: string;
deletedAt?: string;
}
export interface InventoryPayment {
id: number;
inventoryPaymentConfigId: number;
productRecipient: string;
paymentChainId: number;
paymentTokenAddress: string;
expiration: string;
createdAt: string;
completedAt?: string;
processedAt?: string;
}
export interface InventoryPaymentResponse {
paymentId: number;
inventoryPaymentConfigId: number;
chainId: number;
externalProductId: string;
paymentTokenAddress: string;
paymentTokenType: TokenType;
paymentTokenId: number;
paymentTotal: number;
expiration: string;
signature: string;
txTo: string;
txData: string;
}
export interface API {

@@ -241,2 +315,16 @@ ping(headers?: object, signal?: AbortSignal): Promise<PingReturn>;

getLinkedWallets(args: GetLinkedWalletsArgs, headers?: object, signal?: AbortSignal): Promise<GetLinkedWalletsReturn>;
removeLinkedWallet(args: RemoveLinkedWalletArgs, headers?: object, signal?: AbortSignal): Promise<RemoveLinkedWalletReturn>;
generateWaaSVerificationURL(args: GenerateWaaSVerificationURLArgs, headers?: object, signal?: AbortSignal): Promise<GenerateWaaSVerificationURLReturn>;
validateWaaSVerificationNonce(args: ValidateWaaSVerificationNonceArgs, headers?: object, signal?: AbortSignal): Promise<ValidateWaaSVerificationNonceReturn>;
getSwapQuotes(args: GetSwapQuotesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuotesReturn>;
addCurrencyGroup(args: AddCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<AddCurrencyGroupReturn>;
updateCurrencyGroup(args: UpdateCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<UpdateCurrencyGroupReturn>;
listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn>;
deleteCurrencyGroup(args: DeleteCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<DeleteCurrencyGroupReturn>;
addInventoryPaymentConfig(args: AddInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<AddInventoryPaymentConfigReturn>;
getInventoryPaymentConfig(args: GetInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<GetInventoryPaymentConfigReturn>;
listInventoryPaymentConfigs(args: ListInventoryPaymentConfigsArgs, headers?: object, signal?: AbortSignal): Promise<ListInventoryPaymentConfigsReturn>;
updateInventoryPaymentConfig(args: UpdateInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<UpdateInventoryPaymentConfigReturn>;
deleteInventoryPaymentConfig(args: DeleteInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<DeleteInventoryPaymentConfigReturn>;
requestInventoryPayment(args: RequestInventoryPaymentArgs, headers?: object, signal?: AbortSignal): Promise<RequestInventoryPaymentReturn>;
}

@@ -545,2 +633,98 @@ export interface PingArgs {

}
export interface RemoveLinkedWalletArgs {
chainId: string;
walletAddress: string;
ethAuthProofString: string;
linkedWalletMessage: string;
linkedWalletSignature: string;
}
export interface RemoveLinkedWalletReturn {
status: boolean;
}
export interface GenerateWaaSVerificationURLArgs {
walletAddress: string;
}
export interface GenerateWaaSVerificationURLReturn {
nonce: string;
verificationURL: string;
}
export interface ValidateWaaSVerificationNonceArgs {
nonce: string;
signature: string;
sessionId: string;
chainId: string;
}
export interface ValidateWaaSVerificationNonceReturn {
walletAddress: string;
}
export interface GetSwapQuotesArgs {
userAddress: string;
currencyAddress: string;
currencyAmount: string;
chainId: number;
includeApprove: boolean;
}
export interface GetSwapQuotesReturn {
swapQuotes: Array<SwapQuote>;
}
export interface AddCurrencyGroupArgs {
currencyGroup: CurrencyGroup;
}
export interface AddCurrencyGroupReturn {
groupId: number;
}
export interface UpdateCurrencyGroupArgs {
currencyGroup: CurrencyGroup;
}
export interface UpdateCurrencyGroupReturn {
}
export interface ListCurrencyGroupsArgs {
}
export interface ListCurrencyGroupsReturn {
currencyGroups: Array<CurrencyGroup>;
}
export interface DeleteCurrencyGroupArgs {
groupId: number;
}
export interface DeleteCurrencyGroupReturn {
ok: boolean;
}
export interface AddInventoryPaymentConfigArgs {
config: InventoryPaymentConfig;
}
export interface AddInventoryPaymentConfigReturn {
configId: number;
}
export interface GetInventoryPaymentConfigArgs {
configId: number;
}
export interface GetInventoryPaymentConfigReturn {
config: InventoryPaymentConfig;
}
export interface ListInventoryPaymentConfigsArgs {
projectId: number;
}
export interface ListInventoryPaymentConfigsReturn {
configs: Array<InventoryPaymentConfig>;
}
export interface UpdateInventoryPaymentConfigArgs {
config: InventoryPaymentConfig;
}
export interface UpdateInventoryPaymentConfigReturn {
}
export interface DeleteInventoryPaymentConfigArgs {
configId: number;
}
export interface DeleteInventoryPaymentConfigReturn {
ok: boolean;
}
export interface RequestInventoryPaymentArgs {
configId: number;
recipient: string;
chainId?: number;
tokenAddress?: string;
}
export interface RequestInventoryPaymentReturn {
payment: InventoryPaymentResponse;
}
export declare class API implements API {

@@ -595,2 +779,16 @@ protected hostname: string;

getLinkedWallets: (args: GetLinkedWalletsArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetLinkedWalletsReturn>;
removeLinkedWallet: (args: RemoveLinkedWalletArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<RemoveLinkedWalletReturn>;
generateWaaSVerificationURL: (args: GenerateWaaSVerificationURLArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GenerateWaaSVerificationURLReturn>;
validateWaaSVerificationNonce: (args: ValidateWaaSVerificationNonceArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ValidateWaaSVerificationNonceReturn>;
getSwapQuotes: (args: GetSwapQuotesArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetSwapQuotesReturn>;
addCurrencyGroup: (args: AddCurrencyGroupArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<AddCurrencyGroupReturn>;
updateCurrencyGroup: (args: UpdateCurrencyGroupArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<UpdateCurrencyGroupReturn>;
listCurrencyGroups: (headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ListCurrencyGroupsReturn>;
deleteCurrencyGroup: (args: DeleteCurrencyGroupArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<DeleteCurrencyGroupReturn>;
addInventoryPaymentConfig: (args: AddInventoryPaymentConfigArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<AddInventoryPaymentConfigReturn>;
getInventoryPaymentConfig: (args: GetInventoryPaymentConfigArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetInventoryPaymentConfigReturn>;
listInventoryPaymentConfigs: (args: ListInventoryPaymentConfigsArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ListInventoryPaymentConfigsReturn>;
updateInventoryPaymentConfig: (args: UpdateInventoryPaymentConfigArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<UpdateInventoryPaymentConfigReturn>;
deleteInventoryPaymentConfig: (args: DeleteInventoryPaymentConfigArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<DeleteInventoryPaymentConfigReturn>;
requestInventoryPayment: (args: RequestInventoryPaymentArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<RequestInventoryPaymentReturn>;
}

@@ -653,2 +851,5 @@ export declare class WebrpcError extends Error {

}
export declare class GeoblockedError extends WebrpcError {
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string);
}
export declare class InvalidArgumentError extends WebrpcError {

@@ -682,2 +883,3 @@ constructor(name?: string, code?: number, message?: string, status?: number, cause?: string);

Aborted = "Aborted",
Geoblocked = "Geoblocked",
InvalidArgument = "InvalidArgument",

@@ -684,0 +886,0 @@ Unavailable = "Unavailable",

2

package.json
{
"name": "@0xsequence/api",
"version": "0.0.0-20240812142652",
"version": "0.0.0-20240814043648",
"description": "api sub-package for Sequence",

@@ -5,0 +5,0 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/api",

/* eslint-disable */
// sequence-api v0.4.0 da72de09959c34a964bb84662ed6bd510f78f5cb
// sequence-api v0.4.0 d3f5f1338693d60d58f87bc408a076218201a097
// --
// Code generated by webrpc-gen@v0.18.6 with typescript generator. DO NOT EDIT.
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
//

@@ -15,3 +15,3 @@ // webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts

// Schema hash generated from your RIDL schema
export const WebRPCSchemaHash = 'da72de09959c34a964bb84662ed6bd510f78f5cb'
export const WebRPCSchemaHash = 'd3f5f1338693d60d58f87bc408a076218201a097'

@@ -27,2 +27,8 @@ //

export enum TokenType {
ERC20 = 'ERC20',
ERC721 = 'ERC721',
ERC1155 = 'ERC1155'
}
export interface Version {

@@ -204,2 +210,9 @@ webrpcVersion: string

decimals?: number
tokenAmount: string
tokenAddress: string
tokenSymbol: string
tokenDecimals?: number
calldata: string
platform: string
approvedSpenderAddress?: string
}

@@ -237,2 +250,70 @@

export interface SwapQuote {
currencyAddress: string
currencyBalance: string
price: string
maxPrice: string
to: string
transactionData: string
approveData: string
}
export interface CurrencyGroup {
id: number
name: string
tokens: Array<CurrencyGroupToken>
}
export interface CurrencyGroupToken {
id: number
currencyGroupId: number
chainId: number
tokenAddress: string
}
export interface InventoryPaymentConfig {
id: number
projectId: number
chainId: number
externalProductId: string
paymentTokenAddress: string
paymentTokenType: TokenType
paymentTokenId: number
paymentAmount: number
paymentRecipient: string
chainedCallAddress?: string
chainedCallData?: string
allowCrossChainPayments?: boolean
callbackURL?: string
createdAt: string
deletedAt?: string
}
export interface InventoryPayment {
id: number
inventoryPaymentConfigId: number
productRecipient: string
paymentChainId: number
paymentTokenAddress: string
expiration: string
createdAt: string
completedAt?: string
processedAt?: string
}
export interface InventoryPaymentResponse {
paymentId: number
inventoryPaymentConfigId: number
chainId: number
externalProductId: string
paymentTokenAddress: string
paymentTokenType: TokenType
paymentTokenId: number
paymentTotal: number
expiration: string
signature: string
txTo: string
txData: string
}
export interface API {

@@ -318,2 +399,48 @@ ping(headers?: object, signal?: AbortSignal): Promise<PingReturn>

getLinkedWallets(args: GetLinkedWalletsArgs, headers?: object, signal?: AbortSignal): Promise<GetLinkedWalletsReturn>
removeLinkedWallet(args: RemoveLinkedWalletArgs, headers?: object, signal?: AbortSignal): Promise<RemoveLinkedWalletReturn>
generateWaaSVerificationURL(
args: GenerateWaaSVerificationURLArgs,
headers?: object,
signal?: AbortSignal
): Promise<GenerateWaaSVerificationURLReturn>
validateWaaSVerificationNonce(
args: ValidateWaaSVerificationNonceArgs,
headers?: object,
signal?: AbortSignal
): Promise<ValidateWaaSVerificationNonceReturn>
getSwapQuotes(args: GetSwapQuotesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuotesReturn>
addCurrencyGroup(args: AddCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<AddCurrencyGroupReturn>
updateCurrencyGroup(args: UpdateCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<UpdateCurrencyGroupReturn>
listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn>
deleteCurrencyGroup(args: DeleteCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<DeleteCurrencyGroupReturn>
addInventoryPaymentConfig(
args: AddInventoryPaymentConfigArgs,
headers?: object,
signal?: AbortSignal
): Promise<AddInventoryPaymentConfigReturn>
getInventoryPaymentConfig(
args: GetInventoryPaymentConfigArgs,
headers?: object,
signal?: AbortSignal
): Promise<GetInventoryPaymentConfigReturn>
listInventoryPaymentConfigs(
args: ListInventoryPaymentConfigsArgs,
headers?: object,
signal?: AbortSignal
): Promise<ListInventoryPaymentConfigsReturn>
updateInventoryPaymentConfig(
args: UpdateInventoryPaymentConfigArgs,
headers?: object,
signal?: AbortSignal
): Promise<UpdateInventoryPaymentConfigReturn>
deleteInventoryPaymentConfig(
args: DeleteInventoryPaymentConfigArgs,
headers?: object,
signal?: AbortSignal
): Promise<DeleteInventoryPaymentConfigReturn>
requestInventoryPayment(
args: RequestInventoryPaymentArgs,
headers?: object,
signal?: AbortSignal
): Promise<RequestInventoryPaymentReturn>
}

@@ -657,3 +784,110 @@

}
export interface RemoveLinkedWalletArgs {
chainId: string
walletAddress: string
ethAuthProofString: string
linkedWalletMessage: string
linkedWalletSignature: string
}
export interface RemoveLinkedWalletReturn {
status: boolean
}
export interface GenerateWaaSVerificationURLArgs {
walletAddress: string
}
export interface GenerateWaaSVerificationURLReturn {
nonce: string
verificationURL: string
}
export interface ValidateWaaSVerificationNonceArgs {
nonce: string
signature: string
sessionId: string
chainId: string
}
export interface ValidateWaaSVerificationNonceReturn {
walletAddress: string
}
export interface GetSwapQuotesArgs {
userAddress: string
currencyAddress: string
currencyAmount: string
chainId: number
includeApprove: boolean
}
export interface GetSwapQuotesReturn {
swapQuotes: Array<SwapQuote>
}
export interface AddCurrencyGroupArgs {
currencyGroup: CurrencyGroup
}
export interface AddCurrencyGroupReturn {
groupId: number
}
export interface UpdateCurrencyGroupArgs {
currencyGroup: CurrencyGroup
}
export interface UpdateCurrencyGroupReturn {}
export interface ListCurrencyGroupsArgs {}
export interface ListCurrencyGroupsReturn {
currencyGroups: Array<CurrencyGroup>
}
export interface DeleteCurrencyGroupArgs {
groupId: number
}
export interface DeleteCurrencyGroupReturn {
ok: boolean
}
export interface AddInventoryPaymentConfigArgs {
config: InventoryPaymentConfig
}
export interface AddInventoryPaymentConfigReturn {
configId: number
}
export interface GetInventoryPaymentConfigArgs {
configId: number
}
export interface GetInventoryPaymentConfigReturn {
config: InventoryPaymentConfig
}
export interface ListInventoryPaymentConfigsArgs {
projectId: number
}
export interface ListInventoryPaymentConfigsReturn {
configs: Array<InventoryPaymentConfig>
}
export interface UpdateInventoryPaymentConfigArgs {
config: InventoryPaymentConfig
}
export interface UpdateInventoryPaymentConfigReturn {}
export interface DeleteInventoryPaymentConfigArgs {
configId: number
}
export interface DeleteInventoryPaymentConfigReturn {
ok: boolean
}
export interface RequestInventoryPaymentArgs {
configId: number
recipient: string
chainId?: number
tokenAddress?: string
}
export interface RequestInventoryPaymentReturn {
payment: InventoryPaymentResponse
}
//

@@ -1392,2 +1626,253 @@ // Client

}
removeLinkedWallet = (
args: RemoveLinkedWalletArgs,
headers?: object,
signal?: AbortSignal
): Promise<RemoveLinkedWalletReturn> => {
return this.fetch(this.url('RemoveLinkedWallet'), createHTTPRequest(args, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {
status: <boolean>_data.status
}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
generateWaaSVerificationURL = (
args: GenerateWaaSVerificationURLArgs,
headers?: object,
signal?: AbortSignal
): Promise<GenerateWaaSVerificationURLReturn> => {
return this.fetch(this.url('GenerateWaaSVerificationURL'), createHTTPRequest(args, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {
nonce: <string>_data.nonce,
verificationURL: <string>_data.verificationURL
}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
validateWaaSVerificationNonce = (
args: ValidateWaaSVerificationNonceArgs,
headers?: object,
signal?: AbortSignal
): Promise<ValidateWaaSVerificationNonceReturn> => {
return this.fetch(this.url('ValidateWaaSVerificationNonce'), createHTTPRequest(args, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {
walletAddress: <string>_data.walletAddress
}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
getSwapQuotes = (args: GetSwapQuotesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuotesReturn> => {
return this.fetch(this.url('GetSwapQuotes'), createHTTPRequest(args, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {
swapQuotes: <Array<SwapQuote>>_data.swapQuotes
}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
addCurrencyGroup = (args: AddCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<AddCurrencyGroupReturn> => {
return this.fetch(this.url('AddCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {
groupId: <number>_data.groupId
}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
updateCurrencyGroup = (
args: UpdateCurrencyGroupArgs,
headers?: object,
signal?: AbortSignal
): Promise<UpdateCurrencyGroupReturn> => {
return this.fetch(this.url('UpdateCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
listCurrencyGroups = (headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn> => {
return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {
currencyGroups: <Array<CurrencyGroup>>_data.currencyGroups
}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
deleteCurrencyGroup = (
args: DeleteCurrencyGroupArgs,
headers?: object,
signal?: AbortSignal
): Promise<DeleteCurrencyGroupReturn> => {
return this.fetch(this.url('DeleteCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {
ok: <boolean>_data.ok
}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
addInventoryPaymentConfig = (
args: AddInventoryPaymentConfigArgs,
headers?: object,
signal?: AbortSignal
): Promise<AddInventoryPaymentConfigReturn> => {
return this.fetch(this.url('AddInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {
configId: <number>_data.configId
}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
getInventoryPaymentConfig = (
args: GetInventoryPaymentConfigArgs,
headers?: object,
signal?: AbortSignal
): Promise<GetInventoryPaymentConfigReturn> => {
return this.fetch(this.url('GetInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {
config: <InventoryPaymentConfig>_data.config
}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
listInventoryPaymentConfigs = (
args: ListInventoryPaymentConfigsArgs,
headers?: object,
signal?: AbortSignal
): Promise<ListInventoryPaymentConfigsReturn> => {
return this.fetch(this.url('ListInventoryPaymentConfigs'), createHTTPRequest(args, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {
configs: <Array<InventoryPaymentConfig>>_data.configs
}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
updateInventoryPaymentConfig = (
args: UpdateInventoryPaymentConfigArgs,
headers?: object,
signal?: AbortSignal
): Promise<UpdateInventoryPaymentConfigReturn> => {
return this.fetch(this.url('UpdateInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
deleteInventoryPaymentConfig = (
args: DeleteInventoryPaymentConfigArgs,
headers?: object,
signal?: AbortSignal
): Promise<DeleteInventoryPaymentConfigReturn> => {
return this.fetch(this.url('DeleteInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {
ok: <boolean>_data.ok
}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
requestInventoryPayment = (
args: RequestInventoryPaymentArgs,
headers?: object,
signal?: AbortSignal
): Promise<RequestInventoryPaymentReturn> => {
return this.fetch(this.url('RequestInventoryPayment'), createHTTPRequest(args, headers, signal)).then(
res => {
return buildResponse(res).then(_data => {
return {
payment: <InventoryPaymentResponse>_data.payment
}
})
},
error => {
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
}
)
}
}

@@ -1656,2 +2141,15 @@

export class GeoblockedError extends WebrpcError {
constructor(
name: string = 'Geoblocked',
code: number = 1006,
message: string = 'Geoblocked region',
status: number = 0,
cause?: string
) {
super(name, code, message, status, cause)
Object.setPrototypeOf(this, GeoblockedError.prototype)
}
}
export class InvalidArgumentError extends WebrpcError {

@@ -1725,2 +2223,3 @@ constructor(

Aborted = 'Aborted',
Geoblocked = 'Geoblocked',
InvalidArgument = 'InvalidArgument',

@@ -1748,2 +2247,3 @@ Unavailable = 'Unavailable',

[1005]: AbortedError,
[1006]: GeoblockedError,
[2000]: InvalidArgumentError,

@@ -1750,0 +2250,0 @@ [2002]: UnavailableError,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc