diff --git a/openapi.json b/openapi.json index 4978faa4..4e41c37c 100644 --- a/openapi.json +++ b/openapi.json @@ -812,13 +812,13 @@ { "type": "string", "description": "Minimum timestamp for this deposit, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", - "name": "updated_min_timestamp", + "name": "min_timestamp", "in": "query" }, { "type": "string", "description": "Maximum timestamp for this deposit, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", - "name": "updated_max_timestamp", + "name": "max_timestamp", "in": "query" }, { @@ -3545,14 +3545,14 @@ }, "/v2/nft/primary": { "get": { - "description": "Returns a list of NFT primary transactions", + "description": "Returns a list of NFT primary sales transactions", "produces": [ "application/json" ], "tags": [ "nft-checkout-primary" ], - "summary": "Get a list of NFT primary transactions", + "summary": "Get a list of NFT primary sales transactions", "operationId": "getNftPrimaryTransactions", "parameters": [ { @@ -3606,10 +3606,17 @@ { "type": "string", "description": "Ethereum address of the user who wants to create transaction", - "name": "wallet_address", + "name": "user_wallet_address", "in": "query" }, { + "enum": [ + "created", + "waitingPayment", + "pending", + "completed", + "failed" + ], "type": "string", "description": "Transaction status", "name": "status", @@ -3617,17 +3624,16 @@ }, { "enum": [ - "moonpay", - "layerswap" + "moonpay" ], "type": "string", - "description": "Provider name", + "description": "Checkout provider name", "name": "provider", "in": "query" }, { "type": "string", - "description": "Mint id", + "description": "Minting transaction ID - see mintTokens response", "name": "mint_id", "in": "query" } @@ -3648,7 +3654,7 @@ } }, "post": { - "description": "creates nft primary transaction", + "description": "Creates a transaction representing minting an NFT with a card payment.", "consumes": [ "application/json" ], @@ -3658,7 +3664,7 @@ "tags": [ "nft-checkout-primary" ], - "summary": "Create nft primary transaction", + "summary": "Create NFT primary sale transaction", "operationId": "createNftPrimary", "parameters": [ { @@ -3734,9 +3740,50 @@ } } }, + "/v2/nft/primary/register": { + "post": { + "description": "Registers a new contract for use in the minting with fiat card flow", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "nft-checkout-primary" + ], + "summary": "Executes NFT primary sales contract registration", + "operationId": "registerNftPrimarySalesContract", + "parameters": [ + { + "description": "req", + "name": "CreateAPIRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/contract.CreateAPIRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/contract.CreateResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/lambdas.APIError" + } + } + } + } + }, "/v2/nft/primary/{transaction_id}": { "get": { - "description": "gets nft primary transaction by transaction id", + "description": "given a transaction id, returns the corresponding transaction representing a mint executed from a card payment", "consumes": [ "application/json" ], @@ -3746,7 +3793,7 @@ "tags": [ "nft-checkout-primary" ], - "summary": "Get nft primary transaction by id", + "summary": "Get NFT primary sale transaction by id", "operationId": "getNftPrimaryTransaction", "parameters": [ { @@ -3773,6 +3820,274 @@ } } }, + "/v2/nft/secondary": { + "get": { + "description": "Returns a list of successful non-crypto checkout transactions", + "produces": [ + "application/json" + ], + "tags": [ + "non-crypto-checkout" + ], + "summary": "Get a list of non-crypto checkout transactions", + "operationId": "getNonCryptoCheckoutTransactions", + "parameters": [ + { + "type": "integer", + "description": "Page size of the result", + "name": "page_size", + "in": "query" + }, + { + "type": "string", + "description": "Cursor", + "name": "cursor", + "in": "query" + }, + { + "enum": [ + "transaction_id", + "status", + "amount", + "mint_id" + ], + "type": "string", + "description": "Property to sort by", + "name": "order_by", + "in": "query" + }, + { + "type": "string", + "description": "Direction to sort (asc/desc)", + "name": "direction", + "in": "query" + }, + { + "type": "string", + "description": "Transaction ID", + "name": "transaction_id", + "in": "query" + }, + { + "type": "integer", + "description": "Order ID", + "name": "order_id", + "in": "query" + }, + { + "type": "string", + "description": "Ethereum address of the user who wants to create transaction", + "name": "wallet_address", + "in": "query" + }, + { + "type": "string", + "description": "Transaction status", + "name": "status", + "in": "query" + }, + { + "enum": [ + "moonpay" + ], + "type": "string", + "description": "Name of provider of non-crypto checkout integration", + "name": "provider", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/nftsecondarytransaction.ListTransactionsResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/lambdas.APIError" + } + } + } + }, + "post": { + "description": "Creates a transaction to purchase an asset via a non-crypto checkout method", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "non-crypto-checkout" + ], + "summary": "Create a non-crypto checkout transaction", + "operationId": "createNonCryptoCheckoutTransaction", + "parameters": [ + { + "description": "req", + "name": "CreateAPIRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/nftsecondarytransaction.CreateAPIRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/nftsecondarytransaction.CreateResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/lambdas.APIError" + } + } + } + } + }, + "/v2/nft/secondary/verify/{provider}/order/{order_id}": { + "get": { + "description": "Checks if an order can be purchased via a non-crypto checkout method", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "non-crypto-checkout" + ], + "summary": "Get orders eligible for non-crypto checkout", + "operationId": "getNonCryptoCheckoutOrderAvailability", + "parameters": [ + { + "enum": [ + "moonpay" + ], + "type": "string", + "description": "Name of provider of non-crypto checkout integration", + "name": "provider", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Order ID", + "name": "order_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/nftsecondarytransaction.CheckOrderResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/lambdas.APIError" + } + } + } + } + }, + "/v2/nft/secondary/verify/{provider}/user/{wallet_address}": { + "get": { + "description": "Gets the KYC status (`{ verified: true | false }`) of a user for selling NFTs via non-crypto checkout", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "non-crypto-checkout" + ], + "summary": "Get KYC status of a seller of a non-crypto checkout order", + "operationId": "getNonCryptoCheckoutSellerKycStatus", + "parameters": [ + { + "enum": [ + "moonpay" + ], + "type": "string", + "description": "Name of provider of non-crypto checkout integration", + "name": "provider", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Seller's ImmutableX (L2) wallet address", + "name": "wallet_address", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/nftsecondarytransaction.CheckUserResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/lambdas.APIError" + } + } + } + } + }, + "/v2/nft/secondary/{transaction_id}": { + "get": { + "description": "Gets non-crypto checkout transaction by its ID", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "non-crypto-checkout" + ], + "summary": "Get non-crypto checkout transaction by ID", + "operationId": "getNonCryptoCheckoutTransaction", + "parameters": [ + { + "type": "string", + "description": "Transaction ID", + "name": "transaction_id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/nftsecondarytransaction.GetTransactionResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/lambdas.APIError" + } + } + } + } + }, "/v2/signable-transfer-details": { "post": { "description": "Gets bulk details of a signable transfer", @@ -3905,56 +4220,6 @@ } } }, - "/v2/{provider}/transaction_status": { - "get": { - "description": "gets mint status by transaction ids", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "nft-checkout-primary" - ], - "summary": "Get mint status by transaction id", - "operationId": "getMintStatusById", - "parameters": [ - { - "enum": [ - "moonpay", - "layerswap" - ], - "type": "string", - "description": "Provider name", - "name": "provider", - "in": "path", - "required": true - }, - { - "type": "string", - "description": "transaction id", - "name": "id", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/provider.GetMintStatusResponse" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/lambdas.APIError" - } - } - } - } - }, "/v3/exchanges": { "get": { "description": "Returns a list of exchanges based on the request", @@ -6901,12 +7166,14 @@ "type": "object", "properties": { "data": { - "description": "Token data. See https://docs.x.immutable.com/docs/token-data-object" + "description": "Token data. See https://docs.x.immutable.com/docs/token-data-object\"", + "type": "object", + "additionalProperties": true }, "type": { "description": "Type of token", "type": "string", - "example": "ETH/ERC20/ERC721" + "example": "ETH/ERC20" } } }, @@ -7343,6 +7610,28 @@ } } }, + "contract.CreateAPIRequest": { + "type": "object", + "properties": { + "contract_address": { + "type": "string" + }, + "data_url": { + "type": "string" + }, + "mint_url": { + "type": "string" + } + } + }, + "contract.CreateResponse": { + "type": "object", + "properties": { + "webhook_hash": { + "type": "string" + } + } + }, "encodeAssetRequestToken": { "type": "object", "properties": { @@ -7444,7 +7733,7 @@ "type": "string" }, "offer_id": { - "description": "Temporary asset id", + "description": "Temporary asset id. Might be a token id if the token id is known or a generic description if it's not", "type": "string" }, "provider": { @@ -7452,11 +7741,11 @@ "type": "string" }, "seller_wallet_address": { - "description": "Ethereum address of the seller", + "description": "Wallet address that will receive the payment (in crypto) from the checkout provider for the minted NFT", "type": "string" }, "token_id": { - "description": "Asset id", + "description": "ID of the token that has been successfully minted - should be the same as `offer_id`", "type": "string" }, "transaction_id": { @@ -7464,7 +7753,7 @@ "type": "string" }, "url": { - "description": "Widget Url signed by provider", + "description": "NFT purchase URL given by the checkout provider that the user can use to complete payment", "type": "string" }, "user_wallet_address": { @@ -7481,7 +7770,7 @@ "type": "string" }, "offer_id": { - "description": "Temporary asset id", + "description": "Temporary asset id. Might be a token id if the token id is known or a generic description if it's not", "type": "string" }, "provider": { @@ -7493,11 +7782,11 @@ "type": "string" }, "status": { - "description": "Transaction status", + "description": "Transaction status enums(created, waitingPayment, pending, completed, failed)", "type": "string" }, "token_id": { - "description": "Asset id", + "description": "ID of the token that has been successfully minted - might or not be the same as `offer_id`", "type": "string" }, "transaction_id": { @@ -7505,7 +7794,7 @@ "type": "string" }, "user_wallet_address": { - "description": "Ethereum address of the user who wants to create transaction", + "description": "Wallet address that receives the minted NFT", "type": "string" } } @@ -7550,15 +7839,15 @@ "type": "number" }, "from_amount": { - "description": "Amount of currency (from_currency) used for transaction", + "description": "Amount of the currency specified in `from_currency` that the buyer paid for the transaction", "type": "number" }, "from_currency": { - "description": "Currency used for transaction", + "description": "Currency that the buyer used for the transaction", "type": "string" }, "mint_id": { - "description": "Mint id", + "description": "Minting transaction ID - see mintTokens response", "type": "string" }, "mint_status": { @@ -7566,7 +7855,7 @@ "type": "string" }, "offer_id": { - "description": "Temporary asset id", + "description": "Temporary asset id. Might be a token id if the token id is known or a generic description if it's not", "type": "string" }, "provider": { @@ -7578,19 +7867,19 @@ "type": "string" }, "status": { - "description": "Transaction status", + "description": "Transaction status enums(created, waitingPayment, pending, completed, failed)", "type": "string" }, "to_amount": { - "description": "Amount of target currency (to_currency) bought", + "description": "Amount of the currency specified in `to_currency` that the seller received from the checkout provider for the transaction", "type": "number" }, "to_currency": { - "description": "Target currency", + "description": "Currency (crypto) that the checkout provider sent to the seller for the transaction", "type": "string" }, "token_id": { - "description": "Asset id", + "description": "ID of the token that has been successfully minted - should be the same as `offer_id`", "type": "string" }, "transaction_id": { @@ -7602,7 +7891,7 @@ "type": "string" }, "user_wallet_address": { - "description": "Ethereum address of the user who wants to create transaction", + "description": "Wallet address that receives the minted NFT", "type": "string" } } @@ -7611,54 +7900,169 @@ "type": "object", "properties": { "theme": { + "description": "enums(light, dark)", "type": "string", "example": "light" } } }, - "provider.GetMintStatusResponse": { + "nftsecondarytransaction.CheckOrderResponse": { "type": "object", "properties": { - "data": { - "description": "Mint status for requested transactions", - "type": "array", - "items": { - "$ref": "#/definitions/provider.MintStatus" - } + "available": { + "type": "boolean" } } }, - "provider.MintStatus": { + "nftsecondarytransaction.CheckUserResponse": { "type": "object", "properties": { - "failureReason": { - "description": "reason for mint failure", + "url": { "type": "string" }, - "id": { - "description": "External transaction id", + "verified": { + "type": "boolean" + } + } + }, + "nftsecondarytransaction.CreateAPIRequest": { + "type": "object", + "properties": { + "order_id": { + "type": "integer" + }, + "provider": { + "type": "string" + }, + "user_wallet_address": { + "type": "string" + }, + "widget": { + "$ref": "#/definitions/nftsecondarytransaction.WidgetParams" + } + } + }, + "nftsecondarytransaction.CreateResponse": { + "type": "object", + "properties": { + "contract_address": { + "type": "string" + }, + "order_id": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "token_id": { + "type": "string" + }, + "transaction_id": { + "type": "string" + }, + "url": { + "type": "string" + }, + "user_wallet_address": { + "type": "string" + } + } + }, + "nftsecondarytransaction.GetTransactionResponse": { + "type": "object", + "properties": { + "order_id": { + "type": "string" + }, + "provider": { "type": "string" }, "status": { - "description": "Mint status", "type": "string" }, - "statusChangedAt": { - "description": "status updated-at timestamp", + "token_address": { + "type": "string" + }, + "token_id": { "type": "string" }, - "tokenId": { - "description": "Asset id", + "transaction_id": { + "type": "string" + }, + "user_wallet_address": { + "type": "string" + } + } + }, + "nftsecondarytransaction.ListTransactionsResponse": { + "type": "object", + "properties": { + "cursor": { "type": "string" }, - "transactionHash": { - "description": "Transaction hash", + "remaining": { + "type": "integer" + }, + "result": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/nftsecondarytransaction.TransactionData" } } } + }, + "nftsecondarytransaction.TransactionData": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "external_id": { + "type": "string" + }, + "fees_amount": { + "type": "number" + }, + "from_amount": { + "type": "number" + }, + "from_currency": { + "type": "string" + }, + "order_id": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "status": { + "type": "string" + }, + "to_amount": { + "type": "number" + }, + "to_currency": { + "type": "string" + }, + "transaction_id": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "user_wallet_address": { + "type": "string" + } + } + }, + "nftsecondarytransaction.WidgetParams": { + "type": "object", + "properties": { + "theme": { + "type": "string", + "example": "light" + } + } } } -} \ No newline at end of file +} diff --git a/src/ImmutableX.ts b/src/ImmutableX.ts index 2e4575c5..7052d6b7 100644 --- a/src/ImmutableX.ts +++ b/src/ImmutableX.ts @@ -62,9 +62,14 @@ import { NftCheckoutPrimaryApi, NftCheckoutPrimaryApiCreateNftPrimaryRequest, NftCheckoutPrimaryApiGetCurrenciesNFTCheckoutPrimaryRequest, - NftCheckoutPrimaryApiGetMintStatusByIdRequest, NftCheckoutPrimaryApiGetNftPrimaryTransactionRequest, NftCheckoutPrimaryApiGetNftPrimaryTransactionsRequest, + NonCryptoCheckoutApi, + NonCryptoCheckoutApiCreateNonCryptoCheckoutTransactionRequest, + NonCryptoCheckoutApiGetNonCryptoCheckoutOrderAvailabilityRequest, + NonCryptoCheckoutApiGetNonCryptoCheckoutSellerKycStatusRequest, + NonCryptoCheckoutApiGetNonCryptoCheckoutTransactionRequest, + NonCryptoCheckoutApiGetNonCryptoCheckoutTransactionsRequest, } from './api'; import { formatError } from './utils/formatError'; import { ImmutableXConfiguration } from './config'; @@ -81,6 +86,7 @@ export class ImmutableX { public transfersApi: TransfersApi; public exchangeApi: ExchangesApi; public nftCheckoutPrimaryApi: NftCheckoutPrimaryApi; + public nonCryptoCheckoutApi: NonCryptoCheckoutApi; public usersApi: UsersApi; public withdrawalsApi: WithdrawalsApi; public balanceApi: BalancesApi; @@ -111,6 +117,9 @@ export class ImmutableX { this.nftCheckoutPrimaryApi = new NftCheckoutPrimaryApi( config.apiConfiguration, ); + this.nonCryptoCheckoutApi = new NonCryptoCheckoutApi( + config.apiConfiguration, + ); this.projectsApi = new ProjectsApi(config.apiConfiguration); this.workflows = new Workflows(config); } @@ -941,20 +950,6 @@ export class ImmutableX { }); } - /** - * Get mint status by nft primary transaction id - * @param request - the request object to be provided in the API request - * @returns a promise that resolves with nft primary mint status - * @throws {@link index.IMXError} - */ - public getMintStatusById( - request: NftCheckoutPrimaryApiGetMintStatusByIdRequest, - ) { - return this.nftCheckoutPrimaryApi.getMintStatusById(request).catch(err => { - throw formatError(err); - }); - } - /** * Get nft primary transaction by transaction id * @param request - the request object to be provided in the API request @@ -986,4 +981,84 @@ export class ImmutableX { throw formatError(err); }); } + + /** + * Check order availability for non-crypto checkout + * @param request - the request object to be provided in the API request + * @returns a promise that resolves with the available status of the order + * @throws {@link index.IMXError} + */ + public getNonCryptoCheckoutOrderAvailability( + request: NonCryptoCheckoutApiGetNonCryptoCheckoutOrderAvailabilityRequest, + ) { + return this.nonCryptoCheckoutApi + .getNonCryptoCheckoutOrderAvailability(request) + .catch(err => { + throw formatError(err); + }); + } + + /** + * Get KYC status of a seller of a non-crypto checkout order + * @param request - the request object to be provided in the API request + * @returns a promise that resolves with the KYC status of the user and URL to perform KYC + * @throws {@link index.IMXError} + */ + public getNonCryptoCheckoutSellerKycStatus( + request: NonCryptoCheckoutApiGetNonCryptoCheckoutSellerKycStatusRequest, + ) { + return this.nonCryptoCheckoutApi + .getNonCryptoCheckoutSellerKycStatus(request) + .catch(err => { + throw formatError(err); + }); + } + + /** + * Create a non-crypto checkout transaction + * @param request - the request object to be provided in the API request + * @returns a promise that resolves with the created non-crypto checkout transaction + * @throws {@link index.IMXError} + */ + public createNonCryptoCheckoutTransaction( + request: NonCryptoCheckoutApiCreateNonCryptoCheckoutTransactionRequest, + ) { + return this.nonCryptoCheckoutApi + .createNonCryptoCheckoutTransaction(request) + .catch(err => { + throw formatError(err); + }); + } + + /** + * Get non-crypto checkout transaction by ID + * @param request - the request object to be provided in the API request + * @returns a promise that resolves with the non-crypto checkout transaction + * @throws {@link index.IMXError} + */ + public getNonCryptoCheckoutTransaction( + request: NonCryptoCheckoutApiGetNonCryptoCheckoutTransactionRequest, + ) { + return this.nonCryptoCheckoutApi + .getNonCryptoCheckoutTransaction(request) + .catch(err => { + throw formatError(err); + }); + } + + /** + * Get a list of non-crypto checkout transactions + * @param request - the request object to be provided in the API request + * @returns a promise that resolves with the list of matching non-crypto checkout transactions + * @throws {@link index.IMXError} + */ + public getNonCryptoCheckoutTransactions( + request: NonCryptoCheckoutApiGetNonCryptoCheckoutTransactionsRequest, + ) { + return this.nonCryptoCheckoutApi + .getNonCryptoCheckoutTransactions(request) + .catch(err => { + throw formatError(err); + }); + } } diff --git a/src/api/.openapi-generator/FILES b/src/api/.openapi-generator/FILES index ab277d8c..bbf98ad5 100644 --- a/src/api/.openapi-generator/FILES +++ b/src/api/.openapi-generator/FILES @@ -15,6 +15,7 @@ domain/metadata-api.ts domain/metadata-refreshes-api.ts domain/mints-api.ts domain/nft-checkout-primary-api.ts +domain/non-crypto-checkout-api.ts domain/orders-api.ts domain/projects-api.ts domain/tokens-api.ts @@ -36,6 +37,8 @@ models/cancel-order-response.ts models/collection-details.ts models/collection-filter.ts models/collection.ts +models/contract-create-apirequest.ts +models/contract-create-response.ts models/create-collection-request.ts models/create-exchange-and-urlapirequest.ts models/create-metadata-refresh-request.ts @@ -119,13 +122,19 @@ models/nftprimarytransaction-get-response.ts models/nftprimarytransaction-list-transactions-response.ts models/nftprimarytransaction-transaction-data.ts models/nftprimarytransaction-widget-params.ts +models/nftsecondarytransaction-check-order-response.ts +models/nftsecondarytransaction-check-user-response.ts +models/nftsecondarytransaction-create-apirequest.ts +models/nftsecondarytransaction-create-response.ts +models/nftsecondarytransaction-get-transaction-response.ts +models/nftsecondarytransaction-list-transactions-response.ts +models/nftsecondarytransaction-transaction-data.ts +models/nftsecondarytransaction-widget-params.ts models/optional-exchange-data.ts models/order-details.ts models/order-fee-info.ts models/order.ts models/project.ts -models/provider-get-mint-status-response.ts -models/provider-mint-status.ts models/range.ts models/register-user-request.ts models/register-user-response.ts diff --git a/src/api/api.ts b/src/api/api.ts index 109e1c1a..026b2561 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -24,6 +24,7 @@ export * from './domain/metadata-api'; export * from './domain/metadata-refreshes-api'; export * from './domain/mints-api'; export * from './domain/nft-checkout-primary-api'; +export * from './domain/non-crypto-checkout-api'; export * from './domain/orders-api'; export * from './domain/projects-api'; export * from './domain/tokens-api'; diff --git a/src/api/domain/deposits-api.ts b/src/api/domain/deposits-api.ts index f6f28f1d..8b3b9e3d 100644 --- a/src/api/domain/deposits-api.ts +++ b/src/api/domain/deposits-api.ts @@ -113,8 +113,8 @@ export const DepositsApiAxiosParamCreator = function (configuration?: Configurat * @param {string} [direction] Direction to sort (asc/desc) * @param {string} [user] Ethereum address of the user who submitted this deposit * @param {string} [status] Status of this deposit - * @param {string} [updatedMinTimestamp] Minimum timestamp for this deposit, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMaxTimestamp] Maximum timestamp for this deposit, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * @param {string} [minTimestamp] Minimum timestamp for this deposit, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * @param {string} [maxTimestamp] Maximum timestamp for this deposit, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' * @param {string} [tokenType] Token type of the deposited asset * @param {string} [tokenId] ERC721 Token ID of the minted asset * @param {string} [assetId] Internal IMX ID of the minted asset @@ -126,7 +126,7 @@ export const DepositsApiAxiosParamCreator = function (configuration?: Configurat * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listDeposits: async (pageSize?: number, cursor?: string, orderBy?: string, direction?: string, user?: string, status?: string, updatedMinTimestamp?: string, updatedMaxTimestamp?: string, tokenType?: string, tokenId?: string, assetId?: string, tokenAddress?: string, tokenName?: string, minQuantity?: string, maxQuantity?: string, metadata?: string, options: AxiosRequestConfig = {}): Promise => { + listDeposits: async (pageSize?: number, cursor?: string, orderBy?: string, direction?: string, user?: string, status?: string, minTimestamp?: string, maxTimestamp?: string, tokenType?: string, tokenId?: string, assetId?: string, tokenAddress?: string, tokenName?: string, minQuantity?: string, maxQuantity?: string, metadata?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v1/deposits`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -163,12 +163,12 @@ export const DepositsApiAxiosParamCreator = function (configuration?: Configurat localVarQueryParameter['status'] = status; } - if (updatedMinTimestamp !== undefined) { - localVarQueryParameter['updated_min_timestamp'] = updatedMinTimestamp; + if (minTimestamp !== undefined) { + localVarQueryParameter['min_timestamp'] = minTimestamp; } - if (updatedMaxTimestamp !== undefined) { - localVarQueryParameter['updated_max_timestamp'] = updatedMaxTimestamp; + if (maxTimestamp !== undefined) { + localVarQueryParameter['max_timestamp'] = maxTimestamp; } if (tokenType !== undefined) { @@ -255,8 +255,8 @@ export const DepositsApiFp = function(configuration?: Configuration) { * @param {string} [direction] Direction to sort (asc/desc) * @param {string} [user] Ethereum address of the user who submitted this deposit * @param {string} [status] Status of this deposit - * @param {string} [updatedMinTimestamp] Minimum timestamp for this deposit, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMaxTimestamp] Maximum timestamp for this deposit, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * @param {string} [minTimestamp] Minimum timestamp for this deposit, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * @param {string} [maxTimestamp] Maximum timestamp for this deposit, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' * @param {string} [tokenType] Token type of the deposited asset * @param {string} [tokenId] ERC721 Token ID of the minted asset * @param {string} [assetId] Internal IMX ID of the minted asset @@ -268,8 +268,8 @@ export const DepositsApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listDeposits(pageSize?: number, cursor?: string, orderBy?: string, direction?: string, user?: string, status?: string, updatedMinTimestamp?: string, updatedMaxTimestamp?: string, tokenType?: string, tokenId?: string, assetId?: string, tokenAddress?: string, tokenName?: string, minQuantity?: string, maxQuantity?: string, metadata?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listDeposits(pageSize, cursor, orderBy, direction, user, status, updatedMinTimestamp, updatedMaxTimestamp, tokenType, tokenId, assetId, tokenAddress, tokenName, minQuantity, maxQuantity, metadata, options); + async listDeposits(pageSize?: number, cursor?: string, orderBy?: string, direction?: string, user?: string, status?: string, minTimestamp?: string, maxTimestamp?: string, tokenType?: string, tokenId?: string, assetId?: string, tokenAddress?: string, tokenName?: string, minQuantity?: string, maxQuantity?: string, metadata?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listDeposits(pageSize, cursor, orderBy, direction, user, status, minTimestamp, maxTimestamp, tokenType, tokenId, assetId, tokenAddress, tokenName, minQuantity, maxQuantity, metadata, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } @@ -311,8 +311,8 @@ export const DepositsApiFactory = function (configuration?: Configuration, baseP * @param {string} [direction] Direction to sort (asc/desc) * @param {string} [user] Ethereum address of the user who submitted this deposit * @param {string} [status] Status of this deposit - * @param {string} [updatedMinTimestamp] Minimum timestamp for this deposit, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMaxTimestamp] Maximum timestamp for this deposit, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * @param {string} [minTimestamp] Minimum timestamp for this deposit, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * @param {string} [maxTimestamp] Maximum timestamp for this deposit, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' * @param {string} [tokenType] Token type of the deposited asset * @param {string} [tokenId] ERC721 Token ID of the minted asset * @param {string} [assetId] Internal IMX ID of the minted asset @@ -324,8 +324,8 @@ export const DepositsApiFactory = function (configuration?: Configuration, baseP * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listDeposits(pageSize?: number, cursor?: string, orderBy?: string, direction?: string, user?: string, status?: string, updatedMinTimestamp?: string, updatedMaxTimestamp?: string, tokenType?: string, tokenId?: string, assetId?: string, tokenAddress?: string, tokenName?: string, minQuantity?: string, maxQuantity?: string, metadata?: string, options?: any): AxiosPromise { - return localVarFp.listDeposits(pageSize, cursor, orderBy, direction, user, status, updatedMinTimestamp, updatedMaxTimestamp, tokenType, tokenId, assetId, tokenAddress, tokenName, minQuantity, maxQuantity, metadata, options).then((request) => request(axios, basePath)); + listDeposits(pageSize?: number, cursor?: string, orderBy?: string, direction?: string, user?: string, status?: string, minTimestamp?: string, maxTimestamp?: string, tokenType?: string, tokenId?: string, assetId?: string, tokenAddress?: string, tokenName?: string, minQuantity?: string, maxQuantity?: string, metadata?: string, options?: any): AxiosPromise { + return localVarFp.listDeposits(pageSize, cursor, orderBy, direction, user, status, minTimestamp, maxTimestamp, tokenType, tokenId, assetId, tokenAddress, tokenName, minQuantity, maxQuantity, metadata, options).then((request) => request(axios, basePath)); }, }; }; @@ -411,14 +411,14 @@ export interface DepositsApiListDepositsRequest { * @type {string} * @memberof DepositsApiListDeposits */ - readonly updatedMinTimestamp?: string + readonly minTimestamp?: string /** * Maximum timestamp for this deposit, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' * @type {string} * @memberof DepositsApiListDeposits */ - readonly updatedMaxTimestamp?: string + readonly maxTimestamp?: string /** * Token type of the deposited asset @@ -517,6 +517,6 @@ export class DepositsApi extends BaseAPI { * @memberof DepositsApi */ public listDeposits(requestParameters: DepositsApiListDepositsRequest = {}, options?: AxiosRequestConfig) { - return DepositsApiFp(this.configuration).listDeposits(requestParameters.pageSize, requestParameters.cursor, requestParameters.orderBy, requestParameters.direction, requestParameters.user, requestParameters.status, requestParameters.updatedMinTimestamp, requestParameters.updatedMaxTimestamp, requestParameters.tokenType, requestParameters.tokenId, requestParameters.assetId, requestParameters.tokenAddress, requestParameters.tokenName, requestParameters.minQuantity, requestParameters.maxQuantity, requestParameters.metadata, options).then((request) => request(this.axios, this.basePath)); + return DepositsApiFp(this.configuration).listDeposits(requestParameters.pageSize, requestParameters.cursor, requestParameters.orderBy, requestParameters.direction, requestParameters.user, requestParameters.status, requestParameters.minTimestamp, requestParameters.maxTimestamp, requestParameters.tokenType, requestParameters.tokenId, requestParameters.assetId, requestParameters.tokenAddress, requestParameters.tokenName, requestParameters.minQuantity, requestParameters.maxQuantity, requestParameters.metadata, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/api/domain/nft-checkout-primary-api.ts b/src/api/domain/nft-checkout-primary-api.ts index bd51f631..6c7fdaa7 100644 --- a/src/api/domain/nft-checkout-primary-api.ts +++ b/src/api/domain/nft-checkout-primary-api.ts @@ -21,6 +21,10 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore +import { ContractCreateAPIRequest } from '../models'; +// @ts-ignore +import { ContractCreateResponse } from '../models'; +// @ts-ignore import { CurrencyWithLimits } from '../models'; // @ts-ignore import { LambdasAPIError } from '../models'; @@ -32,8 +36,6 @@ import { NftprimarytransactionCreateResponse } from '../models'; import { NftprimarytransactionGetResponse } from '../models'; // @ts-ignore import { NftprimarytransactionListTransactionsResponse } from '../models'; -// @ts-ignore -import { ProviderGetMintStatusResponse } from '../models'; /** * NftCheckoutPrimaryApi - axios parameter creator * @export @@ -41,8 +43,8 @@ import { ProviderGetMintStatusResponse } from '../models'; export const NftCheckoutPrimaryApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * creates nft primary transaction - * @summary Create nft primary transaction + * Creates a transaction representing minting an NFT with a card payment. + * @summary Create NFT primary sale transaction * @param {NftprimarytransactionCreateAPIRequest} createAPIRequest req * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -117,49 +119,8 @@ export const NftCheckoutPrimaryApiAxiosParamCreator = function (configuration?: }; }, /** - * gets mint status by transaction ids - * @summary Get mint status by transaction id - * @param {'moonpay'} provider Provider name - * @param {string} id transaction id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMintStatusById: async (provider: 'moonpay', id: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'provider' is not null or undefined - assertParamExists('getMintStatusById', 'provider', provider) - // verify required parameter 'id' is not null or undefined - assertParamExists('getMintStatusById', 'id', id) - const localVarPath = `/v2/{provider}/transaction_status` - .replace(`{${"provider"}}`, encodeURIComponent(String(provider))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (id !== undefined) { - localVarQueryParameter['id'] = id; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * gets nft primary transaction by transaction id - * @summary Get nft primary transaction by id + * given a transaction id, returns the corresponding transaction representing a mint executed from a card payment + * @summary Get NFT primary sale transaction by id * @param {string} transactionId Transaction id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -192,8 +153,8 @@ export const NftCheckoutPrimaryApiAxiosParamCreator = function (configuration?: }; }, /** - * Returns a list of NFT primary transactions - * @summary Get a list of NFT primary transactions + * Returns a list of NFT primary sales transactions + * @summary Get a list of NFT primary sales transactions * @param {number} [pageSize] Page size of the result * @param {string} [cursor] Cursor * @param {'transaction_id' | 'status' | 'amount' | 'mint_id'} [orderBy] Property to sort by @@ -201,14 +162,14 @@ export const NftCheckoutPrimaryApiAxiosParamCreator = function (configuration?: * @param {string} [transactionId] Transaction id * @param {string} [contractAddress] Contract address of the asset * @param {string} [sellerWalletAddress] Ethereum address of the seller - * @param {string} [walletAddress] Ethereum address of the user who wants to create transaction - * @param {string} [status] Transaction status - * @param {'moonpay'} [provider] Provider name - * @param {string} [mintId] Mint id + * @param {string} [userWalletAddress] Ethereum address of the user who wants to create transaction + * @param {'created' | 'waitingPayment' | 'pending' | 'completed' | 'failed'} [status] Transaction status + * @param {'moonpay'} [provider] Checkout provider name + * @param {string} [mintId] Minting transaction ID - see mintTokens response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getNftPrimaryTransactions: async (pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'status' | 'amount' | 'mint_id', direction?: string, transactionId?: string, contractAddress?: string, sellerWalletAddress?: string, walletAddress?: string, status?: string, provider?: 'moonpay', mintId?: string, options: AxiosRequestConfig = {}): Promise => { + getNftPrimaryTransactions: async (pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'status' | 'amount' | 'mint_id', direction?: string, transactionId?: string, contractAddress?: string, sellerWalletAddress?: string, userWalletAddress?: string, status?: 'created' | 'waitingPayment' | 'pending' | 'completed' | 'failed', provider?: 'moonpay', mintId?: string, options: AxiosRequestConfig = {}): Promise => { const localVarPath = `/v2/nft/primary`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -249,8 +210,8 @@ export const NftCheckoutPrimaryApiAxiosParamCreator = function (configuration?: localVarQueryParameter['seller_wallet_address'] = sellerWalletAddress; } - if (walletAddress !== undefined) { - localVarQueryParameter['wallet_address'] = walletAddress; + if (userWalletAddress !== undefined) { + localVarQueryParameter['user_wallet_address'] = userWalletAddress; } if (status !== undefined) { @@ -271,6 +232,42 @@ export const NftCheckoutPrimaryApiAxiosParamCreator = function (configuration?: let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Registers a new contract for use in the minting with fiat card flow + * @summary Executes NFT primary sales contract registration + * @param {ContractCreateAPIRequest} createAPIRequest req + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + registerNftPrimarySalesContract: async (createAPIRequest: ContractCreateAPIRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'createAPIRequest' is not null or undefined + assertParamExists('registerNftPrimarySalesContract', 'createAPIRequest', createAPIRequest) + const localVarPath = `/v2/nft/primary/register`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createAPIRequest, localVarRequestOptions, configuration) + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -287,8 +284,8 @@ export const NftCheckoutPrimaryApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = NftCheckoutPrimaryApiAxiosParamCreator(configuration) return { /** - * creates nft primary transaction - * @summary Create nft primary transaction + * Creates a transaction representing minting an NFT with a card payment. + * @summary Create NFT primary sale transaction * @param {NftprimarytransactionCreateAPIRequest} createAPIRequest req * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -310,20 +307,8 @@ export const NftCheckoutPrimaryApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * gets mint status by transaction ids - * @summary Get mint status by transaction id - * @param {'moonpay'} provider Provider name - * @param {string} id transaction id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getMintStatusById(provider: 'moonpay', id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getMintStatusById(provider, id, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * gets nft primary transaction by transaction id - * @summary Get nft primary transaction by id + * given a transaction id, returns the corresponding transaction representing a mint executed from a card payment + * @summary Get NFT primary sale transaction by id * @param {string} transactionId Transaction id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -333,8 +318,8 @@ export const NftCheckoutPrimaryApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Returns a list of NFT primary transactions - * @summary Get a list of NFT primary transactions + * Returns a list of NFT primary sales transactions + * @summary Get a list of NFT primary sales transactions * @param {number} [pageSize] Page size of the result * @param {string} [cursor] Cursor * @param {'transaction_id' | 'status' | 'amount' | 'mint_id'} [orderBy] Property to sort by @@ -342,15 +327,26 @@ export const NftCheckoutPrimaryApiFp = function(configuration?: Configuration) { * @param {string} [transactionId] Transaction id * @param {string} [contractAddress] Contract address of the asset * @param {string} [sellerWalletAddress] Ethereum address of the seller - * @param {string} [walletAddress] Ethereum address of the user who wants to create transaction - * @param {string} [status] Transaction status - * @param {'moonpay'} [provider] Provider name - * @param {string} [mintId] Mint id + * @param {string} [userWalletAddress] Ethereum address of the user who wants to create transaction + * @param {'created' | 'waitingPayment' | 'pending' | 'completed' | 'failed'} [status] Transaction status + * @param {'moonpay'} [provider] Checkout provider name + * @param {string} [mintId] Minting transaction ID - see mintTokens response + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNftPrimaryTransactions(pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'status' | 'amount' | 'mint_id', direction?: string, transactionId?: string, contractAddress?: string, sellerWalletAddress?: string, userWalletAddress?: string, status?: 'created' | 'waitingPayment' | 'pending' | 'completed' | 'failed', provider?: 'moonpay', mintId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNftPrimaryTransactions(pageSize, cursor, orderBy, direction, transactionId, contractAddress, sellerWalletAddress, userWalletAddress, status, provider, mintId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Registers a new contract for use in the minting with fiat card flow + * @summary Executes NFT primary sales contract registration + * @param {ContractCreateAPIRequest} createAPIRequest req * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getNftPrimaryTransactions(pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'status' | 'amount' | 'mint_id', direction?: string, transactionId?: string, contractAddress?: string, sellerWalletAddress?: string, walletAddress?: string, status?: string, provider?: 'moonpay', mintId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getNftPrimaryTransactions(pageSize, cursor, orderBy, direction, transactionId, contractAddress, sellerWalletAddress, walletAddress, status, provider, mintId, options); + async registerNftPrimarySalesContract(createAPIRequest: ContractCreateAPIRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.registerNftPrimarySalesContract(createAPIRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } @@ -364,8 +360,8 @@ export const NftCheckoutPrimaryApiFactory = function (configuration?: Configurat const localVarFp = NftCheckoutPrimaryApiFp(configuration) return { /** - * creates nft primary transaction - * @summary Create nft primary transaction + * Creates a transaction representing minting an NFT with a card payment. + * @summary Create NFT primary sale transaction * @param {NftprimarytransactionCreateAPIRequest} createAPIRequest req * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -385,19 +381,8 @@ export const NftCheckoutPrimaryApiFactory = function (configuration?: Configurat return localVarFp.getCurrenciesNFTCheckoutPrimary(provider, includeLimits, options).then((request) => request(axios, basePath)); }, /** - * gets mint status by transaction ids - * @summary Get mint status by transaction id - * @param {'moonpay'} provider Provider name - * @param {string} id transaction id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getMintStatusById(provider: 'moonpay', id: string, options?: any): AxiosPromise { - return localVarFp.getMintStatusById(provider, id, options).then((request) => request(axios, basePath)); - }, - /** - * gets nft primary transaction by transaction id - * @summary Get nft primary transaction by id + * given a transaction id, returns the corresponding transaction representing a mint executed from a card payment + * @summary Get NFT primary sale transaction by id * @param {string} transactionId Transaction id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -406,8 +391,8 @@ export const NftCheckoutPrimaryApiFactory = function (configuration?: Configurat return localVarFp.getNftPrimaryTransaction(transactionId, options).then((request) => request(axios, basePath)); }, /** - * Returns a list of NFT primary transactions - * @summary Get a list of NFT primary transactions + * Returns a list of NFT primary sales transactions + * @summary Get a list of NFT primary sales transactions * @param {number} [pageSize] Page size of the result * @param {string} [cursor] Cursor * @param {'transaction_id' | 'status' | 'amount' | 'mint_id'} [orderBy] Property to sort by @@ -415,15 +400,25 @@ export const NftCheckoutPrimaryApiFactory = function (configuration?: Configurat * @param {string} [transactionId] Transaction id * @param {string} [contractAddress] Contract address of the asset * @param {string} [sellerWalletAddress] Ethereum address of the seller - * @param {string} [walletAddress] Ethereum address of the user who wants to create transaction - * @param {string} [status] Transaction status - * @param {'moonpay'} [provider] Provider name - * @param {string} [mintId] Mint id + * @param {string} [userWalletAddress] Ethereum address of the user who wants to create transaction + * @param {'created' | 'waitingPayment' | 'pending' | 'completed' | 'failed'} [status] Transaction status + * @param {'moonpay'} [provider] Checkout provider name + * @param {string} [mintId] Minting transaction ID - see mintTokens response * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getNftPrimaryTransactions(pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'status' | 'amount' | 'mint_id', direction?: string, transactionId?: string, contractAddress?: string, sellerWalletAddress?: string, walletAddress?: string, status?: string, provider?: 'moonpay', mintId?: string, options?: any): AxiosPromise { - return localVarFp.getNftPrimaryTransactions(pageSize, cursor, orderBy, direction, transactionId, contractAddress, sellerWalletAddress, walletAddress, status, provider, mintId, options).then((request) => request(axios, basePath)); + getNftPrimaryTransactions(pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'status' | 'amount' | 'mint_id', direction?: string, transactionId?: string, contractAddress?: string, sellerWalletAddress?: string, userWalletAddress?: string, status?: 'created' | 'waitingPayment' | 'pending' | 'completed' | 'failed', provider?: 'moonpay', mintId?: string, options?: any): AxiosPromise { + return localVarFp.getNftPrimaryTransactions(pageSize, cursor, orderBy, direction, transactionId, contractAddress, sellerWalletAddress, userWalletAddress, status, provider, mintId, options).then((request) => request(axios, basePath)); + }, + /** + * Registers a new contract for use in the minting with fiat card flow + * @summary Executes NFT primary sales contract registration + * @param {ContractCreateAPIRequest} createAPIRequest req + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + registerNftPrimarySalesContract(createAPIRequest: ContractCreateAPIRequest, options?: any): AxiosPromise { + return localVarFp.registerNftPrimarySalesContract(createAPIRequest, options).then((request) => request(axios, basePath)); }, }; }; @@ -463,27 +458,6 @@ export interface NftCheckoutPrimaryApiGetCurrenciesNFTCheckoutPrimaryRequest { readonly includeLimits?: boolean } -/** - * Request parameters for getMintStatusById operation in NftCheckoutPrimaryApi. - * @export - * @interface NftCheckoutPrimaryApiGetMintStatusByIdRequest - */ -export interface NftCheckoutPrimaryApiGetMintStatusByIdRequest { - /** - * Provider name - * @type {'moonpay'} - * @memberof NftCheckoutPrimaryApiGetMintStatusById - */ - readonly provider: 'moonpay' - - /** - * transaction id - * @type {string} - * @memberof NftCheckoutPrimaryApiGetMintStatusById - */ - readonly id: string -} - /** * Request parameters for getNftPrimaryTransaction operation in NftCheckoutPrimaryApi. * @export @@ -558,30 +532,44 @@ export interface NftCheckoutPrimaryApiGetNftPrimaryTransactionsRequest { * @type {string} * @memberof NftCheckoutPrimaryApiGetNftPrimaryTransactions */ - readonly walletAddress?: string + readonly userWalletAddress?: string /** * Transaction status - * @type {string} + * @type {'created' | 'waitingPayment' | 'pending' | 'completed' | 'failed'} * @memberof NftCheckoutPrimaryApiGetNftPrimaryTransactions */ - readonly status?: string + readonly status?: 'created' | 'waitingPayment' | 'pending' | 'completed' | 'failed' /** - * Provider name + * Checkout provider name * @type {'moonpay'} * @memberof NftCheckoutPrimaryApiGetNftPrimaryTransactions */ readonly provider?: 'moonpay' /** - * Mint id + * Minting transaction ID - see mintTokens response * @type {string} * @memberof NftCheckoutPrimaryApiGetNftPrimaryTransactions */ readonly mintId?: string } +/** + * Request parameters for registerNftPrimarySalesContract operation in NftCheckoutPrimaryApi. + * @export + * @interface NftCheckoutPrimaryApiRegisterNftPrimarySalesContractRequest + */ +export interface NftCheckoutPrimaryApiRegisterNftPrimarySalesContractRequest { + /** + * req + * @type {ContractCreateAPIRequest} + * @memberof NftCheckoutPrimaryApiRegisterNftPrimarySalesContract + */ + readonly createAPIRequest: ContractCreateAPIRequest +} + /** * NftCheckoutPrimaryApi - object-oriented interface * @export @@ -590,8 +578,8 @@ export interface NftCheckoutPrimaryApiGetNftPrimaryTransactionsRequest { */ export class NftCheckoutPrimaryApi extends BaseAPI { /** - * creates nft primary transaction - * @summary Create nft primary transaction + * Creates a transaction representing minting an NFT with a card payment. + * @summary Create NFT primary sale transaction * @param {NftCheckoutPrimaryApiCreateNftPrimaryRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -614,38 +602,38 @@ export class NftCheckoutPrimaryApi extends BaseAPI { } /** - * gets mint status by transaction ids - * @summary Get mint status by transaction id - * @param {NftCheckoutPrimaryApiGetMintStatusByIdRequest} requestParameters Request parameters. + * given a transaction id, returns the corresponding transaction representing a mint executed from a card payment + * @summary Get NFT primary sale transaction by id + * @param {NftCheckoutPrimaryApiGetNftPrimaryTransactionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NftCheckoutPrimaryApi */ - public getMintStatusById(requestParameters: NftCheckoutPrimaryApiGetMintStatusByIdRequest, options?: AxiosRequestConfig) { - return NftCheckoutPrimaryApiFp(this.configuration).getMintStatusById(requestParameters.provider, requestParameters.id, options).then((request) => request(this.axios, this.basePath)); + public getNftPrimaryTransaction(requestParameters: NftCheckoutPrimaryApiGetNftPrimaryTransactionRequest, options?: AxiosRequestConfig) { + return NftCheckoutPrimaryApiFp(this.configuration).getNftPrimaryTransaction(requestParameters.transactionId, options).then((request) => request(this.axios, this.basePath)); } /** - * gets nft primary transaction by transaction id - * @summary Get nft primary transaction by id - * @param {NftCheckoutPrimaryApiGetNftPrimaryTransactionRequest} requestParameters Request parameters. + * Returns a list of NFT primary sales transactions + * @summary Get a list of NFT primary sales transactions + * @param {NftCheckoutPrimaryApiGetNftPrimaryTransactionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NftCheckoutPrimaryApi */ - public getNftPrimaryTransaction(requestParameters: NftCheckoutPrimaryApiGetNftPrimaryTransactionRequest, options?: AxiosRequestConfig) { - return NftCheckoutPrimaryApiFp(this.configuration).getNftPrimaryTransaction(requestParameters.transactionId, options).then((request) => request(this.axios, this.basePath)); + public getNftPrimaryTransactions(requestParameters: NftCheckoutPrimaryApiGetNftPrimaryTransactionsRequest = {}, options?: AxiosRequestConfig) { + return NftCheckoutPrimaryApiFp(this.configuration).getNftPrimaryTransactions(requestParameters.pageSize, requestParameters.cursor, requestParameters.orderBy, requestParameters.direction, requestParameters.transactionId, requestParameters.contractAddress, requestParameters.sellerWalletAddress, requestParameters.userWalletAddress, requestParameters.status, requestParameters.provider, requestParameters.mintId, options).then((request) => request(this.axios, this.basePath)); } /** - * Returns a list of NFT primary transactions - * @summary Get a list of NFT primary transactions - * @param {NftCheckoutPrimaryApiGetNftPrimaryTransactionsRequest} requestParameters Request parameters. + * Registers a new contract for use in the minting with fiat card flow + * @summary Executes NFT primary sales contract registration + * @param {NftCheckoutPrimaryApiRegisterNftPrimarySalesContractRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NftCheckoutPrimaryApi */ - public getNftPrimaryTransactions(requestParameters: NftCheckoutPrimaryApiGetNftPrimaryTransactionsRequest = {}, options?: AxiosRequestConfig) { - return NftCheckoutPrimaryApiFp(this.configuration).getNftPrimaryTransactions(requestParameters.pageSize, requestParameters.cursor, requestParameters.orderBy, requestParameters.direction, requestParameters.transactionId, requestParameters.contractAddress, requestParameters.sellerWalletAddress, requestParameters.walletAddress, requestParameters.status, requestParameters.provider, requestParameters.mintId, options).then((request) => request(this.axios, this.basePath)); + public registerNftPrimarySalesContract(requestParameters: NftCheckoutPrimaryApiRegisterNftPrimarySalesContractRequest, options?: AxiosRequestConfig) { + return NftCheckoutPrimaryApiFp(this.configuration).registerNftPrimarySalesContract(requestParameters.createAPIRequest, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/src/api/domain/non-crypto-checkout-api.ts b/src/api/domain/non-crypto-checkout-api.ts new file mode 100644 index 00000000..8cdfcb83 --- /dev/null +++ b/src/api/domain/non-crypto-checkout-api.ts @@ -0,0 +1,618 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable X API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 3.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +// @ts-ignore +import { LambdasAPIError } from '../models'; +// @ts-ignore +import { NftsecondarytransactionCheckOrderResponse } from '../models'; +// @ts-ignore +import { NftsecondarytransactionCheckUserResponse } from '../models'; +// @ts-ignore +import { NftsecondarytransactionCreateAPIRequest } from '../models'; +// @ts-ignore +import { NftsecondarytransactionCreateResponse } from '../models'; +// @ts-ignore +import { NftsecondarytransactionGetTransactionResponse } from '../models'; +// @ts-ignore +import { NftsecondarytransactionListTransactionsResponse } from '../models'; +/** + * NonCryptoCheckoutApi - axios parameter creator + * @export + */ +export const NonCryptoCheckoutApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Creates a transaction to purchase an asset via a non-crypto checkout method + * @summary Create a non-crypto checkout transaction + * @param {NftsecondarytransactionCreateAPIRequest} createAPIRequest req + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createNonCryptoCheckoutTransaction: async (createAPIRequest: NftsecondarytransactionCreateAPIRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'createAPIRequest' is not null or undefined + assertParamExists('createNonCryptoCheckoutTransaction', 'createAPIRequest', createAPIRequest) + const localVarPath = `/v2/nft/secondary`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createAPIRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Checks if an order can be purchased via a non-crypto checkout method + * @summary Get orders eligible for non-crypto checkout + * @param {'moonpay'} provider Name of provider of non-crypto checkout integration + * @param {number} orderId Order ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNonCryptoCheckoutOrderAvailability: async (provider: 'moonpay', orderId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'provider' is not null or undefined + assertParamExists('getNonCryptoCheckoutOrderAvailability', 'provider', provider) + // verify required parameter 'orderId' is not null or undefined + assertParamExists('getNonCryptoCheckoutOrderAvailability', 'orderId', orderId) + const localVarPath = `/v2/nft/secondary/verify/{provider}/order/{order_id}` + .replace(`{${"provider"}}`, encodeURIComponent(String(provider))) + .replace(`{${"order_id"}}`, encodeURIComponent(String(orderId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets the KYC status (`{ verified: true | false }`) of a user for selling NFTs via non-crypto checkout + * @summary Get KYC status of a seller of a non-crypto checkout order + * @param {'moonpay'} provider Name of provider of non-crypto checkout integration + * @param {string} walletAddress Seller\'s ImmutableX (L2) wallet address + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNonCryptoCheckoutSellerKycStatus: async (provider: 'moonpay', walletAddress: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'provider' is not null or undefined + assertParamExists('getNonCryptoCheckoutSellerKycStatus', 'provider', provider) + // verify required parameter 'walletAddress' is not null or undefined + assertParamExists('getNonCryptoCheckoutSellerKycStatus', 'walletAddress', walletAddress) + const localVarPath = `/v2/nft/secondary/verify/{provider}/user/{wallet_address}` + .replace(`{${"provider"}}`, encodeURIComponent(String(provider))) + .replace(`{${"wallet_address"}}`, encodeURIComponent(String(walletAddress))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets non-crypto checkout transaction by its ID + * @summary Get non-crypto checkout transaction by ID + * @param {string} transactionId Transaction ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNonCryptoCheckoutTransaction: async (transactionId: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'transactionId' is not null or undefined + assertParamExists('getNonCryptoCheckoutTransaction', 'transactionId', transactionId) + const localVarPath = `/v2/nft/secondary/{transaction_id}` + .replace(`{${"transaction_id"}}`, encodeURIComponent(String(transactionId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns a list of successful non-crypto checkout transactions + * @summary Get a list of non-crypto checkout transactions + * @param {number} [pageSize] Page size of the result + * @param {string} [cursor] Cursor + * @param {'transaction_id' | 'status' | 'amount' | 'mint_id'} [orderBy] Property to sort by + * @param {string} [direction] Direction to sort (asc/desc) + * @param {string} [transactionId] Transaction ID + * @param {number} [orderId] Order ID + * @param {string} [walletAddress] Ethereum address of the user who wants to create transaction + * @param {string} [status] Transaction status + * @param {'moonpay'} [provider] Name of provider of non-crypto checkout integration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNonCryptoCheckoutTransactions: async (pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'status' | 'amount' | 'mint_id', direction?: string, transactionId?: string, orderId?: number, walletAddress?: string, status?: string, provider?: 'moonpay', options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v2/nft/secondary`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (pageSize !== undefined) { + localVarQueryParameter['page_size'] = pageSize; + } + + if (cursor !== undefined) { + localVarQueryParameter['cursor'] = cursor; + } + + if (orderBy !== undefined) { + localVarQueryParameter['order_by'] = orderBy; + } + + if (direction !== undefined) { + localVarQueryParameter['direction'] = direction; + } + + if (transactionId !== undefined) { + localVarQueryParameter['transaction_id'] = transactionId; + } + + if (orderId !== undefined) { + localVarQueryParameter['order_id'] = orderId; + } + + if (walletAddress !== undefined) { + localVarQueryParameter['wallet_address'] = walletAddress; + } + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (provider !== undefined) { + localVarQueryParameter['provider'] = provider; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * NonCryptoCheckoutApi - functional programming interface + * @export + */ +export const NonCryptoCheckoutApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = NonCryptoCheckoutApiAxiosParamCreator(configuration) + return { + /** + * Creates a transaction to purchase an asset via a non-crypto checkout method + * @summary Create a non-crypto checkout transaction + * @param {NftsecondarytransactionCreateAPIRequest} createAPIRequest req + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createNonCryptoCheckoutTransaction(createAPIRequest: NftsecondarytransactionCreateAPIRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createNonCryptoCheckoutTransaction(createAPIRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Checks if an order can be purchased via a non-crypto checkout method + * @summary Get orders eligible for non-crypto checkout + * @param {'moonpay'} provider Name of provider of non-crypto checkout integration + * @param {number} orderId Order ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNonCryptoCheckoutOrderAvailability(provider: 'moonpay', orderId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNonCryptoCheckoutOrderAvailability(provider, orderId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Gets the KYC status (`{ verified: true | false }`) of a user for selling NFTs via non-crypto checkout + * @summary Get KYC status of a seller of a non-crypto checkout order + * @param {'moonpay'} provider Name of provider of non-crypto checkout integration + * @param {string} walletAddress Seller\'s ImmutableX (L2) wallet address + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNonCryptoCheckoutSellerKycStatus(provider: 'moonpay', walletAddress: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNonCryptoCheckoutSellerKycStatus(provider, walletAddress, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Gets non-crypto checkout transaction by its ID + * @summary Get non-crypto checkout transaction by ID + * @param {string} transactionId Transaction ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNonCryptoCheckoutTransaction(transactionId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNonCryptoCheckoutTransaction(transactionId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Returns a list of successful non-crypto checkout transactions + * @summary Get a list of non-crypto checkout transactions + * @param {number} [pageSize] Page size of the result + * @param {string} [cursor] Cursor + * @param {'transaction_id' | 'status' | 'amount' | 'mint_id'} [orderBy] Property to sort by + * @param {string} [direction] Direction to sort (asc/desc) + * @param {string} [transactionId] Transaction ID + * @param {number} [orderId] Order ID + * @param {string} [walletAddress] Ethereum address of the user who wants to create transaction + * @param {string} [status] Transaction status + * @param {'moonpay'} [provider] Name of provider of non-crypto checkout integration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNonCryptoCheckoutTransactions(pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'status' | 'amount' | 'mint_id', direction?: string, transactionId?: string, orderId?: number, walletAddress?: string, status?: string, provider?: 'moonpay', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNonCryptoCheckoutTransactions(pageSize, cursor, orderBy, direction, transactionId, orderId, walletAddress, status, provider, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * NonCryptoCheckoutApi - factory interface + * @export + */ +export const NonCryptoCheckoutApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = NonCryptoCheckoutApiFp(configuration) + return { + /** + * Creates a transaction to purchase an asset via a non-crypto checkout method + * @summary Create a non-crypto checkout transaction + * @param {NftsecondarytransactionCreateAPIRequest} createAPIRequest req + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createNonCryptoCheckoutTransaction(createAPIRequest: NftsecondarytransactionCreateAPIRequest, options?: any): AxiosPromise { + return localVarFp.createNonCryptoCheckoutTransaction(createAPIRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Checks if an order can be purchased via a non-crypto checkout method + * @summary Get orders eligible for non-crypto checkout + * @param {'moonpay'} provider Name of provider of non-crypto checkout integration + * @param {number} orderId Order ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNonCryptoCheckoutOrderAvailability(provider: 'moonpay', orderId: number, options?: any): AxiosPromise { + return localVarFp.getNonCryptoCheckoutOrderAvailability(provider, orderId, options).then((request) => request(axios, basePath)); + }, + /** + * Gets the KYC status (`{ verified: true | false }`) of a user for selling NFTs via non-crypto checkout + * @summary Get KYC status of a seller of a non-crypto checkout order + * @param {'moonpay'} provider Name of provider of non-crypto checkout integration + * @param {string} walletAddress Seller\'s ImmutableX (L2) wallet address + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNonCryptoCheckoutSellerKycStatus(provider: 'moonpay', walletAddress: string, options?: any): AxiosPromise { + return localVarFp.getNonCryptoCheckoutSellerKycStatus(provider, walletAddress, options).then((request) => request(axios, basePath)); + }, + /** + * Gets non-crypto checkout transaction by its ID + * @summary Get non-crypto checkout transaction by ID + * @param {string} transactionId Transaction ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNonCryptoCheckoutTransaction(transactionId: string, options?: any): AxiosPromise { + return localVarFp.getNonCryptoCheckoutTransaction(transactionId, options).then((request) => request(axios, basePath)); + }, + /** + * Returns a list of successful non-crypto checkout transactions + * @summary Get a list of non-crypto checkout transactions + * @param {number} [pageSize] Page size of the result + * @param {string} [cursor] Cursor + * @param {'transaction_id' | 'status' | 'amount' | 'mint_id'} [orderBy] Property to sort by + * @param {string} [direction] Direction to sort (asc/desc) + * @param {string} [transactionId] Transaction ID + * @param {number} [orderId] Order ID + * @param {string} [walletAddress] Ethereum address of the user who wants to create transaction + * @param {string} [status] Transaction status + * @param {'moonpay'} [provider] Name of provider of non-crypto checkout integration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNonCryptoCheckoutTransactions(pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'status' | 'amount' | 'mint_id', direction?: string, transactionId?: string, orderId?: number, walletAddress?: string, status?: string, provider?: 'moonpay', options?: any): AxiosPromise { + return localVarFp.getNonCryptoCheckoutTransactions(pageSize, cursor, orderBy, direction, transactionId, orderId, walletAddress, status, provider, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for createNonCryptoCheckoutTransaction operation in NonCryptoCheckoutApi. + * @export + * @interface NonCryptoCheckoutApiCreateNonCryptoCheckoutTransactionRequest + */ +export interface NonCryptoCheckoutApiCreateNonCryptoCheckoutTransactionRequest { + /** + * req + * @type {NftsecondarytransactionCreateAPIRequest} + * @memberof NonCryptoCheckoutApiCreateNonCryptoCheckoutTransaction + */ + readonly createAPIRequest: NftsecondarytransactionCreateAPIRequest +} + +/** + * Request parameters for getNonCryptoCheckoutOrderAvailability operation in NonCryptoCheckoutApi. + * @export + * @interface NonCryptoCheckoutApiGetNonCryptoCheckoutOrderAvailabilityRequest + */ +export interface NonCryptoCheckoutApiGetNonCryptoCheckoutOrderAvailabilityRequest { + /** + * Name of provider of non-crypto checkout integration + * @type {'moonpay'} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutOrderAvailability + */ + readonly provider: 'moonpay' + + /** + * Order ID + * @type {number} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutOrderAvailability + */ + readonly orderId: number +} + +/** + * Request parameters for getNonCryptoCheckoutSellerKycStatus operation in NonCryptoCheckoutApi. + * @export + * @interface NonCryptoCheckoutApiGetNonCryptoCheckoutSellerKycStatusRequest + */ +export interface NonCryptoCheckoutApiGetNonCryptoCheckoutSellerKycStatusRequest { + /** + * Name of provider of non-crypto checkout integration + * @type {'moonpay'} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutSellerKycStatus + */ + readonly provider: 'moonpay' + + /** + * Seller\'s ImmutableX (L2) wallet address + * @type {string} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutSellerKycStatus + */ + readonly walletAddress: string +} + +/** + * Request parameters for getNonCryptoCheckoutTransaction operation in NonCryptoCheckoutApi. + * @export + * @interface NonCryptoCheckoutApiGetNonCryptoCheckoutTransactionRequest + */ +export interface NonCryptoCheckoutApiGetNonCryptoCheckoutTransactionRequest { + /** + * Transaction ID + * @type {string} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutTransaction + */ + readonly transactionId: string +} + +/** + * Request parameters for getNonCryptoCheckoutTransactions operation in NonCryptoCheckoutApi. + * @export + * @interface NonCryptoCheckoutApiGetNonCryptoCheckoutTransactionsRequest + */ +export interface NonCryptoCheckoutApiGetNonCryptoCheckoutTransactionsRequest { + /** + * Page size of the result + * @type {number} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutTransactions + */ + readonly pageSize?: number + + /** + * Cursor + * @type {string} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutTransactions + */ + readonly cursor?: string + + /** + * Property to sort by + * @type {'transaction_id' | 'status' | 'amount' | 'mint_id'} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutTransactions + */ + readonly orderBy?: 'transaction_id' | 'status' | 'amount' | 'mint_id' + + /** + * Direction to sort (asc/desc) + * @type {string} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutTransactions + */ + readonly direction?: string + + /** + * Transaction ID + * @type {string} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutTransactions + */ + readonly transactionId?: string + + /** + * Order ID + * @type {number} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutTransactions + */ + readonly orderId?: number + + /** + * Ethereum address of the user who wants to create transaction + * @type {string} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutTransactions + */ + readonly walletAddress?: string + + /** + * Transaction status + * @type {string} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutTransactions + */ + readonly status?: string + + /** + * Name of provider of non-crypto checkout integration + * @type {'moonpay'} + * @memberof NonCryptoCheckoutApiGetNonCryptoCheckoutTransactions + */ + readonly provider?: 'moonpay' +} + +/** + * NonCryptoCheckoutApi - object-oriented interface + * @export + * @class NonCryptoCheckoutApi + * @extends {BaseAPI} + */ +export class NonCryptoCheckoutApi extends BaseAPI { + /** + * Creates a transaction to purchase an asset via a non-crypto checkout method + * @summary Create a non-crypto checkout transaction + * @param {NonCryptoCheckoutApiCreateNonCryptoCheckoutTransactionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NonCryptoCheckoutApi + */ + public createNonCryptoCheckoutTransaction(requestParameters: NonCryptoCheckoutApiCreateNonCryptoCheckoutTransactionRequest, options?: AxiosRequestConfig) { + return NonCryptoCheckoutApiFp(this.configuration).createNonCryptoCheckoutTransaction(requestParameters.createAPIRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Checks if an order can be purchased via a non-crypto checkout method + * @summary Get orders eligible for non-crypto checkout + * @param {NonCryptoCheckoutApiGetNonCryptoCheckoutOrderAvailabilityRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NonCryptoCheckoutApi + */ + public getNonCryptoCheckoutOrderAvailability(requestParameters: NonCryptoCheckoutApiGetNonCryptoCheckoutOrderAvailabilityRequest, options?: AxiosRequestConfig) { + return NonCryptoCheckoutApiFp(this.configuration).getNonCryptoCheckoutOrderAvailability(requestParameters.provider, requestParameters.orderId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Gets the KYC status (`{ verified: true | false }`) of a user for selling NFTs via non-crypto checkout + * @summary Get KYC status of a seller of a non-crypto checkout order + * @param {NonCryptoCheckoutApiGetNonCryptoCheckoutSellerKycStatusRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NonCryptoCheckoutApi + */ + public getNonCryptoCheckoutSellerKycStatus(requestParameters: NonCryptoCheckoutApiGetNonCryptoCheckoutSellerKycStatusRequest, options?: AxiosRequestConfig) { + return NonCryptoCheckoutApiFp(this.configuration).getNonCryptoCheckoutSellerKycStatus(requestParameters.provider, requestParameters.walletAddress, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Gets non-crypto checkout transaction by its ID + * @summary Get non-crypto checkout transaction by ID + * @param {NonCryptoCheckoutApiGetNonCryptoCheckoutTransactionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NonCryptoCheckoutApi + */ + public getNonCryptoCheckoutTransaction(requestParameters: NonCryptoCheckoutApiGetNonCryptoCheckoutTransactionRequest, options?: AxiosRequestConfig) { + return NonCryptoCheckoutApiFp(this.configuration).getNonCryptoCheckoutTransaction(requestParameters.transactionId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns a list of successful non-crypto checkout transactions + * @summary Get a list of non-crypto checkout transactions + * @param {NonCryptoCheckoutApiGetNonCryptoCheckoutTransactionsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NonCryptoCheckoutApi + */ + public getNonCryptoCheckoutTransactions(requestParameters: NonCryptoCheckoutApiGetNonCryptoCheckoutTransactionsRequest = {}, options?: AxiosRequestConfig) { + return NonCryptoCheckoutApiFp(this.configuration).getNonCryptoCheckoutTransactions(requestParameters.pageSize, requestParameters.cursor, requestParameters.orderBy, requestParameters.direction, requestParameters.transactionId, requestParameters.orderId, requestParameters.walletAddress, requestParameters.status, requestParameters.provider, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/src/api/models/contract-create-apirequest.ts b/src/api/models/contract-create-apirequest.ts new file mode 100644 index 00000000..5348575e --- /dev/null +++ b/src/api/models/contract-create-apirequest.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable X API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 3.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface ContractCreateAPIRequest + */ +export interface ContractCreateAPIRequest { + /** + * + * @type {string} + * @memberof ContractCreateAPIRequest + */ + 'contract_address'?: string; + /** + * + * @type {string} + * @memberof ContractCreateAPIRequest + */ + 'data_url'?: string; + /** + * + * @type {string} + * @memberof ContractCreateAPIRequest + */ + 'mint_url'?: string; +} + diff --git a/src/api/models/provider-get-mint-status-response.ts b/src/api/models/contract-create-response.ts similarity index 54% rename from src/api/models/provider-get-mint-status-response.ts rename to src/api/models/contract-create-response.ts index c90ae6b2..f7859ba5 100644 --- a/src/api/models/provider-get-mint-status-response.ts +++ b/src/api/models/contract-create-response.ts @@ -13,21 +13,18 @@ */ -// May contain unused imports in some cases -// @ts-ignore -import { ProviderMintStatus } from './provider-mint-status'; /** * * @export - * @interface ProviderGetMintStatusResponse + * @interface ContractCreateResponse */ -export interface ProviderGetMintStatusResponse { +export interface ContractCreateResponse { /** - * Mint status for requested transactions - * @type {Array} - * @memberof ProviderGetMintStatusResponse + * + * @type {string} + * @memberof ContractCreateResponse */ - 'data'?: Array; + 'webhook_hash'?: string; } diff --git a/src/api/models/index.ts b/src/api/models/index.ts index 9af011ac..56372870 100644 --- a/src/api/models/index.ts +++ b/src/api/models/index.ts @@ -10,6 +10,8 @@ export * from './cancel-order-response'; export * from './collection'; export * from './collection-details'; export * from './collection-filter'; +export * from './contract-create-apirequest'; +export * from './contract-create-response'; export * from './create-collection-request'; export * from './create-exchange-and-urlapirequest'; export * from './create-metadata-refresh-request'; @@ -92,13 +94,19 @@ export * from './nftprimarytransaction-get-response'; export * from './nftprimarytransaction-list-transactions-response'; export * from './nftprimarytransaction-transaction-data'; export * from './nftprimarytransaction-widget-params'; +export * from './nftsecondarytransaction-check-order-response'; +export * from './nftsecondarytransaction-check-user-response'; +export * from './nftsecondarytransaction-create-apirequest'; +export * from './nftsecondarytransaction-create-response'; +export * from './nftsecondarytransaction-get-transaction-response'; +export * from './nftsecondarytransaction-list-transactions-response'; +export * from './nftsecondarytransaction-transaction-data'; +export * from './nftsecondarytransaction-widget-params'; export * from './optional-exchange-data'; export * from './order'; export * from './order-details'; export * from './order-fee-info'; export * from './project'; -export * from './provider-get-mint-status-response'; -export * from './provider-mint-status'; export * from './range'; export * from './register-user-request'; export * from './register-user-response'; diff --git a/src/api/models/nftprimarytransaction-create-response.ts b/src/api/models/nftprimarytransaction-create-response.ts index 4413e414..991c2c98 100644 --- a/src/api/models/nftprimarytransaction-create-response.ts +++ b/src/api/models/nftprimarytransaction-create-response.ts @@ -27,7 +27,7 @@ export interface NftprimarytransactionCreateResponse { */ 'contract_address'?: string; /** - * Temporary asset id + * Temporary asset id. Might be a token id if the token id is known or a generic description if it\'s not * @type {string} * @memberof NftprimarytransactionCreateResponse */ @@ -39,13 +39,13 @@ export interface NftprimarytransactionCreateResponse { */ 'provider'?: string; /** - * Ethereum address of the seller + * Wallet address that will receive the payment (in crypto) from the checkout provider for the minted NFT * @type {string} * @memberof NftprimarytransactionCreateResponse */ 'seller_wallet_address'?: string; /** - * Asset id + * ID of the token that has been successfully minted - should be the same as `offer_id` * @type {string} * @memberof NftprimarytransactionCreateResponse */ @@ -57,7 +57,7 @@ export interface NftprimarytransactionCreateResponse { */ 'transaction_id'?: string; /** - * Widget Url signed by provider + * NFT purchase URL given by the checkout provider that the user can use to complete payment * @type {string} * @memberof NftprimarytransactionCreateResponse */ diff --git a/src/api/models/nftprimarytransaction-get-response.ts b/src/api/models/nftprimarytransaction-get-response.ts index f8f37ec1..ba573ea7 100644 --- a/src/api/models/nftprimarytransaction-get-response.ts +++ b/src/api/models/nftprimarytransaction-get-response.ts @@ -27,7 +27,7 @@ export interface NftprimarytransactionGetResponse { */ 'contract_address'?: string; /** - * Temporary asset id + * Temporary asset id. Might be a token id if the token id is known or a generic description if it\'s not * @type {string} * @memberof NftprimarytransactionGetResponse */ @@ -45,13 +45,13 @@ export interface NftprimarytransactionGetResponse { */ 'seller_wallet_address'?: string; /** - * Transaction status + * Transaction status enums(created, waitingPayment, pending, completed, failed) * @type {string} * @memberof NftprimarytransactionGetResponse */ 'status'?: string; /** - * Asset id + * ID of the token that has been successfully minted - might or not be the same as `offer_id` * @type {string} * @memberof NftprimarytransactionGetResponse */ @@ -63,7 +63,7 @@ export interface NftprimarytransactionGetResponse { */ 'transaction_id'?: string; /** - * Ethereum address of the user who wants to create transaction + * Wallet address that receives the minted NFT * @type {string} * @memberof NftprimarytransactionGetResponse */ diff --git a/src/api/models/nftprimarytransaction-transaction-data.ts b/src/api/models/nftprimarytransaction-transaction-data.ts index 2a70dc3d..9de55c45 100644 --- a/src/api/models/nftprimarytransaction-transaction-data.ts +++ b/src/api/models/nftprimarytransaction-transaction-data.ts @@ -45,19 +45,19 @@ export interface NftprimarytransactionTransactionData { */ 'fees_amount'?: number; /** - * Amount of currency (from_currency) used for transaction + * Amount of the currency specified in `from_currency` that the buyer paid for the transaction * @type {number} * @memberof NftprimarytransactionTransactionData */ 'from_amount'?: number; /** - * Currency used for transaction + * Currency that the buyer used for the transaction * @type {string} * @memberof NftprimarytransactionTransactionData */ 'from_currency'?: string; /** - * Mint id + * Minting transaction ID - see mintTokens response * @type {string} * @memberof NftprimarytransactionTransactionData */ @@ -69,7 +69,7 @@ export interface NftprimarytransactionTransactionData { */ 'mint_status'?: string; /** - * Temporary asset id + * Temporary asset id. Might be a token id if the token id is known or a generic description if it\'s not * @type {string} * @memberof NftprimarytransactionTransactionData */ @@ -87,25 +87,25 @@ export interface NftprimarytransactionTransactionData { */ 'seller_wallet_address'?: string; /** - * Transaction status + * Transaction status enums(created, waitingPayment, pending, completed, failed) * @type {string} * @memberof NftprimarytransactionTransactionData */ 'status'?: string; /** - * Amount of target currency (to_currency) bought + * Amount of the currency specified in `to_currency` that the seller received from the checkout provider for the transaction * @type {number} * @memberof NftprimarytransactionTransactionData */ 'to_amount'?: number; /** - * Target currency + * Currency (crypto) that the checkout provider sent to the seller for the transaction * @type {string} * @memberof NftprimarytransactionTransactionData */ 'to_currency'?: string; /** - * Asset id + * ID of the token that has been successfully minted - should be the same as `offer_id` * @type {string} * @memberof NftprimarytransactionTransactionData */ @@ -123,7 +123,7 @@ export interface NftprimarytransactionTransactionData { */ 'updated_at'?: string; /** - * Ethereum address of the user who wants to create transaction + * Wallet address that receives the minted NFT * @type {string} * @memberof NftprimarytransactionTransactionData */ diff --git a/src/api/models/nftprimarytransaction-widget-params.ts b/src/api/models/nftprimarytransaction-widget-params.ts index 390eea78..c4ca5e31 100644 --- a/src/api/models/nftprimarytransaction-widget-params.ts +++ b/src/api/models/nftprimarytransaction-widget-params.ts @@ -21,7 +21,7 @@ */ export interface NftprimarytransactionWidgetParams { /** - * + * enums(light, dark) * @type {string} * @memberof NftprimarytransactionWidgetParams */ diff --git a/src/api/models/nftsecondarytransaction-check-order-response.ts b/src/api/models/nftsecondarytransaction-check-order-response.ts new file mode 100644 index 00000000..6cb7edfa --- /dev/null +++ b/src/api/models/nftsecondarytransaction-check-order-response.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable X API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 3.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface NftsecondarytransactionCheckOrderResponse + */ +export interface NftsecondarytransactionCheckOrderResponse { + /** + * + * @type {boolean} + * @memberof NftsecondarytransactionCheckOrderResponse + */ + 'available'?: boolean; +} + diff --git a/src/api/models/nftsecondarytransaction-check-user-response.ts b/src/api/models/nftsecondarytransaction-check-user-response.ts new file mode 100644 index 00000000..02933add --- /dev/null +++ b/src/api/models/nftsecondarytransaction-check-user-response.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable X API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 3.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface NftsecondarytransactionCheckUserResponse + */ +export interface NftsecondarytransactionCheckUserResponse { + /** + * + * @type {string} + * @memberof NftsecondarytransactionCheckUserResponse + */ + 'url'?: string; + /** + * + * @type {boolean} + * @memberof NftsecondarytransactionCheckUserResponse + */ + 'verified'?: boolean; +} + diff --git a/src/api/models/nftsecondarytransaction-create-apirequest.ts b/src/api/models/nftsecondarytransaction-create-apirequest.ts new file mode 100644 index 00000000..5034cdd2 --- /dev/null +++ b/src/api/models/nftsecondarytransaction-create-apirequest.ts @@ -0,0 +1,51 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable X API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 3.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { NftsecondarytransactionWidgetParams } from './nftsecondarytransaction-widget-params'; + +/** + * + * @export + * @interface NftsecondarytransactionCreateAPIRequest + */ +export interface NftsecondarytransactionCreateAPIRequest { + /** + * + * @type {number} + * @memberof NftsecondarytransactionCreateAPIRequest + */ + 'order_id'?: number; + /** + * + * @type {string} + * @memberof NftsecondarytransactionCreateAPIRequest + */ + 'provider'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionCreateAPIRequest + */ + 'user_wallet_address'?: string; + /** + * + * @type {NftsecondarytransactionWidgetParams} + * @memberof NftsecondarytransactionCreateAPIRequest + */ + 'widget'?: NftsecondarytransactionWidgetParams; +} + diff --git a/src/api/models/nftsecondarytransaction-create-response.ts b/src/api/models/nftsecondarytransaction-create-response.ts new file mode 100644 index 00000000..2b8db837 --- /dev/null +++ b/src/api/models/nftsecondarytransaction-create-response.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable X API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 3.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface NftsecondarytransactionCreateResponse + */ +export interface NftsecondarytransactionCreateResponse { + /** + * + * @type {string} + * @memberof NftsecondarytransactionCreateResponse + */ + 'contract_address'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionCreateResponse + */ + 'order_id'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionCreateResponse + */ + 'provider'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionCreateResponse + */ + 'token_id'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionCreateResponse + */ + 'transaction_id'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionCreateResponse + */ + 'url'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionCreateResponse + */ + 'user_wallet_address'?: string; +} + diff --git a/src/api/models/nftsecondarytransaction-get-transaction-response.ts b/src/api/models/nftsecondarytransaction-get-transaction-response.ts new file mode 100644 index 00000000..bbd49df9 --- /dev/null +++ b/src/api/models/nftsecondarytransaction-get-transaction-response.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable X API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 3.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface NftsecondarytransactionGetTransactionResponse + */ +export interface NftsecondarytransactionGetTransactionResponse { + /** + * + * @type {string} + * @memberof NftsecondarytransactionGetTransactionResponse + */ + 'order_id'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionGetTransactionResponse + */ + 'provider'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionGetTransactionResponse + */ + 'status'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionGetTransactionResponse + */ + 'token_address'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionGetTransactionResponse + */ + 'token_id'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionGetTransactionResponse + */ + 'transaction_id'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionGetTransactionResponse + */ + 'user_wallet_address'?: string; +} + diff --git a/src/api/models/nftsecondarytransaction-list-transactions-response.ts b/src/api/models/nftsecondarytransaction-list-transactions-response.ts new file mode 100644 index 00000000..6d2dcb61 --- /dev/null +++ b/src/api/models/nftsecondarytransaction-list-transactions-response.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable X API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 3.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { NftsecondarytransactionTransactionData } from './nftsecondarytransaction-transaction-data'; + +/** + * + * @export + * @interface NftsecondarytransactionListTransactionsResponse + */ +export interface NftsecondarytransactionListTransactionsResponse { + /** + * + * @type {string} + * @memberof NftsecondarytransactionListTransactionsResponse + */ + 'cursor'?: string; + /** + * + * @type {number} + * @memberof NftsecondarytransactionListTransactionsResponse + */ + 'remaining'?: number; + /** + * + * @type {Array} + * @memberof NftsecondarytransactionListTransactionsResponse + */ + 'result'?: Array; +} + diff --git a/src/api/models/nftsecondarytransaction-transaction-data.ts b/src/api/models/nftsecondarytransaction-transaction-data.ts new file mode 100644 index 00000000..07d80a88 --- /dev/null +++ b/src/api/models/nftsecondarytransaction-transaction-data.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable X API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 3.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface NftsecondarytransactionTransactionData + */ +export interface NftsecondarytransactionTransactionData { + /** + * + * @type {string} + * @memberof NftsecondarytransactionTransactionData + */ + 'created_at'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionTransactionData + */ + 'external_id'?: string; + /** + * + * @type {number} + * @memberof NftsecondarytransactionTransactionData + */ + 'fees_amount'?: number; + /** + * + * @type {number} + * @memberof NftsecondarytransactionTransactionData + */ + 'from_amount'?: number; + /** + * + * @type {string} + * @memberof NftsecondarytransactionTransactionData + */ + 'from_currency'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionTransactionData + */ + 'order_id'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionTransactionData + */ + 'provider'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionTransactionData + */ + 'status'?: string; + /** + * + * @type {number} + * @memberof NftsecondarytransactionTransactionData + */ + 'to_amount'?: number; + /** + * + * @type {string} + * @memberof NftsecondarytransactionTransactionData + */ + 'to_currency'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionTransactionData + */ + 'transaction_id'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionTransactionData + */ + 'updated_at'?: string; + /** + * + * @type {string} + * @memberof NftsecondarytransactionTransactionData + */ + 'user_wallet_address'?: string; +} + diff --git a/src/api/models/nftsecondarytransaction-widget-params.ts b/src/api/models/nftsecondarytransaction-widget-params.ts new file mode 100644 index 00000000..dc032160 --- /dev/null +++ b/src/api/models/nftsecondarytransaction-widget-params.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable X API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 3.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface NftsecondarytransactionWidgetParams + */ +export interface NftsecondarytransactionWidgetParams { + /** + * + * @type {string} + * @memberof NftsecondarytransactionWidgetParams + */ + 'theme'?: string; +} + diff --git a/src/api/models/provider-mint-status.ts b/src/api/models/provider-mint-status.ts deleted file mode 100644 index d0c3a694..00000000 --- a/src/api/models/provider-mint-status.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Immutable X API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 3.0 - * Contact: support@immutable.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -/** - * - * @export - * @interface ProviderMintStatus - */ -export interface ProviderMintStatus { - /** - * reason for mint failure - * @type {string} - * @memberof ProviderMintStatus - */ - 'failureReason'?: string; - /** - * External transaction id - * @type {string} - * @memberof ProviderMintStatus - */ - 'id'?: string; - /** - * Mint status - * @type {string} - * @memberof ProviderMintStatus - */ - 'status'?: string; - /** - * status updated-at timestamp - * @type {string} - * @memberof ProviderMintStatus - */ - 'statusChangedAt'?: string; - /** - * Asset id - * @type {string} - * @memberof ProviderMintStatus - */ - 'tokenId'?: string; - /** - * Transaction hash - * @type {Array} - * @memberof ProviderMintStatus - */ - 'transactionHash'?: Array; -} -