@akanjs/server 0.0.39 → 0.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
1
+ import { T as Type } from './types-H2HI4YUe.js';
2
+ import { D as DocumentModel, F as FilterType } from './types-CUkhtrLV.js';
3
+ import { HydratedDocument, Schema } from 'mongoose';
4
+
5
+ interface DefaultDocMtds<TDocument> {
6
+ refresh(): Promise<this>;
7
+ set(data: Partial<TDocument>): this;
8
+ save(): Promise<this>;
9
+ }
10
+ type HydratedDocumentWithId<TDocument> = Omit<HydratedDocument<TDocument, DefaultDocMtds<TDocument>>, "id" | "set" | "save"> & {
11
+ id: string;
12
+ } & DefaultDocMtds<TDocument>;
13
+ type Doc<M> = HydratedDocumentWithId<DocumentModel<M>>;
14
+ type SchemaOf<Mdl, Doc> = Schema<null, Mdl, Doc, undefined, null, Mdl>;
15
+ interface BaseMiddleware {
16
+ onSchema: (schema: SchemaOf<any, any>) => void;
17
+ }
18
+ interface Database<T extends string, Input, Doc extends HydratedDocument<any>, Model, Middleware extends BaseMiddleware, Obj, Insight, Filter extends FilterType, Summary> {
19
+ refName: T;
20
+ Input: Type<Input>;
21
+ Doc: Type<Doc>;
22
+ Model: Type<Model>;
23
+ Middleware: Type<Middleware>;
24
+ Obj: Type<Obj>;
25
+ Insight: Type<Insight>;
26
+ Filter: Type<Filter>;
27
+ Summary?: Type<Summary>;
28
+ }
29
+ declare const Database: {
30
+ Input: (returns: () => Type) => (target: any) => void;
31
+ Document: (returns: () => Type) => (target: any) => void;
32
+ Model: (returns: () => Type) => (target: any) => void;
33
+ Middleware: (returns: () => Type) => (target: any) => void;
34
+ };
35
+
36
+ export { type BaseMiddleware as B, Database as D, type Doc as a };
package/index.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ export { DateScalar, applyNestField, generateGql, generateGqlInput } from './src/gql.js';
2
+ export { resolverOf } from './src/resolver.js';
3
+ export { controllerOf } from './src/controller.js';
4
+ export { processorOf, queueOf } from './src/processor.js';
5
+ export { batchModuleOf, databaseModuleOf, scalarModuleOf, scalarModulesOf, serviceModuleOf, useGlobals } from './src/module.js';
6
+ export { FileStream, LocalFile } from './src/types.js';
7
+ export { Response, websocketOf, websocketServerOf } from './src/websocket.js';
8
+ export { BackendApp, createNestApp } from './src/boot.js';
9
+ export { SearchDaemonModule, makeTextFilter } from './src/searchDaemon.js';
10
+ export { addSchema, schemaOf } from './src/schema.js';
11
+ export { DynamicModule as Module } from '@nestjs/common';
12
+ import './types-CUkhtrLV.js';
13
+ import 'dayjs';
14
+ import 'fs';
15
+ import 'stream';
16
+ import './types-H2HI4YUe.js';
17
+ import 'mongoose';
18
+ import './dbDecorators-z3rJpvxp.js';
19
+ import '@nestjs/graphql';
20
+ import 'graphql';
21
+ import 'bull';
22
+ import 'socket.io';
23
+ import 'tunnel-ssh';