@ainetwork/adk-provider-memory-mongodb 0.4.1 → 0.5.0
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/{chunk-EPJZT2YE.js → chunk-2XJ6S2W5.js} +6 -1
- package/dist/chunk-2XJ6S2W5.js.map +1 -0
- package/dist/{chunk-T5WRFXBY.js → chunk-QULDFKGZ.js} +2 -1
- package/dist/chunk-QULDFKGZ.js.map +1 -0
- package/dist/chunk-RC275GLE.js +70 -0
- package/dist/chunk-RC275GLE.js.map +1 -0
- package/dist/{chunk-ENGJ6NTO.js → chunk-SJ2FHHN6.js} +10 -10
- package/dist/chunk-SJ2FHHN6.js.map +1 -0
- package/dist/index.cjs +235 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +155 -55
- package/dist/index.js.map +1 -1
- package/dist/models/messages.model.cjs +1 -0
- package/dist/models/messages.model.cjs.map +1 -1
- package/dist/models/messages.model.js +1 -1
- package/dist/models/threads.model.cjs +5 -0
- package/dist/models/threads.model.cjs.map +1 -1
- package/dist/models/threads.model.d.cts +4 -0
- package/dist/models/threads.model.d.ts +4 -0
- package/dist/models/threads.model.js +1 -1
- package/dist/models/user-workflow.model.cjs +105 -0
- package/dist/models/user-workflow.model.cjs.map +1 -0
- package/dist/models/user-workflow.model.d.cts +92 -0
- package/dist/models/user-workflow.model.d.ts +92 -0
- package/dist/models/user-workflow.model.js +9 -0
- package/dist/models/{workflow.model.cjs → workflow-template.model.cjs} +15 -15
- package/dist/models/workflow-template.model.cjs.map +1 -0
- package/dist/models/{workflow.model.d.ts → workflow-template.model.d.cts} +10 -13
- package/dist/models/{workflow.model.d.cts → workflow-template.model.d.ts} +10 -13
- package/dist/models/workflow-template.model.js +9 -0
- package/dist/models/workflow-template.model.js.map +1 -0
- package/implements/base.memory.ts +49 -12
- package/implements/thread.memory.ts +31 -16
- package/implements/user-workflow.memory.ts +87 -0
- package/implements/workflow-template.memory.ts +69 -0
- package/models/messages.model.ts +2 -0
- package/models/threads.model.ts +6 -0
- package/models/user-workflow.model.ts +91 -0
- package/models/{workflow.model.ts → workflow-template.model.ts} +10 -10
- package/package.json +3 -3
- package/dist/chunk-ENGJ6NTO.js.map +0 -1
- package/dist/chunk-EPJZT2YE.js.map +0 -1
- package/dist/chunk-T5WRFXBY.js.map +0 -1
- package/dist/models/workflow.model.cjs.map +0 -1
- package/dist/models/workflow.model.js +0 -9
- package/implements/workflow.memory.ts +0 -78
- /package/dist/models/{workflow.model.js.map → user-workflow.model.js.map} +0 -0
|
@@ -12,6 +12,7 @@ declare const ThreadObjectSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
12
12
|
userId: string;
|
|
13
13
|
title?: string | null | undefined;
|
|
14
14
|
isPinned?: boolean | null | undefined;
|
|
15
|
+
workflowId?: string | null | undefined;
|
|
15
16
|
}, Document<unknown, {}, mongoose.FlatRecord<{
|
|
16
17
|
createdAt: NativeDate;
|
|
17
18
|
updatedAt: NativeDate;
|
|
@@ -21,6 +22,7 @@ declare const ThreadObjectSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
21
22
|
userId: string;
|
|
22
23
|
title?: string | null | undefined;
|
|
23
24
|
isPinned?: boolean | null | undefined;
|
|
25
|
+
workflowId?: string | null | undefined;
|
|
24
26
|
}>, {}> & mongoose.FlatRecord<{
|
|
25
27
|
createdAt: NativeDate;
|
|
26
28
|
updatedAt: NativeDate;
|
|
@@ -30,6 +32,7 @@ declare const ThreadObjectSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
30
32
|
userId: string;
|
|
31
33
|
title?: string | null | undefined;
|
|
32
34
|
isPinned?: boolean | null | undefined;
|
|
35
|
+
workflowId?: string | null | undefined;
|
|
33
36
|
}> & {
|
|
34
37
|
_id: mongoose.Types.ObjectId;
|
|
35
38
|
} & {
|
|
@@ -41,6 +44,7 @@ interface ThreadDocument extends Document {
|
|
|
41
44
|
userId: string;
|
|
42
45
|
title: string;
|
|
43
46
|
isPinned: boolean;
|
|
47
|
+
workflowId?: string;
|
|
44
48
|
createdAt: Date;
|
|
45
49
|
updatedAt: Date;
|
|
46
50
|
}
|
|
@@ -12,6 +12,7 @@ declare const ThreadObjectSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
12
12
|
userId: string;
|
|
13
13
|
title?: string | null | undefined;
|
|
14
14
|
isPinned?: boolean | null | undefined;
|
|
15
|
+
workflowId?: string | null | undefined;
|
|
15
16
|
}, Document<unknown, {}, mongoose.FlatRecord<{
|
|
16
17
|
createdAt: NativeDate;
|
|
17
18
|
updatedAt: NativeDate;
|
|
@@ -21,6 +22,7 @@ declare const ThreadObjectSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
21
22
|
userId: string;
|
|
22
23
|
title?: string | null | undefined;
|
|
23
24
|
isPinned?: boolean | null | undefined;
|
|
25
|
+
workflowId?: string | null | undefined;
|
|
24
26
|
}>, {}> & mongoose.FlatRecord<{
|
|
25
27
|
createdAt: NativeDate;
|
|
26
28
|
updatedAt: NativeDate;
|
|
@@ -30,6 +32,7 @@ declare const ThreadObjectSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
30
32
|
userId: string;
|
|
31
33
|
title?: string | null | undefined;
|
|
32
34
|
isPinned?: boolean | null | undefined;
|
|
35
|
+
workflowId?: string | null | undefined;
|
|
33
36
|
}> & {
|
|
34
37
|
_id: mongoose.Types.ObjectId;
|
|
35
38
|
} & {
|
|
@@ -41,6 +44,7 @@ interface ThreadDocument extends Document {
|
|
|
41
44
|
userId: string;
|
|
42
45
|
title: string;
|
|
43
46
|
isPinned: boolean;
|
|
47
|
+
workflowId?: string;
|
|
44
48
|
createdAt: Date;
|
|
45
49
|
updatedAt: Date;
|
|
46
50
|
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// models/user-workflow.model.ts
|
|
31
|
+
var user_workflow_model_exports = {};
|
|
32
|
+
__export(user_workflow_model_exports, {
|
|
33
|
+
UserWorkflowModel: () => UserWorkflowModel,
|
|
34
|
+
UserWorkflowObjectSchema: () => UserWorkflowObjectSchema
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(user_workflow_model_exports);
|
|
37
|
+
var import_mongoose = require("mongoose");
|
|
38
|
+
var import_mongoose2 = __toESM(require("mongoose"), 1);
|
|
39
|
+
var UserWorkflowObjectSchema = new import_mongoose.Schema(
|
|
40
|
+
{
|
|
41
|
+
workflowId: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: true,
|
|
44
|
+
unique: true
|
|
45
|
+
},
|
|
46
|
+
userId: {
|
|
47
|
+
type: String,
|
|
48
|
+
required: true,
|
|
49
|
+
index: true
|
|
50
|
+
},
|
|
51
|
+
title: {
|
|
52
|
+
type: String,
|
|
53
|
+
required: true
|
|
54
|
+
},
|
|
55
|
+
description: {
|
|
56
|
+
type: String
|
|
57
|
+
},
|
|
58
|
+
active: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
required: true,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
63
|
+
templateId: {
|
|
64
|
+
type: String
|
|
65
|
+
},
|
|
66
|
+
content: {
|
|
67
|
+
type: String,
|
|
68
|
+
required: true
|
|
69
|
+
},
|
|
70
|
+
variables: {
|
|
71
|
+
type: import_mongoose.Schema.Types.Mixed
|
|
72
|
+
},
|
|
73
|
+
variableValues: {
|
|
74
|
+
type: import_mongoose.Schema.Types.Mixed
|
|
75
|
+
},
|
|
76
|
+
schedule: {
|
|
77
|
+
type: String
|
|
78
|
+
},
|
|
79
|
+
timezone: {
|
|
80
|
+
type: String
|
|
81
|
+
},
|
|
82
|
+
lastRunAt: {
|
|
83
|
+
type: Number
|
|
84
|
+
},
|
|
85
|
+
nextRunAt: {
|
|
86
|
+
type: Number
|
|
87
|
+
},
|
|
88
|
+
lastThreadId: {
|
|
89
|
+
type: String
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
timestamps: true
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
var UserWorkflowModel = import_mongoose2.default.model(
|
|
97
|
+
"UserWorkflow",
|
|
98
|
+
UserWorkflowObjectSchema
|
|
99
|
+
);
|
|
100
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
101
|
+
0 && (module.exports = {
|
|
102
|
+
UserWorkflowModel,
|
|
103
|
+
UserWorkflowObjectSchema
|
|
104
|
+
});
|
|
105
|
+
//# sourceMappingURL=user-workflow.model.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../models/user-workflow.model.ts"],"sourcesContent":["import { type Document, Schema } from \"mongoose\";\nimport mongoose from \"mongoose\";\n\nexport const UserWorkflowObjectSchema = new Schema(\n\t{\n\t\tworkflowId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\tuserId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t\tdefault: false,\n\t\t},\n\t\ttemplateId: {\n\t\t\ttype: String,\n\t\t},\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tvariables: {\n\t\t\ttype: Schema.Types.Mixed,\n\t\t},\n\t\tvariableValues: {\n\t\t\ttype: Schema.Types.Mixed,\n\t\t},\n\t\tschedule: {\n\t\t\ttype: String,\n\t\t},\n\t\ttimezone: {\n\t\t\ttype: String,\n\t\t},\n\t\tlastRunAt: {\n\t\t\ttype: Number,\n\t\t},\n\t\tnextRunAt: {\n\t\t\ttype: Number,\n\t\t},\n\t\tlastThreadId: {\n\t\t\ttype: String,\n\t\t},\n\t},\n\t{\n\t\ttimestamps: true,\n\t}\n);\n\nexport interface UserWorkflowDocument extends Document {\n\tworkflowId: string;\n\tuserId: string;\n\ttitle: string;\n\tdescription?: string;\n\tactive: boolean;\n\ttemplateId?: string;\n\tcontent: string;\n\tvariables?: Record<\n\t\tstring,\n\t\t{\n\t\t\tid: string;\n\t\t\tlabel: string;\n\t\t\ttype: \"select\" | \"date_range\" | \"date_parts\" | \"text\" | \"number\";\n\t\t\toptions?: Array<string>;\n\t\t\tresolveAt?: \"creation\" | \"execution\";\n\t\t}\n\t>;\n\tvariableValues?: Record<string, string>;\n\tschedule?: string;\n\ttimezone?: string;\n\tlastRunAt?: number;\n\tnextRunAt?: number;\n\tlastThreadId?: string;\n}\n\nexport const UserWorkflowModel = mongoose.model<UserWorkflowDocument>(\n\t\"UserWorkflow\",\n\tUserWorkflowObjectSchema\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAsC;AACtC,IAAAA,mBAAqB;AAEd,IAAM,2BAA2B,IAAI;AAAA,EAC3C;AAAA,IACC,YAAY;AAAA,MACX,MAAM;AAAA,MACN,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAAA,IACA,QAAQ;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,MACV,OAAO;AAAA,IACR;AAAA,IACA,OAAO;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACZ,MAAM;AAAA,IACP;AAAA,IACA,QAAQ;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,MACV,SAAS;AAAA,IACV;AAAA,IACA,YAAY;AAAA,MACX,MAAM;AAAA,IACP;AAAA,IACA,SAAS;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACV,MAAM,uBAAO,MAAM;AAAA,IACpB;AAAA,IACA,gBAAgB;AAAA,MACf,MAAM,uBAAO,MAAM;AAAA,IACpB;AAAA,IACA,UAAU;AAAA,MACT,MAAM;AAAA,IACP;AAAA,IACA,UAAU;AAAA,MACT,MAAM;AAAA,IACP;AAAA,IACA,WAAW;AAAA,MACV,MAAM;AAAA,IACP;AAAA,IACA,WAAW;AAAA,MACV,MAAM;AAAA,IACP;AAAA,IACA,cAAc;AAAA,MACb,MAAM;AAAA,IACP;AAAA,EACD;AAAA,EACA;AAAA,IACC,YAAY;AAAA,EACb;AACD;AA4BO,IAAM,oBAAoB,iBAAAC,QAAS;AAAA,EACzC;AAAA,EACA;AACD;","names":["import_mongoose","mongoose"]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import mongoose, { Schema, Document } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
declare const UserWorkflowObjectSchema: Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
4
|
+
timestamps: true;
|
|
5
|
+
}, {
|
|
6
|
+
createdAt: NativeDate;
|
|
7
|
+
updatedAt: NativeDate;
|
|
8
|
+
} & {
|
|
9
|
+
userId: string;
|
|
10
|
+
title: string;
|
|
11
|
+
workflowId: string;
|
|
12
|
+
content: string;
|
|
13
|
+
active: boolean;
|
|
14
|
+
description?: string | null | undefined;
|
|
15
|
+
templateId?: string | null | undefined;
|
|
16
|
+
variables?: any;
|
|
17
|
+
variableValues?: any;
|
|
18
|
+
schedule?: string | null | undefined;
|
|
19
|
+
timezone?: string | null | undefined;
|
|
20
|
+
lastRunAt?: number | null | undefined;
|
|
21
|
+
nextRunAt?: number | null | undefined;
|
|
22
|
+
lastThreadId?: string | null | undefined;
|
|
23
|
+
}, Document<unknown, {}, mongoose.FlatRecord<{
|
|
24
|
+
createdAt: NativeDate;
|
|
25
|
+
updatedAt: NativeDate;
|
|
26
|
+
} & {
|
|
27
|
+
userId: string;
|
|
28
|
+
title: string;
|
|
29
|
+
workflowId: string;
|
|
30
|
+
content: string;
|
|
31
|
+
active: boolean;
|
|
32
|
+
description?: string | null | undefined;
|
|
33
|
+
templateId?: string | null | undefined;
|
|
34
|
+
variables?: any;
|
|
35
|
+
variableValues?: any;
|
|
36
|
+
schedule?: string | null | undefined;
|
|
37
|
+
timezone?: string | null | undefined;
|
|
38
|
+
lastRunAt?: number | null | undefined;
|
|
39
|
+
nextRunAt?: number | null | undefined;
|
|
40
|
+
lastThreadId?: string | null | undefined;
|
|
41
|
+
}>, {}> & mongoose.FlatRecord<{
|
|
42
|
+
createdAt: NativeDate;
|
|
43
|
+
updatedAt: NativeDate;
|
|
44
|
+
} & {
|
|
45
|
+
userId: string;
|
|
46
|
+
title: string;
|
|
47
|
+
workflowId: string;
|
|
48
|
+
content: string;
|
|
49
|
+
active: boolean;
|
|
50
|
+
description?: string | null | undefined;
|
|
51
|
+
templateId?: string | null | undefined;
|
|
52
|
+
variables?: any;
|
|
53
|
+
variableValues?: any;
|
|
54
|
+
schedule?: string | null | undefined;
|
|
55
|
+
timezone?: string | null | undefined;
|
|
56
|
+
lastRunAt?: number | null | undefined;
|
|
57
|
+
nextRunAt?: number | null | undefined;
|
|
58
|
+
lastThreadId?: string | null | undefined;
|
|
59
|
+
}> & {
|
|
60
|
+
_id: mongoose.Types.ObjectId;
|
|
61
|
+
} & {
|
|
62
|
+
__v: number;
|
|
63
|
+
}>;
|
|
64
|
+
interface UserWorkflowDocument extends Document {
|
|
65
|
+
workflowId: string;
|
|
66
|
+
userId: string;
|
|
67
|
+
title: string;
|
|
68
|
+
description?: string;
|
|
69
|
+
active: boolean;
|
|
70
|
+
templateId?: string;
|
|
71
|
+
content: string;
|
|
72
|
+
variables?: Record<string, {
|
|
73
|
+
id: string;
|
|
74
|
+
label: string;
|
|
75
|
+
type: "select" | "date_range" | "date_parts" | "text" | "number";
|
|
76
|
+
options?: Array<string>;
|
|
77
|
+
resolveAt?: "creation" | "execution";
|
|
78
|
+
}>;
|
|
79
|
+
variableValues?: Record<string, string>;
|
|
80
|
+
schedule?: string;
|
|
81
|
+
timezone?: string;
|
|
82
|
+
lastRunAt?: number;
|
|
83
|
+
nextRunAt?: number;
|
|
84
|
+
lastThreadId?: string;
|
|
85
|
+
}
|
|
86
|
+
declare const UserWorkflowModel: mongoose.Model<UserWorkflowDocument, {}, {}, {}, Document<unknown, {}, UserWorkflowDocument, {}> & UserWorkflowDocument & Required<{
|
|
87
|
+
_id: unknown;
|
|
88
|
+
}> & {
|
|
89
|
+
__v: number;
|
|
90
|
+
}, any>;
|
|
91
|
+
|
|
92
|
+
export { type UserWorkflowDocument, UserWorkflowModel, UserWorkflowObjectSchema };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import mongoose, { Schema, Document } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
declare const UserWorkflowObjectSchema: Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
4
|
+
timestamps: true;
|
|
5
|
+
}, {
|
|
6
|
+
createdAt: NativeDate;
|
|
7
|
+
updatedAt: NativeDate;
|
|
8
|
+
} & {
|
|
9
|
+
userId: string;
|
|
10
|
+
title: string;
|
|
11
|
+
workflowId: string;
|
|
12
|
+
content: string;
|
|
13
|
+
active: boolean;
|
|
14
|
+
description?: string | null | undefined;
|
|
15
|
+
templateId?: string | null | undefined;
|
|
16
|
+
variables?: any;
|
|
17
|
+
variableValues?: any;
|
|
18
|
+
schedule?: string | null | undefined;
|
|
19
|
+
timezone?: string | null | undefined;
|
|
20
|
+
lastRunAt?: number | null | undefined;
|
|
21
|
+
nextRunAt?: number | null | undefined;
|
|
22
|
+
lastThreadId?: string | null | undefined;
|
|
23
|
+
}, Document<unknown, {}, mongoose.FlatRecord<{
|
|
24
|
+
createdAt: NativeDate;
|
|
25
|
+
updatedAt: NativeDate;
|
|
26
|
+
} & {
|
|
27
|
+
userId: string;
|
|
28
|
+
title: string;
|
|
29
|
+
workflowId: string;
|
|
30
|
+
content: string;
|
|
31
|
+
active: boolean;
|
|
32
|
+
description?: string | null | undefined;
|
|
33
|
+
templateId?: string | null | undefined;
|
|
34
|
+
variables?: any;
|
|
35
|
+
variableValues?: any;
|
|
36
|
+
schedule?: string | null | undefined;
|
|
37
|
+
timezone?: string | null | undefined;
|
|
38
|
+
lastRunAt?: number | null | undefined;
|
|
39
|
+
nextRunAt?: number | null | undefined;
|
|
40
|
+
lastThreadId?: string | null | undefined;
|
|
41
|
+
}>, {}> & mongoose.FlatRecord<{
|
|
42
|
+
createdAt: NativeDate;
|
|
43
|
+
updatedAt: NativeDate;
|
|
44
|
+
} & {
|
|
45
|
+
userId: string;
|
|
46
|
+
title: string;
|
|
47
|
+
workflowId: string;
|
|
48
|
+
content: string;
|
|
49
|
+
active: boolean;
|
|
50
|
+
description?: string | null | undefined;
|
|
51
|
+
templateId?: string | null | undefined;
|
|
52
|
+
variables?: any;
|
|
53
|
+
variableValues?: any;
|
|
54
|
+
schedule?: string | null | undefined;
|
|
55
|
+
timezone?: string | null | undefined;
|
|
56
|
+
lastRunAt?: number | null | undefined;
|
|
57
|
+
nextRunAt?: number | null | undefined;
|
|
58
|
+
lastThreadId?: string | null | undefined;
|
|
59
|
+
}> & {
|
|
60
|
+
_id: mongoose.Types.ObjectId;
|
|
61
|
+
} & {
|
|
62
|
+
__v: number;
|
|
63
|
+
}>;
|
|
64
|
+
interface UserWorkflowDocument extends Document {
|
|
65
|
+
workflowId: string;
|
|
66
|
+
userId: string;
|
|
67
|
+
title: string;
|
|
68
|
+
description?: string;
|
|
69
|
+
active: boolean;
|
|
70
|
+
templateId?: string;
|
|
71
|
+
content: string;
|
|
72
|
+
variables?: Record<string, {
|
|
73
|
+
id: string;
|
|
74
|
+
label: string;
|
|
75
|
+
type: "select" | "date_range" | "date_parts" | "text" | "number";
|
|
76
|
+
options?: Array<string>;
|
|
77
|
+
resolveAt?: "creation" | "execution";
|
|
78
|
+
}>;
|
|
79
|
+
variableValues?: Record<string, string>;
|
|
80
|
+
schedule?: string;
|
|
81
|
+
timezone?: string;
|
|
82
|
+
lastRunAt?: number;
|
|
83
|
+
nextRunAt?: number;
|
|
84
|
+
lastThreadId?: string;
|
|
85
|
+
}
|
|
86
|
+
declare const UserWorkflowModel: mongoose.Model<UserWorkflowDocument, {}, {}, {}, Document<unknown, {}, UserWorkflowDocument, {}> & UserWorkflowDocument & Required<{
|
|
87
|
+
_id: unknown;
|
|
88
|
+
}> & {
|
|
89
|
+
__v: number;
|
|
90
|
+
}, any>;
|
|
91
|
+
|
|
92
|
+
export { type UserWorkflowDocument, UserWorkflowModel, UserWorkflowObjectSchema };
|
|
@@ -27,25 +27,22 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// models/workflow.model.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
// models/workflow-template.model.ts
|
|
31
|
+
var workflow_template_model_exports = {};
|
|
32
|
+
__export(workflow_template_model_exports, {
|
|
33
|
+
WorkflowTemplateModel: () => WorkflowTemplateModel,
|
|
34
|
+
WorkflowTemplateObjectSchema: () => WorkflowTemplateObjectSchema
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(workflow_template_model_exports);
|
|
37
37
|
var import_mongoose = require("mongoose");
|
|
38
38
|
var import_mongoose2 = __toESM(require("mongoose"), 1);
|
|
39
|
-
var
|
|
39
|
+
var WorkflowTemplateObjectSchema = new import_mongoose.Schema(
|
|
40
40
|
{
|
|
41
|
-
|
|
41
|
+
templateId: {
|
|
42
42
|
type: String,
|
|
43
43
|
required: true,
|
|
44
44
|
unique: true
|
|
45
45
|
},
|
|
46
|
-
userId: {
|
|
47
|
-
type: String
|
|
48
|
-
},
|
|
49
46
|
title: {
|
|
50
47
|
type: String,
|
|
51
48
|
required: true
|
|
@@ -71,10 +68,13 @@ var WorkflowObjectSchema = new import_mongoose.Schema(
|
|
|
71
68
|
timestamps: true
|
|
72
69
|
}
|
|
73
70
|
);
|
|
74
|
-
var
|
|
71
|
+
var WorkflowTemplateModel = import_mongoose2.default.model(
|
|
72
|
+
"WorkflowTemplate",
|
|
73
|
+
WorkflowTemplateObjectSchema
|
|
74
|
+
);
|
|
75
75
|
// Annotate the CommonJS export names for ESM import in node:
|
|
76
76
|
0 && (module.exports = {
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
WorkflowTemplateModel,
|
|
78
|
+
WorkflowTemplateObjectSchema
|
|
79
79
|
});
|
|
80
|
-
//# sourceMappingURL=workflow.model.cjs.map
|
|
80
|
+
//# sourceMappingURL=workflow-template.model.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../models/workflow-template.model.ts"],"sourcesContent":["import { type Document, Schema } from \"mongoose\";\nimport mongoose from \"mongoose\";\n\nexport const WorkflowTemplateObjectSchema = new Schema(\n\t{\n\t\ttemplateId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t\tdefault: false,\n\t\t},\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tvariables: {\n\t\t\ttype: Schema.Types.Mixed,\n\t\t},\n\t},\n\t{\n\t\ttimestamps: true,\n\t}\n);\n\nexport interface WorkflowTemplateDocument extends Document {\n\ttemplateId: string;\n\ttitle: string;\n\tdescription: string;\n\tactive: boolean;\n\tcontent: string;\n\tvariables?: Record<\n\t\tstring,\n\t\t{\n\t\t\tid: string;\n\t\t\tlabel: string;\n\t\t\ttype: \"select\" | \"date_range\" | \"date_parts\" | \"text\" | \"number\";\n\t\t\toptions?: Array<string>;\n\t\t\tresolveAt?: \"creation\" | \"execution\";\n\t\t}\n\t>;\n}\n\nexport const WorkflowTemplateModel = mongoose.model<WorkflowTemplateDocument>(\n\t\"WorkflowTemplate\",\n\tWorkflowTemplateObjectSchema\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAsC;AACtC,IAAAA,mBAAqB;AAEd,IAAM,+BAA+B,IAAI;AAAA,EAC/C;AAAA,IACC,YAAY;AAAA,MACX,MAAM;AAAA,MACN,UAAU;AAAA,MACV,QAAQ;AAAA,IACT;AAAA,IACA,OAAO;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACZ,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,MACV,SAAS;AAAA,IACV;AAAA,IACA,SAAS;AAAA,MACR,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACV,MAAM,uBAAO,MAAM;AAAA,IACpB;AAAA,EACD;AAAA,EACA;AAAA,IACC,YAAY;AAAA,EACb;AACD;AAoBO,IAAM,wBAAwB,iBAAAC,QAAS;AAAA,EAC7C;AAAA,EACA;AACD;","names":["import_mongoose","mongoose"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import mongoose, { Schema, Document } from 'mongoose';
|
|
2
2
|
|
|
3
|
-
declare const
|
|
3
|
+
declare const WorkflowTemplateObjectSchema: Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
4
4
|
timestamps: true;
|
|
5
5
|
}, {
|
|
6
6
|
createdAt: NativeDate;
|
|
@@ -9,9 +9,8 @@ declare const WorkflowObjectSchema: Schema<any, mongoose.Model<any, any, any, an
|
|
|
9
9
|
description: string;
|
|
10
10
|
title: string;
|
|
11
11
|
content: string;
|
|
12
|
-
workflowId: string;
|
|
13
12
|
active: boolean;
|
|
14
|
-
|
|
13
|
+
templateId: string;
|
|
15
14
|
variables?: any;
|
|
16
15
|
}, Document<unknown, {}, mongoose.FlatRecord<{
|
|
17
16
|
createdAt: NativeDate;
|
|
@@ -20,9 +19,8 @@ declare const WorkflowObjectSchema: Schema<any, mongoose.Model<any, any, any, an
|
|
|
20
19
|
description: string;
|
|
21
20
|
title: string;
|
|
22
21
|
content: string;
|
|
23
|
-
workflowId: string;
|
|
24
22
|
active: boolean;
|
|
25
|
-
|
|
23
|
+
templateId: string;
|
|
26
24
|
variables?: any;
|
|
27
25
|
}>, {}> & mongoose.FlatRecord<{
|
|
28
26
|
createdAt: NativeDate;
|
|
@@ -31,18 +29,16 @@ declare const WorkflowObjectSchema: Schema<any, mongoose.Model<any, any, any, an
|
|
|
31
29
|
description: string;
|
|
32
30
|
title: string;
|
|
33
31
|
content: string;
|
|
34
|
-
workflowId: string;
|
|
35
32
|
active: boolean;
|
|
36
|
-
|
|
33
|
+
templateId: string;
|
|
37
34
|
variables?: any;
|
|
38
35
|
}> & {
|
|
39
36
|
_id: mongoose.Types.ObjectId;
|
|
40
37
|
} & {
|
|
41
38
|
__v: number;
|
|
42
39
|
}>;
|
|
43
|
-
interface
|
|
44
|
-
|
|
45
|
-
userId?: string;
|
|
40
|
+
interface WorkflowTemplateDocument extends Document {
|
|
41
|
+
templateId: string;
|
|
46
42
|
title: string;
|
|
47
43
|
description: string;
|
|
48
44
|
active: boolean;
|
|
@@ -50,14 +46,15 @@ interface WorkflowDocument extends Document {
|
|
|
50
46
|
variables?: Record<string, {
|
|
51
47
|
id: string;
|
|
52
48
|
label: string;
|
|
53
|
-
type: "select" | "date_range" | "text" | "number";
|
|
49
|
+
type: "select" | "date_range" | "date_parts" | "text" | "number";
|
|
54
50
|
options?: Array<string>;
|
|
51
|
+
resolveAt?: "creation" | "execution";
|
|
55
52
|
}>;
|
|
56
53
|
}
|
|
57
|
-
declare const
|
|
54
|
+
declare const WorkflowTemplateModel: mongoose.Model<WorkflowTemplateDocument, {}, {}, {}, Document<unknown, {}, WorkflowTemplateDocument, {}> & WorkflowTemplateDocument & Required<{
|
|
58
55
|
_id: unknown;
|
|
59
56
|
}> & {
|
|
60
57
|
__v: number;
|
|
61
58
|
}, any>;
|
|
62
59
|
|
|
63
|
-
export { type
|
|
60
|
+
export { type WorkflowTemplateDocument, WorkflowTemplateModel, WorkflowTemplateObjectSchema };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import mongoose, { Schema, Document } from 'mongoose';
|
|
2
2
|
|
|
3
|
-
declare const
|
|
3
|
+
declare const WorkflowTemplateObjectSchema: Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
4
4
|
timestamps: true;
|
|
5
5
|
}, {
|
|
6
6
|
createdAt: NativeDate;
|
|
@@ -9,9 +9,8 @@ declare const WorkflowObjectSchema: Schema<any, mongoose.Model<any, any, any, an
|
|
|
9
9
|
description: string;
|
|
10
10
|
title: string;
|
|
11
11
|
content: string;
|
|
12
|
-
workflowId: string;
|
|
13
12
|
active: boolean;
|
|
14
|
-
|
|
13
|
+
templateId: string;
|
|
15
14
|
variables?: any;
|
|
16
15
|
}, Document<unknown, {}, mongoose.FlatRecord<{
|
|
17
16
|
createdAt: NativeDate;
|
|
@@ -20,9 +19,8 @@ declare const WorkflowObjectSchema: Schema<any, mongoose.Model<any, any, any, an
|
|
|
20
19
|
description: string;
|
|
21
20
|
title: string;
|
|
22
21
|
content: string;
|
|
23
|
-
workflowId: string;
|
|
24
22
|
active: boolean;
|
|
25
|
-
|
|
23
|
+
templateId: string;
|
|
26
24
|
variables?: any;
|
|
27
25
|
}>, {}> & mongoose.FlatRecord<{
|
|
28
26
|
createdAt: NativeDate;
|
|
@@ -31,18 +29,16 @@ declare const WorkflowObjectSchema: Schema<any, mongoose.Model<any, any, any, an
|
|
|
31
29
|
description: string;
|
|
32
30
|
title: string;
|
|
33
31
|
content: string;
|
|
34
|
-
workflowId: string;
|
|
35
32
|
active: boolean;
|
|
36
|
-
|
|
33
|
+
templateId: string;
|
|
37
34
|
variables?: any;
|
|
38
35
|
}> & {
|
|
39
36
|
_id: mongoose.Types.ObjectId;
|
|
40
37
|
} & {
|
|
41
38
|
__v: number;
|
|
42
39
|
}>;
|
|
43
|
-
interface
|
|
44
|
-
|
|
45
|
-
userId?: string;
|
|
40
|
+
interface WorkflowTemplateDocument extends Document {
|
|
41
|
+
templateId: string;
|
|
46
42
|
title: string;
|
|
47
43
|
description: string;
|
|
48
44
|
active: boolean;
|
|
@@ -50,14 +46,15 @@ interface WorkflowDocument extends Document {
|
|
|
50
46
|
variables?: Record<string, {
|
|
51
47
|
id: string;
|
|
52
48
|
label: string;
|
|
53
|
-
type: "select" | "date_range" | "text" | "number";
|
|
49
|
+
type: "select" | "date_range" | "date_parts" | "text" | "number";
|
|
54
50
|
options?: Array<string>;
|
|
51
|
+
resolveAt?: "creation" | "execution";
|
|
55
52
|
}>;
|
|
56
53
|
}
|
|
57
|
-
declare const
|
|
54
|
+
declare const WorkflowTemplateModel: mongoose.Model<WorkflowTemplateDocument, {}, {}, {}, Document<unknown, {}, WorkflowTemplateDocument, {}> & WorkflowTemplateDocument & Required<{
|
|
58
55
|
_id: unknown;
|
|
59
56
|
}> & {
|
|
60
57
|
__v: number;
|
|
61
58
|
}, any>;
|
|
62
59
|
|
|
63
|
-
export { type
|
|
60
|
+
export { type WorkflowTemplateDocument, WorkflowTemplateModel, WorkflowTemplateObjectSchema };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|