geniebox-shared-lib 1.0.14 → 1.0.15
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/auth/auth.interface.d.ts +11 -11
- package/dist/auth/auth.interface.js +11 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -3
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
|
2
2
|
import type { handleUnaryCall, Metadata, UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
3
3
|
import { Observable } from "rxjs";
|
|
4
4
|
export declare const protobufPackage = "auth";
|
|
5
|
-
export interface
|
|
5
|
+
export interface RegisterCredentials {
|
|
6
6
|
firstName: string;
|
|
7
7
|
lastName: string;
|
|
8
8
|
email: string;
|
|
@@ -16,7 +16,7 @@ export interface Tokens {
|
|
|
16
16
|
accessToken: string;
|
|
17
17
|
refreshToken: string;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface AuthResponse {
|
|
20
20
|
userId: string;
|
|
21
21
|
sessionId: string;
|
|
22
22
|
email: string;
|
|
@@ -41,18 +41,18 @@ export interface RefreshTokenResponse {
|
|
|
41
41
|
tokens: Tokens | undefined;
|
|
42
42
|
}
|
|
43
43
|
export declare const AUTH_PACKAGE_NAME = "auth";
|
|
44
|
-
export declare const
|
|
44
|
+
export declare const RegisterCredentials: MessageFns<RegisterCredentials>;
|
|
45
45
|
export declare const Tokens: MessageFns<Tokens>;
|
|
46
|
-
export declare const
|
|
46
|
+
export declare const AuthResponse: MessageFns<AuthResponse>;
|
|
47
47
|
export declare const UserResponse: MessageFns<UserResponse>;
|
|
48
48
|
export declare const RefreshTokenRequest: MessageFns<RefreshTokenRequest>;
|
|
49
49
|
export declare const RefreshTokenResponse: MessageFns<RefreshTokenResponse>;
|
|
50
50
|
export interface AuthServiceClient {
|
|
51
|
-
register(request:
|
|
51
|
+
register(request: RegisterCredentials, metadata?: Metadata): Observable<AuthResponse>;
|
|
52
52
|
refreshToken(request: RefreshTokenRequest, metadata?: Metadata): Observable<RefreshTokenResponse>;
|
|
53
53
|
}
|
|
54
54
|
export interface AuthServiceController {
|
|
55
|
-
register(request:
|
|
55
|
+
register(request: RegisterCredentials, metadata?: Metadata): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
|
|
56
56
|
refreshToken(request: RefreshTokenRequest, metadata?: Metadata): Promise<RefreshTokenResponse> | Observable<RefreshTokenResponse> | RefreshTokenResponse;
|
|
57
57
|
}
|
|
58
58
|
export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
|
|
@@ -63,10 +63,10 @@ export declare const AuthServiceService: {
|
|
|
63
63
|
readonly path: "/auth.AuthService/register";
|
|
64
64
|
readonly requestStream: false;
|
|
65
65
|
readonly responseStream: false;
|
|
66
|
-
readonly requestSerialize: (value:
|
|
67
|
-
readonly requestDeserialize: (value: Buffer) =>
|
|
68
|
-
readonly responseSerialize: (value:
|
|
69
|
-
readonly responseDeserialize: (value: Buffer) =>
|
|
66
|
+
readonly requestSerialize: (value: RegisterCredentials) => Buffer;
|
|
67
|
+
readonly requestDeserialize: (value: Buffer) => RegisterCredentials;
|
|
68
|
+
readonly responseSerialize: (value: AuthResponse) => Buffer;
|
|
69
|
+
readonly responseDeserialize: (value: Buffer) => AuthResponse;
|
|
70
70
|
};
|
|
71
71
|
readonly refreshToken: {
|
|
72
72
|
readonly path: "/auth.AuthService/refreshToken";
|
|
@@ -79,7 +79,7 @@ export declare const AuthServiceService: {
|
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
export interface AuthServiceServer extends UntypedServiceImplementation {
|
|
82
|
-
register: handleUnaryCall<
|
|
82
|
+
register: handleUnaryCall<RegisterCredentials, AuthResponse>;
|
|
83
83
|
refreshToken: handleUnaryCall<RefreshTokenRequest, RefreshTokenResponse>;
|
|
84
84
|
}
|
|
85
85
|
export interface MessageFns<T> {
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
// protoc v5.28.2
|
|
6
6
|
// source: auth.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.AuthServiceService = exports.AUTH_SERVICE_NAME = exports.RefreshTokenResponse = exports.RefreshTokenRequest = exports.UserResponse = exports.
|
|
8
|
+
exports.AuthServiceService = exports.AUTH_SERVICE_NAME = exports.RefreshTokenResponse = exports.RefreshTokenRequest = exports.UserResponse = exports.AuthResponse = exports.Tokens = exports.RegisterCredentials = exports.AUTH_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
9
|
exports.AuthServiceControllerMethods = AuthServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
12
12
|
const microservices_1 = require("@nestjs/microservices");
|
|
13
13
|
exports.protobufPackage = "auth";
|
|
14
14
|
exports.AUTH_PACKAGE_NAME = "auth";
|
|
15
|
-
function
|
|
15
|
+
function createBaseRegisterCredentials() {
|
|
16
16
|
return {
|
|
17
17
|
firstName: "",
|
|
18
18
|
lastName: "",
|
|
@@ -24,7 +24,7 @@ function createBaseRegisterRequest() {
|
|
|
24
24
|
gender: "",
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
exports.
|
|
27
|
+
exports.RegisterCredentials = {
|
|
28
28
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
29
29
|
if (message.firstName !== "") {
|
|
30
30
|
writer.uint32(10).string(message.firstName);
|
|
@@ -55,7 +55,7 @@ exports.RegisterRequest = {
|
|
|
55
55
|
decode(input, length) {
|
|
56
56
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
57
57
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
58
|
-
const message =
|
|
58
|
+
const message = createBaseRegisterCredentials();
|
|
59
59
|
while (reader.pos < end) {
|
|
60
60
|
const tag = reader.uint32();
|
|
61
61
|
switch (tag >>> 3) {
|
|
@@ -167,10 +167,10 @@ exports.Tokens = {
|
|
|
167
167
|
return message;
|
|
168
168
|
},
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function createBaseAuthResponse() {
|
|
171
171
|
return { userId: "", sessionId: "", email: "", tokens: undefined };
|
|
172
172
|
}
|
|
173
|
-
exports.
|
|
173
|
+
exports.AuthResponse = {
|
|
174
174
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
175
175
|
if (message.userId !== "") {
|
|
176
176
|
writer.uint32(10).string(message.userId);
|
|
@@ -189,7 +189,7 @@ exports.AuthTokensResponse = {
|
|
|
189
189
|
decode(input, length) {
|
|
190
190
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
191
191
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
192
|
-
const message =
|
|
192
|
+
const message = createBaseAuthResponse();
|
|
193
193
|
while (reader.pos < end) {
|
|
194
194
|
const tag = reader.uint32();
|
|
195
195
|
switch (tag >>> 3) {
|
|
@@ -439,10 +439,10 @@ exports.AuthServiceService = {
|
|
|
439
439
|
path: "/auth.AuthService/register",
|
|
440
440
|
requestStream: false,
|
|
441
441
|
responseStream: false,
|
|
442
|
-
requestSerialize: (value) => Buffer.from(exports.
|
|
443
|
-
requestDeserialize: (value) => exports.
|
|
444
|
-
responseSerialize: (value) => Buffer.from(exports.
|
|
445
|
-
responseDeserialize: (value) => exports.
|
|
442
|
+
requestSerialize: (value) => Buffer.from(exports.RegisterCredentials.encode(value).finish()),
|
|
443
|
+
requestDeserialize: (value) => exports.RegisterCredentials.decode(value),
|
|
444
|
+
responseSerialize: (value) => Buffer.from(exports.AuthResponse.encode(value).finish()),
|
|
445
|
+
responseDeserialize: (value) => exports.AuthResponse.decode(value),
|
|
446
446
|
},
|
|
447
447
|
refreshToken: {
|
|
448
448
|
path: "/auth.AuthService/refreshToken",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { SharedModule } from "./shared.module";
|
|
2
2
|
export { UsersClient } from "./user/user.client";
|
|
3
3
|
export { AuthClient } from "./auth/auth.client";
|
|
4
|
-
export { MessageFns as UserMessageFns, protobufPackage as UserProtobufPackage, CreateUserRequest, UpdateUserRequest, GetByIdRequest, UserResponse, UsersResponse, UserServiceService as UserService, } from "./user/user.interface";
|
|
5
|
-
export { MessageFns as AuthMessageFns, protobufPackage as AuthProtobufPackage,
|
|
4
|
+
export { MessageFns as UserMessageFns, protobufPackage as UserProtobufPackage, User, CreateUserRequest, UpdateUserRequest, GetByIdRequest, UserResponse, UsersResponse, UserServiceService as UserService, } from "./user/user.interface";
|
|
5
|
+
export { MessageFns as AuthMessageFns, protobufPackage as AuthProtobufPackage, RegisterCredentials, AuthResponse, } from "./auth/auth.interface";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AuthResponse = exports.RegisterCredentials = exports.AuthProtobufPackage = exports.UserService = exports.UsersResponse = exports.UserResponse = exports.GetByIdRequest = exports.UpdateUserRequest = exports.CreateUserRequest = exports.User = exports.UserProtobufPackage = exports.AuthClient = exports.UsersClient = exports.SharedModule = void 0;
|
|
4
4
|
var shared_module_1 = require("./shared.module");
|
|
5
5
|
Object.defineProperty(exports, "SharedModule", { enumerable: true, get: function () { return shared_module_1.SharedModule; } });
|
|
6
6
|
var user_client_1 = require("./user/user.client");
|
|
@@ -9,6 +9,7 @@ var auth_client_1 = require("./auth/auth.client");
|
|
|
9
9
|
Object.defineProperty(exports, "AuthClient", { enumerable: true, get: function () { return auth_client_1.AuthClient; } });
|
|
10
10
|
var user_interface_1 = require("./user/user.interface");
|
|
11
11
|
Object.defineProperty(exports, "UserProtobufPackage", { enumerable: true, get: function () { return user_interface_1.protobufPackage; } });
|
|
12
|
+
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return user_interface_1.User; } });
|
|
12
13
|
Object.defineProperty(exports, "CreateUserRequest", { enumerable: true, get: function () { return user_interface_1.CreateUserRequest; } });
|
|
13
14
|
Object.defineProperty(exports, "UpdateUserRequest", { enumerable: true, get: function () { return user_interface_1.UpdateUserRequest; } });
|
|
14
15
|
Object.defineProperty(exports, "GetByIdRequest", { enumerable: true, get: function () { return user_interface_1.GetByIdRequest; } });
|
|
@@ -17,5 +18,5 @@ Object.defineProperty(exports, "UsersResponse", { enumerable: true, get: functio
|
|
|
17
18
|
Object.defineProperty(exports, "UserService", { enumerable: true, get: function () { return user_interface_1.UserServiceService; } });
|
|
18
19
|
var auth_interface_1 = require("./auth/auth.interface");
|
|
19
20
|
Object.defineProperty(exports, "AuthProtobufPackage", { enumerable: true, get: function () { return auth_interface_1.protobufPackage; } });
|
|
20
|
-
Object.defineProperty(exports, "
|
|
21
|
-
Object.defineProperty(exports, "
|
|
21
|
+
Object.defineProperty(exports, "RegisterCredentials", { enumerable: true, get: function () { return auth_interface_1.RegisterCredentials; } });
|
|
22
|
+
Object.defineProperty(exports, "AuthResponse", { enumerable: true, get: function () { return auth_interface_1.AuthResponse; } });
|