diff --git a/packages/internal/generated-clients/src/mr-openapi.json b/packages/internal/generated-clients/src/mr-openapi.json index 3a020d415a..cf3469a351 100644 --- a/packages/internal/generated-clients/src/mr-openapi.json +++ b/packages/internal/generated-clients/src/mr-openapi.json @@ -42,14 +42,20 @@ "x-displayName": "nft owners" }, { - "name": "demopage", - "description": "Temporary HTML endpoint for demo purposes", - "x-displayName": "demopage" + "name": "metadata", + "description": "NFT Metadata Endpoints", + "x-displayName": "metadata" }, { "name": "tokens", + "description": "ERC20 Token Endpoints", "x-displayName": "tokens" }, + { + "name": "demopage", + "description": "Temporary HTML endpoint for demo purposes", + "x-displayName": "demopage" + }, { "name": "listings", "description": "Listings Endpoints", @@ -385,6 +391,88 @@ } } }, + "/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata": { + "post": { + "description": "Refresh collection metadata", + "tags": [ + "collections" + ], + "operationId": "RefreshCollectionMetadata", + "summary": "Refresh collection metadata", + "security": [ + { + "ImmutableApiKey": [ + "refresh:metadata" + ] + } + ], + "parameters": [ + { + "name": "contract_address", + "in": "path", + "description": "The address contract", + "required": true, + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + } + ], + "requestBody": { + "description": "The request body", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefreshCollectionMetadataRequest" + } + } + } + }, + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefreshCollectionMetadataResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/UnauthorisedRequest" + }, + "403": { + "$ref": "#/components/responses/ForbiddenRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, "/v1/chains/{chain_name}/accounts/{account_address}/collections": { "get": { "description": "List collections by NFT owner account address", @@ -529,6 +617,143 @@ } } }, + "/v1/chains/{chain_name}/collections/{contract_address}/metadata/{metadata_id}": { + "get": { + "description": "Get a single metadata by ID", + "tags": [ + "metadata" + ], + "summary": "Get a single metadata by ID", + "operationId": "GetMetadata", + "parameters": [ + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "contract_address", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The address of metadata contract", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + }, + { + "name": "metadata_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/MetadataID" + }, + "description": "The id of the metadata" + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMetadataResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections/{contract_address}/metadata/refresh-metadata": { + "post": { + "x-go-name": "RefreshMetadataByID", + "operationId": "RefreshMetadataByID", + "description": "Refresh shared metadata for a collection", + "tags": [ + "metadata" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ChainName" + }, + { + "$ref": "#/components/parameters/ContractAddress" + } + ], + "security": [ + { + "ImmutableApiKey": [ + "refresh:metadata" + ] + } + ], + "requestBody": { + "description": "NFT Metadata Refresh Request", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefreshMetadataByIDRequest" + } + } + } + }, + "responses": { + "202": { + "description": "Accepted", + "headers": { + "imx-refreshes-limit": { + "$ref": "#/components/headers/MetadataRefreshLimit" + }, + "imx-refresh-limit-reset": { + "$ref": "#/components/headers/MetadataRefreshLimitReset" + }, + "imx-remaining-refreshes": { + "$ref": "#/components/headers/MetadataRefreshLimitRemaining" + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/UnauthorisedRequest" + }, + "403": { + "$ref": "#/components/responses/ForbiddenRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "429": { + "$ref": "#/components/responses/TooManyRequests" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, "/v1/chains/{chain_name}/collections/{contract_address}/nfts": { "get": { "description": "List NFTs by contract address", @@ -1283,12 +1508,12 @@ "schema": { "type": "string", "enum": [ - "created_at" + "indexed_at" ], "description": "Trade field to sort by", - "example": "created_at" + "example": "indexed_at" }, - "example": "created_at" + "example": "indexed_at" }, { "name": "sort_direction", @@ -1597,6 +1822,38 @@ "type": "http", "scheme": "bearer", "bearerFormat": "JWT" + }, + "ImmutableApiKey": { + "x-go-name": "ImmutableApiKey", + "type": "apiKey", + "in": "header", + "name": "X-Immutable-API-Key" + } + }, + "parameters": { + "ChainName": { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + "ContractAddress": { + "name": "contract_address", + "in": "path", + "required": true, + "description": "Contract address", + "schema": { + "$ref": "#/components/schemas/Address" + } } }, "responses": { @@ -1661,6 +1918,26 @@ } } }, + "headers": { + "MetadataRefreshLimit": { + "description": "The refresh request limit available to the project for each one-hour window.", + "schema": { + "type": "string" + } + }, + "MetadataRefreshLimitReset": { + "description": "The expiry date of the current one-hour window.", + "schema": { + "type": "string" + } + }, + "MetadataRefreshLimitRemaining": { + "description": "The number of refresh requests remaining in the current window.", + "schema": { + "type": "string" + } + } + }, "schemas": { "PageSize": { "type": "integer", @@ -1765,6 +2042,17 @@ "propertyName": "contract_type" } }, + "Address": { + "x-go-type": "common.Address", + "x-go-type-import": { + "package": "github.com/ethereum/go-ethereum/common", + "alias": "common" + }, + "description": "An Ethereum address", + "type": "string", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "Mint": { "type": "object", "description": "The mint activity details", @@ -2258,6 +2546,117 @@ "result" ] }, + "GetMetadataResult": { + "type": "object", + "description": "Single metadata", + "properties": { + "result": { + "$ref": "#/components/schemas/Metadata" + } + }, + "required": [ + "result" + ] + }, + "Metadata": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/MetadataID" + }, + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "contract_address": { + "type": "string", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e", + "description": "The contract address of the metadata" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z", + "description": "When the metadata was created" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the metadata was last updated", + "example": "2022-08-16T17:43:26.991388Z" + }, + "name": { + "type": "string", + "nullable": true, + "example": "Sword", + "description": "The name of the NFT" + }, + "description": { + "type": "string", + "nullable": true, + "example": "2022-08-16T17:43:26.991388Z", + "description": "The description of the NFT" + }, + "image": { + "type": "string", + "nullable": true, + "description": "The image url of the NFT", + "example": "https://some-url" + }, + "external_url": { + "type": "string", + "nullable": true, + "description": "The external website link of NFT", + "example": "https://some-url" + }, + "animation_url": { + "type": "string", + "nullable": true, + "description": "The animation url of the NFT", + "example": "https://some-url" + }, + "youtube_url": { + "type": "string", + "nullable": true, + "description": "The youtube URL of NFT", + "example": "https://some-url" + }, + "attributes": { + "type": "array", + "description": "List of Metadata attributes", + "nullable": true, + "items": { + "$ref": "#/components/schemas/NFTMetadataAttribute" + } + } + }, + "required": [ + "id", + "chain", + "contract_address", + "created_at", + "updated_at", + "name", + "description", + "image", + "external_link", + "animation_url", + "youtube_url", + "attributes" + ] + }, + "RefreshMetadataByIDRequest": { + "type": "object", + "description": "Request body for refreshing metadata by id", + "properties": { + "metadata": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RefreshMetadataByID" + } + } + } + }, "NFT": { "type": "object", "properties": { @@ -2287,6 +2686,13 @@ "description": "When NFT metadata was last synced", "example": "2022-08-16T17:43:26.991388Z" }, + "metadata_id": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "The id of the metadata of this NFT", + "example": "ae83bc80-4dd5-11ee-be56-0242ac120002" + }, "name": { "type": "string", "nullable": true, @@ -2401,6 +2807,12 @@ "format": "uuid", "example": "4e28df8d-f65c-4c11-ba04-6a9dd47b179b" }, + "MetadataID": { + "description": "Metadata ID in UUIDv4 format", + "type": "string", + "format": "uuid", + "example": "4e28df8d-f65c-4c11-ba04-6a9dd47b179b" + }, "CollectionContractType": { "description": "The collection contract type", "type": "string", @@ -2609,6 +3021,103 @@ "page" ] }, + "RefreshMetadataByID": { + "allOf": [ + { + "$ref": "#/components/schemas/RefreshableNFTAttributes" + }, + { + "type": "object", + "properties": { + "metadata_id": { + "$ref": "#/components/schemas/MetadataID" + } + }, + "required": [ + "metadata_id" + ] + } + ] + }, + "RefreshMetadataByTokenID": { + "allOf": [ + { + "$ref": "#/components/schemas/RefreshableNFTAttributes" + }, + { + "type": "object", + "properties": { + "token_id": { + "type": "string", + "description": "An `uint256` token id as string", + "example": "1" + } + }, + "required": [ + "token_id" + ] + } + ] + }, + "RefreshableNFTAttributes": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "example": "Sword", + "description": "The name of the NFT" + }, + "description": { + "type": "string", + "nullable": true, + "example": "2022-08-16T17:43:26.991388Z", + "description": "The description of the NFT" + }, + "image": { + "type": "string", + "nullable": true, + "description": "The image url of the NFT", + "example": "https://some-url" + }, + "external_url": { + "type": "string", + "nullable": true, + "description": "The external link of the NFT", + "example": "https://some-url" + }, + "animation_url": { + "type": "string", + "nullable": true, + "description": "The animation url of the NFT", + "example": "https://some-url" + }, + "youtube_url": { + "type": "string", + "nullable": true, + "description": "The youtube link of the NFT", + "example": "https://some-url" + }, + "attributes": { + "type": "array", + "description": "List of Metadata attributes", + "nullable": true, + "items": { + "$ref": "#/components/schemas/NFTMetadataAttribute" + } + } + }, + "required": [ + "token_id", + "name", + "description", + "image", + "external_url", + "animation_url", + "youtube_url", + "attributes" + ] + }, "Token": { "type": "object", "properties": { @@ -2661,9 +3170,91 @@ "name" ] }, - "DemoPage": { - "type": "string", - "example": "HTML text" + "CollectionMetadata": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "The name of the collection", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + "symbol": { + "type": "string", + "nullable": true, + "description": "The symbol of contract", + "example": "BASP" + }, + "description": { + "type": "string", + "nullable": true, + "description": "The description of collection", + "example": "Some description" + }, + "image": { + "type": "string", + "description": "The url of the collection image", + "example": "https://some-url", + "nullable": true + }, + "external_link": { + "type": "string", + "description": "The url of external link", + "example": "https://some-url", + "nullable": true + }, + "contract_uri": { + "type": "string", + "description": "The uri for the metadata of the collection", + "example": "https://some-url", + "nullable": true + }, + "base_uri": { + "type": "string", + "nullable": true, + "description": "The metadata uri for nft", + "example": "https://some-url" + } + }, + "required": [ + "name", + "image", + "symbol", + "description", + "base_uri", + "external_link", + "contract_uri" + ] + }, + "RefreshCollectionMetadataRequest": { + "type": "object", + "properties": { + "collection_metadata": { + "$ref": "#/components/schemas/CollectionMetadata" + } + }, + "required": [ + "collection_metadata" + ] + }, + "RefreshCollectionMetadataResult": { + "type": "object", + "properties": { + "contract_address": { + "type": "string" + }, + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "collection_metadata": { + "$ref": "#/components/schemas/CollectionMetadata" + } + }, + "required": [ + "contract_address", + "chain", + "collection_metadata" + ] }, "BasicAPIError": { "type": "object", @@ -2891,12 +3482,25 @@ "order_id": { "type": "string" }, - "fee": { - "$ref": "#/components/schemas/Fee" + "fees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Fee" + }, + "example": [ + { + "amount": "2250000000000000000", + "fee_type": "TAKER_MARKETPLACE", + "recipient": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92233" + } + ], + "minItems": 0, + "maxItems": 2 } }, "required": [ - "order_id" + "order_id", + "fees" ] }, "FulfillmentDataResult": { @@ -3025,8 +3629,15 @@ "minItems": 1, "maxItems": 1 }, - "fee": { - "$ref": "#/components/schemas/Fee" + "fees": { + "type": "array", + "description": "Buy fees should only include maker marketplace fees and should be no more than two entries as more entires will incur more gas. It is best practice to have this as few as possible.", + "items": { + "$ref": "#/components/schemas/Fee" + }, + "example": [], + "minItems": 0, + "maxItems": 2 }, "end_time": { "type": "string", @@ -3080,11 +3691,13 @@ "contract_address": "0x0165878A594ca255338adfa4d48449f69242Eb8F" } ], - "fee": { - "amount": "2250000000000000000", - "fee_type": "MAKER_MARKETPLACE", - "recipient": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92233" - }, + "fees": [ + { + "amount": "2250000000000000000", + "fee_type": "MAKER_MARKETPLACE", + "recipient": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92233" + } + ], "end_time": "2022-03-10T05:00:50.52Z", "protocol_data": { "order_type": "FULL_RESTRICTED", @@ -3109,6 +3722,7 @@ "order_hash", "buy", "sell", + "fees", "end_time", "start_time", "protocol_data", @@ -3116,29 +3730,6 @@ "signature" ] }, - "Error": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Error trace id", - "example": "1234567890" - }, - "message": { - "type": "string", - "description": "Error message", - "example": "Order creation failed" - } - }, - "description": "Resource not found", - "example": { - "id": "1234567890", - "message": "Order creation failed" - }, - "required": [ - "message" - ] - }, "Fee": { "type": "object", "properties": { @@ -3881,8 +4472,9 @@ "collections", "nfts", "nft owners", - "demopage", + "metadata", "tokens", + "demopage", "listings", "orders", "passport" diff --git a/packages/internal/generated-clients/src/multi-rollup/.openapi-generator/FILES b/packages/internal/generated-clients/src/multi-rollup/.openapi-generator/FILES index 4270517be8..30dec7c667 100644 --- a/packages/internal/generated-clients/src/multi-rollup/.openapi-generator/FILES +++ b/packages/internal/generated-clients/src/multi-rollup/.openapi-generator/FILES @@ -8,6 +8,7 @@ configuration.ts domain/activities-api.ts domain/chains-api.ts domain/collections-api.ts +domain/metadata-api.ts domain/nft-owners-api.ts domain/nfts-api.ts domain/orders-api.ts @@ -41,6 +42,7 @@ models/chain-with-details-all-of.ts models/chain-with-details.ts models/chain.ts models/collection-contract-type.ts +models/collection-metadata.ts models/collection.ts models/create-counterfactual-address-request.ts models/create-counterfactual-address-res.ts @@ -55,6 +57,7 @@ models/fulfillment-data200-response.ts models/get-activity-result.ts models/get-collection-result.ts models/get-linked-addresses-res.ts +models/get-metadata-result.ts models/get-nftresult.ts models/get-token-result.ts models/index.ts @@ -68,8 +71,8 @@ models/list-nfts-result.ts models/list-tokens-result.ts models/list-trade-result.ts models/listing-result.ts +models/metadata.ts models/mint.ts -models/model-error.ts models/native-item.ts models/nft.ts models/nftcontract-type.ts @@ -83,6 +86,14 @@ models/order-status.ts models/order.ts models/page.ts models/protocol-data.ts +models/refresh-collection-metadata-request.ts +models/refresh-collection-metadata-result.ts +models/refresh-metadata-by-id.ts +models/refresh-metadata-by-idall-of.ts +models/refresh-metadata-by-idrequest.ts +models/refresh-metadata-by-token-id.ts +models/refresh-metadata-by-token-idall-of.ts +models/refreshable-nftattributes.ts models/sale-fee.ts models/sale-payment-token.ts models/sale-payment.ts diff --git a/packages/internal/generated-clients/src/multi-rollup/api.ts b/packages/internal/generated-clients/src/multi-rollup/api.ts index 429bc9e5de..624f32928d 100644 --- a/packages/internal/generated-clients/src/multi-rollup/api.ts +++ b/packages/internal/generated-clients/src/multi-rollup/api.ts @@ -17,6 +17,7 @@ export * from './domain/activities-api'; export * from './domain/chains-api'; export * from './domain/collections-api'; +export * from './domain/metadata-api'; export * from './domain/nft-owners-api'; export * from './domain/nfts-api'; export * from './domain/orders-api'; diff --git a/packages/internal/generated-clients/src/multi-rollup/domain/collections-api.ts b/packages/internal/generated-clients/src/multi-rollup/domain/collections-api.ts index a69cfd6f7f..c2aa718e49 100644 --- a/packages/internal/generated-clients/src/multi-rollup/domain/collections-api.ts +++ b/packages/internal/generated-clients/src/multi-rollup/domain/collections-api.ts @@ -23,6 +23,10 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr // @ts-ignore import { APIError400 } from '../models'; // @ts-ignore +import { APIError401 } from '../models'; +// @ts-ignore +import { APIError403 } from '../models'; +// @ts-ignore import { APIError404 } from '../models'; // @ts-ignore import { APIError500 } from '../models'; @@ -30,6 +34,10 @@ import { APIError500 } from '../models'; import { GetCollectionResult } from '../models'; // @ts-ignore import { ListCollectionsResult } from '../models'; +// @ts-ignore +import { RefreshCollectionMetadataRequest } from '../models'; +// @ts-ignore +import { RefreshCollectionMetadataResult } from '../models'; /** * CollectionsApi - axios parameter creator * @export @@ -161,6 +169,53 @@ export const CollectionsApiAxiosParamCreator = function (configuration?: Configu let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Refresh collection metadata + * @summary Refresh collection metadata + * @param {string} contractAddress The address contract + * @param {string} chainName The name of chain + * @param {RefreshCollectionMetadataRequest} refreshCollectionMetadataRequest The request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + refreshCollectionMetadata: async (contractAddress: string, chainName: string, refreshCollectionMetadataRequest: RefreshCollectionMetadataRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'contractAddress' is not null or undefined + assertParamExists('refreshCollectionMetadata', 'contractAddress', contractAddress) + // verify required parameter 'chainName' is not null or undefined + assertParamExists('refreshCollectionMetadata', 'chainName', chainName) + // verify required parameter 'refreshCollectionMetadataRequest' is not null or undefined + assertParamExists('refreshCollectionMetadata', 'refreshCollectionMetadataRequest', refreshCollectionMetadataRequest) + const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata` + .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress))) + .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName))); + // 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; + + // authentication ImmutableApiKey required + await setApiKeyToObject(localVarHeaderParameter, "X-Immutable-API-Key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(refreshCollectionMetadataRequest, localVarRequestOptions, configuration) + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -215,6 +270,19 @@ export const CollectionsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Refresh collection metadata + * @summary Refresh collection metadata + * @param {string} contractAddress The address contract + * @param {string} chainName The name of chain + * @param {RefreshCollectionMetadataRequest} refreshCollectionMetadataRequest The request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async refreshCollectionMetadata(contractAddress: string, chainName: string, refreshCollectionMetadataRequest: RefreshCollectionMetadataRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.refreshCollectionMetadata(contractAddress, chainName, refreshCollectionMetadataRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, } }; @@ -261,6 +329,18 @@ export const CollectionsApiFactory = function (configuration?: Configuration, ba listCollectionsByNFTOwner(accountAddress: string, chainName: string, pageCursor?: string, pageSize?: number, options?: any): AxiosPromise { return localVarFp.listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath)); }, + /** + * Refresh collection metadata + * @summary Refresh collection metadata + * @param {string} contractAddress The address contract + * @param {string} chainName The name of chain + * @param {RefreshCollectionMetadataRequest} refreshCollectionMetadataRequest The request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + refreshCollectionMetadata(contractAddress: string, chainName: string, refreshCollectionMetadataRequest: RefreshCollectionMetadataRequest, options?: any): AxiosPromise { + return localVarFp.refreshCollectionMetadata(contractAddress, chainName, refreshCollectionMetadataRequest, options).then((request) => request(axios, basePath)); + }, }; }; @@ -348,6 +428,34 @@ export interface CollectionsApiListCollectionsByNFTOwnerRequest { readonly pageSize?: number } +/** + * Request parameters for refreshCollectionMetadata operation in CollectionsApi. + * @export + * @interface CollectionsApiRefreshCollectionMetadataRequest + */ +export interface CollectionsApiRefreshCollectionMetadataRequest { + /** + * The address contract + * @type {string} + * @memberof CollectionsApiRefreshCollectionMetadata + */ + readonly contractAddress: string + + /** + * The name of chain + * @type {string} + * @memberof CollectionsApiRefreshCollectionMetadata + */ + readonly chainName: string + + /** + * The request body + * @type {RefreshCollectionMetadataRequest} + * @memberof CollectionsApiRefreshCollectionMetadata + */ + readonly refreshCollectionMetadataRequest: RefreshCollectionMetadataRequest +} + /** * CollectionsApi - object-oriented interface * @export @@ -390,4 +498,16 @@ export class CollectionsApi extends BaseAPI { public listCollectionsByNFTOwner(requestParameters: CollectionsApiListCollectionsByNFTOwnerRequest, options?: AxiosRequestConfig) { return CollectionsApiFp(this.configuration).listCollectionsByNFTOwner(requestParameters.accountAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath)); } + + /** + * Refresh collection metadata + * @summary Refresh collection metadata + * @param {CollectionsApiRefreshCollectionMetadataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CollectionsApi + */ + public refreshCollectionMetadata(requestParameters: CollectionsApiRefreshCollectionMetadataRequest, options?: AxiosRequestConfig) { + return CollectionsApiFp(this.configuration).refreshCollectionMetadata(requestParameters.contractAddress, requestParameters.chainName, requestParameters.refreshCollectionMetadataRequest, options).then((request) => request(this.axios, this.basePath)); + } } diff --git a/packages/internal/generated-clients/src/multi-rollup/domain/metadata-api.ts b/packages/internal/generated-clients/src/multi-rollup/domain/metadata-api.ts new file mode 100644 index 0000000000..45a014066d --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/domain/metadata-api.ts @@ -0,0 +1,289 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.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. + */ + + +import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +// @ts-ignore +import { APIError400 } from '../models'; +// @ts-ignore +import { APIError401 } from '../models'; +// @ts-ignore +import { APIError403 } from '../models'; +// @ts-ignore +import { APIError404 } from '../models'; +// @ts-ignore +import { APIError429 } from '../models'; +// @ts-ignore +import { APIError500 } from '../models'; +// @ts-ignore +import { GetMetadataResult } from '../models'; +// @ts-ignore +import { RefreshMetadataByIDRequest } from '../models'; +/** + * MetadataApi - axios parameter creator + * @export + */ +export const MetadataApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get a single metadata by ID + * @summary Get a single metadata by ID + * @param {string} chainName The name of chain + * @param {string} contractAddress The address of metadata contract + * @param {string} metadataId The id of the metadata + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMetadata: async (chainName: string, contractAddress: string, metadataId: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'chainName' is not null or undefined + assertParamExists('getMetadata', 'chainName', chainName) + // verify required parameter 'contractAddress' is not null or undefined + assertParamExists('getMetadata', 'contractAddress', contractAddress) + // verify required parameter 'metadataId' is not null or undefined + assertParamExists('getMetadata', 'metadataId', metadataId) + const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/metadata/{metadata_id}` + .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName))) + .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress))) + .replace(`{${"metadata_id"}}`, encodeURIComponent(String(metadataId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Refresh shared metadata for a collection + * @param {string} chainName The name of chain + * @param {string} contractAddress Contract address + * @param {RefreshMetadataByIDRequest} refreshMetadataByIDRequest NFT Metadata Refresh Request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + refreshMetadataByID: async (chainName: string, contractAddress: string, refreshMetadataByIDRequest: RefreshMetadataByIDRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'chainName' is not null or undefined + assertParamExists('refreshMetadataByID', 'chainName', chainName) + // verify required parameter 'contractAddress' is not null or undefined + assertParamExists('refreshMetadataByID', 'contractAddress', contractAddress) + // verify required parameter 'refreshMetadataByIDRequest' is not null or undefined + assertParamExists('refreshMetadataByID', 'refreshMetadataByIDRequest', refreshMetadataByIDRequest) + const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/metadata/refresh-metadata` + .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName))) + .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress))); + // 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; + + // authentication ImmutableApiKey required + await setApiKeyToObject(localVarHeaderParameter, "X-Immutable-API-Key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(refreshMetadataByIDRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * MetadataApi - functional programming interface + * @export + */ +export const MetadataApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MetadataApiAxiosParamCreator(configuration) + return { + /** + * Get a single metadata by ID + * @summary Get a single metadata by ID + * @param {string} chainName The name of chain + * @param {string} contractAddress The address of metadata contract + * @param {string} metadataId The id of the metadata + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMetadata(chainName: string, contractAddress: string, metadataId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMetadata(chainName, contractAddress, metadataId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Refresh shared metadata for a collection + * @param {string} chainName The name of chain + * @param {string} contractAddress Contract address + * @param {RefreshMetadataByIDRequest} refreshMetadataByIDRequest NFT Metadata Refresh Request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async refreshMetadataByID(chainName: string, contractAddress: string, refreshMetadataByIDRequest: RefreshMetadataByIDRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.refreshMetadataByID(chainName, contractAddress, refreshMetadataByIDRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * MetadataApi - factory interface + * @export + */ +export const MetadataApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MetadataApiFp(configuration) + return { + /** + * Get a single metadata by ID + * @summary Get a single metadata by ID + * @param {string} chainName The name of chain + * @param {string} contractAddress The address of metadata contract + * @param {string} metadataId The id of the metadata + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMetadata(chainName: string, contractAddress: string, metadataId: string, options?: any): AxiosPromise { + return localVarFp.getMetadata(chainName, contractAddress, metadataId, options).then((request) => request(axios, basePath)); + }, + /** + * Refresh shared metadata for a collection + * @param {string} chainName The name of chain + * @param {string} contractAddress Contract address + * @param {RefreshMetadataByIDRequest} refreshMetadataByIDRequest NFT Metadata Refresh Request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + refreshMetadataByID(chainName: string, contractAddress: string, refreshMetadataByIDRequest: RefreshMetadataByIDRequest, options?: any): AxiosPromise { + return localVarFp.refreshMetadataByID(chainName, contractAddress, refreshMetadataByIDRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for getMetadata operation in MetadataApi. + * @export + * @interface MetadataApiGetMetadataRequest + */ +export interface MetadataApiGetMetadataRequest { + /** + * The name of chain + * @type {string} + * @memberof MetadataApiGetMetadata + */ + readonly chainName: string + + /** + * The address of metadata contract + * @type {string} + * @memberof MetadataApiGetMetadata + */ + readonly contractAddress: string + + /** + * The id of the metadata + * @type {string} + * @memberof MetadataApiGetMetadata + */ + readonly metadataId: string +} + +/** + * Request parameters for refreshMetadataByID operation in MetadataApi. + * @export + * @interface MetadataApiRefreshMetadataByIDRequest + */ +export interface MetadataApiRefreshMetadataByIDRequest { + /** + * The name of chain + * @type {string} + * @memberof MetadataApiRefreshMetadataByID + */ + readonly chainName: string + + /** + * Contract address + * @type {string} + * @memberof MetadataApiRefreshMetadataByID + */ + readonly contractAddress: string + + /** + * NFT Metadata Refresh Request + * @type {RefreshMetadataByIDRequest} + * @memberof MetadataApiRefreshMetadataByID + */ + readonly refreshMetadataByIDRequest: RefreshMetadataByIDRequest +} + +/** + * MetadataApi - object-oriented interface + * @export + * @class MetadataApi + * @extends {BaseAPI} + */ +export class MetadataApi extends BaseAPI { + /** + * Get a single metadata by ID + * @summary Get a single metadata by ID + * @param {MetadataApiGetMetadataRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetadataApi + */ + public getMetadata(requestParameters: MetadataApiGetMetadataRequest, options?: AxiosRequestConfig) { + return MetadataApiFp(this.configuration).getMetadata(requestParameters.chainName, requestParameters.contractAddress, requestParameters.metadataId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Refresh shared metadata for a collection + * @param {MetadataApiRefreshMetadataByIDRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetadataApi + */ + public refreshMetadataByID(requestParameters: MetadataApiRefreshMetadataByIDRequest, options?: AxiosRequestConfig) { + return MetadataApiFp(this.configuration).refreshMetadataByID(requestParameters.chainName, requestParameters.contractAddress, requestParameters.refreshMetadataByIDRequest, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/packages/internal/generated-clients/src/multi-rollup/domain/orders-api.ts b/packages/internal/generated-clients/src/multi-rollup/domain/orders-api.ts index 06d4454415..6a5820a98c 100644 --- a/packages/internal/generated-clients/src/multi-rollup/domain/orders-api.ts +++ b/packages/internal/generated-clients/src/multi-rollup/domain/orders-api.ts @@ -284,13 +284,13 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio * @param {string} chainName * @param {string} [accountAddress] * @param {number} [pageSize] Maximum number of trades to return per page - * @param {'created_at'} [sortBy] Trade field to sort by + * @param {'indexed_at'} [sortBy] Trade field to sort by * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTrades: async (chainName: string, accountAddress?: string, pageSize?: number, sortBy?: 'created_at', sortDirection?: 'asc' | 'desc', pageCursor?: string, options: AxiosRequestConfig = {}): Promise => { + listTrades: async (chainName: string, accountAddress?: string, pageSize?: number, sortBy?: 'indexed_at', sortDirection?: 'asc' | 'desc', pageCursor?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'chainName' is not null or undefined assertParamExists('listTrades', 'chainName', chainName) const localVarPath = `/v1/chains/{chain_name}/trades` @@ -420,13 +420,13 @@ export const OrdersApiFp = function(configuration?: Configuration) { * @param {string} chainName * @param {string} [accountAddress] * @param {number} [pageSize] Maximum number of trades to return per page - * @param {'created_at'} [sortBy] Trade field to sort by + * @param {'indexed_at'} [sortBy] Trade field to sort by * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTrades(chainName: string, accountAddress?: string, pageSize?: number, sortBy?: 'created_at', sortDirection?: 'asc' | 'desc', pageCursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async listTrades(chainName: string, accountAddress?: string, pageSize?: number, sortBy?: 'indexed_at', sortDirection?: 'asc' | 'desc', pageCursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -508,13 +508,13 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat * @param {string} chainName * @param {string} [accountAddress] * @param {number} [pageSize] Maximum number of trades to return per page - * @param {'created_at'} [sortBy] Trade field to sort by + * @param {'indexed_at'} [sortBy] Trade field to sort by * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTrades(chainName: string, accountAddress?: string, pageSize?: number, sortBy?: 'created_at', sortDirection?: 'asc' | 'desc', pageCursor?: string, options?: any): AxiosPromise { + listTrades(chainName: string, accountAddress?: string, pageSize?: number, sortBy?: 'indexed_at', sortDirection?: 'asc' | 'desc', pageCursor?: string, options?: any): AxiosPromise { return localVarFp.listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath)); }, }; @@ -703,10 +703,10 @@ export interface OrdersApiListTradesRequest { /** * Trade field to sort by - * @type {'created_at'} + * @type {'indexed_at'} * @memberof OrdersApiListTrades */ - readonly sortBy?: 'created_at' + readonly sortBy?: 'indexed_at' /** * Ascending or descending direction for sort diff --git a/packages/internal/generated-clients/src/multi-rollup/models/collection-metadata.ts b/packages/internal/generated-clients/src/multi-rollup/models/collection-metadata.ts new file mode 100644 index 0000000000..7e5d2eb75b --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/collection-metadata.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.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. + */ + + + +/** + * + * @export + * @interface CollectionMetadata + */ +export interface CollectionMetadata { + /** + * The name of the collection + * @type {string} + * @memberof CollectionMetadata + */ + 'name': string | null; + /** + * The symbol of contract + * @type {string} + * @memberof CollectionMetadata + */ + 'symbol': string | null; + /** + * The description of collection + * @type {string} + * @memberof CollectionMetadata + */ + 'description': string | null; + /** + * The url of the collection image + * @type {string} + * @memberof CollectionMetadata + */ + 'image': string | null; + /** + * The url of external link + * @type {string} + * @memberof CollectionMetadata + */ + 'external_link': string | null; + /** + * The uri for the metadata of the collection + * @type {string} + * @memberof CollectionMetadata + */ + 'contract_uri': string | null; + /** + * The metadata uri for nft + * @type {string} + * @memberof CollectionMetadata + */ + 'base_uri': string | null; +} + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/create-listing-request-body.ts b/packages/internal/generated-clients/src/multi-rollup/models/create-listing-request-body.ts index 2c1131d705..8140dd4901 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/create-listing-request-body.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/create-listing-request-body.ts @@ -48,11 +48,11 @@ export interface CreateListingRequestBody { */ 'buy': Array; /** - * - * @type {Fee} + * Buy fees should only include maker marketplace fees and should be no more than two entries as more entires will incur more gas. It is best practice to have this as few as possible. + * @type {Array} * @memberof CreateListingRequestBody */ - 'fee'?: Fee; + 'fees': Array; /** * Time after which the Order is considered expired * @type {string} diff --git a/packages/internal/generated-clients/src/multi-rollup/models/fulfillment-data-request.ts b/packages/internal/generated-clients/src/multi-rollup/models/fulfillment-data-request.ts index 984d81cdca..8920deb638 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/fulfillment-data-request.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/fulfillment-data-request.ts @@ -31,9 +31,9 @@ export interface FulfillmentDataRequest { 'order_id': string; /** * - * @type {Fee} + * @type {Array} * @memberof FulfillmentDataRequest */ - 'fee'?: Fee; + 'fees': Array; } diff --git a/packages/internal/generated-clients/src/multi-rollup/models/get-metadata-result.ts b/packages/internal/generated-clients/src/multi-rollup/models/get-metadata-result.ts new file mode 100644 index 0000000000..64ed25687a --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/get-metadata-result.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.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 { Metadata } from './metadata'; + +/** + * Single metadata + * @export + * @interface GetMetadataResult + */ +export interface GetMetadataResult { + /** + * + * @type {Metadata} + * @memberof GetMetadataResult + */ + 'result': Metadata; +} + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/index.ts b/packages/internal/generated-clients/src/multi-rollup/models/index.ts index 12572c2987..279dc49fbb 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/index.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/index.ts @@ -25,6 +25,7 @@ export * from './chain-with-details'; export * from './chain-with-details-all-of'; export * from './collection'; export * from './collection-contract-type'; +export * from './collection-metadata'; export * from './create-counterfactual-address-request'; export * from './create-counterfactual-address-res'; export * from './create-listing-request-body'; @@ -38,6 +39,7 @@ export * from './fulfillment-data-result'; export * from './get-activity-result'; export * from './get-collection-result'; export * from './get-linked-addresses-res'; +export * from './get-metadata-result'; export * from './get-nftresult'; export * from './get-token-result'; export * from './item'; @@ -50,8 +52,8 @@ export * from './list-nfts-result'; export * from './list-tokens-result'; export * from './list-trade-result'; export * from './listing-result'; +export * from './metadata'; export * from './mint'; -export * from './model-error'; export * from './nft'; export * from './nftcontract-type'; export * from './nftmetadata-attribute'; @@ -65,6 +67,14 @@ export * from './order'; export * from './order-status'; export * from './page'; export * from './protocol-data'; +export * from './refresh-collection-metadata-request'; +export * from './refresh-collection-metadata-result'; +export * from './refresh-metadata-by-id'; +export * from './refresh-metadata-by-idall-of'; +export * from './refresh-metadata-by-idrequest'; +export * from './refresh-metadata-by-token-id'; +export * from './refresh-metadata-by-token-idall-of'; +export * from './refreshable-nftattributes'; export * from './sale-fee'; export * from './sale-payment'; export * from './sale-payment-token'; diff --git a/packages/internal/generated-clients/src/multi-rollup/models/metadata.ts b/packages/internal/generated-clients/src/multi-rollup/models/metadata.ts new file mode 100644 index 0000000000..48c9a8aaf5 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/metadata.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.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 { Chain } from './chain'; +// May contain unused imports in some cases +// @ts-ignore +import { NFTMetadataAttribute } from './nftmetadata-attribute'; + +/** + * + * @export + * @interface Metadata + */ +export interface Metadata { + /** + * Metadata ID in UUIDv4 format + * @type {string} + * @memberof Metadata + */ + 'id': string; + /** + * + * @type {Chain} + * @memberof Metadata + */ + 'chain': Chain; + /** + * The contract address of the metadata + * @type {string} + * @memberof Metadata + */ + 'contract_address': string; + /** + * When the metadata was created + * @type {string} + * @memberof Metadata + */ + 'created_at': string; + /** + * When the metadata was last updated + * @type {string} + * @memberof Metadata + */ + 'updated_at': string | null; + /** + * The name of the NFT + * @type {string} + * @memberof Metadata + */ + 'name': string | null; + /** + * The description of the NFT + * @type {string} + * @memberof Metadata + */ + 'description': string | null; + /** + * The image url of the NFT + * @type {string} + * @memberof Metadata + */ + 'image': string | null; + /** + * The external website link of NFT + * @type {string} + * @memberof Metadata + */ + 'external_url'?: string | null; + /** + * The animation url of the NFT + * @type {string} + * @memberof Metadata + */ + 'animation_url': string | null; + /** + * The youtube URL of NFT + * @type {string} + * @memberof Metadata + */ + 'youtube_url': string | null; + /** + * List of Metadata attributes + * @type {Array} + * @memberof Metadata + */ + 'attributes': Array | null; +} + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/nft.ts b/packages/internal/generated-clients/src/multi-rollup/models/nft.ts index 2cc6f72d82..1541f78605 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/nft.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/nft.ts @@ -53,6 +53,12 @@ export interface NFT { * @memberof NFT */ 'metadata_synced_at': string | null; + /** + * The id of the metadata of this NFT + * @type {string} + * @memberof NFT + */ + 'metadata_id'?: string | null; /** * The name of the NFT * @type {string} diff --git a/packages/internal/generated-clients/src/multi-rollup/models/refresh-collection-metadata-request.ts b/packages/internal/generated-clients/src/multi-rollup/models/refresh-collection-metadata-request.ts new file mode 100644 index 0000000000..69b2e3e3b0 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/refresh-collection-metadata-request.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.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 { CollectionMetadata } from './collection-metadata'; + +/** + * + * @export + * @interface RefreshCollectionMetadataRequest + */ +export interface RefreshCollectionMetadataRequest { + /** + * + * @type {CollectionMetadata} + * @memberof RefreshCollectionMetadataRequest + */ + 'collection_metadata': CollectionMetadata; +} + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/refresh-collection-metadata-result.ts b/packages/internal/generated-clients/src/multi-rollup/models/refresh-collection-metadata-result.ts new file mode 100644 index 0000000000..174447156c --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/refresh-collection-metadata-result.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.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 { Chain } from './chain'; +// May contain unused imports in some cases +// @ts-ignore +import { CollectionMetadata } from './collection-metadata'; + +/** + * + * @export + * @interface RefreshCollectionMetadataResult + */ +export interface RefreshCollectionMetadataResult { + /** + * + * @type {string} + * @memberof RefreshCollectionMetadataResult + */ + 'contract_address': string; + /** + * + * @type {Chain} + * @memberof RefreshCollectionMetadataResult + */ + 'chain': Chain; + /** + * + * @type {CollectionMetadata} + * @memberof RefreshCollectionMetadataResult + */ + 'collection_metadata': CollectionMetadata; +} + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-id.ts b/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-id.ts new file mode 100644 index 0000000000..7fe2f11533 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-id.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.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 { NFTMetadataAttribute } from './nftmetadata-attribute'; +// May contain unused imports in some cases +// @ts-ignore +import { RefreshMetadataByIDAllOf } from './refresh-metadata-by-idall-of'; +// May contain unused imports in some cases +// @ts-ignore +import { RefreshableNFTAttributes } from './refreshable-nftattributes'; + +/** + * @type RefreshMetadataByID + * @export + */ +export type RefreshMetadataByID = RefreshMetadataByIDAllOf & RefreshableNFTAttributes; + + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/model-error.ts b/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-idall-of.ts similarity index 61% rename from packages/internal/generated-clients/src/multi-rollup/models/model-error.ts rename to packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-idall-of.ts index d5bff3ee72..e955f3a060 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/model-error.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-idall-of.ts @@ -15,22 +15,16 @@ /** - * Resource not found + * * @export - * @interface ModelError + * @interface RefreshMetadataByIDAllOf */ -export interface ModelError { +export interface RefreshMetadataByIDAllOf { /** - * Error trace id + * Metadata ID in UUIDv4 format * @type {string} - * @memberof ModelError + * @memberof RefreshMetadataByIDAllOf */ - 'id'?: string; - /** - * Error message - * @type {string} - * @memberof ModelError - */ - 'message': string; + 'metadata_id': string; } diff --git a/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-idrequest.ts b/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-idrequest.ts new file mode 100644 index 0000000000..da837a2d54 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-idrequest.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.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 { RefreshMetadataByID } from './refresh-metadata-by-id'; + +/** + * Request body for refreshing metadata by id + * @export + * @interface RefreshMetadataByIDRequest + */ +export interface RefreshMetadataByIDRequest { + /** + * + * @type {Array} + * @memberof RefreshMetadataByIDRequest + */ + 'metadata'?: Array; +} + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-token-id.ts b/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-token-id.ts new file mode 100644 index 0000000000..9d09f24921 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-token-id.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.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 { NFTMetadataAttribute } from './nftmetadata-attribute'; +// May contain unused imports in some cases +// @ts-ignore +import { RefreshMetadataByTokenIDAllOf } from './refresh-metadata-by-token-idall-of'; +// May contain unused imports in some cases +// @ts-ignore +import { RefreshableNFTAttributes } from './refreshable-nftattributes'; + +/** + * @type RefreshMetadataByTokenID + * @export + */ +export type RefreshMetadataByTokenID = RefreshMetadataByTokenIDAllOf & RefreshableNFTAttributes; + + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-token-idall-of.ts b/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-token-idall-of.ts new file mode 100644 index 0000000000..6c7a1f78f7 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/refresh-metadata-by-token-idall-of.ts @@ -0,0 +1,30 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.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. + */ + + + +/** + * + * @export + * @interface RefreshMetadataByTokenIDAllOf + */ +export interface RefreshMetadataByTokenIDAllOf { + /** + * An `uint256` token id as string + * @type {string} + * @memberof RefreshMetadataByTokenIDAllOf + */ + 'token_id': string; +} + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/refreshable-nftattributes.ts b/packages/internal/generated-clients/src/multi-rollup/models/refreshable-nftattributes.ts new file mode 100644 index 0000000000..9372db43da --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/refreshable-nftattributes.ts @@ -0,0 +1,69 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.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 { NFTMetadataAttribute } from './nftmetadata-attribute'; + +/** + * + * @export + * @interface RefreshableNFTAttributes + */ +export interface RefreshableNFTAttributes { + /** + * The name of the NFT + * @type {string} + * @memberof RefreshableNFTAttributes + */ + 'name': string | null; + /** + * The description of the NFT + * @type {string} + * @memberof RefreshableNFTAttributes + */ + 'description': string | null; + /** + * The image url of the NFT + * @type {string} + * @memberof RefreshableNFTAttributes + */ + 'image': string | null; + /** + * The external link of the NFT + * @type {string} + * @memberof RefreshableNFTAttributes + */ + 'external_url': string | null; + /** + * The animation url of the NFT + * @type {string} + * @memberof RefreshableNFTAttributes + */ + 'animation_url': string | null; + /** + * The youtube link of the NFT + * @type {string} + * @memberof RefreshableNFTAttributes + */ + 'youtube_url': string | null; + /** + * List of Metadata attributes + * @type {Array} + * @memberof RefreshableNFTAttributes + */ + 'attributes': Array | null; +} +