Compare commits

...

42 Commits
v1.0.7 ... main

Author SHA1 Message Date
0f7e7c6058 1.6.0
All checks were successful
Publish / Publish npm package action (push) Successful in 46s
Publish Go Bondings / Publish Go package action (push) Successful in 1m55s
2026-04-26 08:13:12 +03:00
96174b4d5d feat: add payment proto 2026-04-26 08:13:05 +03:00
b406d316db 1.5.0
All checks were successful
Publish / Publish npm package action (push) Successful in 58s
Publish Go Bondings / Publish Go package action (push) Successful in 1m53s
2026-04-22 06:23:22 +03:00
f6e360d58d feat: add screening proto 2026-04-22 06:23:11 +03:00
27d9310118 1.4.1
All checks were successful
Publish / Publish npm package action (push) Successful in 39s
Publish Go Bondings / Publish Go package action (push) Successful in 1m18s
2026-04-18 19:20:25 +03:00
7eb5a02a2d fix: fix hall type 2026-04-18 19:20:15 +03:00
2a1a909138 1.4.0
All checks were successful
Publish / Publish npm package action (push) Successful in 53s
Publish Go Bondings / Publish Go package action (push) Successful in 1m32s
2026-04-18 08:35:51 +03:00
bb9ff65861 feat: add hall and seat proto 2026-04-18 08:35:24 +03:00
a735405b7e 1.3.2
All checks were successful
Publish / Publish npm package action (push) Successful in 45s
Publish Go Bondings / Publish Go package action (push) Successful in 20m54s
2026-04-17 06:41:55 +03:00
a517282198 feat: change CreateTheaterResponse 2026-04-17 06:41:38 +03:00
eead3d5078 1.3.1
All checks were successful
Publish / Publish npm package action (push) Successful in 40s
Publish Go Bondings / Publish Go package action (push) Successful in 1m24s
2026-04-15 07:26:47 +03:00
276e1bb7e7 fix: add theater proto paths 2026-04-15 07:26:38 +03:00
67f2fc6472 1.3.0
All checks were successful
Publish / Publish npm package action (push) Successful in 45s
Publish Go Bondings / Publish Go package action (push) Successful in 1m22s
2026-04-15 07:24:22 +03:00
8dd77c9969 feat: add theater proto 2026-04-15 07:24:12 +03:00
db123f7162 1.2.3
All checks were successful
Publish / Publish npm package action (push) Successful in 36s
Publish Go Bondings / Publish Go package action (push) Successful in 1m20s
2026-04-10 06:06:03 +03:00
6a9e991782 fix: fix release date type 2026-04-10 06:05:56 +03:00
11c023a530 1.2.2
All checks were successful
Publish / Publish npm package action (push) Successful in 59s
Publish Go Bondings / Publish Go package action (push) Successful in 1m19s
2026-04-10 05:51:21 +03:00
2ec654e667 fix: fix rating age type 2026-04-10 05:51:09 +03:00
d6967c9358 1.2.1
All checks were successful
Publish / Publish npm package action (push) Successful in 48s
Publish Go Bondings / Publish Go package action (push) Successful in 1m13s
2026-04-05 08:59:32 +03:00
1bedcd92a0 fix: little fixes 2026-04-05 08:59:26 +03:00
359777f856 1.2.0
Some checks failed
Publish / Publish npm package action (push) Failing after 52s
Publish Go Bondings / Publish Go package action (push) Successful in 1m38s
2026-04-05 08:46:36 +03:00
7c6989f871 feat: add movie and category service 2026-04-05 08:46:25 +03:00
395f90b463 1.1.8
All checks were successful
Publish / Publish npm package action (push) Successful in 34s
Publish Go Bondings / Publish Go package action (push) Successful in 1m23s
2026-04-03 05:56:33 +03:00
f908a46d70 1.1.7
All checks were successful
Publish / Publish npm package action (push) Successful in 43s
2026-04-01 06:50:48 +03:00
09a13b587f feat: add media proto path 2026-04-01 06:50:38 +03:00
8c858038e7 1.1.6
Some checks failed
Publish Go Bondings / Publish Go package action (push) Successful in 2m50s
Publish / Publish npm package action (push) Has been cancelled
2026-04-01 05:10:12 +03:00
8079b25fef feat: add avatar in users service 2026-04-01 05:09:49 +03:00
e45bf05fb9 fix: little fixes
All checks were successful
Publish / Publish npm package action (push) Successful in 46s
Publish Go Bondings / Publish Go package action (push) Successful in 1m34s
2026-03-29 09:10:24 +03:00
e71b116e06 feat: add media.proto
Some checks failed
Publish / Publish npm package action (push) Successful in 1m4s
Publish Go Bondings / Publish Go package action (push) Failing after 1m30s
2026-03-29 09:01:27 +03:00
35b6eebab1 1.1.3
All checks were successful
Publish / Publish npm package action (push) Successful in 35s
2026-03-04 06:46:03 +03:00
f54e1456b4 feat: add user update
Some checks are pending
Publish / Publish npm package action (push) Has started running
2026-03-04 06:45:46 +03:00
d59357f6c9 feat: add typedoc documentation 2026-03-04 06:38:02 +03:00
b36d1cfc08 1.1.2
Some checks failed
Publish / Publish npm package action (push) Failing after 6m46s
2026-02-28 08:44:11 +03:00
df6121df20 feat: add users proto methods 2026-02-28 08:43:55 +03:00
28cf6b55ed 1.1.1
All checks were successful
Publish / Publish npm package action (push) Successful in 21s
2026-02-27 05:57:51 +03:00
97b5c29899 feat: add change phone/email interfaces 2026-02-27 05:57:45 +03:00
ffe6f37b6c 1.1.0
All checks were successful
Publish / Publish npm package action (push) Successful in 20s
2026-02-23 11:00:25 +03:00
023e136e23 feat: notification event 2026-02-23 11:00:17 +03:00
9a0e51154d 1.0.9
All checks were successful
Publish / Publish npm package action (push) Successful in 20s
2026-02-20 05:15:02 +03:00
3ae1b06fae feat: add telegram methods 2026-02-20 05:14:53 +03:00
18327d19d3 1.0.8
All checks were successful
Publish / Publish npm package action (push) Successful in 21s
2026-02-11 06:03:43 +03:00
1faa14c32f feat: add telegram methods 2026-02-11 06:03:34 +03:00
42 changed files with 2643 additions and 64 deletions

View File

@ -0,0 +1,36 @@
name: Publish Go Bondings
on:
push:
tags:
- 'v*.*.*'
jobs:
Publish Go package action:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install protoc
run: |
sudo apt update
sudo apt install -y protobuf-compiler
- name: Install Go Protobuf
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.1
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0
- name: Generate Go protobuf
run: bash ./scripts/generate_go.sh

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ pnpm-lock.yaml
.DS_Store
.log
.vscode/
docs/

199
README.md Normal file
View File

