diff --git a/examples/getProjects.ts b/examples/getProjects.ts deleted file mode 100644 index 572d0300..00000000 --- a/examples/getProjects.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Config, ImmutableX } from '@imtbl/core-sdk'; -import { generateWalletConnection } from './libs/walletConnection'; - -(async () => { - try { - const client = new ImmutableX(Config.SANDBOX); - const wallet = await generateWalletConnection('sepolia'); - const pageSize = 200; - const projects = await client.getProjects(wallet.ethSigner, pageSize); - - console.log('projects', projects); - } catch (err) { - console.error(err); - process.exit(1); - } -})(); diff --git a/openapi.json b/openapi.json index 3f3014ab..40b8fed1 100644 --- a/openapi.json +++ b/openapi.json @@ -406,7 +406,7 @@ { "type": "string", "description": "Comma separated list of wallet addresses", - "name": "users", + "name": "user", "in": "query", "required": true } @@ -1924,67 +1924,6 @@ } } }, - "/v1/primary_sales/{id}/signable-accept-details": { - "post": { - "description": "[Experimental] Signable Accept Primary Sale. This endpoint is experimental and may change in the future.", - "produces": [ - "application/json" - ], - "tags": [ - "primary-sales" - ], - "summary": "[Experimental] Signable Accept Primary Sale", - "operationId": "SignableAcceptPrimarySale", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Global Primary Sale identifier", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK response.", - "schema": { - "$ref": "#/definitions/signableAcceptPrimarySaleOKBody" - } - }, - "400": { - "description": "Bad Request (400)", - "schema": { - "$ref": "#/definitions/signableAcceptPrimarySaleBadRequestBody" - } - }, - "404": { - "description": "The specified resource was not found (404)", - "schema": { - "$ref": "#/definitions/signableAcceptPrimarySaleNotFoundBody" - } - }, - "422": { - "description": "Unprocessable Entity (422)", - "schema": { - "$ref": "#/definitions/signableAcceptPrimarySaleUnprocessableEntityBody" - } - }, - "500": { - "description": "Internal Server Error (500)", - "schema": { - "$ref": "#/definitions/signableAcceptPrimarySaleInternalServerErrorBody" - } - }, - "501": { - "description": "Not Implemented Error (501)", - "schema": { - "$ref": "#/definitions/signableAcceptPrimarySaleNotImplementedBody" - } - } - } - } - }, "/v1/primary_sales/{id}/reject": { "post": { "security": [ @@ -2064,17 +2003,17 @@ } } }, - "/v1/primary_sales/{id}/signable-reject-details": { + "/v1/primary_sales/{id}/signable-accept-details": { "post": { - "description": "[Experimental] Signable Reject Primary Sale. This endpoint is experimental and may change in the future.", + "description": "[Experimental] Signable Accept Primary Sale. This endpoint is experimental and may change in the future.", "produces": [ "application/json" ], "tags": [ "primary-sales" ], - "summary": "[Experimental] Signable Reject Primary Sale", - "operationId": "SignableRejectPrimarySale", + "summary": "[Experimental] Signable Accept Primary Sale", + "operationId": "SignableAcceptPrimarySale", "parameters": [ { "type": "integer", @@ -2089,182 +2028,98 @@ "200": { "description": "OK response.", "schema": { - "$ref": "#/definitions/signableRejectPrimarySaleOKBody" + "$ref": "#/definitions/signableAcceptPrimarySaleOKBody" } }, "400": { "description": "Bad Request (400)", "schema": { - "$ref": "#/definitions/signableRejectPrimarySaleBadRequestBody" + "$ref": "#/definitions/signableAcceptPrimarySaleBadRequestBody" } }, "404": { "description": "The specified resource was not found (404)", "schema": { - "$ref": "#/definitions/signableRejectPrimarySaleNotFoundBody" + "$ref": "#/definitions/signableAcceptPrimarySaleNotFoundBody" } }, "422": { "description": "Unprocessable Entity (422)", "schema": { - "$ref": "#/definitions/signableRejectPrimarySaleUnprocessableEntityBody" + "$ref": "#/definitions/signableAcceptPrimarySaleUnprocessableEntityBody" } }, "500": { "description": "Internal Server Error (500)", "schema": { - "$ref": "#/definitions/signableRejectPrimarySaleInternalServerErrorBody" + "$ref": "#/definitions/signableAcceptPrimarySaleInternalServerErrorBody" } }, "501": { "description": "Not Implemented Error (501)", "schema": { - "$ref": "#/definitions/signableRejectPrimarySaleNotImplementedBody" + "$ref": "#/definitions/signableAcceptPrimarySaleNotImplementedBody" } } } } }, - "/v1/projects": { - "get": { - "description": "Get projects", - "consumes": [ - "application/json" - ], + "/v1/primary_sales/{id}/signable-reject-details": { + "post": { + "description": "[Experimental] Signable Reject Primary Sale. This endpoint is experimental and may change in the future.", "produces": [ "application/json" ], "tags": [ - "projects" + "primary-sales" ], - "summary": "Get projects", - "operationId": "getProjects", + "summary": "[Experimental] Signable Reject Primary Sale", + "operationId": "SignableRejectPrimarySale", "parameters": [ { "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": "String created by signing wallet address and timestamp", - "name": "IMX-Signature", - "in": "header", - "required": true - }, - { - "type": "string", - "description": "Unix Epoc timestamp", - "name": "IMX-Timestamp", - "in": "header", + "format": "int64", + "description": "Global Primary Sale identifier", + "name": "id", + "in": "path", "required": true } ], "responses": { "200": { - "description": "OK", + "description": "OK response.", "schema": { - "$ref": "#/definitions/GetProjectsResponse" + "$ref": "#/definitions/signableRejectPrimarySaleOKBody" } }, "400": { - "description": "Bad Request", + "description": "Bad Request (400)", "schema": { - "$ref": "#/definitions/APIError" + "$ref": "#/definitions/signableRejectPrimarySaleBadRequestBody" } }, - "401": { - "description": "Unauthorized", + "404": { + "description": "The specified resource was not found (404)", "schema": { - "$ref": "#/definitions/APIError" + "$ref": "#/definitions/signableRejectPrimarySaleNotFoundBody" } }, - "403": { - "description": "Forbidden", + "422": { + "description": "Unprocessable Entity (422)", "schema": { - "$ref": "#/definitions/APIError" + "$ref": "#/definitions/signableRejectPrimarySaleUnprocessableEntityBody" } }, "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/APIError" - } - } - } - } - }, - "/v1/projects/sdk": { - "get": { - "description": "Checks the SDK Version of caller against the current SDK Version and returns a message.", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "projects" - ], - "summary": "Checks the SDK Version of caller against the current SDK Version", - "operationId": "getSdkVersion", - "parameters": [ - { - "type": "string", - "description": "Runtime Details", - "name": "details", - "in": "query", - "required": true - }, - { - "type": "string", - "description": "SDK Version", - "name": "version", - "in": "query" - }, - { - "type": "string", - "description": "Runtime ID", - "name": "id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/api.SDKVersionCheckResponse" - } - }, - "400": { - "description": "Bad Request", + "description": "Internal Server Error (500)", "schema": { - "$ref": "#/definitions/APIError" + "$ref": "#/definitions/signableRejectPrimarySaleInternalServerErrorBody" } }, - "500": { - "description": "Internal Server Error", + "501": { + "description": "Not Implemented Error (501)", "schema": { - "$ref": "#/definitions/APIError" + "$ref": "#/definitions/signableRejectPrimarySaleNotImplementedBody" } } } @@ -3896,6 +3751,41 @@ } } }, + "/v2/signable-withdrawal-details": { + "post": { + "description": "Gets details of a signable withdrawal", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "withdrawals" + ], + "summary": "Gets details of a signable withdrawal for starkex contracts that are higher than v3", + "operationId": "getSignableWithdrawalV2", + "parameters": [ + { + "description": "get details of signable withdrawal", + "name": "GetSignableWithdrawalRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetSignableWithdrawalRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/GetSignableWithdrawalResponseV2" + } + } + } + } + }, "/v2/transfers": { "post": { "description": "Create a new transfer request. Use https://docs.x.immutable.com/reference#/operations/getSignableTransfer to get request body params.", @@ -3973,6 +3863,55 @@ } } }, + "/v2/withdrawals": { + "post": { + "description": "Creates a withdrawal. Use https://docs.x.immutable.com/reference#/operations/getSignableWithdrawal to get request body params.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "withdrawals" + ], + "summary": "Creates a withdrawal of a token for starkex contracts that are higher than v3", + "operationId": "createWithdrawalV2", + "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 withdrawal", + "name": "CreateWithdrawalRequestV2", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateWithdrawalRequestV2" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/CreateWithdrawalResponse" + } + } + } + } + }, "/v3/exchanges": { "get": { "description": "Returns a list of exchanges based on the request", @@ -5592,6 +5531,17 @@ } } }, + "CreateProjectAPIKeyResponse": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string" + } + } + }, "CreateProjectGroupRequest": { "type": "object", "required": [ @@ -5638,12 +5588,17 @@ "CreateProjectResponse": { "type": "object", "required": [ + "environment_id", "id" ], "properties": { - "id": { - "description": "The project group ID", + "environment_id": { + "description": "The environment ID", "type": "string" + }, + "id": { + "description": "The project ID", + "type": "integer" } } }, @@ -8015,25 +7970,89 @@ "Project": { "type": "object", "required": [ + "collection_limit_expires_at", + "collection_monthly_limit", + "collection_remaining", + "company_name", + "contact_email", "id", + "mint_limit_expires_at", + "mint_monthly_limit", + "mint_remaining", "name" ], "properties": { + "api_key": { + "description": "API key for the project. This is only for zkevm project. This API is not for increasing rate limit yet.", + "type": "string" + }, "chain_type": { "description": "The project ChainType", "type": "string" }, + "collection_limit_expires_at": { + "description": "The current period expiry date for collection limit", + "type": "string" + }, + "collection_monthly_limit": { + "description": "The total monthly collection limit", + "type": "integer" + }, + "collection_remaining": { + "description": "The number of collection remaining in the current period", + "type": "integer" + }, + "company_name": { + "description": "The company name", + "type": "string" + }, + "contact_email": { + "description": "The project contact email (must be registered as a developer account with Immutable at https://hub.immutable.com)", + "type": "string" + }, + "environment_id": { + "description": "The environment ID", + "type": "string" + }, + "environment_name": { + "description": "The user environment name correlating to this project", + "type": "string" + }, "id": { - "description": "The project group ID", + "description": "The project ID", + "type": "integer" + }, + "mint_limit_expires_at": { + "description": "The current period expiry date for mint operation limit", "type": "string" }, + "mint_monthly_limit": { + "description": "The total monthly mint operation limit", + "type": "integer" + }, + "mint_remaining": { + "description": "The number of mint operation remaining in the current period", + "type": "integer" + }, "name": { - "description": "The project group name", + "description": "The project name", "type": "string" }, "org_id": { "description": "The organisation ID that the project belongs to", "type": "string" + }, + "project_group_id": { + "description": "Project group id", + "type": "string" + }, + "publishable_key": { + "description": "The public publishable_key for the project", + "type": "string" + }, + "publishable_key_created_at": { + "description": "The public publishable_key created time", + "type": "string" } } }, @@ -8269,6 +8288,30 @@ } } }, + "SummarizedCollection": { + "type": "object", + "required": [ + "collection", + "owned_token_count", + "owners" + ], + "properties": { + "collection": { + "$ref": "#/definitions/summarizedCollectionCollection" + }, + "owned_token_count": { + "description": "Combined amount of tokens owned by the provided wallets", + "type": "integer" + }, + "owners": { + "description": "Subset of the provided wallets that own at least one token in this collection", + "type": "array", + "items": { + "type": "string" + } + } + } + }, "Token": { "type": "object", "required": [ @@ -9311,7 +9354,7 @@ "description": "Collections matching query parameters", "type": "array", "items": { - "$ref": "#/definitions/api.SummarizedCollection" + "$ref": "#/definitions/SummarizedCollection" } } } @@ -10169,14 +10212,6 @@ ], "x-go-gen-location": "models" }, - "engine.RegisterUserResult": { - "type": "object", - "properties": { - "tx_hash": { - "type": "string" - } - } - }, "exchange.CreateExchangeAndURLResponse": { "type": "object", "properties": { @@ -13786,6 +13821,15 @@ } } }, + "summarizedCollectionCollection": { + "description": "Collection and it's metadata", + "allOf": [ + { + "$ref": "#/definitions/Collection" + } + ], + "x-go-gen-location": "models" + }, "tokenDataOAIGen": { "description": "Token details of this asset", "allOf": [ diff --git a/src/ImmutableX.ts b/src/ImmutableX.ts index 988f830b..0e446916 100644 --- a/src/ImmutableX.ts +++ b/src/ImmutableX.ts @@ -469,31 +469,6 @@ export class ImmutableX { }); } - /** - * Get Projects owned by the given User - * @param ethSigner - the L1 signer - * @param pageSize - the page size of the result - * @param cursor - the cursor - * @param orderBy - the property to sort by - * @param direction - direction to sort (asc/desc) - * @returns a promise that resolves with the requested Projects - * @throws {@link index.IMXError} - */ - public async getProjects( - ethSigner: EthSigner, - pageSize?: number, - cursor?: string, - orderBy?: string, - direction?: string, - ) { - return this.workflows - .getProjects(ethSigner, pageSize, cursor, orderBy, direction) - .then(res => res.data) - .catch(err => { - throw formatError(err); - }); - } - /** * Get the token Balances of the User * @param request - the request object containing the parameters to be provided in the API request diff --git a/src/api/.openapi-generator/FILES b/src/api/.openapi-generator/FILES index a4f1c32d..e83eb750 100644 --- a/src/api/.openapi-generator/FILES +++ b/src/api/.openapi-generator/FILES @@ -109,6 +109,7 @@ models/create-primary-sale-params-body.ts models/create-primary-sale-unauthorized-body-all-of0.ts models/create-primary-sale-unauthorized-body-all-of1.ts models/create-primary-sale-unauthorized-body.ts +models/create-project-apikey-response.ts models/create-project-group-request.ts models/create-project-request.ts models/create-project-response.ts @@ -131,7 +132,6 @@ models/encode-asset-request-token.ts models/encode-asset-request.ts models/encode-asset-response.ts models/encode-asset-token-data.ts -models/engine-register-user-result.ts models/exchange-create-exchange-and-urlresponse.ts models/exchange.ts models/experimental-create-primary-sale-bad-request-body-all-of0.ts @@ -366,6 +366,8 @@ models/signable-transfer-response-details-token.ts models/signable-transfer-response-details.ts models/store-maker-taker-fee.ts models/success-response.ts +models/summarized-collection-collection.ts +models/summarized-collection.ts models/token-data-oaigen.ts models/token-data-properties.ts models/token-data.ts diff --git a/src/api/base.ts b/src/api/base.ts index 8f1c9a6d..7cab2211 100644 --- a/src/api/base.ts +++ b/src/api/base.ts @@ -18,7 +18,7 @@ import { Configuration } from "./configuration"; // @ts-ignore import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -export const BASE_PATH = "https://api.sandbox.immutable.com".replace(/\/+$/, ""); +export const BASE_PATH = "https://api.sandbox.x.immutable.com".replace(/\/+$/, ""); /** * diff --git a/src/api/domain/collections-api.ts b/src/api/domain/collections-api.ts index 237b3b1e..42cad851 100644 --- a/src/api/domain/collections-api.ts +++ b/src/api/domain/collections-api.ts @@ -241,13 +241,13 @@ export const CollectionsApiAxiosParamCreator = function (configuration?: Configu /** * Get details of the collections from which a set of wallets hold tokens, along with the number of tokens held in each collection. * @summary Get metadata about the collections held by a set of wallets - * @param {string} users Comma separated list of wallet addresses + * @param {string} user Comma separated list of wallet addresses * @param {*} [options] Override http request option. * @throws {RequiredError} */ - summarizeCollections: async (users: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'users' is not null or undefined - assertParamExists('summarizeCollections', 'users', users) + summarizeCollections: async (user: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'user' is not null or undefined + assertParamExists('summarizeCollections', 'user', user) const localVarPath = `/v1/collections-summary`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -260,8 +260,8 @@ export const CollectionsApiAxiosParamCreator = function (configuration?: Configu const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (users !== undefined) { - localVarQueryParameter['users'] = users; + if (user !== undefined) { + localVarQueryParameter['user'] = user; } @@ -397,12 +397,12 @@ export const CollectionsApiFp = function(configuration?: Configuration) { /** * Get details of the collections from which a set of wallets hold tokens, along with the number of tokens held in each collection. * @summary Get metadata about the collections held by a set of wallets - * @param {string} users Comma separated list of wallet addresses + * @param {string} user Comma separated list of wallet addresses * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async summarizeCollections(users: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.summarizeCollections(users, options); + async summarizeCollections(user: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.summarizeCollections(user, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -483,12 +483,12 @@ export const CollectionsApiFactory = function (configuration?: Configuration, ba /** * Get details of the collections from which a set of wallets hold tokens, along with the number of tokens held in each collection. * @summary Get metadata about the collections held by a set of wallets - * @param {string} users Comma separated list of wallet addresses + * @param {string} user Comma separated list of wallet addresses * @param {*} [options] Override http request option. * @throws {RequiredError} */ - summarizeCollections(users: string, options?: any): AxiosPromise { - return localVarFp.summarizeCollections(users, options).then((request) => request(axios, basePath)); + summarizeCollections(user: string, options?: any): AxiosPromise { + return localVarFp.summarizeCollections(user, options).then((request) => request(axios, basePath)); }, /** * Update collection @@ -650,7 +650,7 @@ export interface CollectionsApiSummarizeCollectionsRequest { * @type {string} * @memberof CollectionsApiSummarizeCollections */ - readonly users: string + readonly user: string } /** @@ -752,7 +752,7 @@ export class CollectionsApi extends BaseAPI { * @memberof CollectionsApi */ public summarizeCollections(requestParameters: CollectionsApiSummarizeCollectionsRequest, options?: AxiosRequestConfig) { - return CollectionsApiFp(this.configuration).summarizeCollections(requestParameters.users, options).then((request) => request(this.axios, this.basePath)); + return CollectionsApiFp(this.configuration).summarizeCollections(requestParameters.user, options).then((request) => request(this.axios, this.basePath)); } /** diff --git a/src/api/domain/projects-api.ts b/src/api/domain/projects-api.ts index 0192c482..30c0170e 100644 --- a/src/api/domain/projects-api.ts +++ b/src/api/domain/projects-api.ts @@ -23,10 +23,6 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr // @ts-ignore import { APIError } from '../models'; // @ts-ignore -import { ApiSDKVersionCheckResponse } from '../models'; -// @ts-ignore -import { GetProjectsResponse } from '../models'; -// @ts-ignore import { Project } from '../models'; /** * ProjectsApi - axios parameter creator @@ -73,117 +69,6 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get projects - * @summary Get projects - * @param {string} iMXSignature String created by signing wallet address and timestamp - * @param {string} iMXTimestamp Unix Epoc timestamp - * @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 {*} [options] Override http request option. - * @throws {RequiredError} - */ - getProjects: async (iMXSignature: string, iMXTimestamp: string, pageSize?: number, cursor?: string, orderBy?: string, direction?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'iMXSignature' is not null or undefined - assertParamExists('getProjects', 'iMXSignature', iMXSignature) - // verify required parameter 'iMXTimestamp' is not null or undefined - assertParamExists('getProjects', 'iMXTimestamp', iMXTimestamp) - const localVarPath = `/v1/projects`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (pageSize !== undefined) { - localVarQueryParameter['page_size'] = pageSize; - } - - if (cursor !== undefined) { - localVarQueryParameter['cursor'] = cursor; - } - - if (orderBy !== undefined) { - localVarQueryParameter['order_by'] = orderBy; - } - - if (direction !== undefined) { - localVarQueryParameter['direction'] = direction; - } - - if (iMXSignature != null) { - localVarHeaderParameter['IMX-Signature'] = String(iMXSignature); - } - - if (iMXTimestamp != null) { - localVarHeaderParameter['IMX-Timestamp'] = String(iMXTimestamp); - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Checks the SDK Version of caller against the current SDK Version and returns a message. - * @summary Checks the SDK Version of caller against the current SDK Version - * @param {string} details Runtime Details - * @param {string} [version] SDK Version - * @param {string} [id] Runtime ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSdkVersion: async (details: string, version?: string, id?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'details' is not null or undefined - assertParamExists('getSdkVersion', 'details', details) - const localVarPath = `/v1/projects/sdk`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (details !== undefined) { - localVarQueryParameter['details'] = details; - } - - if (version !== undefined) { - localVarQueryParameter['version'] = version; - } - - if (id !== undefined) { - localVarQueryParameter['id'] = id; - } - - - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -216,35 +101,6 @@ export const ProjectsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getProject(id, iMXSignature, iMXTimestamp, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, - /** - * Get projects - * @summary Get projects - * @param {string} iMXSignature String created by signing wallet address and timestamp - * @param {string} iMXTimestamp Unix Epoc timestamp - * @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 {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getProjects(iMXSignature: string, iMXTimestamp: string, pageSize?: number, cursor?: string, orderBy?: string, direction?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getProjects(iMXSignature, iMXTimestamp, pageSize, cursor, orderBy, direction, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * Checks the SDK Version of caller against the current SDK Version and returns a message. - * @summary Checks the SDK Version of caller against the current SDK Version - * @param {string} details Runtime Details - * @param {string} [version] SDK Version - * @param {string} [id] Runtime ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSdkVersion(details: string, version?: string, id?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSdkVersion(details, version, id, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, } }; @@ -267,33 +123,6 @@ export const ProjectsApiFactory = function (configuration?: Configuration, baseP getProject(id: string, iMXSignature: string, iMXTimestamp: string, options?: any): AxiosPromise { return localVarFp.getProject(id, iMXSignature, iMXTimestamp, options).then((request) => request(axios, basePath)); }, - /** - * Get projects - * @summary Get projects - * @param {string} iMXSignature String created by signing wallet address and timestamp - * @param {string} iMXTimestamp Unix Epoc timestamp - * @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 {*} [options] Override http request option. - * @throws {RequiredError} - */ - getProjects(iMXSignature: string, iMXTimestamp: string, pageSize?: number, cursor?: string, orderBy?: string, direction?: string, options?: any): AxiosPromise { - return localVarFp.getProjects(iMXSignature, iMXTimestamp, pageSize, cursor, orderBy, direction, options).then((request) => request(axios, basePath)); - }, - /** - * Checks the SDK Version of caller against the current SDK Version and returns a message. - * @summary Checks the SDK Version of caller against the current SDK Version - * @param {string} details Runtime Details - * @param {string} [version] SDK Version - * @param {string} [id] Runtime ID - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSdkVersion(details: string, version?: string, id?: string, options?: any): AxiosPromise { - return localVarFp.getSdkVersion(details, version, id, options).then((request) => request(axios, basePath)); - }, }; }; @@ -325,83 +154,6 @@ export interface ProjectsApiGetProjectRequest { readonly iMXTimestamp: string } -/** - * Request parameters for getProjects operation in ProjectsApi. - * @export - * @interface ProjectsApiGetProjectsRequest - */ -export interface ProjectsApiGetProjectsRequest { - /** - * String created by signing wallet address and timestamp - * @type {string} - * @memberof ProjectsApiGetProjects - */ - readonly iMXSignature: string - - /** - * Unix Epoc timestamp - * @type {string} - * @memberof ProjectsApiGetProjects - */ - readonly iMXTimestamp: string - - /** - * Page size of the result - * @type {number} - * @memberof ProjectsApiGetProjects - */ - readonly pageSize?: number - - /** - * Cursor - * @type {string} - * @memberof ProjectsApiGetProjects - */ - readonly cursor?: string - - /** - * Property to sort by - * @type {string} - * @memberof ProjectsApiGetProjects - */ - readonly orderBy?: string - - /** - * Direction to sort (asc/desc) - * @type {string} - * @memberof ProjectsApiGetProjects - */ - readonly direction?: string -} - -/** - * Request parameters for getSdkVersion operation in ProjectsApi. - * @export - * @interface ProjectsApiGetSdkVersionRequest - */ -export interface ProjectsApiGetSdkVersionRequest { - /** - * Runtime Details - * @type {string} - * @memberof ProjectsApiGetSdkVersion - */ - readonly details: string - - /** - * SDK Version - * @type {string} - * @memberof ProjectsApiGetSdkVersion - */ - readonly version?: string - - /** - * Runtime ID - * @type {string} - * @memberof ProjectsApiGetSdkVersion - */ - readonly id?: string -} - /** * ProjectsApi - object-oriented interface * @export @@ -420,28 +172,4 @@ export class ProjectsApi extends BaseAPI { public getProject(requestParameters: ProjectsApiGetProjectRequest, options?: AxiosRequestConfig) { return ProjectsApiFp(this.configuration).getProject(requestParameters.id, requestParameters.iMXSignature, requestParameters.iMXTimestamp, options).then((request) => request(this.axios, this.basePath)); } - - /** - * Get projects - * @summary Get projects - * @param {ProjectsApiGetProjectsRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectsApi - */ - public getProjects(requestParameters: ProjectsApiGetProjectsRequest, options?: AxiosRequestConfig) { - return ProjectsApiFp(this.configuration).getProjects(requestParameters.iMXSignature, requestParameters.iMXTimestamp, requestParameters.pageSize, requestParameters.cursor, requestParameters.orderBy, requestParameters.direction, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Checks the SDK Version of caller against the current SDK Version and returns a message. - * @summary Checks the SDK Version of caller against the current SDK Version - * @param {ProjectsApiGetSdkVersionRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProjectsApi - */ - public getSdkVersion(requestParameters: ProjectsApiGetSdkVersionRequest, options?: AxiosRequestConfig) { - return ProjectsApiFp(this.configuration).getSdkVersion(requestParameters.details, requestParameters.version, requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } } diff --git a/src/api/domain/withdrawals-api.ts b/src/api/domain/withdrawals-api.ts index 597d51da..53b3db27 100644 --- a/src/api/domain/withdrawals-api.ts +++ b/src/api/domain/withdrawals-api.ts @@ -23,12 +23,16 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr // @ts-ignore import { CreateWithdrawalRequest } from '../models'; // @ts-ignore +import { CreateWithdrawalRequestV2 } from '../models'; +// @ts-ignore import { CreateWithdrawalResponse } from '../models'; // @ts-ignore import { GetSignableWithdrawalRequest } from '../models'; // @ts-ignore import { GetSignableWithdrawalResponse } from '../models'; // @ts-ignore +import { GetSignableWithdrawalResponseV2 } from '../models'; +// @ts-ignore import { ListWithdrawalsResponse } from '../models'; // @ts-ignore import { Withdrawal } from '../models'; @@ -88,6 +92,56 @@ export const WithdrawalsApiAxiosParamCreator = function (configuration?: Configu options: localVarRequestOptions, }; }, + /** + * Creates a withdrawal. Use https://docs.x.immutable.com/reference#/operations/getSignableWithdrawal to get request body params. + * @summary Creates a withdrawal of a token for starkex contracts that are higher than v3 + * @param {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {CreateWithdrawalRequestV2} createWithdrawalRequestV2 create a withdrawal + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWithdrawalV2: async (xImxEthAddress: string, xImxEthSignature: string, createWithdrawalRequestV2: CreateWithdrawalRequestV2, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'xImxEthAddress' is not null or undefined + assertParamExists('createWithdrawalV2', 'xImxEthAddress', xImxEthAddress) + // verify required parameter 'xImxEthSignature' is not null or undefined + assertParamExists('createWithdrawalV2', 'xImxEthSignature', xImxEthSignature) + // verify required parameter 'createWithdrawalRequestV2' is not null or undefined + assertParamExists('createWithdrawalV2', 'createWithdrawalRequestV2', createWithdrawalRequestV2) + const localVarPath = `/v2/withdrawals`; + // 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(createWithdrawalRequestV2, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Gets details of a signable withdrawal * @summary Gets details of a signable withdrawal @@ -112,6 +166,42 @@ export const WithdrawalsApiAxiosParamCreator = function (configuration?: Configu + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(getSignableWithdrawalRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets details of a signable withdrawal + * @summary Gets details of a signable withdrawal for starkex contracts that are higher than v3 + * @param {GetSignableWithdrawalRequest} getSignableWithdrawalRequest get details of signable withdrawal + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSignableWithdrawalV2: async (getSignableWithdrawalRequest: GetSignableWithdrawalRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'getSignableWithdrawalRequest' is not null or undefined + assertParamExists('getSignableWithdrawalV2', 'getSignableWithdrawalRequest', getSignableWithdrawalRequest) + const localVarPath = `/v2/signable-withdrawal-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); @@ -301,6 +391,19 @@ export const WithdrawalsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.createWithdrawal(xImxEthAddress, xImxEthSignature, createWithdrawalRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Creates a withdrawal. Use https://docs.x.immutable.com/reference#/operations/getSignableWithdrawal to get request body params. + * @summary Creates a withdrawal of a token for starkex contracts that are higher than v3 + * @param {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {CreateWithdrawalRequestV2} createWithdrawalRequestV2 create a withdrawal + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createWithdrawalV2(xImxEthAddress: string, xImxEthSignature: string, createWithdrawalRequestV2: CreateWithdrawalRequestV2, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createWithdrawalV2(xImxEthAddress, xImxEthSignature, createWithdrawalRequestV2, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Gets details of a signable withdrawal * @summary Gets details of a signable withdrawal @@ -312,6 +415,17 @@ export const WithdrawalsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getSignableWithdrawal(getSignableWithdrawalRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Gets details of a signable withdrawal + * @summary Gets details of a signable withdrawal for starkex contracts that are higher than v3 + * @param {GetSignableWithdrawalRequest} getSignableWithdrawalRequest get details of signable withdrawal + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSignableWithdrawalV2(getSignableWithdrawalRequest: GetSignableWithdrawalRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSignableWithdrawalV2(getSignableWithdrawalRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Gets details of withdrawal with the given ID * @summary Gets details of withdrawal with the given ID @@ -373,6 +487,18 @@ export const WithdrawalsApiFactory = function (configuration?: Configuration, ba createWithdrawal(xImxEthAddress: string, xImxEthSignature: string, createWithdrawalRequest: CreateWithdrawalRequest, options?: any): AxiosPromise { return localVarFp.createWithdrawal(xImxEthAddress, xImxEthSignature, createWithdrawalRequest, options).then((request) => request(axios, basePath)); }, + /** + * Creates a withdrawal. Use https://docs.x.immutable.com/reference#/operations/getSignableWithdrawal to get request body params. + * @summary Creates a withdrawal of a token for starkex contracts that are higher than v3 + * @param {string} xImxEthAddress eth address + * @param {string} xImxEthSignature eth signature + * @param {CreateWithdrawalRequestV2} createWithdrawalRequestV2 create a withdrawal + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWithdrawalV2(xImxEthAddress: string, xImxEthSignature: string, createWithdrawalRequestV2: CreateWithdrawalRequestV2, options?: any): AxiosPromise { + return localVarFp.createWithdrawalV2(xImxEthAddress, xImxEthSignature, createWithdrawalRequestV2, options).then((request) => request(axios, basePath)); + }, /** * Gets details of a signable withdrawal * @summary Gets details of a signable withdrawal @@ -383,6 +509,16 @@ export const WithdrawalsApiFactory = function (configuration?: Configuration, ba getSignableWithdrawal(getSignableWithdrawalRequest: GetSignableWithdrawalRequest, options?: any): AxiosPromise { return localVarFp.getSignableWithdrawal(getSignableWithdrawalRequest, options).then((request) => request(axios, basePath)); }, + /** + * Gets details of a signable withdrawal + * @summary Gets details of a signable withdrawal for starkex contracts that are higher than v3 + * @param {GetSignableWithdrawalRequest} getSignableWithdrawalRequest get details of signable withdrawal + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSignableWithdrawalV2(getSignableWithdrawalRequest: GetSignableWithdrawalRequest, options?: any): AxiosPromise { + return localVarFp.getSignableWithdrawalV2(getSignableWithdrawalRequest, options).then((request) => request(axios, basePath)); + }, /** * Gets details of withdrawal with the given ID * @summary Gets details of withdrawal with the given ID @@ -451,6 +587,34 @@ export interface WithdrawalsApiCreateWithdrawalRequest { readonly createWithdrawalRequest: CreateWithdrawalRequest } +/** + * Request parameters for createWithdrawalV2 operation in WithdrawalsApi. + * @export + * @interface WithdrawalsApiCreateWithdrawalV2Request + */ +export interface WithdrawalsApiCreateWithdrawalV2Request { + /** + * eth address + * @type {string} + * @memberof WithdrawalsApiCreateWithdrawalV2 + */ + readonly xImxEthAddress: string + + /** + * eth signature + * @type {string} + * @memberof WithdrawalsApiCreateWithdrawalV2 + */ + readonly xImxEthSignature: string + + /** + * create a withdrawal + * @type {CreateWithdrawalRequestV2} + * @memberof WithdrawalsApiCreateWithdrawalV2 + */ + readonly createWithdrawalRequestV2: CreateWithdrawalRequestV2 +} + /** * Request parameters for getSignableWithdrawal operation in WithdrawalsApi. * @export @@ -465,6 +629,20 @@ export interface WithdrawalsApiGetSignableWithdrawalRequest { readonly getSignableWithdrawalRequest: GetSignableWithdrawalRequest } +/** + * Request parameters for getSignableWithdrawalV2 operation in WithdrawalsApi. + * @export + * @interface WithdrawalsApiGetSignableWithdrawalV2Request + */ +export interface WithdrawalsApiGetSignableWithdrawalV2Request { + /** + * get details of signable withdrawal + * @type {GetSignableWithdrawalRequest} + * @memberof WithdrawalsApiGetSignableWithdrawalV2 + */ + readonly getSignableWithdrawalRequest: GetSignableWithdrawalRequest +} + /** * Request parameters for getWithdrawal operation in WithdrawalsApi. * @export @@ -631,6 +809,18 @@ export class WithdrawalsApi extends BaseAPI { return WithdrawalsApiFp(this.configuration).createWithdrawal(requestParameters.xImxEthAddress, requestParameters.xImxEthSignature, requestParameters.createWithdrawalRequest, options).then((request) => request(this.axios, this.basePath)); } + /** + * Creates a withdrawal. Use https://docs.x.immutable.com/reference#/operations/getSignableWithdrawal to get request body params. + * @summary Creates a withdrawal of a token for starkex contracts that are higher than v3 + * @param {WithdrawalsApiCreateWithdrawalV2Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WithdrawalsApi + */ + public createWithdrawalV2(requestParameters: WithdrawalsApiCreateWithdrawalV2Request, options?: AxiosRequestConfig) { + return WithdrawalsApiFp(this.configuration).createWithdrawalV2(requestParameters.xImxEthAddress, requestParameters.xImxEthSignature, requestParameters.createWithdrawalRequestV2, options).then((request) => request(this.axios, this.basePath)); + } + /** * Gets details of a signable withdrawal * @summary Gets details of a signable withdrawal @@ -643,6 +833,18 @@ export class WithdrawalsApi extends BaseAPI { return WithdrawalsApiFp(this.configuration).getSignableWithdrawal(requestParameters.getSignableWithdrawalRequest, options).then((request) => request(this.axios, this.basePath)); } + /** + * Gets details of a signable withdrawal + * @summary Gets details of a signable withdrawal for starkex contracts that are higher than v3 + * @param {WithdrawalsApiGetSignableWithdrawalV2Request} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WithdrawalsApi + */ + public getSignableWithdrawalV2(requestParameters: WithdrawalsApiGetSignableWithdrawalV2Request, options?: AxiosRequestConfig) { + return WithdrawalsApiFp(this.configuration).getSignableWithdrawalV2(requestParameters.getSignableWithdrawalRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** * Gets details of withdrawal with the given ID * @summary Gets details of withdrawal with the given ID diff --git a/src/api/models/api-summarize-collections-response.ts b/src/api/models/api-summarize-collections-response.ts index aab820de..e746a4a0 100644 --- a/src/api/models/api-summarize-collections-response.ts +++ b/src/api/models/api-summarize-collections-response.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { ApiSummarizedCollection } from './api-summarized-collection'; +import { SummarizedCollection } from './summarized-collection'; /** * @@ -37,9 +37,9 @@ export interface ApiSummarizeCollectionsResponse { 'remaining': number; /** * Collections matching query parameters - * @type {Array} + * @type {Array} * @memberof ApiSummarizeCollectionsResponse */ - 'result': Array; + 'result': Array; } diff --git a/src/api/models/engine-register-user-result.ts b/src/api/models/create-project-apikey-response.ts similarity index 72% rename from src/api/models/engine-register-user-result.ts rename to src/api/models/create-project-apikey-response.ts index 3db3325a..a97668af 100644 --- a/src/api/models/engine-register-user-result.ts +++ b/src/api/models/create-project-apikey-response.ts @@ -17,14 +17,14 @@ /** * * @export - * @interface EngineRegisterUserResult + * @interface CreateProjectAPIKeyResponse */ -export interface EngineRegisterUserResult { +export interface CreateProjectAPIKeyResponse { /** * * @type {string} - * @memberof EngineRegisterUserResult + * @memberof CreateProjectAPIKeyResponse */ - 'tx_hash'?: string; + 'key': string; } diff --git a/src/api/models/create-project-response.ts b/src/api/models/create-project-response.ts index 66ff78bb..35fd62c2 100644 --- a/src/api/models/create-project-response.ts +++ b/src/api/models/create-project-response.ts @@ -21,10 +21,16 @@ */ export interface CreateProjectResponse { /** - * The project group ID + * The environment ID * @type {string} * @memberof CreateProjectResponse */ - 'id': string; + 'environment_id': string; + /** + * The project ID + * @type {number} + * @memberof CreateProjectResponse + */ + 'id': number; } diff --git a/src/api/models/index.ts b/src/api/models/index.ts index 574f865e..991c4e7d 100644 --- a/src/api/models/index.ts +++ b/src/api/models/index.ts @@ -82,6 +82,7 @@ export * from './create-primary-sale-params-body-fees-items'; export * from './create-primary-sale-unauthorized-body'; export * from './create-primary-sale-unauthorized-body-all-of0'; export * from './create-primary-sale-unauthorized-body-all-of1'; +export * from './create-project-apikey-response'; export * from './create-project-group-request'; export * from './create-project-request'; export * from './create-project-response'; @@ -104,7 +105,6 @@ export * from './encode-asset-request-token'; export * from './encode-asset-request-token-data'; export * from './encode-asset-response'; export * from './encode-asset-token-data'; -export * from './engine-register-user-result'; export * from './exchange'; export * from './exchange-create-exchange-and-urlresponse'; export * from './experimental-create-primary-sale-bad-request-body'; @@ -338,6 +338,8 @@ 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 './summarized-collection'; +export * from './summarized-collection-collection'; export * from './token'; export * from './token-data'; export * from './token-data-oaigen'; diff --git a/src/api/models/project.ts b/src/api/models/project.ts index 077dbec9..8332015b 100644 --- a/src/api/models/project.ts +++ b/src/api/models/project.ts @@ -20,6 +20,12 @@ * @interface Project */ export interface Project { + /** + * API key for the project. This is only for zkevm project. This API is not for increasing rate limit yet. + * @type {string} + * @memberof Project + */ + 'api_key'?: string; /** * The project ChainType * @type {string} @@ -27,13 +33,73 @@ export interface Project { */ 'chain_type'?: string; /** - * The project group ID + * The current period expiry date for collection limit + * @type {string} + * @memberof Project + */ + 'collection_limit_expires_at': string; + /** + * The total monthly collection limit + * @type {number} + * @memberof Project + */ + 'collection_monthly_limit': number; + /** + * The number of collection remaining in the current period + * @type {number} + * @memberof Project + */ + 'collection_remaining': number; + /** + * The company name * @type {string} * @memberof Project */ - 'id': string; + 'company_name': string; /** - * The project group name + * The project contact email (must be registered as a developer account with Immutable at https://hub.immutable.com) + * @type {string} + * @memberof Project + */ + 'contact_email': string; + /** + * The environment ID + * @type {string} + * @memberof Project + */ + 'environment_id'?: string; + /** + * The user environment name correlating to this project + * @type {string} + * @memberof Project + */ + 'environment_name'?: string; + /** + * The project ID + * @type {number} + * @memberof Project + */ + 'id': number; + /** + * The current period expiry date for mint operation limit + * @type {string} + * @memberof Project + */ + 'mint_limit_expires_at': string; + /** + * The total monthly mint operation limit + * @type {number} + * @memberof Project + */ + 'mint_monthly_limit': number; + /** + * The number of mint operation remaining in the current period + * @type {number} + * @memberof Project + */ + 'mint_remaining': number; + /** + * The project name * @type {string} * @memberof Project */ @@ -44,5 +110,23 @@ export interface Project { * @memberof Project */ 'org_id'?: string; + /** + * Project group id + * @type {string} + * @memberof Project + */ + 'project_group_id'?: string; + /** + * The public publishable_key for the project + * @type {string} + * @memberof Project + */ + 'publishable_key'?: string; + /** + * The public publishable_key created time + * @type {string} + * @memberof Project + */ + 'publishable_key_created_at'?: string; } diff --git a/src/api/models/summarized-collection-collection.ts b/src/api/models/summarized-collection-collection.ts new file mode 100644 index 00000000..5a99e686 --- /dev/null +++ b/src/api/models/summarized-collection-collection.ts @@ -0,0 +1,27 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable X API + * Immutable X API + * + * The version of the OpenAPI document: 3.0.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 { Collection } from './collection'; + +/** + * @type SummarizedCollectionCollection + * Collection and it\'s metadata + * @export + */ +export type SummarizedCollectionCollection = Collection; + + diff --git a/src/api/models/summarized-collection.ts b/src/api/models/summarized-collection.ts new file mode 100644 index 00000000..7bd526d4 --- /dev/null +++ b/src/api/models/summarized-collection.ts @@ -0,0 +1,45 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable X API + * Immutable X API + * + * The version of the OpenAPI document: 3.0.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 { SummarizedCollectionCollection } from './summarized-collection-collection'; + +/** + * + * @export + * @interface SummarizedCollection + */ +export interface SummarizedCollection { + /** + * + * @type {SummarizedCollectionCollection} + * @memberof SummarizedCollection + */ + 'collection': SummarizedCollectionCollection; + /** + * Combined amount of tokens owned by the provided wallets + * @type {number} + * @memberof SummarizedCollection + */ + 'owned_token_count': number; + /** + * Subset of the provided wallets that own at least one token in this collection + * @type {Array} + * @memberof SummarizedCollection + */ + 'owners': Array; +} + diff --git a/src/workflows/workflows.ts b/src/workflows/workflows.ts index bc20af6a..3e9713c0 100644 --- a/src/workflows/workflows.ts +++ b/src/workflows/workflows.ts @@ -372,25 +372,6 @@ export class Workflows { }); } - public async getProjects( - ethSigner: EthSigner, - pageSize?: number, - cursor?: string, - orderBy?: string, - direction?: string, - ) { - const imxAuthHeaders = await generateIMXAuthorisationHeaders(ethSigner); - - return this.projectsApi.getProjects({ - iMXSignature: imxAuthHeaders.signature, - iMXTimestamp: imxAuthHeaders.timestamp, - pageSize, - cursor, - orderBy, - direction, - }); - } - public async createCollection( ethSigner: EthSigner, createCollectionRequest: CreateCollectionRequest,