@deboxsoft/module-core
Advanced tools
Comparing version 2.6.85 to 2.6.86
@@ -9,3 +9,5 @@ import * as _zod from 'zod'; | ||
export { default as deepMerge } from 'ts-deepmerge'; | ||
import { OpenAPIObject } from 'openapi3-ts'; | ||
export * from 'openapi3-ts'; | ||
import { OpenAPIGenerator } from '@asteasolutions/zod-to-openapi'; | ||
export { ZodOpenAPIMetadata, extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi'; | ||
@@ -688,2 +690,17 @@ export { A as AlternativeType, k as AppConfig, l as CONFIG_KEY, m as Callback, j as Config, n as ConfigService, g as CreateResponse, C as CreateResult, e as DataResponse, D as DataResult, c as Filter, a as FilterCondition, F as FilterOperators, I as ID, d as IdParams, J as Join, N as NestedPaths, P as PropertyType, R as RegExpOrString, i as RemoveResponse, f as RemoveResult, b as RootFilterOperators, S as ServerApiConfig, h as UpdateResponse, U as UpdateResult, p as getConfig, o as getConfigService } from './ConfigService-cf6f72f7.js'; | ||
declare type OpenAPIObjectConfig = Omit<OpenAPIObject, 'paths' | 'components' | 'webhooks' | 'openapi'>; | ||
type OpenApiManagerOptions = { | ||
version?: "3.0.0" | "3.0.1" | "3.0.2" | "3.0.3" | "3.1.0"; | ||
}; | ||
declare const createOpenApiManager: (opts?: OpenApiManagerOptions) => OpenApiManager; | ||
declare const getOpenApiManager: () => OpenApiManager; | ||
declare class OpenApiManager { | ||
private opts; | ||
private registry; | ||
constructor(opts: OpenApiManagerOptions); | ||
getOpenApiDocumentation(opts: OpenAPIObjectConfig): OpenAPIObject; | ||
getOpenApiGenerator(opts: OpenAPIObjectConfig): OpenAPIGenerator; | ||
} | ||
type ModuleConfig = { | ||
@@ -698,2 +715,2 @@ errors: { | ||
export { Container, ContainerDIClass, DateSchema, DbxError, DbxErrorOptions, HttpErrorResponse, IdSchema, LOGGER_KEY, Logger, MakeSchemaResponse, ModuleConfig, NotificationType, PageCursorInfo, PageCursorParams, PageCursorParamsOutput, PageDefaultInfo, PageDefaultParams, PageDefaultParamsOutput, PageInfo, PageParams, Pagination, PaginationOptions, PaginationType, RangeDate, RangeDateSchema, TimeStampSchema, clamp, cloneDeep, compact, createLoggerConsole, dayTimeZone, debounce, enumInfo, getLogger, getRangeDate, isAnyZodType, isEmpty, isNil, isObject, isPlainObject, isString, isStringAndNotBlank, isStringBlank, isUndefined, isZodType, kindOf, makeSchemaResponse, mapValues, memoize, objectEquals, omit, omitBy, pickBy, pull, throttle, transformDefaultPageInfo, urlJoin, zod }; | ||
export { Container, ContainerDIClass, DateSchema, DbxError, DbxErrorOptions, HttpErrorResponse, IdSchema, LOGGER_KEY, Logger, MakeSchemaResponse, ModuleConfig, NotificationType, OpenApiManager, PageCursorInfo, PageCursorParams, PageCursorParamsOutput, PageDefaultInfo, PageDefaultParams, PageDefaultParamsOutput, PageInfo, PageParams, Pagination, PaginationOptions, PaginationType, RangeDate, RangeDateSchema, TimeStampSchema, clamp, cloneDeep, compact, createLoggerConsole, createOpenApiManager, dayTimeZone, debounce, enumInfo, getLogger, getOpenApiManager, getRangeDate, isAnyZodType, isEmpty, isNil, isObject, isPlainObject, isString, isStringAndNotBlank, isStringBlank, isUndefined, isZodType, kindOf, makeSchemaResponse, mapValues, memoize, objectEquals, omit, omitBy, pickBy, pull, throttle, transformDefaultPageInfo, urlJoin, zod }; |
@@ -24,3 +24,3 @@ import { __export, CONFIG_KEY, Container, ContainerDIClass, DbxError, getConfig, getConfigService, __reExport } from './chunk-3BIZMSTQ.js'; | ||
import * as openapi3_ts_star from 'openapi3-ts'; | ||
import { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi'; | ||
import { extendZodWithOpenApi, OpenAPIRegistry, OpenAPIGenerator } from '@asteasolutions/zod-to-openapi'; | ||
export { extendZodWithOpenApi } from '@asteasolutions/zod-to-openapi'; | ||
@@ -41,2 +41,3 @@ import default3 from 'mustache'; | ||
Logger: () => Logger, | ||
OpenApiManager: () => OpenApiManager, | ||
PageCursorInfo: () => PageCursorInfo, | ||
@@ -61,2 +62,3 @@ PageCursorParams: () => PageCursorParams, | ||
createLoggerConsole: () => createLoggerConsole, | ||
createOpenApiManager: () => createOpenApiManager, | ||
dayTimeZone: () => dayTimeZone, | ||
@@ -72,2 +74,3 @@ dayjs: () => dayjs, | ||
getLogger: () => getLogger, | ||
getOpenApiManager: () => getOpenApiManager, | ||
getRangeDate: () => getRangeDate, | ||
@@ -774,3 +777,23 @@ headerCase: () => headerCase, | ||
__reExport(src_exports, zod_exports); | ||
var KEY = "OPEN-API-MANAGER-KEY"; | ||
var createOpenApiManager = (opts = {}) => { | ||
const openApiManager = new OpenApiManager(opts); | ||
Container.set(KEY, openApiManager); | ||
return openApiManager; | ||
}; | ||
var getOpenApiManager = () => Container.get(KEY); | ||
var OpenApiManager = class { | ||
constructor(opts) { | ||
this.opts = opts; | ||
} | ||
registry = new OpenAPIRegistry(); | ||
getOpenApiDocumentation(opts) { | ||
const generator = this.getOpenApiGenerator(opts); | ||
return generator.generateDocument(opts); | ||
} | ||
getOpenApiGenerator(opts) { | ||
return new OpenAPIGenerator(this.registry.definitions, this.opts.version || "3.1.0"); | ||
} | ||
}; | ||
export { DateSchema, IdSchema, LOGGER_KEY, Logger, PageCursorInfo, PageCursorParams, PageDefaultInfo, PageDefaultParams, PageInfo, PageParams, Pagination, PaginationOptions, PaginationType, RangeDateSchema, TimeStampSchema, clamp, cloneDeep, compact, createLoggerConsole, dayTimeZone, debounce, enumInfo, getLogger, getRangeDate, isAnyZodType, isEmpty, isNil, isObject, isPlainObject, isString, isStringAndNotBlank, isStringBlank, isUndefined, isZodType, kindOf, makeSchemaResponse, mapValues, memoize, objectEquals, omit, omitBy, pickBy, pull, throttle, transformDefaultPageInfo, urlJoin, zod }; | ||
export { DateSchema, IdSchema, LOGGER_KEY, Logger, OpenApiManager, PageCursorInfo, PageCursorParams, PageDefaultInfo, PageDefaultParams, PageInfo, PageParams, Pagination, PaginationOptions, PaginationType, RangeDateSchema, TimeStampSchema, clamp, cloneDeep, compact, createLoggerConsole, createOpenApiManager, dayTimeZone, debounce, enumInfo, getLogger, getOpenApiManager, getRangeDate, isAnyZodType, isEmpty, isNil, isObject, isPlainObject, isString, isStringAndNotBlank, isStringBlank, isUndefined, isZodType, kindOf, makeSchemaResponse, mapValues, memoize, objectEquals, omit, omitBy, pickBy, pull, throttle, transformDefaultPageInfo, urlJoin, zod }; |
{ | ||
"name": "@deboxsoft/module-core", | ||
"version": "2.6.85", | ||
"version": "2.6.86", | ||
"license": "SEE LICENSE IN LICENSE", | ||
@@ -5,0 +5,0 @@ "maintainers": [ |
147854
4436