@taskora-uni/contracts 4.0.0 → 4.0.2
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/generated/auth.d.ts +67 -0
- package/dist/generated/auth.js +42 -0
- package/{generated/google/protobuf/empty.ts → dist/generated/google/protobuf/empty.d.ts} +2 -12
- package/dist/generated/google/protobuf/empty.js +11 -0
- package/{generated/google/protobuf/timestamp.ts → dist/generated/google/protobuf/timestamp.d.ts} +15 -25
- package/dist/generated/google/protobuf/timestamp.js +11 -0
- package/dist/generated/invitation.d.ts +46 -0
- package/dist/generated/invitation.js +33 -0
- package/package.json +12 -3
- package/generated/auth.ts +0 -127
- package/generated/invitation.ts +0 -100
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
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
|
+
export interface LoginRequest {
|
|
11
|
+
email: string;
|
|
12
|
+
password: string;
|
|
13
|
+
}
|
|
14
|
+
export interface LoginResponse {
|
|
15
|
+
accessToken: string;
|
|
16
|
+
refreshToken: string;
|
|
17
|
+
}
|
|
18
|
+
export interface RefreshTokensRequest {
|
|
19
|
+
refreshToken: string;
|
|
20
|
+
}
|
|
21
|
+
export interface RefreshTokensResponse {
|
|
22
|
+
accessToken: string;
|
|
23
|
+
refreshToken: string;
|
|
24
|
+
}
|
|
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
|
+
accessToken?: string | undefined;
|
|
49
|
+
refreshToken?: string | undefined;
|
|
50
|
+
}
|
|
51
|
+
export declare const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
52
|
+
export interface AuthServiceClient {
|
|
53
|
+
login(request: LoginRequest): Observable<LoginResponse>;
|
|
54
|
+
refreshTokens(request: RefreshTokensRequest): Observable<RefreshTokensResponse>;
|
|
55
|
+
startRegistration(request: StartRegistrationRequest): Observable<StartRegistrationResponse>;
|
|
56
|
+
completeRegistration(request: CompleteRegistrationRequest): Observable<CompleteRegistrationResponse>;
|
|
57
|
+
getRegistrationStatus(request: GetRegistrationStatusRequest): Observable<GetRegistrationStatusResponse>;
|
|
58
|
+
}
|
|
59
|
+
export interface AuthServiceController {
|
|
60
|
+
login(request: LoginRequest): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
|
|
61
|
+
refreshTokens(request: RefreshTokensRequest): Promise<RefreshTokensResponse> | Observable<RefreshTokensResponse> | RefreshTokensResponse;
|
|
62
|
+
startRegistration(request: StartRegistrationRequest): Promise<StartRegistrationResponse> | Observable<StartRegistrationResponse> | StartRegistrationResponse;
|
|
63
|
+
completeRegistration(request: CompleteRegistrationRequest): Promise<CompleteRegistrationResponse> | Observable<CompleteRegistrationResponse> | CompleteRegistrationResponse;
|
|
64
|
+
getRegistrationStatus(request: GetRegistrationStatusRequest): Promise<GetRegistrationStatusResponse> | Observable<GetRegistrationStatusResponse> | GetRegistrationStatusResponse;
|
|
65
|
+
}
|
|
66
|
+
export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
|
|
67
|
+
export declare const AUTH_SERVICE_NAME = "AuthService";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.6
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: auth.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.AUTH_SERVICE_NAME = exports.AUTH_V1_PACKAGE_NAME = exports.RegistrationStatus = exports.protobufPackage = void 0;
|
|
9
|
+
exports.AuthServiceControllerMethods = AuthServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
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
|
+
exports.AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
22
|
+
function AuthServiceControllerMethods() {
|
|
23
|
+
return function (constructor) {
|
|
24
|
+
const grpcMethods = [
|
|
25
|
+
"login",
|
|
26
|
+
"refreshTokens",
|
|
27
|
+
"startRegistration",
|
|
28
|
+
"completeRegistration",
|
|
29
|
+
"getRegistrationStatus",
|
|
30
|
+
];
|
|
31
|
+
for (const method of grpcMethods) {
|
|
32
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
33
|
+
(0, microservices_1.GrpcMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
|
|
34
|
+
}
|
|
35
|
+
const grpcStreamMethods = [];
|
|
36
|
+
for (const method of grpcStreamMethods) {
|
|
37
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
38
|
+
(0, microservices_1.GrpcStreamMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
exports.AUTH_SERVICE_NAME = "AuthService";
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.6
|
|
4
|
-
// protoc v3.21.12
|
|
5
|
-
// source: google/protobuf/empty.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
|
|
9
|
-
export const protobufPackage = "google.protobuf";
|
|
10
|
-
|
|
1
|
+
export declare const protobufPackage = "google.protobuf";
|
|
11
2
|
/**
|
|
12
3
|
* A generic empty message that you can re-use to avoid defining duplicated
|
|
13
4
|
* empty messages in your APIs. A typical example is to use it as the request
|
|
@@ -19,5 +10,4 @@ export const protobufPackage = "google.protobuf";
|
|
|
19
10
|
*/
|
|
20
11
|
export interface Empty {
|
|
21
12
|
}
|
|
22
|
-
|
|
23
|
-
export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
13
|
+
export declare const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.6
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: google/protobuf/empty.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.GOOGLE_PROTOBUF_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
exports.protobufPackage = "google.protobuf";
|
|
11
|
+
exports.GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
package/{generated/google/protobuf/timestamp.ts → dist/generated/google/protobuf/timestamp.d.ts}
RENAMED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.6
|
|
4
|
-
// protoc v3.21.12
|
|
5
|
-
// source: google/protobuf/timestamp.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
|
|
9
|
-
export const protobufPackage = "google.protobuf";
|
|
10
|
-
|
|
1
|
+
export declare const protobufPackage = "google.protobuf";
|
|
11
2
|
/**
|
|
12
3
|
* A Timestamp represents a point in time independent of any time zone or local
|
|
13
4
|
* calendar, encoded as a count of seconds and fractions of seconds at
|
|
@@ -100,19 +91,18 @@ export const protobufPackage = "google.protobuf";
|
|
|
100
91
|
* ) to obtain a formatter capable of generating timestamps in this format.
|
|
101
92
|
*/
|
|
102
93
|
export interface Timestamp {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Represents seconds of UTC time since Unix epoch
|
|
96
|
+
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
|
97
|
+
* 9999-12-31T23:59:59Z inclusive.
|
|
98
|
+
*/
|
|
99
|
+
seconds: number;
|
|
100
|
+
/**
|
|
101
|
+
* Non-negative fractions of a second at nanosecond resolution. Negative
|
|
102
|
+
* second values with fractions must still have non-negative nanos values
|
|
103
|
+
* that count forward in time. Must be from 0 to 999,999,999
|
|
104
|
+
* inclusive.
|
|
105
|
+
*/
|
|
106
|
+
nanos: number;
|
|
116
107
|
}
|
|
117
|
-
|
|
118
|
-
export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
108
|
+
export declare const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.6
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: google/protobuf/timestamp.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.GOOGLE_PROTOBUF_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
exports.protobufPackage = "google.protobuf";
|
|
11
|
+
exports.GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { Empty } from "./google/protobuf/empty";
|
|
3
|
+
import { Timestamp } from "./google/protobuf/timestamp";
|
|
4
|
+
export declare const protobufPackage = "invitation.v1";
|
|
5
|
+
export interface CreateInvitationResponse {
|
|
6
|
+
token: string;
|
|
7
|
+
expiresAt: Timestamp | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface InvitationUsedBy {
|
|
10
|
+
id: string;
|
|
11
|
+
email: string;
|
|
12
|
+
}
|
|
13
|
+
export interface Invitation {
|
|
14
|
+
id: string;
|
|
15
|
+
usedBy?: InvitationUsedBy | undefined;
|
|
16
|
+
expiresAt: Timestamp | undefined;
|
|
17
|
+
usedAt?: Timestamp | undefined;
|
|
18
|
+
createdAt: Timestamp | undefined;
|
|
19
|
+
}
|
|
20
|
+
export interface ListInvitationsResponse {
|
|
21
|
+
invitations: Invitation[];
|
|
22
|
+
}
|
|
23
|
+
export interface ValidateInvitationTokenRequest {
|
|
24
|
+
token: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ValidateInvitationTokenResponse {
|
|
27
|
+
isValid: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface DeleteInvitationRequest {
|
|
30
|
+
id: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const INVITATION_V1_PACKAGE_NAME = "invitation.v1";
|
|
33
|
+
export interface InvitationServiceClient {
|
|
34
|
+
createInvitation(request: Empty): Observable<CreateInvitationResponse>;
|
|
35
|
+
listInvitations(request: Empty): Observable<ListInvitationsResponse>;
|
|
36
|
+
validateInvitationToken(request: ValidateInvitationTokenRequest): Observable<ValidateInvitationTokenResponse>;
|
|
37
|
+
deleteInvitation(request: DeleteInvitationRequest): Observable<Empty>;
|
|
38
|
+
}
|
|
39
|
+
export interface InvitationServiceController {
|
|
40
|
+
createInvitation(request: Empty): Promise<CreateInvitationResponse> | Observable<CreateInvitationResponse> | CreateInvitationResponse;
|
|
41
|
+
listInvitations(request: Empty): Promise<ListInvitationsResponse> | Observable<ListInvitationsResponse> | ListInvitationsResponse;
|
|
42
|
+
validateInvitationToken(request: ValidateInvitationTokenRequest): Promise<ValidateInvitationTokenResponse> | Observable<ValidateInvitationTokenResponse> | ValidateInvitationTokenResponse;
|
|
43
|
+
deleteInvitation(request: DeleteInvitationRequest): void | Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
export declare function InvitationServiceControllerMethods(): (constructor: Function) => void;
|
|
46
|
+
export declare const INVITATION_SERVICE_NAME = "InvitationService";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.6
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: invitation.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.INVITATION_SERVICE_NAME = exports.INVITATION_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
exports.InvitationServiceControllerMethods = InvitationServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "invitation.v1";
|
|
13
|
+
exports.INVITATION_V1_PACKAGE_NAME = "invitation.v1";
|
|
14
|
+
function InvitationServiceControllerMethods() {
|
|
15
|
+
return function (constructor) {
|
|
16
|
+
const grpcMethods = [
|
|
17
|
+
"createInvitation",
|
|
18
|
+
"listInvitations",
|
|
19
|
+
"validateInvitationToken",
|
|
20
|
+
"deleteInvitation",
|
|
21
|
+
];
|
|
22
|
+
for (const method of grpcMethods) {
|
|
23
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
24
|
+
(0, microservices_1.GrpcMethod)("InvitationService", method)(constructor.prototype[method], method, descriptor);
|
|
25
|
+
}
|
|
26
|
+
const grpcStreamMethods = [];
|
|
27
|
+
for (const method of grpcStreamMethods) {
|
|
28
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
29
|
+
(0, microservices_1.GrpcStreamMethod)("InvitationService", method)(constructor.prototype[method], method, descriptor);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
exports.INVITATION_SERVICE_NAME = "InvitationService";
|
package/package.json
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taskora-uni/contracts",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Shared protobuf contracts and generated TypeScript bindings for Taskora Uni backend services.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./generated/*": {
|
|
15
|
+
"types": "./dist/generated/*.d.ts",
|
|
16
|
+
"default": "./dist/generated/*.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
9
19
|
"files": [
|
|
10
20
|
"proto",
|
|
11
|
-
"generated",
|
|
12
21
|
"dist"
|
|
13
22
|
],
|
|
14
23
|
"publishConfig": {
|
|
@@ -25,6 +34,6 @@
|
|
|
25
34
|
},
|
|
26
35
|
"scripts": {
|
|
27
36
|
"build": "tsc -p tsconfig.build.json",
|
|
28
|
-
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./generated --ts_proto_opt=nestJs=true,package=omit"
|
|
37
|
+
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/generated --ts_proto_opt=nestJs=true,package=omit"
|
|
29
38
|
}
|
|
30
39
|
}
|
package/generated/auth.ts
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.6
|
|
4
|
-
// protoc v3.21.12
|
|
5
|
-
// source: auth.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
-
import { Observable } from "rxjs";
|
|
10
|
-
|
|
11
|
-
export const protobufPackage = "auth.v1";
|
|
12
|
-
|
|
13
|
-
export enum RegistrationStatus {
|
|
14
|
-
UNSPECIFIED = 0,
|
|
15
|
-
PENDING = 1,
|
|
16
|
-
COMPLETED = 2,
|
|
17
|
-
REQUIRES_RESTART = 3,
|
|
18
|
-
UNRECOGNIZED = -1,
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface LoginRequest {
|
|
22
|
-
email: string;
|
|
23
|
-
password: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface LoginResponse {
|
|
27
|
-
accessToken: string;
|
|
28
|
-
refreshToken: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface RefreshTokensRequest {
|
|
32
|
-
refreshToken: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface RefreshTokensResponse {
|
|
36
|
-
accessToken: string;
|
|
37
|
-
refreshToken: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface StartRegistrationRequest {
|
|
41
|
-
email: string;
|
|
42
|
-
password: string;
|
|
43
|
-
token: string;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface StartRegistrationResponse {
|
|
47
|
-
id: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface CompleteRegistrationRequest {
|
|
51
|
-
id: string;
|
|
52
|
-
code: string;
|
|
53
|
-
token: string;
|
|
54
|
-
firstName: string;
|
|
55
|
-
lastName: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface CompleteRegistrationResponse {
|
|
59
|
-
status: RegistrationStatus;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface GetRegistrationStatusRequest {
|
|
63
|
-
id: string;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface GetRegistrationStatusResponse {
|
|
67
|
-
status: RegistrationStatus;
|
|
68
|
-
accessToken?: string | undefined;
|
|
69
|
-
refreshToken?: string | undefined;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
73
|
-
|
|
74
|
-
export interface AuthServiceClient {
|
|
75
|
-
login(request: LoginRequest): Observable<LoginResponse>;
|
|
76
|
-
|
|
77
|
-
refreshTokens(request: RefreshTokensRequest): Observable<RefreshTokensResponse>;
|
|
78
|
-
|
|
79
|
-
startRegistration(request: StartRegistrationRequest): Observable<StartRegistrationResponse>;
|
|
80
|
-
|
|
81
|
-
completeRegistration(request: CompleteRegistrationRequest): Observable<CompleteRegistrationResponse>;
|
|
82
|
-
|
|
83
|
-
getRegistrationStatus(request: GetRegistrationStatusRequest): Observable<GetRegistrationStatusResponse>;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface AuthServiceController {
|
|
87
|
-
login(request: LoginRequest): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
|
|
88
|
-
|
|
89
|
-
refreshTokens(
|
|
90
|
-
request: RefreshTokensRequest,
|
|
91
|
-
): Promise<RefreshTokensResponse> | Observable<RefreshTokensResponse> | RefreshTokensResponse;
|
|
92
|
-
|
|
93
|
-
startRegistration(
|
|
94
|
-
request: StartRegistrationRequest,
|
|
95
|
-
): Promise<StartRegistrationResponse> | Observable<StartRegistrationResponse> | StartRegistrationResponse;
|
|
96
|
-
|
|
97
|
-
completeRegistration(
|
|
98
|
-
request: CompleteRegistrationRequest,
|
|
99
|
-
): Promise<CompleteRegistrationResponse> | Observable<CompleteRegistrationResponse> | CompleteRegistrationResponse;
|
|
100
|
-
|
|
101
|
-
getRegistrationStatus(
|
|
102
|
-
request: GetRegistrationStatusRequest,
|
|
103
|
-
): Promise<GetRegistrationStatusResponse> | Observable<GetRegistrationStatusResponse> | GetRegistrationStatusResponse;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export function AuthServiceControllerMethods() {
|
|
107
|
-
return function (constructor: Function) {
|
|
108
|
-
const grpcMethods: string[] = [
|
|
109
|
-
"login",
|
|
110
|
-
"refreshTokens",
|
|
111
|
-
"startRegistration",
|
|
112
|
-
"completeRegistration",
|
|
113
|
-
"getRegistrationStatus",
|
|
114
|
-
];
|
|
115
|
-
for (const method of grpcMethods) {
|
|
116
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
117
|
-
GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
|
118
|
-
}
|
|
119
|
-
const grpcStreamMethods: string[] = [];
|
|
120
|
-
for (const method of grpcStreamMethods) {
|
|
121
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
122
|
-
GrpcStreamMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export const AUTH_SERVICE_NAME = "AuthService";
|
package/generated/invitation.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.6
|
|
4
|
-
// protoc v3.21.12
|
|
5
|
-
// source: invitation.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
-
import { Observable } from "rxjs";
|
|
10
|
-
import { Empty } from "./google/protobuf/empty";
|
|
11
|
-
import { Timestamp } from "./google/protobuf/timestamp";
|
|
12
|
-
|
|
13
|
-
export const protobufPackage = "invitation.v1";
|
|
14
|
-
|
|
15
|
-
export interface CreateInvitationResponse {
|
|
16
|
-
token: string;
|
|
17
|
-
expiresAt: Timestamp | undefined;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface InvitationUsedBy {
|
|
21
|
-
id: string;
|
|
22
|
-
email: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface Invitation {
|
|
26
|
-
id: string;
|
|
27
|
-
usedBy?: InvitationUsedBy | undefined;
|
|
28
|
-
expiresAt: Timestamp | undefined;
|
|
29
|
-
usedAt?: Timestamp | undefined;
|
|
30
|
-
createdAt: Timestamp | undefined;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface ListInvitationsResponse {
|
|
34
|
-
invitations: Invitation[];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface ValidateInvitationTokenRequest {
|
|
38
|
-
token: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface ValidateInvitationTokenResponse {
|
|
42
|
-
isValid: boolean;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface DeleteInvitationRequest {
|
|
46
|
-
id: string;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const INVITATION_V1_PACKAGE_NAME = "invitation.v1";
|
|
50
|
-
|
|
51
|
-
export interface InvitationServiceClient {
|
|
52
|
-
createInvitation(request: Empty): Observable<CreateInvitationResponse>;
|
|
53
|
-
|
|
54
|
-
listInvitations(request: Empty): Observable<ListInvitationsResponse>;
|
|
55
|
-
|
|
56
|
-
validateInvitationToken(request: ValidateInvitationTokenRequest): Observable<ValidateInvitationTokenResponse>;
|
|
57
|
-
|
|
58
|
-
deleteInvitation(request: DeleteInvitationRequest): Observable<Empty>;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface InvitationServiceController {
|
|
62
|
-
createInvitation(
|
|
63
|
-
request: Empty,
|
|
64
|
-
): Promise<CreateInvitationResponse> | Observable<CreateInvitationResponse> | CreateInvitationResponse;
|
|
65
|
-
|
|
66
|
-
listInvitations(
|
|
67
|
-
request: Empty,
|
|
68
|
-
): Promise<ListInvitationsResponse> | Observable<ListInvitationsResponse> | ListInvitationsResponse;
|
|
69
|
-
|
|
70
|
-
validateInvitationToken(
|
|
71
|
-
request: ValidateInvitationTokenRequest,
|
|
72
|
-
):
|
|
73
|
-
| Promise<ValidateInvitationTokenResponse>
|
|
74
|
-
| Observable<ValidateInvitationTokenResponse>
|
|
75
|
-
| ValidateInvitationTokenResponse;
|
|
76
|
-
|
|
77
|
-
deleteInvitation(request: DeleteInvitationRequest): void | Promise<void>;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export function InvitationServiceControllerMethods() {
|
|
81
|
-
return function (constructor: Function) {
|
|
82
|
-
const grpcMethods: string[] = [
|
|
83
|
-
"createInvitation",
|
|
84
|
-
"listInvitations",
|
|
85
|
-
"validateInvitationToken",
|
|
86
|
-
"deleteInvitation",
|
|
87
|
-
];
|
|
88
|
-
for (const method of grpcMethods) {
|
|
89
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
90
|
-
GrpcMethod("InvitationService", method)(constructor.prototype[method], method, descriptor);
|
|
91
|
-
}
|
|
92
|
-
const grpcStreamMethods: string[] = [];
|
|
93
|
-
for (const method of grpcStreamMethods) {
|
|
94
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
95
|
-
GrpcStreamMethod("InvitationService", method)(constructor.prototype[method], method, descriptor);
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export const INVITATION_SERVICE_NAME = "InvitationService";
|