@mastra/core 0.1.26 → 0.1.27-alpha.1
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/dist/agents/agent-apis.d.ts +0 -31
- package/dist/agents/agent-apis.d.ts.map +1 -1
- package/dist/agents/file-logger.d.ts +0 -5
- package/dist/agents/file-logger.d.ts.map +1 -1
- package/dist/agents/index.d.ts +0 -49
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/openai/assistant.d.ts +0 -76
- package/dist/agents/openai/assistant.d.ts.map +1 -1
- package/dist/agents/utils.d.ts +0 -21
- package/dist/agents/utils.d.ts.map +1 -1
- package/dist/agents/vector-sync.d.ts +0 -46
- package/dist/agents/vector-sync.d.ts.map +1 -1
- package/dist/agents/vercel/index.d.ts +0 -43
- package/dist/agents/vercel/index.d.ts.map +1 -1
- package/dist/authenticator.d.ts +0 -62
- package/dist/authenticator.d.ts.map +1 -1
- package/dist/core.cjs.development.js +956 -7459
- package/dist/core.cjs.development.js.map +1 -1
- package/dist/core.cjs.production.min.js +1 -1
- package/dist/core.cjs.production.min.js.map +1 -1
- package/dist/core.esm.js +949 -7409
- package/dist/core.esm.js.map +1 -1
- package/dist/framework.d.ts +0 -254
- package/dist/framework.d.ts.map +1 -1
- package/dist/index.d.ts +1 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/integration.d.ts +0 -98
- package/dist/integration.d.ts.map +1 -1
- package/dist/lib/index.d.ts +0 -5
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/utils/object.d.ts +0 -42
- package/dist/lib/utils/object.d.ts.map +1 -1
- package/dist/next/callback.d.ts +0 -3
- package/dist/next/callback.d.ts.map +1 -1
- package/dist/next/connect.d.ts +0 -3
- package/dist/next/connect.d.ts.map +1 -1
- package/dist/next/cron.d.ts +0 -12
- package/dist/next/cron.d.ts.map +1 -1
- package/dist/next/index.d.ts +0 -15
- package/dist/next/index.d.ts.map +1 -1
- package/dist/next/inngest.d.ts +0 -3
- package/dist/next/inngest.d.ts.map +1 -1
- package/dist/next/utils.d.ts +0 -9
- package/dist/next/utils.d.ts.map +1 -1
- package/dist/next/webhook.d.ts +0 -9
- package/dist/next/webhook.d.ts.map +1 -1
- package/dist/next-src/agent/index.d.ts +63 -0
- package/dist/next-src/agent/index.d.ts.map +1 -0
- package/dist/next-src/engine/index.d.ts +147 -0
- package/dist/next-src/engine/index.d.ts.map +1 -0
- package/dist/next-src/engine/schema.d.ts.map +1 -0
- package/dist/next-src/engine/types.d.ts +116 -0
- package/dist/next-src/engine/types.d.ts.map +1 -0
- package/dist/{lib/query-builder → next-src/engine}/utils.d.ts +2 -1
- package/dist/next-src/engine/utils.d.ts.map +1 -0
- package/dist/next-src/index.d.ts +54 -0
- package/dist/next-src/index.d.ts.map +1 -0
- package/dist/next-src/integration/index.d.ts +30 -0
- package/dist/next-src/integration/index.d.ts.map +1 -0
- package/dist/next-src/logger/index.d.ts +61 -0
- package/dist/next-src/logger/index.d.ts.map +1 -0
- package/dist/next-src/tools/index.d.ts +4 -0
- package/dist/next-src/tools/index.d.ts.map +1 -0
- package/dist/next-src/tools/types.d.ts +27 -0
- package/dist/next-src/tools/types.d.ts.map +1 -0
- package/dist/next-src/vector/index.d.ts +11 -0
- package/dist/next-src/vector/index.d.ts.map +1 -0
- package/dist/sync-factory.d.ts +0 -13
- package/dist/sync-factory.d.ts.map +1 -1
- package/dist/sync-fixtures/github.d.ts +6 -6
- package/dist/types.d.ts +0 -400
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/errors.d.ts +0 -3
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/index.d.ts +0 -14
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/inngest.d.ts +0 -6
- package/dist/utils/inngest.d.ts.map +1 -1
- package/dist/utils/text.d.ts +0 -1
- package/dist/utils/text.d.ts.map +1 -1
- package/dist/vector-access/index.d.ts +0 -21
- package/dist/vector-access/index.d.ts.map +1 -1
- package/dist/vector-access/types.d.ts +0 -6
- package/dist/vector-access/types.d.ts.map +1 -1
- package/dist/workflows/apis.d.ts +0 -8
- package/dist/workflows/apis.d.ts.map +1 -1
- package/dist/workflows/conditions/constants.d.ts +0 -16
- package/dist/workflows/conditions/constants.d.ts.map +1 -1
- package/dist/workflows/conditions/types.d.ts +0 -2
- package/dist/workflows/conditions/types.d.ts.map +1 -1
- package/dist/workflows/handler.d.ts +0 -63
- package/dist/workflows/handler.d.ts.map +1 -1
- package/dist/workflows/runner.d.ts +0 -51
- package/dist/workflows/runner.d.ts.map +1 -1
- package/dist/workflows/schemas.d.ts +0 -1043
- package/dist/workflows/schemas.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +0 -96
- package/dist/workflows/types.d.ts.map +1 -1
- package/dist/workflows/utils.d.ts +0 -111
- package/dist/workflows/utils.d.ts.map +1 -1
- package/package.json +15 -17
- package/dist/data-access/index.d.ts +0 -351
- package/dist/data-access/index.d.ts.map +0 -1
- package/dist/generated-types/index.d.ts +0 -5
- package/dist/generated-types/index.d.ts.map +0 -1
- package/dist/lib/logger-utils/logger.d.ts +0 -118
- package/dist/lib/logger-utils/logger.d.ts.map +0 -1
- package/dist/lib/query-builder/constants.d.ts +0 -17
- package/dist/lib/query-builder/constants.d.ts.map +0 -1
- package/dist/lib/query-builder/filters/sql.d.ts +0 -9
- package/dist/lib/query-builder/filters/sql.d.ts.map +0 -1
- package/dist/lib/query-builder/schema.d.ts.map +0 -1
- package/dist/lib/query-builder/sorts/sql.d.ts +0 -8
- package/dist/lib/query-builder/sorts/sql.d.ts.map +0 -1
- package/dist/lib/query-builder/types.d.ts +0 -31
- package/dist/lib/query-builder/types.d.ts.map +0 -1
- package/dist/lib/query-builder/utils.d.ts.map +0 -1
- package/dist/prisma/client.d.ts +0 -3
- package/dist/prisma/client.d.ts.map +0 -1
- package/dist/prisma/client.ts +0 -31
- package/dist/prisma/gen.js +0 -140
- package/dist/prisma/schema.prisma +0 -130
- package/dist/service/service.property.d.ts +0 -25
- package/dist/service/service.property.d.ts.map +0 -1
- package/dist/service/service.record.d.ts +0 -25
- package/dist/service/service.record.d.ts.map +0 -1
- /package/dist/{lib/query-builder → next-src/engine}/schema.d.ts +0 -0
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { Redis } from '@upstash/redis';
|
|
2
|
-
export declare const RegisteredLogger: {
|
|
3
|
-
readonly AGENT: "AGENT";
|
|
4
|
-
readonly WORKFLOW: "WORKFLOW";
|
|
5
|
-
};
|
|
6
|
-
export type RegisteredLogger = (typeof RegisteredLogger)[keyof typeof RegisteredLogger];
|
|
7
|
-
export declare const LogProvider: {
|
|
8
|
-
readonly CONSOLE: "CONSOLE";
|
|
9
|
-
readonly FILE: "FILE";
|
|
10
|
-
readonly UPSTASH: "UPSTASH";
|
|
11
|
-
};
|
|
12
|
-
export type LogConfig = {
|
|
13
|
-
provider: typeof LogProvider.CONSOLE;
|
|
14
|
-
level?: LogLevel;
|
|
15
|
-
} | {
|
|
16
|
-
provider: typeof LogProvider.UPSTASH;
|
|
17
|
-
level?: LogLevel;
|
|
18
|
-
config: {
|
|
19
|
-
url: string;
|
|
20
|
-
token: string;
|
|
21
|
-
};
|
|
22
|
-
} | {
|
|
23
|
-
provider: typeof LogProvider.FILE;
|
|
24
|
-
level?: LogLevel;
|
|
25
|
-
};
|
|
26
|
-
export type LogProvider = (typeof LogProvider)[keyof typeof LogProvider];
|
|
27
|
-
export declare enum LogLevel {
|
|
28
|
-
DEBUG = 0,
|
|
29
|
-
INFO = 1,
|
|
30
|
-
WARN = 2,
|
|
31
|
-
ERROR = 3
|
|
32
|
-
}
|
|
33
|
-
interface BaseLogMessage {
|
|
34
|
-
message: string;
|
|
35
|
-
destinationPath: string;
|
|
36
|
-
type: RegisteredLogger;
|
|
37
|
-
}
|
|
38
|
-
export interface Logger<T extends BaseLogMessage = BaseLogMessage> {
|
|
39
|
-
debug(message: T | string, ...args: any[]): void;
|
|
40
|
-
info(message: T | string, ...args: any[]): void;
|
|
41
|
-
warn(message: T | string, ...args: any[]): void;
|
|
42
|
-
error(message: T | string, ...args: any[]): void;
|
|
43
|
-
}
|
|
44
|
-
interface ConsoleLoggerOptions {
|
|
45
|
-
level?: LogLevel;
|
|
46
|
-
}
|
|
47
|
-
interface FileLoggerOptions {
|
|
48
|
-
dirPath: string;
|
|
49
|
-
level?: LogLevel;
|
|
50
|
-
}
|
|
51
|
-
interface UpstashRedisLoggerOptions {
|
|
52
|
-
redisClient: Redis;
|
|
53
|
-
key: string;
|
|
54
|
-
level?: LogLevel;
|
|
55
|
-
}
|
|
56
|
-
interface LogProviderRegistry<T extends BaseLogMessage = BaseLogMessage> {
|
|
57
|
-
[LogProvider.CONSOLE]: {
|
|
58
|
-
logger: ConsoleLogger<T>;
|
|
59
|
-
options: ConsoleLoggerOptions;
|
|
60
|
-
};
|
|
61
|
-
[LogProvider.FILE]: {
|
|
62
|
-
logger: FileLogger<T>;
|
|
63
|
-
options: FileLoggerOptions;
|
|
64
|
-
};
|
|
65
|
-
[LogProvider.UPSTASH]: {
|
|
66
|
-
logger: UpstashRedisLogger<T>;
|
|
67
|
-
options: UpstashRedisLoggerOptions;
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
declare abstract class BaseLogger<T extends BaseLogMessage = BaseLogMessage> implements Logger<T> {
|
|
71
|
-
protected level: LogLevel;
|
|
72
|
-
constructor(level?: LogLevel);
|
|
73
|
-
abstract log(level: LogLevel, message: T | string, ...args: any[]): void;
|
|
74
|
-
debug(message: T | string, ...args: any[]): void;
|
|
75
|
-
info(message: T | string, ...args: any[]): void;
|
|
76
|
-
warn(message: T | string, ...args: any[]): void;
|
|
77
|
-
error(message: T | string, ...args: any[]): void;
|
|
78
|
-
protected formatMessage(message: T | string): string;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Logs to the console
|
|
82
|
-
*/
|
|
83
|
-
declare class ConsoleLogger<T extends BaseLogMessage = BaseLogMessage> extends BaseLogger<T> {
|
|
84
|
-
constructor({ level }: {
|
|
85
|
-
level?: LogLevel;
|
|
86
|
-
});
|
|
87
|
-
log(level: LogLevel, message: T | string, ...args: any[]): void;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Logs to a file
|
|
91
|
-
*/
|
|
92
|
-
declare class FileLogger<T extends BaseLogMessage = BaseLogMessage> extends BaseLogger<T> {
|
|
93
|
-
#private;
|
|
94
|
-
constructor({ dirPath, level }: {
|
|
95
|
-
dirPath: string;
|
|
96
|
-
level?: LogLevel;
|
|
97
|
-
});
|
|
98
|
-
log(level: LogLevel, message: T): void;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Logs to Upstash Redis
|
|
102
|
-
*/
|
|
103
|
-
declare class UpstashRedisLogger<T extends BaseLogMessage = BaseLogMessage> extends BaseLogger<T> {
|
|
104
|
-
#private;
|
|
105
|
-
constructor({ redisClient, level, key, }: {
|
|
106
|
-
redisClient: Redis;
|
|
107
|
-
level?: LogLevel;
|
|
108
|
-
key: string;
|
|
109
|
-
});
|
|
110
|
-
log(level: LogLevel, message: T): void;
|
|
111
|
-
getLogs(key: string): Promise<string[]>;
|
|
112
|
-
}
|
|
113
|
-
export declare function createLogger<T extends BaseLogMessage = BaseLogMessage, K extends keyof LogProviderRegistry<T> = keyof LogProviderRegistry<T>>({ provider, options, }: {
|
|
114
|
-
provider: K;
|
|
115
|
-
options?: LogProviderRegistry[K]['options'];
|
|
116
|
-
}): LogProviderRegistry<T>[K]['logger'];
|
|
117
|
-
export {};
|
|
118
|
-
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/lib/logger-utils/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAIvC,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,gBAAgB,CA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OAAO,EAAE,CAAC,GAAG,IAAI;IAOtC,OAAO,CAAC,GAAG,EAAE,MAAM;CAGpB;AAED,wBAAgB,YAAY,CAC1B,CAAC,SAAS,cAAc,GAAG,cAAc,EACzC,CAAC,SAAS,MAAM,mBAAmB,CAAC,CAAC,CAAC,GAAG,MAAM,mBAAmB,CAAC,CAAC,CAAC,EACrE,EACA,QAAQ,EACR,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,CAAC,CAAC;IACZ,OAAO,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CAC7C,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAkBtC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PropertyType } from '@prisma-app/client';
|
|
2
|
-
import { FilterOperators } from './types';
|
|
3
|
-
export interface SortField {
|
|
4
|
-
type: string;
|
|
5
|
-
name: string;
|
|
6
|
-
displayName: string;
|
|
7
|
-
config?: Record<string, any>;
|
|
8
|
-
}
|
|
9
|
-
export interface SortLogic {
|
|
10
|
-
field: SortField;
|
|
11
|
-
mode: 'ascending' | 'descending';
|
|
12
|
-
}
|
|
13
|
-
export declare const fieldsWithCommaSeparatedValues: PropertyType[];
|
|
14
|
-
export declare const FieldTypePrimitiveMap: Record<PropertyType, string>;
|
|
15
|
-
export declare const SORT_MODE_TO_ABBR: Record<SortLogic['mode'], string>;
|
|
16
|
-
export declare const FilterOperatorToSQL: Record<FilterOperators, string>;
|
|
17
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/query-builder/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,WAAW,GAAG,YAAY,CAAC;CAClC;AAED,eAAO,MAAM,8BAA8B,EAAE,YAAY,EAMxD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAsB9D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAG/D,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAgB/D,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FilterClauseArgs } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Get the SQL filter clause for the given filters.
|
|
4
|
-
* @param filters - Filters to apply.
|
|
5
|
-
* @param fields - Optional. JSON fields with associated types to apply filters on.
|
|
6
|
-
* @param parentTableRef - Parent table reference to apply filters on.
|
|
7
|
-
*/
|
|
8
|
-
export declare const getFilterClauseSQL: ({ filters, fields, parentTableRef, }: FilterClauseArgs<string>) => string;
|
|
9
|
-
//# sourceMappingURL=sql.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../../../../src/lib/query-builder/filters/sql.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,UAAU,CAAC;AAI7D;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,yCAI5B,gBAAgB,CAAC,MAAM,CAAC,WA6K1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/lib/query-builder/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAM1C,KAAK,OAAO,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEvC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB5B,CAAC;AAEH,eAAO,MAAM,eAAe,yDAAkD,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SortClauseArgs } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Get the SQL sort clause for the given sort fields.
|
|
4
|
-
* A sort clause is an array of strings where each string is a field to sort by.
|
|
5
|
-
* e.g. ["field1 ASC", "field2 DESC"] will sort by field1 in ascending order and field2 in descending order.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getSortClauseSQL: ({ sort, parentTableRef, fields, }: SortClauseArgs) => string[];
|
|
8
|
-
//# sourceMappingURL=sql.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../../../../src/lib/query-builder/sorts/sql.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,sCAI1B,cAAc,KAAG,MAAM,EA2BzB,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Property } from '@prisma-app/client';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { filterQuerySchema } from './schema';
|
|
4
|
-
export type FilterObject<T extends string | number | symbol> = Record<T, z.infer<typeof filterQuerySchema>>;
|
|
5
|
-
export interface FilterClauseArgs<T extends string | number | symbol> {
|
|
6
|
-
parentTableRef?: string;
|
|
7
|
-
filters: FilterObject<T>;
|
|
8
|
-
fields?: Pick<Property, 'name' | 'type'>[];
|
|
9
|
-
}
|
|
10
|
-
export interface SortClauseArgs {
|
|
11
|
-
parentTableRef?: string;
|
|
12
|
-
sort: string[];
|
|
13
|
-
fields?: Pick<Property, 'name' | 'type'>[];
|
|
14
|
-
}
|
|
15
|
-
export declare enum FilterOperators {
|
|
16
|
-
IS = "is",
|
|
17
|
-
EQUAL = "eq",
|
|
18
|
-
NOT_EQUAL = "not_eq",
|
|
19
|
-
CONTAINS = "contains",
|
|
20
|
-
IN = "in",
|
|
21
|
-
NOT_IN = "not_in",
|
|
22
|
-
GREATER_THAN = "gt",
|
|
23
|
-
LESS_THAN = "lt",
|
|
24
|
-
NOT_CONTAINS = "not_contains",
|
|
25
|
-
GREATER_THAN_OR_EQUAL = "gte",
|
|
26
|
-
LESS_THAN_OR_EQUAL = "lte",
|
|
27
|
-
OP = "op",
|
|
28
|
-
SET = "set",
|
|
29
|
-
NOT_SET = "not_set"
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/query-builder/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,MAAM,CACnE,CAAC,EACD,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAClC,CAAC;AAEF,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM;IAClE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,CA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"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/prisma/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAU,MAAM,oBAAoB,CAAC;AAY1D,eAAO,MAAM,MAAM,QAAS,MAAM,KAAG,YAkBpC,CAAC"}
|
package/dist/prisma/client.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { PrismaClient, Prisma } from '@prisma-app/client';
|
|
2
|
-
|
|
3
|
-
const globalForPrisma = globalThis as unknown as {
|
|
4
|
-
standardPrisma: PrismaClient;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
const logLevels = ['error', 'warn', 'info'] as Prisma.LogLevel[];
|
|
8
|
-
|
|
9
|
-
if (process.env.SHOW_SQL_QUERY === 'true') {
|
|
10
|
-
logLevels.push('query');
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const prisma = (url: string): PrismaClient => {
|
|
14
|
-
let prismaInstance;
|
|
15
|
-
|
|
16
|
-
if (globalForPrisma.standardPrisma) {
|
|
17
|
-
console.log('Reusing Global Prisma Client...');
|
|
18
|
-
prismaInstance = globalForPrisma.standardPrisma;
|
|
19
|
-
} else {
|
|
20
|
-
prismaInstance = new PrismaClient({
|
|
21
|
-
datasourceUrl: url,
|
|
22
|
-
log: logLevels,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
27
|
-
globalForPrisma.standardPrisma = prismaInstance;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return prismaInstance;
|
|
31
|
-
};
|
package/dist/prisma/gen.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
const { writeFileSync } = require('fs');
|
|
2
|
-
|
|
3
|
-
const tmpl = `
|
|
4
|
-
enum PropertyType {
|
|
5
|
-
LONG_TEXT
|
|
6
|
-
SINGLE_LINE_TEXT
|
|
7
|
-
SINGLE_SELECT
|
|
8
|
-
MULTI_SELECT
|
|
9
|
-
CHECKBOX
|
|
10
|
-
DATE
|
|
11
|
-
USER
|
|
12
|
-
BADGE_LIST
|
|
13
|
-
CURRENCY
|
|
14
|
-
URL
|
|
15
|
-
PHONE
|
|
16
|
-
CONTACT
|
|
17
|
-
COMPANY
|
|
18
|
-
PERSON
|
|
19
|
-
ENRICHMENT
|
|
20
|
-
COMPOSITE
|
|
21
|
-
BOOLEAN
|
|
22
|
-
NUMBER
|
|
23
|
-
FLOAT
|
|
24
|
-
JSON_OBJECT
|
|
25
|
-
JSON_ARRAY
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
model Property {
|
|
29
|
-
id String @id @default(cuid())
|
|
30
|
-
name String
|
|
31
|
-
displayName String
|
|
32
|
-
visible Boolean @default(true)
|
|
33
|
-
config Json?
|
|
34
|
-
description String?
|
|
35
|
-
type PropertyType
|
|
36
|
-
order Int
|
|
37
|
-
modifiable Boolean @default(true)
|
|
38
|
-
parentId String? @map("parentId")
|
|
39
|
-
parent Property? @relation("PropertyToProperty", fields: [parentId], references: [id])
|
|
40
|
-
compositeProperty Property[] @relation("PropertyToProperty")
|
|
41
|
-
entity Entity? @relation(fields: [entityId], references: [id])
|
|
42
|
-
entityId String?
|
|
43
|
-
@@map("properties")
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
enum RecordStatus {
|
|
47
|
-
ACTIVE
|
|
48
|
-
ARCHIVED
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
enum RecordEnrichmentStatus {
|
|
52
|
-
PENDING
|
|
53
|
-
APPLIED
|
|
54
|
-
UNAPPLIED
|
|
55
|
-
FAILED
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
model Record {
|
|
59
|
-
id String @id @default(cuid())
|
|
60
|
-
externalId String?
|
|
61
|
-
data Json @default("{}")
|
|
62
|
-
source String @default("MANUAL")
|
|
63
|
-
entityType String
|
|
64
|
-
entity Entity? @relation(fields: [entityId], references: [id])
|
|
65
|
-
entityId String?
|
|
66
|
-
status RecordStatus @default(ACTIVE)
|
|
67
|
-
enrichmentStatus RecordEnrichmentStatus @default(UNAPPLIED)
|
|
68
|
-
deletedAt DateTime?
|
|
69
|
-
createdAt DateTime @default(now())
|
|
70
|
-
updatedAt DateTime? @default(now())
|
|
71
|
-
|
|
72
|
-
@@index([externalId])
|
|
73
|
-
@@map("records")
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
model Credential {
|
|
77
|
-
id String @id @default(cuid())
|
|
78
|
-
type String
|
|
79
|
-
value Json
|
|
80
|
-
scope String[]
|
|
81
|
-
connection Connection @relation(fields: [k_id], references: [id], onDelete: Cascade)
|
|
82
|
-
k_id String @unique
|
|
83
|
-
@@map("credentials")
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
model Connection {
|
|
87
|
-
id String @id @default(cuid())
|
|
88
|
-
name String
|
|
89
|
-
issues String[] @default([])
|
|
90
|
-
syncConfig Json?
|
|
91
|
-
connectionId String
|
|
92
|
-
createdAt DateTime @default(now())
|
|
93
|
-
updatedAt DateTime? @updatedAt
|
|
94
|
-
|
|
95
|
-
lastSyncAt DateTime?
|
|
96
|
-
credential Credential?
|
|
97
|
-
subscriptionId String?
|
|
98
|
-
entities Entity[]
|
|
99
|
-
@@unique([connectionId, name])
|
|
100
|
-
@@index([subscriptionId])
|
|
101
|
-
@@map("connections")
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
model Entity {
|
|
105
|
-
id String @id @default(cuid())
|
|
106
|
-
type String
|
|
107
|
-
properties Property[]
|
|
108
|
-
records Record[]
|
|
109
|
-
|
|
110
|
-
createdAt DateTime @default(now())
|
|
111
|
-
updatedAt DateTime? @default(now())
|
|
112
|
-
createdBy String
|
|
113
|
-
|
|
114
|
-
connection Connection @relation(fields: [k_id], references: [id])
|
|
115
|
-
k_id String
|
|
116
|
-
|
|
117
|
-
lastSyncId String?
|
|
118
|
-
@@unique([k_id, type])
|
|
119
|
-
@@map("entity")
|
|
120
|
-
}
|
|
121
|
-
`;
|
|
122
|
-
|
|
123
|
-
function main() {
|
|
124
|
-
const schema = `
|
|
125
|
-
datasource db {
|
|
126
|
-
provider = "postgresql"
|
|
127
|
-
url = env("DB_URL")
|
|
128
|
-
}
|
|
129
|
-
generator client {
|
|
130
|
-
provider = "prisma-client-js"
|
|
131
|
-
output = "../../node_modules/@prisma-app/client"
|
|
132
|
-
binaryTargets = ["native", "rhel-openssl-3.0.x", "debian-openssl-1.1.x", "debian-openssl-3.0.x"]
|
|
133
|
-
}
|
|
134
|
-
${tmpl}
|
|
135
|
-
`;
|
|
136
|
-
|
|
137
|
-
writeFileSync(__dirname + '/schema.prisma', schema);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
main();
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
datasource db {
|
|
3
|
-
provider = "postgresql"
|
|
4
|
-
url = env("DB_URL")
|
|
5
|
-
}
|
|
6
|
-
generator client {
|
|
7
|
-
provider = "prisma-client-js"
|
|
8
|
-
output = "../../node_modules/@prisma-app/client"
|
|
9
|
-
binaryTargets = ["native", "rhel-openssl-3.0.x", "debian-openssl-1.1.x", "debian-openssl-3.0.x"]
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
enum PropertyType {
|
|
13
|
-
LONG_TEXT
|
|
14
|
-
SINGLE_LINE_TEXT
|
|
15
|
-
SINGLE_SELECT
|
|
16
|
-
MULTI_SELECT
|
|
17
|
-
CHECKBOX
|
|
18
|
-
DATE
|
|
19
|
-
USER
|
|
20
|
-
BADGE_LIST
|
|
21
|
-
CURRENCY
|
|
22
|
-
URL
|
|
23
|
-
PHONE
|
|
24
|
-
CONTACT
|
|
25
|
-
COMPANY
|
|
26
|
-
PERSON
|
|
27
|
-
ENRICHMENT
|
|
28
|
-
COMPOSITE
|
|
29
|
-
BOOLEAN
|
|
30
|
-
NUMBER
|
|
31
|
-
FLOAT
|
|
32
|
-
JSON_OBJECT
|
|
33
|
-
JSON_ARRAY
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
model Property {
|
|
37
|
-
id String @id @default(cuid())
|
|
38
|
-
name String
|
|
39
|
-
displayName String
|
|
40
|
-
visible Boolean @default(true)
|
|
41
|
-
config Json?
|
|
42
|
-
description String?
|
|
43
|
-
type PropertyType
|
|
44
|
-
order Int
|
|
45
|
-
modifiable Boolean @default(true)
|
|
46
|
-
parentId String? @map("parentId")
|
|
47
|
-
parent Property? @relation("PropertyToProperty", fields: [parentId], references: [id])
|
|
48
|
-
compositeProperty Property[] @relation("PropertyToProperty")
|
|
49
|
-
entity Entity? @relation(fields: [entityId], references: [id])
|
|
50
|
-
entityId String?
|
|
51
|
-
@@map("properties")
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
enum RecordStatus {
|
|
55
|
-
ACTIVE
|
|
56
|
-
ARCHIVED
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
enum RecordEnrichmentStatus {
|
|
60
|
-
PENDING
|
|
61
|
-
APPLIED
|
|
62
|
-
UNAPPLIED
|
|
63
|
-
FAILED
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
model Record {
|
|
67
|
-
id String @id @default(cuid())
|
|
68
|
-
externalId String?
|
|
69
|
-
data Json @default("{}")
|
|
70
|
-
source String @default("MANUAL")
|
|
71
|
-
entityType String
|
|
72
|
-
entity Entity? @relation(fields: [entityId], references: [id])
|
|
73
|
-
entityId String?
|
|
74
|
-
status RecordStatus @default(ACTIVE)
|
|
75
|
-
enrichmentStatus RecordEnrichmentStatus @default(UNAPPLIED)
|
|
76
|
-
deletedAt DateTime?
|
|
77
|
-
createdAt DateTime @default(now())
|
|
78
|
-
updatedAt DateTime? @default(now())
|
|
79
|
-
|
|
80
|
-
@@index([externalId])
|
|
81
|
-
@@map("records")
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
model Credential {
|
|
85
|
-
id String @id @default(cuid())
|
|
86
|
-
type String
|
|
87
|
-
value Json
|
|
88
|
-
scope String[]
|
|
89
|
-
connection Connection @relation(fields: [k_id], references: [id], onDelete: Cascade)
|
|
90
|
-
k_id String @unique
|
|
91
|
-
@@map("credentials")
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
model Connection {
|
|
95
|
-
id String @id @default(cuid())
|
|
96
|
-
name String
|
|
97
|
-
issues String[] @default([])
|
|
98
|
-
syncConfig Json?
|
|
99
|
-
connectionId String
|
|
100
|
-
createdAt DateTime @default(now())
|
|
101
|
-
updatedAt DateTime? @updatedAt
|
|
102
|
-
|
|
103
|
-
lastSyncAt DateTime?
|
|
104
|
-
credential Credential?
|
|
105
|
-
subscriptionId String?
|
|
106
|
-
entities Entity[]
|
|
107
|
-
@@unique([connectionId, name])
|
|
108
|
-
@@index([subscriptionId])
|
|
109
|
-
@@map("connections")
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
model Entity {
|
|
113
|
-
id String @id @default(cuid())
|
|
114
|
-
type String
|
|
115
|
-
properties Property[]
|
|
116
|
-
records Record[]
|
|
117
|
-
|
|
118
|
-
createdAt DateTime @default(now())
|
|
119
|
-
updatedAt DateTime? @default(now())
|
|
120
|
-
createdBy String
|
|
121
|
-
|
|
122
|
-
connection Connection @relation(fields: [k_id], references: [id])
|
|
123
|
-
k_id String
|
|
124
|
-
|
|
125
|
-
lastSyncId String?
|
|
126
|
-
@@unique([k_id, type])
|
|
127
|
-
@@map("entity")
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { prisma } from '../prisma/client';
|
|
2
|
-
import { PrismaClient } from '@prisma-app/client';
|
|
3
|
-
export declare class PropertyService<T extends typeof prisma> {
|
|
4
|
-
db: PrismaClient;
|
|
5
|
-
constructor({ db }: {
|
|
6
|
-
db: T;
|
|
7
|
-
});
|
|
8
|
-
getPropertiesByEntityType({ entityType, }: {
|
|
9
|
-
entityType: string;
|
|
10
|
-
}): Promise<{
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
displayName: string;
|
|
14
|
-
visible: boolean;
|
|
15
|
-
config: import("@prisma-app/client/runtime/library").JsonValue | null;
|
|
16
|
-
description: string | null;
|
|
17
|
-
type: import("@prisma-app/client").$Enums.PropertyType;
|
|
18
|
-
order: number;
|
|
19
|
-
modifiable: boolean;
|
|
20
|
-
parentId: string | null;
|
|
21
|
-
entityId: string | null;
|
|
22
|
-
}[]>;
|
|
23
|
-
}
|
|
24
|
-
export declare const propertyService: PropertyService<(url: string) => PrismaClient>;
|
|
25
|
-
//# sourceMappingURL=service.property.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service.property.d.ts","sourceRoot":"","sources":["../../src/service/service.property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,qBAAa,eAAe,CAAC,CAAC,SAAS,OAAO,MAAM;IAClD,EAAE,EAAE,YAAY,CAAC;gBACL,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,CAAC,CAAA;KAAE;IAIvB,yBAAyB,CAAC,EAC9B,UAAU,GACX,EAAE;QACD,UAAU,EAAE,MAAM,CAAC;KAEpB;;;;;;;;;;;;;CASF;AAED,eAAO,MAAM,eAAe,gDAAsC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { prisma } from '../prisma/client';
|
|
2
|
-
import { PrismaClient } from '@prisma-app/client';
|
|
3
|
-
import { PropertyService } from './service.property';
|
|
4
|
-
import { FilterObject } from '../lib/query-builder/types';
|
|
5
|
-
export declare class RecordService<T extends typeof prisma> {
|
|
6
|
-
db: PrismaClient;
|
|
7
|
-
propertyService: PropertyService<T>;
|
|
8
|
-
constructor({ db }: {
|
|
9
|
-
db: T;
|
|
10
|
-
});
|
|
11
|
-
buildRecordQuerySql({ whereClause, filterClause, sortClauses, entityType, }: {
|
|
12
|
-
whereClause: string;
|
|
13
|
-
filterClause?: string;
|
|
14
|
-
entityType: string;
|
|
15
|
-
sortClauses: string[];
|
|
16
|
-
}): string;
|
|
17
|
-
getFilteredRecords<T extends string | number | symbol>({ entityType, k_id, filters, sort, }: {
|
|
18
|
-
entityType: string;
|
|
19
|
-
filters?: FilterObject<T>;
|
|
20
|
-
sort?: string[];
|
|
21
|
-
k_id: string;
|
|
22
|
-
}): Promise<any>;
|
|
23
|
-
}
|
|
24
|
-
export declare const recordService: RecordService<(url: string) => PrismaClient>;
|
|
25
|
-
//# sourceMappingURL=service.record.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service.record.d.ts","sourceRoot":"","sources":["../../src/service/service.record.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAGL,YAAY,EACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAMrD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,qBAAa,aAAa,CAAC,CAAC,SAAS,OAAO,MAAM;IAChD,EAAE,EAAE,YAAY,CAAC;IACjB,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;gBAExB,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,CAAC,CAAA;KAAE;IAK7B,mBAAmB,CAAC,EAClB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,UAAU,GACX,EAAE;QACD,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,EAAE,CAAC;KACvB;IAeK,kBAAkB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,EAC3D,UAAU,EACV,IAAI,EACJ,OAAO,EACP,IAAI,GACL,EAAE;QACD,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;QAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd;CAiEF;AAED,eAAO,MAAM,aAAa,8CAAoC,CAAC"}
|
|
File without changes
|