@taskora-uni/contracts 5.0.0 → 6.0.1
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/dist/events/auth/patterns/event-patterns.d.ts +0 -1
- package/dist/events/auth/patterns/event-patterns.js +0 -1
- package/dist/events/auth/payloads/index.d.ts +0 -1
- package/dist/events/auth/payloads/index.js +0 -1
- package/dist/events/index.d.ts +0 -1
- package/dist/events/index.js +0 -1
- package/dist/generated/auth.d.ts +22 -26
- package/dist/generated/auth.js +4 -11
- package/package.json +1 -1
- package/proto/auth.proto +24 -27
- package/dist/events/auth/payloads/profile-creation-requested.payload.d.ts +0 -7
- package/dist/events/auth/payloads/profile-creation-requested.payload.js +0 -2
- package/dist/events/user/index.d.ts +0 -2
- package/dist/events/user/index.js +0 -18
- package/dist/events/user/patterns/event-patterns.d.ts +0 -4
- package/dist/events/user/patterns/event-patterns.js +0 -7
- package/dist/events/user/patterns/index.d.ts +0 -1
- package/dist/events/user/patterns/index.js +0 -17
- package/dist/events/user/payloads/index.d.ts +0 -2
- package/dist/events/user/payloads/index.js +0 -18
- package/dist/events/user/payloads/profile-created.payload.d.ts +0 -5
- package/dist/events/user/payloads/profile-created.payload.js +0 -2
- package/dist/events/user/payloads/profile-creation-failed.payload.d.ts +0 -6
- package/dist/events/user/payloads/profile-creation-failed.payload.js +0 -2
|
@@ -15,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./otp-requested.payload"), exports);
|
|
18
|
-
__exportStar(require("./profile-creation-requested.payload"), exports);
|
package/dist/events/index.d.ts
CHANGED
package/dist/events/index.js
CHANGED
package/dist/generated/auth.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
+
import { Empty } from "./google/protobuf/empty";
|
|
2
3
|
export declare const protobufPackage = "auth.v1";
|
|
3
|
-
export declare enum RegistrationStatus {
|
|
4
|
-
UNSPECIFIED = 0,
|
|
5
|
-
PENDING = 1,
|
|
6
|
-
COMPLETED = 2,
|
|
7
|
-
REQUIRES_RESTART = 3,
|
|
8
|
-
UNRECOGNIZED = -1
|
|
9
|
-
}
|
|
10
4
|
export interface LoginRequest {
|
|
11
5
|
email: string;
|
|
12
6
|
password: string;
|
|
@@ -15,6 +9,9 @@ export interface LoginResponse {
|
|
|
15
9
|
accessToken: string;
|
|
16
10
|
refreshToken: string;
|
|
17
11
|
}
|
|
12
|
+
export interface LogoutRequest {
|
|
13
|
+
refreshToken: string;
|
|
14
|
+
}
|
|
18
15
|
export interface RefreshTokensRequest {
|
|
19
16
|
refreshToken: string;
|
|
20
17
|
}
|
|
@@ -23,43 +20,42 @@ export interface RefreshTokensResponse {
|
|
|
23
20
|
refreshToken: string;
|
|
24
21
|
}
|
|
25
22
|
export interface StartRegistrationRequest {
|
|
23
|
+
invitationToken: string;
|
|
24
|
+
firstName: string;
|
|
25
|
+
lastName: string;
|
|
26
26
|
email: string;
|
|
27
27
|
password: string;
|
|
28
|
-
token: string;
|
|
29
28
|
}
|
|
30
29
|
export interface StartRegistrationResponse {
|
|
31
|
-
|
|
30
|
+
registrationId: string;
|
|
32
31
|
}
|
|
33
|
-
export interface
|
|
34
|
-
|
|
35
|
-
code: string;
|
|
36
|
-
token: string;
|
|
37
|
-
firstName: string;
|
|
38
|
-
lastName: string;
|
|
39
|
-
}
|
|
40
|
-
export interface CompleteRegistrationResponse {
|
|
41
|
-
status: RegistrationStatus;
|
|
32
|
+
export interface ResendRegistrationOtpRequest {
|
|
33
|
+
registrationId: string;
|
|
42
34
|
}
|
|
43
|
-
export interface
|
|
44
|
-
|
|
35
|
+
export interface VerifyRegistrationOtpRequest {
|
|
36
|
+
registrationId: string;
|
|
37
|
+
otpCode: string;
|
|
45
38
|
}
|
|
46
|
-
export interface
|
|
47
|
-
|
|
39
|
+
export interface VerifyRegistrationOtpResponse {
|
|
40
|
+
accessToken: string;
|
|
41
|
+
refreshToken: string;
|
|
48
42
|
}
|
|
49
43
|
export declare const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
50
44
|
export interface AuthServiceClient {
|
|
51
45
|
login(request: LoginRequest): Observable<LoginResponse>;
|
|
46
|
+
logout(request: LogoutRequest): Observable<Empty>;
|
|
52
47
|
refreshTokens(request: RefreshTokensRequest): Observable<RefreshTokensResponse>;
|
|
53
48
|
startRegistration(request: StartRegistrationRequest): Observable<StartRegistrationResponse>;
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
resendRegistrationOtp(request: ResendRegistrationOtpRequest): Observable<Empty>;
|
|
50
|
+
verifyRegistrationOtp(request: VerifyRegistrationOtpRequest): Observable<VerifyRegistrationOtpResponse>;
|
|
56
51
|
}
|
|
57
52
|
export interface AuthServiceController {
|
|
58
53
|
login(request: LoginRequest): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
|
|
54
|
+
logout(request: LogoutRequest): void | Promise<void>;
|
|
59
55
|
refreshTokens(request: RefreshTokensRequest): Promise<RefreshTokensResponse> | Observable<RefreshTokensResponse> | RefreshTokensResponse;
|
|
60
56
|
startRegistration(request: StartRegistrationRequest): Promise<StartRegistrationResponse> | Observable<StartRegistrationResponse> | StartRegistrationResponse;
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
resendRegistrationOtp(request: ResendRegistrationOtpRequest): void | Promise<void>;
|
|
58
|
+
verifyRegistrationOtp(request: VerifyRegistrationOtpRequest): Promise<VerifyRegistrationOtpResponse> | Observable<VerifyRegistrationOtpResponse> | VerifyRegistrationOtpResponse;
|
|
63
59
|
}
|
|
64
60
|
export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
|
|
65
61
|
export declare const AUTH_SERVICE_NAME = "AuthService";
|
package/dist/generated/auth.js
CHANGED
|
@@ -5,28 +5,21 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: auth.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.AUTH_SERVICE_NAME = exports.AUTH_V1_PACKAGE_NAME = exports.
|
|
8
|
+
exports.AUTH_SERVICE_NAME = exports.AUTH_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
9
|
exports.AuthServiceControllerMethods = AuthServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
12
12
|
exports.protobufPackage = "auth.v1";
|
|
13
|
-
var RegistrationStatus;
|
|
14
|
-
(function (RegistrationStatus) {
|
|
15
|
-
RegistrationStatus[RegistrationStatus["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
16
|
-
RegistrationStatus[RegistrationStatus["PENDING"] = 1] = "PENDING";
|
|
17
|
-
RegistrationStatus[RegistrationStatus["COMPLETED"] = 2] = "COMPLETED";
|
|
18
|
-
RegistrationStatus[RegistrationStatus["REQUIRES_RESTART"] = 3] = "REQUIRES_RESTART";
|
|
19
|
-
RegistrationStatus[RegistrationStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
20
|
-
})(RegistrationStatus || (exports.RegistrationStatus = RegistrationStatus = {}));
|
|
21
13
|
exports.AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
22
14
|
function AuthServiceControllerMethods() {
|
|
23
15
|
return function (constructor) {
|
|
24
16
|
const grpcMethods = [
|
|
25
17
|
"login",
|
|
18
|
+
"logout",
|
|
26
19
|
"refreshTokens",
|
|
27
20
|
"startRegistration",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
21
|
+
"resendRegistrationOtp",
|
|
22
|
+
"verifyRegistrationOtp",
|
|
30
23
|
];
|
|
31
24
|
for (const method of grpcMethods) {
|
|
32
25
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
|
@@ -2,12 +2,16 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package auth.v1;
|
|
4
4
|
|
|
5
|
+
import "google/protobuf/empty.proto";
|
|
6
|
+
|
|
5
7
|
service AuthService {
|
|
6
8
|
rpc Login(LoginRequest) returns (LoginResponse);
|
|
9
|
+
rpc Logout(LogoutRequest) returns (google.protobuf.Empty);
|
|
7
10
|
rpc RefreshTokens(RefreshTokensRequest) returns (RefreshTokensResponse);
|
|
11
|
+
|
|
8
12
|
rpc StartRegistration(StartRegistrationRequest) returns (StartRegistrationResponse);
|
|
9
|
-
rpc
|
|
10
|
-
rpc
|
|
13
|
+
rpc ResendRegistrationOtp(ResendRegistrationOtpRequest) returns (google.protobuf.Empty);
|
|
14
|
+
rpc VerifyRegistrationOtp(VerifyRegistrationOtpRequest) returns (VerifyRegistrationOtpResponse);
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
message LoginRequest {
|
|
@@ -20,6 +24,10 @@ message LoginResponse {
|
|
|
20
24
|
string refresh_token = 2;
|
|
21
25
|
}
|
|
22
26
|
|
|
27
|
+
message LogoutRequest {
|
|
28
|
+
string refresh_token = 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
23
31
|
message RefreshTokensRequest {
|
|
24
32
|
string refresh_token = 1;
|
|
25
33
|
}
|
|
@@ -30,38 +38,27 @@ message RefreshTokensResponse {
|
|
|
30
38
|
}
|
|
31
39
|
|
|
32
40
|
message StartRegistrationRequest {
|
|
33
|
-
string
|
|
34
|
-
string
|
|
35
|
-
string
|
|
41
|
+
string invitation_token = 1;
|
|
42
|
+
string first_name = 2;
|
|
43
|
+
string last_name = 3;
|
|
44
|
+
string email = 4;
|
|
45
|
+
string password = 5;
|
|
36
46
|
}
|
|
37
47
|
|
|
38
48
|
message StartRegistrationResponse {
|
|
39
|
-
string
|
|
49
|
+
string registration_id = 1;
|
|
40
50
|
}
|
|
41
51
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
PENDING = 1;
|
|
45
|
-
COMPLETED = 2;
|
|
46
|
-
REQUIRES_RESTART = 3;
|
|
52
|
+
message ResendRegistrationOtpRequest {
|
|
53
|
+
string registration_id = 1;
|
|
47
54
|
}
|
|
48
55
|
|
|
49
|
-
message
|
|
50
|
-
string
|
|
51
|
-
string
|
|
52
|
-
string token = 3;
|
|
53
|
-
string first_name = 4;
|
|
54
|
-
string last_name = 5;
|
|
56
|
+
message VerifyRegistrationOtpRequest {
|
|
57
|
+
string registration_id = 1;
|
|
58
|
+
string otp_code = 2;
|
|
55
59
|
}
|
|
56
60
|
|
|
57
|
-
message
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
message GetRegistrationStatusRequest {
|
|
62
|
-
string id = 1;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
message GetRegistrationStatusResponse {
|
|
66
|
-
RegistrationStatus status = 1;
|
|
61
|
+
message VerifyRegistrationOtpResponse {
|
|
62
|
+
string access_token = 1;
|
|
63
|
+
string refresh_token = 2;
|
|
67
64
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
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("./patterns"), exports);
|
|
18
|
-
__exportStar(require("./payloads"), exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./event-patterns";
|
|
@@ -1,17 +0,0 @@
|
|
|
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("./event-patterns"), exports);
|
|
@@ -1,18 +0,0 @@
|
|
|
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("./profile-created.payload"), exports);
|
|
18
|
-
__exportStar(require("./profile-creation-failed.payload"), exports);
|