@veruna/api-contracts 1.0.31 → 1.0.33

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.
@@ -135,6 +135,8 @@ export declare const REST_API: {
135
135
  };
136
136
  readonly VERIFICATION: {
137
137
  readonly RESEND: "/api/v1/verification/resend";
138
+ readonly ACTIVE: "/api/v1/verification/active";
139
+ readonly CANCEL: (requestId: string) => string;
138
140
  };
139
141
  };
140
142
  };
package/build/rest-api.js CHANGED
@@ -152,6 +152,8 @@ exports.REST_API = {
152
152
  },
153
153
  VERIFICATION: {
154
154
  RESEND: `${exports.ROOT}/${controllers_1.VERIFICATION_CONTROLLER}/${routes_1.VERIFICATION_ROUTES.RESEND}`,
155
+ ACTIVE: `${exports.ROOT}/${controllers_1.VERIFICATION_CONTROLLER}/${routes_1.VERIFICATION_ROUTES.ACTIVE}`,
156
+ CANCEL: (requestId) => `${exports.ROOT}/${controllers_1.VERIFICATION_CONTROLLER}/${requestId}/cancel`,
155
157
  },
156
158
  },
157
159
  };
@@ -4,4 +4,6 @@
4
4
  */
5
5
  export declare const VERIFICATION_ROUTES: {
6
6
  readonly RESEND: "resend";
7
+ readonly ACTIVE: "active";
8
+ readonly CANCEL: ":requestId/cancel";
7
9
  };
@@ -7,4 +7,6 @@ exports.VERIFICATION_ROUTES = void 0;
7
7
  */
8
8
  exports.VERIFICATION_ROUTES = {
9
9
  RESEND: 'resend',
10
+ ACTIVE: 'active',
11
+ CANCEL: ':requestId/cancel',
10
12
  };
