@lumina-cinema/contracts 1.1.3 → 1.1.5

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/gen/auth.ts DELETED
@@ -1,240 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v2.10.1
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
- import { Empty } from "./google/protobuf/empty";
11
-
12
- export const protobufPackage = "auth.v1";
13
-
14
- /** Request to send an OTP to an identifier (email/phone). */
15
- export interface SendOtpRequest {
16
- /** Target identifier to deliver OTP to (e.g. "+31612345678" or "user@example.com"). */
17
- identifier: string;
18
- /** Identifier/delivery type. Recommended values: "phone" or "email". */
19
- type: string;
20
- }
21
-
22
- /** Send OTP result. */
23
- export interface SendOtpResponse {
24
- /** True if the OTP was accepted for delivery (does not necessarily guarantee delivery). */
25
- ok: boolean;
26
- }
27
-
28
- /** Request to verify an OTP for an identifier. */
29
- export interface VerifyOtpRequest {
30
- /** Identifier that received the OTP (must match the identifier used in SendOtp). */
31
- identifier: string;
32
- /** Identifier type used for delivery. Recommended values: "phone" or "email". */
33
- type: string;
34
- /** OTP code entered by the user. */
35
- code: string;
36
- }
37
-
38
- /** Successful OTP verification response. */
39
- export interface VerifyOtpResponse {
40
- /** Short-lived access token. */
41
- accessToken: string;
42
- /** Long-lived refresh token used to obtain new access tokens. */
43
- refreshToken: string;
44
- }
45
-
46
- /** Request to refresh tokens. */
47
- export interface RefreshRequest {
48
- /** Refresh token previously issued by the service. */
49
- refreshToken: string;
50
- }
51
-
52
- /** Response containing a new token pair. */
53
- export interface RefreshResponse {
54
- /** New access token. */
55
- accessToken: string;
56
- /** New refresh token (may be rotated on each refresh). */
57
- refreshToken: string;
58
- }
59
-
60
- /** Telegram initialization response. */
61
- export interface TelegramInitResponse {
62
- /** Telegram OAuth authorization URL to open in the client. */
63
- url: string;
64
- }
65
-
66
- /** Telegram verification request. */
67
- export interface TelegramVerifyRequest {
68
- /**
69
- * Raw query parameters returned by Telegram (must include `hash` and `auth_date`).
70
- * The service validates signature and freshness.
71
- */
72
- query: { [key: string]: string };
73
- }
74
-
75
- export interface TelegramVerifyRequest_QueryEntry {
76
- key: string;
77
- value: string;
78
- }
79
-
80
- /**
81
- * Telegram verification result.
82
- * The response depends on whether the account is fully linked.
83
- */
84
- export interface TelegramVerifyResponse {
85
- /** Bot deep link to continue/complete the flow (e.g. provide phone, confirm consent). */
86
- url?:
87
- | string
88
- | undefined;
89
- /** Access token issued when Telegram login can be completed immediately. */
90
- accessToken?:
91
- | string
92
- | undefined;
93
- /** Refresh token issued when Telegram login can be completed immediately. */
94
- refreshToken?: string | undefined;
95
- }
96
-
97
- /** Request to complete Telegram login by providing additional data. */
98
- export interface TelegramCompleteRequest {
99
- /** Telegram session identifier obtained from the bot deep link. */
100
- sessionId: string;
101
- /** Phone number to bind to the Telegram session (recommended E.164 format). */
102
- phone: string;
103
- }
104
-
105
- /** Telegram completion response. */
106
- export interface TelegramCompleteResponse {
107
- /** Session identifier that can be consumed to exchange for tokens. */
108
- sessionId: string;
109
- }
110
-
111
- /** Request to exchange a completed Telegram session for tokens. */
112
- export interface TelegramConsumeRequest {
113
- /** Session identifier from TelegramCompleteResponse. */
114
- sessionId: string;
115
- }
116
-
117
- /** Token pair returned after consuming a Telegram session. */
118
- export interface TelegramConsumeResponse {
119
- /** Access token. */
120
- accessToken: string;
121
- /** Refresh token. */
122
- refreshToken: string;
123
- }
124
-
125
- export const AUTH_V1_PACKAGE_NAME = "auth.v1";
126
-
127
- export interface AuthServiceClient {
128
- /**
129
- * Sends a one-time password (OTP) to the specified identifier (email/phone).
130
- * The identifier format and delivery channel are defined by `type`.
131
- */
132
-
133
- sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
134
-
135
- /**
136
- * Verifies the OTP provided by the user.
137
- * On success returns a new access/refresh token pair.
138
- */
139
-
140
- verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
141
-
142
- /** Exchanges a valid refresh token for a new access/refresh token pair. */
143
-
144
- refresh(request: RefreshRequest): Observable<RefreshResponse>;
145
-
146
- /** Initializes Telegram login flow and returns a Telegram authorization URL. */
147
-
148
- telegramInit(request: Empty): Observable<TelegramInitResponse>;
149
-
150
- /**
151
- * Verifies Telegram login payload (signature + auth_date) and starts/continues the flow.
152
- * Depending on the user state, may return tokens immediately or a bot deep link to complete signup.
153
- */
154
-
155
- telegramVerify(request: TelegramVerifyRequest): Observable<TelegramVerifyResponse>;
156
-
157
- /** Completes Telegram login flow by binding a phone number to the Telegram session. */
158
-
159
- telegramComplete(request: TelegramCompleteRequest): Observable<TelegramCompleteResponse>;
160
-
161
- /**
162
- * Consumes a completed Telegram session and returns access/refresh tokens.
163
- * Intended to be called once per session_id.
164
- */
165
-
166
- telegramConsume(request: TelegramConsumeRequest): Observable<TelegramConsumeResponse>;
167
- }
168
-
169
- export interface AuthServiceController {
170
- /**
171
- * Sends a one-time password (OTP) to the specified identifier (email/phone).
172
- * The identifier format and delivery channel are defined by `type`.
173
- */
174
-
175
- sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
176
-
177
- /**
178
- * Verifies the OTP provided by the user.
179
- * On success returns a new access/refresh token pair.
180
- */
181
-
182
- verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
183
-
184
- /** Exchanges a valid refresh token for a new access/refresh token pair. */
185
-
186
- refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
187
-
188
- /** Initializes Telegram login flow and returns a Telegram authorization URL. */
189
-
190
- telegramInit(request: Empty): Promise<TelegramInitResponse> | Observable<TelegramInitResponse> | TelegramInitResponse;
191
-
192
- /**
193
- * Verifies Telegram login payload (signature + auth_date) and starts/continues the flow.
194
- * Depending on the user state, may return tokens immediately or a bot deep link to complete signup.
195
- */
196
-
197
- telegramVerify(
198
- request: TelegramVerifyRequest,
199
- ): Promise<TelegramVerifyResponse> | Observable<TelegramVerifyResponse> | TelegramVerifyResponse;
200
-
201
- /** Completes Telegram login flow by binding a phone number to the Telegram session. */
202
-
203
- telegramComplete(
204
- request: TelegramCompleteRequest,
205
- ): Promise<TelegramCompleteResponse> | Observable<TelegramCompleteResponse> | TelegramCompleteResponse;
206
-
207
- /**
208
- * Consumes a completed Telegram session and returns access/refresh tokens.
209
- * Intended to be called once per session_id.
210
- */
211
-
212
- telegramConsume(
213
- request: TelegramConsumeRequest,
214
- ): Promise<TelegramConsumeResponse> | Observable<TelegramConsumeResponse> | TelegramConsumeResponse;
215
- }
216
-
217
- export function AuthServiceControllerMethods() {
218
- return function (constructor: Function) {
219
- const grpcMethods: string[] = [
220
- "sendOtp",
221
- "verifyOtp",
222
- "refresh",
223
- "telegramInit",
224
- "telegramVerify",
225
- "telegramComplete",
226
- "telegramConsume",
227
- ];
228
- for (const method of grpcMethods) {
229
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
230
- GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
231
- }
232
- const grpcStreamMethods: string[] = [];
233
- for (const method of grpcStreamMethods) {
234
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
235
- GrpcStreamMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
236
- }
237
- };
238
- }
239
-
240
- export const AUTH_SERVICE_NAME = "AuthService";
package/gen/users.ts DELETED
@@ -1,68 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v2.10.1
4
- // protoc v3.21.12
5
- // source: users.proto
6
-
7
- /* eslint-disable */
8
- import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
- import { Observable } from "rxjs";
10
-
11
- export const protobufPackage = "users.v1";
12
-
13
- export interface GetMeRequest {
14
- id: string;
15
- }
16
-
17
- export interface GetMeResponse {
18
- user: User | undefined;
19
- }
20
-
21
- export interface CreateUserRequest {
22
- id: string;
23
- }
24
-
25
- export interface CreateUserResponse {
26
- ok: boolean;
27
- }
28
-
29
- export interface User {
30
- id: string;
31
- name?: string | undefined;
32
- phone?: string | undefined;
33
- email?: string | undefined;
34
- avatar?: string | undefined;
35
- }
36
-
37
- export const USERS_V1_PACKAGE_NAME = "users.v1";
38
-
39
- export interface UsersServiceClient {
40
- getMe(request: GetMeRequest): Observable<GetMeResponse>;
41
-
42
- createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
43
- }
44
-
45
- export interface UsersServiceController {
46
- getMe(request: GetMeRequest): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
47
-
48
- createUser(
49
- request: CreateUserRequest,
50
- ): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
51
- }
52
-
53
- export function UsersServiceControllerMethods() {
54
- return function (constructor: Function) {
55
- const grpcMethods: string[] = ["getMe", "createUser"];
56
- for (const method of grpcMethods) {
57
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
58
- GrpcMethod("UsersService", method)(constructor.prototype[method], method, descriptor);
59
- }
60
- const grpcStreamMethods: string[] = [];
61
- for (const method of grpcStreamMethods) {
62
- const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
63
- GrpcStreamMethod("UsersService", method)(constructor.prototype[method], method, descriptor);
64
- }
65
- };
66
- }
67
-
68
- export const USERS_SERVICE_NAME = "UsersService";
File without changes