diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7e1c146f..5c93d0c7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,6 +1,7 @@ { "packages/auth-bundler": "12.0.0", "packages/auth-core": "12.0.0", + "packages/auth-openapi": "12.0.0", "packages/test-utils": "12.0.0", "apps/auth-cron": "12.0.0", "apps/auth-manager": "12.0.0", diff --git a/.vscode/project.code-workspace b/.vscode/project.code-workspace index 7512897b..56f0f68e 100644 --- a/.vscode/project.code-workspace +++ b/.vscode/project.code-workspace @@ -12,6 +12,14 @@ "name": "Auth Core", "path": "../packages/auth-core", }, + { + "name": "Auth OpenAPI", + "path": "../packages/auth-openapi", + }, + { + "name": "Test Utils", + "path": "../packages/test-utils", + }, { "name": "Auth Cron", "path": "../packages/auth-cron", diff --git a/apps/auth-manager/package.json b/apps/auth-manager/package.json index f37e920e..ab538557 100644 --- a/apps/auth-manager/package.json +++ b/apps/auth-manager/package.json @@ -25,7 +25,6 @@ "migration:revert": "npm run typeorm migration:revert -- ", "lint": "eslint .", "lint:fix": "eslint --fix .", - "lint:openapi": "redocly lint --config ../../.redocly.yaml openapi3.yaml", "prebuild": "npm run clean", "build": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json && npm run assets:copy", "build:docker": "docker buildx build --build-arg APP_NAME=$npm_package_name -f ../../docker/backend.Dockerfile -t ${DOCKER_REGISTRY:-}${npm_package_name}:${DOCKER_TAG:-latest} ${DOCKER_FLAGS:-} ../..", @@ -34,7 +33,6 @@ "start:dev": "npm run build && cd dist && cross-env CONFIG_OFFLINE_MODE=true node --enable-source-maps --import ./instrumentation.mjs ./index.js", "assets:copy": "copyfiles -f ./config/* ./dist/config && copyfiles -f ./openapi3.yaml ./dist/ && copyfiles ./dataSource.mjs dist && copyfiles ./package.json dist", "clean": "rimraf dist", - "generate:openapi-types": "openapi-helpers ./openapi3.yaml ./src/openapi.d.ts --format --add-typed-request-handler", "knip": "knip --directory ../.. --workspace apps/auth-manager" }, "bugs": { @@ -52,6 +50,7 @@ "@map-colonies/schemas": "catalog:", "@map-colonies/telemetry": "^10.0.1", "@opentelemetry/api": "^1.9.0", + "auth-openapi": "workspace:^", "body-parser": "^2.2.2", "compression": "^1.7.4", "cors": "^2.8.5", diff --git a/apps/auth-manager/src/asset/controllers/assetController.ts b/apps/auth-manager/src/asset/controllers/assetController.ts index 09c4f97f..aeb1792d 100644 --- a/apps/auth-manager/src/asset/controllers/assetController.ts +++ b/apps/auth-manager/src/asset/controllers/assetController.ts @@ -2,7 +2,7 @@ import { HttpError } from '@map-colonies/error-express-handler'; import httpStatus from 'http-status-codes'; import { injectable, inject } from 'tsyringe'; import { type Logger } from '@map-colonies/js-logger'; -import type { TypedRequestHandlers, components } from '@openapi'; +import type { TypedRequestHandlers, components } from 'auth-openapi'; import { SERVICES } from '@common/constants'; import { AssetManager, type ResponseAsset } from '../models/assetManager'; import { AssetNotFoundError, AssetVersionMismatchError } from '../models/errors'; diff --git a/apps/auth-manager/src/asset/models/assetManager.ts b/apps/auth-manager/src/asset/models/assetManager.ts index c39fe32e..6e7157df 100644 --- a/apps/auth-manager/src/asset/models/assetManager.ts +++ b/apps/auth-manager/src/asset/models/assetManager.ts @@ -3,7 +3,7 @@ import { IAsset } from '@map-colonies/auth-core'; import { inject, injectable } from 'tsyringe'; import { ArrayContains } from 'typeorm'; import type { SetRequired } from 'type-fest'; -import { operations } from '@openapi'; +import { operations } from 'auth-openapi'; import { SERVICES } from '@common/constants'; import { type AssetRepository } from '../DAL/assetRepository'; import { AssetVersionMismatchError, AssetNotFoundError } from './errors'; diff --git a/apps/auth-manager/src/bundle/controllers/bundleController.ts b/apps/auth-manager/src/bundle/controllers/bundleController.ts index 6e3191e0..3be21d0c 100644 --- a/apps/auth-manager/src/bundle/controllers/bundleController.ts +++ b/apps/auth-manager/src/bundle/controllers/bundleController.ts @@ -2,8 +2,7 @@ import { HttpError } from '@map-colonies/error-express-handler'; import { IBundle } from '@map-colonies/auth-core'; import httpStatus from 'http-status-codes'; import { injectable, inject } from 'tsyringe'; -import type { TypedRequestHandlers, components, operations } from '@openapi'; - +import type { TypedRequestHandlers, components, operations } from 'auth-openapi'; import { BundleManager } from '../models/bundleManager'; import { BundleNotFoundError } from '../models/errors'; diff --git a/apps/auth-manager/src/client/controllers/clientController.ts b/apps/auth-manager/src/client/controllers/clientController.ts index f01461bf..3e97c352 100644 --- a/apps/auth-manager/src/client/controllers/clientController.ts +++ b/apps/auth-manager/src/client/controllers/clientController.ts @@ -4,7 +4,7 @@ import httpStatus from 'http-status-codes'; import { injectable, inject } from 'tsyringe'; import { IClient } from '@map-colonies/auth-core'; import { parseISO } from 'date-fns'; -import type { TypedRequestHandlers, components, operations } from '@openapi'; +import type { TypedRequestHandlers, components, operations } from 'auth-openapi'; import { SERVICES } from '@common/constants'; import { DEFAULT_PAGE_SIZE } from '@src/common/db/pagination'; import { sortOptionParser } from '@src/common/db/sort'; diff --git a/apps/auth-manager/src/client/models/client.ts b/apps/auth-manager/src/client/models/client.ts index df09bb37..5ff8117b 100644 --- a/apps/auth-manager/src/client/models/client.ts +++ b/apps/auth-manager/src/client/models/client.ts @@ -1,4 +1,4 @@ -import type { operations } from '@src/openapi'; +import type { operations } from 'auth-openapi'; type DateKeys = 'createdBefore' | 'createdAfter' | 'updatedBefore' | 'updatedAfter'; diff --git a/apps/auth-manager/src/connection/controllers/connectionController.ts b/apps/auth-manager/src/connection/controllers/connectionController.ts index ba4dfc6c..e270775f 100644 --- a/apps/auth-manager/src/connection/controllers/connectionController.ts +++ b/apps/auth-manager/src/connection/controllers/connectionController.ts @@ -3,7 +3,7 @@ import httpStatus from 'http-status-codes'; import { injectable, inject } from 'tsyringe'; import { type Logger } from '@map-colonies/js-logger'; import { IConnection } from '@map-colonies/auth-core'; -import type { TypedRequestHandlers, components } from '@openapi'; +import type { TypedRequestHandlers, components } from 'auth-openapi'; import { SERVICES } from '@common/constants'; import { ClientNotFoundError } from '@client/models/errors'; import { DEFAULT_PAGE_SIZE } from '@src/common/db/pagination'; diff --git a/apps/auth-manager/src/connection/models/connectionManager.ts b/apps/auth-manager/src/connection/models/connectionManager.ts index 1635b069..77ac44f4 100644 --- a/apps/auth-manager/src/connection/models/connectionManager.ts +++ b/apps/auth-manager/src/connection/models/connectionManager.ts @@ -3,6 +3,7 @@ import { Client, Connection, Environments, IConnection } from '@map-colonies/aut import { inject, injectable } from 'tsyringe'; import { SelectQueryBuilder } from 'typeorm'; import { JWK } from 'jose'; +import { paths } from 'auth-openapi'; import { ClientNotFoundError } from '@client/models/errors'; import { SERVICES } from '@common/constants'; import { type DomainRepository } from '@domain/DAL/domainRepository'; @@ -13,7 +14,6 @@ import { PaginationParams, paginationParamsToFindOptions } from '@src/common/db/ import { KeyNotFoundError } from '@key/models/errors'; import { SortOptions } from '@src/common/db/sort'; import { asteriskStringComparatorLast } from '@src/utils/utils'; -import { paths } from '@src/openapi'; import { type ConnectionRepository } from '../DAL/connectionRepository'; import { ConnectionVersionMismatchError, ConnectionNotFoundError } from './errors'; diff --git a/apps/auth-manager/src/domain/controllers/domainController.ts b/apps/auth-manager/src/domain/controllers/domainController.ts index ebc7801e..e432fde1 100644 --- a/apps/auth-manager/src/domain/controllers/domainController.ts +++ b/apps/auth-manager/src/domain/controllers/domainController.ts @@ -2,7 +2,7 @@ import { HttpError } from '@map-colonies/error-express-handler'; import httpStatus from 'http-status-codes'; import { injectable, inject } from 'tsyringe'; import { Domain } from '@map-colonies/auth-core'; -import type { TypedRequestHandlers } from '@openapi'; +import type { TypedRequestHandlers } from 'auth-openapi'; import { sortOptionParser } from '@src/common/db/sort'; import { DEFAULT_PAGE_SIZE } from '@src/common/db/pagination'; import { DomainManager } from '../models/domainManager'; diff --git a/apps/auth-manager/src/key/controllers/keyController.ts b/apps/auth-manager/src/key/controllers/keyController.ts index f75b4b06..fae8dbe9 100644 --- a/apps/auth-manager/src/key/controllers/keyController.ts +++ b/apps/auth-manager/src/key/controllers/keyController.ts @@ -2,7 +2,7 @@ import { HttpError } from '@map-colonies/error-express-handler'; import httpStatus from 'http-status-codes'; import { injectable, inject } from 'tsyringe'; import { type Logger } from '@map-colonies/js-logger'; -import type { TypedRequestHandlers } from '@openapi'; +import type { TypedRequestHandlers } from 'auth-openapi'; import { SERVICES } from '@common/constants'; import { KeyManager } from '../models/keyManager'; import { KeyNotFoundError, KeyVersionMismatchError } from '../models/errors'; diff --git a/apps/auth-manager/src/serverBuilder.ts b/apps/auth-manager/src/serverBuilder.ts index 5e20f455..6a25d1a9 100644 --- a/apps/auth-manager/src/serverBuilder.ts +++ b/apps/auth-manager/src/serverBuilder.ts @@ -1,3 +1,4 @@ +import path from 'node:path'; import express, { Router } from 'express'; import bodyParser from 'body-parser'; import compression, { CompressionOptions } from 'compression'; @@ -20,6 +21,8 @@ import { CONNECTION_ROUTER_SYMBOL } from './connection/routes/connectionRouter'; import { BUNDLE_ROUTER_SYMBOL } from './bundle/routes/bundleRouter'; import type { ConfigType } from './common/config'; +const OPENAPI_PATH = path.join(path.dirname(require.resolve('auth-openapi')), 'openapi3.yaml'); + @injectable() export class ServerBuilder { private readonly serverInstance: express.Application; @@ -49,7 +52,7 @@ export class ServerBuilder { private buildDocsRoutes(): void { const openapiRouter = new OpenapiViewerRouter({ ...this.config.get('openapiConfig'), - filePathOrSpec: this.config.get('openapiConfig.filePath'), + filePathOrSpec: OPENAPI_PATH, }); openapiRouter.setup(); this.serverInstance.use(this.config.get('openapiConfig.basePath'), openapiRouter.getRouter()); @@ -88,10 +91,9 @@ export class ServerBuilder { this.serverInstance.use(getTraceContexHeaderMiddleware()); const ignorePathRegex = new RegExp(`^${this.config.get('openapiConfig.basePath')}/.*`, 'i'); - const apiSpecPath = this.config.get('openapiConfig.filePath'); this.serverInstance.use( OpenApiMiddleware({ - apiSpec: apiSpecPath, + apiSpec: OPENAPI_PATH, validateRequests: true, ignorePaths: ignorePathRegex, formats: { phone: true }, diff --git a/apps/auth-manager/tests/configurations/vitest.setup.mts b/apps/auth-manager/tests/configurations/vitest.setup.mts index 2b08ac4f..cc352c3f 100644 --- a/apps/auth-manager/tests/configurations/vitest.setup.mts +++ b/apps/auth-manager/tests/configurations/vitest.setup.mts @@ -1,6 +1,6 @@ import 'reflect-metadata'; -import path from 'node:path'; import { setupOpenapi } from '@map-colonies/vitest-utils'; +import { OPENAPI_PATH } from '@tests/utils/paths.mjs'; -setupOpenapi(path.join(process.cwd(), 'openapi3.yaml')); +setupOpenapi(OPENAPI_PATH); diff --git a/apps/auth-manager/tests/integration/asset/asset.spec.mts b/apps/auth-manager/tests/integration/asset/asset.spec.mts index 4c391338..a171195b 100644 --- a/apps/auth-manager/tests/integration/asset/asset.spec.mts +++ b/apps/auth-manager/tests/integration/asset/asset.spec.mts @@ -12,11 +12,12 @@ import { faker } from '@faker-js/faker'; import type { RequestSender } from '@map-colonies/openapi-helpers/requestSender'; import { createRequestSender } from '@map-colonies/openapi-helpers/requestSender'; import { getFakeAsset } from 'test-utils'; -import type { paths, operations } from '@openapi'; +import type { paths, operations } from 'auth-openapi'; import type { AssetRepository } from '@src/asset/DAL/assetRepository.js'; import { getApp } from '@src/app.js'; import { SERVICES } from '@common/constants.js'; import { initConfig } from '@common/config.js'; +import { OPENAPI_PATH } from '@tests/utils/paths.mjs'; describe('client', function () { let requestSender: RequestSender; @@ -31,7 +32,7 @@ describe('client', function () { ], useChild: true, }); - requestSender = await createRequestSender('openapi3.yaml', app); + requestSender = await createRequestSender(OPENAPI_PATH, app); depContainer = container; }); diff --git a/apps/auth-manager/tests/integration/bundle/bundle.spec.mts b/apps/auth-manager/tests/integration/bundle/bundle.spec.mts index 096a0439..aefc73a7 100644 --- a/apps/auth-manager/tests/integration/bundle/bundle.spec.mts +++ b/apps/auth-manager/tests/integration/bundle/bundle.spec.mts @@ -13,10 +13,11 @@ import 'jest-openapi'; import type { RequestSender } from '@map-colonies/openapi-helpers/requestSender'; import { createRequestSender } from '@map-colonies/openapi-helpers/requestSender'; import { getFakeBundle } from 'test-utils'; -import type { paths, operations } from '@openapi'; +import type { paths, operations } from 'auth-openapi'; import { getApp } from '@src/app.js'; import { SERVICES } from '@common/constants.js'; import { initConfig } from '@common/config.js'; +import { OPENAPI_PATH } from '@tests/utils/paths.mjs'; describe('bundle', function () { let requestSender: RequestSender; @@ -32,7 +33,7 @@ describe('bundle', function () { ], useChild: true, }); - requestSender = await createRequestSender('openapi3.yaml', app); + requestSender = await createRequestSender(OPENAPI_PATH, app); depContainer = container; await container.resolve(DataSource).getRepository(Bundle).save(bundles); diff --git a/apps/auth-manager/tests/integration/client/client.spec.mts b/apps/auth-manager/tests/integration/client/client.spec.mts index 3881ac45..6b6823fa 100644 --- a/apps/auth-manager/tests/integration/client/client.spec.mts +++ b/apps/auth-manager/tests/integration/client/client.spec.mts @@ -12,11 +12,12 @@ import { Client } from '@map-colonies/auth-core'; import type { RequestSender } from '@map-colonies/openapi-helpers/requestSender'; import { createRequestSender } from '@map-colonies/openapi-helpers/requestSender'; import { getFakeClient } from 'test-utils'; -import type { paths, operations } from '@openapi'; +import type { paths, operations } from 'auth-openapi'; import { getApp } from '@src/app.js'; import { SERVICES } from '@common/constants.js'; import { initConfig } from '@common/config.js'; import type { ClientRepository } from '@src/client/DAL/clientRepository.js'; +import { OPENAPI_PATH } from '@tests/utils/paths.mjs'; describe('client', function () { let requestSender: RequestSender; @@ -31,7 +32,7 @@ describe('client', function () { ], useChild: true, }); - requestSender = await createRequestSender('openapi3.yaml', app); + requestSender = await createRequestSender(OPENAPI_PATH, app); depContainer = container; }); diff --git a/apps/auth-manager/tests/integration/connection/connection.spec.mts b/apps/auth-manager/tests/integration/connection/connection.spec.mts index ecac4721..76f54e06 100644 --- a/apps/auth-manager/tests/integration/connection/connection.spec.mts +++ b/apps/auth-manager/tests/integration/connection/connection.spec.mts @@ -12,17 +12,16 @@ import { faker } from '@faker-js/faker'; import type { RequestSender } from '@map-colonies/openapi-helpers/requestSender'; import { createRequestSender } from '@map-colonies/openapi-helpers/requestSender'; import { getRealKeys, getFakeClient, getFakeConnection, getFakeIConnection } from 'test-utils'; -import type { paths, operations } from '@openapi'; +import type { paths, operations } from 'auth-openapi'; import { getApp } from '@src/app.js'; import { SERVICES } from '@common/constants.js'; import type { ConnectionRepository } from '@src/connection/DAL/connectionRepository.js'; import type { KeyRepository } from '@src/key/DAL/keyRepository.js'; import type { DomainRepository } from '@src/domain/DAL/domainRepository.js'; import { initConfig } from '@common/config.js'; +import { OPENAPI_PATH } from '@tests/utils/paths.mjs'; describe('connection', function () { - const OPENAPI_SPEC_PATH = 'openapi3.yaml'; // Path to the OpenAPI spec file - let requestSender: RequestSender; let depContainer: DependencyContainer; const clients = [getFakeClient(false), getFakeClient(false)]; @@ -42,7 +41,7 @@ describe('connection', function () { ], useChild: true, }); - requestSender = await createRequestSender(OPENAPI_SPEC_PATH, app); + requestSender = await createRequestSender(OPENAPI_PATH, app); depContainer = container; }); diff --git a/apps/auth-manager/tests/integration/domain/domain.spec.mts b/apps/auth-manager/tests/integration/domain/domain.spec.mts index 1b274b22..af4b4a8e 100644 --- a/apps/auth-manager/tests/integration/domain/domain.spec.mts +++ b/apps/auth-manager/tests/integration/domain/domain.spec.mts @@ -10,14 +10,13 @@ import type { IDomain } from '@map-colonies/auth-core'; import { Domain } from '@map-colonies/auth-core'; import type { RequestSender } from '@map-colonies/openapi-helpers/requestSender'; import { createRequestSender } from '@map-colonies/openapi-helpers/requestSender'; -import type { paths, operations } from '@openapi'; +import type { paths, operations } from 'auth-openapi'; import { getApp } from '@src/app.js'; import { SERVICES } from '@src/common/constants.js'; import { initConfig } from '@src/common/config.js'; +import { OPENAPI_PATH } from '@tests/utils/paths.mjs'; describe('domain', function () { - const OPENAPI_SPEC_PATH = 'openapi3.yaml'; // Path to the OpenAPI spec file - let requestSender: RequestSender; let depContainer: DependencyContainer; @@ -31,7 +30,7 @@ describe('domain', function () { ], useChild: true, }); - requestSender = await createRequestSender(OPENAPI_SPEC_PATH, app); + requestSender = await createRequestSender(OPENAPI_PATH, app); depContainer = container; }); @@ -121,7 +120,7 @@ describe('domain', function () { ], useChild: true, }); - mockedSender = await createRequestSender(OPENAPI_SPEC_PATH, app); + mockedSender = await createRequestSender(OPENAPI_PATH, app); await container.resolve(DataSource).destroy(); vi.resetAllMocks(); }); diff --git a/apps/auth-manager/tests/integration/key/key.spec.mts b/apps/auth-manager/tests/integration/key/key.spec.mts index 2746eb51..68b4015d 100644 --- a/apps/auth-manager/tests/integration/key/key.spec.mts +++ b/apps/auth-manager/tests/integration/key/key.spec.mts @@ -11,15 +11,14 @@ import { createRequestSender } from '@map-colonies/openapi-helpers/requestSender import type { IKey, Environments } from '@map-colonies/auth-core'; import { Key, Environment } from '@map-colonies/auth-core'; import { getMockKeys } from 'test-utils'; -import type { paths, operations, components } from '@openapi'; +import type { paths, operations, components } from 'auth-openapi'; import { getApp } from '@src/app.js'; import { SERVICES } from '@src/common/constants.js'; import type { KeyRepository } from '@src/key/DAL/keyRepository.js'; import { initConfig } from '@src/common/config.js'; +import { OPENAPI_PATH } from '@tests/utils/paths.mjs'; describe('key', function () { - const OPENAPI_SPEC_PATH = 'openapi3.yaml'; // Path to the OpenAPI spec file - let requestSender: RequestSender; let depContainer: DependencyContainer; @@ -35,7 +34,7 @@ describe('key', function () { ], useChild: true, }); - requestSender = await createRequestSender(OPENAPI_SPEC_PATH, app); + requestSender = await createRequestSender(OPENAPI_PATH, app); depContainer = container; }); diff --git a/apps/auth-manager/tests/utils/paths.mts b/apps/auth-manager/tests/utils/paths.mts new file mode 100644 index 00000000..3a7de206 --- /dev/null +++ b/apps/auth-manager/tests/utils/paths.mts @@ -0,0 +1,6 @@ +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const authOpenapiPath = fileURLToPath(new URL('.', import.meta.resolve('auth-openapi'))); + +export const OPENAPI_PATH = path.join(authOpenapiPath, 'openapi3.yaml'); diff --git a/apps/auth-ui/package.json b/apps/auth-ui/package.json index 2fcf296c..e50c1cbe 100644 --- a/apps/auth-ui/package.json +++ b/apps/auth-ui/package.json @@ -10,10 +10,6 @@ "build:docker-no-cache": "cross-env DOCKER_FLAGS=--no-cache pnpm run build:docker", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", - "format": "prettier --check .", - "format:fix": "prettier --write .", - "prepare": "husky", - "generate-openapi": "openapi-typescript http://localhost:8080/docs/api.yaml -o src/types/schema.d.ts", "knip": "knip --directory ../.. --workspace apps/auth-ui" }, "overrides": { @@ -67,9 +63,9 @@ "eslint-plugin-react-hooks": "^5.1.0", "eslint-plugin-react-refresh": "^0.4.19", "globals": "^15.15.0", - "openapi-typescript": "^7.6.1", "typescript": "^5.8.3", "typescript-eslint": "^8.24.1", - "vite": "^6.2.6" + "vite": "^6.2.6", + "auth-openapi": "workspace:*" } } diff --git a/apps/auth-ui/src/fetch/client.ts b/apps/auth-ui/src/fetch/client.ts index 64cfb3f2..54863d9b 100644 --- a/apps/auth-ui/src/fetch/client.ts +++ b/apps/auth-ui/src/fetch/client.ts @@ -1,6 +1,6 @@ import createClient from 'openapi-react-query'; import createFetchClient from 'openapi-fetch'; -import type { paths } from '../types/schema'; +import type { paths } from 'auth-openapi'; import { configLoader } from '../config/loader'; import { NetworkConfig } from '../types/config'; diff --git a/apps/auth-ui/src/pages/clients/ClientsPage.tsx b/apps/auth-ui/src/pages/clients/ClientsPage.tsx index b1dc7f27..230d016d 100644 --- a/apps/auth-ui/src/pages/clients/ClientsPage.tsx +++ b/apps/auth-ui/src/pages/clients/ClientsPage.tsx @@ -4,7 +4,7 @@ import { Button } from '../../components/ui/button'; import { Loader2, Plus, Search, Calendar, Filter, X, ChevronDown, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from 'lucide-react'; import { Input } from '../../components/ui/input'; import { Dialog } from '../../components/ui/dialog'; -import { components } from '../../types/schema'; +import type { components } from 'auth-openapi'; import { ClientsTable } from './ClientsTable'; import { CreateClientModal } from './CreateClientModal'; import { EditClientModal } from './EditClientModal'; diff --git a/apps/auth-ui/src/pages/clients/ClientsTable.tsx b/apps/auth-ui/src/pages/clients/ClientsTable.tsx index 728ec894..36081383 100644 --- a/apps/auth-ui/src/pages/clients/ClientsTable.tsx +++ b/apps/auth-ui/src/pages/clients/ClientsTable.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { components } from '../../types/schema'; +import type { components } from 'auth-openapi'; import { Button } from '../../components/ui/button'; import { Pencil, ArrowUpDown, ArrowUp, ArrowDown } from 'lucide-react'; import { Badge } from '../../components/ui/badge'; diff --git a/apps/auth-ui/src/pages/clients/CreateClientModal.tsx b/apps/auth-ui/src/pages/clients/CreateClientModal.tsx index 4597389f..e9f7c52f 100644 --- a/apps/auth-ui/src/pages/clients/CreateClientModal.tsx +++ b/apps/auth-ui/src/pages/clients/CreateClientModal.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { components } from '../../types/schema'; +import type { components } from 'auth-openapi'; import { Button } from '../../components/ui/button'; import { Loader2, X, AlertCircle, ArrowRight, Check } from 'lucide-react'; import { Input } from '../../components/ui/input'; diff --git a/apps/auth-ui/src/pages/clients/EditClientModal.tsx b/apps/auth-ui/src/pages/clients/EditClientModal.tsx index 7ef89e9d..30fb046b 100644 --- a/apps/auth-ui/src/pages/clients/EditClientModal.tsx +++ b/apps/auth-ui/src/pages/clients/EditClientModal.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { components } from '../../types/schema'; +import type { components } from 'auth-openapi'; import { Button } from '../../components/ui/button'; import { Loader2, X, AlertCircle, ArrowRight, Check } from 'lucide-react'; import { Input } from '../../components/ui/input'; diff --git a/apps/auth-ui/src/pages/connections/ConnectionsPage.tsx b/apps/auth-ui/src/pages/connections/ConnectionsPage.tsx index cff91f4b..11c735e5 100644 --- a/apps/auth-ui/src/pages/connections/ConnectionsPage.tsx +++ b/apps/auth-ui/src/pages/connections/ConnectionsPage.tsx @@ -4,7 +4,7 @@ import { Button } from '../../components/ui/button'; import { Loader2, Plus, Filter, X, Search, ChevronDown, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from 'lucide-react'; import { Input } from '../../components/ui/input'; import { Dialog } from '../../components/ui/dialog'; -import { components } from '../../types/schema'; +import type { components } from 'auth-openapi'; import { ConnectionsTable } from './ConnectionsTable'; import { CreateConnectionModal } from './CreateConnectionModal'; import { EditConnectionModal } from './EditConnectionModal'; diff --git a/apps/auth-ui/src/pages/connections/ConnectionsTable.tsx b/apps/auth-ui/src/pages/connections/ConnectionsTable.tsx index 6a74ca58..fb7e61ac 100644 --- a/apps/auth-ui/src/pages/connections/ConnectionsTable.tsx +++ b/apps/auth-ui/src/pages/connections/ConnectionsTable.tsx @@ -1,5 +1,5 @@ import { useState, useMemo } from 'react'; -import { components } from '../../types/schema'; +import type { components } from 'auth-openapi'; import { Button } from '../../components/ui/button'; import { Pencil, ArrowUpDown, ArrowUp, ArrowDown, Copy, Check } from 'lucide-react'; import { Badge } from '../../components/ui/badge'; diff --git a/apps/auth-ui/src/pages/connections/CreateConnectionModal.tsx b/apps/auth-ui/src/pages/connections/CreateConnectionModal.tsx index fd9aedcb..31bbf6db 100644 --- a/apps/auth-ui/src/pages/connections/CreateConnectionModal.tsx +++ b/apps/auth-ui/src/pages/connections/CreateConnectionModal.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { components } from '../../types/schema'; +import type { components } from 'auth-openapi'; import { Button } from '../../components/ui/button'; import { Loader2, X, Check, ArrowRight, ChevronsUpDown } from 'lucide-react'; import { Input } from '../../components/ui/input'; diff --git a/apps/auth-ui/src/pages/connections/EditConnectionModal.tsx b/apps/auth-ui/src/pages/connections/EditConnectionModal.tsx index bd17e330..c30389cd 100644 --- a/apps/auth-ui/src/pages/connections/EditConnectionModal.tsx +++ b/apps/auth-ui/src/pages/connections/EditConnectionModal.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { components } from '../../types/schema'; +import type { components } from 'auth-openapi'; import { Button } from '../../components/ui/button'; import { Loader2, X, HelpCircle, Check, ArrowRight, AlertCircle } from 'lucide-react'; import { Input } from '../../components/ui/input'; diff --git a/apps/auth-ui/src/pages/domains/CreateDomainModal.tsx b/apps/auth-ui/src/pages/domains/CreateDomainModal.tsx index 5ec706b6..6680725f 100644 --- a/apps/auth-ui/src/pages/domains/CreateDomainModal.tsx +++ b/apps/auth-ui/src/pages/domains/CreateDomainModal.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { components } from '../../types/schema'; +import type { components } from 'auth-openapi'; import { Button } from '../../components/ui/button'; import { Loader2, AlertCircle, Check, ArrowRight } from 'lucide-react'; import { Input } from '../../components/ui/input'; diff --git a/apps/auth-ui/src/pages/domains/DomainsPage.tsx b/apps/auth-ui/src/pages/domains/DomainsPage.tsx index fffeb7fa..cb729066 100644 --- a/apps/auth-ui/src/pages/domains/DomainsPage.tsx +++ b/apps/auth-ui/src/pages/domains/DomainsPage.tsx @@ -4,7 +4,7 @@ import { Button } from '../../components/ui/button'; import { Loader2, Plus, Search, X, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from 'lucide-react'; import { Input } from '../../components/ui/input'; import { Dialog } from '../../components/ui/dialog'; -import { components } from '../../types/schema'; +import type { components } from 'auth-openapi'; import { DomainsTable } from './DomainsTable'; import { CreateDomainModal } from './CreateDomainModal'; import { toast } from 'sonner'; diff --git a/apps/auth-ui/src/pages/domains/DomainsTable.tsx b/apps/auth-ui/src/pages/domains/DomainsTable.tsx index d1cb7ce4..dee65aeb 100644 --- a/apps/auth-ui/src/pages/domains/DomainsTable.tsx +++ b/apps/auth-ui/src/pages/domains/DomainsTable.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { components } from '../../types/schema'; +import type { components } from 'auth-openapi'; import { Button } from '../../components/ui/button'; import { ArrowUpDown, ArrowUp, ArrowDown } from 'lucide-react'; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '../../components/ui/table'; diff --git a/apps/auth-ui/src/pages/opa-validator/opa-validator.tsx b/apps/auth-ui/src/pages/opa-validator/opa-validator.tsx index 74bdd5d5..05f16ab9 100644 --- a/apps/auth-ui/src/pages/opa-validator/opa-validator.tsx +++ b/apps/auth-ui/src/pages/opa-validator/opa-validator.tsx @@ -12,7 +12,7 @@ import { JSONEditor } from '../../components/json-editor'; import { SiteConfig } from '../../types/config'; import { JsonTreeViewer } from '../../components/internal/json-tree-viewer'; import { siteApis } from '../../fetch'; -import { components } from '../../types/schema'; +import type { components } from 'auth-openapi'; type Domain = components['schemas']['domain']; diff --git a/apps/auth-ui/src/types/schema.d.ts b/apps/auth-ui/src/types/schema.d.ts deleted file mode 100644 index ce0e02e0..00000000 --- a/apps/auth-ui/src/types/schema.d.ts +++ /dev/null @@ -1,1282 +0,0 @@ -/** - * This file was auto-generated by openapi-typescript. - * Do not make direct changes to the file. - */ - -export interface paths { - '/client': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** gets clients by filtering */ - get: operations['getClients']; - put?: never; - /** creates a new client */ - post: operations['createClient']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/client/{clientName}': { - parameters: { - query?: never; - header?: never; - path: { - clientName: components['parameters']['clientParam']; - }; - cookie?: never; - }; - /** get client by name */ - get: operations['getClient']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - /** update the client */ - patch: operations['updateClient']; - trace?: never; - }; - '/client/{clientName}/connection': { - parameters: { - query?: never; - header?: never; - path: { - clientName: components['parameters']['clientParam']; - }; - cookie?: never; - }; - /** gets the connections for a specific client */ - get: operations['getClientConnections']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/client/{clientName}/connection/{environment}': { - parameters: { - query?: never; - header?: never; - path: { - clientName: components['parameters']['clientParam']; - environment: components['parameters']['environmentPathParam']; - }; - cookie?: never; - }; - /** get the latest client connection for specific environment */ - get: operations['getClientEnvironmentConnections']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/client/{clientName}/connection/{environment}/{version}': { - parameters: { - query?: never; - header?: never; - path: { - clientName: components['parameters']['clientParam']; - environment: components['parameters']['environmentPathParam']; - version: components['parameters']['versionParam']; - }; - cookie?: never; - }; - /** get a specfic client connection for specific environment */ - get: operations['getClientVersionedConnection']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/client/{clientName}/connection/{environment}/latest': { - parameters: { - query?: never; - header?: never; - path: { - clientName: components['parameters']['clientParam']; - environment: components['parameters']['environmentPathParam']; - }; - cookie?: never; - }; - /** get the latest client connection for specific environment */ - get: operations['getClientLatestConnection']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/connection': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** get a connections based on filters */ - get: operations['getConnections']; - put?: never; - /** creates a new connection or updates it based on the version */ - post: operations['upsertConnection']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/key': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** get all latest keys */ - get: operations['getLastestKeys']; - put?: never; - /** creates a new key or updates it based on the version */ - post: operations['upsertKey']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/key/{environment}': { - parameters: { - query?: never; - header?: never; - path: { - environment: components['parameters']['environmentPathParam']; - }; - cookie?: never; - }; - /** get keys for specific environment */ - get: operations['getKeys']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/key/{environment}/{version}': { - parameters: { - query?: never; - header?: never; - path: { - environment: components['parameters']['environmentPathParam']; - version: components['parameters']['versionParam']; - }; - cookie?: never; - }; - /** gets a specific key */ - get: operations['getSpecificKey']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/key/{environment}/latest': { - parameters: { - query?: never; - header?: never; - path: { - environment: components['parameters']['environmentPathParam']; - }; - cookie?: never; - }; - /** gets the latest key for specific environment */ - get: operations['getLatestKey']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/asset': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** get assets by filters */ - get: operations['getAssets']; - put?: never; - /** creates a new asset or updates it based on the version */ - post: operations['upsertAsset']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/asset/{assetName}': { - parameters: { - query?: never; - header?: never; - path: { - assetName: components['parameters']['assetParam']; - }; - cookie?: never; - }; - /** get asset by name */ - get: operations['getAsset']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/asset/{assetName}/{version}': { - parameters: { - query?: never; - header?: never; - path: { - assetName: components['parameters']['assetParam']; - version: components['parameters']['versionParam']; - }; - cookie?: never; - }; - /** get asset by name and version */ - get: operations['getVersionedAsset']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/asset/{assetName}/latest': { - parameters: { - query?: never; - header?: never; - path: { - assetName: components['parameters']['assetParam']; - }; - cookie?: never; - }; - /** get latest asset by name */ - get: operations['getLatestAsset']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/bundle': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** get bundles by filter */ - get: operations['getBundles']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/bundle/{id}': { - parameters: { - query?: never; - header?: never; - path: { - id: number; - }; - cookie?: never; - }; - /** get a specific bundle */ - get: operations['getBundle']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/domain': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** get all the domains */ - get: operations['getDomains']; - put?: never; - /** create a new domain */ - post: operations['createDomain']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; -} -export type webhooks = Record; -export interface components { - schemas: { - error: { - message: string; - }; - /** @enum {string} */ - environment: 'np' | 'stage' | 'prod'; - /** - * Format: int32 - * @default 1 - */ - version: number; - /** @enum {string} */ - assetType: 'TEST' | 'TEST_DATA' | 'POLICY' | 'DATA'; - name: string; - domain: { - name: components['schemas']['name']; - }; - pointOfContact: { - name: components['schemas']['name']; - /** Format: email */ - email: string; - /** Format: phone */ - phone: string; - }; - namelessClient: { - hebName: components['schemas']['name']; - description?: string; - branch?: string; - /** Format: date-time */ - readonly createdAt: string; - /** Format: date-time */ - readonly updatedAt: string; - techPointOfContact?: components['schemas']['pointOfContact']; - productPointOfContact?: components['schemas']['pointOfContact']; - tags?: string[]; - }; - client: components['schemas']['namelessClient'] & { - name: components['schemas']['name']; - }; - connection: { - name: components['schemas']['name']; - environment: components['schemas']['environment']; - version: components['schemas']['version']; - /** @default true */ - enabled: boolean; - token: string; - domains: string[]; - /** Format: date-time */ - readonly createdAt?: string; - allowNoBrowserConnection: boolean; - allowNoOriginConnection: boolean; - origins: string[]; - }; - publicJWK: { - kty: string; - n: string; - e: string; - alg: string; - kid: string; - }; - privateJWK: components['schemas']['publicJWK'] & { - d: string; - p: string; - q: string; - dp: string; - dq: string; - qi: string; - }; - key: { - publicKey: components['schemas']['publicJWK']; - privateKey: components['schemas']['privateJWK']; - version: components['schemas']['version']; - environment: components['schemas']['environment']; - }; - asset: { - environment: components['schemas']['environment'][]; - /** Format: date-time */ - readonly createdAt: string; - /** Format: byte */ - value: string; - uri: string; - type: components['schemas']['assetType']; - /** @default false */ - isTemplate: boolean; - version: components['schemas']['version']; - name: string; - }; - bundle: { - /** Format: int32 */ - id?: number; - hash?: string; - metadata?: { - [key: string]: unknown; - }; - assets?: { - name: string; - version: components['schemas']['version']; - }[]; - connections?: { - name: string; - version: components['schemas']['version']; - }[]; - environment?: components['schemas']['environment'] & unknown; - /** Format: date-time */ - readonly createdAt?: string; - keyVersion?: components['schemas']['version']; - /** @description OPA version used to generate the bundle */ - opaVersion?: string; - }; - paginationResponse: { - /** - * Format: int32 - * @description total number of items - */ - total: number; - }; - }; - responses: { - /** @description BadRequest */ - '400BadRequest': { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['error']; - }; - }; - /** @description Not Found - If client does not exist */ - '404NotFound': { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['error']; - }; - }; - /** @description conflict */ - '409Conflict': { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['error']; - }; - }; - /** @description Unsupported Media Type */ - '415UnsupportedMediaType': { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['error']; - }; - }; - /** @description Internal Server Error */ - '500InternalServerError': { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['error']; - }; - }; - }; - parameters: { - /** @description page number for pagination. The value is 1-based, meaning the first page is 1. - * If the value is greater than the total number of pages, an empty array will be returned. - * This simplifies the pagination logic on the client side. - * */ - page: number; - /** @description number of items per page */ - pageSize: number; - clientParam: string; - assetParam: string; - versionParam: components['schemas']['version']; - environmentQueryParam: components['schemas']['environment'][]; - environmentPathParam: components['schemas']['environment']; - }; - requestBodies: never; - headers: never; - pathItems: never; -} -export type $defs = Record; -export interface operations { - getClients: { - parameters: { - query?: { - /** @description search by client name (partial match, case-insensitive) */ - name?: string; - /** @description search by branch name */ - branch?: string; - /** @description filters all clients created before given date */ - createdBefore?: string; - /** @description filters all clients created after given date */ - createdAfter?: string; - /** @description filters all clients updated before given date */ - updatedBefore?: string; - /** @description filters all clients updated after given date */ - updatedAfter?: string; - /** @description filters based on tags */ - tags?: string[]; - /** - * @description Sorts the results based on the value of one or more properties. - * The value is a comma-separated list of property names and sort order. - * properties should be separated by a colon and sort order should be either asc or desc. For example: created-at:asc,name:asc - * The default sort order is ascending. If the sort order is not specified, the default sort order is used. Each property is only allowed to appear once in the list. - * The available properties are: - * - created-at - * - updated-at - * - name - * - heb-name - * - branch - * @example [ - * "created-at:asc", - * "name:asc" - * ] - */ - sort?: string[]; - /** @description page number for pagination. The value is 1-based, meaning the first page is 1. - * If the value is greater than the total number of pages, an empty array will be returned. - * This simplifies the pagination logic on the client side. - * */ - page?: components['parameters']['page']; - /** @description number of items per page */ - page_size?: components['parameters']['pageSize']; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['paginationResponse'] & { - /** @description list of clients */ - items: components['schemas']['client'][]; - }; - }; - }; - 400: components['responses']['400BadRequest']; - 500: components['responses']['500InternalServerError']; - }; - }; - createClient: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['client']; - }; - }; - responses: { - /** @description created */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['client']; - }; - }; - 400: components['responses']['400BadRequest']; - 409: components['responses']['409Conflict']; - 500: components['responses']['500InternalServerError']; - }; - }; - getClient: { - parameters: { - query?: never; - header?: never; - path: { - clientName: components['parameters']['clientParam']; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['client']; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['404NotFound']; - 500: components['responses']['500InternalServerError']; - }; - }; - updateClient: { - parameters: { - query?: never; - header?: never; - path: { - clientName: components['parameters']['clientParam']; - }; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['namelessClient']; - }; - }; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['client']; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['404NotFound']; - 500: components['responses']['500InternalServerError']; - }; - }; - getClientConnections: { - parameters: { - query?: never; - header?: never; - path: { - clientName: components['parameters']['clientParam']; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['connection'][]; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['404NotFound']; - 500: components['responses']['500InternalServerError']; - }; - }; - getClientEnvironmentConnections: { - parameters: { - query?: never; - header?: never; - path: { - clientName: components['parameters']['clientParam']; - environment: components['parameters']['environmentPathParam']; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['connection'][]; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['404NotFound']; - 500: components['responses']['500InternalServerError']; - }; - }; - getClientVersionedConnection: { - parameters: { - query?: never; - header?: never; - path: { - clientName: components['parameters']['clientParam']; - environment: components['parameters']['environmentPathParam']; - version: components['parameters']['versionParam']; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['connection']; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['404NotFound']; - 500: components['responses']['500InternalServerError']; - }; - }; - getClientLatestConnection: { - parameters: { - query?: never; - header?: never; - path: { - clientName: components['parameters']['clientParam']; - environment: components['parameters']['environmentPathParam']; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['connection']; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['404NotFound']; - 500: components['responses']['500InternalServerError']; - }; - }; - getConnections: { - parameters: { - query?: { - /** @description search by client name (partial match, case-insensitive) */ - name?: string; - /** @description if true, returns only the latest version per (name, environment) pair */ - onlyLatest?: boolean; - environment?: components['parameters']['environmentQueryParam']; - isEnabled?: boolean; - isNoBrowser?: boolean; - isNoOrigin?: boolean; - domains?: string[]; - /** - * @description Sorts the results based on the value of one or more properties. - * The value is a comma-separated list of property names and sort order. - * properties should be separated by a colon and sort order should be either asc or desc. For example: created-at:asc,name:asc - * The default sort order is ascending. If the sort order is not specified, the default sort order is used. Each property is only allowed to appear once in the list. - * The available properties are: - * - created-at - * - name - * - version - * - enabled - * - environment - * @example [ - * "created-at:asc", - * "name:asc" - * ] - */ - sort?: string[]; - /** @description page number for pagination. The value is 1-based, meaning the first page is 1. - * If the value is greater than the total number of pages, an empty array will be returned. - * This simplifies the pagination logic on the client side. - * */ - page?: components['parameters']['page']; - /** @description number of items per page */ - page_size?: components['parameters']['pageSize']; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['paginationResponse'] & { - /** @description list of clients */ - items: components['schemas']['connection'][]; - }; - }; - }; - 400: components['responses']['400BadRequest']; - 500: components['responses']['500InternalServerError']; - }; - }; - upsertConnection: { - parameters: { - query?: { - shouldIgnoreTokenErrors?: boolean; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['connection']; - }; - }; - responses: { - /** @description updated */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['connection']; - }; - }; - /** @description created */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['connection']; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['404NotFound']; - 409: components['responses']['409Conflict']; - 500: components['responses']['500InternalServerError']; - }; - }; - getLastestKeys: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['key'][]; - }; - }; - 415: components['responses']['415UnsupportedMediaType']; - 500: components['responses']['500InternalServerError']; - }; - }; - upsertKey: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['key']; - }; - }; - responses: { - /** @description updated */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['key']; - }; - }; - /** @description created */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['key']; - }; - }; - 400: components['responses']['400BadRequest']; - 409: components['responses']['409Conflict']; - 500: components['responses']['500InternalServerError']; - }; - }; - getKeys: { - parameters: { - query?: never; - header?: never; - path: { - environment: components['parameters']['environmentPathParam']; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['key'][]; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['404NotFound']; - 500: components['responses']['500InternalServerError']; - }; - }; - getSpecificKey: { - parameters: { - query?: never; - header?: never; - path: { - environment: components['parameters']['environmentPathParam']; - version: components['parameters']['versionParam']; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['key']; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['404NotFound']; - 500: components['responses']['500InternalServerError']; - }; - }; - getLatestKey: { - parameters: { - query?: never; - header?: never; - path: { - environment: components['parameters']['environmentPathParam']; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['key']; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['404NotFound']; - 500: components['responses']['500InternalServerError']; - }; - }; - getAssets: { - parameters: { - query?: { - environment?: components['parameters']['environmentQueryParam']; - type?: components['schemas']['assetType']; - isTemplate?: boolean; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['asset'][]; - }; - }; - 400: components['responses']['400BadRequest']; - 500: components['responses']['500InternalServerError']; - }; - }; - upsertAsset: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['asset']; - }; - }; - responses: { - /** @description updated */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['asset']; - }; - }; - /** @description created */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['asset']; - }; - }; - 400: components['responses']['400BadRequest']; - 409: components['responses']['409Conflict']; - 500: components['responses']['500InternalServerError']; - }; - }; - getAsset: { - parameters: { - query?: never; - header?: never; - path: { - assetName: components['parameters']['assetParam']; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['asset'][]; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['404NotFound']; - 500: components['responses']['500InternalServerError']; - }; - }; - getVersionedAsset: { - parameters: { - query?: never; - header?: never; - path: { - assetName: components['parameters']['assetParam']; - version: components['parameters']['versionParam']; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['asset']; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['404NotFound']; - 500: components['responses']['500InternalServerError']; - }; - }; - getLatestAsset: { - parameters: { - query?: never; - header?: never; - path: { - assetName: components['parameters']['assetParam']; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['asset']; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['404NotFound']; - 500: components['responses']['500InternalServerError']; - }; - }; - getBundles: { - parameters: { - query?: { - /** @description filters all clients created before given date */ - createdBefore?: string; - /** @description filters all clients created after given date */ - createdAfter?: string; - environment?: components['parameters']['environmentQueryParam']; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['bundle'][]; - }; - }; - 400: components['responses']['400BadRequest']; - 500: components['responses']['500InternalServerError']; - }; - }; - getBundle: { - parameters: { - query?: { - environment?: components['parameters']['environmentQueryParam']; - }; - header?: never; - path: { - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['bundle']; - }; - }; - 400: components['responses']['400BadRequest']; - 404: components['responses']['400BadRequest']; - 500: components['responses']['500InternalServerError']; - }; - }; - getDomains: { - parameters: { - query?: { - /** - * @description Sorts the results based on the value of one or more properties. - * The value is a comma-separated list of property names and sort order. - * properties should be separated by a colon and sort order should be either asc or desc. For example: domain:asc - * The default sort order is ascending. If the sort order is not specified, the default sort order is used. Each property is only allowed to appear once in the list. - * The available properties are: - * - domain - * @example [ - * "domain:asc" - * ] - */ - sort?: string[]; - /** @description page number for pagination. The value is 1-based, meaning the first page is 1. - * If the value is greater than the total number of pages, an empty array will be returned. - * This simplifies the pagination logic on the client side. - * */ - page?: components['parameters']['page']; - /** @description number of items per page */ - page_size?: components['parameters']['pageSize']; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description OK */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['paginationResponse'] & { - /** @description list of clients */ - items: components['schemas']['domain'][]; - }; - }; - }; - 415: components['responses']['415UnsupportedMediaType']; - 500: components['responses']['500InternalServerError']; - }; - }; - createDomain: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['domain']; - }; - }; - responses: { - /** @description created */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['domain']; - }; - }; - 400: components['responses']['400BadRequest']; - 409: components['responses']['409Conflict']; - 500: components['responses']['500InternalServerError']; - }; - }; -} diff --git a/packages/auth-openapi/eslint.config.mjs b/packages/auth-openapi/eslint.config.mjs new file mode 100644 index 00000000..cdfdebf9 --- /dev/null +++ b/packages/auth-openapi/eslint.config.mjs @@ -0,0 +1,4 @@ +import tsBaseConfig from '@map-colonies/eslint-config/ts-base'; +import { defineConfig, globalIgnores } from 'eslint/config'; + +export default defineConfig(tsBaseConfig, globalIgnores(['vitest.config.mts', 'index.d.ts'])); diff --git a/apps/auth-manager/src/openapi.d.ts b/packages/auth-openapi/index.d.ts similarity index 98% rename from apps/auth-manager/src/openapi.d.ts rename to packages/auth-openapi/index.d.ts index f8e47c66..cbd411b1 100644 --- a/apps/auth-manager/src/openapi.d.ts +++ b/packages/auth-openapi/index.d.ts @@ -1,4 +1,7 @@ /* eslint-disable */ +// This file was auto-generated. Do not edit manually. +// To update, run the error generation script again. + import type { TypedRequestHandlers as ImportedTypedRequestHandlers } from '@map-colonies/openapi-helpers/typedRequestHandler'; export type paths = { '/client': { @@ -511,10 +514,11 @@ export type components = { }; }; parameters: { - /** @description page number for pagination. The value is 1-based, meaning the first page is 1. + /** + * @description page number for pagination. The value is 1-based, meaning the first page is 1. * If the value is greater than the total number of pages, an empty array will be returned. * This simplifies the pagination logic on the client side. - * */ + */ page: number; /** @description number of items per page */ pageSize: number; @@ -564,10 +568,11 @@ export interface operations { * ] */ sort?: string[]; - /** @description page number for pagination. The value is 1-based, meaning the first page is 1. + /** + * @description page number for pagination. The value is 1-based, meaning the first page is 1. * If the value is greater than the total number of pages, an empty array will be returned. * This simplifies the pagination logic on the client side. - * */ + */ page?: components['parameters']['page']; /** @description number of items per page */ page_size?: components['parameters']['pageSize']; @@ -808,10 +813,11 @@ export interface operations { * ] */ sort?: string[]; - /** @description page number for pagination. The value is 1-based, meaning the first page is 1. + /** + * @description page number for pagination. The value is 1-based, meaning the first page is 1. * If the value is greater than the total number of pages, an empty array will be returned. * This simplifies the pagination logic on the client side. - * */ + */ page?: components['parameters']['page']; /** @description number of items per page */ page_size?: components['parameters']['pageSize']; @@ -1219,10 +1225,11 @@ export interface operations { * ] */ sort?: string[]; - /** @description page number for pagination. The value is 1-based, meaning the first page is 1. + /** + * @description page number for pagination. The value is 1-based, meaning the first page is 1. * If the value is greater than the total number of pages, an empty array will be returned. * This simplifies the pagination logic on the client side. - * */ + */ page?: components['parameters']['page']; /** @description number of items per page */ page_size?: components['parameters']['pageSize']; diff --git a/packages/auth-openapi/index.js b/packages/auth-openapi/index.js new file mode 100644 index 00000000..1a32b123 --- /dev/null +++ b/packages/auth-openapi/index.js @@ -0,0 +1 @@ +// LOL diff --git a/apps/auth-manager/openapi3.yaml b/packages/auth-openapi/openapi3.yaml similarity index 100% rename from apps/auth-manager/openapi3.yaml rename to packages/auth-openapi/openapi3.yaml diff --git a/packages/auth-openapi/package.json b/packages/auth-openapi/package.json new file mode 100644 index 00000000..f873e972 --- /dev/null +++ b/packages/auth-openapi/package.json @@ -0,0 +1,46 @@ +{ + "name": "auth-openapi", + "version": "12.0.0", + "description": "OpenAPI specification for the authentication services", + "author": "MapColonies", + "homepage": "https://github.com/MapColonies/opa-la#readme", + "license": "MIT", + "private": true, + "type": "commonjs", + "files": [ + "openapi3.yaml", + "index.d.ts", + "index.js" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/MapColonies/opa-la.git" + }, + "exports": { + ".": { + "import": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "require": { + "types": "./index.d.ts", + "default": "./index.js" + } + } + }, + "scripts": { + "check-dist": "publint && attw --profile node16 --pack .", + "knip": "knip --directory ../.. --workspace packages/auth-openapi", + "lint:openapi": "redocly lint --config ../../redocly.yaml openapi3.yaml" + }, + "bugs": { + "url": "https://github.com/MapColonies/opa-la/issues" + }, + "dependencies": {}, + "peerDependencies": {}, + "devDependencies": { + "@map-colonies/eslint-config": "catalog:", + "@map-colonies/openapi-helpers": "catalog:", + "eslint": "catalog:" + } +} diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 058ca4f5..c3bca6c8 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -21,8 +21,7 @@ "lint": "eslint .", "lint:fix": "eslint --fix .", "prebuild": "pnpm run clean", - "build": "tsc --project tsconfig.json && pnpm run assets:copy", - "assets:copy": "copyfiles ./package.json dist", + "build": "tsc --project tsconfig.json", "clean": "rimraf dist", "prepack": "turbo run build", "check-dist": "publint && attw --profile esm-only --pack .", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fcae60e6..5230e075 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -176,7 +176,7 @@ importers: devDependencies: '@map-colonies/eslint-config': specifier: 'catalog:' - version: 8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@swc/core@1.15.21)(@types/node@24.12.0)(typescript@5.9.3)))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3) + version: 8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3) '@map-colonies/tsconfig': specifier: 'catalog:' version: 2.0.0 @@ -249,6 +249,9 @@ importers: '@opentelemetry/api': specifier: ^1.9.0 version: 1.9.0 + auth-openapi: + specifier: workspace:^ + version: link:../../packages/auth-openapi body-parser: specifier: ^2.2.2 version: 2.2.2 @@ -294,7 +297,7 @@ importers: version: 9.9.0 '@map-colonies/eslint-config': specifier: 'catalog:' - version: 8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@swc/core@1.15.21)(@types/node@24.12.0)(typescript@5.9.3)))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3) + version: 8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3) '@map-colonies/openapi-helpers': specifier: ^2.0.0 version: 2.1.0(@types/express@4.17.25)(encoding@0.1.13)(openapi-typescript@7.13.0(typescript@5.9.3))(prettier@3.8.1)(supertest@7.2.2)(typescript@5.9.3) @@ -485,6 +488,9 @@ importers: '@vitejs/plugin-react': specifier: ^4.3.4 version: 4.7.0(vite@6.4.1(@types/node@22.19.15)(jiti@2.6.1)(lightningcss@1.32.0)(tsx@4.21.0)(yaml@2.8.3)) + auth-openapi: + specifier: workspace:* + version: link:../../packages/auth-openapi eslint: specifier: ^9.21.0 version: 9.39.4(jiti@2.6.1) @@ -497,9 +503,6 @@ importers: globals: specifier: ^15.15.0 version: 15.15.0 - openapi-typescript: - specifier: ^7.6.1 - version: 7.13.0(typescript@5.8.3) typescript: specifier: ^5.8.3 version: 5.8.3 @@ -714,7 +717,7 @@ importers: devDependencies: '@map-colonies/eslint-config': specifier: 'catalog:' - version: 8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@swc/core@1.15.21)(@types/node@24.12.0)(typescript@5.9.3)))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3) + version: 8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3) '@map-colonies/openapi-helpers': specifier: 'catalog:' version: 5.1.0(@types/express@4.17.25)(@types/json-schema@7.0.15)(encoding@0.1.13)(openapi-typescript@7.13.0(typescript@5.9.3))(prettier@3.8.1)(supertest@7.2.2)(typescript@5.9.3) @@ -814,7 +817,7 @@ importers: version: 4.0.1(@map-colonies/schemas@1.19.0)(prom-client@15.1.3) '@map-colonies/eslint-config': specifier: 'catalog:' - version: 8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@swc/core@1.15.21)(@types/node@24.12.0)(typescript@5.9.3)))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3) + version: 8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3) '@map-colonies/schemas': specifier: 'catalog:' version: 1.19.0 @@ -866,7 +869,7 @@ importers: version: 4.0.1(@map-colonies/schemas@1.19.0)(prom-client@15.1.3) '@map-colonies/eslint-config': specifier: 'catalog:' - version: 8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@swc/core@1.15.21)(@types/node@24.12.0)(typescript@5.9.3)))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3) + version: 8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3) '@map-colonies/schemas': specifier: 'catalog:' version: 1.19.0 @@ -886,6 +889,18 @@ importers: specifier: 'catalog:' version: 5.9.3 + packages/auth-openapi: + devDependencies: + '@map-colonies/eslint-config': + specifier: 'catalog:' + version: 8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3) + '@map-colonies/openapi-helpers': + specifier: 'catalog:' + version: 5.1.0(@types/express@4.17.25)(@types/json-schema@7.0.15)(encoding@0.1.13)(openapi-typescript@7.13.0(typescript@5.9.3))(prettier@3.8.1)(supertest@7.2.2)(typescript@5.9.3) + eslint: + specifier: 'catalog:' + version: 9.39.4(jiti@2.6.1) + packages/test-utils: dependencies: '@aws-sdk/client-s3': @@ -918,7 +933,7 @@ importers: devDependencies: '@map-colonies/eslint-config': specifier: 'catalog:' - version: 8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@swc/core@1.15.21)(@types/node@24.12.0)(typescript@5.9.3)))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3) + version: 8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3) '@map-colonies/tsconfig': specifier: 'catalog:' version: 2.0.0 @@ -11367,7 +11382,7 @@ snapshots: dependencies: http-status-codes: 2.3.0 - '@map-colonies/eslint-config@8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@swc/core@1.15.21)(@types/node@24.12.0)(typescript@5.9.3)))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3)': + '@map-colonies/eslint-config@8.1.0(@typescript-eslint/utils@8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(@vitest/eslint-plugin@1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4))(eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0))(typescript@5.9.3))(eslint-plugin-react-hooks@5.2.0(eslint@9.39.4(jiti@2.6.1)))(eslint@9.39.4(jiti@2.6.1))(globals@15.15.0)(typescript@5.9.3)': dependencies: '@eslint/js': 9.39.4 '@map-colonies/eslint-plugin': 0.1.0(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) @@ -11380,7 +11395,7 @@ snapshots: typescript-eslint: 8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) optionalDependencies: '@vitest/eslint-plugin': 1.6.15(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3)(vitest@4.1.4) - eslint-plugin-jest: 28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@swc/core@1.15.21)(@types/node@24.12.0)(typescript@5.9.3)))(typescript@5.9.3) + eslint-plugin-jest: 28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0))(typescript@5.9.3) eslint-plugin-react-hooks: 5.2.0(eslint@9.39.4(jiti@2.6.1)) globals: 15.15.0 transitivePeerDependencies: @@ -15473,7 +15488,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0)(ts-node@10.9.2(@swc/core@1.15.21)(@types/node@24.12.0)(typescript@5.9.3)))(typescript@5.9.3): + eslint-plugin-jest@28.14.0(@typescript-eslint/eslint-plugin@8.57.2(@typescript-eslint/parser@8.57.2(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.4(jiti@2.6.1))(jest@29.7.0(@types/node@24.12.0))(typescript@5.9.3): dependencies: '@typescript-eslint/utils': 8.58.1(eslint@9.39.4(jiti@2.6.1))(typescript@5.9.3) eslint: 9.39.4(jiti@2.6.1) diff --git a/.redocly.yaml b/redocly.yaml similarity index 100% rename from .redocly.yaml rename to redocly.yaml diff --git a/release-please-config.json b/release-please-config.json index 311a30c7..8ba48f79 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -79,6 +79,11 @@ "component": "auth-core", "skip-changelog": true }, + "packages/auth-openapi": { + "release-type": "node", + "component": "auth-openapi", + "skip-changelog": true + }, "packages/test-utils": { "release-type": "node", "component": "test-utils",