@veruna/api-contracts 1.0.30 → 1.0.32
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 +1 -0
- package/build/rest-api.js +1 -0
- package/build/routes/users.routes.d.ts +1 -0
- package/build/routes/users.routes.js +1 -0
- package/build/v1/auth/auth.errors.js +1 -1
- package/build/v1/chat/commands/create-unreg-chat.command.d.ts +11 -0
- package/build/v1/chat/queries/get-unreg-chat.query.d.ts +11 -0
- package/build/v1/chat/schemas/chat-with-messages-response.schema.d.ts +11 -0
- package/build/v1/message/commands/create-message.command.d.ts +1 -1
- package/build/v1/message/schemas/index.d.ts +1 -0
- package/build/v1/message/schemas/index.js +5 -1
- package/build/v1/message/schemas/message-meta.schema.d.ts +36 -0
- package/build/v1/message/schemas/message-meta.schema.js +29 -0
- package/build/v1/message/schemas/message-response.schema.d.ts +11 -0
- package/build/v1/message/schemas/message-response.schema.js +2 -0
- package/build/v1/message/schemas/stream-events.schema.d.ts +2 -2
- package/build/v1/message/schemas/stream-events.schema.js +1 -1
- package/build/v1/users/queries/get-active-verifications.query.d.ts +22 -0
- package/build/v1/users/queries/get-active-verifications.query.js +16 -0
- package/build/v1/users/queries/index.d.ts +1 -0
- package/build/v1/users/queries/index.js +1 -0
- package/package.json +1 -1
package/build/rest-api.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export declare const REST_API: {
|
|
|
36
36
|
readonly STATUS: "/api/v1/users/me/password/change/status";
|
|
37
37
|
readonly COMPLETE: "/api/v1/users/me/password/change/complete";
|
|
38
38
|
};
|
|
39
|
+
readonly VERIFICATIONS_ACTIVE: "/api/v1/users/me/verifications/active";
|
|
39
40
|
};
|
|
40
41
|
readonly UNREG: {
|
|
41
42
|
readonly AUTHENTICATE: "/api/v1/unreg/";
|
package/build/rest-api.js
CHANGED
|
@@ -43,6 +43,7 @@ exports.REST_API = {
|
|
|
43
43
|
STATUS: `${exports.ROOT}/${controllers_1.USERS_CONTROLLER}/${routes_1.USERS_ROUTES.PASSWORD_CHANGE_STATUS}`,
|
|
44
44
|
COMPLETE: `${exports.ROOT}/${controllers_1.USERS_CONTROLLER}/${routes_1.USERS_ROUTES.PASSWORD_CHANGE_COMPLETE}`,
|
|
45
45
|
},
|
|
46
|
+
VERIFICATIONS_ACTIVE: `${exports.ROOT}/${controllers_1.USERS_CONTROLLER}/${routes_1.USERS_ROUTES.VERIFICATIONS_ACTIVE}`,
|
|
46
47
|
},
|
|
47
48
|
// Unregistered Users
|
|
48
49
|
UNREG: {
|
|
@@ -18,4 +18,5 @@ export declare const USERS_ROUTES: {
|
|
|
18
18
|
readonly PASSWORD_CHANGE_VERIFY: "me/password/change/verify";
|
|
19
19
|
readonly PASSWORD_CHANGE_STATUS: "me/password/change/status";
|
|
20
20
|
readonly PASSWORD_CHANGE_COMPLETE: "me/password/change/complete";
|
|
21
|
+
readonly VERIFICATIONS_ACTIVE: "me/verifications/active";
|
|
21
22
|
};
|
|
@@ -27,7 +27,7 @@ exports.AUTH_ERRORS = {
|
|
|
27
27
|
},
|
|
28
28
|
[AuthErrorCode.USER_NOT_FOUND]: { code: AuthErrorCode.USER_NOT_FOUND, statusCode: 404 },
|
|
29
29
|
[AuthErrorCode.USER_DELETED]: { code: AuthErrorCode.USER_DELETED, statusCode: 401 },
|
|
30
|
-
[AuthErrorCode.SESSION_NOT_FOUND]: { code: AuthErrorCode.SESSION_NOT_FOUND, statusCode:
|
|
30
|
+
[AuthErrorCode.SESSION_NOT_FOUND]: { code: AuthErrorCode.SESSION_NOT_FOUND, statusCode: 401 },
|
|
31
31
|
[AuthErrorCode.SESSION_INACTIVE]: { code: AuthErrorCode.SESSION_INACTIVE, statusCode: 401 },
|
|
32
32
|
[AuthErrorCode.INVALID_TOKEN]: { code: AuthErrorCode.INVALID_TOKEN, statusCode: 401 },
|
|
33
33
|
[AuthErrorCode.PASSWORD_TOO_WEAK]: { code: AuthErrorCode.PASSWORD_TOO_WEAK, statusCode: 400 },
|
|
@@ -21,6 +21,17 @@ export declare namespace CreateUnregChatCommand {
|
|
|
21
21
|
content: z.ZodString;
|
|
22
22
|
aiModelId: z.ZodNullable<z.ZodString>;
|
|
23
23
|
userRating: z.ZodNullable<z.ZodEnum<typeof import("../..").UserRating>>;
|
|
24
|
+
meta: z.ZodNullable<z.ZodObject<{
|
|
25
|
+
reasoning: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
content: z.ZodString;
|
|
27
|
+
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
28
|
+
type: z.ZodString;
|
|
29
|
+
text: z.ZodString;
|
|
30
|
+
format: z.ZodOptional<z.ZodString>;
|
|
31
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
24
35
|
createdAt: z.ZodString;
|
|
25
36
|
updatedAt: z.ZodString;
|
|
26
37
|
}, z.core.$strip>>;
|
|
@@ -21,6 +21,17 @@ export declare namespace GetUnregChatQuery {
|
|
|
21
21
|
content: z.ZodString;
|
|
22
22
|
aiModelId: z.ZodNullable<z.ZodString>;
|
|
23
23
|
userRating: z.ZodNullable<z.ZodEnum<typeof import("../..").UserRating>>;
|
|
24
|
+
meta: z.ZodNullable<z.ZodObject<{
|
|
25
|
+
reasoning: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
content: z.ZodString;
|
|
27
|
+
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
28
|
+
type: z.ZodString;
|
|
29
|
+
text: z.ZodString;
|
|
30
|
+
format: z.ZodOptional<z.ZodString>;
|
|
31
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
24
35
|
createdAt: z.ZodString;
|
|
25
36
|
updatedAt: z.ZodString;
|
|
26
37
|
}, z.core.$strip>>;
|
|
@@ -15,6 +15,17 @@ export declare const ChatWithMessagesResponseSchema: z.ZodObject<{
|
|
|
15
15
|
content: z.ZodString;
|
|
16
16
|
aiModelId: z.ZodNullable<z.ZodString>;
|
|
17
17
|
userRating: z.ZodNullable<z.ZodEnum<typeof import("../..").UserRating>>;
|
|
18
|
+
meta: z.ZodNullable<z.ZodObject<{
|
|
19
|
+
reasoning: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
content: z.ZodString;
|
|
21
|
+
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
22
|
+
type: z.ZodString;
|
|
23
|
+
text: z.ZodString;
|
|
24
|
+
format: z.ZodOptional<z.ZodString>;
|
|
25
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
}, z.core.$strip>>>;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
18
29
|
createdAt: z.ZodString;
|
|
19
30
|
updatedAt: z.ZodString;
|
|
20
31
|
}, z.core.$strip>>;
|
|
@@ -54,7 +54,7 @@ export declare namespace CreateMessageCommand {
|
|
|
54
54
|
reasoning: z.ZodString;
|
|
55
55
|
reasoningDetails: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
56
|
type: z.ZodString;
|
|
57
|
-
|
|
57
|
+
text: z.ZodString;
|
|
58
58
|
format: z.ZodOptional<z.ZodString>;
|
|
59
59
|
index: z.ZodOptional<z.ZodNumber>;
|
|
60
60
|
}, z.core.$strip>>>;
|
|
@@ -5,3 +5,4 @@ export { CreateMessageRequestSchema } from './create-message-request.schema';
|
|
|
5
5
|
export { CreateMessageResponseSchema } from './create-message-response.schema';
|
|
6
6
|
export { MessageResponseSchema } from './message-response.schema';
|
|
7
7
|
export { StreamEventType, StreamEventSchema, StreamChunkEventSchema, StreamReasoningEventSchema, StreamDoneEventSchema, StreamErrorEventSchema, } from './stream-events.schema';
|
|
8
|
+
export { MessageMetaSchema, ReasoningMetaSchema, ReasoningDetailSchema, } from './message-meta.schema';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StreamErrorEventSchema = exports.StreamDoneEventSchema = exports.StreamReasoningEventSchema = exports.StreamChunkEventSchema = exports.StreamEventSchema = exports.StreamEventType = exports.MessageResponseSchema = exports.CreateMessageResponseSchema = exports.CreateMessageRequestSchema = exports.UserRating = exports.MessageStatus = exports.MessageRole = void 0;
|
|
3
|
+
exports.ReasoningDetailSchema = exports.ReasoningMetaSchema = exports.MessageMetaSchema = exports.StreamErrorEventSchema = exports.StreamDoneEventSchema = exports.StreamReasoningEventSchema = exports.StreamChunkEventSchema = exports.StreamEventSchema = exports.StreamEventType = exports.MessageResponseSchema = exports.CreateMessageResponseSchema = exports.CreateMessageRequestSchema = exports.UserRating = exports.MessageStatus = exports.MessageRole = void 0;
|
|
4
4
|
var message_role_enum_1 = require("./message-role.enum");
|
|
5
5
|
Object.defineProperty(exports, "MessageRole", { enumerable: true, get: function () { return message_role_enum_1.MessageRole; } });
|
|
6
6
|
var message_status_enum_1 = require("./message-status.enum");
|
|
@@ -20,3 +20,7 @@ Object.defineProperty(exports, "StreamChunkEventSchema", { enumerable: true, get
|
|
|
20
20
|
Object.defineProperty(exports, "StreamReasoningEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamReasoningEventSchema; } });
|
|
21
21
|
Object.defineProperty(exports, "StreamDoneEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamDoneEventSchema; } });
|
|
22
22
|
Object.defineProperty(exports, "StreamErrorEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamErrorEventSchema; } });
|
|
23
|
+
var message_meta_schema_1 = require("./message-meta.schema");
|
|
24
|
+
Object.defineProperty(exports, "MessageMetaSchema", { enumerable: true, get: function () { return message_meta_schema_1.MessageMetaSchema; } });
|
|
25
|
+
Object.defineProperty(exports, "ReasoningMetaSchema", { enumerable: true, get: function () { return message_meta_schema_1.ReasoningMetaSchema; } });
|
|
26
|
+
Object.defineProperty(exports, "ReasoningDetailSchema", { enumerable: true, get: function () { return message_meta_schema_1.ReasoningDetailSchema; } });
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Reasoning detail from AI model (e.g., Claude extended thinking)
|
|
4
|
+
*/
|
|
5
|
+
export declare const ReasoningDetailSchema: z.ZodObject<{
|
|
6
|
+
type: z.ZodString;
|
|
7
|
+
text: z.ZodString;
|
|
8
|
+
format: z.ZodOptional<z.ZodString>;
|
|
9
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
/**
|
|
12
|
+
* Reasoning metadata - model's thinking process
|
|
13
|
+
*/
|
|
14
|
+
export declare const ReasoningMetaSchema: z.ZodObject<{
|
|
15
|
+
content: z.ZodString;
|
|
16
|
+
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
17
|
+
type: z.ZodString;
|
|
18
|
+
text: z.ZodString;
|
|
19
|
+
format: z.ZodOptional<z.ZodString>;
|
|
20
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
}, z.core.$strip>>>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
/**
|
|
24
|
+
* Message metadata - extensible structure for additional message data
|
|
25
|
+
*/
|
|
26
|
+
export declare const MessageMetaSchema: z.ZodObject<{
|
|
27
|
+
reasoning: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
content: z.ZodString;
|
|
29
|
+
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
30
|
+
type: z.ZodString;
|
|
31
|
+
text: z.ZodString;
|
|
32
|
+
format: z.ZodOptional<z.ZodString>;
|
|
33
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
}, z.core.$strip>>>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessageMetaSchema = exports.ReasoningMetaSchema = exports.ReasoningDetailSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Reasoning detail from AI model (e.g., Claude extended thinking)
|
|
7
|
+
*/
|
|
8
|
+
exports.ReasoningDetailSchema = zod_1.z.object({
|
|
9
|
+
type: zod_1.z.string(),
|
|
10
|
+
text: zod_1.z.string(),
|
|
11
|
+
format: zod_1.z.string().optional(),
|
|
12
|
+
index: zod_1.z.number().int().nonnegative().optional(),
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Reasoning metadata - model's thinking process
|
|
16
|
+
*/
|
|
17
|
+
exports.ReasoningMetaSchema = zod_1.z.object({
|
|
18
|
+
/** Full reasoning text (accumulated from stream chunks) */
|
|
19
|
+
content: zod_1.z.string(),
|
|
20
|
+
/** Structured reasoning details */
|
|
21
|
+
details: zod_1.z.array(exports.ReasoningDetailSchema).optional(),
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* Message metadata - extensible structure for additional message data
|
|
25
|
+
*/
|
|
26
|
+
exports.MessageMetaSchema = zod_1.z.object({
|
|
27
|
+
/** AI model reasoning/thinking (for models that support extended thinking) */
|
|
28
|
+
reasoning: exports.ReasoningMetaSchema.optional(),
|
|
29
|
+
});
|
|
@@ -9,6 +9,17 @@ export declare const MessageResponseSchema: z.ZodObject<{
|
|
|
9
9
|
content: z.ZodString;
|
|
10
10
|
aiModelId: z.ZodNullable<z.ZodString>;
|
|
11
11
|
userRating: z.ZodNullable<z.ZodEnum<typeof UserRating>>;
|
|
12
|
+
meta: z.ZodNullable<z.ZodObject<{
|
|
13
|
+
reasoning: z.ZodOptional<z.ZodObject<{
|
|
14
|
+
content: z.ZodString;
|
|
15
|
+
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
16
|
+
type: z.ZodString;
|
|
17
|
+
text: z.ZodString;
|
|
18
|
+
format: z.ZodOptional<z.ZodString>;
|
|
19
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
}, z.core.$strip>>>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
12
23
|
createdAt: z.ZodString;
|
|
13
24
|
updatedAt: z.ZodString;
|
|
14
25
|
}, z.core.$strip>;
|
|
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const message_role_enum_1 = require("./message-role.enum");
|
|
6
6
|
const message_status_enum_1 = require("./message-status.enum");
|
|
7
7
|
const user_rating_enum_1 = require("./user-rating.enum");
|
|
8
|
+
const message_meta_schema_1 = require("./message-meta.schema");
|
|
8
9
|
exports.MessageResponseSchema = zod_1.z.object({
|
|
9
10
|
uuid: zod_1.z.string().uuid(),
|
|
10
11
|
role: zod_1.z.nativeEnum(message_role_enum_1.MessageRole),
|
|
@@ -12,6 +13,7 @@ exports.MessageResponseSchema = zod_1.z.object({
|
|
|
12
13
|
content: zod_1.z.string(),
|
|
13
14
|
aiModelId: zod_1.z.string().uuid().nullable(),
|
|
14
15
|
userRating: zod_1.z.nativeEnum(user_rating_enum_1.UserRating).nullable(),
|
|
16
|
+
meta: message_meta_schema_1.MessageMetaSchema.nullable(),
|
|
15
17
|
createdAt: zod_1.z.string(),
|
|
16
18
|
updatedAt: zod_1.z.string(),
|
|
17
19
|
});
|
|
@@ -33,7 +33,7 @@ export declare const StreamReasoningEventSchema: z.ZodObject<{
|
|
|
33
33
|
reasoning: z.ZodString;
|
|
34
34
|
reasoningDetails: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
35
|
type: z.ZodString;
|
|
36
|
-
|
|
36
|
+
text: z.ZodString;
|
|
37
37
|
format: z.ZodOptional<z.ZodString>;
|
|
38
38
|
index: z.ZodOptional<z.ZodNumber>;
|
|
39
39
|
}, z.core.$strip>>>;
|
|
@@ -76,7 +76,7 @@ export declare const StreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
76
76
|
reasoning: z.ZodString;
|
|
77
77
|
reasoningDetails: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
78
78
|
type: z.ZodString;
|
|
79
|
-
|
|
79
|
+
text: z.ZodString;
|
|
80
80
|
format: z.ZodOptional<z.ZodString>;
|
|
81
81
|
index: z.ZodOptional<z.ZodNumber>;
|
|
82
82
|
}, z.core.$strip>>>;
|
|
@@ -48,7 +48,7 @@ exports.StreamReasoningEventSchema = BaseStreamEventSchema.extend({
|
|
|
48
48
|
reasoningDetails: zod_1.z
|
|
49
49
|
.array(zod_1.z.object({
|
|
50
50
|
type: zod_1.z.string(),
|
|
51
|
-
|
|
51
|
+
text: zod_1.z.string(),
|
|
52
52
|
format: zod_1.z.string().optional(),
|
|
53
53
|
index: zod_1.z.number().int().nonnegative().optional(),
|
|
54
54
|
}))
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
export declare namespace UserGetActiveVerificationsQuery {
|
|
4
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
verifications: z.ZodArray<z.ZodObject<{
|
|
7
|
+
requestId: z.ZodString;
|
|
8
|
+
type: z.ZodEnum<typeof import("../..").VerificationType>;
|
|
9
|
+
status: z.ZodEnum<typeof import("../..").VerificationRequestStatus>;
|
|
10
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
11
|
+
stepId: z.ZodString;
|
|
12
|
+
channel: z.ZodEnum<typeof import("../..").VerificationChannel>;
|
|
13
|
+
address: z.ZodString;
|
|
14
|
+
status: z.ZodEnum<typeof import("../..").VerificationStepStatus>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
const URL: "/api/v1/users/me/verifications/active";
|
|
19
|
+
const METHOD = HttpMethod.GET;
|
|
20
|
+
type RequestType = z.infer<typeof Request>;
|
|
21
|
+
type ResponseType = z.infer<typeof Response>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserGetActiveVerificationsQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const verification_status_response_schema_1 = require("../../verification/schemas/verification-status-response.schema");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
7
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
+
var UserGetActiveVerificationsQuery;
|
|
9
|
+
(function (UserGetActiveVerificationsQuery) {
|
|
10
|
+
UserGetActiveVerificationsQuery.Request = zod_1.z.object({});
|
|
11
|
+
UserGetActiveVerificationsQuery.Response = zod_1.z.object({
|
|
12
|
+
verifications: zod_1.z.array(verification_status_response_schema_1.VerificationStatusResponseSchema),
|
|
13
|
+
});
|
|
14
|
+
UserGetActiveVerificationsQuery.URL = rest_api_1.REST_API.V1.USERS.VERIFICATIONS_ACTIVE;
|
|
15
|
+
UserGetActiveVerificationsQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
16
|
+
})(UserGetActiveVerificationsQuery || (exports.UserGetActiveVerificationsQuery = UserGetActiveVerificationsQuery = {}));
|
|
@@ -18,3 +18,4 @@ __exportStar(require("./get-current-user.query"), exports);
|
|
|
18
18
|
__exportStar(require("./email-change-status.query"), exports);
|
|
19
19
|
__exportStar(require("./delete-account-status.query"), exports);
|
|
20
20
|
__exportStar(require("./password-change-status.query"), exports);
|
|
21
|
+
__exportStar(require("./get-active-verifications.query"), exports);
|