@veruna/api-contracts 6.26.0 → 6.27.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/build/controllers/index.d.ts +1 -0
- package/build/controllers/index.js +3 -1
- package/build/controllers/index.js.map +1 -1
- package/build/controllers/memory.controllers.d.ts +1 -0
- package/build/controllers/memory.controllers.js +5 -0
- package/build/controllers/memory.controllers.js.map +1 -0
- package/build/locales/validation.d.ts +40 -0
- package/build/locales/validation.js +40 -0
- package/build/locales/validation.js.map +1 -1
- package/build/rest-api.d.ts +6 -0
- package/build/rest-api.js +6 -0
- package/build/rest-api.js.map +1 -1
- package/build/routes/index.d.ts +1 -0
- package/build/routes/index.js +3 -1
- package/build/routes/index.js.map +1 -1
- package/build/routes/memory.routes.d.ts +4 -0
- package/build/routes/memory.routes.js +8 -0
- package/build/routes/memory.routes.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v1/ai/tool-id.enum.d.ts +4 -1
- package/build/v1/ai/tool-id.enum.js +3 -0
- package/build/v1/ai/tool-id.enum.js.map +1 -1
- package/build/v1/index.d.ts +1 -0
- package/build/v1/index.js +1 -0
- package/build/v1/index.js.map +1 -1
- package/build/v1/memory/commands/add-memory-edit.command.d.ts +23 -0
- package/build/v1/memory/commands/add-memory-edit.command.js +14 -0
- package/build/v1/memory/commands/add-memory-edit.command.js.map +1 -0
- package/build/v1/memory/commands/index.d.ts +3 -0
- package/build/v1/memory/commands/index.js +20 -0
- package/build/v1/memory/commands/index.js.map +1 -0
- package/build/v1/memory/commands/remove-memory-edit.command.d.ts +25 -0
- package/build/v1/memory/commands/remove-memory-edit.command.js +16 -0
- package/build/v1/memory/commands/remove-memory-edit.command.js.map +1 -0
- package/build/v1/memory/commands/replace-memory-edit.command.d.ts +27 -0
- package/build/v1/memory/commands/replace-memory-edit.command.js +15 -0
- package/build/v1/memory/commands/replace-memory-edit.command.js.map +1 -0
- package/build/v1/memory/index.d.ts +5 -0
- package/build/v1/memory/index.js +22 -0
- package/build/v1/memory/index.js.map +1 -0
- package/build/v1/memory/memory.constants.d.ts +3 -0
- package/build/v1/memory/memory.constants.js +7 -0
- package/build/v1/memory/memory.constants.js.map +1 -0
- package/build/v1/memory/memory.errors.d.ts +10 -0
- package/build/v1/memory/memory.errors.js +39 -0
- package/build/v1/memory/memory.errors.js.map +1 -0
- package/build/v1/memory/queries/get-user-memory.query.d.ts +21 -0
- package/build/v1/memory/queries/get-user-memory.query.js +15 -0
- package/build/v1/memory/queries/get-user-memory.query.js.map +1 -0
- package/build/v1/memory/queries/index.d.ts +1 -0
- package/build/v1/memory/queries/index.js +18 -0
- package/build/v1/memory/queries/index.js.map +1 -0
- package/build/v1/memory/schemas/add-memory-edit-request.schema.d.ts +5 -0
- package/build/v1/memory/schemas/add-memory-edit-request.schema.js +12 -0
- package/build/v1/memory/schemas/add-memory-edit-request.schema.js.map +1 -0
- package/build/v1/memory/schemas/index.d.ts +7 -0
- package/build/v1/memory/schemas/index.js +24 -0
- package/build/v1/memory/schemas/index.js.map +1 -0
- package/build/v1/memory/schemas/memory-edit-command.enum.d.ts +6 -0
- package/build/v1/memory/schemas/memory-edit-command.enum.js +11 -0
- package/build/v1/memory/schemas/memory-edit-command.enum.js.map +1 -0
- package/build/v1/memory/schemas/memory-edit-params.schema.d.ts +5 -0
- package/build/v1/memory/schemas/memory-edit-params.schema.js +10 -0
- package/build/v1/memory/schemas/memory-edit-params.schema.js.map +1 -0
- package/build/v1/memory/schemas/memory-edit.schema.d.ts +11 -0
- package/build/v1/memory/schemas/memory-edit.schema.js +14 -0
- package/build/v1/memory/schemas/memory-edit.schema.js.map +1 -0
- package/build/v1/memory/schemas/memory-source.enum.d.ts +4 -0
- package/build/v1/memory/schemas/memory-source.enum.js +9 -0
- package/build/v1/memory/schemas/memory-source.enum.js.map +1 -0
- package/build/v1/memory/schemas/replace-memory-edit-request.schema.d.ts +5 -0
- package/build/v1/memory/schemas/replace-memory-edit-request.schema.js +12 -0
- package/build/v1/memory/schemas/replace-memory-edit-request.schema.js.map +1 -0
- package/build/v1/memory/schemas/user-memory-response.schema.d.ts +14 -0
- package/build/v1/memory/schemas/user-memory-response.schema.js +12 -0
- package/build/v1/memory/schemas/user-memory-response.schema.js.map +1 -0
- package/build/v1/message/schemas/generation-step-type.enum.d.ts +4 -1
- package/build/v1/message/schemas/generation-step-type.enum.js +3 -0
- package/build/v1/message/schemas/generation-step-type.enum.js.map +1 -1
- package/build/v1/settings/schemas/user-setting-key.enum.d.ts +2 -1
- package/build/v1/settings/schemas/user-setting-key.enum.js +1 -0
- package/build/v1/settings/schemas/user-setting-key.enum.js.map +1 -1
- package/build/v1/settings/settings.definitions.js +5 -0
- package/build/v1/settings/settings.definitions.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,5 +12,8 @@ export declare enum ToolId {
|
|
|
12
12
|
BASH = "BASH",
|
|
13
13
|
CREATE_FILE = "CREATE_FILE",
|
|
14
14
|
STR_REPLACE = "STR_REPLACE",
|
|
15
|
-
SANDBOX_VIEW = "SANDBOX_VIEW"
|
|
15
|
+
SANDBOX_VIEW = "SANDBOX_VIEW",
|
|
16
|
+
MEMORY = "MEMORY",
|
|
17
|
+
CONVERSATION_SEARCH = "CONVERSATION_SEARCH",
|
|
18
|
+
RECENT_CHATS = "RECENT_CHATS"
|
|
16
19
|
}
|
|
@@ -17,5 +17,8 @@ var ToolId;
|
|
|
17
17
|
ToolId["CREATE_FILE"] = "CREATE_FILE";
|
|
18
18
|
ToolId["STR_REPLACE"] = "STR_REPLACE";
|
|
19
19
|
ToolId["SANDBOX_VIEW"] = "SANDBOX_VIEW";
|
|
20
|
+
ToolId["MEMORY"] = "MEMORY";
|
|
21
|
+
ToolId["CONVERSATION_SEARCH"] = "CONVERSATION_SEARCH";
|
|
22
|
+
ToolId["RECENT_CHATS"] = "RECENT_CHATS";
|
|
20
23
|
})(ToolId || (exports.ToolId = ToolId = {}));
|
|
21
24
|
//# sourceMappingURL=tool-id.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-id.enum.js","sourceRoot":"","sources":["../../../v1/ai/tool-id.enum.ts"],"names":[],"mappings":";;;AAUA,IAAY,
|
|
1
|
+
{"version":3,"file":"tool-id.enum.js","sourceRoot":"","sources":["../../../v1/ai/tool-id.enum.ts"],"names":[],"mappings":";;;AAUA,IAAY,MAuBX;AAvBD,WAAY,MAAM;IAEd,iCAAuB,CAAA;IACvB,mCAAyB,CAAA;IACzB,mCAAyB,CAAA;IACzB,2DAAiD,CAAA;IACjD,mDAAyC,CAAA;IAEzC,yCAA+B,CAAA;IAC/B,6CAAmC,CAAA;IACnC,uCAA6B,CAAA;IAC7B,iCAAuB,CAAA;IACvB,iCAAuB,CAAA;IAEvB,uBAAa,CAAA;IACb,qCAA2B,CAAA;IAC3B,qCAA2B,CAAA;IAC3B,uCAA6B,CAAA;IAE7B,2BAAiB,CAAA;IAEjB,qDAA2C,CAAA;IAC3C,uCAA6B,CAAA;AACjC,CAAC,EAvBW,MAAM,sBAAN,MAAM,QAuBjB"}
|
package/build/v1/index.d.ts
CHANGED
package/build/v1/index.js
CHANGED
|
@@ -66,4 +66,5 @@ __exportStar(require("./plans"), exports);
|
|
|
66
66
|
__exportStar(require("./subscription"), exports);
|
|
67
67
|
__exportStar(require("./payment"), exports);
|
|
68
68
|
__exportStar(require("./promo"), exports);
|
|
69
|
+
__exportStar(require("./memory"), exports);
|
|
69
70
|
//# sourceMappingURL=index.js.map
|
package/build/v1/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB;AACvB,uDAAqC;AACrC,yCAAuB;AACvB,0CAAwB;AACxB,0CAAwB;AACxB,kDAAgC;AAChC,sDAAoC;AACpC,6CAA2B;AAC3B,gDAA8B;AAC9B,+CAA6B;AAC7B,yDAAuC;AACvC,oDAAkC;AAClC,8CAA4B;AAC5B,gDAA8B;AAC9B,6CAA2B;AAC3B,yCAAuB;AACvB,iDAA+B;AAC/B,yCAAuB;AACvB,4CAA0B;AAC1B,uCAAqB;AACrB,iDAA+B;AAC/B,4CAA0B;AAC1B,2CAAyB;AACzB,4CAA0B;AAC1B,8CAA4B;AAC5B,qDAAmC;AACnC,uCAAqB;AACrB,wCAAsB;AACtB,kDAAgC;AAChC,qDAAmC;AACnC,iDAA+B;AAC/B,4CAA0B;AAC1B,+CAA6B;AAC7B,gDAA8B;AAC9B,mDAAiC;AACjC,+CAA6B;AAC7B,gDAA8B;AAC9B,2CAAyB;AACzB,yCAAuB;AACvB,0CAAwB;AACxB,+CAA6B;AAC7B,kDAAgC;AAChC,0CAAwB;AACxB,oDAAkC;AAClC,gDAA8B;AAC9B,kDAAgC;AAChC,8CAA4B;AAC5B,0CAAwB;AACxB,iDAA+B;AAC/B,4CAA0B;AAC1B,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB;AACvB,uDAAqC;AACrC,yCAAuB;AACvB,0CAAwB;AACxB,0CAAwB;AACxB,kDAAgC;AAChC,sDAAoC;AACpC,6CAA2B;AAC3B,gDAA8B;AAC9B,+CAA6B;AAC7B,yDAAuC;AACvC,oDAAkC;AAClC,8CAA4B;AAC5B,gDAA8B;AAC9B,6CAA2B;AAC3B,yCAAuB;AACvB,iDAA+B;AAC/B,yCAAuB;AACvB,4CAA0B;AAC1B,uCAAqB;AACrB,iDAA+B;AAC/B,4CAA0B;AAC1B,2CAAyB;AACzB,4CAA0B;AAC1B,8CAA4B;AAC5B,qDAAmC;AACnC,uCAAqB;AACrB,wCAAsB;AACtB,kDAAgC;AAChC,qDAAmC;AACnC,iDAA+B;AAC/B,4CAA0B;AAC1B,+CAA6B;AAC7B,gDAA8B;AAC9B,mDAAiC;AACjC,+CAA6B;AAC7B,gDAA8B;AAC9B,2CAAyB;AACzB,yCAAuB;AACvB,0CAAwB;AACxB,+CAA6B;AAC7B,kDAAgC;AAChC,0CAAwB;AACxB,oDAAkC;AAClC,gDAA8B;AAC9B,kDAAgC;AAChC,8CAA4B;AAC5B,0CAAwB;AACxB,iDAA+B;AAC/B,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method.enum';
|
|
3
|
+
export declare namespace AddMemoryEditCommand {
|
|
4
|
+
const Request: z.ZodObject<{
|
|
5
|
+
text: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
const Response: z.ZodObject<{
|
|
8
|
+
edits: z.ZodArray<z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
text: z.ZodString;
|
|
11
|
+
source: z.ZodEnum<typeof import("../schemas").MemorySource>;
|
|
12
|
+
position: z.ZodNumber;
|
|
13
|
+
createdAt: z.ZodString;
|
|
14
|
+
updatedAt: z.ZodString;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
count: z.ZodNumber;
|
|
17
|
+
maxEdits: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
const URL: "/api/v1/memory/";
|
|
20
|
+
const METHOD = HttpMethod.POST;
|
|
21
|
+
type RequestType = z.infer<typeof Request>;
|
|
22
|
+
type ResponseType = z.infer<typeof Response>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddMemoryEditCommand = void 0;
|
|
4
|
+
const schemas_1 = require("../schemas");
|
|
5
|
+
const rest_api_1 = require("../../../rest-api");
|
|
6
|
+
const http_method_enum_1 = require("../../../shared/http-method.enum");
|
|
7
|
+
var AddMemoryEditCommand;
|
|
8
|
+
(function (AddMemoryEditCommand) {
|
|
9
|
+
AddMemoryEditCommand.Request = schemas_1.AddMemoryEditRequestSchema;
|
|
10
|
+
AddMemoryEditCommand.Response = schemas_1.UserMemoryResponseSchema;
|
|
11
|
+
AddMemoryEditCommand.URL = rest_api_1.REST_API.V1.MEMORY.REG.ROOT;
|
|
12
|
+
AddMemoryEditCommand.METHOD = http_method_enum_1.HttpMethod.POST;
|
|
13
|
+
})(AddMemoryEditCommand || (exports.AddMemoryEditCommand = AddMemoryEditCommand = {}));
|
|
14
|
+
//# sourceMappingURL=add-memory-edit.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-memory-edit.command.js","sourceRoot":"","sources":["../../../../v1/memory/commands/add-memory-edit.command.ts"],"names":[],"mappings":";;;AACA,wCAAkF;AAClF,gDAA6C;AAC7C,uEAA8D;AAE9D,IAAiB,oBAAoB,CAQpC;AARD,WAAiB,oBAAoB;IACpB,4BAAO,GAAG,oCAA0B,CAAC;IACrC,6BAAQ,GAAG,kCAAwB,CAAC;IACpC,wBAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;IAClC,2BAAM,GAAG,6BAAU,CAAC,IAAI,CAAC;AAI1C,CAAC,EARgB,oBAAoB,oCAApB,oBAAoB,QAQpC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./add-memory-edit.command"), exports);
|
|
18
|
+
__exportStar(require("./replace-memory-edit.command"), exports);
|
|
19
|
+
__exportStar(require("./remove-memory-edit.command"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/memory/commands/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,gEAA8C;AAC9C,+DAA6C"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method.enum';
|
|
3
|
+
export declare namespace RemoveMemoryEditCommand {
|
|
4
|
+
const Params: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
8
|
+
const Response: z.ZodObject<{
|
|
9
|
+
edits: z.ZodArray<z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
text: z.ZodString;
|
|
12
|
+
source: z.ZodEnum<typeof import("../schemas").MemorySource>;
|
|
13
|
+
position: z.ZodNumber;
|
|
14
|
+
createdAt: z.ZodString;
|
|
15
|
+
updatedAt: z.ZodString;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
count: z.ZodNumber;
|
|
18
|
+
maxEdits: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
const URL: "/api/v1/memory/:id";
|
|
21
|
+
const METHOD = HttpMethod.DELETE;
|
|
22
|
+
type ParamsType = z.infer<typeof Params>;
|
|
23
|
+
type RequestType = z.infer<typeof Request>;
|
|
24
|
+
type ResponseType = z.infer<typeof Response>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RemoveMemoryEditCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../schemas");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
7
|
+
const http_method_enum_1 = require("../../../shared/http-method.enum");
|
|
8
|
+
var RemoveMemoryEditCommand;
|
|
9
|
+
(function (RemoveMemoryEditCommand) {
|
|
10
|
+
RemoveMemoryEditCommand.Params = schemas_1.MemoryEditParamsSchema;
|
|
11
|
+
RemoveMemoryEditCommand.Request = zod_1.z.object({});
|
|
12
|
+
RemoveMemoryEditCommand.Response = schemas_1.UserMemoryResponseSchema;
|
|
13
|
+
RemoveMemoryEditCommand.URL = rest_api_1.REST_API.V1.MEMORY.REG.BY_ID;
|
|
14
|
+
RemoveMemoryEditCommand.METHOD = http_method_enum_1.HttpMethod.DELETE;
|
|
15
|
+
})(RemoveMemoryEditCommand || (exports.RemoveMemoryEditCommand = RemoveMemoryEditCommand = {}));
|
|
16
|
+
//# sourceMappingURL=remove-memory-edit.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-memory-edit.command.js","sourceRoot":"","sources":["../../../../v1/memory/commands/remove-memory-edit.command.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAA8E;AAC9E,gDAA6C;AAC7C,uEAA8D;AAE9D,IAAiB,uBAAuB,CAUvC;AAVD,WAAiB,uBAAuB;IACvB,8BAAM,GAAG,gCAAsB,CAAC;IAChC,+BAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,gCAAQ,GAAG,kCAAwB,CAAC;IACpC,2BAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;IACnC,8BAAM,GAAG,6BAAU,CAAC,MAAM,CAAC;AAK5C,CAAC,EAVgB,uBAAuB,uCAAvB,uBAAuB,QAUvC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method.enum';
|
|
3
|
+
export declare namespace ReplaceMemoryEditCommand {
|
|
4
|
+
const Params: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
const Request: z.ZodObject<{
|
|
8
|
+
text: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
const Response: z.ZodObject<{
|
|
11
|
+
edits: z.ZodArray<z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
text: z.ZodString;
|
|
14
|
+
source: z.ZodEnum<typeof import("../schemas").MemorySource>;
|
|
15
|
+
position: z.ZodNumber;
|
|
16
|
+
createdAt: z.ZodString;
|
|
17
|
+
updatedAt: z.ZodString;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
count: z.ZodNumber;
|
|
20
|
+
maxEdits: z.ZodDefault<z.ZodNumber>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
const URL: "/api/v1/memory/:id";
|
|
23
|
+
const METHOD = HttpMethod.PUT;
|
|
24
|
+
type ParamsType = z.infer<typeof Params>;
|
|
25
|
+
type RequestType = z.infer<typeof Request>;
|
|
26
|
+
type ResponseType = z.infer<typeof Response>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReplaceMemoryEditCommand = void 0;
|
|
4
|
+
const schemas_1 = require("../schemas");
|
|
5
|
+
const rest_api_1 = require("../../../rest-api");
|
|
6
|
+
const http_method_enum_1 = require("../../../shared/http-method.enum");
|
|
7
|
+
var ReplaceMemoryEditCommand;
|
|
8
|
+
(function (ReplaceMemoryEditCommand) {
|
|
9
|
+
ReplaceMemoryEditCommand.Params = schemas_1.MemoryEditParamsSchema;
|
|
10
|
+
ReplaceMemoryEditCommand.Request = schemas_1.ReplaceMemoryEditRequestSchema;
|
|
11
|
+
ReplaceMemoryEditCommand.Response = schemas_1.UserMemoryResponseSchema;
|
|
12
|
+
ReplaceMemoryEditCommand.URL = rest_api_1.REST_API.V1.MEMORY.REG.BY_ID;
|
|
13
|
+
ReplaceMemoryEditCommand.METHOD = http_method_enum_1.HttpMethod.PUT;
|
|
14
|
+
})(ReplaceMemoryEditCommand || (exports.ReplaceMemoryEditCommand = ReplaceMemoryEditCommand = {}));
|
|
15
|
+
//# sourceMappingURL=replace-memory-edit.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replace-memory-edit.command.js","sourceRoot":"","sources":["../../../../v1/memory/commands/replace-memory-edit.command.ts"],"names":[],"mappings":";;;AACA,wCAA8G;AAC9G,gDAA6C;AAC7C,uEAA8D;AAE9D,IAAiB,wBAAwB,CAUxC;AAVD,WAAiB,wBAAwB;IACxB,+BAAM,GAAG,gCAAsB,CAAC;IAChC,gCAAO,GAAG,wCAA8B,CAAC;IACzC,iCAAQ,GAAG,kCAAwB,CAAC;IACpC,4BAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;IACnC,+BAAM,GAAG,6BAAU,CAAC,GAAG,CAAC;AAKzC,CAAC,EAVgB,wBAAwB,wCAAxB,wBAAwB,QAUxC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./memory.constants"), exports);
|
|
18
|
+
__exportStar(require("./memory.errors"), exports);
|
|
19
|
+
__exportStar(require("./schemas"), exports);
|
|
20
|
+
__exportStar(require("./commands"), exports);
|
|
21
|
+
__exportStar(require("./queries"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../v1/memory/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,kDAAgC;AAChC,4CAA0B;AAC1B,6CAA2B;AAC3B,4CAA0B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MEMORY_PROFILE_CONTENT_MAX_CHARS = exports.MEMORY_EDIT_MAX_CHARS = exports.MEMORY_MAX_EDITS = void 0;
|
|
4
|
+
exports.MEMORY_MAX_EDITS = 30;
|
|
5
|
+
exports.MEMORY_EDIT_MAX_CHARS = 100000;
|
|
6
|
+
exports.MEMORY_PROFILE_CONTENT_MAX_CHARS = 20000;
|
|
7
|
+
//# sourceMappingURL=memory.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.constants.js","sourceRoot":"","sources":["../../../v1/memory/memory.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,EAAW,CAAC;AAC/B,QAAA,qBAAqB,GAAG,MAAe,CAAC;AACxC,QAAA,gCAAgC,GAAG,KAAc,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ErrorMetadata } from '../../shared';
|
|
2
|
+
export declare enum MemoryErrorCode {
|
|
3
|
+
EDIT_LIMIT_REACHED = "EDIT_LIMIT_REACHED",
|
|
4
|
+
EDIT_TOO_LONG = "EDIT_TOO_LONG",
|
|
5
|
+
EMPTY_TEXT = "EMPTY_TEXT",
|
|
6
|
+
EDIT_NOT_FOUND = "EDIT_NOT_FOUND",
|
|
7
|
+
SECRET_REJECTED = "SECRET_REJECTED",
|
|
8
|
+
PROFILE_TOO_LONG = "PROFILE_TOO_LONG"
|
|
9
|
+
}
|
|
10
|
+
export declare const MEMORY_ERRORS: Record<MemoryErrorCode, ErrorMetadata>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MEMORY_ERRORS = exports.MemoryErrorCode = void 0;
|
|
4
|
+
var MemoryErrorCode;
|
|
5
|
+
(function (MemoryErrorCode) {
|
|
6
|
+
MemoryErrorCode["EDIT_LIMIT_REACHED"] = "EDIT_LIMIT_REACHED";
|
|
7
|
+
MemoryErrorCode["EDIT_TOO_LONG"] = "EDIT_TOO_LONG";
|
|
8
|
+
MemoryErrorCode["EMPTY_TEXT"] = "EMPTY_TEXT";
|
|
9
|
+
MemoryErrorCode["EDIT_NOT_FOUND"] = "EDIT_NOT_FOUND";
|
|
10
|
+
MemoryErrorCode["SECRET_REJECTED"] = "SECRET_REJECTED";
|
|
11
|
+
MemoryErrorCode["PROFILE_TOO_LONG"] = "PROFILE_TOO_LONG";
|
|
12
|
+
})(MemoryErrorCode || (exports.MemoryErrorCode = MemoryErrorCode = {}));
|
|
13
|
+
exports.MEMORY_ERRORS = {
|
|
14
|
+
[MemoryErrorCode.EDIT_LIMIT_REACHED]: {
|
|
15
|
+
code: MemoryErrorCode.EDIT_LIMIT_REACHED,
|
|
16
|
+
statusCode: 409,
|
|
17
|
+
},
|
|
18
|
+
[MemoryErrorCode.EDIT_TOO_LONG]: {
|
|
19
|
+
code: MemoryErrorCode.EDIT_TOO_LONG,
|
|
20
|
+
statusCode: 422,
|
|
21
|
+
},
|
|
22
|
+
[MemoryErrorCode.EMPTY_TEXT]: {
|
|
23
|
+
code: MemoryErrorCode.EMPTY_TEXT,
|
|
24
|
+
statusCode: 422,
|
|
25
|
+
},
|
|
26
|
+
[MemoryErrorCode.EDIT_NOT_FOUND]: {
|
|
27
|
+
code: MemoryErrorCode.EDIT_NOT_FOUND,
|
|
28
|
+
statusCode: 404,
|
|
29
|
+
},
|
|
30
|
+
[MemoryErrorCode.SECRET_REJECTED]: {
|
|
31
|
+
code: MemoryErrorCode.SECRET_REJECTED,
|
|
32
|
+
statusCode: 422,
|
|
33
|
+
},
|
|
34
|
+
[MemoryErrorCode.PROFILE_TOO_LONG]: {
|
|
35
|
+
code: MemoryErrorCode.PROFILE_TOO_LONG,
|
|
36
|
+
statusCode: 422,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=memory.errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.errors.js","sourceRoot":"","sources":["../../../v1/memory/memory.errors.ts"],"names":[],"mappings":";;;AAEA,IAAY,eAOX;AAPD,WAAY,eAAe;IACvB,4DAAyC,CAAA;IACzC,kDAA+B,CAAA;IAC/B,4CAAyB,CAAA;IACzB,oDAAiC,CAAA;IACjC,sDAAmC,CAAA;IACnC,wDAAqC,CAAA;AACzC,CAAC,EAPW,eAAe,+BAAf,eAAe,QAO1B;AAEY,QAAA,aAAa,GAA2C;IACjE,CAAC,eAAe,CAAC,kBAAkB,CAAC,EAAE;QAClC,IAAI,EAAE,eAAe,CAAC,kBAAkB;QACxC,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,eAAe,CAAC,aAAa,CAAC,EAAE;QAC7B,IAAI,EAAE,eAAe,CAAC,aAAa;QACnC,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE;QAC1B,IAAI,EAAE,eAAe,CAAC,UAAU;QAChC,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE;QAC9B,IAAI,EAAE,eAAe,CAAC,cAAc;QACpC,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE;QAC/B,IAAI,EAAE,eAAe,CAAC,eAAe;QACrC,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAAE;QAChC,IAAI,EAAE,eAAe,CAAC,gBAAgB;QACtC,UAAU,EAAE,GAAG;KAClB;CACK,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method.enum';
|
|
3
|
+
export declare namespace GetUserMemoryQuery {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
edits: z.ZodArray<z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
text: z.ZodString;
|
|
9
|
+
source: z.ZodEnum<typeof import("../schemas").MemorySource>;
|
|
10
|
+
position: z.ZodNumber;
|
|
11
|
+
createdAt: z.ZodString;
|
|
12
|
+
updatedAt: z.ZodString;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
count: z.ZodNumber;
|
|
15
|
+
maxEdits: z.ZodDefault<z.ZodNumber>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
const URL: "/api/v1/memory/";
|
|
18
|
+
const METHOD = HttpMethod.GET;
|
|
19
|
+
type RequestType = z.infer<typeof Request>;
|
|
20
|
+
type ResponseType = z.infer<typeof Response>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetUserMemoryQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../schemas");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
7
|
+
const http_method_enum_1 = require("../../../shared/http-method.enum");
|
|
8
|
+
var GetUserMemoryQuery;
|
|
9
|
+
(function (GetUserMemoryQuery) {
|
|
10
|
+
GetUserMemoryQuery.Request = zod_1.z.object({});
|
|
11
|
+
GetUserMemoryQuery.Response = schemas_1.UserMemoryResponseSchema;
|
|
12
|
+
GetUserMemoryQuery.URL = rest_api_1.REST_API.V1.MEMORY.REG.ROOT;
|
|
13
|
+
GetUserMemoryQuery.METHOD = http_method_enum_1.HttpMethod.GET;
|
|
14
|
+
})(GetUserMemoryQuery || (exports.GetUserMemoryQuery = GetUserMemoryQuery = {}));
|
|
15
|
+
//# sourceMappingURL=get-user-memory.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-user-memory.query.js","sourceRoot":"","sources":["../../../../v1/memory/queries/get-user-memory.query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAAsD;AACtD,gDAA6C;AAC7C,uEAA8D;AAE9D,IAAiB,kBAAkB,CAQlC;AARD,WAAiB,kBAAkB;IAClB,0BAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,2BAAQ,GAAG,kCAAwB,CAAC;IACpC,sBAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;IAClC,yBAAM,GAAG,6BAAU,CAAC,GAAG,CAAC;AAIzC,CAAC,EARgB,kBAAkB,kCAAlB,kBAAkB,QAQlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-user-memory.query';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-user-memory.query"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/memory/queries/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddMemoryEditRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const memory_constants_1 = require("../memory.constants");
|
|
6
|
+
exports.AddMemoryEditRequestSchema = zod_1.z.object({
|
|
7
|
+
text: zod_1.z
|
|
8
|
+
.string({ error: 'AddMemoryEditRequest.text.required' })
|
|
9
|
+
.min(1, { message: 'AddMemoryEditRequest.text.min' })
|
|
10
|
+
.max(memory_constants_1.MEMORY_EDIT_MAX_CHARS, { message: 'AddMemoryEditRequest.text.max' }),
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=add-memory-edit-request.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-memory-edit-request.schema.js","sourceRoot":"","sources":["../../../../v1/memory/schemas/add-memory-edit-request.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,0DAA4D;AAE/C,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,OAAC;SACF,MAAM,CAAC,EAAE,KAAK,EAAE,oCAAoC,EAAE,CAAC;SACvD,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAC;SACpD,GAAG,CAAC,wCAAqB,EAAE,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAC;CAChF,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './memory-source.enum';
|
|
2
|
+
export * from './memory-edit-command.enum';
|
|
3
|
+
export * from './memory-edit.schema';
|
|
4
|
+
export * from './user-memory-response.schema';
|
|
5
|
+
export * from './add-memory-edit-request.schema';
|
|
6
|
+
export * from './replace-memory-edit-request.schema';
|
|
7
|
+
export * from './memory-edit-params.schema';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./memory-source.enum"), exports);
|
|
18
|
+
__exportStar(require("./memory-edit-command.enum"), exports);
|
|
19
|
+
__exportStar(require("./memory-edit.schema"), exports);
|
|
20
|
+
__exportStar(require("./user-memory-response.schema"), exports);
|
|
21
|
+
__exportStar(require("./add-memory-edit-request.schema"), exports);
|
|
22
|
+
__exportStar(require("./replace-memory-edit-request.schema"), exports);
|
|
23
|
+
__exportStar(require("./memory-edit-params.schema"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/memory/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,6DAA2C;AAC3C,uDAAqC;AACrC,gEAA8C;AAC9C,mEAAiD;AACjD,uEAAqD;AACrD,8DAA4C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MemoryEditCommand = void 0;
|
|
4
|
+
var MemoryEditCommand;
|
|
5
|
+
(function (MemoryEditCommand) {
|
|
6
|
+
MemoryEditCommand["VIEW"] = "VIEW";
|
|
7
|
+
MemoryEditCommand["ADD"] = "ADD";
|
|
8
|
+
MemoryEditCommand["REMOVE"] = "REMOVE";
|
|
9
|
+
MemoryEditCommand["REPLACE"] = "REPLACE";
|
|
10
|
+
})(MemoryEditCommand || (exports.MemoryEditCommand = MemoryEditCommand = {}));
|
|
11
|
+
//# sourceMappingURL=memory-edit-command.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-edit-command.enum.js","sourceRoot":"","sources":["../../../../v1/memory/schemas/memory-edit-command.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAKX;AALD,WAAY,iBAAiB;IACzB,kCAAa,CAAA;IACb,gCAAW,CAAA;IACX,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;AACvB,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MemoryEditParamsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.MemoryEditParamsSchema = zod_1.z.object({
|
|
6
|
+
id: zod_1.z
|
|
7
|
+
.string({ error: 'MemoryEditParams.id.required' })
|
|
8
|
+
.uuid({ message: 'MemoryEditParams.id.invalid' }),
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=memory-edit-params.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-edit-params.schema.js","sourceRoot":"","sources":["../../../../v1/memory/schemas/memory-edit-params.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,EAAE,EAAE,OAAC;SACA,MAAM,CAAC,EAAE,KAAK,EAAE,8BAA8B,EAAE,CAAC;SACjD,IAAI,CAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;CACxD,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MemorySource } from './memory-source.enum';
|
|
3
|
+
export declare const MemoryEditSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
text: z.ZodString;
|
|
6
|
+
source: z.ZodEnum<typeof MemorySource>;
|
|
7
|
+
position: z.ZodNumber;
|
|
8
|
+
createdAt: z.ZodString;
|
|
9
|
+
updatedAt: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type MemoryEdit = z.infer<typeof MemoryEditSchema>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MemoryEditSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const memory_source_enum_1 = require("./memory-source.enum");
|
|
6
|
+
exports.MemoryEditSchema = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.string().uuid(),
|
|
8
|
+
text: zod_1.z.string(),
|
|
9
|
+
source: zod_1.z.nativeEnum(memory_source_enum_1.MemorySource),
|
|
10
|
+
position: zod_1.z.number().int().min(0),
|
|
11
|
+
createdAt: zod_1.z.string().datetime(),
|
|
12
|
+
updatedAt: zod_1.z.string().datetime(),
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=memory-edit.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-edit.schema.js","sourceRoot":"","sources":["../../../../v1/memory/schemas/memory-edit.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,6DAAoD;AAEvC,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,iCAAY,CAAC;IAClC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MemorySource = void 0;
|
|
4
|
+
var MemorySource;
|
|
5
|
+
(function (MemorySource) {
|
|
6
|
+
MemorySource["USER"] = "USER";
|
|
7
|
+
MemorySource["MODEL"] = "MODEL";
|
|
8
|
+
})(MemorySource || (exports.MemorySource = MemorySource = {}));
|
|
9
|
+
//# sourceMappingURL=memory-source.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-source.enum.js","sourceRoot":"","sources":["../../../../v1/memory/schemas/memory-source.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,6BAAa,CAAA;IACb,+BAAe,CAAA;AACnB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReplaceMemoryEditRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const memory_constants_1 = require("../memory.constants");
|
|
6
|
+
exports.ReplaceMemoryEditRequestSchema = zod_1.z.object({
|
|
7
|
+
text: zod_1.z
|
|
8
|
+
.string({ error: 'ReplaceMemoryEditRequest.text.required' })
|
|
9
|
+
.min(1, { message: 'ReplaceMemoryEditRequest.text.min' })
|
|
10
|
+
.max(memory_constants_1.MEMORY_EDIT_MAX_CHARS, { message: 'ReplaceMemoryEditRequest.text.max' }),
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=replace-memory-edit-request.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replace-memory-edit-request.schema.js","sourceRoot":"","sources":["../../../../v1/memory/schemas/replace-memory-edit-request.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,0DAA4D;AAE/C,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,IAAI,EAAE,OAAC;SACF,MAAM,CAAC,EAAE,KAAK,EAAE,wCAAwC,EAAE,CAAC;SAC3D,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,CAAC;SACxD,GAAG,CAAC,wCAAqB,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,CAAC;CACpF,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const UserMemoryResponseSchema: z.ZodObject<{
|
|
3
|
+
edits: z.ZodArray<z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
text: z.ZodString;
|
|
6
|
+
source: z.ZodEnum<typeof import("./memory-source.enum").MemorySource>;
|
|
7
|
+
position: z.ZodNumber;
|
|
8
|
+
createdAt: z.ZodString;
|
|
9
|
+
updatedAt: z.ZodString;
|
|
10
|
+
}, z.core.$strip>>;
|
|
11
|
+
count: z.ZodNumber;
|
|
12
|
+
maxEdits: z.ZodDefault<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type UserMemoryResponse = z.infer<typeof UserMemoryResponseSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserMemoryResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const memory_edit_schema_1 = require("./memory-edit.schema");
|
|
6
|
+
const memory_constants_1 = require("../memory.constants");
|
|
7
|
+
exports.UserMemoryResponseSchema = zod_1.z.object({
|
|
8
|
+
edits: zod_1.z.array(memory_edit_schema_1.MemoryEditSchema),
|
|
9
|
+
count: zod_1.z.number().int(),
|
|
10
|
+
maxEdits: zod_1.z.number().int().default(memory_constants_1.MEMORY_MAX_EDITS),
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=user-memory-response.schema.js.map
|