@veruna/api-contracts 1.1.2 → 1.1.3
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/rest-api.d.ts +2 -0
- package/build/rest-api.js +2 -0
- package/build/rest-api.js.map +1 -1
- package/build/routes/message.routes.d.ts +2 -0
- package/build/routes/message.routes.js +2 -0
- package/build/routes/message.routes.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v1/message/index.d.ts +1 -0
- package/build/v1/message/index.js +1 -0
- package/build/v1/message/index.js.map +1 -1
- package/build/v1/message/queries/get-message-stream-reg.query.d.ts +92 -0
- package/build/v1/message/queries/get-message-stream-reg.query.js +17 -0
- package/build/v1/message/queries/get-message-stream-reg.query.js.map +1 -0
- package/build/v1/message/queries/get-message-stream-unreg.query.d.ts +92 -0
- package/build/v1/message/queries/get-message-stream-unreg.query.js +17 -0
- package/build/v1/message/queries/get-message-stream-unreg.query.js.map +1 -0
- package/build/v1/message/queries/index.d.ts +2 -0
- package/build/v1/message/queries/index.js +8 -0
- package/build/v1/message/queries/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -16,5 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./schemas"), exports);
|
|
18
18
|
__exportStar(require("./commands"), exports);
|
|
19
|
+
__exportStar(require("./queries"), exports);
|
|
19
20
|
__exportStar(require("./message.errors"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../v1/message/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,6CAA2B;AAC3B,mDAAiC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../v1/message/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,6CAA2B;AAC3B,4CAA0B;AAC1B,mDAAiC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace GetMessageStreamRegQuery {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
id: z.ZodNumber;
|
|
7
|
+
chatId: z.ZodString;
|
|
8
|
+
messageId: z.ZodString;
|
|
9
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_START>;
|
|
10
|
+
stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
|
|
11
|
+
stepId: z.ZodString;
|
|
12
|
+
stepIndex: z.ZodNumber;
|
|
13
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
id: z.ZodNumber;
|
|
16
|
+
chatId: z.ZodString;
|
|
17
|
+
messageId: z.ZodString;
|
|
18
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_CHUNK>;
|
|
19
|
+
stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
|
|
20
|
+
stepId: z.ZodString;
|
|
21
|
+
chunk: z.ZodString;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
+
id: z.ZodNumber;
|
|
24
|
+
chatId: z.ZodString;
|
|
25
|
+
messageId: z.ZodString;
|
|
26
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_ERROR>;
|
|
27
|
+
stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
|
|
28
|
+
stepId: z.ZodString;
|
|
29
|
+
stepIndex: z.ZodNumber;
|
|
30
|
+
errorCode: z.ZodString;
|
|
31
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
33
|
+
id: z.ZodNumber;
|
|
34
|
+
chatId: z.ZodString;
|
|
35
|
+
messageId: z.ZodString;
|
|
36
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_DONE>;
|
|
37
|
+
stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
|
|
38
|
+
stepId: z.ZodString;
|
|
39
|
+
stepIndex: z.ZodNumber;
|
|
40
|
+
fullContent: z.ZodOptional<z.ZodString>;
|
|
41
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
42
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
+
id: z.ZodNumber;
|
|
44
|
+
chatId: z.ZodString;
|
|
45
|
+
messageId: z.ZodString;
|
|
46
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.IMAGE>;
|
|
47
|
+
imageBase64: z.ZodString;
|
|
48
|
+
imageMimeType: z.ZodString;
|
|
49
|
+
imageIndex: z.ZodNumber;
|
|
50
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
+
id: z.ZodNumber;
|
|
52
|
+
chatId: z.ZodString;
|
|
53
|
+
messageId: z.ZodString;
|
|
54
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.IMAGE_GENERATION_ERROR>;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
id: z.ZodNumber;
|
|
57
|
+
chatId: z.ZodString;
|
|
58
|
+
messageId: z.ZodString;
|
|
59
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.CITATIONS>;
|
|
60
|
+
citations: z.ZodArray<z.ZodObject<{
|
|
61
|
+
url: z.ZodString;
|
|
62
|
+
title: z.ZodString;
|
|
63
|
+
content: z.ZodOptional<z.ZodString>;
|
|
64
|
+
startIndex: z.ZodNumber;
|
|
65
|
+
endIndex: z.ZodNumber;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
68
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.HEARTBEAT>;
|
|
69
|
+
timestamp: z.ZodString;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
id: z.ZodNumber;
|
|
72
|
+
chatId: z.ZodString;
|
|
73
|
+
messageId: z.ZodString;
|
|
74
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.DONE>;
|
|
75
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
+
id: z.ZodNumber;
|
|
77
|
+
chatId: z.ZodString;
|
|
78
|
+
messageId: z.ZodString;
|
|
79
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.CANCELLED>;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
id: z.ZodNumber;
|
|
82
|
+
chatId: z.ZodString;
|
|
83
|
+
messageId: z.ZodString;
|
|
84
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.ERROR>;
|
|
85
|
+
}, z.core.$strip>], "type">;
|
|
86
|
+
const URL: (pageId: string, chatId: string, messageId: string) => string;
|
|
87
|
+
const METHOD = HttpMethod.GET;
|
|
88
|
+
const CONTENT_TYPE: "application/x-ndjson";
|
|
89
|
+
const IS_STREAM: true;
|
|
90
|
+
type RequestType = z.infer<typeof Request>;
|
|
91
|
+
type ResponseType = z.infer<typeof Response>;
|
|
92
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMessageStreamRegQuery = 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_1 = require("../../../shared/http-method");
|
|
8
|
+
var GetMessageStreamRegQuery;
|
|
9
|
+
(function (GetMessageStreamRegQuery) {
|
|
10
|
+
GetMessageStreamRegQuery.Request = zod_1.z.object({});
|
|
11
|
+
GetMessageStreamRegQuery.Response = schemas_1.StreamEventSchema;
|
|
12
|
+
GetMessageStreamRegQuery.URL = (pageId, chatId, messageId) => rest_api_1.REST_API.V1.MESSAGE.REG.STREAM(pageId, chatId, messageId);
|
|
13
|
+
GetMessageStreamRegQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
14
|
+
GetMessageStreamRegQuery.CONTENT_TYPE = 'application/x-ndjson';
|
|
15
|
+
GetMessageStreamRegQuery.IS_STREAM = true;
|
|
16
|
+
})(GetMessageStreamRegQuery || (exports.GetMessageStreamRegQuery = GetMessageStreamRegQuery = {}));
|
|
17
|
+
//# sourceMappingURL=get-message-stream-reg.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-message-stream-reg.query.js","sourceRoot":"","sources":["../../../../v1/message/queries/get-message-stream-reg.query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAA+C;AAC/C,gDAA6C;AAC7C,6DAAyD;AAMzD,IAAiB,wBAAwB,CAYxC;AAZD,WAAiB,wBAAwB;IACxB,gCAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,iCAAQ,GAAG,2BAAiB,CAAC;IAE7B,4BAAG,GAAG,CAAC,MAAc,EAAE,MAAc,EAAE,SAAiB,EAAE,EAAE,CACrE,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACjD,+BAAM,GAAG,wBAAU,CAAC,GAAG,CAAC;IACxB,qCAAY,GAAG,sBAA+B,CAAC;IAC/C,kCAAS,GAAG,IAAa,CAAC;AAI3C,CAAC,EAZgB,wBAAwB,wCAAxB,wBAAwB,QAYxC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace GetMessageStreamUnregQuery {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
+
id: z.ZodNumber;
|
|
7
|
+
chatId: z.ZodString;
|
|
8
|
+
messageId: z.ZodString;
|
|
9
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_START>;
|
|
10
|
+
stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
|
|
11
|
+
stepId: z.ZodString;
|
|
12
|
+
stepIndex: z.ZodNumber;
|
|
13
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
id: z.ZodNumber;
|
|
16
|
+
chatId: z.ZodString;
|
|
17
|
+
messageId: z.ZodString;
|
|
18
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_CHUNK>;
|
|
19
|
+
stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
|
|
20
|
+
stepId: z.ZodString;
|
|
21
|
+
chunk: z.ZodString;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
+
id: z.ZodNumber;
|
|
24
|
+
chatId: z.ZodString;
|
|
25
|
+
messageId: z.ZodString;
|
|
26
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_ERROR>;
|
|
27
|
+
stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
|
|
28
|
+
stepId: z.ZodString;
|
|
29
|
+
stepIndex: z.ZodNumber;
|
|
30
|
+
errorCode: z.ZodString;
|
|
31
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
33
|
+
id: z.ZodNumber;
|
|
34
|
+
chatId: z.ZodString;
|
|
35
|
+
messageId: z.ZodString;
|
|
36
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_DONE>;
|
|
37
|
+
stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
|
|
38
|
+
stepId: z.ZodString;
|
|
39
|
+
stepIndex: z.ZodNumber;
|
|
40
|
+
fullContent: z.ZodOptional<z.ZodString>;
|
|
41
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
42
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
+
id: z.ZodNumber;
|
|
44
|
+
chatId: z.ZodString;
|
|
45
|
+
messageId: z.ZodString;
|
|
46
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.IMAGE>;
|
|
47
|
+
imageBase64: z.ZodString;
|
|
48
|
+
imageMimeType: z.ZodString;
|
|
49
|
+
imageIndex: z.ZodNumber;
|
|
50
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
+
id: z.ZodNumber;
|
|
52
|
+
chatId: z.ZodString;
|
|
53
|
+
messageId: z.ZodString;
|
|
54
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.IMAGE_GENERATION_ERROR>;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
id: z.ZodNumber;
|
|
57
|
+
chatId: z.ZodString;
|
|
58
|
+
messageId: z.ZodString;
|
|
59
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.CITATIONS>;
|
|
60
|
+
citations: z.ZodArray<z.ZodObject<{
|
|
61
|
+
url: z.ZodString;
|
|
62
|
+
title: z.ZodString;
|
|
63
|
+
content: z.ZodOptional<z.ZodString>;
|
|
64
|
+
startIndex: z.ZodNumber;
|
|
65
|
+
endIndex: z.ZodNumber;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
68
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.HEARTBEAT>;
|
|
69
|
+
timestamp: z.ZodString;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
id: z.ZodNumber;
|
|
72
|
+
chatId: z.ZodString;
|
|
73
|
+
messageId: z.ZodString;
|
|
74
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.DONE>;
|
|
75
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
+
id: z.ZodNumber;
|
|
77
|
+
chatId: z.ZodString;
|
|
78
|
+
messageId: z.ZodString;
|
|
79
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.CANCELLED>;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
id: z.ZodNumber;
|
|
82
|
+
chatId: z.ZodString;
|
|
83
|
+
messageId: z.ZodString;
|
|
84
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.ERROR>;
|
|
85
|
+
}, z.core.$strip>], "type">;
|
|
86
|
+
const URL: (pageId: string, chatId: string, messageId: string) => string;
|
|
87
|
+
const METHOD = HttpMethod.GET;
|
|
88
|
+
const CONTENT_TYPE: "application/x-ndjson";
|
|
89
|
+
const IS_STREAM: true;
|
|
90
|
+
type RequestType = z.infer<typeof Request>;
|
|
91
|
+
type ResponseType = z.infer<typeof Response>;
|
|
92
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMessageStreamUnregQuery = 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_1 = require("../../../shared/http-method");
|
|
8
|
+
var GetMessageStreamUnregQuery;
|
|
9
|
+
(function (GetMessageStreamUnregQuery) {
|
|
10
|
+
GetMessageStreamUnregQuery.Request = zod_1.z.object({});
|
|
11
|
+
GetMessageStreamUnregQuery.Response = schemas_1.StreamEventSchema;
|
|
12
|
+
GetMessageStreamUnregQuery.URL = (pageId, chatId, messageId) => rest_api_1.REST_API.V1.MESSAGE.UNREG.STREAM(pageId, chatId, messageId);
|
|
13
|
+
GetMessageStreamUnregQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
14
|
+
GetMessageStreamUnregQuery.CONTENT_TYPE = 'application/x-ndjson';
|
|
15
|
+
GetMessageStreamUnregQuery.IS_STREAM = true;
|
|
16
|
+
})(GetMessageStreamUnregQuery || (exports.GetMessageStreamUnregQuery = GetMessageStreamUnregQuery = {}));
|
|
17
|
+
//# sourceMappingURL=get-message-stream-unreg.query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-message-stream-unreg.query.js","sourceRoot":"","sources":["../../../../v1/message/queries/get-message-stream-unreg.query.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wCAA+C;AAC/C,gDAA6C;AAC7C,6DAAyD;AAMzD,IAAiB,0BAA0B,CAY1C;AAZD,WAAiB,0BAA0B;IAC1B,kCAAO,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvB,mCAAQ,GAAG,2BAAiB,CAAC;IAE7B,8BAAG,GAAG,CAAC,MAAc,EAAE,MAAc,EAAE,SAAiB,EAAE,EAAE,CACrE,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IACnD,iCAAM,GAAG,wBAAU,CAAC,GAAG,CAAC;IACxB,uCAAY,GAAG,sBAA+B,CAAC;IAC/C,oCAAS,GAAG,IAAa,CAAC;AAI3C,CAAC,EAZgB,0BAA0B,0CAA1B,0BAA0B,QAY1C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMessageStreamUnregQuery = exports.GetMessageStreamRegQuery = void 0;
|
|
4
|
+
var get_message_stream_reg_query_1 = require("./get-message-stream-reg.query");
|
|
5
|
+
Object.defineProperty(exports, "GetMessageStreamRegQuery", { enumerable: true, get: function () { return get_message_stream_reg_query_1.GetMessageStreamRegQuery; } });
|
|
6
|
+
var get_message_stream_unreg_query_1 = require("./get-message-stream-unreg.query");
|
|
7
|
+
Object.defineProperty(exports, "GetMessageStreamUnregQuery", { enumerable: true, get: function () { return get_message_stream_unreg_query_1.GetMessageStreamUnregQuery; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/message/queries/index.ts"],"names":[],"mappings":";;;AAAA,+EAA0E;AAAjE,wIAAA,wBAAwB,OAAA;AACjC,mFAA8E;AAArE,4IAAA,0BAA0B,OAAA"}
|