@tstdl/base 0.92.85 → 0.92.86
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/ai/ai.service.d.ts +1 -1
- package/ai/ai.service.js +3 -3
- package/ai/types.d.ts +1 -1
- package/authentication/authentication.api.d.ts +9 -9
- package/authentication/models/schemas.d.ts +2 -2
- package/cancellation/token.d.ts +1 -1
- package/document-management/api/document-management.api.d.ts +94 -94
- package/document-management/models/document-category.model.d.ts +1 -0
- package/document-management/models/document-index.model.d.ts +7 -0
- package/document-management/models/document-index.model.js +32 -0
- package/document-management/models/document-request-file.model.d.ts +1 -1
- package/document-management/models/document-request-file.model.js +2 -2
- package/document-management/models/document-type.model.d.ts +1 -0
- package/document-management/models/document.model.d.ts +1 -1
- package/document-management/models/document.model.js +2 -2
- package/document-management/models/service-models/document.service-model.d.ts +51 -51
- package/document-management/models/service-models/document.service-model.js +2 -2
- package/document-management/server/drizzle/{0000_sloppy_fenris.sql → 0000_useful_overlord.sql} +2 -2
- package/document-management/server/drizzle/meta/0000_snapshot.json +5 -5
- package/document-management/server/drizzle/meta/_journal.json +2 -2
- package/document-management/server/drizzle.config.js +1 -1
- package/document-management/server/module.d.ts +1 -1
- package/document-management/server/module.js +1 -1
- package/document-management/server/schemas.d.ts +33 -0
- package/document-management/{models → server}/schemas.js +14 -14
- package/document-management/server/services/document-management.service.d.ts +17 -3
- package/document-management/server/services/document-management.service.js +65 -17
- package/examples/orm/schemas.d.ts +1 -1
- package/mail/drizzle.config.js +1 -1
- package/mail/models/schemas.d.ts +1 -1
- package/orm/decorators.d.ts +4 -4
- package/orm/entity.d.ts +5 -7
- package/orm/entity.js +9 -1
- package/orm/index.d.ts +1 -0
- package/orm/index.js +1 -0
- package/orm/query.d.ts +1 -3
- package/orm/query.js +0 -1
- package/orm/repository.types.d.ts +32 -0
- package/orm/repository.types.js +1 -0
- package/orm/server/database-schema.d.ts +4 -4
- package/orm/server/drizzle/schema-converter.d.ts +1 -1
- package/orm/server/index.d.ts +1 -0
- package/orm/server/index.js +1 -0
- package/orm/server/query-converter.d.ts +1 -2
- package/orm/server/query-converter.js +66 -61
- package/orm/server/repository.d.ts +78 -42
- package/orm/server/repository.js +202 -106
- package/orm/server/sqls.d.ts +7 -0
- package/orm/server/sqls.js +6 -0
- package/orm/server/types.d.ts +3 -3
- package/orm/types.d.ts +1 -1
- package/package.json +11 -9
- package/queue/enqueue-batch.d.ts +1 -0
- package/queue/enqueue-batch.js +1 -1
- package/queue/mongo/queue.d.ts +9 -4
- package/queue/mongo/queue.js +5 -6
- package/queue/postgres/drizzle/0000_zippy_moondragon.sql +11 -0
- package/queue/postgres/drizzle/meta/0000_snapshot.json +90 -0
- package/queue/postgres/drizzle/meta/_journal.json +13 -0
- package/queue/postgres/drizzle.config.d.ts +2 -0
- package/queue/postgres/drizzle.config.js +11 -0
- package/queue/postgres/index.d.ts +4 -0
- package/queue/postgres/index.js +4 -0
- package/queue/postgres/job.model.d.ts +13 -0
- package/queue/postgres/job.model.js +55 -0
- package/queue/postgres/module.d.ts +9 -0
- package/queue/postgres/module.js +29 -0
- package/queue/postgres/queue.d.ts +28 -0
- package/queue/postgres/queue.js +149 -0
- package/queue/postgres/queue.provider.d.ts +7 -0
- package/queue/postgres/queue.provider.js +21 -0
- package/queue/postgres/schemas.d.ts +3 -0
- package/queue/postgres/schemas.js +4 -0
- package/queue/provider.d.ts +2 -1
- package/queue/queue.d.ts +18 -6
- package/schema/schemas/object.d.ts +1 -1
- package/utils/timing.d.ts +4 -3
- package/utils/timing.js +3 -1
- package/document-management/models/schemas.d.ts +0 -33
package/ai/ai.service.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export declare class AiService implements Resolvable<AiServiceArgument> {
|
|
|
44
44
|
processFiles(fileInputs: FileInput[]): Promise<FileContentPart[]>;
|
|
45
45
|
getFileById(id: string): FileContentPart;
|
|
46
46
|
classify<T extends EnumerationType>(parts: OneOrMany<ContentPart>, types: T, options?: GenerationOptions & Pick<GenerationRequest, 'model'>): Promise<SpecializedGenerationResult<ClassificationResult<T>>>;
|
|
47
|
-
|
|
47
|
+
getClassifyContents(parts: OneOrMany<ContentPart>): Content[];
|
|
48
48
|
extractData<T>(parts: OneOrMany<ContentPart>, schema: SchemaTestable<T>, options?: GenerationOptions & Pick<GenerationRequest, 'model'>): Promise<SpecializedGenerationResult<T>>;
|
|
49
49
|
getExtractDataConents(parts: OneOrMany<ContentPart>): Content[];
|
|
50
50
|
analyzeContent<T extends EnumerationType>(parts: OneOrMany<ContentPart>, types: T, options?: GenerationOptions & {
|
package/ai/ai.service.js
CHANGED
|
@@ -43,7 +43,7 @@ let AiService = class AiService {
|
|
|
43
43
|
#genAI = (isDefined(this.#options.vertex)
|
|
44
44
|
? new VertexAI({ project: this.#options.vertex.project, location: this.#options.vertex.location, googleAuthOptions: { apiKey: this.#options.apiKey, keyFile: this.#options.keyFile } })
|
|
45
45
|
: new GoogleGenerativeAI(assertDefinedPass(this.#options.apiKey, 'Api key not defined')));
|
|
46
|
-
defaultModel = this.#options.defaultModel ?? 'gemini-2.0-flash
|
|
46
|
+
defaultModel = this.#options.defaultModel ?? 'gemini-2.0-flash';
|
|
47
47
|
createSession() {
|
|
48
48
|
return new AiSession(this);
|
|
49
49
|
}
|
|
@@ -72,14 +72,14 @@ let AiService = class AiService {
|
|
|
72
72
|
},
|
|
73
73
|
generationSchema,
|
|
74
74
|
systemInstruction: 'You are a highly accurate document classification AI. Your task is to analyze the content of a given document and determine its type based on a predefined list of possible document types.',
|
|
75
|
-
contents: this.
|
|
75
|
+
contents: this.getClassifyContents(parts)
|
|
76
76
|
});
|
|
77
77
|
return {
|
|
78
78
|
result: JSON.parse(assertNotNullPass(generation.text, 'No text returned.')),
|
|
79
79
|
raw: generation
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
getClassifyContents(parts) {
|
|
83
83
|
return [{
|
|
84
84
|
role: 'user',
|
|
85
85
|
parts: [
|
package/ai/types.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export type Content = {
|
|
|
52
52
|
};
|
|
53
53
|
export type FunctionCallingMode = 'auto' | 'force' | 'none';
|
|
54
54
|
export type FinishReason = 'stop' | 'maxTokens' | 'unknown';
|
|
55
|
-
export type AiModel = LiteralUnion<'gemini-2.0-flash-
|
|
55
|
+
export type AiModel = LiteralUnion<'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash-thinking-exp-01-21', string>;
|
|
56
56
|
export type GenerationOptions = {
|
|
57
57
|
maxOutputTokens?: number;
|
|
58
58
|
temperature?: number;
|
|
@@ -84,8 +84,8 @@ export declare const authenticationApiDefinition: {
|
|
|
84
84
|
resource: string;
|
|
85
85
|
method: "POST";
|
|
86
86
|
parameters: ObjectSchema<{
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
token: string;
|
|
88
|
+
newSecret: string;
|
|
89
89
|
}>;
|
|
90
90
|
result: import("../schema/index.js").LiteralSchema<"ok">;
|
|
91
91
|
};
|
|
@@ -93,7 +93,7 @@ export declare const authenticationApiDefinition: {
|
|
|
93
93
|
resource: string;
|
|
94
94
|
method: "POST";
|
|
95
95
|
parameters: ObjectSchema<{
|
|
96
|
-
|
|
96
|
+
secret: string;
|
|
97
97
|
}>;
|
|
98
98
|
result: typeof SecretCheckResult;
|
|
99
99
|
};
|
|
@@ -179,8 +179,8 @@ export declare function getAuthenticationApiDefinition<AdditionalTokenPayload ex
|
|
|
179
179
|
resource: string;
|
|
180
180
|
method: "POST";
|
|
181
181
|
parameters: ObjectSchema<{
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
token: string;
|
|
183
|
+
newSecret: string;
|
|
184
184
|
}>;
|
|
185
185
|
result: import("../schema/index.js").LiteralSchema<"ok">;
|
|
186
186
|
};
|
|
@@ -188,7 +188,7 @@ export declare function getAuthenticationApiDefinition<AdditionalTokenPayload ex
|
|
|
188
188
|
resource: string;
|
|
189
189
|
method: "POST";
|
|
190
190
|
parameters: ObjectSchema<{
|
|
191
|
-
|
|
191
|
+
secret: string;
|
|
192
192
|
}>;
|
|
193
193
|
result: typeof SecretCheckResult;
|
|
194
194
|
};
|
|
@@ -272,8 +272,8 @@ export declare function getAuthenticationApiEndpointsDefinition<AdditionalTokenP
|
|
|
272
272
|
resource: string;
|
|
273
273
|
method: "POST";
|
|
274
274
|
parameters: ObjectSchema<{
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
token: string;
|
|
276
|
+
newSecret: string;
|
|
277
277
|
}>;
|
|
278
278
|
result: import("../schema/index.js").LiteralSchema<"ok">;
|
|
279
279
|
};
|
|
@@ -281,7 +281,7 @@ export declare function getAuthenticationApiEndpointsDefinition<AdditionalTokenP
|
|
|
281
281
|
resource: string;
|
|
282
282
|
method: "POST";
|
|
283
283
|
parameters: ObjectSchema<{
|
|
284
|
-
|
|
284
|
+
secret: string;
|
|
285
285
|
}>;
|
|
286
286
|
result: typeof SecretCheckResult;
|
|
287
287
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthenticationCredentials } from './authentication-credentials.model.js';
|
|
2
2
|
import { AuthenticationSession } from './authentication-session.model.js';
|
|
3
3
|
export declare const authenticationSchema: import("../../orm/server/database-schema.js").DatabaseSchema<"authentication">;
|
|
4
|
-
export declare const authenticationCredentials: import("../../orm/server/types.js").PgTableFromType<"authentication"
|
|
5
|
-
export declare const authenticationSession: import("../../orm/server/types.js").PgTableFromType<"authentication"
|
|
4
|
+
export declare const authenticationCredentials: import("../../orm/server/types.js").PgTableFromType<typeof AuthenticationCredentials, "authentication">;
|
|
5
|
+
export declare const authenticationSession: import("../../orm/server/types.js").PgTableFromType<typeof AuthenticationSession, "authentication">;
|
package/cancellation/token.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ export declare class CancellationSignal implements PromiseLike<void>, Subscribab
|
|
|
81
81
|
* @param target receiver to connect
|
|
82
82
|
*/
|
|
83
83
|
connect(target: CancellationToken, config?: ConnectConfig): void;
|
|
84
|
-
then<TResult>(onfulfilled?: ((value: void) => TResult | PromiseLike<TResult>) |
|
|
84
|
+
then<TResult>(onfulfilled?: ((value: void) => TResult | PromiseLike<TResult>) | null): Promise<TResult>;
|
|
85
85
|
subscribe(observer: Partial<Observer<void>>): Unsubscribable;
|
|
86
86
|
}
|
|
87
87
|
export declare class CancellationToken extends CancellationSignal {
|