@taskora-uni/contracts 5.0.0 → 6.0.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.
- 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 +6 -37
- package/dist/generated/auth.js +2 -16
- package/package.json +1 -1
- package/proto/auth.proto +7 -40
- 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
|
}
|
|
@@ -22,44 +19,16 @@ export interface RefreshTokensResponse {
|
|
|
22
19
|
accessToken: string;
|
|
23
20
|
refreshToken: string;
|
|
24
21
|
}
|
|
25
|
-
export interface StartRegistrationRequest {
|
|
26
|
-
email: string;
|
|
27
|
-
password: string;
|
|
28
|
-
token: string;
|
|
29
|
-
}
|
|
30
|
-
export interface StartRegistrationResponse {
|
|
31
|
-
id: string;
|
|
32
|
-
}
|
|
33
|
-
export interface CompleteRegistrationRequest {
|
|
34
|
-
id: string;
|
|
35
|
-
code: string;
|
|
36
|
-
token: string;
|
|
37
|
-
firstName: string;
|
|
38
|
-
lastName: string;
|
|
39
|
-
}
|
|
40
|
-
export interface CompleteRegistrationResponse {
|
|
41
|
-
status: RegistrationStatus;
|
|
42
|
-
}
|
|
43
|
-
export interface GetRegistrationStatusRequest {
|
|
44
|
-
id: string;
|
|
45
|
-
}
|
|
46
|
-
export interface GetRegistrationStatusResponse {
|
|
47
|
-
status: RegistrationStatus;
|
|
48
|
-
}
|
|
49
22
|
export declare const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
50
23
|
export interface AuthServiceClient {
|
|
51
24
|
login(request: LoginRequest): Observable<LoginResponse>;
|
|
25
|
+
logout(request: LogoutRequest): Observable<Empty>;
|
|
52
26
|
refreshTokens(request: RefreshTokensRequest): Observable<RefreshTokensResponse>;
|
|
53
|
-
startRegistration(request: StartRegistrationRequest): Observable<StartRegistrationResponse>;
|
|
54
|
-
completeRegistration(request: CompleteRegistrationRequest): Observable<CompleteRegistrationResponse>;
|
|
55
|
-
getRegistrationStatus(request: GetRegistrationStatusRequest): Observable<GetRegistrationStatusResponse>;
|
|
56
27
|
}
|
|
57
28
|
export interface AuthServiceController {
|
|
58
29
|
login(request: LoginRequest): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
|
|
30
|
+
logout(request: LogoutRequest): void | Promise<void>;
|
|
59
31
|
refreshTokens(request: RefreshTokensRequest): Promise<RefreshTokensResponse> | Observable<RefreshTokensResponse> | RefreshTokensResponse;
|
|
60
|
-
startRegistration(request: StartRegistrationRequest): Promise<StartRegistrationResponse> | Observable<StartRegistrationResponse> | StartRegistrationResponse;
|
|
61
|
-
completeRegistration(request: CompleteRegistrationRequest): Promise<CompleteRegistrationResponse> | Observable<CompleteRegistrationResponse> | CompleteRegistrationResponse;
|
|
62
|
-
getRegistrationStatus(request: GetRegistrationStatusRequest): Promise<GetRegistrationStatusResponse> | Observable<GetRegistrationStatusResponse> | GetRegistrationStatusResponse;
|
|
63
32
|
}
|
|
64
33
|
export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
|
|
65
34
|
export declare const AUTH_SERVICE_NAME = "AuthService";
|
package/dist/generated/auth.js
CHANGED
|
@@ -5,29 +5,15 @@
|
|
|
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
|
-
const grpcMethods = [
|
|
25
|
-
"login",
|
|
26
|
-
"refreshTokens",
|
|
27
|
-
"startRegistration",
|
|
28
|
-
"completeRegistration",
|
|
29
|
-
"getRegistrationStatus",
|
|
30
|
-
];
|
|
16
|
+
const grpcMethods = ["login", "logout", "refreshTokens"];
|
|
31
17
|
for (const method of grpcMethods) {
|
|
32
18
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
33
19
|
(0, microservices_1.GrpcMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
|
@@ -2,12 +2,12 @@ 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);
|
|
8
|
-
rpc StartRegistration(StartRegistrationRequest) returns (StartRegistrationResponse);
|
|
9
|
-
rpc CompleteRegistration(CompleteRegistrationRequest) returns (CompleteRegistrationResponse);
|
|
10
|
-
rpc GetRegistrationStatus(GetRegistrationStatusRequest) returns (GetRegistrationStatusResponse);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
message LoginRequest {
|
|
@@ -20,6 +20,10 @@ message LoginResponse {
|
|
|
20
20
|
string refresh_token = 2;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
message LogoutRequest {
|
|
24
|
+
string refresh_token = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
23
27
|
message RefreshTokensRequest {
|
|
24
28
|
string refresh_token = 1;
|
|
25
29
|
}
|
|
@@ -28,40 +32,3 @@ message RefreshTokensResponse {
|
|
|
28
32
|
string access_token = 1;
|
|
29
33
|
string refresh_token = 2;
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
message StartRegistrationRequest {
|
|
33
|
-
string email = 1;
|
|
34
|
-
string password = 2;
|
|
35
|
-
string token = 3;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
message StartRegistrationResponse {
|
|
39
|
-
string id = 1;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
enum RegistrationStatus {
|
|
43
|
-
UNSPECIFIED = 0;
|
|
44
|
-
PENDING = 1;
|
|
45
|
-
COMPLETED = 2;
|
|
46
|
-
REQUIRES_RESTART = 3;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
message CompleteRegistrationRequest {
|
|
50
|
-
string id = 1;
|
|
51
|
-
string code = 2;
|
|
52
|
-
string token = 3;
|
|
53
|
-
string first_name = 4;
|
|
54
|
-
string last_name = 5;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
message CompleteRegistrationResponse {
|
|
58
|
-
RegistrationStatus status = 1;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
message GetRegistrationStatusRequest {
|
|
62
|
-
string id = 1;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
message GetRegistrationStatusResponse {
|
|
66
|
-
RegistrationStatus status = 1;
|
|
67
|
-
}
|
|
@@ -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);
|