@trash-streamers/contracts 1.1.60 → 1.1.62

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.
@@ -1,12 +1,12 @@
1
1
  import { Observable } from "rxjs";
2
2
  export declare const protobufPackage = "video.v1";
3
- export declare enum AccessType {
3
+ export declare enum Access {
4
4
  PUBLIC = "PUBLIC",
5
5
  PRIVATE = "PRIVATE",
6
6
  BYLINK = "BYLINK",
7
7
  UNRECOGNIZED = "UNRECOGNIZED"
8
8
  }
9
- export declare enum StatusType {
9
+ export declare enum Status {
10
10
  PENDING = "PENDING",
11
11
  PROCESSING = "PROCESSING",
12
12
  READY = "READY",
@@ -28,15 +28,22 @@ export interface GetAllVideosOwnerRequest {
28
28
  export interface GetAllVideosOwnerResponse {
29
29
  videos: Video[];
30
30
  }
31
+ export interface PublicVideoBySlugRequest {
32
+ slug: string;
33
+ }
34
+ export interface PublicVideoBySlugResponce {
35
+ video: Video | undefined;
36
+ }
31
37
  export interface Video {
32
38
  id: string;
33
39
  ownerId: string;
34
40
  title: string;
35
41
  description?: string | undefined;
36
- access: AccessType;
37
- status: StatusType;
42
+ access: Access;
43
+ status: Status;
38
44
  slug: string;
39
45
  thumbnailUrl?: string | undefined;
46
+ durationSeconds?: string | undefined;
40
47
  path?: string | undefined;
41
48
  updatedAt: Date | undefined;
42
49
  createdAt: Date | undefined;
@@ -45,10 +52,12 @@ export declare const VIDEO_V1_PACKAGE_NAME = "video.v1";
45
52
  export interface VideoServiceClient {
46
53
  confirmVideoUpload(request: ConfirmVideoUploadRequest): Observable<ConfirmVideoUploadResponse>;
47
54
  getAllVideosOwner(request: GetAllVideosOwnerRequest): Observable<GetAllVideosOwnerResponse>;
55
+ publicVideoBySlug(request: PublicVideoBySlugRequest): Observable<PublicVideoBySlugResponce>;
48
56
  }
49
57
  export interface VideoServiceController {
50
58
  confirmVideoUpload(request: ConfirmVideoUploadRequest): Promise<ConfirmVideoUploadResponse> | Observable<ConfirmVideoUploadResponse> | ConfirmVideoUploadResponse;
51
59
  getAllVideosOwner(request: GetAllVideosOwnerRequest): Promise<GetAllVideosOwnerResponse> | Observable<GetAllVideosOwnerResponse> | GetAllVideosOwnerResponse;
60
+ publicVideoBySlug(request: PublicVideoBySlugRequest): Promise<PublicVideoBySlugResponce> | Observable<PublicVideoBySlugResponce> | PublicVideoBySlugResponce;
52
61
  }
53
62
  export declare function VideoServiceControllerMethods(): (constructor: Function) => void;
54
63
  export declare const VIDEO_SERVICE_NAME = "VideoService";
@@ -5,27 +5,27 @@
5
5
  // protoc v6.33.5
6
6
  // source: video.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.VIDEO_SERVICE_NAME = exports.VIDEO_V1_PACKAGE_NAME = exports.StatusType = exports.AccessType = exports.protobufPackage = void 0;
8
+ exports.VIDEO_SERVICE_NAME = exports.VIDEO_V1_PACKAGE_NAME = exports.Status = exports.Access = exports.protobufPackage = void 0;
9
9
  exports.VideoServiceControllerMethods = VideoServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const microservices_1 = require("@nestjs/microservices");
12
12
  const protobufjs_1 = require("protobufjs");
13
13
  exports.protobufPackage = "video.v1";
14
- var AccessType;
15
- (function (AccessType) {
16
- AccessType["PUBLIC"] = "PUBLIC";
17
- AccessType["PRIVATE"] = "PRIVATE";
18
- AccessType["BYLINK"] = "BYLINK";
19
- AccessType["UNRECOGNIZED"] = "UNRECOGNIZED";
20
- })(AccessType || (exports.AccessType = AccessType = {}));
21
- var StatusType;
22
- (function (StatusType) {
23
- StatusType["PENDING"] = "PENDING";
24
- StatusType["PROCESSING"] = "PROCESSING";
25
- StatusType["READY"] = "READY";
26
- StatusType["FAILED"] = "FAILED";
27
- StatusType["UNRECOGNIZED"] = "UNRECOGNIZED";
28
- })(StatusType || (exports.StatusType = StatusType = {}));
14
+ var Access;
15
+ (function (Access) {
16
+ Access["PUBLIC"] = "PUBLIC";
17
+ Access["PRIVATE"] = "PRIVATE";
18
+ Access["BYLINK"] = "BYLINK";
19
+ Access["UNRECOGNIZED"] = "UNRECOGNIZED";
20
+ })(Access || (exports.Access = Access = {}));
21
+ var Status;
22
+ (function (Status) {
23
+ Status["PENDING"] = "PENDING";
24
+ Status["PROCESSING"] = "PROCESSING";
25
+ Status["READY"] = "READY";
26
+ Status["FAILED"] = "FAILED";
27
+ Status["UNRECOGNIZED"] = "UNRECOGNIZED";
28
+ })(Status || (exports.Status = Status = {}));
29
29
  exports.VIDEO_V1_PACKAGE_NAME = "video.v1";
30
30
  protobufjs_1.wrappers[".google.protobuf.Timestamp"] = {
31
31
  fromObject(value) {
@@ -37,7 +37,7 @@ protobufjs_1.wrappers[".google.protobuf.Timestamp"] = {
37
37
  };
38
38
  function VideoServiceControllerMethods() {
39
39
  return function (constructor) {
40
- const grpcMethods = ["confirmVideoUpload", "getAllVideosOwner"];
40
+ const grpcMethods = ["confirmVideoUpload", "getAllVideosOwner", "publicVideoBySlug"];
41
41
  for (const method of grpcMethods) {
42
42
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
43
43
  (0, microservices_1.GrpcMethod)("VideoService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trash-streamers/contracts",
3
- "version": "1.1.60",
3
+ "version": "1.1.62",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "scripts": {
package/proto/video.proto CHANGED
@@ -5,7 +5,9 @@ package video.v1;
5
5
  import "google/protobuf/timestamp.proto";
6
6
  service VideoService {
7
7
  rpc ConfirmVideoUpload (ConfirmVideoUploadRequest) returns (ConfirmVideoUploadResponse);
8
+
8
9
  rpc GetAllVideosOwner (GetAllVideosOwnerRequest) returns (GetAllVideosOwnerResponse);
10
+ rpc PublicVideoBySlug (PublicVideoBySlugRequest) returns (PublicVideoBySlugResponce);
9
11
  }
10
12
 
11
13
  message ConfirmVideoUploadRequest {
@@ -26,27 +28,36 @@ message GetAllVideosOwnerRequest {
26
28
  message GetAllVideosOwnerResponse {
27
29
  repeated Video videos = 1;
28
30
  }
31
+
32
+ message PublicVideoBySlugRequest {
33
+ string slug = 1;
34
+ }
35
+
36
+ message PublicVideoBySlugResponce {
37
+ Video video = 1;
38
+ }
29
39
  message Video {
30
40
  string id = 1;
31
41
  string owner_id = 2;
32
42
  string title = 3;
33
43
  optional string description = 4;
34
- AccessType access = 5;
35
- StatusType status= 6;
44
+ Access access = 5;
45
+ Status status= 6;
36
46
  string slug = 7;
37
47
  optional string thumbnail_url = 8;
38
- optional string path = 9;
39
- google.protobuf.Timestamp updated_at = 10;
40
- google.protobuf.Timestamp created_at = 11;
48
+ optional string duration_seconds = 9;
49
+ optional string path = 10;
50
+ google.protobuf.Timestamp updated_at = 11;
51
+ google.protobuf.Timestamp created_at = 12;
41
52
  }
42
53
 
43
- enum AccessType {
54
+ enum Access {
44
55
  PUBLIC = 0;
45
56
  PRIVATE = 1;
46
57
  BYLINK = 2;
47
58
  }
48
59
 
49
- enum StatusType {
60
+ enum Status {
50
61
  PENDING = 0;
51
62
  PROCESSING = 1;
52
63
  READY = 2;