@@ -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: 404 },
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 },
@@ -26,7 +26,7 @@ export declare namespace CreateUnregChatCommand {
26
26
  content: z.ZodString;
27
27
  details: z.ZodOptional<z.ZodArray<z.ZodObject<{
28
28
  type: z.ZodString;
29
- summary: z.ZodString;
29
+ text: z.ZodString;
30
30
  format: z.ZodOptional<z.ZodString>;
31
31
  index: z.ZodOptional<z.ZodNumber>;
32
32
  }, z.core.$strip>>>;
@@ -26,7 +26,7 @@ export declare namespace GetUnregChatQuery {
26
26
  content: z.ZodString;
27
27
  details: z.ZodOptional<z.ZodArray<z.ZodObject<{
28
28
  type: z.ZodString;
29
- summary: z.ZodString;
29
+ text: z.ZodString;
30
30
  format: z.ZodOptional<z.ZodString>;
31
31
  index: z.ZodOptional<z.ZodNumber>;
32
32
  }, z.core.$strip>>>;
@@ -20,7 +20,7 @@ export declare const ChatWithMessagesResponseSchema: z.ZodObject<{
20
20
  content: z.ZodString;
21
21
  details: z.ZodOptional<z.ZodArray<z.ZodObject<{
22
22
  type: z.ZodString;
23
- summary: z.ZodString;
23
+ text: z.ZodString;
24
24
  format: z.ZodOptional<z.ZodString>;
25
25
  index: z.ZodOptional<z.ZodNumber>;
26
26
  }, 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
- summary: z.ZodString;
57
+ text: z.ZodString;
58
58
  format: z.ZodOptional<z.ZodString>;
59
59
  index: z.ZodOptional<z.ZodNumber>;
60
60
  }, z.core.$strip>>>;
@@ -4,7 +4,7 @@ import { z } from 'zod';
4
4
  */
5
5
  export declare const ReasoningDetailSchema: z.ZodObject<{
6
6
  type: z.ZodString;
7
- summary: z.ZodString;
7
+ text: z.ZodString;
8
8
  format: z.ZodOptional<z.ZodString>;
9
9
  index: z.ZodOptional<z.ZodNumber>;
10
10
  }, z.core.$strip>;
@@ -15,7 +15,7 @@ export declare const ReasoningMetaSchema: z.ZodObject<{
15
15
  content: z.ZodString;
16
16
  details: z.ZodOptional<z.ZodArray<z.ZodObject<{
17
17
  type: z.ZodString;
18
- summary: z.ZodString;
18
+ text: z.ZodString;
19
19
  format: z.ZodOptional<z.ZodString>;
20
20
  index: z.ZodOptional<z.ZodNumber>;
21
21
  }, z.core.$strip>>>;
@@ -28,7 +28,7 @@ export declare const MessageMetaSchema: z.ZodObject<{
28
28
  content: z.ZodString;
29
29
  details: z.ZodOptional<z.ZodArray<z.ZodObject<{
30
30
  type: z.ZodString;
31
- summary: z.ZodString;
31
+ text: z.ZodString;
32
32
  format: z.ZodOptional<z.ZodString>;
33
33
  index: z.ZodOptional<z.ZodNumber>;
34
34
  }, z.core.$strip>>>;
@@ -7,7 +7,7 @@ const zod_1 = require("zod");
7
7
  */
8
8
  exports.ReasoningDetailSchema = zod_1.z.object({
9
9
  type: zod_1.z.string(),
10
- summary: zod_1.z.string(),
10
+ text: zod_1.z.string(),
11
11
  format: zod_1.z.string().optional(),
12
12
  index: zod_1.z.number().int().nonnegative().optional(),
13
13
  });
@@ -14,7 +14,7 @@ export declare const MessageResponseSchema: z.ZodObject<{
14
14
  content: z.ZodString;
15
15
  details: z.ZodOptional<z.ZodArray<z.ZodObject<{
16
16
  type: z.ZodString;
17
- summary: z.ZodString;
17
+ text: z.ZodString;
18
18
  format: z.ZodOptional<z.ZodString>;
19
19
  index: z.ZodOptional<z.ZodNumber>;
20
20
  }, z.core.$strip>>>;
@@ -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
- summary: z.ZodString;
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
- summary: z.ZodString;
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
- summary: zod_1.z.string(),
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,15 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace CancelVerificationCommand {
4
+ const Request: z.ZodObject<{
5
+ requestId: z.ZodString;
6
+ }, z.core.$strip>;
7
+ const Response: z.ZodObject<{
8
+ requestId: z.ZodString;
9
+ cancelled: z.ZodBoolean;
10
+ }, z.core.$strip>;
11
+ const URL: (requestId: string) => string;
12
+ const METHOD = HttpMethod.POST;
13
+ type RequestType = z.infer<typeof Request>;
14
+ type ResponseType = z.infer<typeof Response>;
15
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CancelVerificationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const http_method_1 = require("../../../shared/http-method");
6
+ const rest_api_1 = require("../../../rest-api");
7
+ var CancelVerificationCommand;
8
+ (function (CancelVerificationCommand) {
9
+ CancelVerificationCommand.Request = zod_1.z.object({
10
+ requestId: zod_1.z.string().uuid(),
11
+ });
12
+ CancelVerificationCommand.Response = zod_1.z.object({
13
+ requestId: zod_1.z.string(),
14
+ cancelled: zod_1.z.boolean(),
15
+ });
16
+ CancelVerificationCommand.URL = rest_api_1.REST_API.V1.VERIFICATION.CANCEL;
17
+ CancelVerificationCommand.METHOD = http_method_1.HttpMethod.POST;
18
+ })(CancelVerificationCommand || (exports.CancelVerificationCommand = CancelVerificationCommand = {}));
@@ -1 +1,2 @@
1
1
  export * from './resend.command';
2
+ export * from './cancel-verification.command';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./resend.command"), exports);
18
+ __exportStar(require("./cancel-verification.command"), exports);
@@ -1,3 +1,4 @@
1
1
  export * from './verification.errors';
2
2
  export * from './commands';
3
+ export * from './queries';
3
4
  export * from './schemas';
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./verification.errors"), exports);
18
18
  __exportStar(require("./commands"), exports);
19
+ __exportStar(require("./queries"), exports);
19
20
  __exportStar(require("./schemas"), exports);
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace GetActiveVerificationsQuery {
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/verification/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.GetActiveVerificationsQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const verification_status_response_schema_1 = require("../schemas/verification-status-response.schema");
6
+ const rest_api_1 = require("../../../rest-api");
7
+ const http_method_1 = require("../../../shared/http-method");
8
+ var GetActiveVerificationsQuery;
9
+ (function (GetActiveVerificationsQuery) {
10
+ GetActiveVerificationsQuery.Request = zod_1.z.object({});
11
+ GetActiveVerificationsQuery.Response = zod_1.z.object({
12
+ verifications: zod_1.z.array(verification_status_response_schema_1.VerificationStatusResponseSchema),
13
+ });
14
+ GetActiveVerificationsQuery.URL = rest_api_1.REST_API.V1.VERIFICATION.ACTIVE;
15
+ GetActiveVerificationsQuery.METHOD = http_method_1.HttpMethod.GET;
16
+ })(GetActiveVerificationsQuery || (exports.GetActiveVerificationsQuery = GetActiveVerificationsQuery = {}));
@@ -0,0 +1 @@
1
+ export * from './get-active-verifications.query';
@@ -0,0 +1,17 @@
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-active-verifications.query"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veruna/api-contracts",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "description": "API contracts for Veruna project - Zod schemas, types, and paths",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",