From 680a383cbeca46780a7aa1dec36e60a72225ba25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 May 2023 11:38:11 -0300 Subject: [PATCH] chore: bump @dcl/catalyst-api-specs from 3.1.9 to 3.1.10 (#178) * chore: bump @dcl/catalyst-api-specs from 3.1.9 to 3.1.10 Bumps [@dcl/catalyst-api-specs](https://github.com/decentraland/catalyst-api-specs) from 3.1.9 to 3.1.10. - [Release notes](https://github.com/decentraland/catalyst-api-specs/releases) - [Commits](https://github.com/decentraland/catalyst-api-specs/compare/3.1.9...3.1.10) --- updated-dependencies: - dependency-name: "@dcl/catalyst-api-specs" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Hugo Arregui --- package.json | 2 +- src/adapters/realm-name-validator.ts | 4 ++-- src/controllers/handlers/about-handler.ts | 4 ++-- src/controllers/handlers/errorHandler.ts | 4 ++-- src/controllers/handlers/lands-handler.ts | 4 ++-- src/controllers/handlers/names-handler.ts | 4 ++-- src/controllers/handlers/profiles-handler.ts | 6 +++--- .../handlers/third-party-wearables-handler.ts | 6 +++--- yarn.lock | 19 +++++-------------- 9 files changed, 22 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 1c290668..328ac93a 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "tabWidth": 2 }, "dependencies": { - "@dcl/catalyst-api-specs": "^3.1.9", + "@dcl/catalyst-api-specs": "^3.1.10", "@dcl/crypto": "^3.4.1", "@dcl/schemas": "^7.1.0", "@dcl/urn-resolver": "^2.0.3", diff --git a/src/adapters/realm-name-validator.ts b/src/adapters/realm-name-validator.ts index 01f3d91d..379a3255 100644 --- a/src/adapters/realm-name-validator.ts +++ b/src/adapters/realm-name-validator.ts @@ -2,7 +2,7 @@ import { IBaseComponent } from '@well-known-components/interfaces' import { BaseComponents } from '../types' import { getCatalystServersFromDAO } from 'dcl-catalyst-client/dist/contracts' import { CatalystServerInfo } from 'dcl-catalyst-client/dist/types' -import { GetAboutCatalystInfo200 } from '@dcl/catalyst-api-specs/lib/client' +import { About } from '@dcl/catalyst-api-specs/lib/client' export type IRealmNameComponent = IBaseComponent & { getValidatedRealmName(): Promise @@ -20,7 +20,7 @@ export async function createRealmNameComponent( } try { - const data: GetAboutCatalystInfo200 = await response.json() + const data: About = await response.json() return data.configurations.realmName } catch (err) { return undefined diff --git a/src/controllers/handlers/about-handler.ts b/src/controllers/handlers/about-handler.ts index 3f5aae60..2b2bac85 100644 --- a/src/controllers/handlers/about-handler.ts +++ b/src/controllers/handlers/about-handler.ts @@ -1,5 +1,5 @@ import { HandlerContextWithPath } from '../../types' -import { GetAboutCatalystInfo200 } from '@dcl/catalyst-api-specs/lib/client' +import { About } from '@dcl/catalyst-api-specs/lib/client' const networkIds: Record = { goerli: 5, @@ -33,7 +33,7 @@ export async function aboutHandler( HandlerContextWithPath<'status' | 'resourcesStatusCheck' | 'config' | 'realmName', '/about'>, 'url' | 'components' > -): Promise<{ status: 200 | 503; body: GetAboutCatalystInfo200 }> { +): Promise<{ status: 200 | 503; body: About }> { const { config, status, resourcesStatusCheck, realmName } = context.components const ethNetwork = (await config.getString('ETH_NETWORK')) ?? 'mainnet' diff --git a/src/controllers/handlers/errorHandler.ts b/src/controllers/handlers/errorHandler.ts index 18ebd06a..4162b020 100644 --- a/src/controllers/handlers/errorHandler.ts +++ b/src/controllers/handlers/errorHandler.ts @@ -1,9 +1,9 @@ -import { LambdasErrorResponse } from '@dcl/catalyst-api-specs/lib/client' +import { LambdasError } from '@dcl/catalyst-api-specs/lib/client' import { IHttpServerComponent } from '@well-known-components/interfaces' import { InvalidRequestError, NotFoundError } from '../../types' import { FetcherError } from '../../adapters/elements-fetcher' -function handleError(error: any): { status: number; body: LambdasErrorResponse } { +function handleError(error: any): { status: number; body: LambdasError } { if (error instanceof InvalidRequestError) { return { status: 400, diff --git a/src/controllers/handlers/lands-handler.ts b/src/controllers/handlers/lands-handler.ts index 724c2c9f..dfc9288c 100644 --- a/src/controllers/handlers/lands-handler.ts +++ b/src/controllers/handlers/lands-handler.ts @@ -1,10 +1,10 @@ import { fetchAndPaginate, paginationObject } from '../../logic/pagination' import { HandlerContextWithPath, LAND } from '../../types' -import { GetLands200 } from '@dcl/catalyst-api-specs/lib/client' +import { LandsPaginated } from '@dcl/catalyst-api-specs/lib/client' export async function landsHandler( context: HandlerContextWithPath<'landsFetcher' | 'logs', '/users/:address/lands'> -): Promise<{ status: 200; body: GetLands200 }> { +): Promise<{ status: 200; body: LandsPaginated }> { const { address } = context.params const { landsFetcher } = context.components const pagination = paginationObject(context.url, Number.MAX_VALUE) diff --git a/src/controllers/handlers/names-handler.ts b/src/controllers/handlers/names-handler.ts index d44ba30f..244fdfac 100644 --- a/src/controllers/handlers/names-handler.ts +++ b/src/controllers/handlers/names-handler.ts @@ -1,10 +1,10 @@ import { fetchAndPaginate, paginationObject } from '../../logic/pagination' import { HandlerContextWithPath, Name } from '../../types' -import { GetNames200 } from '@dcl/catalyst-api-specs/lib/client' +import { NamesPaginated } from '@dcl/catalyst-api-specs/lib/client' export async function namesHandler( context: HandlerContextWithPath<'namesFetcher' | 'logs', '/users/:address/names'> -): Promise<{ status: 200; body: GetNames200 }> { +): Promise<{ status: 200; body: NamesPaginated }> { const { address } = context.params const { namesFetcher } = context.components const pagination = paginationObject(context.url, Number.MAX_VALUE) diff --git a/src/controllers/handlers/profiles-handler.ts b/src/controllers/handlers/profiles-handler.ts index 63e178e3..061cb8cd 100644 --- a/src/controllers/handlers/profiles-handler.ts +++ b/src/controllers/handlers/profiles-handler.ts @@ -1,14 +1,14 @@ import { Request } from 'node-fetch' import { getProfiles } from '../../logic/profiles' import { HandlerContextWithPath, InvalidRequestError, NotFoundError } from '../../types' -import { GetAvatarsDetailsByPost200Item, GetAvatarDetails200 } from '@dcl/catalyst-api-specs/lib/client' +import { Profile } from '@dcl/catalyst-api-specs/lib/client' export async function profilesHandler( context: HandlerContextWithPath< 'metrics' | 'content' | 'theGraph' | 'config' | 'fetch' | 'ownershipCaches', '/profiles' > -): Promise<{ status: 200; body: GetAvatarsDetailsByPost200Item[] } | { status: 304 }> { +): Promise<{ status: 200; body: Profile[] } | { status: 304 }> { // Get the profile ids const body = await context.request.json() const ids = body.ids @@ -41,7 +41,7 @@ export async function profileHandler( 'metrics' | 'content' | 'theGraph' | 'config' | 'fetch' | 'ownershipCaches', '/profile/:id' > -): Promise<{ status: 200; body: GetAvatarDetails200 }> { +): Promise<{ status: 200; body: Profile }> { const profiles = await getProfiles(context.components, [context.params.id]) if (!profiles || profiles.length === 0) { throw new NotFoundError('Profile not found') diff --git a/src/controllers/handlers/third-party-wearables-handler.ts b/src/controllers/handlers/third-party-wearables-handler.ts index 940c9cae..78fa52b0 100644 --- a/src/controllers/handlers/third-party-wearables-handler.ts +++ b/src/controllers/handlers/third-party-wearables-handler.ts @@ -6,8 +6,8 @@ import { HandlerContextWithPath, InvalidRequestError, ThirdPartyWearable } from import { createBaseSorting } from '../../logic/sorting' import { GetThirdPartyCollection200, - GetThirdPartyIntegrations200, - GetThirdPartyWearables200 + GetThirdPartyWearables200, + ThirdPartyIntegrations } from '@dcl/catalyst-api-specs/lib/client' function createFilter(url: URL): (item: ThirdPartyWearable) => boolean { @@ -139,7 +139,7 @@ export type ThirdPartyIntegrationsResponse = { export async function thirdPartyIntegrationsHandler( context: HandlerContextWithPath<'thirdPartyProvidersFetcher', '/third-party-integrations'> -): Promise<{ status: 200; body: GetThirdPartyIntegrations200 }> { +): Promise<{ status: 200; body: ThirdPartyIntegrations }> { const providers = await context.components.thirdPartyProvidersFetcher.getAll() const integrations = providers.map((p) => ({ name: p.metadata.thirdParty.name, diff --git a/yarn.lock b/yarn.lock index 44b9786c..5db8d8c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -256,10 +256,10 @@ version "0.2.3" resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" -"@dcl/catalyst-api-specs@^3.1.9": - version "3.1.9" - resolved "https://registry.yarnpkg.com/@dcl/catalyst-api-specs/-/catalyst-api-specs-3.1.9.tgz#3dbd83a149b8c69ea4fbf96f2ac580249cf5288e" - integrity sha512-THPj0YgGQyrtYlfIybT1nWENXXCMntOAycxXJZwb0x6nmEvOMSN8mJZkXjdvKjSs707rBwBRpdEe7vG15UwrOg== +"@dcl/catalyst-api-specs@^3.1.10": + version "3.1.10" + resolved "https://registry.yarnpkg.com/@dcl/catalyst-api-specs/-/catalyst-api-specs-3.1.10.tgz#aa55332b3fc7a2c852934d12b9bc559298b37e48" + integrity sha512-Sev+ags7vpstOM/wfMv3v+z8WBpCcXm6eXbnA/fiDBbVyysU8a5FciCZjR7LPiWmh+5ngsxRk+Pn0T07GJD+lw== dependencies: yaml "2.2.2" @@ -1070,16 +1070,7 @@ on-finished "^2.4.1" path-to-regexp "^6.2.1" -"@well-known-components/interfaces@^1.3.0", "@well-known-components/interfaces@^1.4.0", "@well-known-components/interfaces@^1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@well-known-components/interfaces/-/interfaces-1.4.1.tgz#310119cd5d9f7f67c7914c49b4d43a105acacec5" - integrity sha512-eu4ndE32jF+qKAX/rQ8SFBWh7PCXsOPdArgPweOjK4pdLOyzJaAJaY67/LEerrIp/LNgKDGy0fYbbdZ76BQt1A== - dependencies: - "@types/node" "^16.11.19" - "@types/node-fetch" "^2.5.12" - typed-url-params "^1.0.1" - -"@well-known-components/interfaces@^1.4.1": +"@well-known-components/interfaces@^1.3.0", "@well-known-components/interfaces@^1.4.1": version "1.4.1" resolved "https://registry.yarnpkg.com/@well-known-components/interfaces/-/interfaces-1.4.1.tgz#310119cd5d9f7f67c7914c49b4d43a105acacec5" integrity sha512-eu4ndE32jF+qKAX/rQ8SFBWh7PCXsOPdArgPweOjK4pdLOyzJaAJaY67/LEerrIp/LNgKDGy0fYbbdZ76BQt1A==