@veruna/api-contracts 6.18.0 → 6.19.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.
Files changed (32) hide show
  1. package/build/locales/validation.d.ts +32 -0
  2. package/build/locales/validation.js +32 -0
  3. package/build/locales/validation.js.map +1 -1
  4. package/build/rest-api.d.ts +2 -0
  5. package/build/rest-api.js +2 -0
  6. package/build/rest-api.js.map +1 -1
  7. package/build/routes/auth.routes.d.ts +2 -0
  8. package/build/routes/auth.routes.js +2 -0
  9. package/build/routes/auth.routes.js.map +1 -1
  10. package/build/tsconfig.tsbuildinfo +1 -1
  11. package/build/v1/auth/commands/index.d.ts +2 -0
  12. package/build/v1/auth/commands/index.js +2 -0
  13. package/build/v1/auth/commands/index.js.map +1 -1
  14. package/build/v1/auth/commands/login-code-request.command.d.ts +14 -0
  15. package/build/v1/auth/commands/login-code-request.command.js +14 -0
  16. package/build/v1/auth/commands/login-code-request.command.js.map +1 -0
  17. package/build/v1/auth/commands/login-code-verify.command.d.ts +33 -0
  18. package/build/v1/auth/commands/login-code-verify.command.js +15 -0
  19. package/build/v1/auth/commands/login-code-verify.command.js.map +1 -0
  20. package/build/v1/auth/schemas/index.d.ts +2 -0
  21. package/build/v1/auth/schemas/index.js +2 -0
  22. package/build/v1/auth/schemas/index.js.map +1 -1
  23. package/build/v1/auth/schemas/login-code-request.schema.d.ts +7 -0
  24. package/build/v1/auth/schemas/login-code-request.schema.js +12 -0
  25. package/build/v1/auth/schemas/login-code-request.schema.js.map +1 -0
  26. package/build/v1/auth/schemas/login-code-verify.schema.d.ts +5 -0
  27. package/build/v1/auth/schemas/login-code-verify.schema.js +12 -0
  28. package/build/v1/auth/schemas/login-code-verify.schema.js.map +1 -0
  29. package/build/v1/verification/schemas/verification-type.enum.d.ts +2 -1
  30. package/build/v1/verification/schemas/verification-type.enum.js +1 -0
  31. package/build/v1/verification/schemas/verification-type.enum.js.map +1 -1
  32. package/package.json +1 -1
@@ -3,3 +3,5 @@ export * from './signin.command';
3
3
  export * from './logout.command';
4
4
  export * from './logout-all.command';
5
5
  export * from './delete-session.command';
6
+ export * from './login-code-request.command';
7
+ export * from './login-code-verify.command';
@@ -19,4 +19,6 @@ __exportStar(require("./signin.command"), exports);
19
19
  __exportStar(require("./logout.command"), exports);
20
20
  __exportStar(require("./logout-all.command"), exports);
21
21
  __exportStar(require("./delete-session.command"), exports);
