From 2d441365073a7cdd4cfa5ee77b287cae5c0cde2e Mon Sep 17 00:00:00 2001 From: Sam Jeston Date: Mon, 30 Oct 2023 10:58:06 +1000 Subject: [PATCH] [TD-999] Swagger regen to remove v1 trades and orders (#368) --- CHANGELOG.md | 10 + openapi.json | 1454 ++++++++--------- src/ImmutableX.ts | 4 +- src/api/.openapi-generator/FILES | 27 + src/api/domain/orders-api.ts | 1143 +------------ src/api/domain/projects-api.ts | 118 ++ src/api/domain/trades-api.ts | 466 +----- src/api/domain/transfers-api.ts | 62 +- src/api/domain/users-api.ts | 6 +- src/api/domain/withdrawals-api.ts | 8 +- .../models/api-sdkversion-check-response.ts | 42 + src/api/models/asset-collection.ts | 27 + src/api/models/asset-orders.ts | 27 + src/api/models/asset-properties-collection.ts | 27 + src/api/models/asset-properties.ts | 6 +- .../models/asset-with-orders-collection.ts | 27 + src/api/models/asset-with-orders-orders.ts | 27 + src/api/models/asset-with-orders.ts | 14 +- src/api/models/asset.ts | 14 +- src/api/models/collection-collection.ts | 90 + src/api/models/collection-filter-range.ts | 27 + src/api/models/collection-filter.ts | 6 +- .../models/create-project-group-request.ts | 44 + src/api/models/create-project-response.ts | 6 +- src/api/models/create-transfer-response-v2.ts | 30 + src/api/models/deposit-token.ts | 30 + src/api/models/deposit.ts | 6 +- .../models/encode-asset-request-token-data.ts | 27 + src/api/models/encode-asset-request-token.ts | 6 +- src/api/models/engine-register-user-result.ts | 30 + src/api/models/fee-token.ts | 6 +- .../get-signable-cancel-order-response.ts | 12 + .../get-signable-deposit-request-token.ts | 27 + .../models/get-signable-deposit-request.ts | 6 +- .../models/get-signable-order-request-v3.ts | 2 +- src/api/models/get-signable-order-response.ts | 12 + ...signable-registration-offchain-response.ts | 12 + .../get-signable-registration-response.ts | 12 + src/api/models/get-signable-trade-response.ts | 12 + src/api/models/get-signable-trade-result.ts | 12 + .../get-signable-transfer-request-token.ts | 27 + .../get-signable-transfer-request-v2.ts | 39 + .../models/get-signable-transfer-request.ts | 22 +- .../get-signable-transfer-response-v1.ts | 12 + .../get-signable-transfer-response-v2.ts | 45 + .../get-signable-withdrawal-request-token.ts | 27 + .../models/get-signable-withdrawal-request.ts | 6 +- .../get-signable-withdrawal-response.ts | 12 + src/api/models/index.ts | 27 + src/api/models/mint-token.ts | 30 + src/api/models/mint.ts | 6 +- src/api/models/order-fee-info-token.ts | 4 +- src/api/models/project.ts | 52 +- .../models/register-passport-user-request.ts | 54 + .../models/register-passport-user-result.ts | 42 + .../models/signable-transfer-details-token.ts | 27 + .../signable-transfer-details-v2-token.ts | 27 + .../models/signable-transfer-details-v2.ts | 45 + src/api/models/signable-transfer-details.ts | 6 +- ...ignable-transfer-response-details-token.ts | 27 + .../signable-transfer-response-details.ts | 18 +- src/api/models/token-data-properties.ts | 2 +- src/api/models/token-details.ts | 2 +- src/api/models/transfer-token.ts | 30 + src/api/models/transfer.ts | 6 +- src/api/models/withdrawal-token.ts | 30 + src/api/models/withdrawal.ts | 6 +- src/workflows/orders.ts | 4 +- src/workflows/registration.ts | 2 + 69 files changed, 2096 insertions(+), 2465 deletions(-) create mode 100644 src/api/models/api-sdkversion-check-response.ts create mode 100644 src/api/models/asset-collection.ts create mode 100644 src/api/models/asset-orders.ts create mode 100644 src/api/models/asset-properties-collection.ts create mode 100644 src/api/models/asset-with-orders-collection.ts create mode 100644 src/api/models/asset-with-orders-orders.ts create mode 100644 src/api/models/collection-collection.ts create mode 100644 src/api/models/collection-filter-range.ts create mode 100644 src/api/models/create-project-group-request.ts create mode 100644 src/api/models/create-transfer-response-v2.ts create mode 100644 src/api/models/deposit-token.ts create mode 100644 src/api/models/encode-asset-request-token-data.ts create mode 100644 src/api/models/engine-register-user-result.ts create mode 100644 src/api/models/get-signable-deposit-request-token.ts create mode 100644 src/api/models/get-signable-transfer-request-token.ts create mode 100644 src/api/models/get-signable-transfer-request-v2.ts create mode 100644 src/api/models/get-signable-transfer-response-v2.ts create mode 100644 src/api/models/get-signable-withdrawal-request-token.ts create mode 100644 src/api/models/mint-token.ts create mode 100644 src/api/models/register-passport-user-request.ts create mode 100644 src/api/models/register-passport-user-result.ts create mode 100644 src/api/models/signable-transfer-details-token.ts create mode 100644 src/api/models/signable-transfer-details-v2-token.ts create mode 100644 src/api/models/signable-transfer-details-v2.ts create mode 100644 src/api/models/signable-transfer-response-details-token.ts create mode 100644 src/api/models/transfer-token.ts create mode 100644 src/api/models/withdrawal-token.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index fc4b953a..2a414e27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Updated + +- A range of types, as per the current swagger definition of the Immutable X API + +### Removed + +- all `v1/trade` functions, use `v3/trade` instead +- all `v1/order` functions, use `v3/order` instead + ## [2.3.1] - 2023-10-24 - Updated README.md and examples to use sepolia in sandbox environment. - Replace AlchemyProvider with EtherscanProvider for sepolia network in examples. diff --git a/openapi.json b/openapi.json index 9e43bc38..de91d085 100644 --- a/openapi.json +++ b/openapi.json @@ -1551,232 +1551,9 @@ } } }, - "/v1/orders": { - "get": { - "description": "Get a list of orders\n\nThis version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listOrdersV3.\n\nDeprecation date - Mon, 01 May 2023\n\nSunset date - Fri, 01 Sept 2023", - "produces": [ - "application/json" - ], - "tags": [ - "orders" - ], - "summary": "Get a list of orders.", - "operationId": "listOrders", - "deprecated": true, - "parameters": [ - { - "type": "integer", - "description": "Page size of the result", - "name": "page_size", - "in": "query" - }, - { - "type": "string", - "description": "Cursor", - "name": "cursor", - "in": "query" - }, - { - "enum": [ - "created_at", - "expired_at", - "sell_quantity", - "buy_quantity", - "buy_quantity_with_fees", - "updated_at" - ], - "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": "Ethereum address of the user who submitted this order", - "name": "user", - "in": "query" - }, - { - "enum": [ - "active", - "filled", - "cancelled", - "expired", - "inactive" - ], - "type": "string", - "description": "Status of this order", - "name": "status", - "in": "query" - }, - { - "type": "string", - "description": "Filter orders to include those with created_at timestamps after this time, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", - "name": "min_timestamp", - "in": "query" - }, - { - "type": "string", - "description": "Filter orders to include those with created_at timestamps before this time, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", - "name": "max_timestamp", - "in": "query" - }, - { - "type": "string", - "description": "Filter orders to include those with updated_at timestamps after this time, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", - "name": "updated_min_timestamp", - "in": "query" - }, - { - "type": "string", - "description": "Filter orders to include those with updated_at timestamps before this time, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", - "name": "updated_max_timestamp", - "in": "query" - }, - { - "type": "string", - "description": "Token type of the asset this order buys", - "name": "buy_token_type", - "in": "query" - }, - { - "type": "string", - "description": "ERC721 Token ID of the asset this order buys", - "name": "buy_token_id", - "in": "query" - }, - { - "type": "string", - "description": "Internal IMX ID of the asset this order buys", - "name": "buy_asset_id", - "in": "query" - }, - { - "type": "string", - "description": "Token address of the asset this order buys", - "name": "buy_token_address", - "in": "query" - }, - { - "type": "string", - "description": "Token name of the asset this order buys", - "name": "buy_token_name", - "in": "query" - }, - { - "type": "string", - "description": "Min quantity for the asset this order buys", - "name": "buy_min_quantity", - "in": "query" - }, - { - "type": "string", - "description": "Max quantity for the asset this order buys", - "name": "buy_max_quantity", - "in": "query" - }, - { - "type": "string", - "description": "JSON-encoded metadata filters for the asset this order buys", - "name": "buy_metadata", - "in": "query" - }, - { - "type": "string", - "description": "Token type of the asset this order sells", - "name": "sell_token_type", - "in": "query" - }, - { - "type": "string", - "description": "ERC721 Token ID of the asset this order sells", - "name": "sell_token_id", - "in": "query" - }, - { - "type": "string", - "description": "Internal IMX ID of the asset this order sells", - "name": "sell_asset_id", - "in": "query" - }, - { - "type": "string", - "description": "Token address of the asset this order sells", - "name": "sell_token_address", - "in": "query" - }, - { - "type": "string", - "description": "Token name of the asset this order sells", - "name": "sell_token_name", - "in": "query" - }, - { - "type": "string", - "description": "Min quantity for the asset this order sells", - "name": "sell_min_quantity", - "in": "query" - }, - { - "type": "string", - "description": "Max quantity for the asset this order sells", - "name": "sell_max_quantity", - "in": "query" - }, - { - "type": "string", - "description": "JSON-encoded metadata filters for the asset this order sells", - "name": "sell_metadata", - "in": "query" - }, - { - "type": "string", - "description": "Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients", - "name": "auxiliary_fee_percentages", - "in": "query" - }, - { - "type": "string", - "description": "Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages", - "name": "auxiliary_fee_recipients", - "in": "query" - }, - { - "type": "boolean", - "description": "Set flag to true to include fee object for orders", - "name": "include_fees", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ListOrdersResponse" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/APIError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/APIError" - } - } - } - }, + "/v1/passport/users": { "post": { - "description": "Create an order. Use https://docs.x.immutable.com/reference#/operations/getSignableOrder to get request body params.\n\nThis version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createOrderV3.\n\nDeprecation date - Mon, 01 May 2023\n\nSunset date - Fri, 01 Sept 2023", + "description": "Registers a passport user", "consumes": [ "application/json" ], @@ -1784,109 +1561,33 @@ "application/json" ], "tags": [ - "orders" + "users" ], - "summary": "Create an order", - "operationId": "createOrder", - "deprecated": true, + "summary": "Registers a passport user", + "operationId": "RegisterPassportUser", "parameters": [ - { - "type": "string", - "description": "eth address", - "name": "x-imx-eth-address", - "in": "header" - }, - { - "type": "string", - "description": "eth signature", - "name": "x-imx-eth-signature", - "in": "header" - }, { "type": "string", "description": "Authorization header", "name": "Authorization", - "in": "header" + "in": "header", + "required": true }, { - "description": "create an order", - "name": "CreateOrderRequest", + "description": "Register Passport User", + "name": "RegisterPassportUserRequest", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CreateOrderRequest" + "$ref": "#/definitions/api.RegisterPassportUserRequest" } } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/CreateOrderResponse" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/APIError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/APIError" - } - } - } - } - }, - "/v1/orders/{id}": { - "get": { - "description": "Get an order.\n\nThis version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getOrderV3.\n\nDeprecation date - Mon, 01 May 2023\n\nSunset date - Fri, 01 Sept 2023", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "orders" - ], - "summary": "Get an order", - "operationId": "getOrder", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "Order ID", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "boolean", - "description": "Set flag to true to include fee body for the order", - "name": "include_fees", - "in": "query" - }, - { - "type": "string", - "description": "Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients", - "name": "auxiliary_fee_percentages", - "in": "query" - }, - { - "type": "string", - "description": "Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages", - "name": "auxiliary_fee_recipients", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "schema": { - "$ref": "#/definitions/Order" + "$ref": "#/definitions/RegisterPassportUserResult" } }, "400": { @@ -1895,8 +1596,8 @@ "$ref": "#/definitions/APIError" } }, - "404": { - "description": "Not Found", + "401": { + "description": "Unauthorized", "schema": { "$ref": "#/definitions/APIError" } @@ -1908,65 +1609,6 @@ } } } - }, - "delete": { - "description": "Cancel an order. Use https://docs.x.immutable.com/reference#/operations/getSignableCancelOrder to get request body params.\n\nThis version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/cancelOrderV3.\n\nDeprecation date - Mon, 01 May 2023\n\nSunset date - Fri, 01 Sept 2023", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "orders" - ], - "summary": "Cancel an order", - "operationId": "cancelOrder", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "eth address", - "name": "x-imx-eth-address", - "in": "header" - }, - { - "type": "string", - "description": "eth signature", - "name": "x-imx-eth-signature", - "in": "header" - }, - { - "type": "string", - "description": "Authorization header", - "name": "Authorization", - "in": "header" - }, - { - "description": "cancel an order", - "name": "CancelOrderRequest", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CancelOrderRequest" - } - }, - { - "type": "string", - "description": "Order ID to cancel", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/CancelOrderResponse" - } - } - } } }, "/v1/projects": { @@ -2069,6 +1711,7 @@ ], "summary": "Create a project", "operationId": "createProject", + "deprecated": true, "parameters": [ { "description": "create a project", @@ -2081,24 +1724,93 @@ }, { "type": "string", - "description": "String created by signing wallet address and timestamp", - "name": "IMX-Signature", - "in": "header", + "description": "String created by signing wallet address and timestamp", + "name": "IMX-Signature", + "in": "header", + "required": true + }, + { + "type": "string", + "description": "Unix Epoc timestamp", + "name": "IMX-Timestamp", + "in": "header", + "required": true + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/CreateProjectResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "401": { + "description": "Unauthorized", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/APIError" + } + } + } + } + }, + "/v1/projects/sdk": { + "get": { + "description": "Checks the SDK Version of caller against the current SDK Version and returns a message.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "projects" + ], + "summary": "Checks the SDK Version of caller against the current SDK Version", + "operationId": "getSdkVersion", + "parameters": [ + { + "type": "string", + "description": "Runtime Details", + "name": "details", + "in": "query", "required": true }, { "type": "string", - "description": "Unix Epoc timestamp", - "name": "IMX-Timestamp", - "in": "header", - "required": true + "description": "SDK Version", + "name": "version", + "in": "query" + }, + { + "type": "string", + "description": "Runtime ID", + "name": "id", + "in": "query" } ], "responses": { - "201": { - "description": "Created", + "200": { + "description": "OK", "schema": { - "$ref": "#/definitions/CreateProjectResponse" + "$ref": "#/definitions/api.SDKVersionCheckResponse" } }, "400": { @@ -2107,18 +1819,6 @@ "$ref": "#/definitions/APIError" } }, - "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/APIError" - } - }, - "403": { - "description": "Forbidden", - "schema": { - "$ref": "#/definitions/APIError" - } - }, "500": { "description": "Internal Server Error", "schema": { @@ -2199,42 +1899,6 @@ } } }, - "/v1/signable-cancel-order-details": { - "post": { - "description": "Sign cancel order message.\n\nThis version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getSignableCancelOrderV3.\n\nDeprecation date - Mon, 01 May 2023\n\nSunset date - Fri, 01 Sept 2023", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "orders" - ], - "summary": "Sign cancel order message", - "operationId": "getSignableCancelOrder", - "deprecated": true, - "parameters": [ - { - "description": "get a signable cancel order", - "name": "GetSignableCancelOrderRequest", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/GetSignableCancelOrderRequest" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/GetSignableCancelOrderResponse" - } - } - } - } - }, "/v1/signable-deposit-details": { "post": { "description": "Gets details of a signable deposit", @@ -2385,7 +2049,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/GetSignableTransferRequestV1" + "$ref": "#/definitions/GetSignableTransferRequest" } } ], @@ -2511,209 +2175,18 @@ "operationId": "getToken", "parameters": [ { - "type": "string", - "description": "Token Contract Address", - "name": "address", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/TokenDetails" - } - } - } - } - }, - "/v1/trades": { - "get": { - "description": "Get a list of trades.\n\nThis version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listTradesV3.\n\nDeprecation date - Mon, 01 May 2023\n\nSunset date - Fri, 01 Sept 2023", - "produces": [ - "application/json" - ], - "tags": [ - "trades" - ], - "summary": "Get a list of trades", - "operationId": "listTrades", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "Party A's (buy order) token type of currency used to buy", - "name": "party_a_token_type", - "in": "query" - }, - { - "type": "string", - "description": "Party A's (buy order) token address of currency used to buy", - "name": "party_a_token_address", - "in": "query" - }, - { - "type": "string", - "description": "Party B's (sell order) token type of NFT sold - always ERC721", - "name": "party_b_token_type", - "in": "query" - }, - { - "type": "string", - "description": "Party B's (sell order) collection address of NFT sold", - "name": "party_b_token_address", - "in": "query" - }, - { - "type": "string", - "description": "Party B's (sell order) token id of NFT sold", - "name": "party_b_token_id", - "in": "query" - }, - { - "type": "integer", - "description": "Page size of the result", - "name": "page_size", - "in": "query" - }, - { - "type": "string", - "description": "Cursor", - "name": "cursor", - "in": "query" - }, - { - "enum": [ - "created_at", - "transaction_id", - "party_a_sold_quantity", - "party_b_sold_quantity" - ], - "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": "Minimum timestamp for this trade, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", - "name": "min_timestamp", - "in": "query" - }, - { - "type": "string", - "description": "Maximum timestamp for this trade, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", - "name": "max_timestamp", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ListTradesResponse" - } - } - } - }, - "post": { - "description": "Create a trade. Use https://docs.x.immutable.com/reference#/operations/getSignableTrade to get request body params.\n\nThis version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createTradeV3.\n\nDeprecation date - Mon, 01 May 2023\n\nSunset date - Fri, 01 Sept 2023", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "trades" - ], - "summary": "Create a Trade between two parties", - "operationId": "createTrade", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "eth address", - "name": "x-imx-eth-address", - "in": "header" - }, - { - "type": "string", - "description": "eth signature", - "name": "x-imx-eth-signature", - "in": "header" - }, - { - "type": "string", - "description": "Authorization header", - "name": "Authorization", - "in": "header" - }, - { - "description": "create a trade", - "name": "CreateTradeRequest", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateTradeRequestV1" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/CreateTradeResponse" - } - } - } - } - }, - "/v1/trades/{id}": { - "get": { - "description": "Get details of a trade with the given ID", - "produces": [ - "application/json" - ], - "tags": [ - "trades" - ], - "summary": "Get details of a trade with the given ID", - "operationId": "getTrade", - "deprecated": true, - "parameters": [ - { - "type": "string", - "description": "Trade ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Trade" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/APIError" - } - }, - "500": { - "description": "Internal Server Error", + "type": "string", + "description": "Token Contract Address", + "name": "address", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", "schema": { - "$ref": "#/definitions/APIError" + "$ref": "#/definitions/TokenDetails" } } } @@ -2746,7 +2219,6 @@ { "enum": [ "transaction_id", - "updated_at", "created_at", "sender_ether_key", "receiver_ether_key" @@ -3040,66 +2512,6 @@ } } }, - "/v1/passport/users": { - "post": { - "description": "Registers a passport user", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "users" - ], - "summary": "Registers a passport user", - "operationId": "RegisterPassportUser", - "parameters": [ - { - "type": "string", - "description": "Authorization header", - "name": "Authorization", - "in": "header", - "required": true - }, - { - "description": "Register Passport User", - "name": "RegisterPassportUserRequest", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/api.RegisterPassportUserRequest" - } - } - ], - "responses": { - "204": { - "description": "No Content", - "schema": { - "type": "object" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/APIError" - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "$ref": "#/definitions/APIError" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/APIError" - } - } - } - } - }, "/v1/users/{user}": { "get": { "description": "Get stark keys for a registered user", @@ -3276,7 +2688,7 @@ } }, "post": { - "description": "Creates a withdrawal", + "description": "Creates a withdrawal. Use https://docs.x.immutable.com/reference#/operations/getSignableWithdrawal to get request body params.", "consumes": [ "application/json" ], @@ -3944,7 +3356,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/GetSignableTransferRequest" + "$ref": "#/definitions/GetSignableTransferRequestV2" } } ], @@ -3952,7 +3364,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/GetSignableTransferResponse" + "$ref": "#/definitions/GetSignableTransferResponseV2" } }, "400": { @@ -4029,7 +3441,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/CreateTransferResponse" + "$ref": "#/definitions/CreateTransferResponseV2" } }, "400": { @@ -4476,7 +3888,7 @@ } }, "post": { - "description": "Create an order using the v3 orderbook. Currently only buy NFT orders are supported.", + "description": "Create an order using the v3 orderbook.", "consumes": [ "application/json" ], @@ -4871,13 +4283,13 @@ }, { "type": "string", - "description": "Minimum timestamp for this trade, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", + "description": "Minimum timestamp for this trade, in ISO 8601 UTC format. Example: '2022-06-27T00:10:22Z'", "name": "min_timestamp", "in": "query" }, { "type": "string", - "description": "Maximum timestamp for this trade, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", + "description": "Maximum timestamp for this trade, in ISO 8601 UTC format. Example: '2022-06-27T00:10:22Z'", "name": "max_timestamp", "in": "query" } @@ -4904,7 +4316,7 @@ } }, "post": { - "description": "Create a Trade. Currently only buy order is supported.", + "description": "Create a Trade.", "consumes": [ "application/json" ], @@ -5070,8 +4482,7 @@ ], "properties": { "collection": { - "description": "Information about the collection to which this asset belongs", - "$ref": "#/definitions/CollectionDetails" + "$ref": "#/definitions/assetCollection" }, "created_at": { "description": "Timestamp of when the asset was created", @@ -5110,8 +4521,7 @@ "x-nullable": true }, "orders": { - "description": "[DEPRECATED] Open orders for this asset will always return empty. Use GET /orders", - "$ref": "#/definitions/OrderDetails" + "$ref": "#/definitions/assetOrders" }, "status": { "description": "Status of this asset (where it is in the system)", @@ -5145,8 +4555,7 @@ "type": "object", "properties": { "collection": { - "description": "Details of this asset's collection", - "$ref": "#/definitions/CollectionDetails" + "$ref": "#/definitions/assetPropertiesCollection" }, "image_url": { "description": "Image URL of this asset", @@ -5176,8 +4585,7 @@ ], "properties": { "collection": { - "description": "Information about the collection to which this asset belongs", - "$ref": "#/definitions/CollectionDetails" + "$ref": "#/definitions/assetWithOrdersCollection" }, "created_at": { "description": "Timestamp of when the asset was created", @@ -5216,8 +4624,7 @@ "x-nullable": true }, "orders": { - "description": "Open orders for this asset", - "$ref": "#/definitions/OrderDetails" + "$ref": "#/definitions/assetWithOrdersOrders" }, "status": { "description": "Status of this asset (where it is in the system)", @@ -5402,8 +4809,7 @@ "type": "string" }, "range": { - "description": "Range of values for this property", - "$ref": "#/definitions/Range" + "$ref": "#/definitions/collectionFilterRange" }, "type": { "description": "Type of this filter", @@ -5492,7 +4898,10 @@ }, "CreateMetadataRefreshRequest": { "type": "object", - "required": ["collection_address", "token_ids"], + "required": [ + "collection_address", + "token_ids" + ], "properties": { "collection_address": { "description": "The collection contract address", @@ -5681,6 +5090,27 @@ } } }, + "CreateProjectGroupRequest": { + "type": "object", + "required": [ + "chain_type", + "name" + ], + "properties": { + "chain_type": { + "description": "The chain type", + "type": "string", + "enum": [ + "starkex", + "zkevm" + ] + }, + "name": { + "description": "The project group name", + "type": "string" + } + } + }, "CreateProjectRequest": { "type": "object", "required": [ @@ -5710,8 +5140,8 @@ ], "properties": { "id": { - "description": "The project ID", - "type": "integer" + "description": "The project group ID", + "type": "string" } } }, @@ -5926,6 +5356,21 @@ } } }, + "CreateTransferResponseV2": { + "type": "object", + "required": [ + "transfer_ids" + ], + "properties": { + "transfer_ids": { + "description": "List of transfer IDs", + "type": "array", + "items": { + "type": "integer" + } + } + } + }, "CreateWithdrawalRequest": { "type": "object", "required": [ @@ -6028,8 +5473,7 @@ "type": "string" }, "token": { - "description": "Details of the asset being deposited", - "$ref": "#/definitions/Token" + "$ref": "#/definitions/depositToken" }, "transaction_id": { "description": "Sequential ID of this transaction within Immutable X", @@ -6179,7 +5623,11 @@ }, "FeeInfo": { "type": "object", - "required": ["asset_id", "fee_limit", "source_vault_id"], + "required": [ + "asset_id", + "fee_limit", + "source_vault_id" + ], "properties": { "asset_id": { "description": "ID of the asset these fees relate to", @@ -6199,7 +5647,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/definitions/FeeData" + "$ref": "#/definitions/feeTokenData" }, "type": { "description": "Fee token type. One of ETH/ERC20", @@ -6348,7 +5796,9 @@ "required": [ "order_id", "payload_hash", - "signable_message" + "readable_transaction", + "signable_message", + "verification_signature" ], "properties": { "order_id": { @@ -6359,9 +5809,17 @@ "description": "Hash of the payload to be signed for cancel order", "type": "string" }, + "readable_transaction": { + "description": "EIP-712 encoding of the StarkEx cancel order request to be displayed to the user", + "type": "string" + }, "signable_message": { "description": "Message to sign from wallet to confirm cancel order", "type": "string" + }, + "verification_signature": { + "description": "IMX signed readable_transaction and payload_hash", + "type": "string" } } }, @@ -6378,8 +5836,7 @@ "type": "string" }, "token": { - "description": "Details of the token the user is depositing", - "$ref": "#/definitions/SignableToken" + "$ref": "#/definitions/getSignableDepositRequestToken" }, "user": { "description": "User who is depositing", @@ -6494,7 +5951,7 @@ } }, "split_fees": { - "description": "SplitFees dictates whether fees will be split between maker \u0026 taker, set split_fees to true when submitting signing to v3 endpoints and vice versa for v1", + "description": "SplitFees is a deprecated field. It's value is ignored.", "type": "boolean" }, "token_buy": { @@ -6519,10 +5976,12 @@ "expiration_timestamp", "nonce", "payload_hash", + "readable_transaction", "signable_message", "stark_key", "vault_id_buy", - "vault_id_sell" + "vault_id_sell", + "verification_signature" ], "properties": { "amount_buy": { @@ -6556,6 +6015,10 @@ "description": "Hash of the payload to be signed for signable order", "type": "string" }, + "readable_transaction": { + "description": "EIP-712 encoding of the StarkEx order transaction to be displayed to the user", + "type": "string" + }, "signable_message": { "description": "Message to sign with L1 wallet to confirm order request", "type": "string" @@ -6571,6 +6034,10 @@ "vault_id_sell": { "description": "ID of the vault to sell from", "type": "integer" + }, + "verification_signature": { + "description": "IMX signed readable_transaction and payload_hash", + "type": "string" } } }, @@ -6578,16 +6045,26 @@ "type": "object", "required": [ "payload_hash", - "signable_message" + "readable_transaction", + "signable_message", + "verification_signature" ], "properties": { "payload_hash": { "description": "Hash of the payload to be signed for user registration offchain", "type": "string" }, + "readable_transaction": { + "description": "EIP-712 encoding of the StarkEx Register User Offchain request to be displayed to the user", + "type": "string" + }, "signable_message": { "description": "Message to sign with L1 wallet to register user offchain", "type": "string" + }, + "verification_signature": { + "description": "IMX signed readable_transaction and payload_hash", + "type": "string" } } }, @@ -6612,7 +6089,9 @@ "type": "object", "required": [ "operator_signature", - "payload_hash" + "payload_hash", + "readable_transaction", + "verification_signature" ], "properties": { "operator_signature": { @@ -6622,6 +6101,14 @@ "payload_hash": { "description": "Hash of the payload to be signed for user registration", "type": "string" + }, + "readable_transaction": { + "description": "EIP-712 encoding of the StarkEx Register User request to be displayed to the user", + "type": "string" + }, + "verification_signature": { + "description": "IMX signed readable_transaction and payload_hash", + "type": "string" } } }, @@ -6663,10 +6150,12 @@ "expiration_timestamp", "nonce", "payload_hash", + "readable_transaction", "signable_message", "stark_key", "vault_id_buy", - "vault_id_sell" + "vault_id_sell", + "verification_signature" ], "properties": { "amount_buy": { @@ -6700,6 +6189,10 @@ "description": "Payload Hash", "type": "string" }, + "readable_transaction": { + "description": "EIP-712 encoding of the StarkEx trade transaction to be displayed to the user", + "type": "string" + }, "signable_message": { "description": "Message to sign with L1 wallet to confirm trade request", "type": "string" @@ -6715,6 +6208,10 @@ "vault_id_sell": { "description": "ID of the vault to sell from", "type": "integer" + }, + "verification_signature": { + "description": "IMX signed readable_transaction and payload_hash", + "type": "string" } } }, @@ -6752,6 +6249,10 @@ "description": "Payload Hash", "type": "string" }, + "readable_transaction": { + "description": "EIP-712 encoding of the StarkEx trade transaction to be displayed to the user", + "type": "string" + }, "signable_message": { "description": "Message to sign with L1 wallet to confirm trade request", "type": "string" @@ -6767,26 +6268,36 @@ "vault_id_sell": { "description": "ID of the vault to sell from", "type": "integer" + }, + "verification_signature": { + "description": "IMX signed readable_transaction and payload_hash", + "type": "string" } } }, "GetSignableTransferRequest": { "type": "object", "required": [ - "sender_ether_key", - "signable_requests" + "amount", + "receiver", + "sender", + "token" ], "properties": { - "sender_ether_key": { + "amount": { + "description": "Amount of the token to transfer", + "type": "string" + }, + "receiver": { + "description": "Ethereum address of the receiving user", + "type": "string" + }, + "sender": { "description": "Ethereum address of the transferring user", "type": "string" }, - "signable_requests": { - "description": "List of signable transfer details", - "type": "array", - "items": { - "$ref": "#/definitions/SignableTransferDetails" - } + "token": { + "$ref": "#/definitions/getSignableTransferRequestToken" } } }, @@ -6817,6 +6328,26 @@ } } }, + "GetSignableTransferRequestV2": { + "type": "object", + "required": [ + "sender_ether_key", + "signable_requests" + ], + "properties": { + "sender_ether_key": { + "description": "Ethereum address of the transferring user", + "type": "string" + }, + "signable_requests": { + "description": "List of signable transfer details", + "type": "array", + "items": { + "$ref": "#/definitions/SignableTransferDetailsV2" + } + } + } + }, "GetSignableTransferResponse": { "type": "object", "required": [ @@ -6850,10 +6381,12 @@ "expiration_timestamp", "nonce", "payload_hash", + "readable_transaction", "receiver_stark_key", "receiver_vault_id", "sender_vault_id", - "signable_message" + "signable_message", + "verification_signature" ], "properties": { "amount": { @@ -6876,6 +6409,10 @@ "description": "Hash of the payload", "type": "string" }, + "readable_transaction": { + "description": "EIP-712 encoding of the StarkEx transfer transaction to be displayed to the user", + "type": "string" + }, "receiver_stark_key": { "description": "Receiver of the transfer", "type": "string" @@ -6895,6 +6432,35 @@ "signable_message": { "description": "Message to sign with L1 wallet to confirm transfer request", "type": "string" + }, + "verification_signature": { + "description": "IMX signed readable_transaction and payload_hash", + "type": "string" + } + } + }, + "GetSignableTransferResponseV2": { + "type": "object", + "required": [ + "sender_stark_key", + "signable_message", + "signable_responses" + ], + "properties": { + "sender_stark_key": { + "description": "Sender of the transfer", + "type": "string" + }, + "signable_message": { + "description": "Message to sign with L1 wallet to confirm transfer request", + "type": "string" + }, + "signable_responses": { + "description": "List of transfer responses without the sender stark key", + "type": "array", + "items": { + "$ref": "#/definitions/SignableTransferResponseDetails" + } } } }, @@ -6911,8 +6477,7 @@ "type": "string" }, "token": { - "description": "Token to withdraw", - "$ref": "#/definitions/SignableToken" + "$ref": "#/definitions/getSignableWithdrawalRequestToken" }, "user": { "description": "Ethereum address of the user who is making this withdrawal", @@ -6927,9 +6492,11 @@ "asset_id", "nonce", "payload_hash", + "readable_transaction", "signable_message", "stark_key", - "vault_id" + "vault_id", + "verification_signature" ], "properties": { "amount": { @@ -6948,6 +6515,10 @@ "description": "Encoded payload hash", "type": "string" }, + "readable_transaction": { + "description": "EIP-712 encoding of the StarkEx withdrawal request to be displayed to the user", + "type": "string" + }, "signable_message": { "description": "Message to sign with L1 wallet to verity withdrawal request", "type": "string" @@ -6959,6 +6530,10 @@ "vault_id": { "description": "ID of the vault we are withdrawing from", "type": "integer" + }, + "verification_signature": { + "description": "IMX signed readable_transaction and payload_hash", + "type": "string" } } }, @@ -7024,7 +6599,11 @@ }, "ListBalancesResponse": { "type": "object", - "required": ["cursor", "remaining", "result"], + "required": [ + "cursor", + "remaining", + "result" + ], "properties": { "cursor": { "description": "Generated cursor returned by previous query", @@ -7145,7 +6724,11 @@ }, "ListOrdersResponseV3": { "type": "object", - "required": ["cursor", "remaining", "result"], + "required": [ + "cursor", + "remaining", + "result" + ], "properties": { "cursor": { "description": "Generated cursor returned by previous query", @@ -7379,7 +6962,9 @@ }, "MetadataSchemaRequest": { "type": "object", - "required": ["name"], + "required": [ + "name" + ], "properties": { "filterable": { "description": "Sets the metadata as filterable", @@ -7428,8 +7013,7 @@ "type": "string" }, "token": { - "description": "Details of the asset which has been minted", - "$ref": "#/definitions/Token" + "$ref": "#/definitions/mintToken" }, "transaction_id": { "description": "Sequential ID of transaction in Immutable X", @@ -7806,56 +7390,24 @@ "Project": { "type": "object", "required": [ - "collection_limit_expires_at", - "collection_monthly_limit", - "collection_remaining", - "company_name", - "contact_email", "id", - "mint_limit_expires_at", - "mint_monthly_limit", - "mint_remaining", "name" ], "properties": { - "collection_limit_expires_at": { - "description": "The current period expiry date for collection limit", - "type": "string" - }, - "collection_monthly_limit": { - "description": "The total monthly collection limit", - "type": "integer" - }, - "collection_remaining": { - "description": "The number of collection remaining in the current period", - "type": "integer" - }, - "company_name": { - "description": "The company name", - "type": "string" - }, - "contact_email": { - "description": "The project contact email (must be registered as a developer account with Immutable at https://hub.immutable.com)", + "chain_type": { + "description": "The project ChainType", "type": "string" }, "id": { - "description": "The project ID", - "type": "integer" - }, - "mint_limit_expires_at": { - "description": "The current period expiry date for mint operation limit", + "description": "The project group ID", "type": "string" }, - "mint_monthly_limit": { - "description": "The total monthly mint operation limit", - "type": "integer" - }, - "mint_remaining": { - "description": "The number of mint operation remaining in the current period", - "type": "integer" + "name": { + "description": "The project group name", + "type": "string" }, - "name": { - "description": "The project name", + "org_id": { + "description": "The organisation ID that the project belongs to", "type": "string" } } @@ -7873,19 +7425,16 @@ } } }, - "RegisterUserRequest": { + "RegisterPassportUserRequest": { "type": "object", "required": [ "eth_signature", "ether_key", "stark_key", - "stark_signature" + "stark_signature", + "user_id" ], "properties": { - "email": { - "description": "User email", - "type": "string" - }, "eth_signature": { "description": "Eth signature", "type": "string" @@ -7901,10 +7450,31 @@ "stark_signature": { "description": "Payload signature", "type": "string" + }, + "user_id": { + "description": "The auth0 user id", + "type": "string" } } }, - "api.RegisterPassportUserRequest": { + "RegisterPassportUserResult": { + "type": "object", + "properties": { + "ether_key": { + "description": "The ether key of the user", + "type": "string" + }, + "stark_key": { + "description": "The stark key of the user", + "type": "string" + }, + "user_admin_key": { + "description": "The admin key of the user", + "type": "string" + } + } + }, + "RegisterUserRequest": { "type": "object", "required": [ "eth_signature", @@ -7913,6 +7483,10 @@ "stark_signature" ], "properties": { + "email": { + "description": "User email", + "type": "string" + }, "eth_signature": { "description": "Eth signature", "type": "string" @@ -7973,8 +7547,28 @@ "type": "string" }, "token": { - "description": "Token to transfer", - "$ref": "#/definitions/SignableToken" + "$ref": "#/definitions/signableTransferDetailsToken" + } + } + }, + "SignableTransferDetailsV2": { + "type": "object", + "required": [ + "amount", + "receiver", + "token" + ], + "properties": { + "amount": { + "description": "Amount of the token to transfer", + "type": "string" + }, + "receiver": { + "description": "Ethereum address of the receiving user", + "type": "string" + }, + "token": { + "$ref": "#/definitions/signableTransferDetailsV2Token" } } }, @@ -7986,10 +7580,12 @@ "expiration_timestamp", "nonce", "payload_hash", + "readable_transaction", "receiver_stark_key", "receiver_vault_id", "sender_vault_id", - "token" + "token", + "verification_signature" ], "properties": { "amount": { @@ -8012,6 +7608,10 @@ "description": "Hash of the payload to be signed for transfer", "type": "string" }, + "readable_transaction": { + "description": "EIP-712 encoding of the StarkEx transfer request to be displayed to the user", + "type": "string" + }, "receiver_stark_key": { "description": "Receiver of the transfer", "type": "string" @@ -8025,8 +7625,11 @@ "type": "integer" }, "token": { - "description": "Token in request to match in SDK implementation", - "$ref": "#/definitions/SignableToken" + "$ref": "#/definitions/signableTransferResponseDetailsToken" + }, + "verification_signature": { + "description": "IMX signed readable_transaction and payload_hash", + "type": "string" } } }, @@ -8129,7 +7732,7 @@ "type": "string" }, "token_address": { - "description": "Address of the ERC721 contract", + "description": "Address of the ERC20 contract", "type": "string" } } @@ -8220,8 +7823,7 @@ "x-nullable": true }, "token": { - "description": "Token transferred by the user", - "$ref": "#/definitions/Token" + "$ref": "#/definitions/transferToken" }, "transaction_id": { "description": "Sequential transaction ID", @@ -8359,8 +7961,7 @@ "type": "string" }, "token": { - "description": "Details of the asset this user is withdrawing", - "$ref": "#/definitions/Token" + "$ref": "#/definitions/withdrawalToken" }, "transaction_id": { "description": "Sequential ID of this transaction", @@ -8456,6 +8057,47 @@ } } }, + "api.RegisterPassportUserRequest": { + "type": "object", + "required": [ + "eth_signature", + "ether_key", + "stark_key", + "stark_signature" + ], + "properties": { + "eth_signature": { + "description": "Eth signature", + "type": "string" + }, + "ether_key": { + "description": "The ether key of the user", + "type": "string" + }, + "stark_key": { + "description": "Public stark key of the user", + "type": "string" + }, + "stark_signature": { + "description": "Payload signature", + "type": "string" + } + } + }, + "api.SDKVersionCheckResponse": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "ok": { + "type": "boolean" + }, + "runtimeId": { + "type": "string" + } + } + }, "apiOrderV3Buy": { "description": "Details of the asset being bought", "allOf": [ @@ -8492,6 +8134,98 @@ ], "x-go-gen-location": "models" }, + "assetCollection": { + "description": "Information about the collection to which this asset belongs", + "allOf": [ + { + "$ref": "#/definitions/CollectionDetails" + } + ], + "x-go-gen-location": "models" + }, + "assetOrders": { + "description": "[DEPRECATED] Open orders for this asset will always return empty. Use GET /orders", + "allOf": [ + { + "$ref": "#/definitions/OrderDetails" + } + ], + "x-go-gen-location": "models" + }, + "assetPropertiesCollection": { + "description": "Details of this asset's collection", + "allOf": [ + { + "$ref": "#/definitions/CollectionDetails" + } + ], + "x-go-gen-location": "models" + }, + "assetWithOrdersCollection": { + "description": "Information about the collection to which this asset belongs", + "allOf": [ + { + "$ref": "#/definitions/CollectionDetails" + } + ], + "x-go-gen-location": "models" + }, + "assetWithOrdersOrders": { + "description": "Open orders for this asset", + "allOf": [ + { + "$ref": "#/definitions/OrderDetails" + } + ], + "x-go-gen-location": "models" + }, + "collection.Collection": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "collectionImageURL": { + "type": "string" + }, + "createdAt": { + "type": "string" + }, + "description": { + "type": "string" + }, + "iconURL": { + "type": "string" + }, + "lastCollectionEventID": { + "type": "string" + }, + "metadataAPIURL": { + "type": "string" + }, + "name": { + "type": "string" + }, + "projectID": { + "type": "integer" + }, + "projectOwnerAddress": { + "type": "string" + }, + "updatedAt": { + "type": "string" + } + } + }, + "collectionFilterRange": { + "description": "Range of values for this property", + "allOf": [ + { + "$ref": "#/definitions/Range" + } + ], + "x-go-gen-location": "models" + }, "contract.CreateAPIRequest": { "type": "object", "properties": { @@ -8523,12 +8257,20 @@ ], "x-go-gen-location": "models" }, + "depositToken": { + "description": "Details of the asset being deposited", + "allOf": [ + { + "$ref": "#/definitions/Token" + } + ], + "x-go-gen-location": "models" + }, "encodeAssetRequestToken": { "type": "object", "properties": { "data": { - "description": "Extra token information to be encoded", - "$ref": "#/definitions/EncodeAssetTokenData" + "$ref": "#/definitions/encodeAssetRequestTokenData" }, "type": { "description": "The type of the token to be encoded", @@ -8542,6 +8284,23 @@ }, "x-go-gen-location": "models" }, + "encodeAssetRequestTokenData": { + "description": "Extra token information to be encoded", + "allOf": [ + { + "$ref": "#/definitions/EncodeAssetTokenData" + } + ], + "x-go-gen-location": "models" + }, + "engine.RegisterUserResult": { + "type": "object", + "properties": { + "tx_hash": { + "type": "string" + } + } + }, "exchange.CreateExchangeAndURLResponse": { "type": "object", "properties": { @@ -8578,6 +8337,15 @@ ], "x-go-gen-location": "models" }, + "getSignableDepositRequestToken": { + "description": "Details of the token the user is depositing", + "allOf": [ + { + "$ref": "#/definitions/SignableToken" + } + ], + "x-go-gen-location": "models" + }, "getSignableOrderRequestTokenBuy": { "description": "Token to buy", "allOf": [ @@ -8650,6 +8418,24 @@ ], "x-go-gen-location": "models" }, + "getSignableTransferRequestToken": { + "description": "Token to transfer", + "allOf": [ + { + "$ref": "#/definitions/SignableToken" + } + ], + "x-go-gen-location": "models" + }, + "getSignableWithdrawalRequestToken": { + "description": "Token to withdraw", + "allOf": [ + { + "$ref": "#/definitions/SignableToken" + } + ], + "x-go-gen-location": "models" + }, "lambdas.APIError": { "type": "object", "properties": { @@ -8671,6 +8457,15 @@ } } }, + "mintToken": { + "description": "Details of the asset which has been minted", + "allOf": [ + { + "$ref": "#/definitions/Token" + } + ], + "x-go-gen-location": "models" + }, "nftprimarytransaction.CreateAPIRequest": { "type": "object", "properties": { @@ -8976,6 +8771,33 @@ } } }, + "signableTransferDetailsToken": { + "description": "Token to transfer", + "allOf": [ + { + "$ref": "#/definitions/SignableToken" + } + ], + "x-go-gen-location": "models" + }, + "signableTransferDetailsV2Token": { + "description": "Token to transfer", + "allOf": [ + { + "$ref": "#/definitions/SignableToken" + } + ], + "x-go-gen-location": "models" + }, + "signableTransferResponseDetailsToken": { + "description": "Token in request to match in SDK implementation", + "allOf": [ + { + "$ref": "#/definitions/SignableToken" + } + ], + "x-go-gen-location": "models" + }, "store.MakerTakerFee": { "type": "object", "required": [ @@ -9115,6 +8937,24 @@ } ], "x-go-gen-location": "models" + }, + "transferToken": { + "description": "Token transferred by the user", + "allOf": [ + { + "$ref": "#/definitions/Token" + } + ], + "x-go-gen-location": "models" + }, + "withdrawalToken": { + "description": "Details of the asset this user is withdrawing", + "allOf": [ + { + "$ref": "#/definitions/Token" + } + ], + "x-go-gen-location": "models" } } } \ No newline at end of file diff --git a/src/ImmutableX.ts b/src/ImmutableX.ts index cf6cfb17..ad70a701 100644 --- a/src/ImmutableX.ts +++ b/src/ImmutableX.ts @@ -54,7 +54,7 @@ import { TokensApiGetTokenRequest, TokensApiListTokensRequest, TradesApi, - TradesApiGetTradeRequest, + TradesApiGetTradeV3Request, TradesApiListTradesV3Request, TransfersApi, TransfersApiGetTransferRequest, @@ -722,7 +722,7 @@ export class ImmutableX { * @returns a promise that resolves with the requested Trade * @throws {@link index.IMXError} */ - public getTrade(request: TradesApiGetTradeRequest) { + public getTrade(request: TradesApiGetTradeV3Request) { return this.tradesApi .getTradeV3(request) .then(res => res.data) diff --git a/src/api/.openapi-generator/FILES b/src/api/.openapi-generator/FILES index 8024cfb7..56c0a325 100644 --- a/src/api/.openapi-generator/FILES +++ b/src/api/.openapi-generator/FILES @@ -32,14 +32,22 @@ models/api-order-v3-sell.ts models/api-order-v3-taker-fees.ts models/api-order-v3.ts models/api-register-passport-user-request.ts +models/api-sdkversion-check-response.ts models/apierror.ts +models/asset-collection.ts +models/asset-orders.ts +models/asset-properties-collection.ts models/asset-properties.ts +models/asset-with-orders-collection.ts +models/asset-with-orders-orders.ts models/asset-with-orders.ts models/asset.ts models/balance.ts models/cancel-order-request.ts models/cancel-order-response.ts +models/collection-collection.ts models/collection-details.ts +models/collection-filter-range.ts models/collection-filter.ts models/collection.ts models/contract-create-apirequest.ts @@ -51,6 +59,7 @@ models/create-metadata-refresh-response.ts models/create-order-request-v3.ts models/create-order-request.ts models/create-order-response.ts +models/create-project-group-request.ts models/create-project-request.ts models/create-project-response.ts models/create-trade-request-v1-fee-info.ts @@ -59,15 +68,19 @@ models/create-trade-response.ts models/create-transfer-request-v1.ts models/create-transfer-request.ts models/create-transfer-response-v1.ts +models/create-transfer-response-v2.ts models/create-transfer-response.ts models/create-withdrawal-request.ts models/create-withdrawal-response.ts models/currency-with-limits.ts +models/deposit-token.ts models/deposit.ts +models/encode-asset-request-token-data.ts models/encode-asset-request-token.ts models/encode-asset-request.ts models/encode-asset-response.ts models/encode-asset-token-data.ts +models/engine-register-user-result.ts models/exchange-create-exchange-and-urlresponse.ts models/exchange.ts models/fee-data.ts @@ -82,6 +95,7 @@ models/get-metadata-refreshes.ts models/get-projects-response.ts models/get-signable-cancel-order-request.ts models/get-signable-cancel-order-response.ts +models/get-signable-deposit-request-token.ts models/get-signable-deposit-request.ts models/get-signable-deposit-response.ts models/get-signable-order-request-token-buy.ts @@ -101,10 +115,14 @@ models/get-signable-trade-response-result.ts models/get-signable-trade-response.ts models/get-signable-trade-result-fee-info.ts models/get-signable-trade-result.ts +models/get-signable-transfer-request-token.ts models/get-signable-transfer-request-v1.ts +models/get-signable-transfer-request-v2.ts models/get-signable-transfer-request.ts models/get-signable-transfer-response-v1.ts +models/get-signable-transfer-response-v2.ts models/get-signable-transfer-response.ts +models/get-signable-withdrawal-request-token.ts models/get-signable-withdrawal-request.ts models/get-signable-withdrawal-response.ts models/get-transactions-response.ts @@ -131,6 +149,7 @@ models/mint-fee.ts models/mint-request.ts models/mint-result-details.ts models/mint-token-data-v2.ts +models/mint-token.ts models/mint-tokens-response.ts models/mint-user.ts models/mint.ts @@ -156,10 +175,16 @@ models/order.ts models/orders-maker-taker-fee.ts models/project.ts models/range.ts +models/register-passport-user-request.ts +models/register-passport-user-result.ts models/register-user-request.ts models/register-user-response.ts models/signable-token.ts +models/signable-transfer-details-token.ts +models/signable-transfer-details-v2-token.ts +models/signable-transfer-details-v2.ts models/signable-transfer-details.ts +models/signable-transfer-response-details-token.ts models/signable-transfer-response-details.ts models/store-maker-taker-fee.ts models/success-response.ts @@ -175,7 +200,9 @@ models/trade.ts models/trades-create-trade-request-fee-info.ts models/trades-create-trade-request.ts models/transfer-request.ts +models/transfer-token.ts models/transfer.ts models/update-collection-request.ts models/widget-params.ts +models/withdrawal-token.ts models/withdrawal.ts diff --git a/src/api/domain/orders-api.ts b/src/api/domain/orders-api.ts index bea21606..d9fdc40f 100644 --- a/src/api/domain/orders-api.ts +++ b/src/api/domain/orders-api.ts @@ -27,8 +27,6 @@ import { CancelOrderRequest } from '../models'; // @ts-ignore import { CancelOrderResponse } from '../models'; // @ts-ignore -import { CreateOrderRequest } from '../models'; -// @ts-ignore import { CreateOrderRequestV3 } from '../models'; // @ts-ignore import { CreateOrderResponse } from '../models'; @@ -41,12 +39,8 @@ import { GetSignableOrderRequestV3 } from '../models'; // @ts-ignore import { GetSignableOrderResponse } from '../models'; // @ts-ignore -import { ListOrdersResponse } from '../models'; -// @ts-ignore import { ListOrdersResponseV3 } from '../models'; // @ts-ignore -import { Order } from '../models'; -// @ts-ignore import { OrderV3 } from '../models'; /** * OrdersApi - axios parameter creator @@ -54,62 +48,6 @@ import { OrderV3 } from '../models'; */ export const OrdersApiAxiosParamCreator = function (configuration?: Configuration) { return { - /** - * Cancel an order. Use https://docs.x.immutable.com/reference#/operations/getSignableCancelOrder to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/cancelOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Cancel an order - * @param {string} id Order ID to cancel - * @param {CancelOrderRequest} cancelOrderRequest cancel an order - * @param {string} [xImxEthAddress] eth address - * @param {string} [xImxEthSignature] eth signature - * @param {string} [authorization] Authorization header - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - cancelOrder: async (id: string, cancelOrderRequest: CancelOrderRequest, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('cancelOrder', 'id', id) - // verify required parameter 'cancelOrderRequest' is not null or undefined - assertParamExists('cancelOrder', 'cancelOrderRequest', cancelOrderRequest) - const localVarPath = `/v1/orders/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // 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: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (xImxEthAddress != null) { - localVarHeaderParameter['x-imx-eth-address'] = String(xImxEthAddress); - } - - if (xImxEthSignature != null) { - localVarHeaderParameter['x-imx-eth-signature'] = String(xImxEthSignature); - } - - if (authorization != null) { - localVarHeaderParameter['Authorization'] = String(authorization); - } - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(cancelOrderRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * Cancel an order (V3) * @summary Cancel an order (V3) @@ -166,59 +104,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * Create an order. Use https://docs.x.immutable.com/reference#/operations/getSignableOrder to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Create an order - * @param {CreateOrderRequest} createOrderRequest create an order - * @param {string} [xImxEthAddress] eth address - * @param {string} [xImxEthSignature] eth signature - * @param {string} [authorization] Authorization header - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - createOrder: async (createOrderRequest: CreateOrderRequest, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'createOrderRequest' is not null or undefined - assertParamExists('createOrder', 'createOrderRequest', createOrderRequest) - const localVarPath = `/v1/orders`; - // 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; - - if (xImxEthAddress != null) { - localVarHeaderParameter['x-imx-eth-address'] = String(xImxEthAddress); - } - - if (xImxEthSignature != null) { - localVarHeaderParameter['x-imx-eth-signature'] = String(xImxEthSignature); - } - - if (authorization != null) { - localVarHeaderParameter['Authorization'] = String(authorization); - } - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createOrderRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Create an order using the v3 orderbook. Currently only buy NFT orders are supported. + * Create an order using the v3 orderbook. * @summary Create an order (V3) * @param {CreateOrderRequestV3} createOrderRequest create an order * @param {string} [xImxEthAddress] eth address @@ -268,56 +154,6 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio options: localVarRequestOptions, }; }, - /** - * Get an order. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Get an order - * @param {string} id Order ID - * @param {boolean} [includeFees] Set flag to true to include fee body for the order - * @param {string} [auxiliaryFeePercentages] Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients - * @param {string} [auxiliaryFeeRecipients] Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - getOrder: async (id: string, includeFees?: boolean, auxiliaryFeePercentages?: string, auxiliaryFeeRecipients?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getOrder', 'id', id) - const localVarPath = `/v1/orders/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // 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 (includeFees !== undefined) { - localVarQueryParameter['include_fees'] = includeFees; - } - - if (auxiliaryFeePercentages !== undefined) { - localVarQueryParameter['auxiliary_fee_percentages'] = auxiliaryFeePercentages; - } - - if (auxiliaryFeeRecipients !== undefined) { - localVarQueryParameter['auxiliary_fee_recipients'] = auxiliaryFeeRecipients; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * Get an order (V3) * @summary Get an order (V3) @@ -367,43 +203,6 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio options: localVarRequestOptions, }; }, - /** - * Sign cancel order message. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getSignableCancelOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Sign cancel order message - * @param {GetSignableCancelOrderRequest} getSignableCancelOrderRequest get a signable cancel order - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - getSignableCancelOrder: async (getSignableCancelOrderRequest: GetSignableCancelOrderRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'getSignableCancelOrderRequest' is not null or undefined - assertParamExists('getSignableCancelOrder', 'getSignableCancelOrderRequest', getSignableCancelOrderRequest) - const localVarPath = `/v1/signable-cancel-order-details`; - // 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(getSignableCancelOrderRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * Generate a signable cancel order message (V3) * @summary Generate a signable cancel order message (V3) @@ -477,8 +276,8 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * Get a list of orders This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listOrdersV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Get a list of orders. + * Get a list of orders (V3) + * @summary Get a list of orders (V3) * @param {number} [pageSize] Page size of the result * @param {string} [cursor] Cursor * @param {'created_at' | 'expired_at' | 'sell_quantity' | 'buy_quantity' | 'buy_quantity_with_fees' | 'updated_at'} [orderBy] Property to sort by @@ -509,11 +308,10 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio * @param {string} [auxiliaryFeeRecipients] Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages * @param {boolean} [includeFees] Set flag to true to include fee object for orders * @param {*} [options] Override http request option. - * @deprecated * @throws {RequiredError} */ - listOrders: async (pageSize?: number, cursor?: string, orderBy?: 'created_at' | 'expired_at' | 'sell_quantity' | 'buy_quantity' | 'buy_quantity_with_fees' | 'updated_at', direction?: string, user?: string, status?: 'active' | 'filled' | 'cancelled' | 'expired' | 'inactive', minTimestamp?: string, maxTimestamp?: string, updatedMinTimestamp?: string, updatedMaxTimestamp?: string, buyTokenType?: string, buyTokenId?: string, buyAssetId?: string, buyTokenAddress?: string, buyTokenName?: string, buyMinQuantity?: string, buyMaxQuantity?: string, buyMetadata?: string, sellTokenType?: string, sellTokenId?: string, sellAssetId?: string, sellTokenAddress?: string, sellTokenName?: string, sellMinQuantity?: string, sellMaxQuantity?: string, sellMetadata?: string, auxiliaryFeePercentages?: string, auxiliaryFeeRecipients?: string, includeFees?: boolean, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/v1/orders`; + listOrdersV3: async (pageSize?: number, cursor?: string, orderBy?: 'created_at' | 'expired_at' | 'sell_quantity' | 'buy_quantity' | 'buy_quantity_with_fees' | 'updated_at', direction?: string, user?: string, status?: 'active' | 'filled' | 'cancelled' | 'expired' | 'inactive', minTimestamp?: string, maxTimestamp?: string, updatedMinTimestamp?: string, updatedMaxTimestamp?: string, buyTokenType?: string, buyTokenId?: string, buyAssetId?: string, buyTokenAddress?: string, buyTokenName?: string, buyMinQuantity?: string, buyMaxQuantity?: string, buyMetadata?: string, sellTokenType?: string, sellTokenId?: string, sellAssetId?: string, sellTokenAddress?: string, sellTokenName?: string, sellMinQuantity?: string, sellMaxQuantity?: string, sellMetadata?: string, auxiliaryFeePercentages?: string, auxiliaryFeeRecipients?: string, includeFees?: boolean, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v3/orders`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -651,354 +449,81 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; - }, - /** - * Get a list of orders (V3) - * @summary Get a list of orders (V3) - * @param {number} [pageSize] Page size of the result - * @param {string} [cursor] Cursor - * @param {'created_at' | 'expired_at' | 'sell_quantity' | 'buy_quantity' | 'buy_quantity_with_fees' | 'updated_at'} [orderBy] Property to sort by - * @param {string} [direction] Direction to sort (asc/desc) - * @param {string} [user] Ethereum address of the user who submitted this order - * @param {'active' | 'filled' | 'cancelled' | 'expired' | 'inactive'} [status] Status of this order - * @param {string} [minTimestamp] Filter orders to include those with created_at timestamps after this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [maxTimestamp] Filter orders to include those with created_at timestamps before this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMinTimestamp] Filter orders to include those with updated_at timestamps after this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMaxTimestamp] Filter orders to include those with updated_at timestamps before this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [buyTokenType] Token type of the asset this order buys - * @param {string} [buyTokenId] ERC721 Token ID of the asset this order buys - * @param {string} [buyAssetId] Internal IMX ID of the asset this order buys - * @param {string} [buyTokenAddress] Token address of the asset this order buys - * @param {string} [buyTokenName] Token name of the asset this order buys - * @param {string} [buyMinQuantity] Min quantity for the asset this order buys - * @param {string} [buyMaxQuantity] Max quantity for the asset this order buys - * @param {string} [buyMetadata] JSON-encoded metadata filters for the asset this order buys - * @param {string} [sellTokenType] Token type of the asset this order sells - * @param {string} [sellTokenId] ERC721 Token ID of the asset this order sells - * @param {string} [sellAssetId] Internal IMX ID of the asset this order sells - * @param {string} [sellTokenAddress] Token address of the asset this order sells - * @param {string} [sellTokenName] Token name of the asset this order sells - * @param {string} [sellMinQuantity] Min quantity for the asset this order sells - * @param {string} [sellMaxQuantity] Max quantity for the asset this order sells - * @param {string} [sellMetadata] JSON-encoded metadata filters for the asset this order sells - * @param {string} [auxiliaryFeePercentages] Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients - * @param {string} [auxiliaryFeeRecipients] Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages - * @param {boolean} [includeFees] Set flag to true to include fee object for orders - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - listOrdersV3: async (pageSize?: number, cursor?: string, orderBy?: 'created_at' | 'expired_at' | 'sell_quantity' | 'buy_quantity' | 'buy_quantity_with_fees' | 'updated_at', direction?: string, user?: string, status?: 'active' | 'filled' | 'cancelled' | 'expired' | 'inactive', minTimestamp?: string, maxTimestamp?: string, updatedMinTimestamp?: string, updatedMaxTimestamp?: string, buyTokenType?: string, buyTokenId?: string, buyAssetId?: string, buyTokenAddress?: string, buyTokenName?: string, buyMinQuantity?: string, buyMaxQuantity?: string, buyMetadata?: string, sellTokenType?: string, sellTokenId?: string, sellAssetId?: string, sellTokenAddress?: string, sellTokenName?: string, sellMinQuantity?: string, sellMaxQuantity?: string, sellMetadata?: string, auxiliaryFeePercentages?: string, auxiliaryFeeRecipients?: string, includeFees?: boolean, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/v3/orders`; - // 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 (user !== undefined) { - localVarQueryParameter['user'] = user; - } - - if (status !== undefined) { - localVarQueryParameter['status'] = status; - } - - if (minTimestamp !== undefined) { - localVarQueryParameter['min_timestamp'] = minTimestamp; - } - - if (maxTimestamp !== undefined) { - localVarQueryParameter['max_timestamp'] = maxTimestamp; - } - - if (updatedMinTimestamp !== undefined) { - localVarQueryParameter['updated_min_timestamp'] = updatedMinTimestamp; - } - - if (updatedMaxTimestamp !== undefined) { - localVarQueryParameter['updated_max_timestamp'] = updatedMaxTimestamp; - } - - if (buyTokenType !== undefined) { - localVarQueryParameter['buy_token_type'] = buyTokenType; - } - - if (buyTokenId !== undefined) { - localVarQueryParameter['buy_token_id'] = buyTokenId; - } - - if (buyAssetId !== undefined) { - localVarQueryParameter['buy_asset_id'] = buyAssetId; - } - - if (buyTokenAddress !== undefined) { - localVarQueryParameter['buy_token_address'] = buyTokenAddress; - } - - if (buyTokenName !== undefined) { - localVarQueryParameter['buy_token_name'] = buyTokenName; - } - - if (buyMinQuantity !== undefined) { - localVarQueryParameter['buy_min_quantity'] = buyMinQuantity; - } - - if (buyMaxQuantity !== undefined) { - localVarQueryParameter['buy_max_quantity'] = buyMaxQuantity; - } - - if (buyMetadata !== undefined) { - localVarQueryParameter['buy_metadata'] = buyMetadata; - } - - if (sellTokenType !== undefined) { - localVarQueryParameter['sell_token_type'] = sellTokenType; - } - - if (sellTokenId !== undefined) { - localVarQueryParameter['sell_token_id'] = sellTokenId; - } - - if (sellAssetId !== undefined) { - localVarQueryParameter['sell_asset_id'] = sellAssetId; - } - - if (sellTokenAddress !== undefined) { - localVarQueryParameter['sell_token_address'] = sellTokenAddress; - } - - if (sellTokenName !== undefined) { - localVarQueryParameter['sell_token_name'] = sellTokenName; - } - - if (sellMinQuantity !== undefined) { - localVarQueryParameter['sell_min_quantity'] = sellMinQuantity; - } - - if (sellMaxQuantity !== undefined) { - localVarQueryParameter['sell_max_quantity'] = sellMaxQuantity; - } - - if (sellMetadata !== undefined) { - localVarQueryParameter['sell_metadata'] = sellMetadata; - } - - if (auxiliaryFeePercentages !== undefined) { - localVarQueryParameter['auxiliary_fee_percentages'] = auxiliaryFeePercentages; - } - - if (auxiliaryFeeRecipients !== undefined) { - localVarQueryParameter['auxiliary_fee_recipients'] = auxiliaryFeeRecipients; - } - - if (includeFees !== undefined) { - localVarQueryParameter['include_fees'] = includeFees; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * OrdersApi - functional programming interface - * @export - */ -export const OrdersApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = OrdersApiAxiosParamCreator(configuration) - return { - /** - * Cancel an order. Use https://docs.x.immutable.com/reference#/operations/getSignableCancelOrder to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/cancelOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Cancel an order - * @param {string} id Order ID to cancel - * @param {CancelOrderRequest} cancelOrderRequest cancel an order - * @param {string} [xImxEthAddress] eth address - * @param {string} [xImxEthSignature] eth signature - * @param {string} [authorization] Authorization header - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async cancelOrder(id: string, cancelOrderRequest: CancelOrderRequest, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.cancelOrder(id, cancelOrderRequest, xImxEthAddress, xImxEthSignature, authorization, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Cancel an order (V3) - * @summary Cancel an order (V3) - * @param {string} id Order ID to cancel - * @param {CancelOrderRequest} cancelOrderRequest cancel an order - * @param {string} [xImxEthAddress] eth address - * @param {string} [xImxEthSignature] eth signature - * @param {string} [authorization] Authorization header - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async cancelOrderV3(id: string, cancelOrderRequest: CancelOrderRequest, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.cancelOrderV3(id, cancelOrderRequest, xImxEthAddress, xImxEthSignature, authorization, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Create an order. Use https://docs.x.immutable.com/reference#/operations/getSignableOrder to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Create an order - * @param {CreateOrderRequest} createOrderRequest create an order - * @param {string} [xImxEthAddress] eth address - * @param {string} [xImxEthSignature] eth signature - * @param {string} [authorization] Authorization header - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async createOrder(createOrderRequest: CreateOrderRequest, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createOrder(createOrderRequest, xImxEthAddress, xImxEthSignature, authorization, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Create an order using the v3 orderbook. Currently only buy NFT orders are supported. - * @summary Create an order (V3) - * @param {CreateOrderRequestV3} createOrderRequest create an order - * @param {string} [xImxEthAddress] eth address - * @param {string} [xImxEthSignature] eth signature - * @param {string} [authorization] Authorization header - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createOrderV3(createOrderRequest: CreateOrderRequestV3, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createOrderV3(createOrderRequest, xImxEthAddress, xImxEthSignature, authorization, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Get an order. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Get an order - * @param {string} id Order ID - * @param {boolean} [includeFees] Set flag to true to include fee body for the order - * @param {string} [auxiliaryFeePercentages] Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients - * @param {string} [auxiliaryFeeRecipients] Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async getOrder(id: string, includeFees?: boolean, auxiliaryFeePercentages?: string, auxiliaryFeeRecipients?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getOrder(id, includeFees, auxiliaryFeePercentages, auxiliaryFeeRecipients, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Get an order (V3) - * @summary Get an order (V3) - * @param {string} id Order ID - * @param {boolean} [includeFees] Set flag to true to include fee body for the order - * @param {string} [auxiliaryFeePercentages] Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients - * @param {string} [auxiliaryFeeRecipients] Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getOrderV3(id: string, includeFees?: boolean, auxiliaryFeePercentages?: string, auxiliaryFeeRecipients?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderV3(id, includeFees, auxiliaryFeePercentages, auxiliaryFeeRecipients, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Sign cancel order message. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getSignableCancelOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Sign cancel order message - * @param {GetSignableCancelOrderRequest} getSignableCancelOrderRequest get a signable cancel order - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async getSignableCancelOrder(getSignableCancelOrderRequest: GetSignableCancelOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSignableCancelOrder(getSignableCancelOrderRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Generate a signable cancel order message (V3) - * @summary Generate a signable cancel order message (V3) - * @param {GetSignableCancelOrderRequest} getSignableCancelOrderRequest get a signable cancel order - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSignableCancelOrderV3(getSignableCancelOrderRequest: GetSignableCancelOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSignableCancelOrderV3(getSignableCancelOrderRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Generate a signable order request (V3) - * @summary Generate a signable order request (V3) - * @param {GetSignableOrderRequestV3} getSignableOrderRequestV3 get a signable order v3 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSignableOrder(getSignableOrderRequestV3: GetSignableOrderRequestV3, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSignableOrder(getSignableOrderRequestV3, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Get a list of orders This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listOrdersV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Get a list of orders. - * @param {number} [pageSize] Page size of the result - * @param {string} [cursor] Cursor - * @param {'created_at' | 'expired_at' | 'sell_quantity' | 'buy_quantity' | 'buy_quantity_with_fees' | 'updated_at'} [orderBy] Property to sort by - * @param {string} [direction] Direction to sort (asc/desc) - * @param {string} [user] Ethereum address of the user who submitted this order - * @param {'active' | 'filled' | 'cancelled' | 'expired' | 'inactive'} [status] Status of this order - * @param {string} [minTimestamp] Filter orders to include those with created_at timestamps after this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [maxTimestamp] Filter orders to include those with created_at timestamps before this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMinTimestamp] Filter orders to include those with updated_at timestamps after this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMaxTimestamp] Filter orders to include those with updated_at timestamps before this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [buyTokenType] Token type of the asset this order buys - * @param {string} [buyTokenId] ERC721 Token ID of the asset this order buys - * @param {string} [buyAssetId] Internal IMX ID of the asset this order buys - * @param {string} [buyTokenAddress] Token address of the asset this order buys - * @param {string} [buyTokenName] Token name of the asset this order buys - * @param {string} [buyMinQuantity] Min quantity for the asset this order buys - * @param {string} [buyMaxQuantity] Max quantity for the asset this order buys - * @param {string} [buyMetadata] JSON-encoded metadata filters for the asset this order buys - * @param {string} [sellTokenType] Token type of the asset this order sells - * @param {string} [sellTokenId] ERC721 Token ID of the asset this order sells - * @param {string} [sellAssetId] Internal IMX ID of the asset this order sells - * @param {string} [sellTokenAddress] Token address of the asset this order sells - * @param {string} [sellTokenName] Token name of the asset this order sells - * @param {string} [sellMinQuantity] Min quantity for the asset this order sells - * @param {string} [sellMaxQuantity] Max quantity for the asset this order sells - * @param {string} [sellMetadata] JSON-encoded metadata filters for the asset this order sells - * @param {string} [auxiliaryFeePercentages] Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients - * @param {string} [auxiliaryFeeRecipients] Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages - * @param {boolean} [includeFees] Set flag to true to include fee object for orders - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async listOrders(pageSize?: number, cursor?: string, orderBy?: 'created_at' | 'expired_at' | 'sell_quantity' | 'buy_quantity' | 'buy_quantity_with_fees' | 'updated_at', direction?: string, user?: string, status?: 'active' | 'filled' | 'cancelled' | 'expired' | 'inactive', minTimestamp?: string, maxTimestamp?: string, updatedMinTimestamp?: string, updatedMaxTimestamp?: string, buyTokenType?: string, buyTokenId?: string, buyAssetId?: string, buyTokenAddress?: string, buyTokenName?: string, buyMinQuantity?: string, buyMaxQuantity?: string, buyMetadata?: string, sellTokenType?: string, sellTokenId?: string, sellAssetId?: string, sellTokenAddress?: string, sellTokenName?: string, sellMinQuantity?: string, sellMaxQuantity?: string, sellMetadata?: string, auxiliaryFeePercentages?: string, auxiliaryFeeRecipients?: string, includeFees?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listOrders(pageSize, cursor, orderBy, direction, user, status, minTimestamp, maxTimestamp, updatedMinTimestamp, updatedMaxTimestamp, buyTokenType, buyTokenId, buyAssetId, buyTokenAddress, buyTokenName, buyMinQuantity, buyMaxQuantity, buyMetadata, sellTokenType, sellTokenId, sellAssetId, sellTokenAddress, sellTokenName, sellMinQuantity, sellMaxQuantity, sellMetadata, auxiliaryFeePercentages, auxiliaryFeeRecipients, includeFees, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * OrdersApi - functional programming interface + * @export + */ +export const OrdersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = OrdersApiAxiosParamCreator(configuration) + return { + /** + * Cancel an order (V3) + * @summary Cancel an order (V3) + * @param {string} id Order ID to cancel + * @param {CancelOrderRequest} cancelOrderRequest cancel an order + * @param {string} [xImxEthAddress] eth address + * @param {string} [xImxEthSignature] eth signature + * @param {string} [authorization] Authorization header + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelOrderV3(id: string, cancelOrderRequest: CancelOrderRequest, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelOrderV3(id, cancelOrderRequest, xImxEthAddress, xImxEthSignature, authorization, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Create an order using the v3 orderbook. + * @summary Create an order (V3) + * @param {CreateOrderRequestV3} createOrderRequest create an order + * @param {string} [xImxEthAddress] eth address + * @param {string} [xImxEthSignature] eth signature + * @param {string} [authorization] Authorization header + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createOrderV3(createOrderRequest: CreateOrderRequestV3, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOrderV3(createOrderRequest, xImxEthAddress, xImxEthSignature, authorization, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get an order (V3) + * @summary Get an order (V3) + * @param {string} id Order ID + * @param {boolean} [includeFees] Set flag to true to include fee body for the order + * @param {string} [auxiliaryFeePercentages] Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients + * @param {string} [auxiliaryFeeRecipients] Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOrderV3(id: string, includeFees?: boolean, auxiliaryFeePercentages?: string, auxiliaryFeeRecipients?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderV3(id, includeFees, auxiliaryFeePercentages, auxiliaryFeeRecipients, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Generate a signable cancel order message (V3) + * @summary Generate a signable cancel order message (V3) + * @param {GetSignableCancelOrderRequest} getSignableCancelOrderRequest get a signable cancel order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSignableCancelOrderV3(getSignableCancelOrderRequest: GetSignableCancelOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSignableCancelOrderV3(getSignableCancelOrderRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Generate a signable order request (V3) + * @summary Generate a signable order request (V3) + * @param {GetSignableOrderRequestV3} getSignableOrderRequestV3 get a signable order v3 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSignableOrder(getSignableOrderRequestV3: GetSignableOrderRequestV3, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSignableOrder(getSignableOrderRequestV3, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Get a list of orders (V3) @@ -1049,21 +574,6 @@ export const OrdersApiFp = function(configuration?: Configuration) { export const OrdersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = OrdersApiFp(configuration) return { - /** - * Cancel an order. Use https://docs.x.immutable.com/reference#/operations/getSignableCancelOrder to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/cancelOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Cancel an order - * @param {string} id Order ID to cancel - * @param {CancelOrderRequest} cancelOrderRequest cancel an order - * @param {string} [xImxEthAddress] eth address - * @param {string} [xImxEthSignature] eth signature - * @param {string} [authorization] Authorization header - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - cancelOrder(id: string, cancelOrderRequest: CancelOrderRequest, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: any): AxiosPromise { - return localVarFp.cancelOrder(id, cancelOrderRequest, xImxEthAddress, xImxEthSignature, authorization, options).then((request) => request(axios, basePath)); - }, /** * Cancel an order (V3) * @summary Cancel an order (V3) @@ -1079,21 +589,7 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat return localVarFp.cancelOrderV3(id, cancelOrderRequest, xImxEthAddress, xImxEthSignature, authorization, options).then((request) => request(axios, basePath)); }, /** - * Create an order. Use https://docs.x.immutable.com/reference#/operations/getSignableOrder to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Create an order - * @param {CreateOrderRequest} createOrderRequest create an order - * @param {string} [xImxEthAddress] eth address - * @param {string} [xImxEthSignature] eth signature - * @param {string} [authorization] Authorization header - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - createOrder(createOrderRequest: CreateOrderRequest, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: any): AxiosPromise { - return localVarFp.createOrder(createOrderRequest, xImxEthAddress, xImxEthSignature, authorization, options).then((request) => request(axios, basePath)); - }, - /** - * Create an order using the v3 orderbook. Currently only buy NFT orders are supported. + * Create an order using the v3 orderbook. * @summary Create an order (V3) * @param {CreateOrderRequestV3} createOrderRequest create an order * @param {string} [xImxEthAddress] eth address @@ -1105,20 +601,6 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat createOrderV3(createOrderRequest: CreateOrderRequestV3, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: any): AxiosPromise { return localVarFp.createOrderV3(createOrderRequest, xImxEthAddress, xImxEthSignature, authorization, options).then((request) => request(axios, basePath)); }, - /** - * Get an order. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Get an order - * @param {string} id Order ID - * @param {boolean} [includeFees] Set flag to true to include fee body for the order - * @param {string} [auxiliaryFeePercentages] Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients - * @param {string} [auxiliaryFeeRecipients] Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - getOrder(id: string, includeFees?: boolean, auxiliaryFeePercentages?: string, auxiliaryFeeRecipients?: string, options?: any): AxiosPromise { - return localVarFp.getOrder(id, includeFees, auxiliaryFeePercentages, auxiliaryFeeRecipients, options).then((request) => request(axios, basePath)); - }, /** * Get an order (V3) * @summary Get an order (V3) @@ -1132,17 +614,6 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat getOrderV3(id: string, includeFees?: boolean, auxiliaryFeePercentages?: string, auxiliaryFeeRecipients?: string, options?: any): AxiosPromise { return localVarFp.getOrderV3(id, includeFees, auxiliaryFeePercentages, auxiliaryFeeRecipients, options).then((request) => request(axios, basePath)); }, - /** - * Sign cancel order message. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getSignableCancelOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Sign cancel order message - * @param {GetSignableCancelOrderRequest} getSignableCancelOrderRequest get a signable cancel order - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - getSignableCancelOrder(getSignableCancelOrderRequest: GetSignableCancelOrderRequest, options?: any): AxiosPromise { - return localVarFp.getSignableCancelOrder(getSignableCancelOrderRequest, options).then((request) => request(axios, basePath)); - }, /** * Generate a signable cancel order message (V3) * @summary Generate a signable cancel order message (V3) @@ -1163,45 +634,6 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat getSignableOrder(getSignableOrderRequestV3: GetSignableOrderRequestV3, options?: any): AxiosPromise { return localVarFp.getSignableOrder(getSignableOrderRequestV3, options).then((request) => request(axios, basePath)); }, - /** - * Get a list of orders This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listOrdersV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Get a list of orders. - * @param {number} [pageSize] Page size of the result - * @param {string} [cursor] Cursor - * @param {'created_at' | 'expired_at' | 'sell_quantity' | 'buy_quantity' | 'buy_quantity_with_fees' | 'updated_at'} [orderBy] Property to sort by - * @param {string} [direction] Direction to sort (asc/desc) - * @param {string} [user] Ethereum address of the user who submitted this order - * @param {'active' | 'filled' | 'cancelled' | 'expired' | 'inactive'} [status] Status of this order - * @param {string} [minTimestamp] Filter orders to include those with created_at timestamps after this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [maxTimestamp] Filter orders to include those with created_at timestamps before this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMinTimestamp] Filter orders to include those with updated_at timestamps after this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMaxTimestamp] Filter orders to include those with updated_at timestamps before this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [buyTokenType] Token type of the asset this order buys - * @param {string} [buyTokenId] ERC721 Token ID of the asset this order buys - * @param {string} [buyAssetId] Internal IMX ID of the asset this order buys - * @param {string} [buyTokenAddress] Token address of the asset this order buys - * @param {string} [buyTokenName] Token name of the asset this order buys - * @param {string} [buyMinQuantity] Min quantity for the asset this order buys - * @param {string} [buyMaxQuantity] Max quantity for the asset this order buys - * @param {string} [buyMetadata] JSON-encoded metadata filters for the asset this order buys - * @param {string} [sellTokenType] Token type of the asset this order sells - * @param {string} [sellTokenId] ERC721 Token ID of the asset this order sells - * @param {string} [sellAssetId] Internal IMX ID of the asset this order sells - * @param {string} [sellTokenAddress] Token address of the asset this order sells - * @param {string} [sellTokenName] Token name of the asset this order sells - * @param {string} [sellMinQuantity] Min quantity for the asset this order sells - * @param {string} [sellMaxQuantity] Max quantity for the asset this order sells - * @param {string} [sellMetadata] JSON-encoded metadata filters for the asset this order sells - * @param {string} [auxiliaryFeePercentages] Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients - * @param {string} [auxiliaryFeeRecipients] Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages - * @param {boolean} [includeFees] Set flag to true to include fee object for orders - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - listOrders(pageSize?: number, cursor?: string, orderBy?: 'created_at' | 'expired_at' | 'sell_quantity' | 'buy_quantity' | 'buy_quantity_with_fees' | 'updated_at', direction?: string, user?: string, status?: 'active' | 'filled' | 'cancelled' | 'expired' | 'inactive', minTimestamp?: string, maxTimestamp?: string, updatedMinTimestamp?: string, updatedMaxTimestamp?: string, buyTokenType?: string, buyTokenId?: string, buyAssetId?: string, buyTokenAddress?: string, buyTokenName?: string, buyMinQuantity?: string, buyMaxQuantity?: string, buyMetadata?: string, sellTokenType?: string, sellTokenId?: string, sellAssetId?: string, sellTokenAddress?: string, sellTokenName?: string, sellMinQuantity?: string, sellMaxQuantity?: string, sellMetadata?: string, auxiliaryFeePercentages?: string, auxiliaryFeeRecipients?: string, includeFees?: boolean, options?: any): AxiosPromise { - return localVarFp.listOrders(pageSize, cursor, orderBy, direction, user, status, minTimestamp, maxTimestamp, updatedMinTimestamp, updatedMaxTimestamp, buyTokenType, buyTokenId, buyAssetId, buyTokenAddress, buyTokenName, buyMinQuantity, buyMaxQuantity, buyMetadata, sellTokenType, sellTokenId, sellAssetId, sellTokenAddress, sellTokenName, sellMinQuantity, sellMaxQuantity, sellMetadata, auxiliaryFeePercentages, auxiliaryFeeRecipients, includeFees, options).then((request) => request(axios, basePath)); - }, /** * Get a list of orders (V3) * @summary Get a list of orders (V3) @@ -1243,48 +675,6 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat }; }; -/** - * Request parameters for cancelOrder operation in OrdersApi. - * @export - * @interface OrdersApiCancelOrderRequest - */ -export interface OrdersApiCancelOrderRequest { - /** - * Order ID to cancel - * @type {string} - * @memberof OrdersApiCancelOrder - */ - readonly id: string - - /** - * cancel an order - * @type {CancelOrderRequest} - * @memberof OrdersApiCancelOrder - */ - readonly cancelOrderRequest: CancelOrderRequest - - /** - * eth address - * @type {string} - * @memberof OrdersApiCancelOrder - */ - readonly xImxEthAddress?: string - - /** - * eth signature - * @type {string} - * @memberof OrdersApiCancelOrder - */ - readonly xImxEthSignature?: string - - /** - * Authorization header - * @type {string} - * @memberof OrdersApiCancelOrder - */ - readonly authorization?: string -} - /** * Request parameters for cancelOrderV3 operation in OrdersApi. * @export @@ -1301,63 +691,28 @@ export interface OrdersApiCancelOrderV3Request { /** * cancel an order * @type {CancelOrderRequest} - * @memberof OrdersApiCancelOrderV3 - */ - readonly cancelOrderRequest: CancelOrderRequest - - /** - * eth address - * @type {string} - * @memberof OrdersApiCancelOrderV3 - */ - readonly xImxEthAddress?: string - - /** - * eth signature - * @type {string} - * @memberof OrdersApiCancelOrderV3 - */ - readonly xImxEthSignature?: string - - /** - * Authorization header - * @type {string} - * @memberof OrdersApiCancelOrderV3 - */ - readonly authorization?: string -} - -/** - * Request parameters for createOrder operation in OrdersApi. - * @export - * @interface OrdersApiCreateOrderRequest - */ -export interface OrdersApiCreateOrderRequest { - /** - * create an order - * @type {CreateOrderRequest} - * @memberof OrdersApiCreateOrder + * @memberof OrdersApiCancelOrderV3 */ - readonly createOrderRequest: CreateOrderRequest + readonly cancelOrderRequest: CancelOrderRequest /** * eth address * @type {string} - * @memberof OrdersApiCreateOrder + * @memberof OrdersApiCancelOrderV3 */ readonly xImxEthAddress?: string /** * eth signature * @type {string} - * @memberof OrdersApiCreateOrder + * @memberof OrdersApiCancelOrderV3 */ readonly xImxEthSignature?: string /** * Authorization header * @type {string} - * @memberof OrdersApiCreateOrder + * @memberof OrdersApiCancelOrderV3 */ readonly authorization?: string } @@ -1397,41 +752,6 @@ export interface OrdersApiCreateOrderV3Request { readonly authorization?: string } -/** - * Request parameters for getOrder operation in OrdersApi. - * @export - * @interface OrdersApiGetOrderRequest - */ -export interface OrdersApiGetOrderRequest { - /** - * Order ID - * @type {string} - * @memberof OrdersApiGetOrder - */ - readonly id: string - - /** - * Set flag to true to include fee body for the order - * @type {boolean} - * @memberof OrdersApiGetOrder - */ - readonly includeFees?: boolean - - /** - * Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients - * @type {string} - * @memberof OrdersApiGetOrder - */ - readonly auxiliaryFeePercentages?: string - - /** - * Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages - * @type {string} - * @memberof OrdersApiGetOrder - */ - readonly auxiliaryFeeRecipients?: string -} - /** * Request parameters for getOrderV3 operation in OrdersApi. * @export @@ -1467,20 +787,6 @@ export interface OrdersApiGetOrderV3Request { readonly auxiliaryFeeRecipients?: string } -/** - * Request parameters for getSignableCancelOrder operation in OrdersApi. - * @export - * @interface OrdersApiGetSignableCancelOrderRequest - */ -export interface OrdersApiGetSignableCancelOrderRequest { - /** - * get a signable cancel order - * @type {GetSignableCancelOrderRequest} - * @memberof OrdersApiGetSignableCancelOrder - */ - readonly getSignableCancelOrderRequest: GetSignableCancelOrderRequest -} - /** * Request parameters for getSignableCancelOrderV3 operation in OrdersApi. * @export @@ -1509,216 +815,6 @@ export interface OrdersApiGetSignableOrderRequest { readonly getSignableOrderRequestV3: GetSignableOrderRequestV3 } -/** - * Request parameters for listOrders operation in OrdersApi. - * @export - * @interface OrdersApiListOrdersRequest - */ -export interface OrdersApiListOrdersRequest { - /** - * Page size of the result - * @type {number} - * @memberof OrdersApiListOrders - */ - readonly pageSize?: number - - /** - * Cursor - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly cursor?: string - - /** - * Property to sort by - * @type {'created_at' | 'expired_at' | 'sell_quantity' | 'buy_quantity' | 'buy_quantity_with_fees' | 'updated_at'} - * @memberof OrdersApiListOrders - */ - readonly orderBy?: 'created_at' | 'expired_at' | 'sell_quantity' | 'buy_quantity' | 'buy_quantity_with_fees' | 'updated_at' - - /** - * Direction to sort (asc/desc) - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly direction?: string - - /** - * Ethereum address of the user who submitted this order - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly user?: string - - /** - * Status of this order - * @type {'active' | 'filled' | 'cancelled' | 'expired' | 'inactive'} - * @memberof OrdersApiListOrders - */ - readonly status?: 'active' | 'filled' | 'cancelled' | 'expired' | 'inactive' - - /** - * Filter orders to include those with created_at timestamps after this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly minTimestamp?: string - - /** - * Filter orders to include those with created_at timestamps before this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly maxTimestamp?: string - - /** - * Filter orders to include those with updated_at timestamps after this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly updatedMinTimestamp?: string - - /** - * Filter orders to include those with updated_at timestamps before this time, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly updatedMaxTimestamp?: string - - /** - * Token type of the asset this order buys - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly buyTokenType?: string - - /** - * ERC721 Token ID of the asset this order buys - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly buyTokenId?: string - - /** - * Internal IMX ID of the asset this order buys - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly buyAssetId?: string - - /** - * Token address of the asset this order buys - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly buyTokenAddress?: string - - /** - * Token name of the asset this order buys - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly buyTokenName?: string - - /** - * Min quantity for the asset this order buys - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly buyMinQuantity?: string - - /** - * Max quantity for the asset this order buys - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly buyMaxQuantity?: string - - /** - * JSON-encoded metadata filters for the asset this order buys - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly buyMetadata?: string - - /** - * Token type of the asset this order sells - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly sellTokenType?: string - - /** - * ERC721 Token ID of the asset this order sells - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly sellTokenId?: string - - /** - * Internal IMX ID of the asset this order sells - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly sellAssetId?: string - - /** - * Token address of the asset this order sells - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly sellTokenAddress?: string - - /** - * Token name of the asset this order sells - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly sellTokenName?: string - - /** - * Min quantity for the asset this order sells - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly sellMinQuantity?: string - - /** - * Max quantity for the asset this order sells - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly sellMaxQuantity?: string - - /** - * JSON-encoded metadata filters for the asset this order sells - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly sellMetadata?: string - - /** - * Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly auxiliaryFeePercentages?: string - - /** - * Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages - * @type {string} - * @memberof OrdersApiListOrders - */ - readonly auxiliaryFeeRecipients?: string - - /** - * Set flag to true to include fee object for orders - * @type {boolean} - * @memberof OrdersApiListOrders - */ - readonly includeFees?: boolean -} - /** * Request parameters for listOrdersV3 operation in OrdersApi. * @export @@ -1936,19 +1032,6 @@ export interface OrdersApiListOrdersV3Request { * @extends {BaseAPI} */ export class OrdersApi extends BaseAPI { - /** - * Cancel an order. Use https://docs.x.immutable.com/reference#/operations/getSignableCancelOrder to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/cancelOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Cancel an order - * @param {OrdersApiCancelOrderRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof OrdersApi - */ - public cancelOrder(requestParameters: OrdersApiCancelOrderRequest, options?: AxiosRequestConfig) { - return OrdersApiFp(this.configuration).cancelOrder(requestParameters.id, requestParameters.cancelOrderRequest, requestParameters.xImxEthAddress, requestParameters.xImxEthSignature, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); - } - /** * Cancel an order (V3) * @summary Cancel an order (V3) @@ -1962,20 +1045,7 @@ export class OrdersApi extends BaseAPI { } /** - * Create an order. Use https://docs.x.immutable.com/reference#/operations/getSignableOrder to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Create an order - * @param {OrdersApiCreateOrderRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof OrdersApi - */ - public createOrder(requestParameters: OrdersApiCreateOrderRequest, options?: AxiosRequestConfig) { - return OrdersApiFp(this.configuration).createOrder(requestParameters.createOrderRequest, requestParameters.xImxEthAddress, requestParameters.xImxEthSignature, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Create an order using the v3 orderbook. Currently only buy NFT orders are supported. + * Create an order using the v3 orderbook. * @summary Create an order (V3) * @param {OrdersApiCreateOrderV3Request} requestParameters Request parameters. * @param {*} [options] Override http request option. @@ -1986,19 +1056,6 @@ export class OrdersApi extends BaseAPI { return OrdersApiFp(this.configuration).createOrderV3(requestParameters.createOrderRequest, requestParameters.xImxEthAddress, requestParameters.xImxEthSignature, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); } - /** - * Get an order. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Get an order - * @param {OrdersApiGetOrderRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof OrdersApi - */ - public getOrder(requestParameters: OrdersApiGetOrderRequest, options?: AxiosRequestConfig) { - return OrdersApiFp(this.configuration).getOrder(requestParameters.id, requestParameters.includeFees, requestParameters.auxiliaryFeePercentages, requestParameters.auxiliaryFeeRecipients, options).then((request) => request(this.axios, this.basePath)); - } - /** * Get an order (V3) * @summary Get an order (V3) @@ -2011,19 +1068,6 @@ export class OrdersApi extends BaseAPI { return OrdersApiFp(this.configuration).getOrderV3(requestParameters.id, requestParameters.includeFees, requestParameters.auxiliaryFeePercentages, requestParameters.auxiliaryFeeRecipients, options).then((request) => request(this.axios, this.basePath)); } - /** - * Sign cancel order message. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/getSignableCancelOrderV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Sign cancel order message - * @param {OrdersApiGetSignableCancelOrderRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof OrdersApi - */ - public getSignableCancelOrder(requestParameters: OrdersApiGetSignableCancelOrderRequest, options?: AxiosRequestConfig) { - return OrdersApiFp(this.configuration).getSignableCancelOrder(requestParameters.getSignableCancelOrderRequest, options).then((request) => request(this.axios, this.basePath)); - } - /** * Generate a signable cancel order message (V3) * @summary Generate a signable cancel order message (V3) @@ -2048,19 +1092,6 @@ export class OrdersApi extends BaseAPI { return OrdersApiFp(this.configuration).getSignableOrder(requestParameters.getSignableOrderRequestV3, options).then((request) => request(this.axios, this.basePath)); } - /** - * Get a list of orders This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listOrdersV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Get a list of orders. - * @param {OrdersApiListOrdersRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof OrdersApi - */ - public listOrders(requestParameters: OrdersApiListOrdersRequest = {}, options?: AxiosRequestConfig) { - return OrdersApiFp(this.configuration).listOrders(requestParameters.pageSize, requestParameters.cursor, requestParameters.orderBy, requestParameters.direction, requestParameters.user, requestParameters.status, requestParameters.minTimestamp, requestParameters.maxTimestamp, requestParameters.updatedMinTimestamp, requestParameters.updatedMaxTimestamp, requestParameters.buyTokenType, requestParameters.buyTokenId, requestParameters.buyAssetId, requestParameters.buyTokenAddress, requestParameters.buyTokenName, requestParameters.buyMinQuantity, requestParameters.buyMaxQuantity, requestParameters.buyMetadata, requestParameters.sellTokenType, requestParameters.sellTokenId, requestParameters.sellAssetId, requestParameters.sellTokenAddress, requestParameters.sellTokenName, requestParameters.sellMinQuantity, requestParameters.sellMaxQuantity, requestParameters.sellMetadata, requestParameters.auxiliaryFeePercentages, requestParameters.auxiliaryFeeRecipients, requestParameters.includeFees, options).then((request) => request(this.axios, this.basePath)); - } - /** * Get a list of orders (V3) * @summary Get a list of orders (V3) diff --git a/src/api/domain/projects-api.ts b/src/api/domain/projects-api.ts index 1aa3cb7c..a6613729 100644 --- a/src/api/domain/projects-api.ts +++ b/src/api/domain/projects-api.ts @@ -23,6 +23,8 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr // @ts-ignore import { APIError } from '../models'; // @ts-ignore +import { ApiSDKVersionCheckResponse } from '../models'; +// @ts-ignore import { CreateProjectRequest } from '../models'; // @ts-ignore import { CreateProjectResponse } from '../models'; @@ -43,6 +45,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat * @param {string} iMXTimestamp Unix Epoc timestamp * @param {CreateProjectRequest} createProjectRequest create a project * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ createProject: async (iMXSignature: string, iMXTimestamp: string, createProjectRequest: CreateProjectRequest, options: AxiosRequestConfig = {}): Promise => { @@ -189,6 +192,53 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Checks the SDK Version of caller against the current SDK Version and returns a message. + * @summary Checks the SDK Version of caller against the current SDK Version + * @param {string} details Runtime Details + * @param {string} [version] SDK Version + * @param {string} [id] Runtime ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSdkVersion: async (details: string, version?: string, id?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'details' is not null or undefined + assertParamExists('getSdkVersion', 'details', details) + const localVarPath = `/v1/projects/sdk`; + // 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 (details !== undefined) { + localVarQueryParameter['details'] = details; + } + + if (version !== undefined) { + localVarQueryParameter['version'] = version; + } + + if (id !== undefined) { + localVarQueryParameter['id'] = id; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -215,6 +265,7 @@ export const ProjectsApiFp = function(configuration?: Configuration) { * @param {string} iMXTimestamp Unix Epoc timestamp * @param {CreateProjectRequest} createProjectRequest create a project * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ async createProject(iMXSignature: string, iMXTimestamp: string, createProjectRequest: CreateProjectRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { @@ -250,6 +301,19 @@ export const ProjectsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getProjects(iMXSignature, iMXTimestamp, pageSize, cursor, orderBy, direction, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Checks the SDK Version of caller against the current SDK Version and returns a message. + * @summary Checks the SDK Version of caller against the current SDK Version + * @param {string} details Runtime Details + * @param {string} [version] SDK Version + * @param {string} [id] Runtime ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSdkVersion(details: string, version?: string, id?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSdkVersion(details, version, id, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, } }; @@ -267,6 +331,7 @@ export const ProjectsApiFactory = function (configuration?: Configuration, baseP * @param {string} iMXTimestamp Unix Epoc timestamp * @param {CreateProjectRequest} createProjectRequest create a project * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} */ createProject(iMXSignature: string, iMXTimestamp: string, createProjectRequest: CreateProjectRequest, options?: any): AxiosPromise { @@ -299,6 +364,18 @@ export const ProjectsApiFactory = function (configuration?: Configuration, baseP getProjects(iMXSignature: string, iMXTimestamp: string, pageSize?: number, cursor?: string, orderBy?: string, direction?: string, options?: any): AxiosPromise { return localVarFp.getProjects(iMXSignature, iMXTimestamp, pageSize, cursor, orderBy, direction, options).then((request) => request(axios, basePath)); }, + /** + * Checks the SDK Version of caller against the current SDK Version and returns a message. + * @summary Checks the SDK Version of caller against the current SDK Version + * @param {string} details Runtime Details + * @param {string} [version] SDK Version + * @param {string} [id] Runtime ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSdkVersion(details: string, version?: string, id?: string, options?: any): AxiosPromise { + return localVarFp.getSdkVersion(details, version, id, options).then((request) => request(axios, basePath)); + }, }; }; @@ -407,6 +484,34 @@ export interface ProjectsApiGetProjectsRequest { readonly direction?: string } +/** + * Request parameters for getSdkVersion operation in ProjectsApi. + * @export + * @interface ProjectsApiGetSdkVersionRequest + */ +export interface ProjectsApiGetSdkVersionRequest { + /** + * Runtime Details + * @type {string} + * @memberof ProjectsApiGetSdkVersion + */ + readonly details: string + + /** + * SDK Version + * @type {string} + * @memberof ProjectsApiGetSdkVersion + */ + readonly version?: string + + /** + * Runtime ID + * @type {string} + * @memberof ProjectsApiGetSdkVersion + */ + readonly id?: string +} + /** * ProjectsApi - object-oriented interface * @export @@ -419,6 +524,7 @@ export class ProjectsApi extends BaseAPI { * @summary Create a project * @param {ProjectsApiCreateProjectRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. + * @deprecated * @throws {RequiredError} * @memberof ProjectsApi */ @@ -449,4 +555,16 @@ export class ProjectsApi extends BaseAPI { public getProjects(requestParameters: ProjectsApiGetProjectsRequest, options?: AxiosRequestConfig) { return ProjectsApiFp(this.configuration).getProjects(requestParameters.iMXSignature, requestParameters.iMXTimestamp, requestParameters.pageSize, requestParameters.cursor, requestParameters.orderBy, requestParameters.direction, options).then((request) => request(this.axios, this.basePath)); } + + /** + * Checks the SDK Version of caller against the current SDK Version and returns a message. + * @summary Checks the SDK Version of caller against the current SDK Version + * @param {ProjectsApiGetSdkVersionRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProjectsApi + */ + public getSdkVersion(requestParameters: ProjectsApiGetSdkVersionRequest, options?: AxiosRequestConfig) { + return ProjectsApiFp(this.configuration).getSdkVersion(requestParameters.details, requestParameters.version, requestParameters.id, options).then((request) => request(this.axios, this.basePath)); + } } diff --git a/src/api/domain/trades-api.ts b/src/api/domain/trades-api.ts index d3bca75f..50fcbe5a 100644 --- a/src/api/domain/trades-api.ts +++ b/src/api/domain/trades-api.ts @@ -23,8 +23,6 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr // @ts-ignore import { APIError } from '../models'; // @ts-ignore -import { CreateTradeRequestV1 } from '../models'; -// @ts-ignore import { CreateTradeResponse } from '../models'; // @ts-ignore import { GetSignableTradeRequest } from '../models'; @@ -43,59 +41,7 @@ import { TradesCreateTradeRequest } from '../models'; export const TradesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Create a trade. Use https://docs.x.immutable.com/reference#/operations/getSignableTrade to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createTradeV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Create a Trade between two parties - * @param {CreateTradeRequestV1} createTradeRequest create a trade - * @param {string} [xImxEthAddress] eth address - * @param {string} [xImxEthSignature] eth signature - * @param {string} [authorization] Authorization header - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - createTrade: async (createTradeRequest: CreateTradeRequestV1, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'createTradeRequest' is not null or undefined - assertParamExists('createTrade', 'createTradeRequest', createTradeRequest) - const localVarPath = `/v1/trades`; - // 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; - - if (xImxEthAddress != null) { - localVarHeaderParameter['x-imx-eth-address'] = String(xImxEthAddress); - } - - if (xImxEthSignature != null) { - localVarHeaderParameter['x-imx-eth-signature'] = String(xImxEthSignature); - } - - if (authorization != null) { - localVarHeaderParameter['Authorization'] = String(authorization); - } - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(createTradeRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Create a Trade. Currently only buy order is supported. + * Create a Trade. * @summary Create a Trade (V3) * @param {TradesCreateTradeRequest} createTradeRequest create a trade * @param {string} [xImxEthAddress] eth address @@ -181,41 +127,6 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio options: localVarRequestOptions, }; }, - /** - * Get details of a trade with the given ID - * @summary Get details of a trade with the given ID - * @param {string} id Trade ID - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - getTrade: async (id: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getTrade', 'id', id) - const localVarPath = `/v1/trades/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // 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, - }; - }, /** * Get details of a trade with the given ID * @summary Get details of a trade with the given ID @@ -241,92 +152,6 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a list of trades. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listTradesV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Get a list of trades - * @param {string} [partyATokenType] Party A\'s (buy order) token type of currency used to buy - * @param {string} [partyATokenAddress] Party A\'s (buy order) token address of currency used to buy - * @param {string} [partyBTokenType] Party B\'s (sell order) token type of NFT sold - always ERC721 - * @param {string} [partyBTokenAddress] Party B\'s (sell order) collection address of NFT sold - * @param {string} [partyBTokenId] Party B\'s (sell order) token id of NFT sold - * @param {number} [pageSize] Page size of the result - * @param {string} [cursor] Cursor - * @param {'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity'} [orderBy] Property to sort by - * @param {string} [direction] Direction to sort (asc/desc) - * @param {string} [minTimestamp] Minimum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [maxTimestamp] Maximum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - listTrades: async (partyATokenType?: string, partyATokenAddress?: string, partyBTokenType?: string, partyBTokenAddress?: string, partyBTokenId?: string, pageSize?: number, cursor?: string, orderBy?: 'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity', direction?: string, minTimestamp?: string, maxTimestamp?: string, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/v1/trades`; - // 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 (partyATokenType !== undefined) { - localVarQueryParameter['party_a_token_type'] = partyATokenType; - } - - if (partyATokenAddress !== undefined) { - localVarQueryParameter['party_a_token_address'] = partyATokenAddress; - } - - if (partyBTokenType !== undefined) { - localVarQueryParameter['party_b_token_type'] = partyBTokenType; - } - - if (partyBTokenAddress !== undefined) { - localVarQueryParameter['party_b_token_address'] = partyBTokenAddress; - } - - if (partyBTokenId !== undefined) { - localVarQueryParameter['party_b_token_id'] = partyBTokenId; - } - - 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 (minTimestamp !== undefined) { - localVarQueryParameter['min_timestamp'] = minTimestamp; - } - - if (maxTimestamp !== undefined) { - localVarQueryParameter['max_timestamp'] = maxTimestamp; - } - - - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -348,8 +173,8 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio * @param {string} [cursor] Cursor * @param {'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity' | 'timestamp' | 'updated_timestamp'} [orderBy] Property to sort by * @param {string} [direction] Direction to sort (asc/desc) - * @param {string} [minTimestamp] Minimum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [maxTimestamp] Maximum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * @param {string} [minTimestamp] Minimum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-06-27T00:10:22Z\' + * @param {string} [maxTimestamp] Maximum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-06-27T00:10:22Z\' * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -432,22 +257,7 @@ export const TradesApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = TradesApiAxiosParamCreator(configuration) return { /** - * Create a trade. Use https://docs.x.immutable.com/reference#/operations/getSignableTrade to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createTradeV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Create a Trade between two parties - * @param {CreateTradeRequestV1} createTradeRequest create a trade - * @param {string} [xImxEthAddress] eth address - * @param {string} [xImxEthSignature] eth signature - * @param {string} [authorization] Authorization header - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async createTrade(createTradeRequest: CreateTradeRequestV1, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createTrade(createTradeRequest, xImxEthAddress, xImxEthSignature, authorization, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Create a Trade. Currently only buy order is supported. + * Create a Trade. * @summary Create a Trade (V3) * @param {TradesCreateTradeRequest} createTradeRequest create a trade * @param {string} [xImxEthAddress] eth address @@ -471,18 +281,6 @@ export const TradesApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getSignableTrade(getSignableTradeRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, - /** - * Get details of a trade with the given ID - * @summary Get details of a trade with the given ID - * @param {string} id Trade ID - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async getTrade(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTrade(id, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, /** * Get details of a trade with the given ID * @summary Get details of a trade with the given ID @@ -494,28 +292,6 @@ export const TradesApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getTradeV3(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, - /** - * Get a list of trades. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listTradesV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Get a list of trades - * @param {string} [partyATokenType] Party A\'s (buy order) token type of currency used to buy - * @param {string} [partyATokenAddress] Party A\'s (buy order) token address of currency used to buy - * @param {string} [partyBTokenType] Party B\'s (sell order) token type of NFT sold - always ERC721 - * @param {string} [partyBTokenAddress] Party B\'s (sell order) collection address of NFT sold - * @param {string} [partyBTokenId] Party B\'s (sell order) token id of NFT sold - * @param {number} [pageSize] Page size of the result - * @param {string} [cursor] Cursor - * @param {'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity'} [orderBy] Property to sort by - * @param {string} [direction] Direction to sort (asc/desc) - * @param {string} [minTimestamp] Minimum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [maxTimestamp] Maximum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - async listTrades(partyATokenType?: string, partyATokenAddress?: string, partyBTokenType?: string, partyBTokenAddress?: string, partyBTokenId?: string, pageSize?: number, cursor?: string, orderBy?: 'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity', direction?: string, minTimestamp?: string, maxTimestamp?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTrades(partyATokenType, partyATokenAddress, partyBTokenType, partyBTokenAddress, partyBTokenId, pageSize, cursor, orderBy, direction, minTimestamp, maxTimestamp, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, /** * Get a list of trades (V3) * @summary Get a list of trades (V3) @@ -528,8 +304,8 @@ export const TradesApiFp = function(configuration?: Configuration) { * @param {string} [cursor] Cursor * @param {'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity' | 'timestamp' | 'updated_timestamp'} [orderBy] Property to sort by * @param {string} [direction] Direction to sort (asc/desc) - * @param {string} [minTimestamp] Minimum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [maxTimestamp] Maximum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * @param {string} [minTimestamp] Minimum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-06-27T00:10:22Z\' + * @param {string} [maxTimestamp] Maximum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-06-27T00:10:22Z\' * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -548,21 +324,7 @@ export const TradesApiFactory = function (configuration?: Configuration, basePat const localVarFp = TradesApiFp(configuration) return { /** - * Create a trade. Use https://docs.x.immutable.com/reference#/operations/getSignableTrade to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createTradeV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Create a Trade between two parties - * @param {CreateTradeRequestV1} createTradeRequest create a trade - * @param {string} [xImxEthAddress] eth address - * @param {string} [xImxEthSignature] eth signature - * @param {string} [authorization] Authorization header - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - createTrade(createTradeRequest: CreateTradeRequestV1, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: any): AxiosPromise { - return localVarFp.createTrade(createTradeRequest, xImxEthAddress, xImxEthSignature, authorization, options).then((request) => request(axios, basePath)); - }, - /** - * Create a Trade. Currently only buy order is supported. + * Create a Trade. * @summary Create a Trade (V3) * @param {TradesCreateTradeRequest} createTradeRequest create a trade * @param {string} [xImxEthAddress] eth address @@ -584,17 +346,6 @@ export const TradesApiFactory = function (configuration?: Configuration, basePat getSignableTrade(getSignableTradeRequest: GetSignableTradeRequest, options?: any): AxiosPromise { return localVarFp.getSignableTrade(getSignableTradeRequest, options).then((request) => request(axios, basePath)); }, - /** - * Get details of a trade with the given ID - * @summary Get details of a trade with the given ID - * @param {string} id Trade ID - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - getTrade(id: string, options?: any): AxiosPromise { - return localVarFp.getTrade(id, options).then((request) => request(axios, basePath)); - }, /** * Get details of a trade with the given ID * @summary Get details of a trade with the given ID @@ -605,27 +356,6 @@ export const TradesApiFactory = function (configuration?: Configuration, basePat getTradeV3(id: string, options?: any): AxiosPromise { return localVarFp.getTradeV3(id, options).then((request) => request(axios, basePath)); }, - /** - * Get a list of trades. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listTradesV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Get a list of trades - * @param {string} [partyATokenType] Party A\'s (buy order) token type of currency used to buy - * @param {string} [partyATokenAddress] Party A\'s (buy order) token address of currency used to buy - * @param {string} [partyBTokenType] Party B\'s (sell order) token type of NFT sold - always ERC721 - * @param {string} [partyBTokenAddress] Party B\'s (sell order) collection address of NFT sold - * @param {string} [partyBTokenId] Party B\'s (sell order) token id of NFT sold - * @param {number} [pageSize] Page size of the result - * @param {string} [cursor] Cursor - * @param {'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity'} [orderBy] Property to sort by - * @param {string} [direction] Direction to sort (asc/desc) - * @param {string} [minTimestamp] Minimum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [maxTimestamp] Maximum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - */ - listTrades(partyATokenType?: string, partyATokenAddress?: string, partyBTokenType?: string, partyBTokenAddress?: string, partyBTokenId?: string, pageSize?: number, cursor?: string, orderBy?: 'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity', direction?: string, minTimestamp?: string, maxTimestamp?: string, options?: any): AxiosPromise { - return localVarFp.listTrades(partyATokenType, partyATokenAddress, partyBTokenType, partyBTokenAddress, partyBTokenId, pageSize, cursor, orderBy, direction, minTimestamp, maxTimestamp, options).then((request) => request(axios, basePath)); - }, /** * Get a list of trades (V3) * @summary Get a list of trades (V3) @@ -638,8 +368,8 @@ export const TradesApiFactory = function (configuration?: Configuration, basePat * @param {string} [cursor] Cursor * @param {'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity' | 'timestamp' | 'updated_timestamp'} [orderBy] Property to sort by * @param {string} [direction] Direction to sort (asc/desc) - * @param {string} [minTimestamp] Minimum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [maxTimestamp] Maximum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * @param {string} [minTimestamp] Minimum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-06-27T00:10:22Z\' + * @param {string} [maxTimestamp] Maximum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-06-27T00:10:22Z\' * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -649,41 +379,6 @@ export const TradesApiFactory = function (configuration?: Configuration, basePat }; }; -/** - * Request parameters for createTrade operation in TradesApi. - * @export - * @interface TradesApiCreateTradeRequest - */ -export interface TradesApiCreateTradeRequest { - /** - * create a trade - * @type {CreateTradeRequestV1} - * @memberof TradesApiCreateTrade - */ - readonly createTradeRequest: CreateTradeRequestV1 - - /** - * eth address - * @type {string} - * @memberof TradesApiCreateTrade - */ - readonly xImxEthAddress?: string - - /** - * eth signature - * @type {string} - * @memberof TradesApiCreateTrade - */ - readonly xImxEthSignature?: string - - /** - * Authorization header - * @type {string} - * @memberof TradesApiCreateTrade - */ - readonly authorization?: string -} - /** * Request parameters for createTradeV3 operation in TradesApi. * @export @@ -733,20 +428,6 @@ export interface TradesApiGetSignableTradeRequest { readonly getSignableTradeRequest: GetSignableTradeRequest } -/** - * Request parameters for getTrade operation in TradesApi. - * @export - * @interface TradesApiGetTradeRequest - */ -export interface TradesApiGetTradeRequest { - /** - * Trade ID - * @type {string} - * @memberof TradesApiGetTrade - */ - readonly id: string -} - /** * Request parameters for getTradeV3 operation in TradesApi. * @export @@ -761,90 +442,6 @@ export interface TradesApiGetTradeV3Request { readonly id: string } -/** - * Request parameters for listTrades operation in TradesApi. - * @export - * @interface TradesApiListTradesRequest - */ -export interface TradesApiListTradesRequest { - /** - * Party A\'s (buy order) token type of currency used to buy - * @type {string} - * @memberof TradesApiListTrades - */ - readonly partyATokenType?: string - - /** - * Party A\'s (buy order) token address of currency used to buy - * @type {string} - * @memberof TradesApiListTrades - */ - readonly partyATokenAddress?: string - - /** - * Party B\'s (sell order) token type of NFT sold - always ERC721 - * @type {string} - * @memberof TradesApiListTrades - */ - readonly partyBTokenType?: string - - /** - * Party B\'s (sell order) collection address of NFT sold - * @type {string} - * @memberof TradesApiListTrades - */ - readonly partyBTokenAddress?: string - - /** - * Party B\'s (sell order) token id of NFT sold - * @type {string} - * @memberof TradesApiListTrades - */ - readonly partyBTokenId?: string - - /** - * Page size of the result - * @type {number} - * @memberof TradesApiListTrades - */ - readonly pageSize?: number - - /** - * Cursor - * @type {string} - * @memberof TradesApiListTrades - */ - readonly cursor?: string - - /** - * Property to sort by - * @type {'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity'} - * @memberof TradesApiListTrades - */ - readonly orderBy?: 'created_at' | 'transaction_id' | 'party_a_sold_quantity' | 'party_b_sold_quantity' - - /** - * Direction to sort (asc/desc) - * @type {string} - * @memberof TradesApiListTrades - */ - readonly direction?: string - - /** - * Minimum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @type {string} - * @memberof TradesApiListTrades - */ - readonly minTimestamp?: string - - /** - * Maximum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @type {string} - * @memberof TradesApiListTrades - */ - readonly maxTimestamp?: string -} - /** * Request parameters for listTradesV3 operation in TradesApi. * @export @@ -915,14 +512,14 @@ export interface TradesApiListTradesV3Request { readonly direction?: string /** - * Minimum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * Minimum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-06-27T00:10:22Z\' * @type {string} * @memberof TradesApiListTradesV3 */ readonly minTimestamp?: string /** - * Maximum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * Maximum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-06-27T00:10:22Z\' * @type {string} * @memberof TradesApiListTradesV3 */ @@ -937,20 +534,7 @@ export interface TradesApiListTradesV3Request { */ export class TradesApi extends BaseAPI { /** - * Create a trade. Use https://docs.x.immutable.com/reference#/operations/getSignableTrade to get request body params. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/createTradeV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Create a Trade between two parties - * @param {TradesApiCreateTradeRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof TradesApi - */ - public createTrade(requestParameters: TradesApiCreateTradeRequest, options?: AxiosRequestConfig) { - return TradesApiFp(this.configuration).createTrade(requestParameters.createTradeRequest, requestParameters.xImxEthAddress, requestParameters.xImxEthSignature, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Create a Trade. Currently only buy order is supported. + * Create a Trade. * @summary Create a Trade (V3) * @param {TradesApiCreateTradeV3Request} requestParameters Request parameters. * @param {*} [options] Override http request option. @@ -973,19 +557,6 @@ export class TradesApi extends BaseAPI { return TradesApiFp(this.configuration).getSignableTrade(requestParameters.getSignableTradeRequest, options).then((request) => request(this.axios, this.basePath)); } - /** - * Get details of a trade with the given ID - * @summary Get details of a trade with the given ID - * @param {TradesApiGetTradeRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof TradesApi - */ - public getTrade(requestParameters: TradesApiGetTradeRequest, options?: AxiosRequestConfig) { - return TradesApiFp(this.configuration).getTrade(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } - /** * Get details of a trade with the given ID * @summary Get details of a trade with the given ID @@ -998,19 +569,6 @@ export class TradesApi extends BaseAPI { return TradesApiFp(this.configuration).getTradeV3(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); } - /** - * Get a list of trades. This version of the endpoint is deprecated, the latest version can be found at https://docs.x.immutable.com/reference/#/operations/listTradesV3. Deprecation date - Mon, 01 May 2023 Sunset date - Fri, 01 Sept 2023 - * @summary Get a list of trades - * @param {TradesApiListTradesRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @deprecated - * @throws {RequiredError} - * @memberof TradesApi - */ - public listTrades(requestParameters: TradesApiListTradesRequest = {}, options?: AxiosRequestConfig) { - return TradesApiFp(this.configuration).listTrades(requestParameters.partyATokenType, requestParameters.partyATokenAddress, requestParameters.partyBTokenType, requestParameters.partyBTokenAddress, requestParameters.partyBTokenId, requestParameters.pageSize, requestParameters.cursor, requestParameters.orderBy, requestParameters.direction, requestParameters.minTimestamp, requestParameters.maxTimestamp, options).then((request) => request(this.axios, this.basePath)); - } - /** * Get a list of trades (V3) * @summary Get a list of trades (V3) diff --git a/src/api/domain/transfers-api.ts b/src/api/domain/transfers-api.ts index 004067a3..5b82e241 100644 --- a/src/api/domain/transfers-api.ts +++ b/src/api/domain/transfers-api.ts @@ -27,18 +27,18 @@ import { CreateTransferRequest } from '../models'; // @ts-ignore import { CreateTransferRequestV1 } from '../models'; // @ts-ignore -import { CreateTransferResponse } from '../models'; -// @ts-ignore import { CreateTransferResponseV1 } from '../models'; // @ts-ignore -import { GetSignableTransferRequest } from '../models'; +import { CreateTransferResponseV2 } from '../models'; // @ts-ignore -import { GetSignableTransferRequestV1 } from '../models'; +import { GetSignableTransferRequest } from '../models'; // @ts-ignore -import { GetSignableTransferResponse } from '../models'; +import { GetSignableTransferRequestV2 } from '../models'; // @ts-ignore import { GetSignableTransferResponseV1 } from '../models'; // @ts-ignore +import { GetSignableTransferResponseV2 } from '../models'; +// @ts-ignore import { ListTransfersResponse } from '../models'; // @ts-ignore import { Transfer } from '../models'; @@ -153,11 +153,11 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura /** * Gets bulk details of a signable transfer * @summary Gets bulk details of a signable transfer - * @param {GetSignableTransferRequest} getSignableTransferRequestV2 get details of signable transfer + * @param {GetSignableTransferRequestV2} getSignableTransferRequestV2 get details of signable transfer * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getSignableTransfer: async (getSignableTransferRequestV2: GetSignableTransferRequest, options: AxiosRequestConfig = {}): Promise => { + getSignableTransfer: async (getSignableTransferRequestV2: GetSignableTransferRequestV2, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'getSignableTransferRequestV2' is not null or undefined assertParamExists('getSignableTransfer', 'getSignableTransferRequestV2', getSignableTransferRequestV2) const localVarPath = `/v2/signable-transfer-details`; @@ -189,11 +189,11 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura /** * Gets details of a signable transfer * @summary Gets details of a signable transfer - * @param {GetSignableTransferRequestV1} getSignableTransferRequest get details of signable transfer + * @param {GetSignableTransferRequest} getSignableTransferRequest get details of signable transfer * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getSignableTransferV1: async (getSignableTransferRequest: GetSignableTransferRequestV1, options: AxiosRequestConfig = {}): Promise => { + getSignableTransferV1: async (getSignableTransferRequest: GetSignableTransferRequest, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'getSignableTransferRequest' is not null or undefined assertParamExists('getSignableTransferV1', 'getSignableTransferRequest', getSignableTransferRequest) const localVarPath = `/v1/signable-transfer-details`; @@ -261,7 +261,7 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura * @summary Get a list of transfers * @param {number} [pageSize] Page size of the result * @param {string} [cursor] Cursor - * @param {'transaction_id' | 'updated_at' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key'} [orderBy] Property to sort by + * @param {'transaction_id' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key'} [orderBy] Property to sort by * @param {string} [direction] Direction to sort (asc/desc) * @param {string} [user] Ethereum address of the user who submitted this transfer * @param {string} [receiver] Ethereum address of the user who received this transfer @@ -279,7 +279,7 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransfers: async (pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'updated_at' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key', direction?: string, user?: string, receiver?: string, status?: 'success' | 'failure', minTimestamp?: string, maxTimestamp?: string, tokenType?: string, tokenId?: string, assetId?: string, tokenAddress?: string, tokenName?: string, minQuantity?: string, maxQuantity?: string, metadata?: string, options: AxiosRequestConfig = {}): Promise => { + listTransfers: async (pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key', direction?: string, user?: string, receiver?: string, status?: 'success' | 'failure', 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/transfers`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -391,7 +391,7 @@ export const TransfersApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createTransfer(createTransferRequestV2: CreateTransferRequest, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async createTransfer(createTransferRequestV2: CreateTransferRequest, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createTransfer(createTransferRequestV2, xImxEthAddress, xImxEthSignature, authorization, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -412,22 +412,22 @@ export const TransfersApiFp = function(configuration?: Configuration) { /** * Gets bulk details of a signable transfer * @summary Gets bulk details of a signable transfer - * @param {GetSignableTransferRequest} getSignableTransferRequestV2 get details of signable transfer + * @param {GetSignableTransferRequestV2} getSignableTransferRequestV2 get details of signable transfer * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getSignableTransfer(getSignableTransferRequestV2: GetSignableTransferRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getSignableTransfer(getSignableTransferRequestV2: GetSignableTransferRequestV2, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSignableTransfer(getSignableTransferRequestV2, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Gets details of a signable transfer * @summary Gets details of a signable transfer - * @param {GetSignableTransferRequestV1} getSignableTransferRequest get details of signable transfer + * @param {GetSignableTransferRequest} getSignableTransferRequest get details of signable transfer * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getSignableTransferV1(getSignableTransferRequest: GetSignableTransferRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async getSignableTransferV1(getSignableTransferRequest: GetSignableTransferRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSignableTransferV1(getSignableTransferRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -447,7 +447,7 @@ export const TransfersApiFp = function(configuration?: Configuration) { * @summary Get a list of transfers * @param {number} [pageSize] Page size of the result * @param {string} [cursor] Cursor - * @param {'transaction_id' | 'updated_at' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key'} [orderBy] Property to sort by + * @param {'transaction_id' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key'} [orderBy] Property to sort by * @param {string} [direction] Direction to sort (asc/desc) * @param {string} [user] Ethereum address of the user who submitted this transfer * @param {string} [receiver] Ethereum address of the user who received this transfer @@ -465,7 +465,7 @@ export const TransfersApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTransfers(pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'updated_at' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key', direction?: string, user?: string, receiver?: string, status?: 'success' | 'failure', 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> { + async listTransfers(pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key', direction?: string, user?: string, receiver?: string, status?: 'success' | 'failure', 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.listTransfers(pageSize, cursor, orderBy, direction, user, receiver, status, minTimestamp, maxTimestamp, tokenType, tokenId, assetId, tokenAddress, tokenName, minQuantity, maxQuantity, metadata, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -489,7 +489,7 @@ export const TransfersApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTransfer(createTransferRequestV2: CreateTransferRequest, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: any): AxiosPromise { + createTransfer(createTransferRequestV2: CreateTransferRequest, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: any): AxiosPromise { return localVarFp.createTransfer(createTransferRequestV2, xImxEthAddress, xImxEthSignature, authorization, options).then((request) => request(axios, basePath)); }, /** @@ -508,21 +508,21 @@ export const TransfersApiFactory = function (configuration?: Configuration, base /** * Gets bulk details of a signable transfer * @summary Gets bulk details of a signable transfer - * @param {GetSignableTransferRequest} getSignableTransferRequestV2 get details of signable transfer + * @param {GetSignableTransferRequestV2} getSignableTransferRequestV2 get details of signable transfer * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getSignableTransfer(getSignableTransferRequestV2: GetSignableTransferRequest, options?: any): AxiosPromise { + getSignableTransfer(getSignableTransferRequestV2: GetSignableTransferRequestV2, options?: any): AxiosPromise { return localVarFp.getSignableTransfer(getSignableTransferRequestV2, options).then((request) => request(axios, basePath)); }, /** * Gets details of a signable transfer * @summary Gets details of a signable transfer - * @param {GetSignableTransferRequestV1} getSignableTransferRequest get details of signable transfer + * @param {GetSignableTransferRequest} getSignableTransferRequest get details of signable transfer * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getSignableTransferV1(getSignableTransferRequest: GetSignableTransferRequestV1, options?: any): AxiosPromise { + getSignableTransferV1(getSignableTransferRequest: GetSignableTransferRequest, options?: any): AxiosPromise { return localVarFp.getSignableTransferV1(getSignableTransferRequest, options).then((request) => request(axios, basePath)); }, /** @@ -540,7 +540,7 @@ export const TransfersApiFactory = function (configuration?: Configuration, base * @summary Get a list of transfers * @param {number} [pageSize] Page size of the result * @param {string} [cursor] Cursor - * @param {'transaction_id' | 'updated_at' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key'} [orderBy] Property to sort by + * @param {'transaction_id' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key'} [orderBy] Property to sort by * @param {string} [direction] Direction to sort (asc/desc) * @param {string} [user] Ethereum address of the user who submitted this transfer * @param {string} [receiver] Ethereum address of the user who received this transfer @@ -558,7 +558,7 @@ export const TransfersApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTransfers(pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'updated_at' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key', direction?: string, user?: string, receiver?: string, status?: 'success' | 'failure', minTimestamp?: string, maxTimestamp?: string, tokenType?: string, tokenId?: string, assetId?: string, tokenAddress?: string, tokenName?: string, minQuantity?: string, maxQuantity?: string, metadata?: string, options?: any): AxiosPromise { + listTransfers(pageSize?: number, cursor?: string, orderBy?: 'transaction_id' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key', direction?: string, user?: string, receiver?: string, status?: 'success' | 'failure', 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.listTransfers(pageSize, cursor, orderBy, direction, user, receiver, status, minTimestamp, maxTimestamp, tokenType, tokenId, assetId, tokenAddress, tokenName, minQuantity, maxQuantity, metadata, options).then((request) => request(axios, basePath)); }, }; @@ -642,10 +642,10 @@ export interface TransfersApiCreateTransferV1Request { export interface TransfersApiGetSignableTransferRequest { /** * get details of signable transfer - * @type {GetSignableTransferRequest} + * @type {GetSignableTransferRequestV2} * @memberof TransfersApiGetSignableTransfer */ - readonly getSignableTransferRequestV2: GetSignableTransferRequest + readonly getSignableTransferRequestV2: GetSignableTransferRequestV2 } /** @@ -656,10 +656,10 @@ export interface TransfersApiGetSignableTransferRequest { export interface TransfersApiGetSignableTransferV1Request { /** * get details of signable transfer - * @type {GetSignableTransferRequestV1} + * @type {GetSignableTransferRequest} * @memberof TransfersApiGetSignableTransferV1 */ - readonly getSignableTransferRequest: GetSignableTransferRequestV1 + readonly getSignableTransferRequest: GetSignableTransferRequest } /** @@ -698,10 +698,10 @@ export interface TransfersApiListTransfersRequest { /** * Property to sort by - * @type {'transaction_id' | 'updated_at' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key'} + * @type {'transaction_id' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key'} * @memberof TransfersApiListTransfers */ - readonly orderBy?: 'transaction_id' | 'updated_at' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key' + readonly orderBy?: 'transaction_id' | 'created_at' | 'sender_ether_key' | 'receiver_ether_key' /** * Direction to sort (asc/desc) diff --git a/src/api/domain/users-api.ts b/src/api/domain/users-api.ts index c5c0710d..c4850305 100644 --- a/src/api/domain/users-api.ts +++ b/src/api/domain/users-api.ts @@ -33,6 +33,8 @@ import { GetSignableRegistrationResponse } from '../models'; // @ts-ignore import { GetUsersApiResponse } from '../models'; // @ts-ignore +import { RegisterPassportUserResult } from '../models'; +// @ts-ignore import { RegisterUserRequest } from '../models'; // @ts-ignore import { RegisterUserResponse } from '../models'; @@ -278,7 +280,7 @@ export const UsersApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async registerPassportUser(authorization: string, registerPassportUserRequest: ApiRegisterPassportUserRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async registerPassportUser(authorization: string, registerPassportUserRequest: ApiRegisterPassportUserRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.registerPassportUser(authorization, registerPassportUserRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -341,7 +343,7 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath * @param {*} [options] Override http request option. * @throws {RequiredError} */ - registerPassportUser(authorization: string, registerPassportUserRequest: ApiRegisterPassportUserRequest, options?: any): AxiosPromise { + registerPassportUser(authorization: string, registerPassportUserRequest: ApiRegisterPassportUserRequest, options?: any): AxiosPromise { return localVarFp.registerPassportUser(authorization, registerPassportUserRequest, options).then((request) => request(axios, basePath)); }, /** diff --git a/src/api/domain/withdrawals-api.ts b/src/api/domain/withdrawals-api.ts index 83fa40e1..9bc0d77e 100644 --- a/src/api/domain/withdrawals-api.ts +++ b/src/api/domain/withdrawals-api.ts @@ -39,7 +39,7 @@ import { Withdrawal } from '../models'; export const WithdrawalsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * Creates a withdrawal. + * Creates a withdrawal. Use https://docs.x.immutable.com/reference#/operations/getSignableWithdrawal to get request body params. * @summary Creates a withdrawal of a token * @param {string} xImxEthAddress eth address * @param {string} xImxEthSignature eth signature @@ -289,7 +289,7 @@ export const WithdrawalsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = WithdrawalsApiAxiosParamCreator(configuration) return { /** - * Creates a withdrawal. + * Creates a withdrawal. Use https://docs.x.immutable.com/reference#/operations/getSignableWithdrawal to get request body params. * @summary Creates a withdrawal of a token * @param {string} xImxEthAddress eth address * @param {string} xImxEthSignature eth signature @@ -362,7 +362,7 @@ export const WithdrawalsApiFactory = function (configuration?: Configuration, ba const localVarFp = WithdrawalsApiFp(configuration) return { /** - * Creates a withdrawal. + * Creates a withdrawal. Use https://docs.x.immutable.com/reference#/operations/getSignableWithdrawal to get request body params. * @summary Creates a withdrawal of a token * @param {string} xImxEthAddress eth address * @param {string} xImxEthSignature eth signature @@ -620,7 +620,7 @@ export interface WithdrawalsApiListWithdrawalsRequest { */ export class WithdrawalsApi extends BaseAPI { /** - * Creates a withdrawal. + * Creates a withdrawal. Use https://docs.x.immutable.com/reference#/operations/getSignableWithdrawal to get request body params. * @summary Creates a withdrawal of a token * @param {WithdrawalsApiCreateWithdrawalRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. diff --git a/src/api/models/api-sdkversion-check-response.ts b/src/api/models/api-sdkversion-check-response.ts new file mode 100644 index 00000000..c65fa54d --- /dev/null +++ b/src/api/models/api-sdkversion-check-response.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 ApiSDKVersionCheckResponse + */ +export interface ApiSDKVersionCheckResponse { + /** + * + * @type {string} + * @memberof ApiSDKVersionCheckResponse + */ + 'message'?: string; + /** + * + * @type {boolean} + * @memberof ApiSDKVersionCheckResponse + */ + 'ok'?: boolean; + /** + * + * @type {string} + * @memberof ApiSDKVersionCheckResponse + */ + 'runtimeId'?: string; +} + diff --git a/src/api/models/asset-collection.ts b/src/api/models/asset-collection.ts new file mode 100644 index 00000000..c74dce6e --- /dev/null +++ b/src/api/models/asset-collection.ts @@ -0,0 +1,27 @@ +/* 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 { CollectionDetails } from './collection-details'; + +/** + * @type AssetCollection + * Information about the collection to which this asset belongs + * @export + */ +export type AssetCollection = CollectionDetails; + + diff --git a/src/api/models/asset-orders.ts b/src/api/models/asset-orders.ts new file mode 100644 index 00000000..5fb71a23 --- /dev/null +++ b/src/api/models/asset-orders.ts @@ -0,0 +1,27 @@ +/* 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 { OrderDetails } from './order-details'; + +/** + * @type AssetOrders + * [DEPRECATED] Open orders for this asset will always return empty. Use GET /orders + * @export + */ +export type AssetOrders = OrderDetails; + + diff --git a/src/api/models/asset-properties-collection.ts b/src/api/models/asset-properties-collection.ts new file mode 100644 index 00000000..01d055b4 --- /dev/null +++ b/src/api/models/asset-properties-collection.ts @@ -0,0 +1,27 @@ +/* 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 { CollectionDetails } from './collection-details'; + +/** + * @type AssetPropertiesCollection + * Details of this asset\'s collection + * @export + */ +export type AssetPropertiesCollection = CollectionDetails; + + diff --git a/src/api/models/asset-properties.ts b/src/api/models/asset-properties.ts index f6e67708..c85c79eb 100644 --- a/src/api/models/asset-properties.ts +++ b/src/api/models/asset-properties.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { CollectionDetails } from './collection-details'; +import { AssetPropertiesCollection } from './asset-properties-collection'; /** * @@ -25,10 +25,10 @@ import { CollectionDetails } from './collection-details'; export interface AssetProperties { /** * - * @type {CollectionDetails} + * @type {AssetPropertiesCollection} * @memberof AssetProperties */ - 'collection'?: CollectionDetails; + 'collection'?: AssetPropertiesCollection; /** * Image URL of this asset * @type {string} diff --git a/src/api/models/asset-with-orders-collection.ts b/src/api/models/asset-with-orders-collection.ts new file mode 100644 index 00000000..d2693856 --- /dev/null +++ b/src/api/models/asset-with-orders-collection.ts @@ -0,0 +1,27 @@ +/* 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 { CollectionDetails } from './collection-details'; + +/** + * @type AssetWithOrdersCollection + * Information about the collection to which this asset belongs + * @export + */ +export type AssetWithOrdersCollection = CollectionDetails; + + diff --git a/src/api/models/asset-with-orders-orders.ts b/src/api/models/asset-with-orders-orders.ts new file mode 100644 index 00000000..a55b3c09 --- /dev/null +++ b/src/api/models/asset-with-orders-orders.ts @@ -0,0 +1,27 @@ +/* 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 { OrderDetails } from './order-details'; + +/** + * @type AssetWithOrdersOrders + * Open orders for this asset + * @export + */ +export type AssetWithOrdersOrders = OrderDetails; + + diff --git a/src/api/models/asset-with-orders.ts b/src/api/models/asset-with-orders.ts index 02a141b3..e2521e52 100644 --- a/src/api/models/asset-with-orders.ts +++ b/src/api/models/asset-with-orders.ts @@ -15,13 +15,13 @@ // May contain unused imports in some cases // @ts-ignore -import { CollectionDetails } from './collection-details'; +import { AssetWithOrdersCollection } from './asset-with-orders-collection'; // May contain unused imports in some cases // @ts-ignore -import { Fee } from './fee'; +import { AssetWithOrdersOrders } from './asset-with-orders-orders'; // May contain unused imports in some cases // @ts-ignore -import { OrderDetails } from './order-details'; +import { Fee } from './fee'; /** * @@ -31,10 +31,10 @@ import { OrderDetails } from './order-details'; export interface AssetWithOrders { /** * - * @type {CollectionDetails} + * @type {AssetWithOrdersCollection} * @memberof AssetWithOrders */ - 'collection': CollectionDetails; + 'collection': AssetWithOrdersCollection; /** * Timestamp of when the asset was created * @type {string} @@ -79,10 +79,10 @@ export interface AssetWithOrders { 'name': string | null; /** * - * @type {OrderDetails} + * @type {AssetWithOrdersOrders} * @memberof AssetWithOrders */ - 'orders'?: OrderDetails; + 'orders'?: AssetWithOrdersOrders; /** * Status of this asset (where it is in the system) * @type {string} diff --git a/src/api/models/asset.ts b/src/api/models/asset.ts index b8cb0fe1..534699aa 100644 --- a/src/api/models/asset.ts +++ b/src/api/models/asset.ts @@ -15,13 +15,13 @@ // May contain unused imports in some cases // @ts-ignore -import { CollectionDetails } from './collection-details'; +import { AssetCollection } from './asset-collection'; // May contain unused imports in some cases // @ts-ignore -import { Fee } from './fee'; +import { AssetOrders } from './asset-orders'; // May contain unused imports in some cases // @ts-ignore -import { OrderDetails } from './order-details'; +import { Fee } from './fee'; /** * @@ -31,10 +31,10 @@ import { OrderDetails } from './order-details'; export interface Asset { /** * - * @type {CollectionDetails} + * @type {AssetCollection} * @memberof Asset */ - 'collection': CollectionDetails; + 'collection': AssetCollection; /** * Timestamp of when the asset was created * @type {string} @@ -79,10 +79,10 @@ export interface Asset { 'name': string | null; /** * - * @type {OrderDetails} + * @type {AssetOrders} * @memberof Asset */ - 'orders'?: OrderDetails; + 'orders'?: AssetOrders; /** * Status of this asset (where it is in the system) * @type {string} diff --git a/src/api/models/collection-collection.ts b/src/api/models/collection-collection.ts new file mode 100644 index 00000000..ba6b264f --- /dev/null +++ b/src/api/models/collection-collection.ts @@ -0,0 +1,90 @@ +/* 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 CollectionCollection + */ +export interface CollectionCollection { + /** + * + * @type {string} + * @memberof CollectionCollection + */ + 'address'?: string; + /** + * + * @type {string} + * @memberof CollectionCollection + */ + 'collectionImageURL'?: string; + /** + * + * @type {string} + * @memberof CollectionCollection + */ + 'createdAt'?: string; + /** + * + * @type {string} + * @memberof CollectionCollection + */ + 'description'?: string; + /** + * + * @type {string} + * @memberof CollectionCollection + */ + 'iconURL'?: string; + /** + * + * @type {string} + * @memberof CollectionCollection + */ + 'lastCollectionEventID'?: string; + /** + * + * @type {string} + * @memberof CollectionCollection + */ + 'metadataAPIURL'?: string; + /** + * + * @type {string} + * @memberof CollectionCollection + */ + 'name'?: string; + /** + * + * @type {number} + * @memberof CollectionCollection + */ + 'projectID'?: number; + /** + * + * @type {string} + * @memberof CollectionCollection + */ + 'projectOwnerAddress'?: string; + /** + * + * @type {string} + * @memberof CollectionCollection + */ + 'updatedAt'?: string; +} + diff --git a/src/api/models/collection-filter-range.ts b/src/api/models/collection-filter-range.ts new file mode 100644 index 00000000..2e416112 --- /dev/null +++ b/src/api/models/collection-filter-range.ts @@ -0,0 +1,27 @@ +/* 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 { Range } from './range'; + +/** + * @type CollectionFilterRange + * Range of values for this property + * @export + */ +export type CollectionFilterRange = Range; + + diff --git a/src/api/models/collection-filter.ts b/src/api/models/collection-filter.ts index adf4f4b3..f8c79ff6 100644 --- a/src/api/models/collection-filter.ts +++ b/src/api/models/collection-filter.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { Range } from './range'; +import { CollectionFilterRange } from './collection-filter-range'; /** * @@ -31,10 +31,10 @@ export interface CollectionFilter { 'key'?: string; /** * - * @type {Range} + * @type {CollectionFilterRange} * @memberof CollectionFilter */ - 'range'?: Range; + 'range'?: CollectionFilterRange; /** * Type of this filter * @type {string} diff --git a/src/api/models/create-project-group-request.ts b/src/api/models/create-project-group-request.ts new file mode 100644 index 00000000..5668fb88 --- /dev/null +++ b/src/api/models/create-project-group-request.ts @@ -0,0 +1,44 @@ +/* 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 CreateProjectGroupRequest + */ +export interface CreateProjectGroupRequest { + /** + * The chain type + * @type {string} + * @memberof CreateProjectGroupRequest + */ + 'chain_type': CreateProjectGroupRequestChainTypeEnum; + /** + * The project group name + * @type {string} + * @memberof CreateProjectGroupRequest + */ + 'name': string; +} + +export const CreateProjectGroupRequestChainTypeEnum = { + Starkex: 'starkex', + Zkevm: 'zkevm' +} as const; + +export type CreateProjectGroupRequestChainTypeEnum = typeof CreateProjectGroupRequestChainTypeEnum[keyof typeof CreateProjectGroupRequestChainTypeEnum]; + + diff --git a/src/api/models/create-project-response.ts b/src/api/models/create-project-response.ts index 6a21d931..743ce745 100644 --- a/src/api/models/create-project-response.ts +++ b/src/api/models/create-project-response.ts @@ -21,10 +21,10 @@ */ export interface CreateProjectResponse { /** - * The project ID - * @type {number} + * The project group ID + * @type {string} * @memberof CreateProjectResponse */ - 'id': number; + 'id': string; } diff --git a/src/api/models/create-transfer-response-v2.ts b/src/api/models/create-transfer-response-v2.ts new file mode 100644 index 00000000..846d9902 --- /dev/null +++ b/src/api/models/create-transfer-response-v2.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 CreateTransferResponseV2 + */ +export interface CreateTransferResponseV2 { + /** + * List of transfer IDs + * @type {Array} + * @memberof CreateTransferResponseV2 + */ + 'transfer_ids': Array; +} + diff --git a/src/api/models/deposit-token.ts b/src/api/models/deposit-token.ts new file mode 100644 index 00000000..c2a71202 --- /dev/null +++ b/src/api/models/deposit-token.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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Token } from './token'; +// May contain unused imports in some cases +// @ts-ignore +import { TokenDataOAIGen } from './token-data-oaigen'; + +/** + * @type DepositToken + * Details of the asset being deposited + * @export + */ +export type DepositToken = Token; + + diff --git a/src/api/models/deposit.ts b/src/api/models/deposit.ts index 194833ed..9a943daf 100644 --- a/src/api/models/deposit.ts +++ b/src/api/models/deposit.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { Token } from './token'; +import { DepositToken } from './deposit-token'; /** * @@ -37,10 +37,10 @@ export interface Deposit { 'timestamp': string; /** * - * @type {Token} + * @type {DepositToken} * @memberof Deposit */ - 'token': Token; + 'token': DepositToken; /** * Sequential ID of this transaction within Immutable X * @type {number} diff --git a/src/api/models/encode-asset-request-token-data.ts b/src/api/models/encode-asset-request-token-data.ts new file mode 100644 index 00000000..c6890543 --- /dev/null +++ b/src/api/models/encode-asset-request-token-data.ts @@ -0,0 +1,27 @@ +/* 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 { EncodeAssetTokenData } from './encode-asset-token-data'; + +/** + * @type EncodeAssetRequestTokenData + * Extra token information to be encoded + * @export + */ +export type EncodeAssetRequestTokenData = EncodeAssetTokenData; + + diff --git a/src/api/models/encode-asset-request-token.ts b/src/api/models/encode-asset-request-token.ts index aaf71dbe..f7c723d9 100644 --- a/src/api/models/encode-asset-request-token.ts +++ b/src/api/models/encode-asset-request-token.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { EncodeAssetTokenData } from './encode-asset-token-data'; +import { EncodeAssetRequestTokenData } from './encode-asset-request-token-data'; /** * @@ -25,10 +25,10 @@ import { EncodeAssetTokenData } from './encode-asset-token-data'; export interface EncodeAssetRequestToken { /** * - * @type {EncodeAssetTokenData} + * @type {EncodeAssetRequestTokenData} * @memberof EncodeAssetRequestToken */ - 'data'?: EncodeAssetTokenData; + 'data'?: EncodeAssetRequestTokenData; /** * The type of the token to be encoded * @type {string} diff --git a/src/api/models/engine-register-user-result.ts b/src/api/models/engine-register-user-result.ts new file mode 100644 index 00000000..56b0adca --- /dev/null +++ b/src/api/models/engine-register-user-result.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 EngineRegisterUserResult + */ +export interface EngineRegisterUserResult { + /** + * + * @type {string} + * @memberof EngineRegisterUserResult + */ + 'tx_hash'?: string; +} + diff --git a/src/api/models/fee-token.ts b/src/api/models/fee-token.ts index d3512377..2049440f 100644 --- a/src/api/models/fee-token.ts +++ b/src/api/models/fee-token.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { FeeData } from './fee-data'; +import { FeeTokenData } from './fee-token-data'; /** * @@ -25,10 +25,10 @@ import { FeeData } from './fee-data'; export interface FeeToken { /** * - * @type {FeeData} + * @type {FeeTokenData} * @memberof FeeToken */ - 'data'?: FeeData; + 'data'?: FeeTokenData; /** * Fee token type. One of ETH/ERC20 * @type {string} diff --git a/src/api/models/get-signable-cancel-order-response.ts b/src/api/models/get-signable-cancel-order-response.ts index aa4bde84..f33ab4ca 100644 --- a/src/api/models/get-signable-cancel-order-response.ts +++ b/src/api/models/get-signable-cancel-order-response.ts @@ -32,11 +32,23 @@ export interface GetSignableCancelOrderResponse { * @memberof GetSignableCancelOrderResponse */ 'payload_hash': string; + /** + * EIP-712 encoding of the StarkEx cancel order request to be displayed to the user + * @type {string} + * @memberof GetSignableCancelOrderResponse + */ + 'readable_transaction': string; /** * Message to sign from wallet to confirm cancel order * @type {string} * @memberof GetSignableCancelOrderResponse */ 'signable_message': string; + /** + * IMX signed readable_transaction and payload_hash + * @type {string} + * @memberof GetSignableCancelOrderResponse + */ + 'verification_signature': string; } diff --git a/src/api/models/get-signable-deposit-request-token.ts b/src/api/models/get-signable-deposit-request-token.ts new file mode 100644 index 00000000..649026c1 --- /dev/null +++ b/src/api/models/get-signable-deposit-request-token.ts @@ -0,0 +1,27 @@ +/* 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 { SignableToken } from './signable-token'; + +/** + * @type GetSignableDepositRequestToken + * Details of the token the user is depositing + * @export + */ +export type GetSignableDepositRequestToken = SignableToken; + + diff --git a/src/api/models/get-signable-deposit-request.ts b/src/api/models/get-signable-deposit-request.ts index 9ba74427..29b46605 100644 --- a/src/api/models/get-signable-deposit-request.ts +++ b/src/api/models/get-signable-deposit-request.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { SignableToken } from './signable-token'; +import { GetSignableDepositRequestToken } from './get-signable-deposit-request-token'; /** * @@ -31,10 +31,10 @@ export interface GetSignableDepositRequest { 'amount': string; /** * - * @type {SignableToken} + * @type {GetSignableDepositRequestToken} * @memberof GetSignableDepositRequest */ - 'token': SignableToken; + 'token': GetSignableDepositRequestToken; /** * User who is depositing * @type {string} diff --git a/src/api/models/get-signable-order-request-v3.ts b/src/api/models/get-signable-order-request-v3.ts index 87880237..6752354a 100644 --- a/src/api/models/get-signable-order-request-v3.ts +++ b/src/api/models/get-signable-order-request-v3.ts @@ -54,7 +54,7 @@ export interface GetSignableOrderRequestV3 { */ 'fees'?: Array; /** - * SplitFees dictates whether fees will be split between maker & taker, set split_fees to true when submitting signing to v3 endpoints and vice versa for v1 + * SplitFees is a deprecated field. It\'s value is ignored. * @type {boolean} * @memberof GetSignableOrderRequestV3 */ diff --git a/src/api/models/get-signable-order-response.ts b/src/api/models/get-signable-order-response.ts index b549f371..0162f556 100644 --- a/src/api/models/get-signable-order-response.ts +++ b/src/api/models/get-signable-order-response.ts @@ -71,6 +71,12 @@ export interface GetSignableOrderResponse { * @memberof GetSignableOrderResponse */ 'payload_hash': string; + /** + * EIP-712 encoding of the StarkEx order transaction to be displayed to the user + * @type {string} + * @memberof GetSignableOrderResponse + */ + 'readable_transaction': string; /** * Message to sign with L1 wallet to confirm order request * @type {string} @@ -95,5 +101,11 @@ export interface GetSignableOrderResponse { * @memberof GetSignableOrderResponse */ 'vault_id_sell': number; + /** + * IMX signed readable_transaction and payload_hash + * @type {string} + * @memberof GetSignableOrderResponse + */ + 'verification_signature': string; } diff --git a/src/api/models/get-signable-registration-offchain-response.ts b/src/api/models/get-signable-registration-offchain-response.ts index d1b2d1d9..fafbbadc 100644 --- a/src/api/models/get-signable-registration-offchain-response.ts +++ b/src/api/models/get-signable-registration-offchain-response.ts @@ -26,11 +26,23 @@ export interface GetSignableRegistrationOffchainResponse { * @memberof GetSignableRegistrationOffchainResponse */ 'payload_hash': string; + /** + * EIP-712 encoding of the StarkEx Register User Offchain request to be displayed to the user + * @type {string} + * @memberof GetSignableRegistrationOffchainResponse + */ + 'readable_transaction': string; /** * Message to sign with L1 wallet to register user offchain * @type {string} * @memberof GetSignableRegistrationOffchainResponse */ 'signable_message': string; + /** + * IMX signed readable_transaction and payload_hash + * @type {string} + * @memberof GetSignableRegistrationOffchainResponse + */ + 'verification_signature': string; } diff --git a/src/api/models/get-signable-registration-response.ts b/src/api/models/get-signable-registration-response.ts index 74057e80..f73d16fb 100644 --- a/src/api/models/get-signable-registration-response.ts +++ b/src/api/models/get-signable-registration-response.ts @@ -32,5 +32,17 @@ export interface GetSignableRegistrationResponse { * @memberof GetSignableRegistrationResponse */ 'payload_hash': string; + /** + * EIP-712 encoding of the StarkEx Register User request to be displayed to the user + * @type {string} + * @memberof GetSignableRegistrationResponse + */ + 'readable_transaction': string; + /** + * IMX signed readable_transaction and payload_hash + * @type {string} + * @memberof GetSignableRegistrationResponse + */ + 'verification_signature': string; } diff --git a/src/api/models/get-signable-trade-response.ts b/src/api/models/get-signable-trade-response.ts index 85c71eef..f9f72433 100644 --- a/src/api/models/get-signable-trade-response.ts +++ b/src/api/models/get-signable-trade-response.ts @@ -71,6 +71,12 @@ export interface GetSignableTradeResponse { * @memberof GetSignableTradeResponse */ 'payload_hash': string; + /** + * EIP-712 encoding of the StarkEx trade transaction to be displayed to the user + * @type {string} + * @memberof GetSignableTradeResponse + */ + 'readable_transaction': string; /** * Message to sign with L1 wallet to confirm trade request * @type {string} @@ -95,5 +101,11 @@ export interface GetSignableTradeResponse { * @memberof GetSignableTradeResponse */ 'vault_id_sell': number; + /** + * IMX signed readable_transaction and payload_hash + * @type {string} + * @memberof GetSignableTradeResponse + */ + 'verification_signature': string; } diff --git a/src/api/models/get-signable-trade-result.ts b/src/api/models/get-signable-trade-result.ts index f3b0120f..e2cb00d1 100644 --- a/src/api/models/get-signable-trade-result.ts +++ b/src/api/models/get-signable-trade-result.ts @@ -71,6 +71,12 @@ export interface GetSignableTradeResult { * @memberof GetSignableTradeResult */ 'payload_hash'?: string; + /** + * EIP-712 encoding of the StarkEx trade transaction to be displayed to the user + * @type {string} + * @memberof GetSignableTradeResult + */ + 'readable_transaction'?: string; /** * Message to sign with L1 wallet to confirm trade request * @type {string} @@ -95,5 +101,11 @@ export interface GetSignableTradeResult { * @memberof GetSignableTradeResult */ 'vault_id_sell'?: number; + /** + * IMX signed readable_transaction and payload_hash + * @type {string} + * @memberof GetSignableTradeResult + */ + 'verification_signature'?: string; } diff --git a/src/api/models/get-signable-transfer-request-token.ts b/src/api/models/get-signable-transfer-request-token.ts new file mode 100644 index 00000000..f9fe29ce --- /dev/null +++ b/src/api/models/get-signable-transfer-request-token.ts @@ -0,0 +1,27 @@ +/* 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 { SignableToken } from './signable-token'; + +/** + * @type GetSignableTransferRequestToken + * Token to transfer + * @export + */ +export type GetSignableTransferRequestToken = SignableToken; + + diff --git a/src/api/models/get-signable-transfer-request-v2.ts b/src/api/models/get-signable-transfer-request-v2.ts new file mode 100644 index 00000000..25051082 --- /dev/null +++ b/src/api/models/get-signable-transfer-request-v2.ts @@ -0,0 +1,39 @@ +/* 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 { SignableTransferDetailsV2 } from './signable-transfer-details-v2'; + +/** + * + * @export + * @interface GetSignableTransferRequestV2 + */ +export interface GetSignableTransferRequestV2 { + /** + * Ethereum address of the transferring user + * @type {string} + * @memberof GetSignableTransferRequestV2 + */ + 'sender_ether_key': string; + /** + * List of signable transfer details + * @type {Array} + * @memberof GetSignableTransferRequestV2 + */ + 'signable_requests': Array; +} + diff --git a/src/api/models/get-signable-transfer-request.ts b/src/api/models/get-signable-transfer-request.ts index df9392c6..594956f7 100644 --- a/src/api/models/get-signable-transfer-request.ts +++ b/src/api/models/get-signable-transfer-request.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { SignableTransferDetails } from './signable-transfer-details'; +import { GetSignableTransferRequestToken } from './get-signable-transfer-request-token'; /** * @@ -23,17 +23,29 @@ import { SignableTransferDetails } from './signable-transfer-details'; * @interface GetSignableTransferRequest */ export interface GetSignableTransferRequest { + /** + * Amount of the token to transfer + * @type {string} + * @memberof GetSignableTransferRequest + */ + 'amount': string; + /** + * Ethereum address of the receiving user + * @type {string} + * @memberof GetSignableTransferRequest + */ + 'receiver': string; /** * Ethereum address of the transferring user * @type {string} * @memberof GetSignableTransferRequest */ - 'sender_ether_key': string; + 'sender': string; /** - * List of signable transfer details - * @type {Array} + * + * @type {GetSignableTransferRequestToken} * @memberof GetSignableTransferRequest */ - 'signable_requests': Array; + 'token': GetSignableTransferRequestToken; } diff --git a/src/api/models/get-signable-transfer-response-v1.ts b/src/api/models/get-signable-transfer-response-v1.ts index f09d3169..6ee19d9d 100644 --- a/src/api/models/get-signable-transfer-response-v1.ts +++ b/src/api/models/get-signable-transfer-response-v1.ts @@ -50,6 +50,12 @@ export interface GetSignableTransferResponseV1 { * @memberof GetSignableTransferResponseV1 */ 'payload_hash': string; + /** + * EIP-712 encoding of the StarkEx transfer transaction to be displayed to the user + * @type {string} + * @memberof GetSignableTransferResponseV1 + */ + 'readable_transaction': string; /** * Receiver of the transfer * @type {string} @@ -80,5 +86,11 @@ export interface GetSignableTransferResponseV1 { * @memberof GetSignableTransferResponseV1 */ 'signable_message': string; + /** + * IMX signed readable_transaction and payload_hash + * @type {string} + * @memberof GetSignableTransferResponseV1 + */ + 'verification_signature': string; } diff --git a/src/api/models/get-signable-transfer-response-v2.ts b/src/api/models/get-signable-transfer-response-v2.ts new file mode 100644 index 00000000..19fbbe7d --- /dev/null +++ b/src/api/models/get-signable-transfer-response-v2.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 { SignableTransferResponseDetails } from './signable-transfer-response-details'; + +/** + * + * @export + * @interface GetSignableTransferResponseV2 + */ +export interface GetSignableTransferResponseV2 { + /** + * Sender of the transfer + * @type {string} + * @memberof GetSignableTransferResponseV2 + */ + 'sender_stark_key': string; + /** + * Message to sign with L1 wallet to confirm transfer request + * @type {string} + * @memberof GetSignableTransferResponseV2 + */ + 'signable_message': string; + /** + * List of transfer responses without the sender stark key + * @type {Array} + * @memberof GetSignableTransferResponseV2 + */ + 'signable_responses': Array; +} + diff --git a/src/api/models/get-signable-withdrawal-request-token.ts b/src/api/models/get-signable-withdrawal-request-token.ts new file mode 100644 index 00000000..3a483c26 --- /dev/null +++ b/src/api/models/get-signable-withdrawal-request-token.ts @@ -0,0 +1,27 @@ +/* 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 { SignableToken } from './signable-token'; + +/** + * @type GetSignableWithdrawalRequestToken + * Token to withdraw + * @export + */ +export type GetSignableWithdrawalRequestToken = SignableToken; + + diff --git a/src/api/models/get-signable-withdrawal-request.ts b/src/api/models/get-signable-withdrawal-request.ts index d388e5f9..602b3761 100644 --- a/src/api/models/get-signable-withdrawal-request.ts +++ b/src/api/models/get-signable-withdrawal-request.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { SignableToken } from './signable-token'; +import { GetSignableWithdrawalRequestToken } from './get-signable-withdrawal-request-token'; /** * @@ -31,10 +31,10 @@ export interface GetSignableWithdrawalRequest { 'amount': string; /** * - * @type {SignableToken} + * @type {GetSignableWithdrawalRequestToken} * @memberof GetSignableWithdrawalRequest */ - 'token': SignableToken; + 'token': GetSignableWithdrawalRequestToken; /** * Ethereum address of the user who is making this withdrawal * @type {string} diff --git a/src/api/models/get-signable-withdrawal-response.ts b/src/api/models/get-signable-withdrawal-response.ts index be794b17..eb444994 100644 --- a/src/api/models/get-signable-withdrawal-response.ts +++ b/src/api/models/get-signable-withdrawal-response.ts @@ -44,6 +44,12 @@ export interface GetSignableWithdrawalResponse { * @memberof GetSignableWithdrawalResponse */ 'payload_hash': string; + /** + * EIP-712 encoding of the StarkEx withdrawal request to be displayed to the user + * @type {string} + * @memberof GetSignableWithdrawalResponse + */ + 'readable_transaction': string; /** * Message to sign with L1 wallet to verity withdrawal request * @type {string} @@ -62,5 +68,11 @@ export interface GetSignableWithdrawalResponse { * @memberof GetSignableWithdrawalResponse */ 'vault_id': number; + /** + * IMX signed readable_transaction and payload_hash + * @type {string} + * @memberof GetSignableWithdrawalResponse + */ + 'verification_signature': string; } diff --git a/src/api/models/index.ts b/src/api/models/index.ts index a9e92467..3627f99e 100644 --- a/src/api/models/index.ts +++ b/src/api/models/index.ts @@ -7,15 +7,23 @@ export * from './api-order-v3-maker-fees'; export * from './api-order-v3-sell'; export * from './api-order-v3-taker-fees'; export * from './api-register-passport-user-request'; +export * from './api-sdkversion-check-response'; export * from './asset'; +export * from './asset-collection'; +export * from './asset-orders'; export * from './asset-properties'; +export * from './asset-properties-collection'; export * from './asset-with-orders'; +export * from './asset-with-orders-collection'; +export * from './asset-with-orders-orders'; export * from './balance'; export * from './cancel-order-request'; export * from './cancel-order-response'; export * from './collection'; +export * from './collection-collection'; export * from './collection-details'; export * from './collection-filter'; +export * from './collection-filter-range'; export * from './contract-create-apirequest'; export * from './contract-create-response'; export * from './create-collection-request'; @@ -25,6 +33,7 @@ export * from './create-metadata-refresh-response'; export * from './create-order-request'; export * from './create-order-request-v3'; export * from './create-order-response'; +export * from './create-project-group-request'; export * from './create-project-request'; export * from './create-project-response'; export * from './create-trade-request-v1'; @@ -34,14 +43,18 @@ export * from './create-transfer-request'; export * from './create-transfer-request-v1'; export * from './create-transfer-response'; export * from './create-transfer-response-v1'; +export * from './create-transfer-response-v2'; export * from './create-withdrawal-request'; export * from './create-withdrawal-response'; export * from './currency-with-limits'; export * from './deposit'; +export * from './deposit-token'; export * from './encode-asset-request'; export * from './encode-asset-request-token'; +export * from './encode-asset-request-token-data'; export * from './encode-asset-response'; export * from './encode-asset-token-data'; +export * from './engine-register-user-result'; export * from './exchange'; export * from './exchange-create-exchange-and-urlresponse'; export * from './fee'; @@ -57,6 +70,7 @@ export * from './get-projects-response'; export * from './get-signable-cancel-order-request'; export * from './get-signable-cancel-order-response'; export * from './get-signable-deposit-request'; +export * from './get-signable-deposit-request-token'; export * from './get-signable-deposit-response'; export * from './get-signable-order-request'; export * from './get-signable-order-request-token-buy'; @@ -76,10 +90,14 @@ export * from './get-signable-trade-response-result'; export * from './get-signable-trade-result'; export * from './get-signable-trade-result-fee-info'; export * from './get-signable-transfer-request'; +export * from './get-signable-transfer-request-token'; export * from './get-signable-transfer-request-v1'; +export * from './get-signable-transfer-request-v2'; export * from './get-signable-transfer-response'; export * from './get-signable-transfer-response-v1'; +export * from './get-signable-transfer-response-v2'; export * from './get-signable-withdrawal-request'; +export * from './get-signable-withdrawal-request-token'; export * from './get-signable-withdrawal-response'; export * from './get-transactions-response'; export * from './get-users-api-response'; @@ -104,6 +122,7 @@ export * from './mint'; export * from './mint-fee'; export * from './mint-request'; export * from './mint-result-details'; +export * from './mint-token'; export * from './mint-token-data-v2'; export * from './mint-tokens-response'; export * from './mint-user'; @@ -129,11 +148,17 @@ export * from './order-v3-taker-fees'; export * from './orders-maker-taker-fee'; export * from './project'; export * from './range'; +export * from './register-passport-user-request'; +export * from './register-passport-user-result'; export * from './register-user-request'; export * from './register-user-response'; export * from './signable-token'; export * from './signable-transfer-details'; +export * from './signable-transfer-details-token'; +export * from './signable-transfer-details-v2'; +export * from './signable-transfer-details-v2-token'; export * from './signable-transfer-response-details'; +export * from './signable-transfer-response-details-token'; export * from './store-maker-taker-fee'; export * from './success-response'; export * from './token'; @@ -149,6 +174,8 @@ export * from './trades-create-trade-request'; export * from './trades-create-trade-request-fee-info'; export * from './transfer'; export * from './transfer-request'; +export * from './transfer-token'; export * from './update-collection-request'; export * from './widget-params'; export * from './withdrawal'; +export * from './withdrawal-token'; diff --git a/src/api/models/mint-token.ts b/src/api/models/mint-token.ts new file mode 100644 index 00000000..56f110e0 --- /dev/null +++ b/src/api/models/mint-token.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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Token } from './token'; +// May contain unused imports in some cases +// @ts-ignore +import { TokenDataOAIGen } from './token-data-oaigen'; + +/** + * @type MintToken + * Details of the asset which has been minted + * @export + */ +export type MintToken = Token; + + diff --git a/src/api/models/mint.ts b/src/api/models/mint.ts index b42531b8..aed6434c 100644 --- a/src/api/models/mint.ts +++ b/src/api/models/mint.ts @@ -18,7 +18,7 @@ import { Fee } from './fee'; // May contain unused imports in some cases // @ts-ignore -import { Token } from './token'; +import { MintToken } from './mint-token'; /** * @@ -46,10 +46,10 @@ export interface Mint { 'timestamp': string; /** * - * @type {Token} + * @type {MintToken} * @memberof Mint */ - 'token': Token; + 'token': MintToken; /** * Sequential ID of transaction in Immutable X * @type {number} diff --git a/src/api/models/order-fee-info-token.ts b/src/api/models/order-fee-info-token.ts index f891f0c9..af43e851 100644 --- a/src/api/models/order-fee-info-token.ts +++ b/src/api/models/order-fee-info-token.ts @@ -15,10 +15,10 @@ // May contain unused imports in some cases // @ts-ignore -import { FeeData } from './fee-data'; +import { FeeToken } from './fee-token'; // May contain unused imports in some cases // @ts-ignore -import { FeeToken } from './fee-token'; +import { FeeTokenData } from './fee-token-data'; /** * @type OrderFeeInfoToken diff --git a/src/api/models/project.ts b/src/api/models/project.ts index db1abe76..36b87aea 100644 --- a/src/api/models/project.ts +++ b/src/api/models/project.ts @@ -21,64 +21,28 @@ */ export interface Project { /** - * The current period expiry date for collection limit + * The project ChainType * @type {string} * @memberof Project */ - 'collection_limit_expires_at': string; + 'chain_type'?: string; /** - * The total monthly collection limit - * @type {number} - * @memberof Project - */ - 'collection_monthly_limit': number; - /** - * The number of collection remaining in the current period - * @type {number} - * @memberof Project - */ - 'collection_remaining': number; - /** - * The company name + * The project group ID * @type {string} * @memberof Project */ - 'company_name': string; + 'id': string; /** - * The project contact email (must be registered as a developer account with Immutable at https://hub.immutable.com) + * The project group name * @type {string} * @memberof Project */ - 'contact_email': string; - /** - * The project ID - * @type {number} - * @memberof Project - */ - 'id': number; - /** - * The current period expiry date for mint operation limit - * @type {string} - * @memberof Project - */ - 'mint_limit_expires_at': string; - /** - * The total monthly mint operation limit - * @type {number} - * @memberof Project - */ - 'mint_monthly_limit': number; - /** - * The number of mint operation remaining in the current period - * @type {number} - * @memberof Project - */ - 'mint_remaining': number; + 'name': string; /** - * The project name + * The organisation ID that the project belongs to * @type {string} * @memberof Project */ - 'name': string; + 'org_id'?: string; } diff --git a/src/api/models/register-passport-user-request.ts b/src/api/models/register-passport-user-request.ts new file mode 100644 index 00000000..e17ae31b --- /dev/null +++ b/src/api/models/register-passport-user-request.ts @@ -0,0 +1,54 @@ +/* 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 RegisterPassportUserRequest + */ +export interface RegisterPassportUserRequest { + /** + * Eth signature + * @type {string} + * @memberof RegisterPassportUserRequest + */ + 'eth_signature': string; + /** + * The ether key of the user + * @type {string} + * @memberof RegisterPassportUserRequest + */ + 'ether_key': string; + /** + * Public stark key of the user + * @type {string} + * @memberof RegisterPassportUserRequest + */ + 'stark_key': string; + /** + * Payload signature + * @type {string} + * @memberof RegisterPassportUserRequest + */ + 'stark_signature': string; + /** + * The auth0 user id + * @type {string} + * @memberof RegisterPassportUserRequest + */ + 'user_id': string; +} + diff --git a/src/api/models/register-passport-user-result.ts b/src/api/models/register-passport-user-result.ts new file mode 100644 index 00000000..44967a05 --- /dev/null +++ b/src/api/models/register-passport-user-result.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 RegisterPassportUserResult + */ +export interface RegisterPassportUserResult { + /** + * The ether key of the user + * @type {string} + * @memberof RegisterPassportUserResult + */ + 'ether_key'?: string; + /** + * The stark key of the user + * @type {string} + * @memberof RegisterPassportUserResult + */ + 'stark_key'?: string; + /** + * The admin key of the user + * @type {string} + * @memberof RegisterPassportUserResult + */ + 'user_admin_key'?: string; +} + diff --git a/src/api/models/signable-transfer-details-token.ts b/src/api/models/signable-transfer-details-token.ts new file mode 100644 index 00000000..4ebfa3bb --- /dev/null +++ b/src/api/models/signable-transfer-details-token.ts @@ -0,0 +1,27 @@ +/* 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 { SignableToken } from './signable-token'; + +/** + * @type SignableTransferDetailsToken + * Token to transfer + * @export + */ +export type SignableTransferDetailsToken = SignableToken; + + diff --git a/src/api/models/signable-transfer-details-v2-token.ts b/src/api/models/signable-transfer-details-v2-token.ts new file mode 100644 index 00000000..684691c1 --- /dev/null +++ b/src/api/models/signable-transfer-details-v2-token.ts @@ -0,0 +1,27 @@ +/* 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 { SignableToken } from './signable-token'; + +/** + * @type SignableTransferDetailsV2Token + * Token to transfer + * @export + */ +export type SignableTransferDetailsV2Token = SignableToken; + + diff --git a/src/api/models/signable-transfer-details-v2.ts b/src/api/models/signable-transfer-details-v2.ts new file mode 100644 index 00000000..682a16e5 --- /dev/null +++ b/src/api/models/signable-transfer-details-v2.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 { SignableTransferDetailsV2Token } from './signable-transfer-details-v2-token'; + +/** + * + * @export + * @interface SignableTransferDetailsV2 + */ +export interface SignableTransferDetailsV2 { + /** + * Amount of the token to transfer + * @type {string} + * @memberof SignableTransferDetailsV2 + */ + 'amount': string; + /** + * Ethereum address of the receiving user + * @type {string} + * @memberof SignableTransferDetailsV2 + */ + 'receiver': string; + /** + * + * @type {SignableTransferDetailsV2Token} + * @memberof SignableTransferDetailsV2 + */ + 'token': SignableTransferDetailsV2Token; +} + diff --git a/src/api/models/signable-transfer-details.ts b/src/api/models/signable-transfer-details.ts index 88fd7451..805a05b7 100644 --- a/src/api/models/signable-transfer-details.ts +++ b/src/api/models/signable-transfer-details.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { SignableToken } from './signable-token'; +import { SignableTransferDetailsToken } from './signable-transfer-details-token'; /** * @@ -37,9 +37,9 @@ export interface SignableTransferDetails { 'receiver': string; /** * - * @type {SignableToken} + * @type {SignableTransferDetailsToken} * @memberof SignableTransferDetails */ - 'token': SignableToken; + 'token': SignableTransferDetailsToken; } diff --git a/src/api/models/signable-transfer-response-details-token.ts b/src/api/models/signable-transfer-response-details-token.ts new file mode 100644 index 00000000..b916056f --- /dev/null +++ b/src/api/models/signable-transfer-response-details-token.ts @@ -0,0 +1,27 @@ +/* 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 { SignableToken } from './signable-token'; + +/** + * @type SignableTransferResponseDetailsToken + * Token in request to match in SDK implementation + * @export + */ +export type SignableTransferResponseDetailsToken = SignableToken; + + diff --git a/src/api/models/signable-transfer-response-details.ts b/src/api/models/signable-transfer-response-details.ts index bcc89fb5..a9dbaeed 100644 --- a/src/api/models/signable-transfer-response-details.ts +++ b/src/api/models/signable-transfer-response-details.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { SignableToken } from './signable-token'; +import { SignableTransferResponseDetailsToken } from './signable-transfer-response-details-token'; /** * @@ -53,6 +53,12 @@ export interface SignableTransferResponseDetails { * @memberof SignableTransferResponseDetails */ 'payload_hash': string; + /** + * EIP-712 encoding of the StarkEx transfer request to be displayed to the user + * @type {string} + * @memberof SignableTransferResponseDetails + */ + 'readable_transaction': string; /** * Receiver of the transfer * @type {string} @@ -73,9 +79,15 @@ export interface SignableTransferResponseDetails { 'sender_vault_id': number; /** * - * @type {SignableToken} + * @type {SignableTransferResponseDetailsToken} + * @memberof SignableTransferResponseDetails + */ + 'token': SignableTransferResponseDetailsToken; + /** + * IMX signed readable_transaction and payload_hash + * @type {string} * @memberof SignableTransferResponseDetails */ - 'token': SignableToken; + 'verification_signature': string; } diff --git a/src/api/models/token-data-properties.ts b/src/api/models/token-data-properties.ts index ba22a0b7..842c555f 100644 --- a/src/api/models/token-data-properties.ts +++ b/src/api/models/token-data-properties.ts @@ -18,7 +18,7 @@ import { AssetProperties } from './asset-properties'; // May contain unused imports in some cases // @ts-ignore -import { CollectionDetails } from './collection-details'; +import { AssetPropertiesCollection } from './asset-properties-collection'; /** * @type TokenDataProperties diff --git a/src/api/models/token-details.ts b/src/api/models/token-details.ts index c6f7657f..1bf8b90d 100644 --- a/src/api/models/token-details.ts +++ b/src/api/models/token-details.ts @@ -51,7 +51,7 @@ export interface TokenDetails { */ 'symbol': string; /** - * Address of the ERC721 contract + * Address of the ERC20 contract * @type {string} * @memberof TokenDetails */ diff --git a/src/api/models/transfer-token.ts b/src/api/models/transfer-token.ts new file mode 100644 index 00000000..c7f983eb --- /dev/null +++ b/src/api/models/transfer-token.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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Token } from './token'; +// May contain unused imports in some cases +// @ts-ignore +import { TokenDataOAIGen } from './token-data-oaigen'; + +/** + * @type TransferToken + * Token transferred by the user + * @export + */ +export type TransferToken = Token; + + diff --git a/src/api/models/transfer.ts b/src/api/models/transfer.ts index f0a3eeab..0d443f4f 100644 --- a/src/api/models/transfer.ts +++ b/src/api/models/transfer.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { Token } from './token'; +import { TransferToken } from './transfer-token'; /** * @@ -43,10 +43,10 @@ export interface Transfer { 'timestamp': string | null; /** * - * @type {Token} + * @type {TransferToken} * @memberof Transfer */ - 'token': Token; + 'token': TransferToken; /** * Sequential transaction ID * @type {number} diff --git a/src/api/models/withdrawal-token.ts b/src/api/models/withdrawal-token.ts new file mode 100644 index 00000000..4f1d92d2 --- /dev/null +++ b/src/api/models/withdrawal-token.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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Token } from './token'; +// May contain unused imports in some cases +// @ts-ignore +import { TokenDataOAIGen } from './token-data-oaigen'; + +/** + * @type WithdrawalToken + * Details of the asset this user is withdrawing + * @export + */ +export type WithdrawalToken = Token; + + diff --git a/src/api/models/withdrawal.ts b/src/api/models/withdrawal.ts index 2177cc7c..2c4f6366 100644 --- a/src/api/models/withdrawal.ts +++ b/src/api/models/withdrawal.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { Token } from './token'; +import { WithdrawalToken } from './withdrawal-token'; /** * @@ -49,10 +49,10 @@ export interface Withdrawal { 'timestamp': string; /** * - * @type {Token} + * @type {WithdrawalToken} * @memberof Withdrawal */ - 'token': Token; + 'token': WithdrawalToken; /** * Sequential ID of this transaction * @type {number} diff --git a/src/workflows/orders.ts b/src/workflows/orders.ts index a8ef4bdb..fe7895ec 100644 --- a/src/workflows/orders.ts +++ b/src/workflows/orders.ts @@ -4,7 +4,7 @@ import { GetSignableCancelOrderRequest, GetSignableOrderRequest, OrdersApi, - OrdersApiCreateOrderRequest, + OrdersApiCreateOrderV3Request, } from '../api'; import { UnsignedOrderRequest, WalletConnection } from '../types'; import { signRaw } from '../utils'; @@ -54,7 +54,7 @@ export async function createOrderWorkflow({ const resp = getSignableOrderResponse.data; - const orderParams: OrdersApiCreateOrderRequest = { + const orderParams: OrdersApiCreateOrderV3Request = { createOrderRequest: { amount_buy: resp.amount_buy, amount_sell: resp.amount_sell, diff --git a/src/workflows/registration.ts b/src/workflows/registration.ts index 9cd33f6b..30dc41a8 100644 --- a/src/workflows/registration.ts +++ b/src/workflows/registration.ts @@ -77,5 +77,7 @@ export async function getSignableRegistrationOnchain( return { operator_signature: response.data.operator_signature, payload_hash: response.data.payload_hash, + readable_transaction: response.data.readable_transaction, + verification_signature: response.data.verification_signature, }; }