From 9a5a370bd32248b142811a146abd88213fbbc7d1 Mon Sep 17 00:00:00 2001 From: OpenInt Bot Date: Thu, 13 Feb 2025 04:34:30 -0800 Subject: [PATCH 1/4] Revert "Removing all v1 code to stack prs" This reverts commit 4faa5964395dc99af593626aeec10c58ac777c5d. --- apps/web/app/api/[[...api]]/route.ts | 13 + apps/web/package.json | 1 + packages-v1/api-v1/__generated__/openapi.json | 202 +++++++ .../api-v1/__generated__/openapi.types.ts | 167 ++++++ packages-v1/api-v1/app.spec.ts | 59 ++ packages-v1/api-v1/app.ts | 29 + packages-v1/api-v1/index.ts | 3 + packages-v1/api-v1/models.ts | 103 ++++ packages-v1/api-v1/package.json | 33 ++ packages-v1/api-v1/scripts/gen-oas.ts | 8 + packages-v1/api-v1/trpc/_base.ts | 12 + packages-v1/api-v1/trpc/context.ts | 3 + packages-v1/api-v1/trpc/handlers.ts | 26 + packages-v1/api-v1/trpc/index.ts | 0 packages-v1/api-v1/trpc/openapi.ts | 31 + packages-v1/api-v1/trpc/routers/index.ts | 47 ++ packages-v1/sdk-v1/index.ts | 14 + packages-v1/sdk-v1/package.json | 16 + pnpm-lock.yaml | 539 ++++++++++++++++-- 19 files changed, 1260 insertions(+), 46 deletions(-) create mode 100644 apps/web/app/api/[[...api]]/route.ts create mode 100644 packages-v1/api-v1/__generated__/openapi.json create mode 100644 packages-v1/api-v1/__generated__/openapi.types.ts create mode 100644 packages-v1/api-v1/app.spec.ts create mode 100644 packages-v1/api-v1/app.ts create mode 100644 packages-v1/api-v1/index.ts create mode 100644 packages-v1/api-v1/models.ts create mode 100644 packages-v1/api-v1/package.json create mode 100644 packages-v1/api-v1/scripts/gen-oas.ts create mode 100644 packages-v1/api-v1/trpc/_base.ts create mode 100644 packages-v1/api-v1/trpc/context.ts create mode 100644 packages-v1/api-v1/trpc/handlers.ts create mode 100644 packages-v1/api-v1/trpc/index.ts create mode 100644 packages-v1/api-v1/trpc/openapi.ts create mode 100644 packages-v1/api-v1/trpc/routers/index.ts create mode 100644 packages-v1/sdk-v1/index.ts create mode 100644 packages-v1/sdk-v1/package.json diff --git a/apps/web/app/api/[[...api]]/route.ts b/apps/web/app/api/[[...api]]/route.ts new file mode 100644 index 00000000..7ef67821 --- /dev/null +++ b/apps/web/app/api/[[...api]]/route.ts @@ -0,0 +1,13 @@ +import {app} from '@openint/api-v1' + +const handler = app.handle + +export { + handler as HEAD, + handler as OPTIONS, + handler as GET, + handler as POST, + handler as PUT, + handler as PATCH, + handler as DELETE, +} diff --git a/apps/web/package.json b/apps/web/package.json index 26831375..7b8c9a73 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -14,6 +14,7 @@ "@clerk/nextjs": "5.6.0", "@lilyrose2798/trpc-openapi": "1.3.10", "@openint/api": "workspace:*", + "@openint/api-v1": "workspace:*", "@openint/app-config": "workspace:*", "@openint/cdk": "workspace:*", "@openint/connect": "workspace:*", diff --git a/packages-v1/api-v1/__generated__/openapi.json b/packages-v1/api-v1/__generated__/openapi.json new file mode 100644 index 00000000..d6561d86 --- /dev/null +++ b/packages-v1/api-v1/__generated__/openapi.json @@ -0,0 +1,202 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "OpenInt", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost:3000" + } + ], + "paths": { + "/health": { + "get": { + "operationId": "health", + "security": [ + { + "Authorization": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + } + }, + "components": { + "securitySchemes": { + "Authorization": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "error.UNAUTHORIZED": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "The error message", + "example": "Authorization not provided" + }, + "code": { + "type": "string", + "description": "The error code", + "example": "UNAUTHORIZED" + }, + "issues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ] + }, + "description": "An array of issues that were responsible for the error", + "example": [] + } + }, + "required": [ + "message", + "code" + ], + "title": "Authorization not provided error (401)", + "description": "The error information", + "example": { + "code": "UNAUTHORIZED", + "message": "Authorization not provided", + "issues": [] + } + }, + "error.FORBIDDEN": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "The error message", + "example": "Insufficient access" + }, + "code": { + "type": "string", + "description": "The error code", + "example": "FORBIDDEN" + }, + "issues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ] + }, + "description": "An array of issues that were responsible for the error", + "example": [] + } + }, + "required": [ + "message", + "code" + ], + "title": "Insufficient access error (403)", + "description": "The error information", + "example": { + "code": "FORBIDDEN", + "message": "Insufficient access", + "issues": [] + } + }, + "error.INTERNAL_SERVER_ERROR": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "The error message", + "example": "Internal server error" + }, + "code": { + "type": "string", + "description": "The error code", + "example": "INTERNAL_SERVER_ERROR" + }, + "issues": { + "type": "array", + "items": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ] + }, + "description": "An array of issues that were responsible for the error", + "example": [] + } + }, + "required": [ + "message", + "code" + ], + "title": "Internal server error error (500)", + "description": "The error information", + "example": { + "code": "INTERNAL_SERVER_ERROR", + "message": "Internal server error", + "issues": [] + } + } + } + } +} \ No newline at end of file diff --git a/packages-v1/api-v1/__generated__/openapi.types.ts b/packages-v1/api-v1/__generated__/openapi.types.ts new file mode 100644 index 00000000..7b93424d --- /dev/null +++ b/packages-v1/api-v1/__generated__/openapi.types.ts @@ -0,0 +1,167 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/health": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["health"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; +} +export type webhooks = Record; +export interface components { + schemas: { + /** + * Authorization not provided error (401) + * @description The error information + * @example { + * "code": "UNAUTHORIZED", + * "message": "Authorization not provided", + * "issues": [] + * } + */ + "error.UNAUTHORIZED": { + /** + * @description The error message + * @example Authorization not provided + */ + message: string; + /** + * @description The error code + * @example UNAUTHORIZED + */ + code: string; + /** + * @description An array of issues that were responsible for the error + * @example [] + */ + issues?: { + message: string; + }[]; + }; + /** + * Insufficient access error (403) + * @description The error information + * @example { + * "code": "FORBIDDEN", + * "message": "Insufficient access", + * "issues": [] + * } + */ + "error.FORBIDDEN": { + /** + * @description The error message + * @example Insufficient access + */ + message: string; + /** + * @description The error code + * @example FORBIDDEN + */ + code: string; + /** + * @description An array of issues that were responsible for the error + * @example [] + */ + issues?: { + message: string; + }[]; + }; + /** + * Internal server error error (500) + * @description The error information + * @example { + * "code": "INTERNAL_SERVER_ERROR", + * "message": "Internal server error", + * "issues": [] + * } + */ + "error.INTERNAL_SERVER_ERROR": { + /** + * @description The error message + * @example Internal server error + */ + message: string; + /** + * @description The error code + * @example INTERNAL_SERVER_ERROR + */ + code: string; + /** + * @description An array of issues that were responsible for the error + * @example [] + */ + issues?: { + message: string; + }[]; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} +export type $defs = Record; +export interface operations { + health: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": string; + }; + }; + /** @description Authorization not provided */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["error.UNAUTHORIZED"]; + }; + }; + /** @description Insufficient access */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["error.FORBIDDEN"]; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["error.INTERNAL_SERVER_ERROR"]; + }; + }; + }; + }; +} diff --git a/packages-v1/api-v1/app.spec.ts b/packages-v1/api-v1/app.spec.ts new file mode 100644 index 00000000..827d5a85 --- /dev/null +++ b/packages-v1/api-v1/app.spec.ts @@ -0,0 +1,59 @@ +import {applyLinks, logLink} from '@opensdks/fetch-links' +import {createTRPCClient, httpLink} from '@trpc/client' +import createClient, {wrapAsPathBasedClient} from 'openapi-fetch' +import type {paths} from './__generated__/openapi.types' +import {app} from './app' +import type {AppRouter} from './trpc/routers' + +test('elysia route', async () => { + const res = await app.handle(new Request('http://localhost/api/health')) + expect(await res.json()).toBeTruthy() +}) + +test('openapi route', async () => { + const res = await app.handle(new Request('http://localhost/api/v1/health')) + expect(await res.json()).toBeTruthy() +}) + +test('trpc route', async () => { + const res2 = await app.handle( + new Request('http://localhost/api/v1/trpc/health'), + ) + expect(await res2.json()).toBeTruthy() +}) + +test('trpc route with TRPCClient', async () => { + const client = createTRPCClient({ + links: [ + httpLink({ + url: 'http://localhost/api/v1/trpc', + fetch: (input, init) => app.handle(new Request(input, init)), + }), + ], + }) + const res = await client.health.query() + expect(res).toEqual('ok') +}) + +test('openapi route with OpenAPI client', async () => { + const openapiClient = createClient({ + baseUrl: 'http://localhost/api/v1', + fetch: app.handle, + }) + + const res = await openapiClient.GET('/health') + expect(res.data).toBeTruthy() + + const pathBasedClient = wrapAsPathBasedClient(openapiClient) + const res2 = await pathBasedClient['/health'].GET() + expect(res2.data).toBeTruthy() +}) + +test('OpenAPI client with links', async () => { + const openapiClient = createClient({ + baseUrl: 'http://localhost/api/v1', + fetch: (req) => applyLinks(req, [logLink(), app.handle]), + }) + const res = await openapiClient.GET('/health') + expect(res.data).toBeTruthy() +}) diff --git a/packages-v1/api-v1/app.ts b/packages-v1/api-v1/app.ts new file mode 100644 index 00000000..2556e789 --- /dev/null +++ b/packages-v1/api-v1/app.ts @@ -0,0 +1,29 @@ +import {swagger} from '@elysiajs/swagger' +import {Elysia} from 'elysia' +import {createOpenApiHandler, createTrpcHandler} from './trpc/handlers' +import {generateOpenAPISpec} from './trpc/openapi' + +export const app = new Elysia({prefix: '/api'}) + .get('/health', () => ({status: 'ok'})) + .use( + swagger({ + // For some reason spec.content doesn't work. so we are forced tos specify url instead + scalarConfig: {spec: {url: '/api/v1/openapi.json'}}, + path: '/v1', + }), + ) + .get('/v1/openapi.json', () => generateOpenAPISpec({})) + // These two ways of mounting are very inconsistent, but I don't know why. + // empirically, the first one without * works for trpc, and the second one with * works for openapi + // no other settings seems to work when mounted inside next.js. Direct elysia listen works + // in a more consistent way and we should probably add some test specifically for next.js mounted behavior + .mount('/v1/trpc', createTrpcHandler({endpoint: '/trpc'})) + .mount('/v1*', createOpenApiHandler({endpoint: '/v1'})) + +// @ts-expect-error Property 'main' does not exist on type 'ImportMeta'.ts(2339) +if (import.meta.main) { + app.listen(process.env['PORT'] || 3002) + console.log( + `🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`, + ) +} diff --git a/packages-v1/api-v1/index.ts b/packages-v1/api-v1/index.ts new file mode 100644 index 00000000..79e437e0 --- /dev/null +++ b/packages-v1/api-v1/index.ts @@ -0,0 +1,3 @@ +export {appRouter, AppRouter} from './trpc/routers' + +export * from './app' diff --git a/packages-v1/api-v1/models.ts b/packages-v1/api-v1/models.ts new file mode 100644 index 00000000..b986b0b7 --- /dev/null +++ b/packages-v1/api-v1/models.ts @@ -0,0 +1,103 @@ +import {z} from 'zod' +import {extendZodWithOpenApi} from 'zod-openapi' + +extendZodWithOpenApi(z) + +// TODO: Import these from the corresponding connector packages... +const plaid = { + connection: z + .object({ + connector_name: z.literal('plaid'), + secrets: z.object({ + access_token: z.string(), + }), + settings: z.object({ + item_id: z.string(), + }), + }) + .openapi({ref: 'plaid.connection', description: 'Plaid Connection'}), + connector_config: z + .object({ + connector_name: z.literal('plaid'), + secrets: z.object({ + client_id: z.string(), + client_secret: z.string(), + }), + config: z.object({ + client_name: z.string(), + products: z.array(z.enum(['transactions', 'balances'])), + }), + }) + .openapi({ + ref: 'plaid.connector_config', + description: 'Plaid Connector Config', + }), +} + +const greenhouse = { + connection: z + .object({ + connector_name: z.literal('greenhouse'), + secrets: z.object({ + api_key: z.string(), + }), + settings: z.object({}), + }) + .openapi({ + ref: 'greenhouse.connection', + description: 'Greenhouse Connection', + }), + connector_config: z + .object({ + connector_name: z.literal('greenhouse'), + secrets: z.object({}), + config: z.object({}), + }) + .openapi({ + ref: 'greenhouse.connector_config', + description: 'Greenhouse Connector Config', + }), +} + +const coreBase = z.object({ + id: z.string(), + updated_at: z.string().datetime(), + created_at: z.string().datetime(), +}) + +export const core = { + connection: z + .intersection( + coreBase + .extend({ + connector_config_id: z.string(), + }) + .describe('Connection Base'), + z + .discriminatedUnion('connector_name', [ + plaid.connection, + greenhouse.connection, + ]) + .describe('Connector specific data'), + ) + .openapi({ref: 'core.connection', title: 'Connection'}), + + connector_config: z + .intersection( + coreBase + .extend({ + org_id: z.string(), + }) + .describe('Connector Config Base'), + z + .discriminatedUnion('connector_name', [ + plaid.connector_config, + greenhouse.connector_config, + ]) + .describe('Connector specific data'), + ) + .openapi({ + ref: 'core.connector_config', + title: 'Connector Config', + }), +} diff --git a/packages-v1/api-v1/package.json b/packages-v1/api-v1/package.json new file mode 100644 index 00000000..9631854e --- /dev/null +++ b/packages-v1/api-v1/package.json @@ -0,0 +1,33 @@ +{ + "name": "@openint/api-v1", + "version": "0.0.0", + "private": true, + "sideEffects": false, + "module": "./index.ts", + "scripts": { + "gen": "run-s gen:*", + "gen:oas": "bun ./scripts/gen-oas.ts", + "gen:types": "bunx openapi-typescript ./openapi.json --output ./__generated__/openapi.types.ts" + }, + "dependencies": { + "@clerk/nextjs": "^6.11.2", + "@elysiajs/swagger": "^1.2.0", + "@openint/env": "workspace:*", + "@openint/events": "workspace:*", + "@sinclair/typebox": "^0.34.20", + "@trpc/server": "next", + "elysia": "^1.2.12", + "remeda": "^2.20.1", + "trpc-to-openapi": "^2.1.3", + "zod": "^3.24.2", + "zod-openapi": "^4.2.3" + }, + "devDependencies": { + "@openint/cdk": "workspace:*", + "@opensdks/fetch-links": "^0.0.22", + "@trpc/client": "next", + "bun-types": "latest", + "openapi-fetch": "^0.13.4", + "openapi-typescript": "^7.6.1" + } +} diff --git a/packages-v1/api-v1/scripts/gen-oas.ts b/packages-v1/api-v1/scripts/gen-oas.ts new file mode 100644 index 00000000..328910d4 --- /dev/null +++ b/packages-v1/api-v1/scripts/gen-oas.ts @@ -0,0 +1,8 @@ +import fs from 'node:fs' +import path from 'node:path' +import {generateOpenAPISpec} from '../trpc/openapi' + +const dest = path.join(__dirname, '../__generated__', 'openapi.json') +fs.writeFileSync(dest, JSON.stringify(generateOpenAPISpec({}), null, 2)) + +console.log(`openapi.json written to ${dest}`) diff --git a/packages-v1/api-v1/trpc/_base.ts b/packages-v1/api-v1/trpc/_base.ts new file mode 100644 index 00000000..b74eb5a4 --- /dev/null +++ b/packages-v1/api-v1/trpc/_base.ts @@ -0,0 +1,12 @@ +import {initTRPC} from '@trpc/server' +import {type OpenApiMeta} from 'trpc-to-openapi' +import type {Viewer} from '@openint/cdk' + +export interface RouterContext { + viewer: Viewer +} + +export const trpc = initTRPC.meta().context().create() + +export const router = trpc.router +export const publicProcedure = trpc.procedure diff --git a/packages-v1/api-v1/trpc/context.ts b/packages-v1/api-v1/trpc/context.ts new file mode 100644 index 00000000..0e27424d --- /dev/null +++ b/packages-v1/api-v1/trpc/context.ts @@ -0,0 +1,3 @@ +export function contextFromRequest(_req: Request) { + return {viewer: {role: 'system' as const}} +} diff --git a/packages-v1/api-v1/trpc/handlers.ts b/packages-v1/api-v1/trpc/handlers.ts new file mode 100644 index 00000000..992427ce --- /dev/null +++ b/packages-v1/api-v1/trpc/handlers.ts @@ -0,0 +1,26 @@ +import {fetchRequestHandler} from '@trpc/server/adapters/fetch' +import {createOpenApiFetchHandler} from 'trpc-to-openapi' +import {contextFromRequest} from './context' +import {appRouter} from './routers' + +export const createTrpcHandler = + (opts: {endpoint: `/${string}`}) => (req: Request) => { + console.log('handleTrpcRequest', req.url) + return fetchRequestHandler({ + router: appRouter, + createContext: () => contextFromRequest(req), + endpoint: opts.endpoint, + req, + }) + } + +export const createOpenApiHandler = + (opts: {endpoint: `/${string}`}) => (req: Request) => { + console.log('handleOpenApiRequest', req.url) + return createOpenApiFetchHandler({ + router: appRouter, + createContext: () => contextFromRequest(req), + endpoint: opts.endpoint, + req, + }) + } diff --git a/packages-v1/api-v1/trpc/index.ts b/packages-v1/api-v1/trpc/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages-v1/api-v1/trpc/openapi.ts b/packages-v1/api-v1/trpc/openapi.ts new file mode 100644 index 00000000..45fe056c --- /dev/null +++ b/packages-v1/api-v1/trpc/openapi.ts @@ -0,0 +1,31 @@ +import {generateOpenApiDocument} from 'trpc-to-openapi' +import {appRouter} from './routers' + +export function generateOpenAPISpec({ + baseUrl = 'http://localhost:3000', +}: { + baseUrl?: string +}) { + const oas = generateOpenApiDocument(appRouter, { + title: 'OpenInt', + version: '1.0.0', + baseUrl, + }) + + if (oas.components?.schemas) { + // sort schemas object based on key name + const sortedSchemas = Object.keys(oas.components.schemas) + .sort() + .reduce( + (acc, key) => { + acc[key] = oas.components!.schemas![key] + return acc + }, + {} as Record, + ) + + oas.components.schemas = sortedSchemas + } + // TODO: Add webhook and others..> + return oas +} diff --git a/packages-v1/api-v1/trpc/routers/index.ts b/packages-v1/api-v1/trpc/routers/index.ts new file mode 100644 index 00000000..e15a0663 --- /dev/null +++ b/packages-v1/api-v1/trpc/routers/index.ts @@ -0,0 +1,47 @@ +import {z} from 'zod' +import {publicProcedure, router, trpc} from '../_base' +import {core} from '../../models' + +const connectionRouter = router({ + listConnections: publicProcedure + .meta({ + openapi: {method: 'GET', path: '/connection'}, + }) + .input(z.void()) + .output( + z.object({ + items: z.array(core.connection), + }), + ) + .query(() => ({items: []})), +}) + +const connectorConfigRouter = router({ + listConnectorConfigs: publicProcedure + .meta({ + openapi: {method: 'GET', path: '/connector-config'}, + }) + .input(z.void()) + .output( + z.object({ + items: z.array(core.connector_config), + }), + ) + .query(() => ({items: []})), +}) + +const generalRouter = router({ + health: publicProcedure + .meta({openapi: {method: 'GET', path: '/health'}}) + .input(z.void()) + .output(z.string()) + .query(() => 'ok'), +}) + +export const appRouter = trpc.mergeRouters( + connectionRouter, + connectorConfigRouter, + generalRouter, +) + +export type AppRouter = typeof appRouter diff --git a/packages-v1/sdk-v1/index.ts b/packages-v1/sdk-v1/index.ts new file mode 100644 index 00000000..c9b3a476 --- /dev/null +++ b/packages-v1/sdk-v1/index.ts @@ -0,0 +1,14 @@ +import {createTRPCClient, httpLink} from '@trpc/client' +import createClient, {wrapAsPathBasedClient} from 'openapi-fetch' +import type {AppRouter} from '@openint/api-v1' +import type {paths} from '@openint/api-v1/__generated__/openapi.types' + +export const trpcClient = createTRPCClient({ + links: [httpLink({url: '/api/trpc'})], +}) + +export const openapiClient = createClient({ + baseUrl: '/api/v1', +}) + +export const pathBasedClient = wrapAsPathBasedClient(openapiClient) diff --git a/packages-v1/sdk-v1/package.json b/packages-v1/sdk-v1/package.json new file mode 100644 index 00000000..e4c02092 --- /dev/null +++ b/packages-v1/sdk-v1/package.json @@ -0,0 +1,16 @@ +{ + "name": "@openint/sdk-v1", + "version": "0.0.0", + "private": true, + "sideEffects": false, + "module": "./index.ts", + "scripts": {}, + "dependencies": { + "@trpc/client": "next", + "openapi-fetch": "^0.13.4" + }, + "devDependencies": { + "@openint/api-v1": "workspace:*", + "bun-types": "latest" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d118c74e..37eba2a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -584,6 +584,9 @@ importers: '@openint/api': specifier: workspace:* version: link:../../packages/api + '@openint/api-v1': + specifier: workspace:* + version: link:../../packages-v1/api-v1 '@openint/app-config': specifier: workspace:* version: link:../app-config @@ -1969,6 +1972,77 @@ importers: specifier: ^0.6.0-2 version: 0.6.0-2 + packages-v1/api-v1: + dependencies: + '@clerk/nextjs': + specifier: ^6.11.2 + version: 6.11.2(next@14.2.13(@babel/core@7.25.2)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@elysiajs/swagger': + specifier: ^1.2.0 + version: 1.2.0(elysia@1.2.12(@sinclair/typebox@0.34.20)(openapi-types@12.1.3)(typescript@5.7.3)) + '@openint/env': + specifier: workspace:* + version: link:../../packages/env + '@openint/events': + specifier: workspace:* + version: link:../../packages/events + '@sinclair/typebox': + specifier: ^0.34.20 + version: 0.34.20 + '@trpc/server': + specifier: next + version: 11.0.0-rc.764(typescript@5.7.3) + elysia: + specifier: ^1.2.12 + version: 1.2.12(@sinclair/typebox@0.34.20)(openapi-types@12.1.3)(typescript@5.7.3) + remeda: + specifier: ^2.20.1 + version: 2.20.1 + trpc-to-openapi: + specifier: ^2.1.3 + version: 2.1.3(@trpc/server@11.0.0-rc.764(typescript@5.7.3))(zod-openapi@4.2.3(zod@3.24.2))(zod@3.24.2) + zod: + specifier: ^3.24.2 + version: 3.24.2 + zod-openapi: + specifier: ^4.2.3 + version: 4.2.3(zod@3.24.2) + devDependencies: + '@openint/cdk': + specifier: workspace:* + version: link:../../kits/cdk + '@opensdks/fetch-links': + specifier: ^0.0.22 + version: 0.0.22 + '@trpc/client': + specifier: next + version: 11.0.0-rc.764(@trpc/server@11.0.0-rc.764(typescript@5.7.3))(typescript@5.7.3) + bun-types: + specifier: latest + version: 1.2.2 + openapi-fetch: + specifier: ^0.13.4 + version: 0.13.4 + openapi-typescript: + specifier: ^7.6.1 + version: 7.6.1(typescript@5.7.3) + + packages-v1/sdk-v1: + dependencies: + '@trpc/client': + specifier: next + version: 11.0.0-rc.764(@trpc/server@11.0.0-rc.764(typescript@5.7.3))(typescript@5.7.3) + openapi-fetch: + specifier: ^0.13.4 + version: 0.13.4 + devDependencies: + '@openint/api-v1': + specifier: workspace:* + version: link:../api-v1 + bun-types: + specifier: latest + version: 1.2.2 + packages/api: dependencies: '@clerk/nextjs': @@ -3701,6 +3775,17 @@ packages: resolution: {integrity: sha512-VpAkb/P/fybC+Rv1uEuUiMXTVxmnl1Umj9wMfS0ZIPx/hu6t3PLVZbGYeNwQULr6mUE5qhomJoEkTsqGyaR8Pg==} engines: {node: '>=18.17.0'} + '@clerk/backend@1.24.0': + resolution: {integrity: sha512-DlOZ9pnCY77ngHKFZzC7ZImHBVjMf2whPLvnnBt4YXjkvuQ3m1v1tQHUXb8qqlwilptHU4/WzkOlXytez+iJ+A==} + engines: {node: '>=18.17.0'} + + '@clerk/clerk-react@5.22.12': + resolution: {integrity: sha512-afaatXlyBlG1zRSQyRGLKS7eJZn46WZhAyBAswfIahXBtf9rMTzT4gCj4vYUm5wtnypneOIl3RYy07CkCSRcCQ==} + engines: {node: '>=18.17.0'} + peerDependencies: + react: 18.3.1 + react-dom: 18.3.1 + '@clerk/clerk-react@5.9.1': resolution: {integrity: sha512-I2gAceIkJtQl3uEyPbjUKPbDpssj7uJt+D0QY7cWOECLvpump+B8s19DJ6OFkuD7pwlzeZp5QrdMaMpcCUReEg==} engines: {node: '>=18.17.0'} @@ -3716,6 +3801,26 @@ packages: react: 18.3.1 react-dom: 18.3.1 + '@clerk/nextjs@6.11.2': + resolution: {integrity: sha512-n8pwaKIdkk/AGmadIyhfsOmFixFXrmjAL524B1zJ+L6nOApyXpn8XncNavkdkoiZaP9j6iyhJUOXFZZ7IhVaNQ==} + engines: {node: '>=18.17.0'} + peerDependencies: + next: ^13.5.4 || ^14.0.3 || ^15.0.0 + react: 18.3.1 + react-dom: 18.3.1 + + '@clerk/shared@2.21.0': + resolution: {integrity: sha512-8uszJbdyfpk/qmu4SoIiT3T79TgSJe2uRm0m2isRZeGWw5DQFlf/dAF3iGOj7p2ad+24SGYb4cXwrrRdYyO8KQ==} + engines: {node: '>=18.17.0'} + peerDependencies: + react: 18.3.1 + react-dom: 18.3.1 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + '@clerk/shared@2.8.1': resolution: {integrity: sha512-8LxnrQDj9xdKcOFQa4FSKb3P5loZeLMiynzD9yBJgCBTCJ8dNV//qySlP6xK6z172L8RwnDk29yO9J+v+FS9Sw==} engines: {node: '>=18.17.0'} @@ -3732,6 +3837,10 @@ packages: resolution: {integrity: sha512-yyPNF4agzub9zXOht9Bk8HG+OkHfLKIpsQuTCiZJszehcKNUqKvJZRxUwdRREBYnBdMl632PKCwbckZsChVxVQ==} engines: {node: '>=18.17.0'} + '@clerk/types@4.45.1': + resolution: {integrity: sha512-lS3Q8Ih4CasMY3ed7u+bXdO/s0OF1DIbSUhzQSKpfluzUxxkkFlPiRKsefctL4cnGt4fOzyD+T9ebF0up6sUkA==} + engines: {node: '>=18.17.0'} + '@cnakazawa/watch@1.0.4': resolution: {integrity: sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==} engines: {node: '>=0.1.95'} @@ -3740,6 +3849,11 @@ packages: '@drizzle-team/brocli@0.10.2': resolution: {integrity: sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==} + '@elysiajs/swagger@1.2.0': + resolution: {integrity: sha512-OPx93DP6rM2VHjA3D44Xiz5MYm9AYlO2NGWPsnSsdyvaOCiL9wJj529583h7arX4iIEYE5LiLB0/A45unqbopw==} + peerDependencies: + elysia: '>= 1.2.0' + '@esbuild-kit/cjs-loader@2.4.1': resolution: {integrity: sha512-lhc/XLith28QdW0HpHZvZKkorWgmCNT7sVelMHDj3HFdTfdqkwEKvT+aXVQtNAmCC39VJhunDkWhONWB7335mg==} deprecated: 'Merged into tsx: https://tsx.is' @@ -6221,6 +6335,16 @@ packages: peerDependencies: react: 18.3.1 + '@redocly/ajv@8.11.2': + resolution: {integrity: sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==} + + '@redocly/config@0.20.3': + resolution: {integrity: sha512-Nyyv1Bj7GgYwj/l46O0nkH1GTKWbO3Ixe7KFcn021aZipkZd+z8Vlu1BwkhqtVgivcKaClaExtWU/lDHkjBzag==} + + '@redocly/openapi-core@1.28.5': + resolution: {integrity: sha512-eAuL+x1oBbodJksPm4UpFU57A6z1n1rx9JNpD87CObwtbRf5EzW29Ofd0t057bPGcHc8cYZtZzJ69dcRQ9xGdg==} + engines: {node: '>=18.17.0', npm: '>=9.5.0'} + '@rehooks/component-size@1.0.3': resolution: {integrity: sha512-pnYld+8SSF2vXwdLOqBGUyOrv/SjzwLjIUcs/4c1JJgR0q4E9eBtBfuZMD6zUD51fvSehSsbnlQMzotSmPTXPg==} peerDependencies: @@ -6337,6 +6461,11 @@ packages: cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-gnu@4.6.1': + resolution: {integrity: sha512-DNGZvZDO5YF7jN5fX8ZqmGLjZEXIJRdJEdTFMhiyXqyXubBa0WVLDWSNlQ5JR2PNgDbEV1VQowhVRUh+74D+RA==} + cpu: [x64] + os: [linux] + '@rollup/rollup-linux-x64-musl@4.24.0': resolution: {integrity: sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==} cpu: [x64] @@ -6360,6 +6489,26 @@ packages: '@rushstack/eslint-patch@1.5.1': resolution: {integrity: sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA==} + '@scalar/openapi-types@0.1.1': + resolution: {integrity: sha512-NMy3QNk6ytcCoPUGJH0t4NNr36OWXgZhA3ormr3TvhX1NDgoF95wFyodGVH8xiHeUyn2/FxtETm8UBLbB5xEmg==} + engines: {node: '>=18'} + + '@scalar/openapi-types@0.1.7': + resolution: {integrity: sha512-oOTG3JQifg55U3DhKB7WdNIxFnJzbPJe7rqdyWdio977l8IkxQTVmObftJhdNIMvhV2K+1f/bDoMQGu6yTaD0A==} + engines: {node: '>=18'} + + '@scalar/themes@0.9.65': + resolution: {integrity: sha512-bkv3XcQ+502lpldjdoyDbo6LYze2z4xnK1kiptSdZxhj/44sq0l6W5IMMDOC+sWeNP3uusDpa7vMinckaRvf4w==} + engines: {node: '>=18'} + + '@scalar/types@0.0.12': + resolution: {integrity: sha512-XYZ36lSEx87i4gDqopQlGCOkdIITHHEvgkuJFrXFATQs9zHARop0PN0g4RZYWj+ZpCUclOcaOjbCt8JGe22mnQ==} + engines: {node: '>=18'} + + '@scalar/types@0.0.31': + resolution: {integrity: sha512-xagRDDqqf+tMTtChUggQHIzjMbfHe/3ntiZpF4RDgrU5yA3v/eYFwLjb+OgfcMpU1c02FSUeKa6FN7e7DZcXgg==} + engines: {node: '>=18'} + '@sentry-internal/browser-utils@8.33.1': resolution: {integrity: sha512-TW6/r+Gl5jiXv54iK1xZ3mlVgTS/jaBp4vcQ0xGMdgiQ3WchEPcFSeYovL+YHT3tSud0GZqVtDQCz+5i76puqA==} engines: {node: '>=14.18'} @@ -6531,6 +6680,9 @@ packages: '@sinclair/typebox@0.33.12': resolution: {integrity: sha512-d5KrXIdPolLp8VpGpZAQvEz8ioVtFlUQSyCIS2sEBi7FKhceIB7nj9BlNfqqvp5wmOfg8v8bP1rAvYYkjz21/Q==} + '@sinclair/typebox@0.34.20': + resolution: {integrity: sha512-rVNFD9dFMzZgnuv0LZHZHIjS3R5nSOWIQaxP7GrcgsA3yf/tCH5xZ7zJkxWCee4EXfiTuQWbtcBcQMsd4AiCzg==} + '@sindresorhus/is@4.6.0': resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} engines: {node: '>=10'} @@ -7566,6 +7718,9 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@unhead/schema@1.11.18': + resolution: {integrity: sha512-a3TA/OJCRdfbFhcA3Hq24k1ZU1o9szicESrw8DZcGyQFacHnh84mVgnyqSkMnwgCmfN4kvjSiTBlLEHS6+wATw==} + '@vitest/expect@2.0.5': resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==} @@ -7725,6 +7880,10 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} + agent-base@7.1.3: + resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} + engines: {node: '>= 14'} + aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} @@ -7764,6 +7923,10 @@ packages: ajv@8.12.0: resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} @@ -8363,6 +8526,9 @@ packages: change-case@4.1.2: resolution: {integrity: sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==} + change-case@5.4.4: + resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==} + char-regex@1.0.2: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} @@ -8591,6 +8757,9 @@ packages: resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} engines: {node: '>=12.5.0'} + colorette@1.4.0: + resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} + colorette@2.0.19: resolution: {integrity: sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==} @@ -8710,6 +8879,10 @@ packages: resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} + cookie@1.0.2: + resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==} + engines: {node: '>=18'} + cookies-next@4.0.0: resolution: {integrity: sha512-3TyzeltFCGgdOlVOVTPClSq+YV9ZCdOyA3aHRZv9f5aSgg7EyI4NSvXFOCgzT/xIxeHR4Rz8/z5Tdo9oPqaVpA==} @@ -8835,6 +9008,9 @@ packages: csstype@3.1.2: resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} + csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + csv-parse@4.16.3: resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} @@ -9326,6 +9502,18 @@ packages: electron-to-chromium@1.5.87: resolution: {integrity: sha512-mPFwmEWmRivw2F8x3w3l2m6htAUN97Gy0kwpO++2m9iT1Gt8RCFVUfv9U/sIbHJ6rY4P6/ooqFL/eL7ock+pPg==} + elysia@1.2.12: + resolution: {integrity: sha512-X1bZo09qe8/Poa/5tz08Y+sE/77B/wLwnA5xDDENU3FCrsUtYJuBVcy6BPXGRCgnJ1fPQpc0Ov2ZU5MYJXluTg==} + peerDependencies: + '@sinclair/typebox': '>= 0.34.0' + openapi-types: '>= 12.0.0' + typescript: '>= 5.0.0' + peerDependenciesMeta: + openapi-types: + optional: true + typescript: + optional: true + embla-carousel-react@8.5.2: resolution: {integrity: sha512-Tmx+uY3MqseIGdwp0ScyUuxpBgx5jX1f7od4Cm5mDwg/dptEiTKf9xp6tw0lZN2VA9JbnVMl/aikmbc53c6QFA==} peerDependencies: @@ -10481,6 +10669,9 @@ packages: hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} + hookable@5.5.3: + resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} @@ -10551,6 +10742,10 @@ packages: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + httpsnippet@2.0.0: resolution: {integrity: sha512-Hb2ttfB5OhasYxwChZ8QKpYX3v4plNvwMaMulUIC7M3RHRDf1Op6EMp47LfaU2sgQgfvo5spWK4xRAirMEisrg==} engines: {node: '>=10'} @@ -10624,6 +10819,10 @@ packages: resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} engines: {node: '>=12'} + index-to-position@0.1.2: + resolution: {integrity: sha512-MWDKS3AS1bGCHLBA2VLImJz42f7bJh8wQsTGCzI3j519/CASStoDONUBVz2I/VID0MpiX3SGSnbOD2xUalbE5g==} + engines: {node: '>=18'} + inflation@2.1.0: resolution: {integrity: sha512-t54PPJHG1Pp7VQvxyVCJ9mBbjG3Hqryges9bXoOO6GExCPa+//i/d5GSuFtpx3ALLd7lgIAur6zrIlBQyJuMlQ==} engines: {node: '>= 0.8.0'} @@ -11490,6 +11689,10 @@ packages: resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} engines: {node: '>=14'} + js-levenshtein@1.1.6: + resolution: {integrity: sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==} + engines: {node: '>=0.10.0'} + js-sha3@0.8.0: resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} @@ -12113,6 +12316,9 @@ packages: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} + memoirist@0.3.0: + resolution: {integrity: sha512-wR+4chMgVPq+T6OOsk40u9Wlpw1Pjx66NMNiYxCQQ4EUJ7jDs3D9kTCeKdBOkvAiqXlHLVJlvYL01PvIJ1MPNg==} + memoizerific@1.11.3: resolution: {integrity: sha512-/EuHYwAPdLtXwAwSZkh/Gutery6pD2KYd44oQLhAvQp/50mpyduZh8Q7PYHXTCJ+wuXxt7oij2LXyIJOOYFPog==} @@ -12831,6 +13037,12 @@ packages: openapi-typescript-helpers@0.0.6: resolution: {integrity: sha512-2d0qCzTcD8aADUMHjG/XOgti8/m857Z0q/Ix4y2jTGIpq5OLcE/KfTagcik8qkKDTowbvNo91XVxeZcni1twuQ==} + openapi-typescript@7.6.1: + resolution: {integrity: sha512-F7RXEeo/heF3O9lOXo2bNjCOtfp7u+D6W3a3VNEH2xE6v+fxLtn5nq0uvUcA1F5aT+CMhNeC5Uqtg5tlXFX/ag==} + hasBin: true + peerDependencies: + typescript: ^5.x + openapi3-ts@2.0.2: resolution: {integrity: sha512-TxhYBMoqx9frXyOgnRHufjQfPXomTIHYKhSKJ6jHfj13kS8OEIhvmE8CTuQyKtjjWttAjX5DPxM1vmalEpo8Qw==} @@ -12941,6 +13153,10 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} + parse-json@8.1.0: + resolution: {integrity: sha512-rum1bPifK5SSar35Z6EKZuYPJx85pkNaFrxBK3mwdfSJ1/WKbYrjoW/zTPSjRRamfmVX1ACBIdFAO0VRErW/EA==} + engines: {node: '>=18'} + parse5@6.0.1: resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} @@ -13008,6 +13224,9 @@ packages: pathe@1.1.1: resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathval@2.0.0: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} @@ -13906,6 +14125,9 @@ packages: remeda@1.6.1: resolution: {integrity: sha512-ywn4Tv2cPBj6hk0TEYMHusWVXu72yJNCaWUdMK7kc7x/PjQPBSvtMbmBWP4PQH791kpl3rPBe3ZVkJyPj3c+0g==} + remeda@2.20.1: + resolution: {integrity: sha512-gsEsSmjE0CHkNp6xEsWsU/6JVNWq7rqw+ZfzNMbVV4YFIPtTj/i0FfxurTRI6Z9sAnQufU9de2Cb3xHsUTFTMA==} + remove-accents@0.4.2: resolution: {integrity: sha512-7pXIJqJOq5tFgG1A2Zxti3Ht8jJF337m4sowbuHsW30ZnkQFnDzy9qBNhgzX8ZLW4+UBcXiiR7SwR6pokHsxiA==} @@ -14337,6 +14559,10 @@ packages: resolution: {integrity: sha512-YTywJG93yxwHLgrYLZjlC75moVEX04LZM4FHfihjHe1FCXm+QaLOFfSf535aXOAd0ArVQMWUAe8ZPm4VtWyXaA==} engines: {node: '>=12'} + snakecase-keys@8.0.1: + resolution: {integrity: sha512-Sj51kE1zC7zh6TDlNNz0/Jn1n5HiHdoQErxO8jLtnyrkJW/M5PrI7x05uDgY3BO7OUQYKCvmeMurW6BPUdwEOw==} + engines: {node: '>=18'} + snapdragon-node@2.1.1: resolution: {integrity: sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==} engines: {node: '>=0.10.0'} @@ -14727,6 +14953,10 @@ packages: resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} engines: {node: '>=10'} + supports-color@9.4.0: + resolution: {integrity: sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==} + engines: {node: '>=12'} + supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -14974,6 +15204,13 @@ packages: '@trpc/server': ^10.0.0 zod: ^3.19.1 + trpc-to-openapi@2.1.3: + resolution: {integrity: sha512-W5wKRHMVVBvq2zD4F8QU4enCLu/pWX54O2lvMvzQWjOXaY70C1GT9Kl6y1I+TBkIpuz1E1mdXbLM3esXQsLspQ==} + peerDependencies: + '@trpc/server': ^11.0.0-rc.648 + zod: ^3.23.8 + zod-openapi: ^4.1.0 + ts-api-utils@1.3.0: resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} engines: {node: '>=16'} @@ -15138,6 +15375,10 @@ packages: resolution: {integrity: sha512-FVNSzGQz9Th+/9R6Lvv7WIAkstylfHN2/JYxkyhhmKFYh9At2DST8t6L6Lref9eYO8PXFTfG9Sg1Agg0K3vq3Q==} engines: {node: '>=14.16'} + type-fest@4.34.1: + resolution: {integrity: sha512-6kSc32kT0rbwxD6QL1CYe8IqdzN/J/ILMrNK+HMQCKH3insCDRY/3ITb0vcBss0a3t72fzh2YSzj8ko1HgwT3g==} + engines: {node: '>=16'} + type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} @@ -15352,6 +15593,9 @@ packages: upper-case@2.0.2: resolution: {integrity: sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==} + uri-js-replace@1.0.1: + resolution: {integrity: sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==} + uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -15805,6 +16049,9 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yaml-ast-parser@0.0.43: + resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} + yaml@1.10.2: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} @@ -15857,6 +16104,9 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + zhead@2.2.4: + resolution: {integrity: sha512-8F0OI5dpWIA5IGG5NHUg9staDwz/ZPxZtvGVf01j7vHqSyZ0raHY+78atOVxRqb73AotX22uV1pXt3gYSstGag==} + zod-openapi@2.11.0: resolution: {integrity: sha512-nG/l7AzEguGnnWrLmVLZfk80c6G79LQFlIVG3oby203DLcQ1X8lged82pkxPZoD6ytdutoKTyKLles760+mZUw==} engines: {node: '>=16.11'} @@ -15981,7 +16231,7 @@ snapshots: '@babel/traverse': 7.21.2 '@babel/types': 7.21.2 convert-source-map: 1.8.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) gensync: 1.0.0-beta.2 json5: 2.2.1 semver: 6.3.1 @@ -16001,7 +16251,7 @@ snapshots: '@babel/traverse': 7.23.4 '@babel/types': 7.23.4 convert-source-map: 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -16021,7 +16271,7 @@ snapshots: '@babel/traverse': 7.26.5 '@babel/types': 7.26.5 convert-source-map: 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -16109,7 +16359,7 @@ snapshots: '@babel/core': 7.25.2 '@babel/helper-compilation-targets': 7.26.5 '@babel/helper-plugin-utils': 7.26.5 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -17032,7 +17282,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.18.6 '@babel/parser': 7.21.2 '@babel/types': 7.21.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -17047,7 +17297,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.18.6 '@babel/parser': 7.26.5 '@babel/types': 7.26.5 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -17062,7 +17312,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.23.4 '@babel/types': 7.23.4 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -17074,7 +17324,7 @@ snapshots: '@babel/parser': 7.26.5 '@babel/template': 7.25.9 '@babel/types': 7.26.5 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -17086,7 +17336,7 @@ snapshots: '@babel/parser': 7.26.5 '@babel/template': 7.25.9 '@babel/types': 7.26.5 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -17156,6 +17406,25 @@ snapshots: - react - react-dom + '@clerk/backend@1.24.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@clerk/shared': 2.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@clerk/types': 4.45.1 + cookie: 1.0.2 + snakecase-keys: 8.0.1 + tslib: 2.4.1 + transitivePeerDependencies: + - react + - react-dom + + '@clerk/clerk-react@5.22.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@clerk/shared': 2.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@clerk/types': 4.45.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + tslib: 2.4.1 + '@clerk/clerk-react@5.9.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@clerk/shared': 2.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -17177,6 +17446,31 @@ snapshots: server-only: 0.0.1 tslib: 2.4.1 + '@clerk/nextjs@6.11.2(next@14.2.13(@babel/core@7.25.2)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@clerk/backend': 1.24.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@clerk/clerk-react': 5.22.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@clerk/shared': 2.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@clerk/types': 4.45.1 + crypto-js: 4.2.0 + next: 14.2.13(@babel/core@7.25.2)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + server-only: 0.0.1 + tslib: 2.4.1 + + '@clerk/shared@2.21.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@clerk/types': 4.45.1 + dequal: 2.0.3 + glob-to-regexp: 0.4.1 + js-cookie: 3.0.5 + std-env: 3.7.0 + swr: 2.2.0(react@18.3.1) + optionalDependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + '@clerk/shared@2.8.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@clerk/types': 4.21.0 @@ -17192,6 +17486,10 @@ snapshots: dependencies: csstype: 3.1.1 + '@clerk/types@4.45.1': + dependencies: + csstype: 3.1.3 + '@cnakazawa/watch@1.0.4': dependencies: exec-sh: 0.3.6 @@ -17199,6 +17497,14 @@ snapshots: '@drizzle-team/brocli@0.10.2': {} + '@elysiajs/swagger@1.2.0(elysia@1.2.12(@sinclair/typebox@0.34.20)(openapi-types@12.1.3)(typescript@5.7.3))': + dependencies: + '@scalar/themes': 0.9.65 + '@scalar/types': 0.0.12 + elysia: 1.2.12(@sinclair/typebox@0.34.20)(openapi-types@12.1.3)(typescript@5.7.3) + openapi-types: 12.1.3 + pathe: 1.1.2 + '@esbuild-kit/cjs-loader@2.4.1': dependencies: '@esbuild-kit/core-utils': 3.3.2 @@ -17305,7 +17611,7 @@ snapshots: '@eslint/eslintrc@1.3.3': dependencies: ajv: 6.12.6 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -17319,7 +17625,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -17864,7 +18170,7 @@ snapshots: '@humanwhocodes/config-array@0.10.7': dependencies: '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -17872,7 +18178,7 @@ snapshots: '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -20637,6 +20943,29 @@ snapshots: '@react-types/shared': 3.17.0(react@18.3.1) react: 18.3.1 + '@redocly/ajv@8.11.2': + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js-replace: 1.0.1 + + '@redocly/config@0.20.3': {} + + '@redocly/openapi-core@1.28.5(supports-color@9.4.0)': + dependencies: + '@redocly/ajv': 8.11.2 + '@redocly/config': 0.20.3 + colorette: 1.4.0 + https-proxy-agent: 7.0.6(supports-color@9.4.0) + js-levenshtein: 1.1.6 + js-yaml: 4.1.0 + minimatch: 5.1.6 + pluralize: 8.0.0 + yaml-ast-parser: 0.0.43 + transitivePeerDependencies: + - supports-color + '@rehooks/component-size@1.0.3(react@18.3.1)': dependencies: react: 18.3.1 @@ -20746,6 +21075,9 @@ snapshots: '@rollup/rollup-linux-x64-gnu@4.24.0': optional: true + '@rollup/rollup-linux-x64-gnu@4.6.1': + optional: true + '@rollup/rollup-linux-x64-musl@4.24.0': optional: true @@ -20760,6 +21092,24 @@ snapshots: '@rushstack/eslint-patch@1.5.1': {} + '@scalar/openapi-types@0.1.1': {} + + '@scalar/openapi-types@0.1.7': {} + + '@scalar/themes@0.9.65': + dependencies: + '@scalar/types': 0.0.31 + + '@scalar/types@0.0.12': + dependencies: + '@scalar/openapi-types': 0.1.1 + '@unhead/schema': 1.11.18 + + '@scalar/types@0.0.31': + dependencies: + '@scalar/openapi-types': 0.1.7 + '@unhead/schema': 1.11.18 + '@sentry-internal/browser-utils@8.33.1': dependencies: '@sentry/core': 8.33.1 @@ -21025,6 +21375,8 @@ snapshots: '@sinclair/typebox@0.33.12': {} + '@sinclair/typebox@0.34.20': {} + '@sindresorhus/is@4.6.0': {} '@sindresorhus/is@5.6.0': {} @@ -21898,6 +22250,11 @@ snapshots: '@trpc/server': 10.40.0 typescript: 5.7.3 + '@trpc/client@11.0.0-rc.764(@trpc/server@11.0.0-rc.764(typescript@5.7.3))(typescript@5.7.3)': + dependencies: + '@trpc/server': 11.0.0-rc.764(typescript@5.7.3) + typescript: 5.7.3 + '@trpc/react-query@10.40.0(@tanstack/react-query@4.28.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@trpc/client@10.40.0(@trpc/server@10.40.0))(@trpc/server@10.40.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@tanstack/react-query': 4.28.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -22304,7 +22661,6 @@ snapshots: '@types/ws@8.5.14': dependencies: '@types/node': 20.17.16 - optional: true '@types/yargs-parser@21.0.0': {} @@ -22328,7 +22684,7 @@ snapshots: '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/type-utils': 5.62.0(eslint@8.57.1)(typescript@5.6.2) '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.6.2) - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) eslint: 8.57.1 graphemer: 1.4.0 ignore: 5.3.1 @@ -22365,7 +22721,7 @@ snapshots: '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.7.3) - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) eslint: 8.23.0 optionalDependencies: typescript: 5.7.3 @@ -22377,7 +22733,7 @@ snapshots: '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.6.2) - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) eslint: 8.57.1 optionalDependencies: typescript: 5.6.2 @@ -22416,7 +22772,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.6.2) '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@5.6.2) - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) eslint: 8.57.1 tsutils: 3.21.0(typescript@5.6.2) optionalDependencies: @@ -22428,7 +22784,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.7.3) '@typescript-eslint/utils': 6.21.0(eslint@8.23.0)(typescript@5.7.3) - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) eslint: 8.23.0 ts-api-utils: 1.3.0(typescript@5.7.3) optionalDependencies: @@ -22446,7 +22802,7 @@ snapshots: dependencies: '@typescript-eslint/types': 5.57.1 '@typescript-eslint/visitor-keys': 5.57.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.3 @@ -22460,7 +22816,7 @@ snapshots: dependencies: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.3 @@ -22474,7 +22830,7 @@ snapshots: dependencies: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.3 @@ -22488,7 +22844,7 @@ snapshots: dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -22560,6 +22916,11 @@ snapshots: '@ungap/structured-clone@1.2.0': {} + '@unhead/schema@1.11.18': + dependencies: + hookable: 5.5.3 + zhead: 2.2.4 + '@vitest/expect@2.0.5': dependencies: '@vitest/spy': 2.0.5 @@ -22735,10 +23096,12 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) transitivePeerDependencies: - supports-color + agent-base@7.1.3: {} + aggregate-error@3.1.0: dependencies: clean-stack: 2.2.0 @@ -22785,6 +23148,8 @@ snapshots: require-from-string: 2.0.2 uri-js: 4.4.1 + ansi-colors@4.1.3: {} + ansi-escapes@4.3.2: dependencies: type-fest: 0.21.3 @@ -23376,7 +23741,6 @@ snapshots: dependencies: '@types/node': 20.17.16 '@types/ws': 8.5.14 - optional: true busboy@1.6.0: dependencies: @@ -23535,6 +23899,8 @@ snapshots: snake-case: 3.0.4 tslib: 2.6.2 + change-case@5.4.4: {} + char-regex@1.0.2: {} char-regex@2.0.1: {} @@ -23761,6 +24127,8 @@ snapshots: color-convert: 2.0.1 color-string: 1.9.1 + colorette@1.4.0: {} + colorette@2.0.19: {} colors@1.4.0: {} @@ -23881,6 +24249,8 @@ snapshots: cookie@0.7.1: {} + cookie@1.0.2: {} + cookies-next@4.0.0: dependencies: '@types/cookie': 0.4.1 @@ -24027,6 +24397,8 @@ snapshots: csstype@3.1.2: {} + csstype@3.1.3: {} + csv-parse@4.16.3: {} csv-stringify@5.6.5: {} @@ -24097,9 +24469,11 @@ snapshots: dependencies: ms: 2.1.2 - debug@4.3.7: + debug@4.3.7(supports-color@9.4.0): dependencies: ms: 2.1.3 + optionalDependencies: + supports-color: 9.4.0 decimal.js-light@2.5.1: {} @@ -24223,7 +24597,7 @@ snapshots: detect-port@1.5.1: dependencies: address: 1.2.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) transitivePeerDependencies: - supports-color @@ -24389,6 +24763,15 @@ snapshots: electron-to-chromium@1.5.87: {} + elysia@1.2.12(@sinclair/typebox@0.34.20)(openapi-types@12.1.3)(typescript@5.7.3): + dependencies: + '@sinclair/typebox': 0.34.20 + cookie: 1.0.2 + memoirist: 0.3.0 + optionalDependencies: + openapi-types: 12.1.3 + typescript: 5.7.3 + embla-carousel-react@8.5.2(react@18.3.1): dependencies: embla-carousel: 8.5.2 @@ -24426,7 +24809,7 @@ snapshots: engine.io-client@6.2.2(bufferutil@4.0.7)(utf-8-validate@5.0.10): dependencies: '@socket.io/component-emitter': 3.1.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) engine.io-parser: 5.0.4 ws: 8.2.3(bufferutil@4.0.7)(utf-8-validate@5.0.10) xmlhttprequest-ssl: 2.0.0 @@ -24448,7 +24831,7 @@ snapshots: base64id: 2.0.0 cookie: 0.4.2 cors: 2.8.5 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) engine.io-parser: 5.2.1 ws: 8.11.0(bufferutil@4.0.7)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -24621,7 +25004,7 @@ snapshots: esbuild-register@3.5.0(esbuild@0.17.5): dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) esbuild: 0.17.5 transitivePeerDependencies: - supports-color @@ -24708,7 +25091,7 @@ snapshots: eslint-import-resolver-typescript@3.5.3(eslint-plugin-import@2.29.0)(eslint@8.23.0): dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) enhanced-resolve: 5.10.0 eslint: 8.23.0 eslint-plugin-import: 2.29.0(@typescript-eslint/parser@6.21.0(eslint@8.23.0)(typescript@5.7.3))(eslint@8.23.0) @@ -24971,7 +25354,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -25248,7 +25631,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -26123,6 +26506,8 @@ snapshots: dependencies: react-is: 16.13.1 + hookable@5.5.3: {} + hosted-git-info@2.8.9: {} hpagent@0.1.2: @@ -26171,7 +26556,7 @@ snapshots: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) transitivePeerDependencies: - supports-color optional: true @@ -26207,7 +26592,14 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) + transitivePeerDependencies: + - supports-color + + https-proxy-agent@7.0.6(supports-color@9.4.0): + dependencies: + agent-base: 7.1.3 + debug: 4.3.7(supports-color@9.4.0) transitivePeerDependencies: - supports-color @@ -26277,6 +26669,8 @@ snapshots: indent-string@5.0.0: {} + index-to-position@0.1.2: {} + inflation@2.1.0: {} inflight@1.0.6: @@ -26687,7 +27081,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) istanbul-lib-coverage: 3.2.0 source-map: 0.6.1 transitivePeerDependencies: @@ -26696,7 +27090,7 @@ snapshots: istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.25 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) istanbul-lib-coverage: 3.2.0 transitivePeerDependencies: - supports-color @@ -27532,6 +27926,8 @@ snapshots: js-cookie@3.0.5: {} + js-levenshtein@1.1.6: {} + js-sha3@0.8.0: {} js-tokens@4.0.0: {} @@ -27713,7 +28109,7 @@ snapshots: dependencies: '@types/express': 4.17.14 '@types/jsonwebtoken': 8.5.9 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) jose: 2.0.6 limiter: 1.1.5 lru-memoizer: 2.1.4 @@ -28289,6 +28685,8 @@ snapshots: media-typer@0.3.0: {} + memoirist@0.3.0: {} + memoizerific@1.11.3: dependencies: map-or-similar: 1.5.0 @@ -28618,7 +29016,7 @@ snapshots: micromark@2.11.4: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) parse-entities: 2.0.0 transitivePeerDependencies: - supports-color @@ -28626,7 +29024,7 @@ snapshots: micromark@3.2.0: dependencies: '@types/debug': 4.1.12 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) decode-named-character-reference: 1.0.2 micromark-core-commonmark: 1.1.0 micromark-factory-space: 1.1.0 @@ -29236,6 +29634,16 @@ snapshots: openapi-typescript-helpers@0.0.6: {} + openapi-typescript@7.6.1(typescript@5.7.3): + dependencies: + '@redocly/openapi-core': 1.28.5(supports-color@9.4.0) + ansi-colors: 4.1.3 + change-case: 5.4.4 + parse-json: 8.1.0 + supports-color: 9.4.0 + typescript: 5.7.3 + yargs-parser: 21.1.1 + openapi3-ts@2.0.2: dependencies: yaml: 1.10.2 @@ -29372,6 +29780,12 @@ snapshots: json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 + parse-json@8.1.0: + dependencies: + '@babel/code-frame': 7.26.2 + index-to-position: 0.1.2 + type-fest: 4.34.1 + parse5@6.0.1: {} parseurl@1.3.3: {} @@ -29426,6 +29840,8 @@ snapshots: pathe@1.1.1: {} + pathe@1.1.2: {} + pathval@2.0.0: {} pause-stream@0.0.11: @@ -30448,6 +30864,10 @@ snapshots: remeda@1.6.1: {} + remeda@2.20.1: + dependencies: + type-fest: 4.34.1 + remove-accents@0.4.2: {} remove-file-safe@1.0.1: {} @@ -30487,7 +30907,7 @@ snapshots: require-in-the-middle@7.4.0: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) module-details-from-path: 1.0.3 resolve: 1.22.8 transitivePeerDependencies: @@ -30549,7 +30969,7 @@ snapshots: retry-request@4.2.2: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) extend: 3.0.2 transitivePeerDependencies: - supports-color @@ -30977,6 +31397,12 @@ snapshots: snake-case: 3.0.4 type-fest: 2.19.0 + snakecase-keys@8.0.1: + dependencies: + map-obj: 4.3.0 + snake-case: 3.0.4 + type-fest: 4.34.1 + snapdragon-node@2.1.1: dependencies: define-property: 1.0.0 @@ -31010,7 +31436,7 @@ snapshots: socket.io-client@4.5.2(bufferutil@4.0.7)(utf-8-validate@5.0.10): dependencies: '@socket.io/component-emitter': 3.1.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) engine.io-client: 6.2.2(bufferutil@4.0.7)(utf-8-validate@5.0.10) socket.io-parser: 4.2.1 transitivePeerDependencies: @@ -31021,14 +31447,14 @@ snapshots: socket.io-parser@4.2.1: dependencies: '@socket.io/component-emitter': 3.1.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) transitivePeerDependencies: - supports-color socket.io-parser@4.2.4: dependencies: '@socket.io/component-emitter': 3.1.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) transitivePeerDependencies: - supports-color @@ -31037,7 +31463,7 @@ snapshots: accepts: 1.3.8 base64id: 2.0.0 cors: 2.8.5 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) engine.io: 6.5.4(bufferutil@4.0.7)(utf-8-validate@5.0.10) socket.io-adapter: 2.5.2(bufferutil@4.0.7)(utf-8-validate@5.0.10) socket.io-parser: 4.2.4 @@ -31449,6 +31875,8 @@ snapshots: dependencies: has-flag: 4.0.0 + supports-color@9.4.0: {} + supports-preserve-symlinks-flag@1.0.0: {} svg-parser@2.0.4: {} @@ -31765,6 +32193,17 @@ snapshots: zod: 3.24.2 zod-to-json-schema: 3.21.1(zod@3.24.2) + trpc-to-openapi@2.1.3(@trpc/server@11.0.0-rc.764(typescript@5.7.3))(zod-openapi@4.2.3(zod@3.24.2))(zod@3.24.2): + dependencies: + '@trpc/server': 11.0.0-rc.764(typescript@5.7.3) + co-body: 6.1.0 + h3: 1.8.2 + openapi3-ts: 4.4.0 + zod: 3.24.2 + zod-openapi: 4.2.3(zod@3.24.2) + optionalDependencies: + '@rollup/rollup-linux-x64-gnu': 4.6.1 + ts-api-utils@1.3.0(typescript@5.7.3): dependencies: typescript: 5.7.3 @@ -31899,6 +32338,8 @@ snapshots: type-fest@3.8.0: {} + type-fest@4.34.1: {} + type-is@1.6.18: dependencies: media-typer: 0.3.0 @@ -32161,6 +32602,8 @@ snapshots: dependencies: tslib: 2.7.0 + uri-js-replace@1.0.1: {} + uri-js@4.4.1: dependencies: punycode: 2.1.1 @@ -32629,6 +33072,8 @@ snapshots: yallist@4.0.0: {} + yaml-ast-parser@0.0.43: {} + yaml@1.10.2: {} yaml@2.3.0: {} @@ -32693,6 +33138,8 @@ snapshots: yocto-queue@0.1.0: {} + zhead@2.2.4: {} + zod-openapi@2.11.0(zod@3.24.2): dependencies: zod: 3.24.2 From c763bcf740bac8d3ea66138dc52aab270619ca90 Mon Sep 17 00:00:00 2001 From: OpenInt Bot Date: Thu, 13 Feb 2025 04:39:22 -0800 Subject: [PATCH 2/4] update generated --- packages-v1/api-v1/__generated__/openapi.json | 407 +++++++++++++++++- .../api-v1/__generated__/openapi.types.ts | 240 ++++++++++- packages-v1/api-v1/package.json | 2 +- 3 files changed, 612 insertions(+), 37 deletions(-) diff --git a/packages-v1/api-v1/__generated__/openapi.json b/packages-v1/api-v1/__generated__/openapi.json index d6561d86..72e10bff 100644 --- a/packages-v1/api-v1/__generated__/openapi.json +++ b/packages-v1/api-v1/__generated__/openapi.json @@ -10,6 +10,132 @@ } ], "paths": { + "/connection": { + "get": { + "operationId": "listConnections", + "security": [ + { + "Authorization": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/core.connection" + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/connector-config": { + "get": { + "operationId": "listConnectorConfigs", + "security": [ + { + "Authorization": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/core.connector_config" + } + } + }, + "required": [ + "items" + ] + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, "/health": { "get": { "operationId": "health", @@ -71,18 +197,116 @@ } }, "schemas": { - "error.UNAUTHORIZED": { + "core.connection": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "connector_config_id": { + "type": "string" + } + }, + "required": [ + "id", + "updated_at", + "created_at", + "connector_config_id" + ], + "description": "Connection Base" + }, + { + "oneOf": [ + { + "$ref": "#/components/schemas/plaid.connection" + }, + { + "$ref": "#/components/schemas/greenhouse.connection" + } + ], + "discriminator": { + "propertyName": "connector_name", + "mapping": { + "plaid": "#/components/schemas/plaid.connection", + "greenhouse": "#/components/schemas/greenhouse.connection" + } + }, + "description": "Connector specific data" + } + ], + "title": "Connection" + }, + "core.connector_config": { + "allOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "org_id": { + "type": "string" + } + }, + "required": [ + "id", + "updated_at", + "created_at", + "org_id" + ], + "description": "Connector Config Base" + }, + { + "oneOf": [ + { + "$ref": "#/components/schemas/plaid.connector_config" + }, + { + "$ref": "#/components/schemas/greenhouse.connector_config" + } + ], + "discriminator": { + "propertyName": "connector_name", + "mapping": { + "plaid": "#/components/schemas/plaid.connector_config", + "greenhouse": "#/components/schemas/greenhouse.connector_config" + } + }, + "description": "Connector specific data" + } + ], + "title": "Connector Config" + }, + "error.FORBIDDEN": { "type": "object", "properties": { "message": { "type": "string", "description": "The error message", - "example": "Authorization not provided" + "example": "Insufficient access" }, "code": { "type": "string", "description": "The error code", - "example": "UNAUTHORIZED" + "example": "FORBIDDEN" }, "issues": { "type": "array", @@ -105,26 +329,26 @@ "message", "code" ], - "title": "Authorization not provided error (401)", + "title": "Insufficient access error (403)", "description": "The error information", "example": { - "code": "UNAUTHORIZED", - "message": "Authorization not provided", + "code": "FORBIDDEN", + "message": "Insufficient access", "issues": [] } }, - "error.FORBIDDEN": { + "error.INTERNAL_SERVER_ERROR": { "type": "object", "properties": { "message": { "type": "string", "description": "The error message", - "example": "Insufficient access" + "example": "Internal server error" }, "code": { "type": "string", "description": "The error code", - "example": "FORBIDDEN" + "example": "INTERNAL_SERVER_ERROR" }, "issues": { "type": "array", @@ -147,26 +371,26 @@ "message", "code" ], - "title": "Insufficient access error (403)", + "title": "Internal server error error (500)", "description": "The error information", "example": { - "code": "FORBIDDEN", - "message": "Insufficient access", + "code": "INTERNAL_SERVER_ERROR", + "message": "Internal server error", "issues": [] } }, - "error.INTERNAL_SERVER_ERROR": { + "error.UNAUTHORIZED": { "type": "object", "properties": { "message": { "type": "string", "description": "The error message", - "example": "Internal server error" + "example": "Authorization not provided" }, "code": { "type": "string", "description": "The error code", - "example": "INTERNAL_SERVER_ERROR" + "example": "UNAUTHORIZED" }, "issues": { "type": "array", @@ -189,13 +413,160 @@ "message", "code" ], - "title": "Internal server error error (500)", + "title": "Authorization not provided error (401)", "description": "The error information", "example": { - "code": "INTERNAL_SERVER_ERROR", - "message": "Internal server error", + "code": "UNAUTHORIZED", + "message": "Authorization not provided", "issues": [] } + }, + "greenhouse.connection": { + "type": "object", + "properties": { + "connector_name": { + "type": "string", + "enum": [ + "greenhouse" + ] + }, + "secrets": { + "type": "object", + "properties": { + "api_key": { + "type": "string" + } + }, + "required": [ + "api_key" + ] + }, + "settings": { + "type": "object" + } + }, + "required": [ + "connector_name", + "secrets", + "settings" + ], + "description": "Greenhouse Connection" + }, + "greenhouse.connector_config": { + "type": "object", + "properties": { + "connector_name": { + "type": "string", + "enum": [ + "greenhouse" + ] + }, + "secrets": { + "type": "object" + }, + "config": { + "type": "object" + } + }, + "required": [ + "connector_name", + "secrets", + "config" + ], + "description": "Greenhouse Connector Config" + }, + "plaid.connection": { + "type": "object", + "properties": { + "connector_name": { + "type": "string", + "enum": [ + "plaid" + ] + }, + "secrets": { + "type": "object", + "properties": { + "access_token": { + "type": "string" + } + }, + "required": [ + "access_token" + ] + }, + "settings": { + "type": "object", + "properties": { + "item_id": { + "type": "string" + } + }, + "required": [ + "item_id" + ] + } + }, + "required": [ + "connector_name", + "secrets", + "settings" + ], + "description": "Plaid Connection" + }, + "plaid.connector_config": { + "type": "object", + "properties": { + "connector_name": { + "type": "string", + "enum": [ + "plaid" + ] + }, + "secrets": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + } + }, + "required": [ + "client_id", + "client_secret" + ] + }, + "config": { + "type": "object", + "properties": { + "client_name": { + "type": "string" + }, + "products": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "transactions", + "balances" + ] + } + } + }, + "required": [ + "client_name", + "products" + ] + } + }, + "required": [ + "connector_name", + "secrets", + "config" + ], + "description": "Plaid Connector Config" } } } diff --git a/packages-v1/api-v1/__generated__/openapi.types.ts b/packages-v1/api-v1/__generated__/openapi.types.ts index 7b93424d..0b3ca908 100644 --- a/packages-v1/api-v1/__generated__/openapi.types.ts +++ b/packages-v1/api-v1/__generated__/openapi.types.ts @@ -4,6 +4,38 @@ */ export interface paths { + "/connection": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["listConnections"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/connector-config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get: operations["listConnectorConfigs"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/health": { parameters: { query?: never; @@ -24,24 +56,46 @@ export interface paths { export type webhooks = Record; export interface components { schemas: { + /** Connection */ + "core.connection": { + connector_name: "core.connection"; + } & ({ + id: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + connector_config_id: string; + } & Omit); + /** Connector Config */ + "core.connector_config": { + connector_name: "core.connector_config"; + } & ({ + id: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + org_id: string; + } & Omit); /** - * Authorization not provided error (401) + * Insufficient access error (403) * @description The error information * @example { - * "code": "UNAUTHORIZED", - * "message": "Authorization not provided", + * "code": "FORBIDDEN", + * "message": "Insufficient access", * "issues": [] * } */ - "error.UNAUTHORIZED": { + "error.FORBIDDEN": { /** * @description The error message - * @example Authorization not provided + * @example Insufficient access */ message: string; /** * @description The error code - * @example UNAUTHORIZED + * @example FORBIDDEN */ code: string; /** @@ -53,23 +107,23 @@ export interface components { }[]; }; /** - * Insufficient access error (403) + * Internal server error error (500) * @description The error information * @example { - * "code": "FORBIDDEN", - * "message": "Insufficient access", + * "code": "INTERNAL_SERVER_ERROR", + * "message": "Internal server error", * "issues": [] * } */ - "error.FORBIDDEN": { + "error.INTERNAL_SERVER_ERROR": { /** * @description The error message - * @example Insufficient access + * @example Internal server error */ message: string; /** * @description The error code - * @example FORBIDDEN + * @example INTERNAL_SERVER_ERROR */ code: string; /** @@ -81,23 +135,23 @@ export interface components { }[]; }; /** - * Internal server error error (500) + * Authorization not provided error (401) * @description The error information * @example { - * "code": "INTERNAL_SERVER_ERROR", - * "message": "Internal server error", + * "code": "UNAUTHORIZED", + * "message": "Authorization not provided", * "issues": [] * } */ - "error.INTERNAL_SERVER_ERROR": { + "error.UNAUTHORIZED": { /** * @description The error message - * @example Internal server error + * @example Authorization not provided */ message: string; /** * @description The error code - * @example INTERNAL_SERVER_ERROR + * @example UNAUTHORIZED */ code: string; /** @@ -108,6 +162,58 @@ export interface components { message: string; }[]; }; + /** @description Greenhouse Connection */ + "greenhouse.connection": { + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + connector_name: "greenhouse"; + secrets: { + api_key: string; + }; + settings: Record; + }; + /** @description Greenhouse Connector Config */ + "greenhouse.connector_config": { + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + connector_name: "greenhouse"; + secrets: Record; + config: Record; + }; + /** @description Plaid Connection */ + "plaid.connection": { + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + connector_name: "plaid"; + secrets: { + access_token: string; + }; + settings: { + item_id: string; + }; + }; + /** @description Plaid Connector Config */ + "plaid.connector_config": { + /** + * @description discriminator enum property added by openapi-typescript + * @enum {string} + */ + connector_name: "plaid"; + secrets: { + client_id: string; + client_secret: string; + }; + config: { + client_name: string; + products: ("transactions" | "balances")[]; + }; + }; }; responses: never; parameters: never; @@ -117,6 +223,104 @@ export interface components { } export type $defs = Record; export interface operations { + listConnections: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + items: components["schemas"]["core.connection"][]; + }; + }; + }; + /** @description Authorization not provided */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["error.UNAUTHORIZED"]; + }; + }; + /** @description Insufficient access */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["error.FORBIDDEN"]; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["error.INTERNAL_SERVER_ERROR"]; + }; + }; + }; + }; + listConnectorConfigs: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + items: components["schemas"]["core.connector_config"][]; + }; + }; + }; + /** @description Authorization not provided */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["error.UNAUTHORIZED"]; + }; + }; + /** @description Insufficient access */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["error.FORBIDDEN"]; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["error.INTERNAL_SERVER_ERROR"]; + }; + }; + }; + }; health: { parameters: { query?: never; diff --git a/packages-v1/api-v1/package.json b/packages-v1/api-v1/package.json index 9631854e..fdd4fe81 100644 --- a/packages-v1/api-v1/package.json +++ b/packages-v1/api-v1/package.json @@ -7,7 +7,7 @@ "scripts": { "gen": "run-s gen:*", "gen:oas": "bun ./scripts/gen-oas.ts", - "gen:types": "bunx openapi-typescript ./openapi.json --output ./__generated__/openapi.types.ts" + "gen:types": "bunx openapi-typescript ./__generated__/openapi.json --output ./__generated__/openapi.types.ts" }, "dependencies": { "@clerk/nextjs": "^6.11.2", From d4990a1f76cc8dc2ecc654f4304fb638fa34362a Mon Sep 17 00:00:00 2001 From: OpenInt Bot Date: Thu, 13 Feb 2025 04:45:27 -0800 Subject: [PATCH 3/4] Output latest version of spec and add note about types being broken --- packages-v1/api-v1/__generated__/openapi.json | 18 +++++------------- packages-v1/api-v1/scripts/gen-oas.ts | 3 +++ packages-v1/api-v1/trpc/openapi.ts | 1 + 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/packages-v1/api-v1/__generated__/openapi.json b/packages-v1/api-v1/__generated__/openapi.json index 72e10bff..0c4f5e48 100644 --- a/packages-v1/api-v1/__generated__/openapi.json +++ b/packages-v1/api-v1/__generated__/openapi.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "OpenInt", "version": "1.0.0" @@ -426,9 +426,7 @@ "properties": { "connector_name": { "type": "string", - "enum": [ - "greenhouse" - ] + "const": "greenhouse" }, "secrets": { "type": "object", @@ -457,9 +455,7 @@ "properties": { "connector_name": { "type": "string", - "enum": [ - "greenhouse" - ] + "const": "greenhouse" }, "secrets": { "type": "object" @@ -480,9 +476,7 @@ "properties": { "connector_name": { "type": "string", - "enum": [ - "plaid" - ] + "const": "plaid" }, "secrets": { "type": "object", @@ -519,9 +513,7 @@ "properties": { "connector_name": { "type": "string", - "enum": [ - "plaid" - ] + "const": "plaid" }, "secrets": { "type": "object", diff --git a/packages-v1/api-v1/scripts/gen-oas.ts b/packages-v1/api-v1/scripts/gen-oas.ts index 328910d4..cba7d0ca 100644 --- a/packages-v1/api-v1/scripts/gen-oas.ts +++ b/packages-v1/api-v1/scripts/gen-oas.ts @@ -6,3 +6,6 @@ const dest = path.join(__dirname, '../__generated__', 'openapi.json') fs.writeFileSync(dest, JSON.stringify(generateOpenAPISpec({}), null, 2)) console.log(`openapi.json written to ${dest}`) +// NOTE: While the openapi spec is valid +// the typescript types generated from it are not due to usage of discrminated union in the oas spec +// @see https://github.com/openapi-ts/openapi-typescript/issues/2149 diff --git a/packages-v1/api-v1/trpc/openapi.ts b/packages-v1/api-v1/trpc/openapi.ts index 45fe056c..e8b8b534 100644 --- a/packages-v1/api-v1/trpc/openapi.ts +++ b/packages-v1/api-v1/trpc/openapi.ts @@ -9,6 +9,7 @@ export function generateOpenAPISpec({ const oas = generateOpenApiDocument(appRouter, { title: 'OpenInt', version: '1.0.0', + openApiVersion: '3.1.0', baseUrl, }) From c115f75f930ae4afb078fcf7c97022c25230d39d Mon Sep 17 00:00:00 2001 From: OpenInt Bot Date: Thu, 13 Feb 2025 20:08:26 -0800 Subject: [PATCH 4/4] Revert next.js change, and see if build still fails --- apps/web/app/api/[[...api]]/route.ts | 13 ------------- apps/web/package.json | 1 - pnpm-lock.yaml | 3 --- 3 files changed, 17 deletions(-) delete mode 100644 apps/web/app/api/[[...api]]/route.ts diff --git a/apps/web/app/api/[[...api]]/route.ts b/apps/web/app/api/[[...api]]/route.ts deleted file mode 100644 index 7ef67821..00000000 --- a/apps/web/app/api/[[...api]]/route.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {app} from '@openint/api-v1' - -const handler = app.handle - -export { - handler as HEAD, - handler as OPTIONS, - handler as GET, - handler as POST, - handler as PUT, - handler as PATCH, - handler as DELETE, -} diff --git a/apps/web/package.json b/apps/web/package.json index 7b8c9a73..26831375 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -14,7 +14,6 @@ "@clerk/nextjs": "5.6.0", "@lilyrose2798/trpc-openapi": "1.3.10", "@openint/api": "workspace:*", - "@openint/api-v1": "workspace:*", "@openint/app-config": "workspace:*", "@openint/cdk": "workspace:*", "@openint/connect": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 37eba2a5..743faf0d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -584,9 +584,6 @@ importers: '@openint/api': specifier: workspace:* version: link:../../packages/api - '@openint/api-v1': - specifier: workspace:* - version: link:../../packages-v1/api-v1 '@openint/app-config': specifier: workspace:* version: link:../app-config