22
+ __exportStar(require("./login-code-request.command"), exports);
23
+ __exportStar(require("./login-code-verify.command"), exports);
22
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/auth/commands/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,uDAAqC;AACrC,2DAAyC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/auth/commands/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,uDAAqC;AACrC,2DAAyC;AACzC,+DAA6C;AAC7C,8DAA4C"}
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method.enum';
3
+ export declare namespace AuthLoginCodeRequestCommand {
4
+ const Request: z.ZodObject<{
5
+ email: z.ZodString;
6
+ }, z.core.$strip>;
7
+ const Response: z.ZodObject<{
8
+ requestId: z.ZodString;
9
+ }, z.core.$strip>;
10
+ const URL: "/api/v1/auth/login-code/request";
11
+ const METHOD = HttpMethod.POST;
12
+ type RequestType = z.infer<typeof Request>;
13
+ type ResponseType = z.infer<typeof Response>;
14
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthLoginCodeRequestCommand = void 0;
4
+ const login_code_request_schema_1 = require("../schemas/login-code-request.schema");
5
+ const rest_api_1 = require("../../../rest-api");
6
+ const http_method_enum_1 = require("../../../shared/http-method.enum");
7
+ var AuthLoginCodeRequestCommand;
8
+ (function (AuthLoginCodeRequestCommand) {
9
+ AuthLoginCodeRequestCommand.Request = login_code_request_schema_1.LoginCodeRequestSchema;
10
+ AuthLoginCodeRequestCommand.Response = login_code_request_schema_1.LoginCodeRequestResponseSchema;
11
+ AuthLoginCodeRequestCommand.URL = rest_api_1.REST_API.V1.AUTH.REG.LOGIN_CODE_REQUEST;
12
+ AuthLoginCodeRequestCommand.METHOD = http_method_enum_1.HttpMethod.POST;
13
+ })(AuthLoginCodeRequestCommand || (exports.AuthLoginCodeRequestCommand = AuthLoginCodeRequestCommand = {}));
14
+ //# sourceMappingURL=login-code-request.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-code-request.command.js","sourceRoot":"","sources":["../../../../v1/auth/commands/login-code-request.command.ts"],"names":[],"mappings":";;;AACA,oFAG8C;AAC9C,gDAA6C;AAC7C,uEAA8D;AAE9D,IAAiB,2BAA2B,CAY3C;AAZD,WAAiB,2BAA2B;IAE3B,mCAAO,GAAG,kDAAsB,CAAC;IACjC,oCAAQ,GAAG,0DAA8B,CAAC;IAG1C,+BAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC;IAC9C,kCAAM,GAAG,6BAAU,CAAC,IAAI,CAAC;AAK1C,CAAC,EAZgB,2BAA2B,2CAA3B,2BAA2B,QAY3C"}
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method.enum';
3
+ export declare namespace AuthLoginCodeVerifyCommand {
4
+ const Request: z.ZodObject<{
5
+ email: z.ZodString;
6
+ code: z.ZodString;
7
+ }, z.core.$strip>;
8
+ const Response: z.ZodObject<{
9
+ user: z.ZodObject<{
10
+ uuid: z.ZodString;
11
+ email: z.ZodNullable<z.ZodString>;
12
+ name: z.ZodString;
13
+ role: z.ZodString;
14
+ status: z.ZodEnum<typeof import("../..").UserStatus>;
15
+ createdAt: z.ZodString;
16
+ }, z.core.$strip>;
17
+ accessToken: z.ZodString;
18
+ session: z.ZodObject<{
19
+ uuid: z.ZodString;
20
+ deviceName: z.ZodString;
21
+ deviceType: z.ZodEnum<typeof import("../../..").DeviceType>;
22
+ ip: z.ZodString;
23
+ location: z.ZodString;
24
+ isCurrent: z.ZodBoolean;
25
+ createdAt: z.ZodString;
26
+ lastUsedAt: z.ZodString;
27
+ }, z.core.$strip>;
28
+ }, z.core.$strip>;
29
+ const URL: "/api/v1/auth/login-code/verify";
30
+ const METHOD = HttpMethod.POST;
31
+ type RequestType = z.infer<typeof Request>;
32
+ type ResponseType = z.infer<typeof Response>;
33
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthLoginCodeVerifyCommand = void 0;
4
+ const login_code_verify_schema_1 = require("../schemas/login-code-verify.schema");
5
+ const auth_response_schema_1 = require("../schemas/auth-response.schema");
6
+ const rest_api_1 = require("../../../rest-api");
7
+ const http_method_enum_1 = require("../../../shared/http-method.enum");
8
+ var AuthLoginCodeVerifyCommand;
9
+ (function (AuthLoginCodeVerifyCommand) {
10
+ AuthLoginCodeVerifyCommand.Request = login_code_verify_schema_1.LoginCodeVerifyRequestSchema;
11
+ AuthLoginCodeVerifyCommand.Response = auth_response_schema_1.AuthResponseSchema;
12
+ AuthLoginCodeVerifyCommand.URL = rest_api_1.REST_API.V1.AUTH.REG.LOGIN_CODE_VERIFY;
13
+ AuthLoginCodeVerifyCommand.METHOD = http_method_enum_1.HttpMethod.POST;
14
+ })(AuthLoginCodeVerifyCommand || (exports.AuthLoginCodeVerifyCommand = AuthLoginCodeVerifyCommand = {}));
15
+ //# sourceMappingURL=login-code-verify.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-code-verify.command.js","sourceRoot":"","sources":["../../../../v1/auth/commands/login-code-verify.command.ts"],"names":[],"mappings":";;;AACA,kFAAmF;AACnF,0EAAqE;AACrE,gDAA6C;AAC7C,uEAA8D;AAE9D,IAAiB,0BAA0B,CAY1C;AAZD,WAAiB,0BAA0B;IAE1B,kCAAO,GAAG,uDAA4B,CAAC;IACvC,mCAAQ,GAAG,yCAAkB,CAAC;IAG9B,8BAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC;IAC7C,iCAAM,GAAG,6BAAU,CAAC,IAAI,CAAC;AAK1C,CAAC,EAZgB,0BAA0B,0CAA1B,0BAA0B,QAY1C"}
@@ -3,3 +3,5 @@ export * from './signup-request.schema';
3
3
  export * from './signin-request.schema';
4
4
  export * from './session-response.schema';
5
5
  export * from './auth-response.schema';
6
+ export * from './login-code-request.schema';
7
+ export * from './login-code-verify.schema';
@@ -19,4 +19,6 @@ __exportStar(require("./signup-request.schema"), exports);
19
19
  __exportStar(require("./signin-request.schema"), exports);
20
20
  __exportStar(require("./session-response.schema"), exports);
21
21
  __exportStar(require("./auth-response.schema"), exports);
22
+ __exportStar(require("./login-code-request.schema"), exports);
23
+ __exportStar(require("./login-code-verify.schema"), exports);
22
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/auth/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,0DAAwC;AACxC,0DAAwC;AACxC,4DAA0C;AAC1C,yDAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/auth/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,0DAAwC;AACxC,0DAAwC;AACxC,4DAA0C;AAC1C,yDAAuC;AACvC,8DAA4C;AAC5C,6DAA2C"}
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const LoginCodeRequestSchema: z.ZodObject<{
3
+ email: z.ZodString;
4
+ }, z.core.$strip>;
5
+ export declare const LoginCodeRequestResponseSchema: z.ZodObject<{
6
+ requestId: z.ZodString;
7
+ }, z.core.$strip>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoginCodeRequestResponseSchema = exports.LoginCodeRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_schemas_1 = require("../../../shared/common-schemas");
6
+ exports.LoginCodeRequestSchema = zod_1.z.object({
7
+ email: (0, common_schemas_1.normalizedEmailSchema)('LoginCodeRequest.email.required', 'LoginCodeRequest.email.invalid'),
8
+ });
9
+ exports.LoginCodeRequestResponseSchema = zod_1.z.object({
10
+ requestId: zod_1.z.string().uuid(),
11
+ });
12
+ //# sourceMappingURL=login-code-request.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-code-request.schema.js","sourceRoot":"","sources":["../../../../v1/auth/schemas/login-code-request.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,mEAAuE;AAS1D,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,IAAA,sCAAqB,EACxB,iCAAiC,EACjC,gCAAgC,CACnC;CACJ,CAAC,CAAC;AAOU,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CAC/B,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export declare const LoginCodeVerifyRequestSchema: z.ZodObject<{
3
+ email: z.ZodString;
4
+ code: z.ZodString;
5
+ }, z.core.$strip>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoginCodeVerifyRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_schemas_1 = require("../../../shared/common-schemas");
6
+ exports.LoginCodeVerifyRequestSchema = zod_1.z.object({
7
+ email: (0, common_schemas_1.normalizedEmailSchema)('LoginCodeVerifyRequest.email.required', 'LoginCodeVerifyRequest.email.invalid'),
8
+ code: zod_1.z
9
+ .string({ error: 'LoginCodeVerifyRequest.code.required' })
10
+ .regex(/^\d{6}$/, { message: 'LoginCodeVerifyRequest.code.invalid' }),
11
+ });
12
+ //# sourceMappingURL=login-code-verify.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-code-verify.schema.js","sourceRoot":"","sources":["../../../../v1/auth/schemas/login-code-verify.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,mEAAuE;AAS1D,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,KAAK,EAAE,IAAA,sCAAqB,EACxB,uCAAuC,EACvC,sCAAsC,CACzC;IACD,IAAI,EAAE,OAAC;SACF,MAAM,CAAC,EAAE,KAAK,EAAE,sCAAsC,EAAE,CAAC;SACzD,KAAK,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE,CAAC;CAC5E,CAAC,CAAC"}
@@ -3,5 +3,6 @@ export declare enum VerificationType {
3
3
  DELETE_ACCOUNT = "DELETE_ACCOUNT",
4
4
  CHANGE_PASSWORD = "CHANGE_PASSWORD",
5
5
  SETUP_EMAIL = "SETUP_EMAIL",
6
- SETUP_PASSWORD = "SETUP_PASSWORD"
6
+ SETUP_PASSWORD = "SETUP_PASSWORD",
7
+ LOGIN = "LOGIN"
7
8
  }
@@ -8,5 +8,6 @@ var VerificationType;
8
8
  VerificationType["CHANGE_PASSWORD"] = "CHANGE_PASSWORD";
9
9
  VerificationType["SETUP_EMAIL"] = "SETUP_EMAIL";
10
10
  VerificationType["SETUP_PASSWORD"] = "SETUP_PASSWORD";
11
+ VerificationType["LOGIN"] = "LOGIN";
11
12
  })(VerificationType || (exports.VerificationType = VerificationType = {}));
12
13
  //# sourceMappingURL=verification-type.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"verification-type.enum.js","sourceRoot":"","sources":["../../../../v1/verification/schemas/verification-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAMX;AAND,WAAY,gBAAgB;IACxB,iDAA6B,CAAA;IAC7B,qDAAiC,CAAA;IACjC,uDAAmC,CAAA;IACnC,+CAA2B,CAAA;IAC3B,qDAAiC,CAAA;AACrC,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B"}
1
+ {"version":3,"file":"verification-type.enum.js","sourceRoot":"","sources":["../../../../v1/verification/schemas/verification-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IACxB,iDAA6B,CAAA;IAC7B,qDAAiC,CAAA;IACjC,uDAAmC,CAAA;IACnC,+CAA2B,CAAA;IAC3B,qDAAiC,CAAA;IACjC,mCAAe,CAAA;AACnB,CAAC,EAPW,gBAAgB,gCAAhB,gBAAgB,QAO3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veruna/api-contracts",
3
- "version": "6.18.0",
3
+ "version": "6.19.0",
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",