@ticket_for_cinema/contracts 1.0.5 → 1.0.8

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.
@@ -0,0 +1,28 @@
1
+ import { Observable } from "rxjs";
2
+ export declare const protobufPackage = "account.v1";
3
+ /** указываем версию протобуфера */
4
+ export declare enum Role {
5
+ USER = 0,
6
+ ADMIN = 1,
7
+ UNRECOGNIZED = -1
8
+ }
9
+ export interface GetAccountRequest {
10
+ id: string;
11
+ }
12
+ export interface GetAccountResponse {
13
+ id: string;
14
+ phone: string;
15
+ email: string;
16
+ isPhoneVerified: boolean;
17
+ isEmailVerified: boolean;
18
+ role: Role;
19
+ }
20
+ export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
21
+ export interface AccountServiceClient {
22
+ getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
23
+ }
24
+ export interface AccountServiceController {
25
+ getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
26
+ }
27
+ export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
28
+ export declare const ACCOUNT_SERVICE_NAME = "AccountService";
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v1.181.2
5
+ // protoc v6.33.2
6
+ // source: account.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ACCOUNT_SERVICE_NAME = exports.ACCOUNT_V1_PACKAGE_NAME = exports.Role = exports.protobufPackage = void 0;
9
+ exports.AccountServiceControllerMethods = AccountServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "account.v1";
13
+ /** указываем версию протобуфера */
14
+ var Role;
15
+ (function (Role) {
16
+ Role[Role["USER"] = 0] = "USER";
17
+ Role[Role["ADMIN"] = 1] = "ADMIN";
18
+ Role[Role["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
19
+ })(Role || (exports.Role = Role = {}));
20
+ exports.ACCOUNT_V1_PACKAGE_NAME = "account.v1";
21
+ function AccountServiceControllerMethods() {
22
+ return function (constructor) {
23
+ const grpcMethods = ["getAccount"];
24
+ for (const method of grpcMethods) {
25
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
26
+ (0, microservices_1.GrpcMethod)("AccountService", method)(constructor.prototype[method], method, descriptor);
27
+ }
28
+ const grpcStreamMethods = [];
29
+ for (const method of grpcStreamMethods) {
30
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
31
+ (0, microservices_1.GrpcStreamMethod)("AccountService", method)(constructor.prototype[method], method, descriptor);
32
+ }
33
+ };
34
+ }
35
+ exports.ACCOUNT_SERVICE_NAME = "AccountService";
@@ -0,0 +1,41 @@
1
+ import { Observable } from "rxjs";
2
+ export declare const protobufPackage = "auth.v1";
3
+ /** указываем версию протобуфера */
4
+ export interface SendOtpRequest {
5
+ /** менять номер нельзя, чтоб не было рассинхронизации данных */
6
+ identifier: string;
7
+ type: string;
8
+ }
9
+ export interface SendOtpResponse {
10
+ ok: boolean;
11
+ code: string;
12
+ }
13
+ export interface VerifyOtpRequest {
14
+ identifier: string;
15
+ type: string;
16
+ code: string;
17
+ }
18
+ export interface VerifyOtpResponse {
19
+ accessToken: string;
20
+ refreshToken: string;
21
+ }
22
+ export interface RefreshTokensRequest {
23
+ refreshToken: string;
24
+ }
25
+ export interface RefreshTokensResponse {
26
+ accessToken: string;
27
+ refreshToken: string;
28
+ }
29
+ export declare const AUTH_V1_PACKAGE_NAME = "auth.v1";
30
+ export interface AuthServiceClient {
31
+ sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
32
+ verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
33
+ refreshTokens(request: RefreshTokensRequest): Observable<RefreshTokensResponse>;
34
+ }
35
+ export interface AuthServiceController {
36
+ sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
37
+ verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
38
+ refreshTokens(request: RefreshTokensRequest): Promise<RefreshTokensResponse> | Observable<RefreshTokensResponse> | RefreshTokensResponse;
39
+ }
40
+ export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
41
+ export declare const AUTH_SERVICE_NAME = "AuthService";
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v1.181.2
5
+ // protoc v6.33.2
6
+ // source: auth.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.AUTH_SERVICE_NAME = exports.AUTH_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.AuthServiceControllerMethods = AuthServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "auth.v1";
13
+ exports.AUTH_V1_PACKAGE_NAME = "auth.v1";
14
+ function AuthServiceControllerMethods() {
15
+ return function (constructor) {
16
+ const grpcMethods = ["sendOtp", "verifyOtp", "refreshTokens"];
17
+ for (const method of grpcMethods) {
18
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
+ (0, microservices_1.GrpcMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
20
+ }
21
+ const grpcStreamMethods = [];
22
+ for (const method of grpcStreamMethods) {
23
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
24
+ (0, microservices_1.GrpcStreamMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
25
+ }
26
+ };
27
+ }
28
+ exports.AUTH_SERVICE_NAME = "AuthService";
@@ -0,0 +1,2 @@
1
+ export { SendOtpRequest, SendOtpResponse, VerifyOtpRequest, VerifyOtpResponse, RefreshTokensRequest, RefreshTokensResponse, AUTH_V1_PACKAGE_NAME, AuthServiceClient, AuthServiceController, AuthServiceControllerMethods, AUTH_SERVICE_NAME, } from "../gen/auth";
2
+ export { Role, GetAccountRequest, GetAccountResponse, ACCOUNT_V1_PACKAGE_NAME, AccountServiceClient, AccountServiceController, AccountServiceControllerMethods, ACCOUNT_SERVICE_NAME, } from "../gen/account";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ACCOUNT_SERVICE_NAME = exports.AccountServiceControllerMethods = exports.ACCOUNT_V1_PACKAGE_NAME = exports.Role = exports.AUTH_SERVICE_NAME = exports.AuthServiceControllerMethods = exports.AUTH_V1_PACKAGE_NAME = void 0;
4
+ var auth_1 = require("../gen/auth");
5
+ Object.defineProperty(exports, "AUTH_V1_PACKAGE_NAME", { enumerable: true, get: function () { return auth_1.AUTH_V1_PACKAGE_NAME; } });
6
+ Object.defineProperty(exports, "AuthServiceControllerMethods", { enumerable: true, get: function () { return auth_1.AuthServiceControllerMethods; } });
7
+ Object.defineProperty(exports, "AUTH_SERVICE_NAME", { enumerable: true, get: function () { return auth_1.AUTH_SERVICE_NAME; } });
8
+ var account_1 = require("../gen/account");
9
+ Object.defineProperty(exports, "Role", { enumerable: true, get: function () { return account_1.Role; } });
10
+ Object.defineProperty(exports, "ACCOUNT_V1_PACKAGE_NAME", { enumerable: true, get: function () { return account_1.ACCOUNT_V1_PACKAGE_NAME; } });
11
+ Object.defineProperty(exports, "AccountServiceControllerMethods", { enumerable: true, get: function () { return account_1.AccountServiceControllerMethods; } });
12
+ Object.defineProperty(exports, "ACCOUNT_SERVICE_NAME", { enumerable: true, get: function () { return account_1.ACCOUNT_SERVICE_NAME; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticket_for_cinema/contracts",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "Contracts for microservices",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./proto";
package/dist/index.js DELETED
@@ -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("./proto"), exports);
File without changes
File without changes
File without changes
File without changes