@akanjs/server 0.0.40 → 0.0.41
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.
- package/index.d.ts +1 -23
- package/index.js +3780 -20
- package/package.json +44 -2
- package/src/boot.d.ts +5 -37
- package/src/controller.d.ts +2 -5
- package/src/gql.d.ts +9 -72
- package/src/index.d.ts +10 -23
- package/src/module.d.ts +11 -27
- package/src/processor.d.ts +4 -7
- package/src/resolver.d.ts +2 -5
- package/src/schema.d.ts +5 -12
- package/src/searchDaemon.d.ts +4 -10
- package/src/types.d.ts +5 -8
- package/src/websocket.d.ts +5 -8
- package/dbDecorators-z3rJpvxp.d.ts +0 -36
- package/src/boot.js +0 -258
- package/src/controller.js +0 -96
- package/src/gql.js +0 -172
- package/src/index.js +0 -39
- package/src/module.js +0 -347
- package/src/processor.js +0 -85
- package/src/resolver.js +0 -161
- package/src/schema.js +0 -275
- package/src/searchDaemon.js +0 -282
- package/src/types.js +0 -15
- package/src/websocket.js +0 -192
- package/types-CUkhtrLV.d.ts +0 -53
- package/types-H2HI4YUe.d.ts +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.41",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "pnpm install @nestjs/mongoose@^10.1.0"
|
|
@@ -20,5 +20,47 @@
|
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=22"
|
|
22
22
|
},
|
|
23
|
-
"dependencies": {
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@nestjs/apollo": "^12.2.2",
|
|
25
|
+
"@nestjs/bull": "^10.2.3",
|
|
26
|
+
"@nestjs/common": "^10.4.15",
|
|
27
|
+
"@nestjs/core": "^10.4.15",
|
|
28
|
+
"@nestjs/graphql": "^12.2.2",
|
|
29
|
+
"@nestjs/mongoose": "^10.1.0",
|
|
30
|
+
"@nestjs/passport": "^10.0.3",
|
|
31
|
+
"@nestjs/platform-express": "^10.4.15",
|
|
32
|
+
"@nestjs/platform-socket.io": "^10.4.15",
|
|
33
|
+
"@nestjs/schedule": "^4.1.2",
|
|
34
|
+
"@nestjs/websockets": "^10.4.15",
|
|
35
|
+
"@socket.io/redis-adapter": "^8.3.0",
|
|
36
|
+
"@urql/core": "^5.1.0",
|
|
37
|
+
"apple-signin": "^1.0.9",
|
|
38
|
+
"body-parser": "^1.20.3",
|
|
39
|
+
"cookie-parser": "^1.4.7",
|
|
40
|
+
"dataloader": "^2.2.3",
|
|
41
|
+
"dayjs": "^1.11.13",
|
|
42
|
+
"graphql": "^16.10.0",
|
|
43
|
+
"graphql-type-json": "^0.3.2",
|
|
44
|
+
"graphql-upload": "^12.0.0",
|
|
45
|
+
"iap": "^1.1.1",
|
|
46
|
+
"immer": "^10.1.1",
|
|
47
|
+
"jsonwebtoken": "^9.0.2",
|
|
48
|
+
"lodash": "^4.17.21",
|
|
49
|
+
"meilisearch": "^0.47.0",
|
|
50
|
+
"mongoose": "^8.9.3",
|
|
51
|
+
"next": "^15.3.2",
|
|
52
|
+
"passport-apple": "^2.0.2",
|
|
53
|
+
"passport-facebook": "^3.0.0",
|
|
54
|
+
"passport-github": "^1.1.0",
|
|
55
|
+
"passport-google-oauth20": "^2.0.0",
|
|
56
|
+
"passport-kakao": "^1.0.1",
|
|
57
|
+
"passport-naver": "^1.0.6",
|
|
58
|
+
"pluralize": "^8.0.0",
|
|
59
|
+
"redis": "^4.7.0",
|
|
60
|
+
"reflect-metadata": "^0.2.2",
|
|
61
|
+
"rxjs": "^7.8.1",
|
|
62
|
+
"socket.io-client": "^4.8.1",
|
|
63
|
+
"tunnel-ssh": "^5.2.0",
|
|
64
|
+
"ua-parser-js": "^1.0.40"
|
|
65
|
+
}
|
|
24
66
|
}
|
package/src/boot.d.ts
CHANGED
|
@@ -1,49 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type Environment = "testing" | "debug" | "develop" | "main";
|
|
5
|
-
interface BaseEnv {
|
|
6
|
-
repoName: string;
|
|
7
|
-
serveDomain: string;
|
|
8
|
-
appName: string;
|
|
9
|
-
environment: Environment;
|
|
10
|
-
operationType: "server" | "client";
|
|
11
|
-
operationMode: "local" | "edge" | "cloud" | "module";
|
|
12
|
-
networkType: "mainnet" | "testnet" | "debugnet";
|
|
13
|
-
tunnelUsername: string;
|
|
14
|
-
tunnelPassword: string;
|
|
15
|
-
}
|
|
16
|
-
type BackendEnv = BaseEnv & {
|
|
17
|
-
hostname: string | null;
|
|
18
|
-
appCode: number;
|
|
19
|
-
mongo: {
|
|
20
|
-
username?: string;
|
|
21
|
-
password?: string;
|
|
22
|
-
sshOptions?: SshOptions;
|
|
23
|
-
};
|
|
24
|
-
redis?: {
|
|
25
|
-
sshOptions?: SshOptions;
|
|
26
|
-
};
|
|
27
|
-
port?: number;
|
|
28
|
-
mongoUri?: string;
|
|
29
|
-
redisUri?: string;
|
|
30
|
-
meiliUri?: string;
|
|
31
|
-
onCleanup?: () => Promise<void>;
|
|
32
|
-
};
|
|
33
|
-
|
|
1
|
+
import { BackendEnv } from "@akanjs/base";
|
|
2
|
+
import { DynamicModule, INestApplication } from "@nestjs/common";
|
|
34
3
|
interface AppCreateForm {
|
|
35
4
|
registerModules: (options: any) => (DynamicModule | null)[];
|
|
36
5
|
serverMode?: "federation" | "batch" | "all" | "none";
|
|
37
6
|
env: BackendEnv;
|
|
38
7
|
log?: boolean;
|
|
39
8
|
}
|
|
40
|
-
interface BackendApp {
|
|
9
|
+
export interface BackendApp {
|
|
41
10
|
nestApp: INestApplication;
|
|
42
11
|
close: () => Promise<void>;
|
|
43
12
|
}
|
|
44
|
-
declare const createNestApp: ({ registerModules, serverMode, env, log }: AppCreateForm) => Promise<{
|
|
13
|
+
export declare const createNestApp: ({ registerModules, serverMode, env, log }: AppCreateForm) => Promise<{
|
|
45
14
|
nestApp: INestApplication<any>;
|
|
46
15
|
close: () => Promise<void>;
|
|
47
16
|
}>;
|
|
48
|
-
|
|
49
|
-
export { type BackendApp, createNestApp };
|
|
17
|
+
export {};
|
package/src/controller.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare const controllerOf: (sigRef: Type, allSrvs: {
|
|
1
|
+
import { Type } from "@akanjs/base";
|
|
2
|
+
export declare const controllerOf: (sigRef: Type, allSrvs: {
|
|
4
3
|
[key: string]: Type;
|
|
5
4
|
}) => {
|
|
6
5
|
new (): {};
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
export { controllerOf };
|
package/src/gql.d.ts
CHANGED
|
@@ -1,77 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { ValueNode } from 'graphql';
|
|
8
|
-
import 'fs';
|
|
9
|
-
import 'stream';
|
|
10
|
-
|
|
11
|
-
declare class Enum<T> {
|
|
12
|
-
readonly values: T[];
|
|
13
|
-
readonly value: T;
|
|
14
|
-
readonly valueMap: Map<T, number>;
|
|
15
|
-
constructor(values: T[]);
|
|
16
|
-
has(value: T): boolean;
|
|
17
|
-
indexOf(value: T): number;
|
|
18
|
-
find(callback: (value: T, index: number, array: T[]) => boolean): T;
|
|
19
|
-
findIndex(callback: (value: T, index: number, array: T[]) => boolean): number;
|
|
20
|
-
filter(callback: (value: T, index: number, array: T[]) => boolean): T[];
|
|
21
|
-
map<R>(callback: (value: T, index: number, array: T[]) => R): R[];
|
|
22
|
-
forEach(callback: (value: T, index: number, array: T[]) => void): void;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
declare const fieldTypes: readonly ["email", "password", "url"];
|
|
26
|
-
type FieldType = (typeof fieldTypes)[number];
|
|
27
|
-
interface ConstantFieldProps {
|
|
28
|
-
nullable?: boolean;
|
|
29
|
-
ref?: string;
|
|
30
|
-
refPath?: string;
|
|
31
|
-
refType?: "child" | "parent" | "relation";
|
|
32
|
-
default?: string | number | boolean | object | null | Enum<string | number>;
|
|
33
|
-
type?: FieldType;
|
|
34
|
-
fieldType?: "property" | "hidden" | "resolve";
|
|
35
|
-
immutable?: boolean;
|
|
36
|
-
min?: number;
|
|
37
|
-
max?: number;
|
|
38
|
-
enum?: Enum<string | number>;
|
|
39
|
-
select?: boolean;
|
|
40
|
-
minlength?: number;
|
|
41
|
-
maxlength?: number;
|
|
42
|
-
query?: FilterQuery<any> | (() => FilterQuery<any>);
|
|
43
|
-
accumulate?: AccumulatorOperator;
|
|
44
|
-
example?: string | number | boolean | Dayjs | string[] | number[] | boolean[] | Dayjs[];
|
|
45
|
-
of?: GqlScalar;
|
|
46
|
-
validate?: (value: any, model: any) => boolean;
|
|
47
|
-
text?: "search" | "filter";
|
|
48
|
-
}
|
|
49
|
-
type ConstantFieldMeta = ConstantFieldProps & {
|
|
50
|
-
nullable: boolean;
|
|
51
|
-
default: any;
|
|
52
|
-
fieldType: "property" | "hidden" | "resolve";
|
|
53
|
-
immutable: boolean;
|
|
54
|
-
select: boolean;
|
|
55
|
-
} & {
|
|
56
|
-
key: string;
|
|
57
|
-
name: string;
|
|
58
|
-
isClass: boolean;
|
|
59
|
-
isScalar: boolean;
|
|
60
|
-
modelRef: Type;
|
|
61
|
-
arrDepth: number;
|
|
62
|
-
isArray: boolean;
|
|
63
|
-
optArrDepth: number;
|
|
64
|
-
isMap: boolean;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
declare class DateScalar implements Nest.CustomScalar<Date, Dayjs> {
|
|
1
|
+
import { BaseObject, Dayjs, Type } from "@akanjs/base";
|
|
2
|
+
import { ConstantFieldMeta, DocumentModel } from "@akanjs/constant";
|
|
3
|
+
import type { Doc } from "@akanjs/document";
|
|
4
|
+
import * as Nest from "@nestjs/graphql";
|
|
5
|
+
import { ValueNode } from "graphql";
|
|
6
|
+
export declare class DateScalar implements Nest.CustomScalar<Date, Dayjs> {
|
|
68
7
|
description: string;
|
|
69
8
|
parseValue(value: number): Dayjs;
|
|
70
9
|
serialize(value: Dayjs): Date;
|
|
71
10
|
parseLiteral(ast: ValueNode): Dayjs;
|
|
72
11
|
}
|
|
73
|
-
declare const applyNestField: (model: Type, fieldMeta: ConstantFieldMeta, type?: "object" | "input") => void;
|
|
74
|
-
declare const generateGqlInput: <InputModel>(inputRef: Type<InputModel>) => Type<DocumentModel<InputModel>>;
|
|
75
|
-
declare const generateGql: <ObjectModel>(objectRef: Type<ObjectModel>) => Type<ObjectModel extends BaseObject ? Doc<ObjectModel> : DocumentModel<ObjectModel>>;
|
|
76
|
-
|
|
77
|
-
export { DateScalar, applyNestField, generateGql, generateGqlInput };
|
|
12
|
+
export declare const applyNestField: (model: Type, fieldMeta: ConstantFieldMeta, type?: "object" | "input") => void;
|
|
13
|
+
export declare const generateGqlInput: <InputModel>(inputRef: Type<InputModel>) => Type<DocumentModel<InputModel>>;
|
|
14
|
+
export declare const generateGql: <ObjectModel>(objectRef: Type<ObjectModel>) => Type<ObjectModel extends BaseObject ? Doc<ObjectModel> : DocumentModel<ObjectModel>>;
|
package/src/index.d.ts
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
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';
|
|
1
|
+
export * from "./gql";
|
|
2
|
+
export * from "./resolver";
|
|
3
|
+
export * from "./controller";
|
|
4
|
+
export * from "./processor";
|
|
5
|
+
export * from "./module";
|
|
6
|
+
export * from "./types";
|
|
7
|
+
export * from "./websocket";
|
|
8
|
+
export * from "./boot";
|
|
9
|
+
export * from "./searchDaemon";
|
|
10
|
+
export * from "./schema";
|
package/src/module.d.ts
CHANGED
|
@@ -1,22 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { DynamicModule } from
|
|
5
|
-
import 'dayjs';
|
|
6
|
-
import 'fs';
|
|
7
|
-
import 'stream';
|
|
8
|
-
import 'mongoose';
|
|
9
|
-
|
|
10
|
-
interface ConstantModel<T extends string, Input, Full, Light, Insight, Filter extends FilterType, Summary = any> {
|
|
11
|
-
refName: T;
|
|
12
|
-
Input: Type<Input>;
|
|
13
|
-
Full: Type<Full>;
|
|
14
|
-
Light: Type<Light>;
|
|
15
|
-
Insight: Type<Insight>;
|
|
16
|
-
Filter: Type<Filter>;
|
|
17
|
-
Summary?: Type<Summary>;
|
|
18
|
-
}
|
|
19
|
-
|
|
1
|
+
import type { Type } from "@akanjs/base";
|
|
2
|
+
import { type ConstantModel } from "@akanjs/constant";
|
|
3
|
+
import { Database } from "@akanjs/document";
|
|
4
|
+
import { DynamicModule } from "@nestjs/common";
|
|
20
5
|
interface DatabaseModuleCreateOptions {
|
|
21
6
|
constant: ConstantModel<string, any, any, any, any, any>;
|
|
22
7
|
database: Database<string, any, any, any, any, any, any, any, any>;
|
|
@@ -31,7 +16,7 @@ interface DatabaseModuleCreateOptions {
|
|
|
31
16
|
providers?: Type[];
|
|
32
17
|
extended?: boolean;
|
|
33
18
|
}
|
|
34
|
-
declare const databaseModuleOf: ({ constant, database, signal, service, uses, useAsyncs, providers, extended, }: DatabaseModuleCreateOptions, allSrvs: {
|
|
19
|
+
export declare const databaseModuleOf: ({ constant, database, signal, service, uses, useAsyncs, providers, extended, }: DatabaseModuleCreateOptions, allSrvs: {
|
|
35
20
|
[key: string]: Type | undefined;
|
|
36
21
|
}) => DynamicModule | null;
|
|
37
22
|
interface ServiceModuleCreateOptions {
|
|
@@ -45,7 +30,7 @@ interface ServiceModuleCreateOptions {
|
|
|
45
30
|
};
|
|
46
31
|
providers?: Type[];
|
|
47
32
|
}
|
|
48
|
-
declare const serviceModuleOf: ({ signal, service, uses, useAsyncs, providers }: ServiceModuleCreateOptions, allSrvs: {
|
|
33
|
+
export declare const serviceModuleOf: ({ signal, service, uses, useAsyncs, providers }: ServiceModuleCreateOptions, allSrvs: {
|
|
49
34
|
[key: string]: Type | undefined;
|
|
50
35
|
}) => DynamicModule | null;
|
|
51
36
|
interface ScalarModuleCreateOptions {
|
|
@@ -59,13 +44,13 @@ interface ScalarModuleCreateOptions {
|
|
|
59
44
|
providers?: Type[];
|
|
60
45
|
enabled?: boolean;
|
|
61
46
|
}
|
|
62
|
-
declare const scalarModuleOf: ({ signals, uses, useAsyncs, providers, enabled }: ScalarModuleCreateOptions, allSrvs: {
|
|
47
|
+
export declare const scalarModuleOf: ({ signals, uses, useAsyncs, providers, enabled }: ScalarModuleCreateOptions, allSrvs: {
|
|
63
48
|
[key: string]: Type | undefined;
|
|
64
49
|
}) => DynamicModule | null;
|
|
65
50
|
interface ScalarModulesCreateOptions {
|
|
66
51
|
constants: Type[];
|
|
67
52
|
}
|
|
68
|
-
declare const scalarModulesOf: ({ constants }: ScalarModulesCreateOptions, allSrvs: {
|
|
53
|
+
export declare const scalarModulesOf: ({ constants }: ScalarModulesCreateOptions, allSrvs: {
|
|
69
54
|
[key: string]: Type | undefined;
|
|
70
55
|
}) => DynamicModule | null;
|
|
71
56
|
interface BatchModuleCreateOptions {
|
|
@@ -78,7 +63,7 @@ interface BatchModuleCreateOptions {
|
|
|
78
63
|
};
|
|
79
64
|
providers?: Type[];
|
|
80
65
|
}
|
|
81
|
-
declare const batchModuleOf: ({ service, uses, useAsyncs, providers, }: BatchModuleCreateOptions) => DynamicModule | null;
|
|
66
|
+
export declare const batchModuleOf: ({ service, uses, useAsyncs, providers, }: BatchModuleCreateOptions) => DynamicModule | null;
|
|
82
67
|
interface UseGlobalsCreateOptions {
|
|
83
68
|
uses?: {
|
|
84
69
|
[key: string]: any;
|
|
@@ -90,6 +75,5 @@ interface UseGlobalsCreateOptions {
|
|
|
90
75
|
[key: string]: Type;
|
|
91
76
|
};
|
|
92
77
|
}
|
|
93
|
-
declare const useGlobals: ({ uses, useAsyncs, injects }: UseGlobalsCreateOptions) => DynamicModule;
|
|
94
|
-
|
|
95
|
-
export { batchModuleOf, databaseModuleOf, scalarModuleOf, scalarModulesOf, serviceModuleOf, useGlobals };
|
|
78
|
+
export declare const useGlobals: ({ uses, useAsyncs, injects }: UseGlobalsCreateOptions) => DynamicModule;
|
|
79
|
+
export {};
|
package/src/processor.d.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Queue } from
|
|
3
|
-
|
|
4
|
-
declare const processorOf: (sigRef: Type, allSrvs: {
|
|
1
|
+
import { Type } from "@akanjs/base";
|
|
2
|
+
import type { Queue } from "bull";
|
|
3
|
+
export declare const processorOf: (sigRef: Type, allSrvs: {
|
|
5
4
|
[key: string]: Type;
|
|
6
5
|
}) => {
|
|
7
6
|
new (): {};
|
|
8
7
|
};
|
|
9
|
-
declare const queueOf: (sigRef: Type, queue: Queue) => Queue<any>;
|
|
10
|
-
|
|
11
|
-
export { processorOf, queueOf };
|
|
8
|
+
export declare const queueOf: (sigRef: Type, queue: Queue) => Queue<any>;
|
package/src/resolver.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare const resolverOf: (sigRef: Type, allSrvs: {
|
|
1
|
+
import { Type } from "@akanjs/base";
|
|
2
|
+
export declare const resolverOf: (sigRef: Type, allSrvs: {
|
|
4
3
|
[key: string]: Type;
|
|
5
4
|
}) => {
|
|
6
5
|
new (): {};
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
export { resolverOf };
|
package/src/schema.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Schema } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import 'fs';
|
|
7
|
-
import 'stream';
|
|
8
|
-
|
|
9
|
-
declare const schemaOf: <Mdl, Doc, Middleware extends BaseMiddleware>(modelRef: Type<Mdl>, docRef: Type<Doc>, middleware: Type<Middleware>) => Schema<null, Mdl, Doc, undefined, null, Mdl>;
|
|
10
|
-
declare const addSchema: <Mdl, Doc, Input, Middleware extends BaseMiddleware>(modelRef: Type<Mdl>, docRef: Type<Doc>, inputRef: Type<Input>, middleware: Type<Middleware>) => Schema<null, Mdl, Doc, undefined, null, Mdl>;
|
|
11
|
-
|
|
12
|
-
export { addSchema, schemaOf };
|
|
1
|
+
import { Type } from "@akanjs/base";
|
|
2
|
+
import { BaseMiddleware } from "@akanjs/document";
|
|
3
|
+
import { Schema } from "mongoose";
|
|
4
|
+
export declare const schemaOf: <Mdl, Doc, Middleware extends BaseMiddleware>(modelRef: Type<Mdl>, docRef: Type<Doc>, middleware: Type<Middleware>) => Schema<null, Mdl, Doc, undefined, null, Mdl>;
|
|
5
|
+
export declare const addSchema: <Mdl, Doc, Input, Middleware extends BaseMiddleware>(modelRef: Type<Mdl>, docRef: Type<Doc>, inputRef: Type<Input>, middleware: Type<Middleware>) => Schema<null, Mdl, Doc, undefined, null, Mdl>;
|
package/src/searchDaemon.d.ts
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import 'fs';
|
|
5
|
-
import 'stream';
|
|
6
|
-
|
|
7
|
-
declare const makeTextFilter: (modelRef: Type) => (data: Record<string, any>, assignObj?: {
|
|
1
|
+
import type { Type } from "@akanjs/base";
|
|
2
|
+
import { type TextDoc } from "@akanjs/constant";
|
|
3
|
+
export declare const makeTextFilter: (modelRef: Type) => (data: Record<string, any>, assignObj?: {
|
|
8
4
|
[key: string]: string;
|
|
9
5
|
}) => TextDoc;
|
|
10
|
-
declare class SearchDaemonModule {
|
|
6
|
+
export declare class SearchDaemonModule {
|
|
11
7
|
}
|
|
12
|
-
|
|
13
|
-
export { SearchDaemonModule, makeTextFilter };
|
package/src/types.d.ts
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { ReadStream } from
|
|
2
|
-
import { Readable } from
|
|
3
|
-
export { DynamicModule as Module } from
|
|
4
|
-
|
|
5
|
-
interface FileStream {
|
|
1
|
+
import type { ReadStream } from "fs";
|
|
2
|
+
import type { Readable } from "stream";
|
|
3
|
+
export type { DynamicModule as Module } from "@nestjs/common";
|
|
4
|
+
export interface FileStream {
|
|
6
5
|
filename: string;
|
|
7
6
|
mimetype: string;
|
|
8
7
|
encoding: string;
|
|
9
8
|
createReadStream(): ReadStream | Readable;
|
|
10
9
|
}
|
|
11
|
-
interface LocalFile {
|
|
10
|
+
export interface LocalFile {
|
|
12
11
|
filename: string;
|
|
13
12
|
mimetype: string;
|
|
14
13
|
encoding: string;
|
|
15
14
|
localPath: string;
|
|
16
15
|
}
|
|
17
|
-
|
|
18
|
-
export type { FileStream, LocalFile };
|
package/src/websocket.d.ts
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Server } from
|
|
3
|
-
|
|
4
|
-
interface Response<T> {
|
|
1
|
+
import { Type } from "@akanjs/base";
|
|
2
|
+
import type { Server } from "socket.io";
|
|
3
|
+
export interface Response<T> {
|
|
5
4
|
data: T;
|
|
6
5
|
}
|
|
7
|
-
declare const websocketOf: (sigRef: Type, allSrvs: {
|
|
6
|
+
export declare const websocketOf: (sigRef: Type, allSrvs: {
|
|
8
7
|
[key: string]: Type;
|
|
9
8
|
}) => {
|
|
10
9
|
new (): {
|
|
11
10
|
__sigRef__: Type;
|
|
12
11
|
};
|
|
13
12
|
};
|
|
14
|
-
declare const websocketServerOf: (sigRef: Type) => {
|
|
13
|
+
export declare const websocketServerOf: (sigRef: Type) => {
|
|
15
14
|
new (): {
|
|
16
15
|
server: Server;
|
|
17
16
|
};
|
|
18
17
|
};
|
|
19
|
-
|
|
20
|
-
export { type Response, websocketOf, websocketServerOf };
|
|
@@ -1,36 +0,0 @@
|
|
|
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 };
|