@ -0,0 +1,199 @@
# @teacinema/contracts
npm-пакет с контрактами для межсервисного взаимодействия: gRPC (протобафы) и события (message broker).
## Установка
```bash
yarn add @teacinema/contracts
```
---
## gRPC сервисы
Для подключения gRPC клиента используй `PROTO_PATHS` и соответствующее имя пакета.
| Сервис | Пакет proto | Описание |
|---|---|---|
| `AuthService` | `auth.v1` | Аутентификация (OTP, токены, Telegram) |
| `AccountService` | `account.v1` | Управление аккаунтом (email, телефон) |
| `UsersService` | `users.v1` | Профили пользователей |
### AuthService — `auth.v1`
| Метод | Запрос | Ответ | Описание |
|---|---|---|---|
| `SendOtp` | `SendOtpRequest` | `SendOtpResponse` | Отправить OTP-код |
| `VerifyOtp` | `VerifyOtpRequest` | `VerifyOtpResponse` | Проверить OTP, получить токены |
| `Refresh` | `RefreshRequest` | `RefreshResponse` | Обновить access/refresh токены |
| `TelegramInit` | `Empty` | `TelegramInitResponse` | Получить ссылку для Telegram-авторизации |
| `TelegramVerify` | `TelegramVerifyRequest` | `TelegramVerifyResponse` | Верифицировать данные от Telegram |
| `TelegramComplete` | `TelegramCompleteRequest` | `TelegramCompleteResponse` | Привязать телефон к Telegram-сессии |
| `TelegramConsume` | `TelegramConsumeRequest` | `TelegramConsumeResponse` | Получить токены из Telegram-сессии |
### AccountService — `account.v1`
| Метод | Запрос | Ответ | Описание |
|---|---|---|---|
| `GetAccount` | `GetAccountRequest` | `GetAccountResponse` | Получить данные аккаунта по ID |
| `InitEmailChange` | `InitEmailChangeRequest` | `InitEmailChangeResponse` | Инициировать смену email |
| `ConfirmEmailChange` | `ConfirmEmailChangeRequest` | `ConfirmEmailChangeResponse` | Подтвердить смену email |
| `InitPhoneChange` | `InitPhoneChangeRequest` | `InitPhoneChangeResponse` | Инициировать смену телефона |
| `ConfirmPhoneChange` | `ConfirmPhoneChangeRequest` | `ConfirmPhoneChangeResponse` | Подтвердить смену телефона |
### UsersService — `users.v1`
| Метод | Запрос | Ответ | Описание |
|---|---|---|---|
| `GetMe` | `GetMeRequest` | `GetMeResponse` | Получить профиль пользователя по ID |
| `CreateUser` | `CreateUserRequest` | `CreateUserResponse` | Создать нового пользователя |
| `PatchUser` | `PatchUserRequest` | `PatchUserResponse` | Обновить данные пользователя (частичное обновление) |
---
## Использование в NestJS
### 1. Регистрация gRPC клиента
```ts
import { ClientsModule, Transport } from '@nestjs/microservices';
import { PROTO_PATHS } from '@teacinema/contracts';
@Module({
imports: [
ClientsModule.register([
{
name: 'AUTH_SERVICE',
transport: Transport.GRPC,
options: {
protoPath: PROTO_PATHS.AUTH,
package: 'auth.v1',
url: 'localhost:5000',
},
},
{
name: 'ACCOUNT_SERVICE',
transport: Transport.GRPC,
options: {
protoPath: PROTO_PATHS.ACCOUNT,
package: 'account.v1',
url: 'localhost:5001',
},
},
{
name: 'USERS_SERVICE',
transport: Transport.GRPC,
options: {
protoPath: PROTO_PATHS.USERS,
package: 'users.v1',
url: 'localhost:5002',
},
},
]),
],
})
export class AppModule {}
```
### 2. Использование gRPC клиента
Типы клиентов генерируются из proto-файлов и находятся в `gen/`:
```ts
import { Inject, Injectable, OnModuleInit } from '@nestjs/common';
import { ClientGrpc } from '@nestjs/microservices';
import { AuthServiceClient } from '@teacinema/contracts/gen/ts/auth';
@Injectable()
export class AuthProxy implements OnModuleInit {
private authService: AuthServiceClient;
constructor(@Inject('AUTH_SERVICE') private client: ClientGrpc) {}
onModuleInit() {
this.authService = this.client.getService<AuthServiceClient>('AuthService');
}
sendOtp(identifier: string, type: string) {
return this.authService.sendOtp({ identifier, type });
}
}
```
### 3. Реализация gRPC сервера
```ts
import { Controller } from '@nestjs/common';
import { GrpcMethod } from '@nestjs/microservices';
import { AuthServiceController, AuthServiceControllerMethods } from '@teacinema/contracts/gen/ts/auth';
@Controller()
@AuthServiceControllerMethods()
export class AuthController implements AuthServiceController {
@GrpcMethod('AuthService', 'SendOtp')
sendOtp(request: SendOtpRequest): SendOtpResponse {
// ...
}
}
```
---
## События (Message Broker)
Интерфейсы событий для типизированного обмена через брокер сообщений (RabbitMQ, Kafka и др.).
| Интерфейс | Источник | Описание |
|---|---|---|
| `OtpRequestedEvent` | auth-service | Запрос на отправку OTP-кода |
| `EmailChangedEvent` | account-service | Инициация смены email |
| `PhoneChangedEvent` | account-service | Инициация смены телефона |
### Публикация события
```ts
import { OtpRequestedEvent } from '@teacinema/contracts';
client.emit<OtpRequestedEvent>('auth.otp_requested', {
identifier: '+79001234567',
code: '123456',
type: 'phone',
});
```
### Подписка на событие
```ts
import { EventPattern } from '@nestjs/microservices';
import { OtpRequestedEvent } from '@teacinema/contracts';
@Controller()
export class NotificationController {
@EventPattern('auth.otp_requested')
handleOtpRequested(data: OtpRequestedEvent) {
// отправить SMS или email с кодом
}
}
```
---
## Обновление типов из proto
После изменения `.proto` файлов — пересгенерировать TypeScript типы:
```bash
yarn generate
```
---
## Документация
Сгенерировать HTML-документацию и открыть в браузере:
```bash
yarn docs
open docs/index.html
```

View File

@ -1,62 +0,0 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.0
// protoc v6.33.4
// source: auth.proto
/* eslint-disable */
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
import { Observable } from "rxjs";
export const protobufPackage = "auth.v1";
export interface SendOtpRequest {
identifier: string;
type: string;
}
export interface SendOtpResponse {
ok: boolean;
}
export interface VerifyOtpRequest {
identifier: string;
type: string;
code: string;
}
export interface VerifyOtpResponse {
accessToken: string;
refreshToken: string;
}
export const AUTH_V1_PACKAGE_NAME = "auth.v1";
export interface AuthServiceClient {
sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
}
export interface AuthServiceController {
sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
}
export function AuthServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = ["sendOtp", "verifyOtp"];
for (const method of grpcMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
}
const grpcStreamMethods: string[] = [];
for (const method of grpcStreamMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcStreamMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
}
};
}
export const AUTH_SERVICE_NAME = "AuthService";

425
gen/go/media/media.pb.go Normal file
View File

