@trash-streamers/contracts 1.1.69 → 1.1.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gen/ts/category.d.ts +51 -0
- package/dist/gen/ts/category.js +48 -0
- package/dist/gen/ts/video.d.ts +6 -4
- package/dist/proto/paths.d.ts +1 -0
- package/dist/proto/paths.js +1 -0
- package/package.json +1 -1
- package/proto/category.proto +55 -0
- package/proto/video.proto +6 -3
- package/dist/utils/field_mask_custom.d.ts +0 -7
- package/dist/utils/field_mask_custom.js +0 -15
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export declare const protobufPackage = "category.v1";
|
|
3
|
+
export declare enum Language {
|
|
4
|
+
RU = "RU",
|
|
5
|
+
EN = "EN",
|
|
6
|
+
UNRECOGNIZED = "UNRECOGNIZED"
|
|
7
|
+
}
|
|
8
|
+
export declare enum TargetType {
|
|
9
|
+
VIDEO = "VIDEO",
|
|
10
|
+
UNRECOGNIZED = "UNRECOGNIZED"
|
|
11
|
+
}
|
|
12
|
+
export interface CheckAvailabilityCategoryRequest {
|
|
13
|
+
title: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CheckAvailabilityCategoryResponse {
|
|
16
|
+
isAvailable: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateCategoryRequest {
|
|
19
|
+
targets: TargetType[];
|
|
20
|
+
thumbnailUrl: string;
|
|
21
|
+
translations: CategoryTranslation[];
|
|
22
|
+
}
|
|
23
|
+
export interface CreateCategoryResponse {
|
|
24
|
+
category: Category | undefined;
|
|
25
|
+
}
|
|
26
|
+
export interface Category {
|
|
27
|
+
id: string;
|
|
28
|
+
slug: string;
|
|
29
|
+
thumbnailUrl: string;
|
|
30
|
+
targets: TargetType[];
|
|
31
|
+
translations: CategoryTranslation[];
|
|
32
|
+
createdAt: Date | undefined;
|
|
33
|
+
updatedAt: Date | undefined;
|
|
34
|
+
}
|
|
35
|
+
export interface CategoryTranslation {
|
|
36
|
+
id: string;
|
|
37
|
+
language: Language;
|
|
38
|
+
name: string;
|
|
39
|
+
description?: string | undefined;
|
|
40
|
+
}
|
|
41
|
+
export declare const CATEGORY_V1_PACKAGE_NAME = "category.v1";
|
|
42
|
+
export interface CategoryNameClient {
|
|
43
|
+
checkAvailabilityCategory(request: CheckAvailabilityCategoryRequest): Observable<CheckAvailabilityCategoryResponse>;
|
|
44
|
+
createCategory(request: CreateCategoryRequest): Observable<CreateCategoryResponse>;
|
|
45
|
+
}
|
|
46
|
+
export interface CategoryNameController {
|
|
47
|
+
checkAvailabilityCategory(request: CheckAvailabilityCategoryRequest): Promise<CheckAvailabilityCategoryResponse> | Observable<CheckAvailabilityCategoryResponse> | CheckAvailabilityCategoryResponse;
|
|
48
|
+
createCategory(request: CreateCategoryRequest): Promise<CreateCategoryResponse> | Observable<CreateCategoryResponse> | CreateCategoryResponse;
|
|
49
|
+
}
|
|
50
|
+
export declare function CategoryNameControllerMethods(): (constructor: Function) => void;
|
|
51
|
+
export declare const CATEGORY_NAME_SERVICE_NAME = "CategoryName";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.10.1
|
|
5
|
+
// protoc v6.33.5
|
|
6
|
+
// source: category.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.CATEGORY_NAME_SERVICE_NAME = exports.CATEGORY_V1_PACKAGE_NAME = exports.TargetType = exports.Language = exports.protobufPackage = void 0;
|
|
9
|
+
exports.CategoryNameControllerMethods = CategoryNameControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
const protobufjs_1 = require("protobufjs");
|
|
13
|
+
exports.protobufPackage = "category.v1";
|
|
14
|
+
var Language;
|
|
15
|
+
(function (Language) {
|
|
16
|
+
Language["RU"] = "RU";
|
|
17
|
+
Language["EN"] = "EN";
|
|
18
|
+
Language["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
19
|
+
})(Language || (exports.Language = Language = {}));
|
|
20
|
+
var TargetType;
|
|
21
|
+
(function (TargetType) {
|
|
22
|
+
TargetType["VIDEO"] = "VIDEO";
|
|
23
|
+
TargetType["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
24
|
+
})(TargetType || (exports.TargetType = TargetType = {}));
|
|
25
|
+
exports.CATEGORY_V1_PACKAGE_NAME = "category.v1";
|
|
26
|
+
protobufjs_1.wrappers[".google.protobuf.Timestamp"] = {
|
|
27
|
+
fromObject(value) {
|
|
28
|
+
return { seconds: value.getTime() / 1000, nanos: (value.getTime() % 1000) * 1e6 };
|
|
29
|
+
},
|
|
30
|
+
toObject(message) {
|
|
31
|
+
return new Date(message.seconds * 1000 + message.nanos / 1e6);
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
function CategoryNameControllerMethods() {
|
|
35
|
+
return function (constructor) {
|
|
36
|
+
const grpcMethods = ["checkAvailabilityCategory", "createCategory"];
|
|
37
|
+
for (const method of grpcMethods) {
|
|
38
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
39
|
+
(0, microservices_1.GrpcMethod)("CategoryName", method)(constructor.prototype[method], method, descriptor);
|
|
40
|
+
}
|
|
41
|
+
const grpcStreamMethods = [];
|
|
42
|
+
for (const method of grpcStreamMethods) {
|
|
43
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
44
|
+
(0, microservices_1.GrpcStreamMethod)("CategoryName", method)(constructor.prototype[method], method, descriptor);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
exports.CATEGORY_NAME_SERVICE_NAME = "CategoryName";
|
package/dist/gen/ts/video.d.ts
CHANGED
|
@@ -41,10 +41,10 @@ export interface SettingVideoBySlugRequest {
|
|
|
41
41
|
export interface SettingVideoBySlugResponce {
|
|
42
42
|
video: Video | undefined;
|
|
43
43
|
}
|
|
44
|
-
export interface
|
|
44
|
+
export interface UpdateSettingsVideoRequest {
|
|
45
45
|
slug: string;
|
|
46
46
|
ownerId: string;
|
|
47
|
-
video
|
|
47
|
+
video: Video | undefined;
|
|
48
48
|
updateMask: FieldMask | undefined;
|
|
49
49
|
}
|
|
50
50
|
export interface UpdateSettingsVideoResponse {
|
|
@@ -53,6 +53,8 @@ export interface UpdateSettingsVideoResponse {
|
|
|
53
53
|
export interface FieldMask {
|
|
54
54
|
paths: string[];
|
|
55
55
|
}
|
|
56
|
+
export interface CheckAvailabilityCategoryRequest {
|
|
57
|
+
}
|
|
56
58
|
export interface Video {
|
|
57
59
|
id: string;
|
|
58
60
|
ownerId: string;
|
|
@@ -73,14 +75,14 @@ export interface VideoServiceClient {
|
|
|
73
75
|
getAllVideosOwner(request: GetAllVideosOwnerRequest): Observable<GetAllVideosOwnerResponse>;
|
|
74
76
|
publicVideoBySlug(request: PublicVideoBySlugRequest): Observable<PublicVideoBySlugResponce>;
|
|
75
77
|
settingVideoBySlug(request: SettingVideoBySlugRequest): Observable<SettingVideoBySlugResponce>;
|
|
76
|
-
updateSettingsVideo(request:
|
|
78
|
+
updateSettingsVideo(request: UpdateSettingsVideoRequest): Observable<UpdateSettingsVideoResponse>;
|
|
77
79
|
}
|
|
78
80
|
export interface VideoServiceController {
|
|
79
81
|
confirmVideoUpload(request: ConfirmVideoUploadRequest): Promise<ConfirmVideoUploadResponse> | Observable<ConfirmVideoUploadResponse> | ConfirmVideoUploadResponse;
|
|
80
82
|
getAllVideosOwner(request: GetAllVideosOwnerRequest): Promise<GetAllVideosOwnerResponse> | Observable<GetAllVideosOwnerResponse> | GetAllVideosOwnerResponse;
|
|
81
83
|
publicVideoBySlug(request: PublicVideoBySlugRequest): Promise<PublicVideoBySlugResponce> | Observable<PublicVideoBySlugResponce> | PublicVideoBySlugResponce;
|
|
82
84
|
settingVideoBySlug(request: SettingVideoBySlugRequest): Promise<SettingVideoBySlugResponce> | Observable<SettingVideoBySlugResponce> | SettingVideoBySlugResponce;
|
|
83
|
-
updateSettingsVideo(request:
|
|
85
|
+
updateSettingsVideo(request: UpdateSettingsVideoRequest): Promise<UpdateSettingsVideoResponse> | Observable<UpdateSettingsVideoResponse> | UpdateSettingsVideoResponse;
|
|
84
86
|
}
|
|
85
87
|
export declare function VideoServiceControllerMethods(): (constructor: Function) => void;
|
|
86
88
|
export declare const VIDEO_SERVICE_NAME = "VideoService";
|
package/dist/proto/paths.d.ts
CHANGED
package/dist/proto/paths.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package category.v1;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/timestamp.proto";
|
|
6
|
+
|
|
7
|
+
service CategoryName {
|
|
8
|
+
rpc CheckAvailabilityCategory (CheckAvailabilityCategoryRequest) returns (CheckAvailabilityCategoryResponse);
|
|
9
|
+
rpc CreateCategory (CreateCategoryRequest) returns (CreateCategoryResponse);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
message CheckAvailabilityCategoryRequest{
|
|
14
|
+
string title = 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message CheckAvailabilityCategoryResponse {
|
|
18
|
+
bool is_available = 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message CreateCategoryRequest {
|
|
22
|
+
repeated TargetType targets = 1;
|
|
23
|
+
string thumbnail_url = 2;
|
|
24
|
+
repeated CategoryTranslation translations = 3;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
message CreateCategoryResponse {
|
|
29
|
+
Category category = 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message Category {
|
|
33
|
+
string id = 1;
|
|
34
|
+
string slug = 2;
|
|
35
|
+
string thumbnail_url = 3;
|
|
36
|
+
repeated TargetType targets = 4;
|
|
37
|
+
repeated CategoryTranslation translations = 5;
|
|
38
|
+
google.protobuf.Timestamp created_at = 6;
|
|
39
|
+
google.protobuf.Timestamp updated_at = 7;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message CategoryTranslation {
|
|
43
|
+
string id = 1;
|
|
44
|
+
Language language = 2;
|
|
45
|
+
string name = 3;
|
|
46
|
+
optional string description = 4;
|
|
47
|
+
}
|
|
48
|
+
enum Language {
|
|
49
|
+
RU = 0;
|
|
50
|
+
EN = 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
enum TargetType {
|
|
54
|
+
VIDEO = 0;
|
|
55
|
+
}
|
package/proto/video.proto
CHANGED
|
@@ -10,7 +10,7 @@ service VideoService {
|
|
|
10
10
|
rpc GetAllVideosOwner (GetAllVideosOwnerRequest) returns (GetAllVideosOwnerResponse);
|
|
11
11
|
rpc PublicVideoBySlug (PublicVideoBySlugRequest) returns (PublicVideoBySlugResponce);
|
|
12
12
|
rpc SettingVideoBySlug (SettingVideoBySlugRequest) returns (SettingVideoBySlugResponce);
|
|
13
|
-
rpc UpdateSettingsVideo (
|
|
13
|
+
rpc UpdateSettingsVideo (UpdateSettingsVideoRequest) returns (UpdateSettingsVideoResponse);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
message ConfirmVideoUploadRequest {
|
|
@@ -49,10 +49,10 @@ message SettingVideoBySlugResponce{
|
|
|
49
49
|
Video video =1;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
message
|
|
52
|
+
message UpdateSettingsVideoRequest {
|
|
53
53
|
string slug = 1;
|
|
54
54
|
string owner_id = 2;
|
|
55
|
-
|
|
55
|
+
Video video = 3;
|
|
56
56
|
FieldMask update_mask = 4;
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -64,6 +64,9 @@ message FieldMask {
|
|
|
64
64
|
repeated string paths = 1;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
message CheckAvailabilityCategoryRequest {
|
|
68
|
+
|
|
69
|
+
}
|
|
67
70
|
message Video {
|
|
68
71
|
string id = 1;
|
|
69
72
|
string owner_id = 2;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FieldMask = void 0;
|
|
4
|
-
exports.FieldMask = {
|
|
5
|
-
fromJSON(object) {
|
|
6
|
-
console.log("я тут");
|
|
7
|
-
return {
|
|
8
|
-
paths: Array.isArray(object?.paths) ? object.paths.map(String) : [],
|
|
9
|
-
};
|
|
10
|
-
},
|
|
11
|
-
toJSON(message) {
|
|
12
|
-
console.log("я тут");
|
|
13
|
-
return { paths: message.paths };
|
|
14
|
-
},
|
|
15
|
-
};
|