@trash-streamers/contracts 1.1.65 → 1.1.67
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/account.d.ts +2 -3
- package/dist/gen/ts/account.js +9 -0
- package/dist/gen/ts/google/protobuf/field_mask.d.ts +3 -4
- package/dist/gen/ts/google/protobuf/field_mask.js +1 -4
- package/dist/gen/ts/media.d.ts +1 -2
- package/dist/gen/ts/media.js +9 -0
- package/dist/gen/ts/users.d.ts +2 -3
- package/dist/gen/ts/users.js +9 -0
- package/dist/gen/ts/video.d.ts +5 -6
- package/dist/gen/ts/video.js +9 -0
- package/dist/utils/field_mask_custom.d.ts +7 -0
- package/dist/utils/field_mask_custom.js +15 -0
- package/package.json +2 -2
- package/proto/video.proto +5 -4
- package/proto/utils/field_mask_custom.ts +0 -15
package/dist/gen/ts/account.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
import { Timestamp } from "./google/protobuf/timestamp";
|
|
3
2
|
export declare const protobufPackage = "account.v1";
|
|
4
3
|
export declare enum Role {
|
|
5
4
|
USER = "USER",
|
|
@@ -56,8 +55,8 @@ export interface Account {
|
|
|
56
55
|
isEmailVerified: boolean;
|
|
57
56
|
role: Role;
|
|
58
57
|
userId: string;
|
|
59
|
-
createdAt:
|
|
60
|
-
updatedAt:
|
|
58
|
+
createdAt: Date | undefined;
|
|
59
|
+
updatedAt: Date | undefined;
|
|
61
60
|
}
|
|
62
61
|
export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
63
62
|
export interface AccountServiceClient {
|
package/dist/gen/ts/account.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.ACCOUNT_SERVICE_NAME = exports.ACCOUNT_V1_PACKAGE_NAME = exports.Role =
|
|
|
9
9
|
exports.AccountServiceControllerMethods = AccountServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
const protobufjs_1 = require("protobufjs");
|
|
12
13
|
exports.protobufPackage = "account.v1";
|
|
13
14
|
var Role;
|
|
14
15
|
(function (Role) {
|
|
@@ -17,6 +18,14 @@ var Role;
|
|
|
17
18
|
Role["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
18
19
|
})(Role || (exports.Role = Role = {}));
|
|
19
20
|
exports.ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
21
|
+
protobufjs_1.wrappers[".google.protobuf.Timestamp"] = {
|
|
22
|
+
fromObject(value) {
|
|
23
|
+
return { seconds: value.getTime() / 1000, nanos: (value.getTime() % 1000) * 1e6 };
|
|
24
|
+
},
|
|
25
|
+
toObject(message) {
|
|
26
|
+
return new Date(message.seconds * 1000 + message.nanos / 1e6);
|
|
27
|
+
},
|
|
28
|
+
};
|
|
20
29
|
function AccountServiceControllerMethods() {
|
|
21
30
|
return function (constructor) {
|
|
22
31
|
const grpcMethods = [
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare const protobufPackage = "google.protobuf";
|
|
2
1
|
/**
|
|
3
2
|
* `FieldMask` represents a set of symbolic field paths, for example:
|
|
4
3
|
*
|
|
@@ -203,11 +202,11 @@ export interface FieldMask {
|
|
|
203
202
|
/** The set of field mask paths. */
|
|
204
203
|
paths: string[];
|
|
205
204
|
}
|
|
206
|
-
export declare const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
207
205
|
export declare const FieldMask: MessageFns<FieldMask> & FieldMaskWrapperFns;
|
|
208
|
-
|
|
206
|
+
interface MessageFns<T> {
|
|
209
207
|
}
|
|
210
|
-
|
|
208
|
+
interface FieldMaskWrapperFns {
|
|
211
209
|
wrap(paths: string[]): FieldMask;
|
|
212
210
|
unwrap(message: FieldMask): string[];
|
|
213
211
|
}
|
|
212
|
+
export {};
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
// protoc v6.33.5
|
|
6
6
|
// source: google/protobuf/field_mask.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.FieldMask =
|
|
9
|
-
/* eslint-disable */
|
|
10
|
-
exports.protobufPackage = "google.protobuf";
|
|
11
|
-
exports.GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
8
|
+
exports.FieldMask = void 0;
|
|
12
9
|
function createBaseFieldMask() {
|
|
13
10
|
return { paths: [] };
|
|
14
11
|
}
|
package/dist/gen/ts/media.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
import { Timestamp } from "./google/protobuf/timestamp";
|
|
3
2
|
export declare const protobufPackage = "media.v1";
|
|
4
3
|
export declare enum Folder {
|
|
5
4
|
AVATAR = "AVATAR",
|
|
@@ -16,7 +15,7 @@ export interface UploadImageRequest {
|
|
|
16
15
|
}
|
|
17
16
|
export interface UploadImageResponse {
|
|
18
17
|
key: string;
|
|
19
|
-
updatedAt:
|
|
18
|
+
updatedAt: Date | undefined;
|
|
20
19
|
}
|
|
21
20
|
export interface GetImageRequest {
|
|
22
21
|
key: string;
|
package/dist/gen/ts/media.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.MEDIA_SERVICE_NAME = exports.MEDIA_V1_PACKAGE_NAME = exports.Folder = ex
|
|
|
9
9
|
exports.MediaServiceControllerMethods = MediaServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
const protobufjs_1 = require("protobufjs");
|
|
12
13
|
exports.protobufPackage = "media.v1";
|
|
13
14
|
var Folder;
|
|
14
15
|
(function (Folder) {
|
|
@@ -17,6 +18,14 @@ var Folder;
|
|
|
17
18
|
Folder["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
18
19
|
})(Folder || (exports.Folder = Folder = {}));
|
|
19
20
|
exports.MEDIA_V1_PACKAGE_NAME = "media.v1";
|
|
21
|
+
protobufjs_1.wrappers[".google.protobuf.Timestamp"] = {
|
|
22
|
+
fromObject(value) {
|
|
23
|
+
return { seconds: value.getTime() / 1000, nanos: (value.getTime() % 1000) * 1e6 };
|
|
24
|
+
},
|
|
25
|
+
toObject(message) {
|
|
26
|
+
return new Date(message.seconds * 1000 + message.nanos / 1e6);
|
|
27
|
+
},
|
|
28
|
+
};
|
|
20
29
|
function MediaServiceControllerMethods() {
|
|
21
30
|
return function (constructor) {
|
|
22
31
|
const grpcMethods = ["uploadImage", "getImage", "getVideoUploadTicket"];
|
package/dist/gen/ts/users.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
import { Timestamp } from "./google/protobuf/timestamp";
|
|
3
2
|
export declare const protobufPackage = "users.v1";
|
|
4
3
|
export interface GetMeRequest {
|
|
5
4
|
id: string;
|
|
@@ -39,8 +38,8 @@ export interface User {
|
|
|
39
38
|
userName?: string | undefined;
|
|
40
39
|
avatar?: string | undefined;
|
|
41
40
|
displayName?: string | undefined;
|
|
42
|
-
updatedAt:
|
|
43
|
-
createdAt:
|
|
41
|
+
updatedAt: Date | undefined;
|
|
42
|
+
createdAt: Date | undefined;
|
|
44
43
|
}
|
|
45
44
|
export declare const USERS_V1_PACKAGE_NAME = "users.v1";
|
|
46
45
|
export interface UsersServiceClient {
|
package/dist/gen/ts/users.js
CHANGED
|
@@ -9,8 +9,17 @@ exports.USERS_SERVICE_NAME = exports.USERS_V1_PACKAGE_NAME = exports.protobufPac
|
|
|
9
9
|
exports.UsersServiceControllerMethods = UsersServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
const protobufjs_1 = require("protobufjs");
|
|
12
13
|
exports.protobufPackage = "users.v1";
|
|
13
14
|
exports.USERS_V1_PACKAGE_NAME = "users.v1";
|
|
15
|
+
protobufjs_1.wrappers[".google.protobuf.Timestamp"] = {
|
|
16
|
+
fromObject(value) {
|
|
17
|
+
return { seconds: value.getTime() / 1000, nanos: (value.getTime() % 1000) * 1e6 };
|
|
18
|
+
},
|
|
19
|
+
toObject(message) {
|
|
20
|
+
return new Date(message.seconds * 1000 + message.nanos / 1e6);
|
|
21
|
+
},
|
|
22
|
+
};
|
|
14
23
|
function UsersServiceControllerMethods() {
|
|
15
24
|
return function (constructor) {
|
|
16
25
|
const grpcMethods = ["getMe", "getUsers", "createUser", "patchUser", "deleteAvatarProfile"];
|
package/dist/gen/ts/video.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
import { Timestamp } from "./google/protobuf/timestamp";
|
|
3
2
|
export declare const protobufPackage = "video.v1";
|
|
4
3
|
export declare enum Access {
|
|
5
4
|
PUBLIC = "PUBLIC",
|
|
@@ -46,13 +45,13 @@ export interface UpdateSettingsVideoRequst {
|
|
|
46
45
|
slug: string;
|
|
47
46
|
ownerId: string;
|
|
48
47
|
video: Video | undefined;
|
|
49
|
-
updateMask:
|
|
48
|
+
updateMask: FieldMask | undefined;
|
|
50
49
|
}
|
|
51
50
|
export interface UpdateSettingsVideoResponse {
|
|
52
51
|
video: Video | undefined;
|
|
53
52
|
}
|
|
54
|
-
export interface
|
|
55
|
-
paths: string[]
|
|
53
|
+
export interface FieldMask {
|
|
54
|
+
paths: string[];
|
|
56
55
|
}
|
|
57
56
|
export interface Video {
|
|
58
57
|
id: string;
|
|
@@ -65,8 +64,8 @@ export interface Video {
|
|
|
65
64
|
thumbnailUrl?: string | undefined;
|
|
66
65
|
durationSeconds?: string | undefined;
|
|
67
66
|
path?: string | undefined;
|
|
68
|
-
updatedAt:
|
|
69
|
-
createdAt:
|
|
67
|
+
updatedAt: Date | undefined;
|
|
68
|
+
createdAt: Date | undefined;
|
|
70
69
|
}
|
|
71
70
|
export declare const VIDEO_V1_PACKAGE_NAME = "video.v1";
|
|
72
71
|
export interface VideoServiceClient {
|
package/dist/gen/ts/video.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.VIDEO_SERVICE_NAME = exports.VIDEO_V1_PACKAGE_NAME = exports.Status = ex
|
|
|
9
9
|
exports.VideoServiceControllerMethods = VideoServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
const protobufjs_1 = require("protobufjs");
|
|
12
13
|
exports.protobufPackage = "video.v1";
|
|
13
14
|
var Access;
|
|
14
15
|
(function (Access) {
|
|
@@ -26,6 +27,14 @@ var Status;
|
|
|
26
27
|
Status["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
27
28
|
})(Status || (exports.Status = Status = {}));
|
|
28
29
|
exports.VIDEO_V1_PACKAGE_NAME = "video.v1";
|
|
30
|
+
protobufjs_1.wrappers[".google.protobuf.Timestamp"] = {
|
|
31
|
+
fromObject(value) {
|
|
32
|
+
return { seconds: value.getTime() / 1000, nanos: (value.getTime() % 1000) * 1e6 };
|
|
33
|
+
},
|
|
34
|
+
toObject(message) {
|
|
35
|
+
return new Date(message.seconds * 1000 + message.nanos / 1e6);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
29
38
|
function VideoServiceControllerMethods() {
|
|
30
39
|
return function (constructor) {
|
|
31
40
|
const grpcMethods = [
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trash-streamers/contracts",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.67",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc -p tsconfig.build.json",
|
|
8
|
-
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/gen/ts --ts_proto_opt=nestJs=true,
|
|
8
|
+
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/gen/ts --ts_proto_opt=nestJs=true,package=omit,stringEnums=true,useDate=true"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
package/proto/video.proto
CHANGED
|
@@ -3,7 +3,7 @@ syntax = "proto3";
|
|
|
3
3
|
package video.v1;
|
|
4
4
|
|
|
5
5
|
import "google/protobuf/timestamp.proto";
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
service VideoService {
|
|
8
8
|
rpc ConfirmVideoUpload (ConfirmVideoUploadRequest) returns (ConfirmVideoUploadResponse);
|
|
9
9
|
|
|
@@ -53,16 +53,17 @@ message UpdateSettingsVideoRequst {
|
|
|
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
|
|
|
59
59
|
message UpdateSettingsVideoResponse {
|
|
60
60
|
Video video = 1;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
message
|
|
64
|
-
|
|
63
|
+
message FieldMask {
|
|
64
|
+
repeated string paths = 1;
|
|
65
65
|
}
|
|
66
|
+
|
|
66
67
|
message Video {
|
|
67
68
|
string id = 1;
|
|
68
69
|
string owner_id = 2;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// field_mask_custom.ts
|
|
2
|
-
export interface FieldMask {
|
|
3
|
-
paths: string[];
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const FieldMask = {
|
|
7
|
-
fromJSON(object: any): FieldMask {
|
|
8
|
-
return {
|
|
9
|
-
paths: Array.isArray(object?.paths) ? object.paths.map(String) : [],
|
|
10
|
-
};
|
|
11
|
-
},
|
|
12
|
-
toJSON(message: FieldMask): unknown {
|
|
13
|
-
return { paths: message.paths };
|
|
14
|
-
},
|
|
15
|
-
};
|