@ -0,0 +1,425 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: media.proto
package media
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type UploadRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
Folder string `protobuf:"bytes,2,opt,name=folder,proto3" json:"folder,omitempty"`
ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
ResizeWidth *int32 `protobuf:"varint,5,opt,name=resize_width,json=resizeWidth,proto3,oneof" json:"resize_width,omitempty"`
ResizeHeight *int32 `protobuf:"varint,6,opt,name=resize_height,json=resizeHeight,proto3,oneof" json:"resize_height,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UploadRequest) Reset() {
*x = UploadRequest{}
mi := &file_media_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UploadRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UploadRequest) ProtoMessage() {}
func (x *UploadRequest) ProtoReflect() protoreflect.Message {
mi := &file_media_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UploadRequest.ProtoReflect.Descriptor instead.
func (*UploadRequest) Descriptor() ([]byte, []int) {
return file_media_proto_rawDescGZIP(), []int{0}
}
func (x *UploadRequest) GetFileName() string {
if x != nil {
return x.FileName
}
return ""
}
func (x *UploadRequest) GetFolder() string {
if x != nil {
return x.Folder
}
return ""
}
func (x *UploadRequest) GetContentType() string {
if x != nil {
return x.ContentType
}
return ""
}
func (x *UploadRequest) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
func (x *UploadRequest) GetResizeWidth() int32 {
if x != nil && x.ResizeWidth != nil {
return *x.ResizeWidth
}
return 0
}
func (x *UploadRequest) GetResizeHeight() int32 {
if x != nil && x.ResizeHeight != nil {
return *x.ResizeHeight
}
return 0
}
type UploadResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UploadResponse) Reset() {
*x = UploadResponse{}
mi := &file_media_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UploadResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UploadResponse) ProtoMessage() {}
func (x *UploadResponse) ProtoReflect() protoreflect.Message {
mi := &file_media_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UploadResponse.ProtoReflect.Descriptor instead.
func (*UploadResponse) Descriptor() ([]byte, []int) {
return file_media_proto_rawDescGZIP(), []int{1}
}
func (x *UploadResponse) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
type GetRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetRequest) Reset() {
*x = GetRequest{}
mi := &file_media_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetRequest) ProtoMessage() {}
func (x *GetRequest) ProtoReflect() protoreflect.Message {
mi := &file_media_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) Descriptor() ([]byte, []int) {
return file_media_proto_rawDescGZIP(), []int{2}
}
func (x *GetRequest) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
type GetResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetResponse) Reset() {
*x = GetResponse{}
mi := &file_media_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetResponse) ProtoMessage() {}
func (x *GetResponse) ProtoReflect() protoreflect.Message {
mi := &file_media_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) Descriptor() ([]byte, []int) {
return file_media_proto_rawDescGZIP(), []int{3}
}
func (x *GetResponse) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
func (x *GetResponse) GetContentType() string {
if x != nil {
return x.ContentType
}
return ""
}
type DeleteRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeleteRequest) Reset() {
*x = DeleteRequest{}
mi := &file_media_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeleteRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteRequest) ProtoMessage() {}
func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
mi := &file_media_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) Descriptor() ([]byte, []int) {
return file_media_proto_rawDescGZIP(), []int{4}
}
func (x *DeleteRequest) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
type DeleteResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeleteResponse) Reset() {
*x = DeleteResponse{}
mi := &file_media_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeleteResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteResponse) ProtoMessage() {}
func (x *DeleteResponse) ProtoReflect() protoreflect.Message {
mi := &file_media_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) Descriptor() ([]byte, []int) {
return file_media_proto_rawDescGZIP(), []int{5}
}
func (x *DeleteResponse) GetOk() bool {
if x != nil {
return x.Ok
}
return false
}
var File_media_proto protoreflect.FileDescriptor
const file_media_proto_rawDesc = "" +
"\n" +
"\vmedia.proto\x12\bmedia.v1\"\xf0\x01\n" +
"\rUploadRequest\x12\x1b\n" +
"\tfile_name\x18\x01 \x01(\tR\bfileName\x12\x16\n" +
"\x06folder\x18\x02 \x01(\tR\x06folder\x12!\n" +
"\fcontent_type\x18\x03 \x01(\tR\vcontentType\x12\x12\n" +
"\x04data\x18\x04 \x01(\fR\x04data\x12&\n" +
"\fresize_width\x18\x05 \x01(\x05H\x00R\vresizeWidth\x88\x01\x01\x12(\n" +
"\rresize_height\x18\x06 \x01(\x05H\x01R\fresizeHeight\x88\x01\x01B\x0f\n" +
"\r_resize_widthB\x10\n" +
"\x0e_resize_height\"\"\n" +
"\x0eUploadResponse\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\"\x1e\n" +
"\n" +
"GetRequest\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\"D\n" +
"\vGetResponse\x12\x12\n" +
"\x04data\x18\x01 \x01(\fR\x04data\x12!\n" +
"\fcontent_type\x18\x02 \x01(\tR\vcontentType\"!\n" +
"\rDeleteRequest\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\" \n" +
"\x0eDeleteResponse\x12\x0e\n" +
"\x02ok\x18\x01 \x01(\bR\x02ok2\xbc\x01\n" +
"\fMediaService\x12;\n" +
"\x06Upload\x12\x17.media.v1.UploadRequest\x1a\x18.media.v1.UploadResponse\x122\n" +
"\x03Get\x12\x14.media.v1.GetRequest\x1a\x15.media.v1.GetResponse\x12;\n" +
"\x06Delete\x12\x17.media.v1.DeleteRequest\x1a\x18.media.v1.DeleteResponseB;P\x01Z7git.ksv741.keenetic.pro/teacinema/contracts/media;mediab\x06proto3"
var (
file_media_proto_rawDescOnce sync.Once
file_media_proto_rawDescData []byte
)
func file_media_proto_rawDescGZIP() []byte {
file_media_proto_rawDescOnce.Do(func() {
file_media_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_media_proto_rawDesc), len(file_media_proto_rawDesc)))
})
return file_media_proto_rawDescData
}
var file_media_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_media_proto_goTypes = []any{
(*UploadRequest)(nil), // 0: media.v1.UploadRequest
(*UploadResponse)(nil), // 1: media.v1.UploadResponse
(*GetRequest)(nil), // 2: media.v1.GetRequest
(*GetResponse)(nil), // 3: media.v1.GetResponse
(*DeleteRequest)(nil), // 4: media.v1.DeleteRequest
(*DeleteResponse)(nil), // 5: media.v1.DeleteResponse
}
var file_media_proto_depIdxs = []int32{
0, // 0: media.v1.MediaService.Upload:input_type -> media.v1.UploadRequest
2, // 1: media.v1.MediaService.Get:input_type -> media.v1.GetRequest
4, // 2: media.v1.MediaService.Delete:input_type -> media.v1.DeleteRequest
1, // 3: media.v1.MediaService.Upload:output_type -> media.v1.UploadResponse
3, // 4: media.v1.MediaService.Get:output_type -> media.v1.GetResponse
5, // 5: media.v1.MediaService.Delete:output_type -> media.v1.DeleteResponse
3, // [3:6] is the sub-list for method output_type
0, // [0:3] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_media_proto_init() }
func file_media_proto_init() {
if File_media_proto != nil {
return
}
file_media_proto_msgTypes[0].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_media_proto_rawDesc), len(file_media_proto_rawDesc)),
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_media_proto_goTypes,
DependencyIndexes: file_media_proto_depIdxs,
MessageInfos: file_media_proto_msgTypes,
}.Build()
File_media_proto = out.File
file_media_proto_goTypes = nil
file_media_proto_depIdxs = nil
}

View File

@ -0,0 +1,197 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc v6.33.4
// source: media.proto
package media
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
MediaService_Upload_FullMethodName = "/media.v1.MediaService/Upload"
MediaService_Get_FullMethodName = "/media.v1.MediaService/Get"
MediaService_Delete_FullMethodName = "/media.v1.MediaService/Delete"
)
// MediaServiceClient is the client API for MediaService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MediaServiceClient interface {
Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (*UploadResponse, error)
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
}
type mediaServiceClient struct {
cc grpc.ClientConnInterface
}
func NewMediaServiceClient(cc grpc.ClientConnInterface) MediaServiceClient {
return &mediaServiceClient{cc}
}
func (c *mediaServiceClient) Upload(ctx context.Context, in *UploadRequest, opts ...grpc.CallOption) (*UploadResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UploadResponse)
err := c.cc.Invoke(ctx, MediaService_Upload_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *mediaServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetResponse)
err := c.cc.Invoke(ctx, MediaService_Get_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *mediaServiceClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DeleteResponse)
err := c.cc.Invoke(ctx, MediaService_Delete_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// MediaServiceServer is the server API for MediaService service.
// All implementations must embed UnimplementedMediaServiceServer
// for forward compatibility.
type MediaServiceServer interface {
Upload(context.Context, *UploadRequest) (*UploadResponse, error)
Get(context.Context, *GetRequest) (*GetResponse, error)
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
mustEmbedUnimplementedMediaServiceServer()
}
// UnimplementedMediaServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedMediaServiceServer struct{}
func (UnimplementedMediaServiceServer) Upload(context.Context, *UploadRequest) (*UploadResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Upload not implemented")
}
func (UnimplementedMediaServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedMediaServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedMediaServiceServer) mustEmbedUnimplementedMediaServiceServer() {}
func (UnimplementedMediaServiceServer) testEmbeddedByValue() {}
// UnsafeMediaServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MediaServiceServer will
// result in compilation errors.
type UnsafeMediaServiceServer interface {
mustEmbedUnimplementedMediaServiceServer()
}
func RegisterMediaServiceServer(s grpc.ServiceRegistrar, srv MediaServiceServer) {
// If the following call panics, it indicates UnimplementedMediaServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&MediaService_ServiceDesc, srv)
}
func _MediaService_Upload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UploadRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MediaServiceServer).Upload(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MediaService_Upload_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MediaServiceServer).Upload(ctx, req.(*UploadRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MediaService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MediaServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MediaService_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MediaServiceServer).Get(ctx, req.(*GetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MediaService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MediaServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MediaService_Delete_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MediaServiceServer).Delete(ctx, req.(*DeleteRequest))
}
return interceptor(ctx, in, info, handler)
}
// MediaService_ServiceDesc is the grpc.ServiceDesc for MediaService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MediaService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "media.v1.MediaService",
HandlerType: (*MediaServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Upload",
Handler: _MediaService_Upload_Handler,
},
{
MethodName: "Get",
Handler: _MediaService_Get_Handler,
},
{
MethodName: "Delete",
Handler: _MediaService_Delete_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "media.proto",
}

127
gen/ts/account.ts Normal file
View File

@ -0,0 +1,127 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.0
// protoc v6.33.4
// source: account.proto
/* eslint-disable */
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
import { Observable } from "rxjs";
export const protobufPackage = "account.v1";
export enum Role {
USER = 0,
ADMIN = 1,
UNRECOGNIZED = -1,
}
export interface GetAccountRequest {
id: string;
}
export interface GetAccountResponse {
id: string;
phone: string;
email: string;
isPhoneVerified: boolean;
isEmailVerified: boolean;
role: Role;
}
export interface InitEmailChangeRequest {
email: string;
userId: string;
}
export interface InitEmailChangeResponse {
ok: boolean;
}
export interface ConfirmEmailChangeRequest {
email: string;
code: string;
userId: string;
}
export interface ConfirmEmailChangeResponse {
ok: boolean;
}
export interface InitPhoneChangeRequest {
phone: string;
userId: string;
}
export interface InitPhoneChangeResponse {
ok: boolean;
}
export interface ConfirmPhoneChangeRequest {
phone: string;
code: string;
userId: string;
}
export interface ConfirmPhoneChangeResponse {
ok: boolean;
}
export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
export interface AccountServiceClient {
getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
initEmailChange(request: InitEmailChangeRequest): Observable<InitEmailChangeResponse>;
confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
}
export interface AccountServiceController {
getAccount(
request: GetAccountRequest,
): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
initEmailChange(
request: InitEmailChangeRequest,
): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
confirmEmailChange(
request: ConfirmEmailChangeRequest,
): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
initPhoneChange(
request: InitPhoneChangeRequest,
): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
confirmPhoneChange(
request: ConfirmPhoneChangeRequest,
): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
}
export function AccountServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = [
"getAccount",
"initEmailChange",
"confirmEmailChange",
"initPhoneChange",
"confirmPhoneChange",
];
for (const method of grpcMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
}
const grpcStreamMethods: string[] = [];
for (const method of grpcStreamMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcStreamMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
}
};
}
export const ACCOUNT_SERVICE_NAME = "AccountService";

143
gen/ts/auth.ts Normal file
View File

@ -0,0 +1,143 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.0
// protoc v6.33.4
// source: auth.proto
/* eslint-disable */
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
import { Observable } from "rxjs";
import { Empty } from "./google/protobuf/empty";
export const protobufPackage = "auth.v1";
export interface SendOtpRequest {
identifier: string;
type: string;
}
export interface SendOtpResponse {
ok: boolean;
}
export interface VerifyOtpRequest {
identifier: string;
type: string;
code: string;
}
export interface VerifyOtpResponse {
accessToken: string;
refreshToken: string;
}
export interface RefreshRequest {
refreshToken: string;
}
export interface RefreshResponse {
accessToken: string;
refreshToken: string;
}
export interface TelegramInitResponse {
url: string;
}
export interface TelegramVerifyRequest {
query: { [key: string]: string };
}
export interface TelegramVerifyRequest_QueryEntry {
key: string;
value: string;
}
export interface TelegramVerifyResponse {
url?: string | undefined;
accessToken?: string | undefined;
refreshToken?: string | undefined;
}
export interface TelegramCompleteRequest {
sessionId: string;
phone: string;
}
export interface TelegramCompleteResponse {
sessionId: string;
}
export interface TelegramConsumeRequest {
sessionId: string;
}
export interface TelegramConsumeResponse {
accessToken: string;
refreshToken: string;
}
export const AUTH_V1_PACKAGE_NAME = "auth.v1";
export interface AuthServiceClient {
sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
refresh(request: RefreshRequest): Observable<RefreshResponse>;
telegramInit(request: Empty): Observable<TelegramInitResponse>;
telegramVerify(request: TelegramVerifyRequest): Observable<TelegramVerifyResponse>;
telegramComplete(request: TelegramCompleteRequest): Observable<TelegramCompleteResponse>;
telegramConsume(request: TelegramConsumeRequest): Observable<TelegramConsumeResponse>;
}
export interface AuthServiceController {
sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
telegramInit(request: Empty): Promise<TelegramInitResponse> | Observable<TelegramInitResponse> | TelegramInitResponse;
telegramVerify(
request: TelegramVerifyRequest,
): Promise<TelegramVerifyResponse> | Observable<TelegramVerifyResponse> | TelegramVerifyResponse;
telegramComplete(
request: TelegramCompleteRequest,
): Promise<TelegramCompleteResponse> | Observable<TelegramCompleteResponse> | TelegramCompleteResponse;
telegramConsume(
request: TelegramConsumeRequest,
): Promise<TelegramConsumeResponse> | Observable<TelegramConsumeResponse> | TelegramConsumeResponse;
}
export function AuthServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = [
"sendOtp",
"verifyOtp",
"refresh",
"telegramInit",
"telegramVerify",
"telegramComplete",
"telegramConsume",
];
for (const method of grpcMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
}
const grpcStreamMethods: string[] = [];
for (const method of grpcStreamMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcStreamMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
}
};
}
export const AUTH_SERVICE_NAME = "AuthService";

51
gen/ts/category.ts Normal file
View File

@ -0,0 +1,51 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.0
// protoc v6.33.4
// source: category.proto
/* eslint-disable */
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
import { Observable } from "rxjs";
import { Empty } from "./google/protobuf/empty";
export const protobufPackage = "category.v1";
export interface GetAllCategoriesResponse {
categories: Category[];
}
export interface Category {
id: string;
title: string;
slug: string;
}
export const CATEGORY_V1_PACKAGE_NAME = "category.v1";
export interface CategoryServiceClient {
getAllCategories(request: Empty): Observable<GetAllCategoriesResponse>;
}
export interface CategoryServiceController {
getAllCategories(
request: Empty,
): Promise<GetAllCategoriesResponse> | Observable<GetAllCategoriesResponse> | GetAllCategoriesResponse;
}
export function CategoryServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = ["getAllCategories"];
for (const method of grpcMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcMethod("CategoryService", method)(constructor.prototype[method], method, descriptor);
}
const grpcStreamMethods: string[] = [];
for (const method of grpcStreamMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcStreamMethod("CategoryService", method)(constructor.prototype[method], method, descriptor);
}
};
}
export const CATEGORY_SERVICE_NAME = "CategoryService";

View File

@ -0,0 +1,23 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.0
// protoc v6.33.4
// source: google/protobuf/empty.proto
/* eslint-disable */
export const protobufPackage = "google.protobuf";
/**
* A generic empty message that you can re-use to avoid defining duplicated
* empty messages in your APIs. A typical example is to use it as the request
* or the response type of an API method. For instance:
*
* service Foo {
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
* }
*/
export interface Empty {
}
export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";

View File

@ -0,0 +1,119 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.0
// protoc v6.33.4
// source: google/protobuf/timestamp.proto
/* eslint-disable */
export const protobufPackage = "google.protobuf";
/**
* A Timestamp represents a point in time independent of any time zone or local
* calendar, encoded as a count of seconds and fractions of seconds at
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
* January 1, 1970, in the proleptic Gregorian calendar which extends the
* Gregorian calendar backwards to year one.
*
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
* second table is needed for interpretation, using a [24-hour linear
* smear](https://developers.google.com/time/smear).
*
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
* restricting to that range, we ensure that we can convert to and from [RFC
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
*
* # Examples
*
* Example 1: Compute Timestamp from POSIX `time()`.
*
* Timestamp timestamp;
* timestamp.set_seconds(time(NULL));
* timestamp.set_nanos(0);
*
* Example 2: Compute Timestamp from POSIX `gettimeofday()`.
*
* struct timeval tv;
* gettimeofday(&tv, NULL);
*
* Timestamp timestamp;
* timestamp.set_seconds(tv.tv_sec);
* timestamp.set_nanos(tv.tv_usec * 1000);
*
* Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
*
* FILETIME ft;
* GetSystemTimeAsFileTime(&ft);
* UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
*
* // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
* // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
* Timestamp timestamp;
* timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
* timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
*
* Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
*
* long millis = System.currentTimeMillis();
*
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
* .setNanos((int) ((millis % 1000) * 1000000)).build();
*
* Example 5: Compute Timestamp from Java `Instant.now()`.
*
* Instant now = Instant.now();
*
* Timestamp timestamp =
* Timestamp.newBuilder().setSeconds(now.getEpochSecond())
* .setNanos(now.getNano()).build();
*
* Example 6: Compute Timestamp from current time in Python.
*
* timestamp = Timestamp()
* timestamp.GetCurrentTime()
*
* # JSON Mapping
*
* In JSON format, the Timestamp type is encoded as a string in the
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
* where {year} is always expressed using four digits while {month}, {day},
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
* is required. A proto3 JSON serializer should always use UTC (as indicated by
* "Z") when printing the Timestamp type and a proto3 JSON parser should be
* able to accept both UTC and other timezones (as indicated by an offset).
*
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
* 01:30 UTC on January 15, 2017.
*
* In JavaScript, one can convert a Date object to this format using the
* standard
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
* method. In Python, a standard `datetime.datetime` object can be converted
* to this format using
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
* http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
* ) to obtain a formatter capable of generating timestamps in this format.
*/
export interface Timestamp {
/**
* Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
* be between -315576000000 and 315576000000 inclusive (which corresponds to
* 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
*/
seconds: number;
/**
* Non-negative fractions of a second at nanosecond resolution. This field is
* the nanosecond portion of the duration, not an alternative to seconds.
* Negative second values with fractions must still have non-negative nanos
* values that count forward in time. Must be between 0 and 999,999,999
* inclusive.
*/
nanos: number;
}
export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";

89
gen/ts/hall.ts Normal file
View File

@ -0,0 +1,89 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.0
// protoc v6.33.4
// source: hall.proto
/* eslint-disable */
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
import { Observable } from "rxjs";
export const protobufPackage = "hall.v1";
export interface CreateHallRequest {
name: string;
theaterId: string;
layout: RowLayout[];
}
export interface CreateHallResponse {
hall: Hall | undefined;
}
export interface ListHallsByTheaterRequest {
theaterId: string;
}
export interface ListHallsByTheaterResponse {
halls: Hall[];
}
export interface GetHallRequest {
id: string;
}
export interface GetHallResponse {
hall: Hall | undefined;
}
export interface Hall {
id: string;
name: string;
theaterId: string;
}
export interface RowLayout {
row: number;
columns: number;
type: string;
price: number;
}
export const HALL_V1_PACKAGE_NAME = "hall.v1";
export interface HallServiceClient {
createHall(request: CreateHallRequest): Observable<CreateHallResponse>;
getHall(request: GetHallRequest): Observable<GetHallResponse>;
listHallsByTheater(request: ListHallsByTheaterRequest): Observable<ListHallsByTheaterResponse>;
}
export interface HallServiceController {
createHall(
request: CreateHallRequest,
): Promise<CreateHallResponse> | Observable<CreateHallResponse> | CreateHallResponse;
getHall(request: GetHallRequest): Promise<GetHallResponse> | Observable<GetHallResponse> | GetHallResponse;
listHallsByTheater(
request: ListHallsByTheaterRequest,
): Promise<ListHallsByTheaterResponse> | Observable<ListHallsByTheaterResponse> | ListHallsByTheaterResponse;
}
export function HallServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = ["createHall", "getHall", "listHallsByTheater"];
for (const method of grpcMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcMethod("HallService", method)(constructor.prototype[method], method, descriptor);
}
const grpcStreamMethods: string[] = [];
for (const method of grpcStreamMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcStreamMethod("HallService", method)(constructor.prototype[method], method, descriptor);
}
};
}
export const HALL_SERVICE_NAME = "HallService";

76
gen/ts/media.ts Normal file
View File

@ -0,0 +1,76 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.0
// protoc v6.33.4
// source: media.proto
/* eslint-disable */
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
import { Observable } from "rxjs";
export const protobufPackage = "media.v1";
export interface UploadRequest {
fileName: string;
folder: string;
contentType: string;
data: Uint8Array;
resizeWidth?: number | undefined;
resizeHeight?: number | undefined;
}
export interface UploadResponse {
key: string;
}
export interface GetRequest {
key: string;
}
export interface GetResponse {
data: Uint8Array;
contentType: string;
}
export interface DeleteRequest {
key: string;
}
export interface DeleteResponse {
ok: boolean;
}
export const MEDIA_V1_PACKAGE_NAME = "media.v1";
export interface MediaServiceClient {
upload(request: UploadRequest): Observable<UploadResponse>;
get(request: GetRequest): Observable<GetResponse>;
delete(request: DeleteRequest): Observable<DeleteResponse>;
}
export interface MediaServiceController {
upload(request: UploadRequest): Promise<UploadResponse> | Observable<UploadResponse> | UploadResponse;
get(request: GetRequest): Promise<GetResponse> | Observable<GetResponse> | GetResponse;
delete(request: DeleteRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
}
export function MediaServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = ["upload", "get", "delete"];
for (const method of grpcMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcMethod("MediaService", method)(constructor.prototype[method], method, descriptor);
}
const grpcStreamMethods: string[] = [];
for (const method of grpcStreamMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcStreamMethod("MediaService", method)(constructor.prototype[method], method, descriptor);
}
};
}
export const MEDIA_SERVICE_NAME = "MediaService";

84
gen/ts/movie.ts Normal file
View File

@ -0,0 +1,84 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.0
// protoc v6.33.4
// source: movie.proto
/* eslint-disable */
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
import { Observable } from "rxjs";
import { Timestamp } from "./google/protobuf/timestamp";
export const protobufPackage = "movie.v1";
export interface ListMovieRequest {
category: string;
random: boolean;
limit: number;
}
export interface ListMovieResponse {
movies: Movie[];
}
export interface GetMovieRequest {
id?: string | undefined;
slug?: string | undefined;
}
export interface GetMovieResponse {
movie: MovieDetails | undefined;
}
export interface Movie {
id: string;
title: string;
slug: string;
poster: string;
ratingAge: number;
releaseDate: Timestamp | undefined;
}
export interface MovieDetails {
id: string;
title: string;
slug: string;
description: string;
poster: string;
banner: string;
duration: number;
ratingAge: number;
country: string;
releaseDate: Timestamp | undefined;
}
export const MOVIE_V1_PACKAGE_NAME = "movie.v1";
export interface MovieServiceClient {
listMovies(request: ListMovieRequest): Observable<ListMovieResponse>;
getMovie(request: GetMovieRequest): Observable<GetMovieResponse>;
}
export interface MovieServiceController {
listMovies(request: ListMovieRequest): Promise<ListMovieResponse> | Observable<ListMovieResponse> | ListMovieResponse;
getMovie(request: GetMovieRequest): Promise<GetMovieResponse> | Observable<GetMovieResponse> | GetMovieResponse;
}
export function MovieServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = ["listMovies", "getMovie"];
for (const method of grpcMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcMethod("MovieService", method)(constructor.prototype[method], method, descriptor);
}
const grpcStreamMethods: string[] = [];
for (const method of grpcStreamMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcStreamMethod("MovieService", method)(constructor.prototype[method], method, descriptor);
}
};
}
export const MOVIE_SERVICE_NAME = "MovieService";

129
gen/ts/screening.ts Normal file
View File

@ -0,0 +1,129 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.0
// protoc v6.33.4
// source: screening.proto
/* eslint-disable */
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
import { Observable } from "rxjs";
export const protobufPackage = "screening.v1";
export interface CreateScreeningRequest {
movieId: string;
hallId: string;
startAt: string;
endAt: string;
}
export interface CreateScreeningResponse {
ok: boolean;
}
export interface GetScreeningRequest {
id: string;
}
export interface GetScreeningResponse {
screening: Screening | undefined;
}
export interface GetScreeningsRequest {
theaterId?: string | undefined;
date?: string | undefined;
}
export interface GetScreeningsResponse {
screenings: Screening[];
}
export interface GetScreeningsByMovieRequest {
movieId: string;
date?: string | undefined;
}
export interface GetScreeningsByMovieResponse {
screenings: Screening[];
}
export interface Screening {
id: string;
startAt: string;
endAt: string;
theater: Theater | undefined;
hall: Hall | undefined;
movie: Movie | undefined;
seatTypes: SeatType[];
}
export interface Movie {
id: string;
title: string;
slug: string;
duration: number;
banner: string;
}
export interface Theater {
id: string;
name: string;
adress: string;
}
export interface Hall {
id: string;
name: string;
}
export interface SeatType {
type: string;
price: number;
}
export const SCREENING_V1_PACKAGE_NAME = "screening.v1";
export interface ScreeningServiceClient {
createScreening(request: CreateScreeningRequest): Observable<CreateScreeningResponse>;
getScreening(request: GetScreeningRequest): Observable<GetScreeningResponse>;
getScreenings(request: GetScreeningsRequest): Observable<GetScreeningsResponse>;
getScreeningsByMovie(request: GetScreeningsByMovieRequest): Observable<GetScreeningsByMovieResponse>;
}
export interface ScreeningServiceController {
createScreening(
request: CreateScreeningRequest,
): Promise<CreateScreeningResponse> | Observable<CreateScreeningResponse> | CreateScreeningResponse;
getScreening(
request: GetScreeningRequest,
): Promise<GetScreeningResponse> | Observable<GetScreeningResponse> | GetScreeningResponse;
getScreenings(
request: GetScreeningsRequest,
): Promise<GetScreeningsResponse> | Observable<GetScreeningsResponse> | GetScreeningsResponse;
getScreeningsByMovie(
request: GetScreeningsByMovieRequest,
): Promise<GetScreeningsByMovieResponse> | Observable<GetScreeningsByMovieResponse> | GetScreeningsByMovieResponse;
}
export function ScreeningServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = ["createScreening", "getScreening", "getScreenings", "getScreeningsByMovie"];
for (const method of grpcMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcMethod("ScreeningService", method)(constructor.prototype[method], method, descriptor);
}
const grpcStreamMethods: string[] = [];
for (const method of grpcStreamMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcStreamMethod("ScreeningService", method)(constructor.prototype[method], method, descriptor);
}
};
}
export const SCREENING_SERVICE_NAME = "ScreeningService";

71
gen/ts/seat.ts Normal file
View File

@ -0,0 +1,71 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.0
// protoc v6.33.4
// source: seat.proto
/* eslint-disable */
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
import { Observable } from "rxjs";
export const protobufPackage = "seat.v1";
export interface GetSeatRequest {
id: string;
}
export interface GetSeatResponse {
seat: Seat | undefined;
}
export interface ListSeatsByHallRequest {
hallId: string;
screeningId: string;
}
export interface ListSeatsByHallResponse {
seats: Seat[];
}
export interface Seat {
id: string;
row: number;
number: number;
price: number;
status: string;
type: string;
hallId: string;
}
export const SEAT_V1_PACKAGE_NAME = "seat.v1";
export interface SeatServiceClient {
getSeat(request: GetSeatRequest): Observable<GetSeatResponse>;
listSeatsByHall(request: ListSeatsByHallRequest): Observable<ListSeatsByHallResponse>;
}
export interface SeatServiceController {
getSeat(request: GetSeatRequest): Promise<GetSeatResponse> | Observable<GetSeatResponse> | GetSeatResponse;
listSeatsByHall(
request: ListSeatsByHallRequest,
): Promise<ListSeatsByHallResponse> | Observable<ListSeatsByHallResponse> | ListSeatsByHallResponse;
}
export function SeatServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = ["getSeat", "listSeatsByHall"];
for (const method of grpcMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcMethod("SeatService", method)(constructor.prototype[method], method, descriptor);
}
const grpcStreamMethods: string[] = [];
for (const method of grpcStreamMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcStreamMethod("SeatService", method)(constructor.prototype[method], method, descriptor);
}
};
}
export const SEAT_SERVICE_NAME = "SeatService";

78
gen/ts/theater.ts Normal file
View File

@ -0,0 +1,78 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.0
// protoc v6.33.4
// source: theater.proto
/* eslint-disable */
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
import { Observable } from "rxjs";
import { Empty } from "./google/protobuf/empty";
export const protobufPackage = "theater.v1";
export interface ListTheaterResponse {
theaters: Theater[];
}
export interface GetTheaterRequest {
id: string;
}
export interface GetTheaterResponse {
theater: Theater | undefined;
}
export interface CreateTheaterRequest {
name: string;
address: string;
}
export interface CreateTheaterResponse {
theater: Theater | undefined;
}
export interface Theater {
id: string;
name: string;
address: string;
}
export const THEATER_V1_PACKAGE_NAME = "theater.v1";
export interface TheaterServiceClient {
listTheater(request: Empty): Observable<ListTheaterResponse>;
getTheater(request: GetTheaterRequest): Observable<GetTheaterResponse>;
createTheater(request: CreateTheaterRequest): Observable<CreateTheaterResponse>;
}
export interface TheaterServiceController {
listTheater(request: Empty): Promise<ListTheaterResponse> | Observable<ListTheaterResponse> | ListTheaterResponse;
getTheater(
request: GetTheaterRequest,
): Promise<GetTheaterResponse> | Observable<GetTheaterResponse> | GetTheaterResponse;
createTheater(
request: CreateTheaterRequest,
): Promise<CreateTheaterResponse> | Observable<CreateTheaterResponse> | CreateTheaterResponse;
}
export function TheaterServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = ["listTheater", "getTheater", "createTheater"];
for (const method of grpcMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcMethod("TheaterService", method)(constructor.prototype[method], method, descriptor);
}
const grpcStreamMethods: string[] = [];
for (const method of grpcStreamMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcStreamMethod("TheaterService", method)(constructor.prototype[method], method, descriptor);
}
};
}
export const THEATER_SERVICE_NAME = "TheaterService";

82
gen/ts/users.ts Normal file
View File

@ -0,0 +1,82 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.11.0
// protoc v6.33.4
// source: users.proto
/* eslint-disable */
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
import { Observable } from "rxjs";
export const protobufPackage = "users.v1";
export interface GetMeRequest {
id: string;
}
export interface GetMeResponse {
user: User | undefined;
}
export interface CreateUserRequest {
id: string;
}
export interface CreateUserResponse {
ok: boolean;
}
export interface User {
id: string;
name?: string | undefined;
phone?: string | undefined;
email?: string | undefined;
avatar?: string | undefined;
}
export interface PatchUserRequest {
userId: string;
name?: string | undefined;
avatar?: string | undefined;
}
export interface PatchUserResponse {
ok: boolean;
}
export const USERS_V1_PACKAGE_NAME = "users.v1";
export interface UsersServiceClient {
getMe(request: GetMeRequest): Observable<GetMeResponse>;
createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
patchUser(request: PatchUserRequest): Observable<PatchUserResponse>;
}
export interface UsersServiceController {
getMe(request: GetMeRequest): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
createUser(
request: CreateUserRequest,
): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
patchUser(request: PatchUserRequest): Promise<PatchUserResponse> | Observable<PatchUserResponse> | PatchUserResponse;
}
export function UsersServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = ["getMe", "createUser", "patchUser"];
for (const method of grpcMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcMethod("UsersService", method)(constructor.prototype[method], method, descriptor);
}
const grpcStreamMethods: string[] = [];
for (const method of grpcStreamMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcStreamMethod("UsersService", method)(constructor.prototype[method], method, descriptor);
}
};
}
export const USERS_SERVICE_NAME = "UsersService";

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module git.ksv741.keenetic.pro/teacinema/contracts
go 1.26.1

View File

@ -1,10 +1,11 @@
{
"name": "@teacinema/contracts",
"version": "1.0.7",
"version": "1.6.0",
"description": "Protocol Buffers contracts for microservices",
"scripts": {
"build": "tsc -p tsconfig.build.json",
"generate": "npx protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
"generate": "npx protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen/ts --ts_proto_opt=nestJs=true,package=omit",
"docs": "typedoc"
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@ -24,6 +25,7 @@
},
"devDependencies": {
"@types/node": "^25.0.10",
"typedoc": "^0.28.17",
"typescript": "^5.9.3"
}
}

View File

@ -2,10 +2,17 @@ syntax = "proto3";
package auth.v1;
import "google/protobuf/empty.proto";
service AuthService {
rpc SendOtp(SendOtpRequest) returns (SendOtpResponse);
rpc VerifyOtp(VerifyOtpRequest) returns (VerifyOtpResponse);
rpc Refresh(RefreshRequest) returns (RefreshResponse);
rpc TelegramInit(google.protobuf.Empty) returns (TelegramInitResponse);
rpc TelegramVerify(TelegramVerifyRequest) returns (TelegramVerifyResponse);
rpc TelegramComplete(TelegramCompleteRequest) returns (TelegramCompleteResponse);
rpc TelegramConsume(TelegramConsumeRequest) returns (TelegramConsumeResponse);
}
message SendOtpRequest {
@ -36,3 +43,33 @@ message RefreshResponse {
string access_token = 1;
string refresh_token = 2;
}
message TelegramInitResponse {
string url = 1;
}
message TelegramVerifyRequest {
map<string, string> query = 1;
}
message TelegramVerifyResponse {
oneof result {
string url = 1;
string access_token = 2;
string refresh_token = 3;
}
}
message TelegramCompleteRequest {
string session_id = 1;
string phone = 2;
}
message TelegramCompleteResponse {
string session_id = 1;
}
message TelegramConsumeRequest {
string session_id = 1;
}
message TelegramConsumeResponse {
string access_token = 1;
string refresh_token = 2;
}

19
proto/category.proto Normal file
View File

@ -0,0 +1,19 @@
syntax = "proto3";
package category.v1;
import "google/protobuf/empty.proto";
service CategoryService {
rpc GetAllCategories (google.protobuf.Empty) returns (GetAllCategoriesResponse);
}
message GetAllCategoriesResponse {
repeated Category categories = 1;
}
message Category {
string id = 1;
string title = 2;
string slug = 3;
}

48
proto/hall.proto Normal file
View File

@ -0,0 +1,48 @@
syntax = "proto3";
package hall.v1;
service HallService {
rpc CreateHall (CreateHallRequest) returns (CreateHallResponse);
rpc GetHall (GetHallRequest) returns (GetHallResponse);
rpc ListHallsByTheater (ListHallsByTheaterRequest) returns (ListHallsByTheaterResponse);
}
message CreateHallRequest {
string name = 1;
string theater_id = 2;
repeated RowLayout layout = 3;
}
message CreateHallResponse {
Hall hall = 1;
}
message ListHallsByTheaterRequest {
string theater_id = 1;
}
message ListHallsByTheaterResponse {
repeated Hall halls = 1;
}
message GetHallRequest {
string id = 1;
}
message GetHallResponse {
Hall hall = 1;
}
message Hall {
string id = 1;
string name = 2;
string theater_id = 3;
}
message RowLayout {
int32 row = 1;
int32 columns = 2;
string type = 3;
int32 price = 4;
}

43
proto/media.proto Normal file
View File

@ -0,0 +1,43 @@
syntax = "proto3";
package media.v1;
option go_package = "git.ksv741.keenetic.pro/teacinema/contracts/media;media";
option java_multiple_files = true;
service MediaService {
rpc Upload (UploadRequest) returns (UploadResponse);
rpc Get (GetRequest) returns (GetResponse);
rpc Delete (DeleteRequest) returns (DeleteResponse);
}
message UploadRequest {
string file_name = 1;
string folder = 2;
string content_type = 3;
bytes data = 4;
optional int32 resize_width = 5;
optional int32 resize_height = 6;
}
message UploadResponse {
string key = 1;
}
message GetRequest {
string key = 1;
}
message GetResponse {
bytes data = 1;
string content_type = 2;
}
message DeleteRequest {
string key = 1;
}
message DeleteResponse {
bool ok = 1;
}

53
proto/movie.proto Normal file
View File

@ -0,0 +1,53 @@
syntax = "proto3";
package movie.v1;
import "google/protobuf/timestamp.proto";
service MovieService {
rpc ListMovies (ListMovieRequest) returns (ListMovieResponse);
rpc GetMovie (GetMovieRequest) returns (GetMovieResponse);
}
message ListMovieRequest {
string category = 1;
bool random = 2;
int32 limit = 3;
}
message ListMovieResponse {
repeated Movie movies = 1;
}
message GetMovieRequest {
oneof key {
string id = 1;
string slug = 2;
}
}
message GetMovieResponse {
MovieDetails movie = 1;
}
message Movie {
string id = 1;
string title = 2;
string slug = 3;
string poster = 4;
int32 rating_age = 5;
google.protobuf.Timestamp release_date = 6;
}
message MovieDetails {
string id = 1;
string title = 2;
string slug = 3;
string description = 4;
string poster = 5;
string banner = 6;
int32 duration = 7;
int32 rating_age = 8;
string country = 9;
google.protobuf.Timestamp release_date = 10;
}

39
proto/payment.proto Normal file
View File

@ -0,0 +1,39 @@
syntax = "proto3";
package payment.v1;
service PaymentService {
rpc CreatePayment(CreatePaymentRequest) returns (CreatePaymentResponse);
rpc ProcessPaymentEvent (ProcessPaymentEventRequest) returns (ProcessPaymentEventResponse);
}
message CreatePaymentRequest {
string user_id = 1;
string screening_id = 2;
repeated SeatInput seats = 3;
optional string payment_method_id = 4;
bool save_payment_method = 5;
}
message CreatePaymentResponse {
string url = 1;
}
message ProcessPaymentEventRequest {
string event = 1;
string payment_id = 2;
string booking_id = 3;
string user_id = 4;
bool save_payment_method = 5;
string provider_payment_id = 6;
string card_first6 = 7;
string lat4 = 8;
}
message ProcessPaymentEventResponse {
bool ok = 1;
}
message SeatInput {
string seat_id = 1;
int32 price = 2;
}

79
proto/screening.proto Normal file
View File

@ -0,0 +1,79 @@
syntax = "proto3";
package screening.v1;
service ScreeningService {
rpc CreateScreening (CreateScreeningRequest) returns (CreateScreeningResponse);
rpc GetScreening (GetScreeningRequest) returns (GetScreeningResponse);
rpc GetScreenings (GetScreeningsRequest) returns (GetScreeningsResponse);
rpc GetScreeningsByMovie (GetScreeningsByMovieRequest) returns (GetScreeningsByMovieResponse);
}
message CreateScreeningRequest {
string movie_id = 1;
string hall_id = 2;
string start_at = 3;
string end_at = 4;
}
message CreateScreeningResponse {
bool ok = 1;
}
message GetScreeningRequest {
string id = 1;
}
message GetScreeningResponse {
Screening screening = 1;
}
message GetScreeningsRequest {
optional string theater_id = 1;
optional string date = 2;
}
message GetScreeningsResponse {
repeated Screening screenings = 1;
}
message GetScreeningsByMovieRequest {
string movie_id = 1;
optional string date = 2;
}
message GetScreeningsByMovieResponse {
repeated Screening screenings = 1;
}
message Screening {
string id = 1;
string start_at = 2;
string end_at = 3;
Theater theater = 4;
Hall hall = 5;
Movie movie = 6;
repeated SeatType seat_types = 7;
}
message Movie {
string id = 1;
string title = 2;
string slug = 3;
int32 duration = 4;
string banner = 5;
}
message Theater {
string id = 1;
string name = 2;
string adress = 3;
}
message Hall {
string id = 1;
string name = 2;
}
message SeatType {
string type = 1;
int32 price = 2;
}

33
proto/seat.proto Normal file
View File

@ -0,0 +1,33 @@
syntax = "proto3";
package seat.v1;
service SeatService {
rpc GetSeat (GetSeatRequest) returns (GetSeatResponse);
rpc ListSeatsByHall (ListSeatsByHallRequest) returns (ListSeatsByHallResponse);
}
message GetSeatRequest {
string id = 1;
}
message GetSeatResponse {
Seat seat = 1;
}
message ListSeatsByHallRequest {
string hall_id = 1;
string screening_id = 2;
}
message ListSeatsByHallResponse {
repeated Seat seats = 1;
}
message Seat {
string id = 1;
int32 row = 2;
int32 number = 3;
int32 price = 4;
string status = 5;
string type = 6;
string hall_id = 7;
}

37
proto/theater.proto Normal file
View File

@ -0,0 +1,37 @@
syntax = "proto3";
package theater.v1;
import "google/protobuf/empty.proto";
service TheaterService {
rpc ListTheater(google.protobuf.Empty) returns (ListTheaterResponse);
rpc GetTheater(GetTheaterRequest) returns (GetTheaterResponse);
rpc CreateTheater(CreateTheaterRequest) returns (CreateTheaterResponse);
}
message ListTheaterResponse {
repeated Theater theaters = 1;
}
message GetTheaterRequest {
string id = 1;
}
message GetTheaterResponse {
Theater theater = 1;
}
message CreateTheaterRequest {
string name = 1;
string address = 2;
}
message CreateTheaterResponse {
Theater theater = 1;
}
message Theater {
string id = 1;
string name = 2;
string address = 3;
}

42
proto/users.proto Normal file
View File

@ -0,0 +1,42 @@
syntax = "proto3";
package users.v1;
service UsersService {
rpc GetMe (GetMeRequest) returns (GetMeResponse);
rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
rpc PatchUser (PatchUserRequest) returns (PatchUserResponse);
}
message GetMeRequest {
string id = 1;
}
message GetMeResponse {
User user = 1;
}
message CreateUserRequest {
string id = 1;
}
message CreateUserResponse {
bool ok = 1;
}
message User {
string id = 1;
optional string name = 2;
optional string phone = 3;
optional string email = 4;
optional string avatar = 5;
}
message PatchUserRequest {
string user_id = 1;
optional string name = 2;
optional string avatar = 3;
}
message PatchUserResponse {
bool ok = 1;
}

13
scripts/generate_go.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
set -e
echo "Generating Go protobuf (media).…."
protoc -I ./proto \
--go_out=./gen/go \
--go-grpc_out=./gen/go \
--go_opt=module=git.ksv741.keenetic.pro/teacinema/contracts \
--go-grpc_opt=module=git.ksv741.keenetic.pro/teacinema/contracts \
./proto/media.proto
echo "Go generation complete."

View File

@ -0,0 +1,18 @@
/**
* Событие инициации смены email. Публикуется сервисом аккаунтов
* подписчик отправляет письмо с кодом подтверждения.
*
* @example
* ```ts
* client.emit<EmailChangedEvent>('account.email_change_initiated', {
* email: 'user@example.com',
* code: '123456',
* });
* ```
*/
export interface EmailChangedEvent {
/** Новый email пользователя */
email: string
/** Код подтверждения */
code: string
}

View File

@ -0,0 +1,2 @@
export * from './email-changed.interface'
export * from './phone-changed.interface'

View File

@ -0,0 +1,18 @@
/**
* Событие инициации смены номера телефона. Публикуется сервисом аккаунтов
* подписчик отправляет SMS с кодом подтверждения.
*
* @example
* ```ts
* client.emit<PhoneChangedEvent>('account.phone_change_initiated', {
* phone: '+79001234567',
* code: '123456',
* });
* ```
*/
export interface PhoneChangedEvent {
/** Новый номер телефона пользователя */
phone: string
/** Код подтверждения */
code: string
}

1
src/events/auth/index.ts Normal file
View File

@ -0,0 +1 @@
export * from './otp-requested.interface'

View File

@ -0,0 +1,27 @@
/**
* Событие запроса OTP-кода. Публикуется сервисом аутентификации
* подписчик (например, notification-service) доставляет код пользователю.
*
* @example Публикация события
* ```ts
* client.emit<OtpRequestedEvent>('auth.otp_requested', {
* identifier: '+79001234567',
* code: '123456',
* type: 'phone',
* });
* ```
*
* @example Подписка на событие
* ```ts
* @EventPattern('auth.otp_requested')
* handle(data: OtpRequestedEvent) { ... }
* ```
*/
export interface OtpRequestedEvent {
/** Email или номер телефона получателя */
identifier: string
/** OTP-код для отправки */
code: string
/** Тип идентификатора */
type: 'email' | 'phone'
}

2
src/events/index.ts Normal file
View File

@ -0,0 +1,2 @@
export * from './auth'
export * from './account'

View File

@ -1 +1,2 @@
export * from './proto'
export * from './events'

View File

@ -1,6 +1,47 @@
import { join } from 'node:path';
/**
* Абсолютные пути к `.proto` файлам.
*
* Используются при регистрации gRPC клиентов и серверов в NestJS.
*
* @example Регистрация gRPC клиента
* ```ts
* import { ClientsModule, Transport } from '@nestjs/microservices';
* import { PROTO_PATHS } from '@teacinema/contracts';
*
* ClientsModule.register([{
* name: 'AUTH_SERVICE',
* transport: Transport.GRPC,
* options: {
* protoPath: PROTO_PATHS.AUTH,
* package: 'auth.v1',
* url: 'localhost:5000',
* },
* }])
* ```
*/
export const PROTO_PATHS = {
/** Путь к `auth.proto` (пакет `auth.v1`) */
AUTH: join(__dirname, '../../proto/auth.proto'),
/** Путь к `account.proto` (пакет `account.v1`) */
ACCOUNT: join(__dirname, '../../proto/account.proto'),
/** Путь к `users.proto` (пакет `users.v1`) */
USERS: join(__dirname, '../../proto/users.proto'),
/** Путь к `media.proto` (пакет `media.v1`) */
MEDIA: join(__dirname, '../../proto/media.proto'),
/** Путь к `movie.proto` (пакет `movie.v1`) */
MOVIE: join(__dirname, '../../proto/movie.proto'),
/** Путь к `category.proto` (пакет `category.v1`) */
CATEGORY: join(__dirname, '../../proto/category.proto'),
/** Путь к `theater.proto` (пакет `theater.v1`) */
THEATER: join(__dirname, '../../proto/theater.proto'),
/** Путь к `hall.proto` (пакет `hall.v1`) */
HALL: join(__dirname, '../../proto/hall.proto'),
/** Путь к `seat.proto` (пакет `seat.v1`) */
SEAT: join(__dirname, '../../proto/seat.proto'),
/** Путь к `screening.proto` (пакет `screening.v1`) */
SCREENING: join(__dirname, '../../proto/screening.proto'),
/** Путь к `payment.proto` (пакет `payment.v1`) */
PAYMENT: join(__dirname, '../../proto/payment.proto'),
} as const

11
typedoc.json Normal file
View File

@ -0,0 +1,11 @@
{
"$schema": "https://typedoc.org/schema.json",
"entryPoints": ["src/index.ts"],
"out": "docs",
"name": "@teacinema/contracts",
"readme": "README.md",
"includeVersion": true,
"categorizeByGroup": true,
"tsconfig": "tsconfig.json",
"skipErrorChecking": true
}

142
yarn.lock
View File

@ -7,6 +7,17 @@
resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-2.10.2.tgz#d7c063301f2a33095fc202f06bf3cce0c138dfcd"
integrity sha512-uFsRXwIGyu+r6AMdz+XijIIZJYpoWeYzILt5yZ2d3mCjQrWUTVpVD9WL/jZAbvp+Ed04rOhrsk7FiTcEDseB5A==
"@gerrit0/mini-shiki@^3.17.0":
version "3.23.0"
resolved "https://registry.yarnpkg.com/@gerrit0/mini-shiki/-/mini-shiki-3.23.0.tgz#d9414f3080b88303b18f3a311846e37e424d800c"
integrity sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==
dependencies:
"@shikijs/engine-oniguruma" "^3.23.0"
"@shikijs/langs" "^3.23.0"
"@shikijs/themes" "^3.23.0"
"@shikijs/types" "^3.23.0"
"@shikijs/vscode-textmate" "^10.0.2"
"@nestjs/microservices@^11.1.12":
version "11.1.12"
resolved "https://registry.yarnpkg.com/@nestjs/microservices/-/microservices-11.1.12.tgz#05c497eb5ddcae09ae8ac0d3aa1bcd0b7336816b"
@ -15,6 +26,48 @@
iterare "1.2.1"
tslib "2.8.1"
"@shikijs/engine-oniguruma@^3.23.0":
version "3.23.0"
resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-3.23.0.tgz#789421048d66ac1b33613169d6d18b9cc6e340ed"
integrity sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==
dependencies:
"@shikijs/types" "3.23.0"
"@shikijs/vscode-textmate" "^10.0.2"
"@shikijs/langs@^3.23.0":
version "3.23.0"
resolved "https://registry.yarnpkg.com/@shikijs/langs/-/langs-3.23.0.tgz#00959d8b16c7f671221ae79b3ad8cde7e6a5c112"
integrity sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==
dependencies:
"@shikijs/types" "3.23.0"
"@shikijs/themes@^3.23.0":
version "3.23.0"
resolved "https://registry.yarnpkg.com/@shikijs/themes/-/themes-3.23.0.tgz#fd96ca5ad52639057995bc2093682884e1846f27"
integrity sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==
dependencies:
"@shikijs/types" "3.23.0"
"@shikijs/types@3.23.0", "@shikijs/types@^3.23.0":
version "3.23.0"
resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-3.23.0.tgz#d441571a058641926018ae3de99866f39e5bbdf2"
integrity sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==
dependencies:
"@shikijs/vscode-textmate" "^10.0.2"
"@types/hast" "^3.0.4"
"@shikijs/vscode-textmate@^10.0.2":
version "10.0.2"
resolved "https://registry.yarnpkg.com/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz#a90ab31d0cc1dfb54c66a69e515bf624fa7b2224"
integrity sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==
"@types/hast@^3.0.4":
version "3.0.4"
resolved "https://registry.yarnpkg.com/@types/hast/-/hast-3.0.4.tgz#1d6b39993b82cea6ad783945b0508c25903e15aa"
integrity sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==
dependencies:
"@types/unist" "*"
"@types/node@^25.0.10":
version "25.0.10"
resolved "https://registry.yarnpkg.com/@types/node/-/node-25.0.10.tgz#4864459c3c9459376b8b75fd051315071c8213e7"
@ -22,6 +75,28 @@
dependencies:
undici-types "~7.16.0"
"@types/unist@*":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.3.tgz#acaab0f919ce69cce629c2d4ed2eb4adc1b6c20c"
integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==
argparse@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
balanced-match@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
brace-expansion@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7"
integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==
dependencies:
balanced-match "^1.0.0"
case-anything@^2.1.13:
version "2.1.13"
resolved "https://registry.yarnpkg.com/case-anything/-/case-anything-2.1.13.tgz#0cdc16278cb29a7fcdeb072400da3f342ba329e9"
@ -39,16 +114,62 @@ dprint-node@^1.0.8:
dependencies:
detect-libc "^1.0.3"
entities@^4.4.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48"
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==
iterare@1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/iterare/-/iterare-1.2.1.tgz#139c400ff7363690e33abffa33cbba8920f00042"
integrity sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==
linkify-it@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-5.0.0.tgz#9ef238bfa6dc70bd8e7f9572b52d369af569b421"
integrity sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==
dependencies:
uc.micro "^2.0.0"
lunr@^2.3.9:
version "2.3.9"
resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1"
integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==
markdown-it@^14.1.0:
version "14.1.1"
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-14.1.1.tgz#856f90b66fc39ae70affd25c1b18b581d7deee1f"
integrity sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==
dependencies:
argparse "^2.0.1"
entities "^4.4.0"
linkify-it "^5.0.0"
mdurl "^2.0.0"
punycode.js "^2.3.1"
uc.micro "^2.1.0"
mdurl@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-2.0.0.tgz#80676ec0433025dd3e17ee983d0fe8de5a2237e0"
integrity sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==
minimatch@^9.0.5:
version "9.0.9"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.9.tgz#9b0cb9fcb78087f6fd7eababe2511c4d3d60574e"
integrity sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==
dependencies:
brace-expansion "^2.0.2"
protoc@33.4.0:
version "33.4.0"
resolved "https://registry.yarnpkg.com/protoc/-/protoc-33.4.0.tgz#4a288b59f5f50b9a2c4bbf345276357e59dd6f10"
integrity sha512-dC1SJKbn4f60onsAMrfiPMygfSz4w/tPGHtPCqMSa5CLfHocJXkHjsvXeuuhjSPAJ8uUc8rfUvs0Hy9nmKIOhA==
punycode.js@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7"
integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==
rxjs@^7.8.2:
version "7.8.2"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.2.tgz#955bc473ed8af11a002a2be52071bf475638607b"
@ -85,12 +206,33 @@ tslib@2.8.1, tslib@^2.1.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
typedoc@^0.28.17:
version "0.28.17"
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.28.17.tgz#eab7c6649494d0a796e0b2fd2c9a5aea41b0a781"
integrity sha512-ZkJ2G7mZrbxrKxinTQMjFqsCoYY6a5Luwv2GKbTnBCEgV2ihYm5CflA9JnJAwH0pZWavqfYxmDkFHPt4yx2oDQ==
dependencies:
"@gerrit0/mini-shiki" "^3.17.0"
lunr "^2.3.9"
markdown-it "^14.1.0"
minimatch "^9.0.5"
yaml "^2.8.1"
typescript@^5.9.3:
version "5.9.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
uc.micro@^2.0.0, uc.micro@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee"
integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==
undici-types@~7.16.0:
version "7.16.0"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.16.0.tgz#ffccdff36aea4884cbfce9a750a0580224f58a46"
integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==
yaml@^2.8.1:
version "2.8.2"
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.2.tgz#5694f25eca0ce9c3e7a9d9e00ce0ddabbd9e35c5"
integrity sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==