@veruna/api-contracts 22.0.0 → 22.2.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/tsconfig.tsbuildinfo +1 -1
- package/build/v1/blog/schemas/blog-modal-block.schema.d.ts +16 -0
- package/build/v1/blog/schemas/blog-modal-block.schema.js +22 -0
- package/build/v1/blog/schemas/blog-modal-block.schema.js.map +1 -0
- package/build/v1/blog/schemas/index.d.ts +1 -0
- package/build/v1/blog/schemas/index.js +1 -0
- package/build/v1/blog/schemas/index.js.map +1 -1
- package/build/v1/memory/memory.constants.d.ts +2 -1
- package/build/v1/memory/memory.constants.js +2 -1
- package/build/v1/memory/memory.constants.js.map +1 -1
- package/build/v1/memory/memory.errors.d.ts +6 -1
- package/build/v1/memory/memory.errors.js +13 -0
- package/build/v1/memory/memory.errors.js.map +1 -1
- package/build-esm/.tsbuildinfo +1 -1
- package/build-esm/v1/blog/schemas/blog-modal-block.schema.js +19 -0
- package/build-esm/v1/blog/schemas/blog-modal-block.schema.js.map +1 -0
- package/build-esm/v1/blog/schemas/index.js +1 -0
- package/build-esm/v1/blog/schemas/index.js.map +1 -1
- package/build-esm/v1/memory/memory.constants.js +2 -1
- package/build-esm/v1/memory/memory.constants.js.map +1 -1
- package/build-esm/v1/memory/memory.errors.js +13 -0
- package/build-esm/v1/memory/memory.errors.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* JSON payload of a fenced `blog-modal` block in a post's Markdown content.
|
|
4
|
+
* This opt-in content contract does not change the post HTTP schemas.
|
|
5
|
+
* pageAlias is an internal page slug, never a URL or path.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BlogModalBlockSchema: z.ZodObject<{
|
|
8
|
+
enabled: z.ZodBoolean;
|
|
9
|
+
minReadingSeconds: z.ZodDefault<z.ZodNumber>;
|
|
10
|
+
title: z.ZodString;
|
|
11
|
+
description: z.ZodString;
|
|
12
|
+
cta: z.ZodString;
|
|
13
|
+
pageAlias: z.ZodString;
|
|
14
|
+
prompt: z.ZodString;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
export type BlogModalBlock = z.infer<typeof BlogModalBlockSchema>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BlogModalBlockSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const regex_1 = require("../../../shared/regex");
|
|
6
|
+
/**
|
|
7
|
+
* JSON payload of a fenced `blog-modal` block in a post's Markdown content.
|
|
8
|
+
* This opt-in content contract does not change the post HTTP schemas.
|
|
9
|
+
* pageAlias is an internal page slug, never a URL or path.
|
|
10
|
+
*/
|
|
11
|
+
exports.BlogModalBlockSchema = zod_1.z
|
|
12
|
+
.object({
|
|
13
|
+
enabled: zod_1.z.boolean(),
|
|
14
|
+
minReadingSeconds: zod_1.z.number().int().min(1).max(3600).default(30),
|
|
15
|
+
title: zod_1.z.string().trim().min(1).max(120),
|
|
16
|
+
description: zod_1.z.string().trim().min(1).max(320),
|
|
17
|
+
cta: zod_1.z.string().trim().min(1).max(60),
|
|
18
|
+
pageAlias: zod_1.z.string().min(1).max(128).regex(regex_1.SLUG_REGEX),
|
|
19
|
+
prompt: zod_1.z.string().trim().min(1).max(500),
|
|
20
|
+
})
|
|
21
|
+
.strict();
|
|
22
|
+
//# sourceMappingURL=blog-modal-block.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-modal-block.schema.js","sourceRoot":"","sources":["../../../../v1/blog/schemas/blog-modal-block.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iDAAmD;AAEnD;;;;GAIG;AACU,QAAA,oBAAoB,GAAG,OAAC;KAChC,MAAM,CAAC;IACJ,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;IACpB,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAChE,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACxC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAC9C,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACrC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,kBAAU,CAAC;IACvD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CAC5C,CAAC;KACD,MAAM,EAAE,CAAC"}
|
|
@@ -27,4 +27,5 @@ __exportStar(require("./create-post-request.schema"), exports);
|
|
|
27
27
|
__exportStar(require("./update-post-request.schema"), exports);
|
|
28
28
|
__exportStar(require("./get-posts-query.schema"), exports);
|
|
29
29
|
__exportStar(require("./route-params.schema"), exports);
|
|
30
|
+
__exportStar(require("./blog-modal-block.schema"), exports);
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/blog/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,0DAAwC;AACxC,wDAAsC;AACtC,yDAAuC;AACvC,6DAA2C;AAC3C,mEAAiD;AACjD,mEAAiD;AACjD,yDAAuC;AACvC,gEAA8C;AAC9C,+DAA6C;AAC7C,+DAA6C;AAC7C,2DAAyC;AACzC,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/blog/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,0DAAwC;AACxC,wDAAsC;AACtC,yDAAuC;AACvC,6DAA2C;AAC3C,mEAAiD;AACjD,mEAAiD;AACjD,yDAAuC;AACvC,gEAA8C;AAC9C,+DAA6C;AAC7C,+DAA6C;AAC7C,2DAAyC;AACzC,wDAAsC;AACtC,4DAA0C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const MEMORY_MAX_EDITS: 30;
|
|
2
|
-
export declare const MEMORY_EDIT_MAX_CHARS:
|
|
2
|
+
export declare const MEMORY_EDIT_MAX_CHARS: 400;
|
|
3
|
+
/** @deprecated The hidden memory profile is gone; kept so that clients importing it still build. */
|
|
3
4
|
export declare const MEMORY_PROFILE_CONTENT_MAX_CHARS: 20000;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MEMORY_PROFILE_CONTENT_MAX_CHARS = exports.MEMORY_EDIT_MAX_CHARS = exports.MEMORY_MAX_EDITS = void 0;
|
|
4
4
|
exports.MEMORY_MAX_EDITS = 30;
|
|
5
|
-
exports.MEMORY_EDIT_MAX_CHARS =
|
|
5
|
+
exports.MEMORY_EDIT_MAX_CHARS = 400;
|
|
6
|
+
/** @deprecated The hidden memory profile is gone; kept so that clients importing it still build. */
|
|
6
7
|
exports.MEMORY_PROFILE_CONTENT_MAX_CHARS = 20000;
|
|
7
8
|
//# sourceMappingURL=memory.constants.js.map
|
|
@@ -1 +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,
|
|
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,GAAY,CAAC;AAClD,oGAAoG;AACvF,QAAA,gCAAgC,GAAG,KAAc,CAAC"}
|
|
@@ -5,8 +5,13 @@ export declare enum MemoryErrorCode {
|
|
|
5
5
|
EMPTY_TEXT = "EMPTY_TEXT",
|
|
6
6
|
EDIT_NOT_FOUND = "EDIT_NOT_FOUND",
|
|
7
7
|
SECRET_REJECTED = "SECRET_REJECTED",
|
|
8
|
+
/** @deprecated The hidden memory profile is gone; kept because the front still maps the code. */
|
|
8
9
|
PROFILE_TOO_LONG = "PROFILE_TOO_LONG",
|
|
9
10
|
/** User's plan does not grant memory — REST is gated like the memory tool. */
|
|
10
|
-
MEMORY_ACCESS_DENIED = "MEMORY_ACCESS_DENIED"
|
|
11
|
+
MEMORY_ACCESS_DENIED = "MEMORY_ACCESS_DENIED",
|
|
12
|
+
/** The extractor tried to change an existing item: it only adds. */
|
|
13
|
+
EDIT_READ_ONLY = "EDIT_READ_ONLY",
|
|
14
|
+
/** One extractor run sent more notes than a run may add. */
|
|
15
|
+
TOO_MANY_OPERATIONS = "TOO_MANY_OPERATIONS"
|
|
11
16
|
}
|
|
12
17
|
export declare const MEMORY_ERRORS: Record<MemoryErrorCode, ErrorMetadata>;
|
|
@@ -8,9 +8,14 @@ var MemoryErrorCode;
|
|
|
8
8
|
MemoryErrorCode["EMPTY_TEXT"] = "EMPTY_TEXT";
|
|
9
9
|
MemoryErrorCode["EDIT_NOT_FOUND"] = "EDIT_NOT_FOUND";
|
|
10
10
|
MemoryErrorCode["SECRET_REJECTED"] = "SECRET_REJECTED";
|
|
11
|
+
/** @deprecated The hidden memory profile is gone; kept because the front still maps the code. */
|
|
11
12
|
MemoryErrorCode["PROFILE_TOO_LONG"] = "PROFILE_TOO_LONG";
|
|
12
13
|
/** User's plan does not grant memory — REST is gated like the memory tool. */
|
|
13
14
|
MemoryErrorCode["MEMORY_ACCESS_DENIED"] = "MEMORY_ACCESS_DENIED";
|
|
15
|
+
/** The extractor tried to change an existing item: it only adds. */
|
|
16
|
+
MemoryErrorCode["EDIT_READ_ONLY"] = "EDIT_READ_ONLY";
|
|
17
|
+
/** One extractor run sent more notes than a run may add. */
|
|
18
|
+
MemoryErrorCode["TOO_MANY_OPERATIONS"] = "TOO_MANY_OPERATIONS";
|
|
14
19
|
})(MemoryErrorCode || (exports.MemoryErrorCode = MemoryErrorCode = {}));
|
|
15
20
|
exports.MEMORY_ERRORS = {
|
|
16
21
|
[MemoryErrorCode.EDIT_LIMIT_REACHED]: {
|
|
@@ -41,5 +46,13 @@ exports.MEMORY_ERRORS = {
|
|
|
41
46
|
code: MemoryErrorCode.MEMORY_ACCESS_DENIED,
|
|
42
47
|
statusCode: 403,
|
|
43
48
|
},
|
|
49
|
+
[MemoryErrorCode.EDIT_READ_ONLY]: {
|
|
50
|
+
code: MemoryErrorCode.EDIT_READ_ONLY,
|
|
51
|
+
statusCode: 403,
|
|
52
|
+
},
|
|
53
|
+
[MemoryErrorCode.TOO_MANY_OPERATIONS]: {
|
|
54
|
+
code: MemoryErrorCode.TOO_MANY_OPERATIONS,
|
|
55
|
+
statusCode: 422,
|
|
56
|
+
},
|
|
44
57
|
};
|
|
45
58
|
//# sourceMappingURL=memory.errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.errors.js","sourceRoot":"","sources":["../../../v1/memory/memory.errors.ts"],"names":[],"mappings":";;;AAEA,IAAY,
|
|
1
|
+
{"version":3,"file":"memory.errors.js","sourceRoot":"","sources":["../../../v1/memory/memory.errors.ts"],"names":[],"mappings":";;;AAEA,IAAY,eAcX;AAdD,WAAY,eAA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