diff --git a/openapi.json b/openapi.json index 1af602c9..16ea4d3b 100644 --- a/openapi.json +++ b/openapi.json @@ -1613,25 +1613,25 @@ }, { "type": "string", - "description": "Minimum created at timestamp for this order, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", + "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": "Maximum created at timestamp for this order, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", + "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": "Minimum updated at timestamp for this order, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", + "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": "Maximum updated at timestamp for this order, in ISO 8601 UTC format. Example: '2022-05-27T00:10:22Z'", + "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" }, @@ -1833,7 +1833,7 @@ }, "/v1/orders/{id}": { "get": { - "description": "Get details of an order with the given ID", + "description": "Get an order", "consumes": [ "application/json" ], @@ -1843,7 +1843,7 @@ "tags": [ "orders" ], - "summary": "Get details of an order with the given ID", + "summary": "Get an order", "operationId": "getOrder", "parameters": [ { @@ -1954,6 +1954,66 @@ } } }, + "/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/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/projects": { "get": { "description": "Get projects", @@ -2186,7 +2246,7 @@ }, "/v1/signable-cancel-order-details": { "post": { - "description": "Get details a signable cancel order", + "description": "Get a signable cancel order message", "consumes": [ "application/json" ], @@ -2196,7 +2256,7 @@ "tags": [ "orders" ], - "summary": "Get details a signable cancel order", + "summary": "Get a signable cancel order message", "operationId": "getSignableCancelOrder", "parameters": [ { @@ -2369,7 +2429,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/GetSignableTransferRequestV1" + "$ref": "#/definitions/GetSignableTransferRequest" } } ], @@ -2377,7 +2437,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/GetSignableTransferResponseV1" + "$ref": "#/definitions/GetSignableTransferResponse" } } } @@ -2843,15 +2903,19 @@ "type": "string", "description": "eth address", "name": "x-imx-eth-address", - "in": "header", - "required": true + "in": "header" }, { "type": "string", "description": "eth signature", "name": "x-imx-eth-signature", - "in": "header", - "required": true + "in": "header" + }, + { + "type": "string", + "description": "Authorization header", + "name": "Authorization", + "in": "header" }, { "description": "Create transfer", @@ -2867,7 +2931,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/CreateTransferResponseV1" + "$ref": "#/definitions/CreateTransferResponse" } }, "400": { @@ -4139,206 +4203,805 @@ } } }, - "/v3/signable-order-details": { - "post": { - "description": "Get a signable order request (V3)", - "consumes": [ - "application/json" - ], + "/v3/orders": { + "get": { + "description": "Get a list of orders (V3)", "produces": [ "application/json" ], "tags": [ "orders" ], - "summary": "Get a signable order request (V3)", - "operationId": "getSignableOrder", + "summary": "Get a list of orders (V3)", + "operationId": "listOrdersV3", "parameters": [ { - "description": "get a signable order", - "name": "GetSignableOrderRequestV3", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/GetSignableOrderRequest" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/GetSignableOrderResponse" - } + "type": "integer", + "description": "Page size of the result", + "name": "page_size", + "in": "query" }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/APIError" - } + { + "type": "string", + "description": "Cursor", + "name": "cursor", + "in": "query" }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/APIError" - } - } - } - } - }, - "/v3/signable-trade-details": { - "post": { - "description": "Get details a signable trade V3", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "trades" - ], - "summary": "Get details a signable trade V3", - "operationId": "getSignableTrade", - "parameters": [ { - "description": "get a signable trade", - "name": "GetSignableTradeRequest", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/GetSignableTradeRequest" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/GetSignableTradeResponse" - } - } - } - } - } - }, - "definitions": { - "APIError": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "description": "The error code", - "type": "string" - }, - "details": { - "description": "The error details", - "type": "string" - }, - "message": { - "description": "The error message", - "type": "string" - } - } - }, - "AddMetadataSchemaToCollectionRequest": { - "type": "object", - "required": [ - "metadata" - ], - "properties": { - "contract_address": { - "description": "Not required from API user", - "type": "string" - }, - "metadata": { - "description": "The metadata container", - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/MetadataSchemaRequest" - } - } - } - }, - "Asset": { - "type": "object", - "required": [ - "collection", - "created_at", - "description", - "image_url", - "metadata", - "name", - "status", - "token_address", - "token_id", - "updated_at", - "uri", - "user" - ], - "properties": { - "collection": { - "description": "Information about the collection to which this asset belongs", - "$ref": "#/definitions/CollectionDetails" - }, - "created_at": { - "description": "Timestamp of when the asset was created", - "type": "string", - "x-nullable": true - }, - "description": { - "description": "Description of this asset", - "type": "string", - "x-nullable": true - }, - "fees": { - "description": "Royalties to pay on this asset operations", - "type": "array", - "items": { - "$ref": "#/definitions/Fee" - } - }, - "id": { - "description": "[DEPRECATED] Internal Immutable X Token ID", - "type": "string" - }, - "image_url": { - "description": "URL of the image which should be used for this asset", - "type": "string", - "x-nullable": true - }, - "metadata": { - "description": "Metadata of this asset", - "type": "object", - "x-nullable": true - }, - "name": { - "description": "Name of this asset", - "type": "string", - "x-nullable": true - }, - "orders": { - "description": "[DEPRECATED] Open orders for this asset will always return empty. Use GET /orders", - "$ref": "#/definitions/OrderDetails" - }, - "status": { - "description": "Status of this asset (where it is in the system)", - "type": "string" - }, - "token_address": { - "description": "Address of the ERC721 contract", - "type": "string" - }, - "token_id": { - "description": "ERC721 Token ID of this asset", - "type": "string" - }, - "updated_at": { - "description": "Timestamp of when the asset was updated", + "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" + } + } + } + }, + "post": { + "description": "Create an order using the v3 orderbook. Currently only buy NFT orders are supported.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "orders" + ], + "summary": "Create an order (V3)", + "operationId": "createOrderV3", + "parameters": [ + { + "type": "string", + "description": "eth address", + "name": "x-imx-eth-address", + "in": "header", + "required": true + }, + { + "type": "string", + "description": "eth signature", + "name": "x-imx-eth-signature", + "in": "header", + "required": true + }, + { + "description": "create an order", + "name": "CreateOrderRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrderRequest" + } + } + ], + "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" + } + } + } + } + }, + "/v3/orders/{id}": { + "get": { + "description": "Get an order (V3)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "orders" + ], + "summary": "Get an order (V3)", + "operationId": "getOrderV3", + "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", + "schema": { + "$ref": "#/definitions/api.OrderV3" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/APIError" + } + } + } + }, + "delete": { + "description": "Cancel an order (V3)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "orders" + ], + "summary": "Cancel an order (V3)", + "operationId": "cancelOrderV3", + "parameters": [ + { + "type": "string", + "description": "eth address", + "name": "x-imx-eth-address", + "in": "header", + "required": true + }, + { + "type": "string", + "description": "eth signature", + "name": "x-imx-eth-signature", + "in": "header", + "required": true + }, + { + "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" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/APIError" + } + } + } + } + }, + "/v3/signable-cancel-order-details": { + "post": { + "description": "Get a signable cancel order message (V3)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "orders" + ], + "summary": "Get a signable cancel order message (V3)", + "operationId": "getSignableCancelOrderV3", + "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" + } + } + } + } + }, + "/v3/signable-order-details": { + "post": { + "description": "Get a signable order request (V3)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "orders" + ], + "summary": "Get a signable order request (V3)", + "operationId": "getSignableOrder", + "parameters": [ + { + "description": "get a signable order", + "name": "GetSignableOrderRequestV3", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetSignableOrderRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/GetSignableOrderResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/APIError" + } + } + } + } + }, + "/v3/signable-trade-details": { + "post": { + "description": "Get a signable trade V3 message", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "trades" + ], + "summary": "Get a signable trade V3 message", + "operationId": "getSignableTrade", + "parameters": [ + { + "description": "get a signable trade", + "name": "GetSignableTradeRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetSignableTradeRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/GetSignableTradeResponse" + } + } + } + } + }, + "/v3/trades": { + "get": { + "description": "Get a list of trades (V3)", + "produces": [ + "application/json" + ], + "tags": [ + "trades" + ], + "summary": "Get a list of trades (V3)", + "operationId": "listTradesV3", + "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" + }, + { + "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. Currently only buy order is supported.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "trades" + ], + "summary": "Create a Trade (V3)", + "operationId": "createTradeV3", + "parameters": [ + { + "type": "string", + "description": "eth address", + "name": "x-imx-eth-address", + "in": "header", + "required": true + }, + { + "type": "string", + "description": "eth signature", + "name": "x-imx-eth-signature", + "in": "header", + "required": true + }, + { + "description": "create a trade", + "name": "CreateTradeRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/trades.CreateTradeRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CreateTradeResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/APIError" + } + } + } + } + } + }, + "definitions": { + "APIError": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "description": "The error code", + "type": "string" + }, + "details": { + "description": "The error details", + "type": "string" + }, + "message": { + "description": "The error message", + "type": "string" + } + } + }, + "AddMetadataSchemaToCollectionRequest": { + "type": "object", + "required": [ + "metadata" + ], + "properties": { + "contract_address": { + "description": "Not required from API user", + "type": "string" + }, + "metadata": { + "description": "The metadata container", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/MetadataSchemaRequest" + } + } + } + }, + "Asset": { + "type": "object", + "required": [ + "collection", + "created_at", + "description", + "image_url", + "metadata", + "name", + "status", + "token_address", + "token_id", + "updated_at", + "uri", + "user" + ], + "properties": { + "collection": { + "$ref": "#/definitions/assetCollection" + }, + "created_at": { + "description": "Timestamp of when the asset was created", + "type": "string", + "x-nullable": true + }, + "description": { + "description": "Description of this asset", + "type": "string", + "x-nullable": true + }, + "fees": { + "description": "Royalties to pay on this asset operations", + "type": "array", + "items": { + "$ref": "#/definitions/Fee" + } + }, + "id": { + "description": "[DEPRECATED] Internal Immutable X Token ID", + "type": "string" + }, + "image_url": { + "description": "URL of the image which should be used for this asset", + "type": "string", + "x-nullable": true + }, + "metadata": { + "description": "Metadata of this asset", + "type": "object", + "x-nullable": true + }, + "name": { + "description": "Name of this asset", + "type": "string", + "x-nullable": true + }, + "orders": { + "$ref": "#/definitions/assetOrders" + }, + "status": { + "description": "Status of this asset (where it is in the system)", + "type": "string" + }, + "token_address": { + "description": "Address of the ERC721 contract", + "type": "string" + }, + "token_id": { + "description": "ERC721 Token ID of this asset", + "type": "string" + }, + "updated_at": { + "description": "Timestamp of when the asset was updated", "type": "string", "x-nullable": true }, @@ -4357,8 +5020,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", @@ -4388,8 +5050,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", @@ -4428,8 +5089,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)", @@ -4614,8 +5274,7 @@ "type": "string" }, "range": { - "description": "Range of values for this property", - "$ref": "#/definitions/Range" + "$ref": "#/definitions/collectionFilterRange" }, "type": { "description": "Type of this filter", @@ -4899,8 +5558,7 @@ "type": "integer" }, "fee_info": { - "description": "Fee details", - "$ref": "#/definitions/FeeInfo" + "$ref": "#/definitions/createTradeRequestV1FeeInfo" }, "fees": { "description": "Fee information", @@ -5176,8 +5834,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", @@ -5351,8 +6008,7 @@ "type": "object", "properties": { "data": { - "description": "Fee token data details", - "$ref": "#/definitions/FeeData" + "$ref": "#/definitions/feeTokenData" }, "type": { "description": "Fee token type. One of ETH/ERC20", @@ -5501,7 +6157,9 @@ "required": [ "order_id", "payload_hash", - "signable_message" + "readable_transaction", + "signable_message", + "verification_signature" ], "properties": { "order_id": { @@ -5512,9 +6170,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" } } }, @@ -5531,8 +6197,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", @@ -5601,13 +6266,15 @@ "$ref": "#/definitions/FeeEntry" } }, + "split_fees": { + "description": "SplitFees controls whether fees will be split between maker \u0026 taker", + "type": "boolean" + }, "token_buy": { - "description": "Token to buy", - "$ref": "#/definitions/SignableToken" + "$ref": "#/definitions/getSignableOrderRequestTokenBuy" }, "token_sell": { - "description": "Token to sell", - "$ref": "#/definitions/SignableToken" + "$ref": "#/definitions/getSignableOrderRequestTokenSell" }, "user": { "description": "Ethereum address of the submitting user", @@ -5625,10 +6292,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": { @@ -5652,8 +6321,7 @@ "type": "integer" }, "fee_info": { - "description": "Fee information", - "$ref": "#/definitions/FeeInfo" + "$ref": "#/definitions/getSignableOrderResponseFeeInfo" }, "nonce": { "description": "Nonce of the order", @@ -5663,6 +6331,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" @@ -5678,6 +6350,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" } } }, @@ -5685,16 +6361,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" } } }, @@ -5719,7 +6405,9 @@ "type": "object", "required": [ "operator_signature", - "payload_hash" + "payload_hash", + "readable_transaction", + "verification_signature" ], "properties": { "operator_signature": { @@ -5729,6 +6417,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" } } }, @@ -5743,38 +6439,100 @@ "description": "ExpirationTimestamp in Unix time. Note: will be rounded down to the nearest hour", "type": "integer" }, - "fees": { - "description": "Inclusion of either maker or taker fees", - "type": "array", - "items": { - "$ref": "#/definitions/FeeEntry" - } + "fees": { + "description": "Inclusion of either maker or taker fees", + "type": "array", + "items": { + "$ref": "#/definitions/FeeEntry" + } + }, + "order_id": { + "description": "The ID of the maker order involved", + "type": "integer" + }, + "user": { + "description": "Ethereum address of the submitting user", + "type": "string" + } + } + }, + "GetSignableTradeResponse": { + "type": "object", + "required": [ + "amount_buy", + "amount_sell", + "asset_id_buy", + "asset_id_sell", + "expiration_timestamp", + "nonce", + "payload_hash", + "readable_transaction", + "signable_message", + "stark_key", + "vault_id_buy", + "vault_id_sell", + "verification_signature" + ], + "properties": { + "amount_buy": { + "description": "Amount to buy", + "type": "string" + }, + "amount_sell": { + "description": "Amount to sell", + "type": "string" + }, + "asset_id_buy": { + "description": "ID of the asset to buy", + "type": "string" + }, + "asset_id_sell": { + "description": "ID of the asset to sell", + "type": "string" + }, + "expiration_timestamp": { + "description": "Expiration timestamp for this order", + "type": "integer" + }, + "fee_info": { + "$ref": "#/definitions/getSignableTradeResponseFeeInfo" + }, + "nonce": { + "description": "Nonce of the order", + "type": "integer" + }, + "payload_hash": { + "description": "Payload Hash", + "type": "string" }, - "order_id": { - "description": "The ID of the maker order involved", + "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" + }, + "stark_key": { + "description": "Public stark key of the created user", + "type": "string" + }, + "vault_id_buy": { + "description": "ID of the vault into which the bought asset will be placed", "type": "integer" }, - "user": { - "description": "Ethereum address of the submitting user", + "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" } } }, - "GetSignableTradeResponse": { + "GetSignableTradeResult": { "type": "object", - "required": [ - "amount_buy", - "amount_sell", - "asset_id_buy", - "asset_id_sell", - "expiration_timestamp", - "nonce", - "payload_hash", - "signable_message", - "stark_key", - "vault_id_buy", - "vault_id_sell" - ], "properties": { "amount_buy": { "description": "Amount to buy", @@ -5793,36 +6551,43 @@ "type": "string" }, "expiration_timestamp": { - "description": "Expiration timestamp for this order", + "description": "Expiration timestamp of this trade", "type": "integer" }, "fee_info": { - "description": "Fee information", - "$ref": "#/definitions/FeeInfo" + "$ref": "#/definitions/getSignableTradeResultFeeInfo" }, "nonce": { - "description": "Nonce of the order", + "description": "Nonce of the trade", "type": "integer" }, "payload_hash": { "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" }, "stark_key": { - "description": "Public stark key of the created user", + "description": "Public stark key of the trading user", "type": "string" }, "vault_id_buy": { - "description": "ID of the vault into which the bought asset will be placed", + "description": "ID of the vault into which the traded asset will be placed", "type": "integer" }, "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" } } }, @@ -5967,8 +6732,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", @@ -5983,9 +6747,11 @@ "asset_id", "nonce", "payload_hash", + "readable_transaction", "signable_message", "stark_key", - "vault_id" + "vault_id", + "verification_signature" ], "properties": { "amount": { @@ -6004,6 +6770,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" @@ -6015,6 +6785,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" } } }, @@ -6198,7 +6972,7 @@ "description": "Orders matching query parameters", "type": "array", "items": { - "$ref": "#/definitions/Order" + "$ref": "#/definitions/api.OrderV3" } } } @@ -6469,8 +7243,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", @@ -6693,8 +7466,7 @@ "x-nullable": true }, "buy": { - "description": "Details of the asset being bought", - "$ref": "#/definitions/Token" + "$ref": "#/definitions/orderBuy" }, "expiration_timestamp": { "description": "Expiration timestamp of this order", @@ -6713,8 +7485,7 @@ "type": "integer" }, "sell": { - "description": "Details of the asset being sold", - "$ref": "#/definitions/Token" + "$ref": "#/definitions/orderSell" }, "status": { "description": "Status of the order", @@ -6767,8 +7538,7 @@ "type": "string" }, "token": { - "description": "Details of the fee currency", - "$ref": "#/definitions/FeeToken" + "$ref": "#/definitions/orderFeeInfoToken" }, "type": { "description": "Fee type", @@ -6830,6 +7600,10 @@ "name": { "description": "The project name", "type": "string" + }, + "org_id": { + "description": "The organisation ID that the project belongs to", + "type": "string" } } }, @@ -6846,6 +7620,38 @@ } } }, + "RegisterPassportUserRequest": { + "type": "object", + "required": [ + "eth_signature", + "ether_key", + "stark_key", + "stark_signature", + "user_id" + ], + "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" + }, + "user_id": { + "description": "The auth0 user id", + "type": "string" + } + } + }, "RegisterUserRequest": { "type": "object", "required": [ @@ -6919,8 +7725,7 @@ "type": "string" }, "token": { - "description": "Token to transfer", - "$ref": "#/definitions/SignableToken" + "$ref": "#/definitions/signableTransferDetailsToken" } } }, @@ -6932,10 +7737,12 @@ "expiration_timestamp", "nonce", "payload_hash", + "readable_transaction", "receiver_stark_key", "receiver_vault_id", "sender_vault_id", - "token" + "token", + "verification_signature" ], "properties": { "amount": { @@ -6958,6 +7765,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" @@ -6971,8 +7782,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" } } }, @@ -6995,8 +7809,7 @@ ], "properties": { "data": { - "description": "Token details of this asset", - "$ref": "#/definitions/TokenData" + "$ref": "#/definitions/tokenDataOAIGen" }, "type": { "description": "Type of this asset (ETH/ERC20/ERC721)", @@ -7020,8 +7833,7 @@ "type": "string" }, "properties": { - "description": "Properties of this asset", - "$ref": "#/definitions/AssetProperties" + "$ref": "#/definitions/tokenDataProperties" }, "quantity": { "description": "Quantity of this asset - inclusive of fees for buy order in v1 API and exclusive of fees in v3 API", @@ -7093,12 +7905,10 @@ ], "properties": { "a": { - "description": "Side A of this trade (the buy order)", - "$ref": "#/definitions/TradeSide" + "$ref": "#/definitions/tradeA" }, "b": { - "description": "Side B of this trade (the sell order)", - "$ref": "#/definitions/TradeSide" + "$ref": "#/definitions/tradeB" }, "status": { "description": "Status of this trade", @@ -7170,8 +7980,7 @@ "x-nullable": true }, "token": { - "description": "Token transferred by the user", - "$ref": "#/definitions/Token" + "$ref": "#/definitions/transferToken" }, "transaction_id": { "description": "Sequential transaction ID", @@ -7296,44 +8105,242 @@ "description": "Status of the on-chain batch confirmation for this withdrawal", "type": "string" }, - "sender": { - "description": "Ethereum address of the user who requested this withdrawal", + "sender": { + "description": "Ethereum address of the user who requested this withdrawal", + "type": "string" + }, + "status": { + "description": "Status of this withdrawal", + "type": "string" + }, + "timestamp": { + "description": "Time when this withdrawal was initiated", + "type": "string" + }, + "token": { + "$ref": "#/definitions/withdrawalToken" + }, + "transaction_id": { + "description": "Sequential ID of this transaction", + "type": "integer" + }, + "withdrawn_to_wallet": { + "description": "Withdrawal has been transferred to user's Layer 1 wallet", + "type": "boolean" + } + } + }, + "aggregate.Limit": { + "type": "object", + "properties": { + "max_amount": { + "description": "Max transaction amount", + "type": "number" + }, + "min_amount": { + "description": "Min transaction amount", + "type": "number" + } + } + }, + "api.OrderV3": { + "type": "object", + "required": [ + "amount_sold", + "buy", + "expiration_timestamp", + "order_id", + "sell", + "status", + "timestamp", + "updated_timestamp", + "user" + ], + "properties": { + "amount_sold": { + "description": "Amount of the asset already sold by this order", + "type": "string", + "x-nullable": true + }, + "buy": { + "$ref": "#/definitions/apiOrderV3Buy" + }, + "expiration_timestamp": { + "description": "Expiration timestamp of this order", + "type": "string", + "x-nullable": true + }, + "fees": { + "description": "Fee information for the order", + "type": "array", + "items": { + "$ref": "#/definitions/OrderFeeInfo" + } + }, + "maker_fees": { + "$ref": "#/definitions/apiOrderV3MakerFees" + }, + "maker_taker_type": { + "description": "MakerTakerType", + "type": "string" + }, + "order_id": { + "description": "ID of the order", + "type": "integer" + }, + "sell": { + "$ref": "#/definitions/apiOrderV3Sell" + }, + "status": { + "description": "Status of the order", + "type": "string" + }, + "taker_fees": { + "$ref": "#/definitions/apiOrderV3TakerFees" + }, + "timestamp": { + "description": "Timestamp this order was created", + "type": "string", + "x-nullable": true + }, + "updated_timestamp": { + "description": "Updated timestamp of this order", + "type": "string", + "x-nullable": true + }, + "user": { + "description": "Ethereum address of the user who submitted the order", + "type": "string" + } + } + }, + "apiOrderV3Buy": { + "description": "Details of the asset being bought", + "allOf": [ + { + "$ref": "#/definitions/Token" + } + ], + "x-go-gen-location": "models" + }, + "apiOrderV3MakerFees": { + "description": "MakerFees is the information about the fees that needs to be paid by the maker (liquidity)", + "allOf": [ + { + "$ref": "#/definitions/store.MakerTakerFee" + } + ], + "x-go-gen-location": "models" + }, + "apiOrderV3Sell": { + "description": "Details of the asset being sold", + "allOf": [ + { + "$ref": "#/definitions/Token" + } + ], + "x-go-gen-location": "models" + }, + "apiOrderV3TakerFees": { + "description": "TakerFees is the information about the fees that needs to be paid by the taker (liquidity)", + "allOf": [ + { + "$ref": "#/definitions/store.MakerTakerFee" + } + ], + "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" }, - "status": { - "description": "Status of this withdrawal", + "createdAt": { "type": "string" }, - "timestamp": { - "description": "Time when this withdrawal was initiated", + "description": { "type": "string" }, - "token": { - "description": "Details of the asset this user is withdrawing", - "$ref": "#/definitions/Token" + "iconURL": { + "type": "string" }, - "transaction_id": { - "description": "Sequential ID of this transaction", + "lastCollectionEventID": { + "type": "string" + }, + "metadataAPIURL": { + "type": "string" + }, + "name": { + "type": "string" + }, + "projectID": { "type": "integer" }, - "withdrawn_to_wallet": { - "description": "Withdrawal has been transferred to user's Layer 1 wallet", - "type": "boolean" + "projectOwnerAddress": { + "type": "string" + }, + "updatedAt": { + "type": "string" } } }, - "aggregate.Limit": { - "type": "object", - "properties": { - "max_amount": { - "description": "Max transaction amount", - "type": "number" - }, - "min_amount": { - "description": "Min transaction amount", - "type": "number" + "collectionFilterRange": { + "description": "Range of values for this property", + "allOf": [ + { + "$ref": "#/definitions/Range" } - } + ], + "x-go-gen-location": "models" }, "contract.CreateAPIRequest": { "type": "object", @@ -7357,12 +8364,29 @@ } } }, + "createTradeRequestV1FeeInfo": { + "description": "Fee details", + "allOf": [ + { + "$ref": "#/definitions/FeeInfo" + } + ], + "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", @@ -7376,6 +8400,15 @@ }, "x-go-gen-location": "models" }, + "encodeAssetRequestTokenData": { + "description": "Extra token information to be encoded", + "allOf": [ + { + "$ref": "#/definitions/EncodeAssetTokenData" + } + ], + "x-go-gen-location": "models" + }, "exchange.CreateExchangeAndURLResponse": { "type": "object", "properties": { @@ -7403,6 +8436,87 @@ } } }, + "feeTokenData": { + "description": "Fee token data details", + "allOf": [ + { + "$ref": "#/definitions/FeeData" + } + ], + "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": [ + { + "$ref": "#/definitions/SignableToken" + } + ], + "x-go-gen-location": "models" + }, + "getSignableOrderRequestTokenSell": { + "description": "Token to sell", + "allOf": [ + { + "$ref": "#/definitions/SignableToken" + } + ], + "x-go-gen-location": "models" + }, + "getSignableOrderResponseFeeInfo": { + "description": "Fee information", + "allOf": [ + { + "$ref": "#/definitions/FeeInfo" + } + ], + "x-go-gen-location": "models" + }, + "getSignableTradeResponseFeeInfo": { + "description": "Fee information", + "allOf": [ + { + "$ref": "#/definitions/FeeInfo" + } + ], + "x-go-gen-location": "models" + }, + "getSignableTradeResponseResult": { + "description": "Signable trade result", + "allOf": [ + { + "$ref": "#/definitions/GetSignableTradeResult" + } + ], + "x-go-gen-location": "models" + }, + "getSignableTradeResultFeeInfo": { + "description": "Fee details", + "allOf": [ + { + "$ref": "#/definitions/FeeInfo" + } + ], + "x-go-gen-location": "models" + }, + "getSignableWithdrawalRequestToken": { + "description": "Token to withdraw", + "allOf": [ + { + "$ref": "#/definitions/SignableToken" + } + ], + "x-go-gen-location": "models" + }, "lambdas.APIError": { "type": "object", "properties": { @@ -7424,6 +8538,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": { @@ -7630,6 +8753,209 @@ "example": "light" } } + }, + "orderBuy": { + "description": "Details of the asset being bought", + "allOf": [ + { + "$ref": "#/definitions/Token" + } + ], + "x-go-gen-location": "models" + }, + "orderFeeInfoToken": { + "description": "Details of the fee currency", + "allOf": [ + { + "$ref": "#/definitions/FeeToken" + } + ], + "x-go-gen-location": "models" + }, + "orderSell": { + "description": "Details of the asset being sold", + "allOf": [ + { + "$ref": "#/definitions/Token" + } + ], + "x-go-gen-location": "models" + }, + "signableTransferDetailsToken": { + "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": [ + "quantity_with_fees" + ], + "properties": { + "fees": { + "description": "Fees", + "type": "array", + "items": { + "$ref": "#/definitions/OrderFeeInfo" + } + }, + "quantity_with_fees": { + "description": "Quantity of this asset with the sum of all fees applied to the asset", + "type": "string" + } + } + }, + "tokenDataOAIGen": { + "description": "Token details of this asset", + "allOf": [ + { + "$ref": "#/definitions/TokenData" + } + ], + "x-go-gen-location": "models" + }, + "tokenDataProperties": { + "description": "Properties of this asset", + "allOf": [ + { + "$ref": "#/definitions/AssetProperties" + } + ], + "x-go-gen-location": "models" + }, + "tradeA": { + "description": "Side A of this trade (the buy order)", + "allOf": [ + { + "$ref": "#/definitions/TradeSide" + } + ], + "x-go-gen-location": "models" + }, + "tradeB": { + "description": "Side B of this trade (the sell order)", + "allOf": [ + { + "$ref": "#/definitions/TradeSide" + } + ], + "x-go-gen-location": "models" + }, + "trades.CreateTradeRequest": { + "type": "object", + "required": [ + "amount_buy", + "amount_sell", + "asset_id_buy", + "asset_id_sell", + "expiration_timestamp", + "nonce", + "order_id", + "stark_key", + "stark_signature", + "vault_id_buy", + "vault_id_sell" + ], + "properties": { + "amount_buy": { + "description": "Amount to buy", + "type": "string" + }, + "amount_sell": { + "description": "Amount to sell", + "type": "string" + }, + "asset_id_buy": { + "description": "ID of the asset to buy", + "type": "string" + }, + "asset_id_sell": { + "description": "ID of the asset to sell", + "type": "string" + }, + "expiration_timestamp": { + "description": "Expiration timestamp for this trade", + "type": "integer" + }, + "fee_info": { + "$ref": "#/definitions/tradesCreateTradeRequestFeeInfo" + }, + "fees": { + "description": "Fee information", + "type": "array", + "items": { + "$ref": "#/definitions/FeeEntry" + } + }, + "include_fees": { + "description": "[deprecated] All orders include fees since the introduction of protocol fees", + "type": "boolean" + }, + "nonce": { + "description": "Nonce of the trade", + "type": "integer" + }, + "order_id": { + "description": "ID of the order", + "type": "integer" + }, + "stark_key": { + "description": "Public stark key of the user creating trade", + "type": "string" + }, + "stark_signature": { + "description": "Payload signature", + "type": "string" + }, + "vault_id_buy": { + "description": "ID of the vault into which the traded asset will be placed", + "type": "integer" + }, + "vault_id_sell": { + "description": "ID of the vault to sell from", + "type": "integer" + } + } + }, + "tradesCreateTradeRequestFeeInfo": { + "description": "Fee details", + "allOf": [ + { + "$ref": "#/definitions/FeeInfo" + } + ], + "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/api/.openapi-generator/FILES b/src/api/.openapi-generator/FILES index ac235193..0184d232 100644 --- a/src/api/.openapi-generator/FILES +++ b/src/api/.openapi-generator/FILES @@ -26,14 +26,26 @@ git_push.sh index.ts models/add-metadata-schema-to-collection-request.ts models/aggregate-limit.ts +models/api-order-v3-buy.ts +models/api-order-v3-maker-fees.ts +models/api-order-v3-sell.ts +models/api-order-v3-taker-fees.ts +models/api-order-v3.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 @@ -46,6 +58,7 @@ models/create-order-request.ts models/create-order-response.ts models/create-project-request.ts models/create-project-response.ts +models/create-trade-request-v1-fee-info.ts models/create-trade-request-v1.ts models/create-trade-response.ts models/create-transfer-request-v1.ts @@ -55,7 +68,9 @@ 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 @@ -65,6 +80,7 @@ models/exchange.ts models/fee-data.ts models/fee-entry.ts models/fee-info.ts +models/fee-token-data.ts models/fee-token.ts models/fee.ts models/get-metadata-refresh-errors-response.ts @@ -73,19 +89,28 @@ 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 +models/get-signable-order-request-token-sell.ts models/get-signable-order-request.ts +models/get-signable-order-response-fee-info.ts models/get-signable-order-response.ts models/get-signable-registration-offchain-response.ts models/get-signable-registration-request.ts models/get-signable-registration-response.ts models/get-signable-trade-request.ts +models/get-signable-trade-response-fee-info.ts +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-v1.ts models/get-signable-transfer-request.ts models/get-signable-transfer-response-v1.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 @@ -111,6 +136,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 @@ -122,24 +148,39 @@ models/nftprimarytransaction-list-transactions-response.ts models/nftprimarytransaction-transaction-data.ts models/nftprimarytransaction-widget-params.ts models/optional-exchange-data.ts +models/order-buy.ts models/order-details.ts +models/order-fee-info-token.ts models/order-fee-info.ts +models/order-sell.ts models/order.ts models/project.ts models/range.ts +models/register-passport-user-request.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.ts +models/signable-transfer-response-details-token.ts models/signable-transfer-response-details.ts +models/store-maker-taker-fee.ts models/success-response.ts +models/token-data-oaigen.ts +models/token-data-properties.ts models/token-data.ts models/token-details.ts models/token.ts +models/trade-a.ts +models/trade-b.ts models/trade-side.ts 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 b67eef73..8784472c 100644 --- a/src/api/domain/orders-api.ts +++ b/src/api/domain/orders-api.ts @@ -23,6 +23,8 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr // @ts-ignore import { APIError } from '../models'; // @ts-ignore +import { ApiOrderV3 } from '../models'; +// @ts-ignore import { CancelOrderRequest } from '../models'; // @ts-ignore import { CancelOrderResponse } from '../models'; @@ -90,6 +92,60 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio + 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) + * @param {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {string} id Order ID to cancel + * @param {CancelOrderRequest} cancelOrderRequest cancel an order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelOrderV3: async (xImxEthAddress: string, xImxEthSignature: string, id: string, cancelOrderRequest: CancelOrderRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'xImxEthAddress' is not null or undefined + assertParamExists('cancelOrderV3', 'xImxEthAddress', xImxEthAddress) + // verify required parameter 'xImxEthSignature' is not null or undefined + assertParamExists('cancelOrderV3', 'xImxEthSignature', xImxEthSignature) + // verify required parameter 'id' is not null or undefined + assertParamExists('cancelOrderV3', 'id', id) + // verify required parameter 'cancelOrderRequest' is not null or undefined + assertParamExists('cancelOrderV3', 'cancelOrderRequest', cancelOrderRequest) + const localVarPath = `/v3/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); + } + + + localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -153,8 +209,58 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * Get details of an order with the given ID - * @summary Get details of an order with the given ID + * Create an order using the v3 orderbook. Currently only buy NFT orders are supported. + * @summary Create an order (V3) + * @param {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {CreateOrderRequest} createOrderRequest create an order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createOrderV3: async (xImxEthAddress: string, xImxEthSignature: string, createOrderRequest: CreateOrderRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'xImxEthAddress' is not null or undefined + assertParamExists('createOrderV3', 'xImxEthAddress', xImxEthAddress) + // verify required parameter 'xImxEthSignature' is not null or undefined + assertParamExists('createOrderV3', 'xImxEthSignature', xImxEthSignature) + // verify required parameter 'createOrderRequest' is not null or undefined + assertParamExists('createOrderV3', 'createOrderRequest', createOrderRequest) + 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: '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); + } + + + + 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, + }; + }, + /** + * Get an order + * @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 @@ -202,8 +308,57 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * Get details a signable cancel order - * @summary Get details a signable cancel order + * 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} + */ + getOrderV3: async (id: string, includeFees?: boolean, auxiliaryFeePercentages?: string, auxiliaryFeeRecipients?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOrderV3', 'id', id) + const localVarPath = `/v3/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 a signable cancel order message + * @summary Get a signable cancel order message * @param {GetSignableCancelOrderRequest} getSignableCancelOrderRequest get a signable cancel order * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -225,6 +380,42 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio + 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, + }; + }, + /** + * Get a signable cancel order message (V3) + * @summary Get a signable cancel order message (V3) + * @param {GetSignableCancelOrderRequest} getSignableCancelOrderRequest get a signable cancel order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSignableCancelOrderV3: async (getSignableCancelOrderRequest: GetSignableCancelOrderRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'getSignableCancelOrderRequest' is not null or undefined + assertParamExists('getSignableCancelOrderV3', 'getSignableCancelOrderRequest', getSignableCancelOrderRequest) + const localVarPath = `/v3/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); @@ -282,10 +473,10 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio * @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] Minimum created at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [maxTimestamp] Maximum created at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMinTimestamp] Minimum updated at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMaxTimestamp] Maximum updated at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * @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 @@ -448,92 +639,19 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio options: localVarRequestOptions, }; }, - } -}; - -/** - * OrdersApi - functional programming interface - * @export - */ -export const OrdersApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = OrdersApiAxiosParamCreator(configuration) - return { - /** - * Cancel an order - * @summary Cancel an order - * @param {string} xImxEthAddress eth address - * @param {string} xImxEthSignature eth signature - * @param {string} id Order ID to cancel - * @param {CancelOrderRequest} cancelOrderRequest cancel an order - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async cancelOrder(xImxEthAddress: string, xImxEthSignature: string, id: string, cancelOrderRequest: CancelOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.cancelOrder(xImxEthAddress, xImxEthSignature, id, cancelOrderRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Create an order - * @summary Create an order - * @param {string} xImxEthAddress eth address - * @param {string} xImxEthSignature eth signature - * @param {CreateOrderRequest} createOrderRequest create an order - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async createOrder(xImxEthAddress: string, xImxEthSignature: string, createOrderRequest: CreateOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createOrder(xImxEthAddress, xImxEthSignature, createOrderRequest, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Get details of an order with the given ID - * @summary Get details of an order with the given ID - * @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 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 details a signable cancel order - * @summary Get details a signable cancel order - * @param {GetSignableCancelOrderRequest} getSignableCancelOrderRequest get a signable cancel order - * @param {*} [options] Override http request option. - * @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); - }, - /** - * Get a signable order request (V3) - * @summary Get a signable order request (V3) - * @param {GetSignableOrderRequest} getSignableOrderRequestV3 get a signable order - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSignableOrder(getSignableOrderRequestV3: GetSignableOrderRequest, 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 - * @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 * @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] Minimum created at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [maxTimestamp] Maximum created at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMinTimestamp] Minimum updated at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMaxTimestamp] Maximum updated at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * @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 @@ -556,21 +674,360 @@ export const OrdersApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @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); - }, - } -}; + 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; + } -/** - * OrdersApi - factory interface - * @export - */ -export const OrdersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = OrdersApiFp(configuration) - return { - /** + 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 + * @summary Cancel an order + * @param {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {string} id Order ID to cancel + * @param {CancelOrderRequest} cancelOrderRequest cancel an order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelOrder(xImxEthAddress: string, xImxEthSignature: string, id: string, cancelOrderRequest: CancelOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelOrder(xImxEthAddress, xImxEthSignature, id, cancelOrderRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Cancel an order (V3) + * @summary Cancel an order (V3) + * @param {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {string} id Order ID to cancel + * @param {CancelOrderRequest} cancelOrderRequest cancel an order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelOrderV3(xImxEthAddress: string, xImxEthSignature: string, id: string, cancelOrderRequest: CancelOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelOrderV3(xImxEthAddress, xImxEthSignature, id, cancelOrderRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Create an order + * @summary Create an order + * @param {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {CreateOrderRequest} createOrderRequest create an order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createOrder(xImxEthAddress: string, xImxEthSignature: string, createOrderRequest: CreateOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOrder(xImxEthAddress, xImxEthSignature, createOrderRequest, 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 {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {CreateOrderRequest} createOrderRequest create an order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createOrderV3(xImxEthAddress: string, xImxEthSignature: string, createOrderRequest: CreateOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOrderV3(xImxEthAddress, xImxEthSignature, createOrderRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get an order + * @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. + * @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); + }, + /** + * Get a signable cancel order message + * @summary Get a signable cancel order message + * @param {GetSignableCancelOrderRequest} getSignableCancelOrderRequest get a signable cancel order + * @param {*} [options] Override http request option. + * @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); + }, + /** + * Get a signable cancel order message (V3) + * @summary Get 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); + }, + /** + * Get a signable order request (V3) + * @summary Get a signable order request (V3) + * @param {GetSignableOrderRequest} getSignableOrderRequestV3 get a signable order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSignableOrder(getSignableOrderRequestV3: GetSignableOrderRequest, 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 + * @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. + * @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); + }, + /** + * 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} + */ + async listOrdersV3(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.listOrdersV3(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 - factory interface + * @export + */ +export const OrdersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = OrdersApiFp(configuration) + return { + /** * Cancel an order * @summary Cancel an order * @param {string} xImxEthAddress eth address @@ -583,6 +1040,19 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat cancelOrder(xImxEthAddress: string, xImxEthSignature: string, id: string, cancelOrderRequest: CancelOrderRequest, options?: any): AxiosPromise { return localVarFp.cancelOrder(xImxEthAddress, xImxEthSignature, id, cancelOrderRequest, options).then((request) => request(axios, basePath)); }, + /** + * Cancel an order (V3) + * @summary Cancel an order (V3) + * @param {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {string} id Order ID to cancel + * @param {CancelOrderRequest} cancelOrderRequest cancel an order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelOrderV3(xImxEthAddress: string, xImxEthSignature: string, id: string, cancelOrderRequest: CancelOrderRequest, options?: any): AxiosPromise { + return localVarFp.cancelOrderV3(xImxEthAddress, xImxEthSignature, id, cancelOrderRequest, options).then((request) => request(axios, basePath)); + }, /** * Create an order * @summary Create an order @@ -596,8 +1066,20 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat return localVarFp.createOrder(xImxEthAddress, xImxEthSignature, createOrderRequest, options).then((request) => request(axios, basePath)); }, /** - * Get details of an order with the given ID - * @summary Get details of an order with the given ID + * Create an order using the v3 orderbook. Currently only buy NFT orders are supported. + * @summary Create an order (V3) + * @param {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {CreateOrderRequest} createOrderRequest create an order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createOrderV3(xImxEthAddress: string, xImxEthSignature: string, createOrderRequest: CreateOrderRequest, options?: any): AxiosPromise { + return localVarFp.createOrderV3(xImxEthAddress, xImxEthSignature, createOrderRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Get an order + * @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 @@ -609,8 +1091,21 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat return localVarFp.getOrder(id, includeFees, auxiliaryFeePercentages, auxiliaryFeeRecipients, options).then((request) => request(axios, basePath)); }, /** - * Get details a signable cancel order - * @summary Get details a signable cancel order + * 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} + */ + 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)); + }, + /** + * Get a signable cancel order message + * @summary Get a signable cancel order message * @param {GetSignableCancelOrderRequest} getSignableCancelOrderRequest get a signable cancel order * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -618,6 +1113,16 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat getSignableCancelOrder(getSignableCancelOrderRequest: GetSignableCancelOrderRequest, options?: any): AxiosPromise { return localVarFp.getSignableCancelOrder(getSignableCancelOrderRequest, options).then((request) => request(axios, basePath)); }, + /** + * Get a signable cancel order message (V3) + * @summary Get a signable cancel order message (V3) + * @param {GetSignableCancelOrderRequest} getSignableCancelOrderRequest get a signable cancel order + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSignableCancelOrderV3(getSignableCancelOrderRequest: GetSignableCancelOrderRequest, options?: any): AxiosPromise { + return localVarFp.getSignableCancelOrderV3(getSignableCancelOrderRequest, options).then((request) => request(axios, basePath)); + }, /** * Get a signable order request (V3) * @summary Get a signable order request (V3) @@ -637,10 +1142,10 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat * @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] Minimum created at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [maxTimestamp] Maximum created at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMinTimestamp] Minimum updated at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' - * @param {string} [updatedMaxTimestamp] Maximum updated at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * @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 @@ -666,6 +1171,44 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat 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) + * @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(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.listOrdersV3(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)); + }, }; }; @@ -701,33 +1244,96 @@ export interface OrdersApiCancelOrderRequest { * @type {CancelOrderRequest} * @memberof OrdersApiCancelOrder */ - readonly cancelOrderRequest: CancelOrderRequest + readonly cancelOrderRequest: CancelOrderRequest +} + +/** + * Request parameters for cancelOrderV3 operation in OrdersApi. + * @export + * @interface OrdersApiCancelOrderV3Request + */ +export interface OrdersApiCancelOrderV3Request { + /** + * eth address + * @type {string} + * @memberof OrdersApiCancelOrderV3 + */ + readonly xImxEthAddress: string + + /** + * eth signature + * @type {string} + * @memberof OrdersApiCancelOrderV3 + */ + readonly xImxEthSignature: string + + /** + * Order ID to cancel + * @type {string} + * @memberof OrdersApiCancelOrderV3 + */ + readonly id: string + + /** + * cancel an order + * @type {CancelOrderRequest} + * @memberof OrdersApiCancelOrderV3 + */ + readonly cancelOrderRequest: CancelOrderRequest +} + +/** + * Request parameters for createOrder operation in OrdersApi. + * @export + * @interface OrdersApiCreateOrderRequest + */ +export interface OrdersApiCreateOrderRequest { + /** + * eth address + * @type {string} + * @memberof OrdersApiCreateOrder + */ + readonly xImxEthAddress: string + + /** + * eth signature + * @type {string} + * @memberof OrdersApiCreateOrder + */ + readonly xImxEthSignature: string + + /** + * create an order + * @type {CreateOrderRequest} + * @memberof OrdersApiCreateOrder + */ + readonly createOrderRequest: CreateOrderRequest } /** - * Request parameters for createOrder operation in OrdersApi. + * Request parameters for createOrderV3 operation in OrdersApi. * @export - * @interface OrdersApiCreateOrderRequest + * @interface OrdersApiCreateOrderV3Request */ -export interface OrdersApiCreateOrderRequest { +export interface OrdersApiCreateOrderV3Request { /** * eth address * @type {string} - * @memberof OrdersApiCreateOrder + * @memberof OrdersApiCreateOrderV3 */ readonly xImxEthAddress: string /** * eth signature * @type {string} - * @memberof OrdersApiCreateOrder + * @memberof OrdersApiCreateOrderV3 */ readonly xImxEthSignature: string /** * create an order * @type {CreateOrderRequest} - * @memberof OrdersApiCreateOrder + * @memberof OrdersApiCreateOrderV3 */ readonly createOrderRequest: CreateOrderRequest } @@ -767,6 +1373,41 @@ export interface OrdersApiGetOrderRequest { readonly auxiliaryFeeRecipients?: string } +/** + * Request parameters for getOrderV3 operation in OrdersApi. + * @export + * @interface OrdersApiGetOrderV3Request + */ +export interface OrdersApiGetOrderV3Request { + /** + * Order ID + * @type {string} + * @memberof OrdersApiGetOrderV3 + */ + readonly id: string + + /** + * Set flag to true to include fee body for the order + * @type {boolean} + * @memberof OrdersApiGetOrderV3 + */ + readonly includeFees?: boolean + + /** + * Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients + * @type {string} + * @memberof OrdersApiGetOrderV3 + */ + readonly auxiliaryFeePercentages?: string + + /** + * Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages + * @type {string} + * @memberof OrdersApiGetOrderV3 + */ + readonly auxiliaryFeeRecipients?: string +} + /** * Request parameters for getSignableCancelOrder operation in OrdersApi. * @export @@ -781,6 +1422,20 @@ export interface OrdersApiGetSignableCancelOrderRequest { readonly getSignableCancelOrderRequest: GetSignableCancelOrderRequest } +/** + * Request parameters for getSignableCancelOrderV3 operation in OrdersApi. + * @export + * @interface OrdersApiGetSignableCancelOrderV3Request + */ +export interface OrdersApiGetSignableCancelOrderV3Request { + /** + * get a signable cancel order + * @type {GetSignableCancelOrderRequest} + * @memberof OrdersApiGetSignableCancelOrderV3 + */ + readonly getSignableCancelOrderRequest: GetSignableCancelOrderRequest +} + /** * Request parameters for getSignableOrder operation in OrdersApi. * @export @@ -844,28 +1499,28 @@ export interface OrdersApiListOrdersRequest { readonly status?: 'active' | 'filled' | 'cancelled' | 'expired' | 'inactive' /** - * Minimum created at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * 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 /** - * Maximum created at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * 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 /** - * Minimum updated at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * 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 /** - * Maximum updated at timestamp for this order, in ISO 8601 UTC format. Example: \'2022-05-27T00:10:22Z\' + * 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 */ @@ -1005,6 +1660,216 @@ export interface OrdersApiListOrdersRequest { readonly includeFees?: boolean } +/** + * Request parameters for listOrdersV3 operation in OrdersApi. + * @export + * @interface OrdersApiListOrdersV3Request + */ +export interface OrdersApiListOrdersV3Request { + /** + * Page size of the result + * @type {number} + * @memberof OrdersApiListOrdersV3 + */ + readonly pageSize?: number + + /** + * Cursor + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly cursor?: string + + /** + * Property to sort by + * @type {'created_at' | 'expired_at' | 'sell_quantity' | 'buy_quantity' | 'buy_quantity_with_fees' | 'updated_at'} + * @memberof OrdersApiListOrdersV3 + */ + readonly orderBy?: 'created_at' | 'expired_at' | 'sell_quantity' | 'buy_quantity' | 'buy_quantity_with_fees' | 'updated_at' + + /** + * Direction to sort (asc/desc) + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly direction?: string + + /** + * Ethereum address of the user who submitted this order + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly user?: string + + /** + * Status of this order + * @type {'active' | 'filled' | 'cancelled' | 'expired' | 'inactive'} + * @memberof OrdersApiListOrdersV3 + */ + 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 OrdersApiListOrdersV3 + */ + 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 OrdersApiListOrdersV3 + */ + 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 OrdersApiListOrdersV3 + */ + 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 OrdersApiListOrdersV3 + */ + readonly updatedMaxTimestamp?: string + + /** + * Token type of the asset this order buys + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly buyTokenType?: string + + /** + * ERC721 Token ID of the asset this order buys + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly buyTokenId?: string + + /** + * Internal IMX ID of the asset this order buys + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly buyAssetId?: string + + /** + * Token address of the asset this order buys + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly buyTokenAddress?: string + + /** + * Token name of the asset this order buys + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly buyTokenName?: string + + /** + * Min quantity for the asset this order buys + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly buyMinQuantity?: string + + /** + * Max quantity for the asset this order buys + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly buyMaxQuantity?: string + + /** + * JSON-encoded metadata filters for the asset this order buys + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly buyMetadata?: string + + /** + * Token type of the asset this order sells + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly sellTokenType?: string + + /** + * ERC721 Token ID of the asset this order sells + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly sellTokenId?: string + + /** + * Internal IMX ID of the asset this order sells + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly sellAssetId?: string + + /** + * Token address of the asset this order sells + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly sellTokenAddress?: string + + /** + * Token name of the asset this order sells + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly sellTokenName?: string + + /** + * Min quantity for the asset this order sells + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly sellMinQuantity?: string + + /** + * Max quantity for the asset this order sells + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly sellMaxQuantity?: string + + /** + * JSON-encoded metadata filters for the asset this order sells + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly sellMetadata?: string + + /** + * Comma separated string of fee percentages that are to be paired with auxiliary_fee_recipients + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly auxiliaryFeePercentages?: string + + /** + * Comma separated string of fee recipients that are to be paired with auxiliary_fee_percentages + * @type {string} + * @memberof OrdersApiListOrdersV3 + */ + readonly auxiliaryFeeRecipients?: string + + /** + * Set flag to true to include fee object for orders + * @type {boolean} + * @memberof OrdersApiListOrdersV3 + */ + readonly includeFees?: boolean +} + /** * OrdersApi - object-oriented interface * @export @@ -1024,6 +1889,18 @@ export class OrdersApi extends BaseAPI { return OrdersApiFp(this.configuration).cancelOrder(requestParameters.xImxEthAddress, requestParameters.xImxEthSignature, requestParameters.id, requestParameters.cancelOrderRequest, options).then((request) => request(this.axios, this.basePath)); } + /** + * Cancel an order (V3) + * @summary Cancel an order (V3) + * @param {OrdersApiCancelOrderV3Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersApi + */ + public cancelOrderV3(requestParameters: OrdersApiCancelOrderV3Request, options?: AxiosRequestConfig) { + return OrdersApiFp(this.configuration).cancelOrderV3(requestParameters.xImxEthAddress, requestParameters.xImxEthSignature, requestParameters.id, requestParameters.cancelOrderRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** * Create an order * @summary Create an order @@ -1037,8 +1914,20 @@ export class OrdersApi extends BaseAPI { } /** - * Get details of an order with the given ID - * @summary Get details of an order with the given ID + * Create an order using the v3 orderbook. Currently only buy NFT orders are supported. + * @summary Create an order (V3) + * @param {OrdersApiCreateOrderV3Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersApi + */ + public createOrderV3(requestParameters: OrdersApiCreateOrderV3Request, options?: AxiosRequestConfig) { + return OrdersApiFp(this.configuration).createOrderV3(requestParameters.xImxEthAddress, requestParameters.xImxEthSignature, requestParameters.createOrderRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get an order + * @summary Get an order * @param {OrdersApiGetOrderRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1049,8 +1938,20 @@ export class OrdersApi extends BaseAPI { } /** - * Get details a signable cancel order - * @summary Get details a signable cancel order + * Get an order (V3) + * @summary Get an order (V3) + * @param {OrdersApiGetOrderV3Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersApi + */ + public getOrderV3(requestParameters: OrdersApiGetOrderV3Request, options?: AxiosRequestConfig) { + return OrdersApiFp(this.configuration).getOrderV3(requestParameters.id, requestParameters.includeFees, requestParameters.auxiliaryFeePercentages, requestParameters.auxiliaryFeeRecipients, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a signable cancel order message + * @summary Get a signable cancel order message * @param {OrdersApiGetSignableCancelOrderRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1060,6 +1961,18 @@ export class OrdersApi extends BaseAPI { return OrdersApiFp(this.configuration).getSignableCancelOrder(requestParameters.getSignableCancelOrderRequest, options).then((request) => request(this.axios, this.basePath)); } + /** + * Get a signable cancel order message (V3) + * @summary Get a signable cancel order message (V3) + * @param {OrdersApiGetSignableCancelOrderV3Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersApi + */ + public getSignableCancelOrderV3(requestParameters: OrdersApiGetSignableCancelOrderV3Request, options?: AxiosRequestConfig) { + return OrdersApiFp(this.configuration).getSignableCancelOrderV3(requestParameters.getSignableCancelOrderRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** * Get a signable order request (V3) * @summary Get a signable order request (V3) @@ -1083,4 +1996,16 @@ export class OrdersApi extends BaseAPI { 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) + * @param {OrdersApiListOrdersV3Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrdersApi + */ + public listOrdersV3(requestParameters: OrdersApiListOrdersV3Request = {}, options?: AxiosRequestConfig) { + return OrdersApiFp(this.configuration).listOrdersV3(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)); + } } diff --git a/src/api/domain/trades-api.ts b/src/api/domain/trades-api.ts index 36be2605..e9efa6ed 100644 --- a/src/api/domain/trades-api.ts +++ b/src/api/domain/trades-api.ts @@ -21,6 +21,8 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore +import { APIError } from '../models'; +// @ts-ignore import { CreateTradeRequestV1 } from '../models'; // @ts-ignore import { CreateTradeResponse } from '../models'; @@ -32,6 +34,8 @@ import { GetSignableTradeResponse } from '../models'; import { ListTradesResponse } from '../models'; // @ts-ignore import { Trade } from '../models'; +// @ts-ignore +import { TradesCreateTradeRequest } from '../models'; /** * TradesApi - axios parameter creator * @export @@ -89,8 +93,58 @@ export const TradesApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * Get details a signable trade V3 - * @summary Get details a signable trade V3 + * Create a Trade. Currently only buy order is supported. + * @summary Create a Trade (V3) + * @param {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {TradesCreateTradeRequest} createTradeRequest create a trade + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createTradeV3: async (xImxEthAddress: string, xImxEthSignature: string, createTradeRequest: TradesCreateTradeRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'xImxEthAddress' is not null or undefined + assertParamExists('createTradeV3', 'xImxEthAddress', xImxEthAddress) + // verify required parameter 'xImxEthSignature' is not null or undefined + assertParamExists('createTradeV3', 'xImxEthSignature', xImxEthSignature) + // verify required parameter 'createTradeRequest' is not null or undefined + assertParamExists('createTradeV3', 'createTradeRequest', createTradeRequest) + const localVarPath = `/v3/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); + } + + + + 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, + }; + }, + /** + * Get a signable trade V3 message + * @summary Get a signable trade V3 message * @param {GetSignableTradeRequest} getSignableTradeRequest get a signable trade * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -234,6 +288,91 @@ 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 (V3) + * @summary Get a list of trades (V3) + * @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 {string} [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. + * @throws {RequiredError} + */ + listTradesV3: async (partyATokenType?: string, partyATokenAddress?: string, partyBTokenType?: string, partyBTokenAddress?: string, partyBTokenId?: string, pageSize?: number, cursor?: string, orderBy?: string, direction?: string, minTimestamp?: string, maxTimestamp?: string, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/v3/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}; @@ -267,8 +406,21 @@ export const TradesApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Get details a signable trade V3 - * @summary Get details a signable trade V3 + * Create a Trade. Currently only buy order is supported. + * @summary Create a Trade (V3) + * @param {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {TradesCreateTradeRequest} createTradeRequest create a trade + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createTradeV3(xImxEthAddress: string, xImxEthSignature: string, createTradeRequest: TradesCreateTradeRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTradeV3(xImxEthAddress, xImxEthSignature, createTradeRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Get a signable trade V3 message + * @summary Get a signable trade V3 message * @param {GetSignableTradeRequest} getSignableTradeRequest get a signable trade * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -309,6 +461,27 @@ export const TradesApiFp = function(configuration?: Configuration) { 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) + * @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 {string} [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. + * @throws {RequiredError} + */ + async listTradesV3(partyATokenType?: string, partyATokenAddress?: string, partyBTokenType?: string, partyBTokenAddress?: string, partyBTokenId?: string, pageSize?: number, cursor?: string, orderBy?: string, direction?: string, minTimestamp?: string, maxTimestamp?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTradesV3(partyATokenType, partyATokenAddress, partyBTokenType, partyBTokenAddress, partyBTokenId, pageSize, cursor, orderBy, direction, minTimestamp, maxTimestamp, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, } }; @@ -332,8 +505,20 @@ export const TradesApiFactory = function (configuration?: Configuration, basePat return localVarFp.createTrade(xImxEthAddress, xImxEthSignature, createTradeRequest, options).then((request) => request(axios, basePath)); }, /** - * Get details a signable trade V3 - * @summary Get details a signable trade V3 + * Create a Trade. Currently only buy order is supported. + * @summary Create a Trade (V3) + * @param {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {TradesCreateTradeRequest} createTradeRequest create a trade + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createTradeV3(xImxEthAddress: string, xImxEthSignature: string, createTradeRequest: TradesCreateTradeRequest, options?: any): AxiosPromise { + return localVarFp.createTradeV3(xImxEthAddress, xImxEthSignature, createTradeRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Get a signable trade V3 message + * @summary Get a signable trade V3 message * @param {GetSignableTradeRequest} getSignableTradeRequest get a signable trade * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -371,6 +556,26 @@ export const TradesApiFactory = function (configuration?: Configuration, basePat listTrades(partyATokenType?: string, partyATokenAddress?: string, partyBTokenType?: string, partyBTokenAddress?: string, partyBTokenId?: string, pageSize?: number, cursor?: string, orderBy?: string, 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) + * @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 {string} [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. + * @throws {RequiredError} + */ + listTradesV3(partyATokenType?: string, partyATokenAddress?: string, partyBTokenType?: string, partyBTokenAddress?: string, partyBTokenId?: string, pageSize?: number, cursor?: string, orderBy?: string, direction?: string, minTimestamp?: string, maxTimestamp?: string, options?: any): AxiosPromise { + return localVarFp.listTradesV3(partyATokenType, partyATokenAddress, partyBTokenType, partyBTokenAddress, partyBTokenId, pageSize, cursor, orderBy, direction, minTimestamp, maxTimestamp, options).then((request) => request(axios, basePath)); + }, }; }; @@ -402,6 +607,34 @@ export interface TradesApiCreateTradeRequest { readonly createTradeRequest: CreateTradeRequestV1 } +/** + * Request parameters for createTradeV3 operation in TradesApi. + * @export + * @interface TradesApiCreateTradeV3Request + */ +export interface TradesApiCreateTradeV3Request { + /** + * eth address + * @type {string} + * @memberof TradesApiCreateTradeV3 + */ + readonly xImxEthAddress: string + + /** + * eth signature + * @type {string} + * @memberof TradesApiCreateTradeV3 + */ + readonly xImxEthSignature: string + + /** + * create a trade + * @type {TradesCreateTradeRequest} + * @memberof TradesApiCreateTradeV3 + */ + readonly createTradeRequest: TradesCreateTradeRequest +} + /** * Request parameters for getSignableTrade operation in TradesApi. * @export @@ -514,6 +747,90 @@ export interface TradesApiListTradesRequest { readonly maxTimestamp?: string } +/** + * Request parameters for listTradesV3 operation in TradesApi. + * @export + * @interface TradesApiListTradesV3Request + */ +export interface TradesApiListTradesV3Request { + /** + * Party A\'s (buy order) token type of currency used to buy + * @type {string} + * @memberof TradesApiListTradesV3 + */ + readonly partyATokenType?: string + + /** + * Party A\'s (buy order) token address of currency used to buy + * @type {string} + * @memberof TradesApiListTradesV3 + */ + readonly partyATokenAddress?: string + + /** + * Party B\'s (sell order) token type of NFT sold - always ERC721 + * @type {string} + * @memberof TradesApiListTradesV3 + */ + readonly partyBTokenType?: string + + /** + * Party B\'s (sell order) collection address of NFT sold + * @type {string} + * @memberof TradesApiListTradesV3 + */ + readonly partyBTokenAddress?: string + + /** + * Party B\'s (sell order) token id of NFT sold + * @type {string} + * @memberof TradesApiListTradesV3 + */ + readonly partyBTokenId?: string + + /** + * Page size of the result + * @type {number} + * @memberof TradesApiListTradesV3 + */ + readonly pageSize?: number + + /** + * Cursor + * @type {string} + * @memberof TradesApiListTradesV3 + */ + readonly cursor?: string + + /** + * Property to sort by + * @type {string} + * @memberof TradesApiListTradesV3 + */ + readonly orderBy?: string + + /** + * Direction to sort (asc/desc) + * @type {string} + * @memberof TradesApiListTradesV3 + */ + readonly direction?: string + + /** + * Minimum timestamp for this trade, in ISO 8601 UTC format. Example: \'2022-05-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\' + * @type {string} + * @memberof TradesApiListTradesV3 + */ + readonly maxTimestamp?: string +} + /** * TradesApi - object-oriented interface * @export @@ -534,8 +851,20 @@ export class TradesApi extends BaseAPI { } /** - * Get details a signable trade V3 - * @summary Get details a signable trade V3 + * Create a Trade. Currently only buy order is supported. + * @summary Create a Trade (V3) + * @param {TradesApiCreateTradeV3Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TradesApi + */ + public createTradeV3(requestParameters: TradesApiCreateTradeV3Request, options?: AxiosRequestConfig) { + return TradesApiFp(this.configuration).createTradeV3(requestParameters.xImxEthAddress, requestParameters.xImxEthSignature, requestParameters.createTradeRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get a signable trade V3 message + * @summary Get a signable trade V3 message * @param {TradesApiGetSignableTradeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -568,4 +897,16 @@ export class TradesApi extends BaseAPI { 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) + * @param {TradesApiListTradesV3Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TradesApi + */ + public listTradesV3(requestParameters: TradesApiListTradesV3Request = {}, options?: AxiosRequestConfig) { + return TradesApiFp(this.configuration).listTradesV3(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)); + } } diff --git a/src/api/domain/transfers-api.ts b/src/api/domain/transfers-api.ts index 888ce48e..4c8da53e 100644 --- a/src/api/domain/transfers-api.ts +++ b/src/api/domain/transfers-api.ts @@ -29,16 +29,10 @@ import { CreateTransferRequestV1 } from '../models'; // @ts-ignore import { CreateTransferResponse } from '../models'; // @ts-ignore -import { CreateTransferResponseV1 } from '../models'; -// @ts-ignore import { GetSignableTransferRequest } from '../models'; // @ts-ignore -import { GetSignableTransferRequestV1 } from '../models'; -// @ts-ignore import { GetSignableTransferResponse } from '../models'; // @ts-ignore -import { GetSignableTransferResponseV1 } from '../models'; -// @ts-ignore import { ListTransfersResponse } from '../models'; // @ts-ignore import { Transfer } from '../models'; @@ -101,17 +95,14 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura /** * Create a new transfer request * @summary Creates a transfer of tokens between two parties - * @param {string} xImxEthAddress eth address - * @param {string} xImxEthSignature eth signature * @param {CreateTransferRequestV1} createTransferRequest Create transfer + * @param {string} [xImxEthAddress] eth address + * @param {string} [xImxEthSignature] eth signature + * @param {string} [authorization] Authorization header * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTransferV1: async (xImxEthAddress: string, xImxEthSignature: string, createTransferRequest: CreateTransferRequestV1, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'xImxEthAddress' is not null or undefined - assertParamExists('createTransferV1', 'xImxEthAddress', xImxEthAddress) - // verify required parameter 'xImxEthSignature' is not null or undefined - assertParamExists('createTransferV1', 'xImxEthSignature', xImxEthSignature) + createTransferV1: async (createTransferRequest: CreateTransferRequestV1, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'createTransferRequest' is not null or undefined assertParamExists('createTransferV1', 'createTransferRequest', createTransferRequest) const localVarPath = `/v1/transfers`; @@ -134,6 +125,10 @@ export const TransfersApiAxiosParamCreator = function (configuration?: Configura localVarHeaderParameter['x-imx-eth-signature'] = String(xImxEthSignature); } + if (authorization != null) { + localVarHeaderParameter['Authorization'] = String(authorization); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -187,11 +182,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`; @@ -395,14 +390,15 @@ export const TransfersApiFp = function(configuration?: Configuration) { /** * Create a new transfer request * @summary Creates a transfer of tokens between two parties - * @param {string} xImxEthAddress eth address - * @param {string} xImxEthSignature eth signature * @param {CreateTransferRequestV1} createTransferRequest Create transfer + * @param {string} [xImxEthAddress] eth address + * @param {string} [xImxEthSignature] eth signature + * @param {string} [authorization] Authorization header * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createTransferV1(xImxEthAddress: string, xImxEthSignature: string, createTransferRequest: CreateTransferRequestV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createTransferV1(xImxEthAddress, xImxEthSignature, createTransferRequest, options); + async createTransferV1(createTransferRequest: CreateTransferRequestV1, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTransferV1(createTransferRequest, xImxEthAddress, xImxEthSignature, authorization, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -419,11 +415,11 @@ export const TransfersApiFp = function(configuration?: 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); }, @@ -490,14 +486,15 @@ export const TransfersApiFactory = function (configuration?: Configuration, base /** * Create a new transfer request * @summary Creates a transfer of tokens between two parties - * @param {string} xImxEthAddress eth address - * @param {string} xImxEthSignature eth signature * @param {CreateTransferRequestV1} createTransferRequest Create transfer + * @param {string} [xImxEthAddress] eth address + * @param {string} [xImxEthSignature] eth signature + * @param {string} [authorization] Authorization header * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createTransferV1(xImxEthAddress: string, xImxEthSignature: string, createTransferRequest: CreateTransferRequestV1, options?: any): AxiosPromise { - return localVarFp.createTransferV1(xImxEthAddress, xImxEthSignature, createTransferRequest, options).then((request) => request(axios, basePath)); + createTransferV1(createTransferRequest: CreateTransferRequestV1, xImxEthAddress?: string, xImxEthSignature?: string, authorization?: string, options?: any): AxiosPromise { + return localVarFp.createTransferV1(createTransferRequest, xImxEthAddress, xImxEthSignature, authorization, options).then((request) => request(axios, basePath)); }, /** * Gets bulk details of a signable transfer @@ -512,11 +509,11 @@ export const TransfersApiFactory = function (configuration?: Configuration, base /** * 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)); }, /** @@ -592,26 +589,33 @@ export interface TransfersApiCreateTransferRequest { * @interface TransfersApiCreateTransferV1Request */ export interface TransfersApiCreateTransferV1Request { + /** + * Create transfer + * @type {CreateTransferRequestV1} + * @memberof TransfersApiCreateTransferV1 + */ + readonly createTransferRequest: CreateTransferRequestV1 + /** * eth address * @type {string} * @memberof TransfersApiCreateTransferV1 */ - readonly xImxEthAddress: string + readonly xImxEthAddress?: string /** * eth signature * @type {string} * @memberof TransfersApiCreateTransferV1 */ - readonly xImxEthSignature: string + readonly xImxEthSignature?: string /** - * Create transfer - * @type {CreateTransferRequestV1} + * Authorization header + * @type {string} * @memberof TransfersApiCreateTransferV1 */ - readonly createTransferRequest: CreateTransferRequestV1 + readonly authorization?: string } /** @@ -636,10 +640,10 @@ export interface TransfersApiGetSignableTransferRequest { export interface TransfersApiGetSignableTransferV1Request { /** * get details of signable transfer - * @type {GetSignableTransferRequestV1} + * @type {GetSignableTransferRequest} * @memberof TransfersApiGetSignableTransferV1 */ - readonly getSignableTransferRequest: GetSignableTransferRequestV1 + readonly getSignableTransferRequest: GetSignableTransferRequest } /** @@ -810,7 +814,7 @@ export class TransfersApi extends BaseAPI { * @memberof TransfersApi */ public createTransferV1(requestParameters: TransfersApiCreateTransferV1Request, options?: AxiosRequestConfig) { - return TransfersApiFp(this.configuration).createTransferV1(requestParameters.xImxEthAddress, requestParameters.xImxEthSignature, requestParameters.createTransferRequest, options).then((request) => request(this.axios, this.basePath)); + return TransfersApiFp(this.configuration).createTransferV1(requestParameters.createTransferRequest, requestParameters.xImxEthAddress, requestParameters.xImxEthSignature, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath)); } /** diff --git a/src/api/domain/users-api.ts b/src/api/domain/users-api.ts index a79f4f02..8cc95713 100644 --- a/src/api/domain/users-api.ts +++ b/src/api/domain/users-api.ts @@ -31,6 +31,8 @@ import { GetSignableRegistrationResponse } from '../models'; // @ts-ignore import { GetUsersApiResponse } from '../models'; // @ts-ignore +import { RegisterPassportUserRequest } from '../models'; +// @ts-ignore import { RegisterUserRequest } from '../models'; // @ts-ignore import { RegisterUserResponse } from '../models'; @@ -146,6 +148,49 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration options: localVarRequestOptions, }; }, + /** + * Registers a passport user + * @summary Registers a passport user + * @param {string} authorization Authorization header + * @param {RegisterPassportUserRequest} registerPassportUserRequest Register Passport User + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + registerPassportUser: async (authorization: string, registerPassportUserRequest: RegisterPassportUserRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'authorization' is not null or undefined + assertParamExists('registerPassportUser', 'authorization', authorization) + // verify required parameter 'registerPassportUserRequest' is not null or undefined + assertParamExists('registerPassportUser', 'registerPassportUserRequest', registerPassportUserRequest) + const localVarPath = `/v1/passport/users`; + // 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 (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(registerPassportUserRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Registers a user * @summary Registers a user @@ -225,6 +270,18 @@ export const UsersApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getUsers(user, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Registers a passport user + * @summary Registers a passport user + * @param {string} authorization Authorization header + * @param {RegisterPassportUserRequest} registerPassportUserRequest Register Passport User + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async registerPassportUser(authorization: string, registerPassportUserRequest: RegisterPassportUserRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.registerPassportUser(authorization, registerPassportUserRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Registers a user * @summary Registers a user @@ -276,6 +333,17 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath getUsers(user: string, options?: any): AxiosPromise { return localVarFp.getUsers(user, options).then((request) => request(axios, basePath)); }, + /** + * Registers a passport user + * @summary Registers a passport user + * @param {string} authorization Authorization header + * @param {RegisterPassportUserRequest} registerPassportUserRequest Register Passport User + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + registerPassportUser(authorization: string, registerPassportUserRequest: RegisterPassportUserRequest, options?: any): AxiosPromise { + return localVarFp.registerPassportUser(authorization, registerPassportUserRequest, options).then((request) => request(axios, basePath)); + }, /** * Registers a user * @summary Registers a user @@ -331,6 +399,27 @@ export interface UsersApiGetUsersRequest { readonly user: string } +/** + * Request parameters for registerPassportUser operation in UsersApi. + * @export + * @interface UsersApiRegisterPassportUserRequest + */ +export interface UsersApiRegisterPassportUserRequest { + /** + * Authorization header + * @type {string} + * @memberof UsersApiRegisterPassportUser + */ + readonly authorization: string + + /** + * Register Passport User + * @type {RegisterPassportUserRequest} + * @memberof UsersApiRegisterPassportUser + */ + readonly registerPassportUserRequest: RegisterPassportUserRequest +} + /** * Request parameters for registerUser operation in UsersApi. * @export @@ -388,6 +477,18 @@ export class UsersApi extends BaseAPI { return UsersApiFp(this.configuration).getUsers(requestParameters.user, options).then((request) => request(this.axios, this.basePath)); } + /** + * Registers a passport user + * @summary Registers a passport user + * @param {UsersApiRegisterPassportUserRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public registerPassportUser(requestParameters: UsersApiRegisterPassportUserRequest, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).registerPassportUser(requestParameters.authorization, requestParameters.registerPassportUserRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** * Registers a user * @summary Registers a user diff --git a/src/api/models/api-order-v3-buy.ts b/src/api/models/api-order-v3-buy.ts new file mode 100644 index 00000000..7bc568c0 --- /dev/null +++ b/src/api/models/api-order-v3-buy.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 ApiOrderV3Buy + * Details of the asset being bought + * @export + */ +export type ApiOrderV3Buy = Token; + + diff --git a/src/api/models/api-order-v3-maker-fees.ts b/src/api/models/api-order-v3-maker-fees.ts new file mode 100644 index 00000000..f709abad --- /dev/null +++ b/src/api/models/api-order-v3-maker-fees.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 { OrderFeeInfo } from './order-fee-info'; +// May contain unused imports in some cases +// @ts-ignore +import { StoreMakerTakerFee } from './store-maker-taker-fee'; + +/** + * @type ApiOrderV3MakerFees + * MakerFees is the information about the fees that needs to be paid by the maker (liquidity) + * @export + */ +export type ApiOrderV3MakerFees = StoreMakerTakerFee; + + diff --git a/src/api/models/api-order-v3-sell.ts b/src/api/models/api-order-v3-sell.ts new file mode 100644 index 00000000..4ce95ad2 --- /dev/null +++ b/src/api/models/api-order-v3-sell.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 ApiOrderV3Sell + * Details of the asset being sold + * @export + */ +export type ApiOrderV3Sell = Token; + + diff --git a/src/api/models/api-order-v3-taker-fees.ts b/src/api/models/api-order-v3-taker-fees.ts new file mode 100644 index 00000000..6fbee9da --- /dev/null +++ b/src/api/models/api-order-v3-taker-fees.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 { OrderFeeInfo } from './order-fee-info'; +// May contain unused imports in some cases +// @ts-ignore +import { StoreMakerTakerFee } from './store-maker-taker-fee'; + +/** + * @type ApiOrderV3TakerFees + * TakerFees is the information about the fees that needs to be paid by the taker (liquidity) + * @export + */ +export type ApiOrderV3TakerFees = StoreMakerTakerFee; + + diff --git a/src/api/models/api-order-v3.ts b/src/api/models/api-order-v3.ts new file mode 100644 index 00000000..c8333f67 --- /dev/null +++ b/src/api/models/api-order-v3.ts @@ -0,0 +1,117 @@ +/* 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 { ApiOrderV3Buy } from './api-order-v3-buy'; +// May contain unused imports in some cases +// @ts-ignore +import { ApiOrderV3MakerFees } from './api-order-v3-maker-fees'; +// May contain unused imports in some cases +// @ts-ignore +import { ApiOrderV3Sell } from './api-order-v3-sell'; +// May contain unused imports in some cases +// @ts-ignore +import { ApiOrderV3TakerFees } from './api-order-v3-taker-fees'; +// May contain unused imports in some cases +// @ts-ignore +import { OrderFeeInfo } from './order-fee-info'; + +/** + * + * @export + * @interface ApiOrderV3 + */ +export interface ApiOrderV3 { + /** + * Amount of the asset already sold by this order + * @type {string} + * @memberof ApiOrderV3 + */ + 'amount_sold': string | null; + /** + * + * @type {ApiOrderV3Buy} + * @memberof ApiOrderV3 + */ + 'buy': ApiOrderV3Buy; + /** + * Expiration timestamp of this order + * @type {string} + * @memberof ApiOrderV3 + */ + 'expiration_timestamp': string | null; + /** + * Fee information for the order + * @type {Array} + * @memberof ApiOrderV3 + */ + 'fees'?: Array; + /** + * + * @type {ApiOrderV3MakerFees} + * @memberof ApiOrderV3 + */ + 'maker_fees'?: ApiOrderV3MakerFees; + /** + * MakerTakerType + * @type {string} + * @memberof ApiOrderV3 + */ + 'maker_taker_type'?: string; + /** + * ID of the order + * @type {number} + * @memberof ApiOrderV3 + */ + 'order_id': number; + /** + * + * @type {ApiOrderV3Sell} + * @memberof ApiOrderV3 + */ + 'sell': ApiOrderV3Sell; + /** + * Status of the order + * @type {string} + * @memberof ApiOrderV3 + */ + 'status': string; + /** + * + * @type {ApiOrderV3TakerFees} + * @memberof ApiOrderV3 + */ + 'taker_fees'?: ApiOrderV3TakerFees; + /** + * Timestamp this order was created + * @type {string} + * @memberof ApiOrderV3 + */ + 'timestamp': string | null; + /** + * Updated timestamp of this order + * @type {string} + * @memberof ApiOrderV3 + */ + 'updated_timestamp': string | null; + /** + * Ethereum address of the user who submitted the order + * @type {string} + * @memberof ApiOrderV3 + */ + 'user': 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-trade-request-v1-fee-info.ts b/src/api/models/create-trade-request-v1-fee-info.ts new file mode 100644 index 00000000..d1ac9182 --- /dev/null +++ b/src/api/models/create-trade-request-v1-fee-info.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 { FeeInfo } from './fee-info'; + +/** + * @type CreateTradeRequestV1FeeInfo + * Fee details + * @export + */ +export type CreateTradeRequestV1FeeInfo = FeeInfo; + + diff --git a/src/api/models/create-trade-request-v1.ts b/src/api/models/create-trade-request-v1.ts index 5919b9dd..b39e51fe 100644 --- a/src/api/models/create-trade-request-v1.ts +++ b/src/api/models/create-trade-request-v1.ts @@ -15,10 +15,10 @@ // May contain unused imports in some cases // @ts-ignore -import { FeeEntry } from './fee-entry'; +import { CreateTradeRequestV1FeeInfo } from './create-trade-request-v1-fee-info'; // May contain unused imports in some cases // @ts-ignore -import { FeeInfo } from './fee-info'; +import { FeeEntry } from './fee-entry'; /** * @@ -58,10 +58,10 @@ export interface CreateTradeRequestV1 { 'expiration_timestamp': number; /** * - * @type {FeeInfo} + * @type {CreateTradeRequestV1FeeInfo} * @memberof CreateTradeRequestV1 */ - 'fee_info'?: FeeInfo; + 'fee_info'?: CreateTradeRequestV1FeeInfo; /** * Fee information * @type {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/fee-token-data.ts b/src/api/models/fee-token-data.ts new file mode 100644 index 00000000..3c099a7a --- /dev/null +++ b/src/api/models/fee-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 { FeeData } from './fee-data'; + +/** + * @type FeeTokenData + * Fee token data details + * @export + */ +export type FeeTokenData = FeeData; + + 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-token-buy.ts b/src/api/models/get-signable-order-request-token-buy.ts new file mode 100644 index 00000000..7031498b --- /dev/null +++ b/src/api/models/get-signable-order-request-token-buy.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 GetSignableOrderRequestTokenBuy + * Token to buy + * @export + */ +export type GetSignableOrderRequestTokenBuy = SignableToken; + + diff --git a/src/api/models/get-signable-order-request-token-sell.ts b/src/api/models/get-signable-order-request-token-sell.ts new file mode 100644 index 00000000..546e8cea --- /dev/null +++ b/src/api/models/get-signable-order-request-token-sell.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 GetSignableOrderRequestTokenSell + * Token to sell + * @export + */ +export type GetSignableOrderRequestTokenSell = SignableToken; + + diff --git a/src/api/models/get-signable-order-request.ts b/src/api/models/get-signable-order-request.ts index 308bb4ea..cf8349fc 100644 --- a/src/api/models/get-signable-order-request.ts +++ b/src/api/models/get-signable-order-request.ts @@ -18,7 +18,10 @@ import { FeeEntry } from './fee-entry'; // May contain unused imports in some cases // @ts-ignore -import { SignableToken } from './signable-token'; +import { GetSignableOrderRequestTokenBuy } from './get-signable-order-request-token-buy'; +// May contain unused imports in some cases +// @ts-ignore +import { GetSignableOrderRequestTokenSell } from './get-signable-order-request-token-sell'; /** * @@ -50,18 +53,24 @@ export interface GetSignableOrderRequest { * @memberof GetSignableOrderRequest */ 'fees'?: Array; + /** + * SplitFees controls whether fees will be split between maker & taker + * @type {boolean} + * @memberof GetSignableOrderRequest + */ + 'split_fees'?: boolean; /** * - * @type {SignableToken} + * @type {GetSignableOrderRequestTokenBuy} * @memberof GetSignableOrderRequest */ - 'token_buy': SignableToken; + 'token_buy': GetSignableOrderRequestTokenBuy; /** * - * @type {SignableToken} + * @type {GetSignableOrderRequestTokenSell} * @memberof GetSignableOrderRequest */ - 'token_sell': SignableToken; + 'token_sell': GetSignableOrderRequestTokenSell; /** * Ethereum address of the submitting user * @type {string} diff --git a/src/api/models/get-signable-order-response-fee-info.ts b/src/api/models/get-signable-order-response-fee-info.ts new file mode 100644 index 00000000..2f70108a --- /dev/null +++ b/src/api/models/get-signable-order-response-fee-info.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 { FeeInfo } from './fee-info'; + +/** + * @type GetSignableOrderResponseFeeInfo + * Fee information + * @export + */ +export type GetSignableOrderResponseFeeInfo = FeeInfo; + + diff --git a/src/api/models/get-signable-order-response.ts b/src/api/models/get-signable-order-response.ts index 2ef31e6e..8b8c5c09 100644 --- a/src/api/models/get-signable-order-response.ts +++ b/src/api/models/get-signable-order-response.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { FeeInfo } from './fee-info'; +import { GetSignableOrderResponseFeeInfo } from './get-signable-order-response-fee-info'; /** * @@ -55,10 +55,10 @@ export interface GetSignableOrderResponse { 'expiration_timestamp': number; /** * - * @type {FeeInfo} + * @type {GetSignableOrderResponseFeeInfo} * @memberof GetSignableOrderResponse */ - 'fee_info'?: FeeInfo; + 'fee_info'?: GetSignableOrderResponseFeeInfo; /** * Nonce of the order * @type {number} @@ -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-fee-info.ts b/src/api/models/get-signable-trade-response-fee-info.ts new file mode 100644 index 00000000..6aaace32 --- /dev/null +++ b/src/api/models/get-signable-trade-response-fee-info.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 { FeeInfo } from './fee-info'; + +/** + * @type GetSignableTradeResponseFeeInfo + * Fee information + * @export + */ +export type GetSignableTradeResponseFeeInfo = FeeInfo; + + diff --git a/src/api/models/get-signable-trade-response-result.ts b/src/api/models/get-signable-trade-response-result.ts new file mode 100644 index 00000000..05f78140 --- /dev/null +++ b/src/api/models/get-signable-trade-response-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. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { GetSignableTradeResult } from './get-signable-trade-result'; +// May contain unused imports in some cases +// @ts-ignore +import { GetSignableTradeResultFeeInfo } from './get-signable-trade-result-fee-info'; + +/** + * @type GetSignableTradeResponseResult + * Signable trade result + * @export + */ +export type GetSignableTradeResponseResult = GetSignableTradeResult; + + diff --git a/src/api/models/get-signable-trade-response.ts b/src/api/models/get-signable-trade-response.ts index 0a466b6c..1230cf59 100644 --- a/src/api/models/get-signable-trade-response.ts +++ b/src/api/models/get-signable-trade-response.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { FeeInfo } from './fee-info'; +import { GetSignableTradeResponseFeeInfo } from './get-signable-trade-response-fee-info'; /** * @@ -55,10 +55,10 @@ export interface GetSignableTradeResponse { 'expiration_timestamp': number; /** * - * @type {FeeInfo} + * @type {GetSignableTradeResponseFeeInfo} * @memberof GetSignableTradeResponse */ - 'fee_info'?: FeeInfo; + 'fee_info'?: GetSignableTradeResponseFeeInfo; /** * Nonce of the order * @type {number} @@ -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-fee-info.ts b/src/api/models/get-signable-trade-result-fee-info.ts new file mode 100644 index 00000000..681e052f --- /dev/null +++ b/src/api/models/get-signable-trade-result-fee-info.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 { FeeInfo } from './fee-info'; + +/** + * @type GetSignableTradeResultFeeInfo + * Fee details + * @export + */ +export type GetSignableTradeResultFeeInfo = FeeInfo; + + diff --git a/src/api/models/get-signable-trade-result.ts b/src/api/models/get-signable-trade-result.ts new file mode 100644 index 00000000..e2cb00d1 --- /dev/null +++ b/src/api/models/get-signable-trade-result.ts @@ -0,0 +1,111 @@ +/* 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 { GetSignableTradeResultFeeInfo } from './get-signable-trade-result-fee-info'; + +/** + * + * @export + * @interface GetSignableTradeResult + */ +export interface GetSignableTradeResult { + /** + * Amount to buy + * @type {string} + * @memberof GetSignableTradeResult + */ + 'amount_buy'?: string; + /** + * Amount to sell + * @type {string} + * @memberof GetSignableTradeResult + */ + 'amount_sell'?: string; + /** + * ID of the asset to buy + * @type {string} + * @memberof GetSignableTradeResult + */ + 'asset_id_buy'?: string; + /** + * ID of the asset to sell + * @type {string} + * @memberof GetSignableTradeResult + */ + 'asset_id_sell'?: string; + /** + * Expiration timestamp of this trade + * @type {number} + * @memberof GetSignableTradeResult + */ + 'expiration_timestamp'?: number; + /** + * + * @type {GetSignableTradeResultFeeInfo} + * @memberof GetSignableTradeResult + */ + 'fee_info'?: GetSignableTradeResultFeeInfo; + /** + * Nonce of the trade + * @type {number} + * @memberof GetSignableTradeResult + */ + 'nonce'?: number; + /** + * Payload Hash + * @type {string} + * @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} + * @memberof GetSignableTradeResult + */ + 'signable_message'?: string; + /** + * Public stark key of the trading user + * @type {string} + * @memberof GetSignableTradeResult + */ + 'stark_key'?: string; + /** + * ID of the vault into which the traded asset will be placed + * @type {number} + * @memberof GetSignableTradeResult + */ + 'vault_id_buy'?: number; + /** + * ID of the vault to sell from + * @type {number} + * @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-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 22f3d512..6c960121 100644 --- a/src/api/models/index.ts +++ b/src/api/models/index.ts @@ -1,15 +1,27 @@ export * from './apierror'; export * from './add-metadata-schema-to-collection-request'; export * from './aggregate-limit'; +export * from './api-order-v3'; +export * from './api-order-v3-buy'; +export * from './api-order-v3-maker-fees'; +export * from './api-order-v3-sell'; +export * from './api-order-v3-taker-fees'; 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'; @@ -21,6 +33,7 @@ export * from './create-order-response'; export * from './create-project-request'; export * from './create-project-response'; export * from './create-trade-request-v1'; +export * from './create-trade-request-v1-fee-info'; export * from './create-trade-response'; export * from './create-transfer-request'; export * from './create-transfer-request-v1'; @@ -30,8 +43,10 @@ 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 './exchange'; @@ -41,6 +56,7 @@ export * from './fee-data'; export * from './fee-entry'; export * from './fee-info'; export * from './fee-token'; +export * from './fee-token-data'; export * from './get-metadata-refresh-errors-response'; export * from './get-metadata-refresh-response'; export * from './get-metadata-refreshes'; @@ -48,19 +64,28 @@ 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'; +export * from './get-signable-order-request-token-sell'; export * from './get-signable-order-response'; +export * from './get-signable-order-response-fee-info'; export * from './get-signable-registration-offchain-response'; export * from './get-signable-registration-request'; export * from './get-signable-registration-response'; export * from './get-signable-trade-request'; export * from './get-signable-trade-response'; +export * from './get-signable-trade-response-fee-info'; +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-v1'; export * from './get-signable-transfer-response'; export * from './get-signable-transfer-response-v1'; 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'; @@ -84,6 +109,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'; @@ -96,23 +122,38 @@ export * from './nftprimarytransaction-transaction-data'; export * from './nftprimarytransaction-widget-params'; export * from './optional-exchange-data'; export * from './order'; +export * from './order-buy'; export * from './order-details'; export * from './order-fee-info'; +export * from './order-fee-info-token'; +export * from './order-sell'; export * from './project'; export * from './range'; +export * from './register-passport-user-request'; 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-response-details'; +export * from './signable-transfer-response-details-token'; +export * from './store-maker-taker-fee'; export * from './success-response'; export * from './token'; export * from './token-data'; +export * from './token-data-oaigen'; +export * from './token-data-properties'; export * from './token-details'; export * from './trade'; +export * from './trade-a'; +export * from './trade-b'; export * from './trade-side'; +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/list-orders-response.ts b/src/api/models/list-orders-response.ts index 1b50f5f4..d28b0211 100644 --- a/src/api/models/list-orders-response.ts +++ b/src/api/models/list-orders-response.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { Order } from './order'; +import { ApiOrderV3 } from './api-order-v3'; /** * @@ -37,9 +37,9 @@ export interface ListOrdersResponse { 'remaining': number; /** * Orders matching query parameters - * @type {Array} + * @type {Array} * @memberof ListOrdersResponse */ - 'result': Array; + 'result': Array; } 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-buy.ts b/src/api/models/order-buy.ts new file mode 100644 index 00000000..3d2a2d9a --- /dev/null +++ b/src/api/models/order-buy.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 OrderBuy + * Details of the asset being bought + * @export + */ +export type OrderBuy = Token; + + diff --git a/src/api/models/order-fee-info-token.ts b/src/api/models/order-fee-info-token.ts new file mode 100644 index 00000000..af43e851 --- /dev/null +++ b/src/api/models/order-fee-info-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 { FeeToken } from './fee-token'; +// May contain unused imports in some cases +// @ts-ignore +import { FeeTokenData } from './fee-token-data'; + +/** + * @type OrderFeeInfoToken + * Details of the fee currency + * @export + */ +export type OrderFeeInfoToken = FeeToken; + + diff --git a/src/api/models/order-fee-info.ts b/src/api/models/order-fee-info.ts index eea979f0..334c440f 100644 --- a/src/api/models/order-fee-info.ts +++ b/src/api/models/order-fee-info.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { FeeToken } from './fee-token'; +import { OrderFeeInfoToken } from './order-fee-info-token'; /** * @@ -37,10 +37,10 @@ export interface OrderFeeInfo { 'amount'?: string; /** * - * @type {FeeToken} + * @type {OrderFeeInfoToken} * @memberof OrderFeeInfo */ - 'token'?: FeeToken; + 'token'?: OrderFeeInfoToken; /** * Fee type * @type {string} diff --git a/src/api/models/order-sell.ts b/src/api/models/order-sell.ts new file mode 100644 index 00000000..eb9f3c14 --- /dev/null +++ b/src/api/models/order-sell.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 OrderSell + * Details of the asset being sold + * @export + */ +export type OrderSell = Token; + + diff --git a/src/api/models/order.ts b/src/api/models/order.ts index 313289d4..7299a02d 100644 --- a/src/api/models/order.ts +++ b/src/api/models/order.ts @@ -13,12 +13,15 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import { OrderBuy } from './order-buy'; // May contain unused imports in some cases // @ts-ignore import { OrderFeeInfo } from './order-fee-info'; // May contain unused imports in some cases // @ts-ignore -import { Token } from './token'; +import { OrderSell } from './order-sell'; /** * @@ -34,10 +37,10 @@ export interface Order { 'amount_sold': string | null; /** * - * @type {Token} + * @type {OrderBuy} * @memberof Order */ - 'buy': Token; + 'buy': OrderBuy; /** * Expiration timestamp of this order * @type {string} @@ -58,10 +61,10 @@ export interface Order { 'order_id': number; /** * - * @type {Token} + * @type {OrderSell} * @memberof Order */ - 'sell': Token; + 'sell': OrderSell; /** * Status of the order * @type {string} diff --git a/src/api/models/project.ts b/src/api/models/project.ts index db1abe76..e712fdbf 100644 --- a/src/api/models/project.ts +++ b/src/api/models/project.ts @@ -80,5 +80,11 @@ export interface Project { * @memberof Project */ 'name': string; + /** + * The organisation ID that the project belongs to + * @type {string} + * @memberof Project + */ + '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/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.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/store-maker-taker-fee.ts b/src/api/models/store-maker-taker-fee.ts new file mode 100644 index 00000000..8076ecce --- /dev/null +++ b/src/api/models/store-maker-taker-fee.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 { OrderFeeInfo } from './order-fee-info'; + +/** + * + * @export + * @interface StoreMakerTakerFee + */ +export interface StoreMakerTakerFee { + /** + * Fees + * @type {Array} + * @memberof StoreMakerTakerFee + */ + 'fees'?: Array; + /** + * Quantity of this asset with the sum of all fees applied to the asset + * @type {string} + * @memberof StoreMakerTakerFee + */ + 'quantity_with_fees': string; +} + diff --git a/src/api/models/token-data-oaigen.ts b/src/api/models/token-data-oaigen.ts new file mode 100644 index 00000000..d30c9444 --- /dev/null +++ b/src/api/models/token-data-oaigen.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 { TokenData } from './token-data'; +// May contain unused imports in some cases +// @ts-ignore +import { TokenDataProperties } from './token-data-properties'; + +/** + * @type TokenDataOAIGen + * Token details of this asset + * @export + */ +export type TokenDataOAIGen = TokenData; + + diff --git a/src/api/models/token-data-properties.ts b/src/api/models/token-data-properties.ts new file mode 100644 index 00000000..842c555f --- /dev/null +++ b/src/api/models/token-data-properties.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 { AssetProperties } from './asset-properties'; +// May contain unused imports in some cases +// @ts-ignore +import { AssetPropertiesCollection } from './asset-properties-collection'; + +/** + * @type TokenDataProperties + * Properties of this asset + * @export + */ +export type TokenDataProperties = AssetProperties; + + diff --git a/src/api/models/token-data.ts b/src/api/models/token-data.ts index 9a6deac1..4a501bf8 100644 --- a/src/api/models/token-data.ts +++ b/src/api/models/token-data.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { AssetProperties } from './asset-properties'; +import { TokenDataProperties } from './token-data-properties'; /** * @@ -37,10 +37,10 @@ export interface TokenData { 'id'?: string; /** * - * @type {AssetProperties} + * @type {TokenDataProperties} * @memberof TokenData */ - 'properties'?: AssetProperties; + 'properties'?: TokenDataProperties; /** * Quantity of this asset - inclusive of fees for buy order in v1 API and exclusive of fees in v3 API * @type {string} diff --git a/src/api/models/token.ts b/src/api/models/token.ts index 6c8587f3..238bd818 100644 --- a/src/api/models/token.ts +++ b/src/api/models/token.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { TokenData } from './token-data'; +import { TokenDataOAIGen } from './token-data-oaigen'; /** * @@ -25,10 +25,10 @@ import { TokenData } from './token-data'; export interface Token { /** * - * @type {TokenData} + * @type {TokenDataOAIGen} * @memberof Token */ - 'data': TokenData; + 'data': TokenDataOAIGen; /** * Type of this asset (ETH/ERC20/ERC721) * @type {string} diff --git a/src/api/models/trade-a.ts b/src/api/models/trade-a.ts new file mode 100644 index 00000000..8795e9b6 --- /dev/null +++ b/src/api/models/trade-a.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 { TradeSide } from './trade-side'; + +/** + * @type TradeA + * Side A of this trade (the buy order) + * @export + */ +export type TradeA = TradeSide; + + diff --git a/src/api/models/trade-b.ts b/src/api/models/trade-b.ts new file mode 100644 index 00000000..7148fafe --- /dev/null +++ b/src/api/models/trade-b.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 { TradeSide } from './trade-side'; + +/** + * @type TradeB + * Side B of this trade (the sell order) + * @export + */ +export type TradeB = TradeSide; + + diff --git a/src/api/models/trade.ts b/src/api/models/trade.ts index 901405d2..6272935b 100644 --- a/src/api/models/trade.ts +++ b/src/api/models/trade.ts @@ -15,7 +15,10 @@ // May contain unused imports in some cases // @ts-ignore -import { TradeSide } from './trade-side'; +import { TradeA } from './trade-a'; +// May contain unused imports in some cases +// @ts-ignore +import { TradeB } from './trade-b'; /** * @@ -25,16 +28,16 @@ import { TradeSide } from './trade-side'; export interface Trade { /** * - * @type {TradeSide} + * @type {TradeA} * @memberof Trade */ - 'a': TradeSide; + 'a': TradeA; /** * - * @type {TradeSide} + * @type {TradeB} * @memberof Trade */ - 'b': TradeSide; + 'b': TradeB; /** * Status of this trade * @type {string} diff --git a/src/api/models/trades-create-trade-request-fee-info.ts b/src/api/models/trades-create-trade-request-fee-info.ts new file mode 100644 index 00000000..1aa47dc1 --- /dev/null +++ b/src/api/models/trades-create-trade-request-fee-info.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 { FeeInfo } from './fee-info'; + +/** + * @type TradesCreateTradeRequestFeeInfo + * Fee details + * @export + */ +export type TradesCreateTradeRequestFeeInfo = FeeInfo; + + diff --git a/src/api/models/trades-create-trade-request.ts b/src/api/models/trades-create-trade-request.ts new file mode 100644 index 00000000..9fa7df40 --- /dev/null +++ b/src/api/models/trades-create-trade-request.ts @@ -0,0 +1,114 @@ +/* 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 { FeeEntry } from './fee-entry'; +// May contain unused imports in some cases +// @ts-ignore +import { TradesCreateTradeRequestFeeInfo } from './trades-create-trade-request-fee-info'; + +/** + * + * @export + * @interface TradesCreateTradeRequest + */ +export interface TradesCreateTradeRequest { + /** + * Amount to buy + * @type {string} + * @memberof TradesCreateTradeRequest + */ + 'amount_buy': string; + /** + * Amount to sell + * @type {string} + * @memberof TradesCreateTradeRequest + */ + 'amount_sell': string; + /** + * ID of the asset to buy + * @type {string} + * @memberof TradesCreateTradeRequest + */ + 'asset_id_buy': string; + /** + * ID of the asset to sell + * @type {string} + * @memberof TradesCreateTradeRequest + */ + 'asset_id_sell': string; + /** + * Expiration timestamp for this trade + * @type {number} + * @memberof TradesCreateTradeRequest + */ + 'expiration_timestamp': number; + /** + * + * @type {TradesCreateTradeRequestFeeInfo} + * @memberof TradesCreateTradeRequest + */ + 'fee_info'?: TradesCreateTradeRequestFeeInfo; + /** + * Fee information + * @type {Array} + * @memberof TradesCreateTradeRequest + */ + 'fees'?: Array; + /** + * [deprecated] All orders include fees since the introduction of protocol fees + * @type {boolean} + * @memberof TradesCreateTradeRequest + */ + 'include_fees'?: boolean; + /** + * Nonce of the trade + * @type {number} + * @memberof TradesCreateTradeRequest + */ + 'nonce': number; + /** + * ID of the order + * @type {number} + * @memberof TradesCreateTradeRequest + */ + 'order_id': number; + /** + * Public stark key of the user creating trade + * @type {string} + * @memberof TradesCreateTradeRequest + */ + 'stark_key': string; + /** + * Payload signature + * @type {string} + * @memberof TradesCreateTradeRequest + */ + 'stark_signature': string; + /** + * ID of the vault into which the traded asset will be placed + * @type {number} + * @memberof TradesCreateTradeRequest + */ + 'vault_id_buy': number; + /** + * ID of the vault to sell from + * @type {number} + * @memberof TradesCreateTradeRequest + */ + 'vault_id_sell': number; +} + 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}