jr-common-micro 1.1.2 → 1.1.4

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.
@@ -14,6 +14,10 @@ export declare enum FileStatus {
14
14
  FAILED = "FAILED",
15
15
  UNRECOGNIZED = "UNRECOGNIZED"
16
16
  }
17
+ export interface WatchedVideoResponse {
18
+ status: ResponseStatus | undefined;
19
+ file_uuids: string[];
20
+ }
17
21
  export interface FileStoreRequest {
18
22
  uuid: string;
19
23
  user_id: string;
@@ -22,6 +26,7 @@ export interface FileStoreRequest {
22
26
  file_size: number;
23
27
  file_type: string;
24
28
  platform: string;
29
+ duration: string;
25
30
  watermark?: WatermarkDto | undefined;
26
31
  }
27
32
  export interface WatermarkDto {
@@ -13,6 +13,18 @@ export declare enum FileStatus {
13
13
  COMPLETED = 2,
14
14
  FAILED = 3
15
15
  }
16
+ export declare class WatchedVideoResponse extends Message<WatchedVideoResponse> {
17
+ status?: ResponseStatus;
18
+ fileUuids: string[];
19
+ constructor(data?: PartialMessage<WatchedVideoResponse>);
20
+ static readonly runtime: typeof proto3;
21
+ static readonly typeName = "micro.v1.media.WatchedVideoResponse";
22
+ static readonly fields: FieldList;
23
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WatchedVideoResponse;
24
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WatchedVideoResponse;
25
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WatchedVideoResponse;
26
+ static equals(a: WatchedVideoResponse | PlainMessage<WatchedVideoResponse> | undefined, b: WatchedVideoResponse | PlainMessage<WatchedVideoResponse> | undefined): boolean;
27
+ }
16
28
  export declare class FileStoreRequest extends Message<FileStoreRequest> {
17
29
  uuid: string;
18
30
  userId: string;
@@ -21,6 +33,7 @@ export declare class FileStoreRequest extends Message<FileStoreRequest> {
21
33
  fileSize: number;
22
34
  fileType: string;
23
35
  platform: string;
36
+ duration: string;
24
37
  watermark?: WatermarkDto;
25
38
  constructor(data?: PartialMessage<FileStoreRequest>);
26
39
  static readonly runtime: typeof proto3;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FileStatusResponse = exports.FileStatusRequest = exports.GetVideoLastTimeResponse = exports.GetVideoLastTimeRequest = exports.StoreVideoLastTimeRequest = exports.GetAllLogoUrlsResponse = exports.LogoUrl = exports.GetMediaUrlRequest = exports.GetMediaUrlResponse = exports.MediaAdminPaginationResponse = exports.MediaPaginationDto = exports.GetFileStatusResponse = exports.WatermarkDto = exports.FileStoreRequest = exports.FileStatus = exports.WatermarkLocation = void 0;
3
+ exports.FileStatusResponse = exports.FileStatusRequest = exports.GetVideoLastTimeResponse = exports.GetVideoLastTimeRequest = exports.StoreVideoLastTimeRequest = exports.GetAllLogoUrlsResponse = exports.LogoUrl = exports.GetMediaUrlRequest = exports.GetMediaUrlResponse = exports.MediaAdminPaginationResponse = exports.MediaPaginationDto = exports.GetFileStatusResponse = exports.WatermarkDto = exports.FileStoreRequest = exports.WatchedVideoResponse = exports.FileStatus = exports.WatermarkLocation = void 0;
4
4
  const protobuf_1 = require("@bufbuild/protobuf");
5
5
  const general_pb_js_1 = require("../general_pb.js");
6
6
  var WatermarkLocation;
@@ -29,6 +29,33 @@ protobuf_1.proto3.util.setEnumType(FileStatus, "micro.v1.media.FileStatus", [
29
29
  { no: 2, name: "COMPLETED" },
30
30
  { no: 3, name: "FAILED" },
31
31
  ]);
32
+ class WatchedVideoResponse extends protobuf_1.Message {
33
+ status;
34
+ fileUuids = [];
35
+ constructor(data) {
36
+ super();
37
+ protobuf_1.proto3.util.initPartial(data, this);
38
+ }
39
+ static runtime = protobuf_1.proto3;
40
+ static typeName = "micro.v1.media.WatchedVideoResponse";
41
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
42
+ { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
43
+ { no: 2, name: "file_uuids", kind: "scalar", T: 9, repeated: true },
44
+ ]);
45
+ static fromBinary(bytes, options) {
46
+ return new WatchedVideoResponse().fromBinary(bytes, options);
47
+ }
48
+ static fromJson(jsonValue, options) {
49
+ return new WatchedVideoResponse().fromJson(jsonValue, options);
50
+ }
51
+ static fromJsonString(jsonString, options) {
52
+ return new WatchedVideoResponse().fromJsonString(jsonString, options);
53
+ }
54
+ static equals(a, b) {
55
+ return protobuf_1.proto3.util.equals(WatchedVideoResponse, a, b);
56
+ }
57
+ }
58
+ exports.WatchedVideoResponse = WatchedVideoResponse;
32
59
  class FileStoreRequest extends protobuf_1.Message {
33
60
  uuid = "";
34
61
  userId = "";
@@ -37,6 +64,7 @@ class FileStoreRequest extends protobuf_1.Message {
37
64
  fileSize = 0;
38
65
  fileType = "";
39
66
  platform = "";
67
+ duration = "";
40
68
  watermark;
41
69
  constructor(data) {
42
70
  super();
@@ -52,7 +80,8 @@ class FileStoreRequest extends protobuf_1.Message {
52
80
  { no: 5, name: "file_size", kind: "scalar", T: 5 },
53
81
  { no: 6, name: "file_type", kind: "scalar", T: 9 },
54
82
  { no: 7, name: "platform", kind: "scalar", T: 9 },
55
- { no: 8, name: "watermark", kind: "message", T: WatermarkDto, opt: true },
83
+ { no: 8, name: "duration", kind: "scalar", T: 9 },
84
+ { no: 9, name: "watermark", kind: "message", T: WatermarkDto, opt: true },
56
85
  ]);
57
86
  static fromBinary(bytes, options) {
58
87
  return new FileStoreRequest().fromBinary(bytes, options);
@@ -1,5 +1,5 @@
1
- import { EmptyRequest, EmptyResponse, PaginateRequest } from "../general_pb.js";
2
- import { FileStatusRequest, FileStatusResponse, FileStoreRequest, GetAllLogoUrlsResponse, GetMediaUrlRequest, GetMediaUrlResponse, GetVideoLastTimeRequest, GetVideoLastTimeResponse, MediaAdminPaginationResponse, StoreVideoLastTimeRequest } from "./media_messages_pb.js";
1
+ import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateRequest } from "../general_pb.js";
2
+ import { FileStatusRequest, FileStatusResponse, FileStoreRequest, GetAllLogoUrlsResponse, GetMediaUrlRequest, GetMediaUrlResponse, GetVideoLastTimeRequest, GetVideoLastTimeResponse, MediaAdminPaginationResponse, StoreVideoLastTimeRequest, WatchedVideoResponse } from "./media_messages_pb.js";
3
3
  import { MethodKind } from "@bufbuild/protobuf";
4
4
  export declare const PMediaAdminService: {
5
5
  readonly typeName: "micro.v1.media.PMediaAdminService";
@@ -51,5 +51,11 @@ export declare const PMediaService: {
51
51
  readonly O: typeof FileStatusResponse;
52
52
  readonly kind: MethodKind.ServerStreaming;
53
53
  };
54
+ readonly getWatchedVideos: {
55
+ readonly name: "GetWatchedVideos";
56
+ readonly I: typeof ByIdRequest;
57
+ readonly O: typeof WatchedVideoResponse;
58
+ readonly kind: MethodKind.ServerStreaming;
59
+ };
54
60
  };
55
61
  };
@@ -54,5 +54,11 @@ exports.PMediaService = {
54
54
  O: media_messages_pb_js_1.FileStatusResponse,
55
55
  kind: protobuf_1.MethodKind.ServerStreaming,
56
56
  },
57
+ getWatchedVideos: {
58
+ name: "GetWatchedVideos",
59
+ I: general_pb_js_1.ByIdRequest,
60
+ O: media_messages_pb_js_1.WatchedVideoResponse,
61
+ kind: protobuf_1.MethodKind.ServerStreaming,
62
+ },
57
63
  }
58
64
  };
@@ -1,7 +1,7 @@
1
1
  import type { Metadata } from "@grpc/grpc-js";
2
2
  import { Observable } from "rxjs";
3
- import { EmptyRequest, EmptyResponse, PaginateRequest } from "../general_nest";
4
- import { FileStatusRequest, FileStatusResponse, FileStoreRequest, GetAllLogoUrlsResponse, GetMediaUrlRequest, GetMediaUrlResponse, GetVideoLastTimeRequest, GetVideoLastTimeResponse, MediaAdminPaginationResponse, StoreVideoLastTimeRequest } from "./media_messages_nest";
3
+ import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateRequest } from "../general_nest";
4
+ import { FileStatusRequest, FileStatusResponse, FileStoreRequest, GetAllLogoUrlsResponse, GetMediaUrlRequest, GetMediaUrlResponse, GetVideoLastTimeRequest, GetVideoLastTimeResponse, MediaAdminPaginationResponse, StoreVideoLastTimeRequest, WatchedVideoResponse } from "./media_messages_nest";
5
5
  export declare const protobufPackage = "micro.v1.media";
6
6
  export declare const MICRO_V1_MEDIA_PACKAGE_NAME = "micro.v1.media";
7
7
  export interface PMediaAdminServiceClient {
@@ -19,6 +19,7 @@ export interface PMediaServiceClient {
19
19
  getVideoLastTime(request: GetVideoLastTimeRequest, metadata?: Metadata): Observable<GetVideoLastTimeResponse>;
20
20
  storeVideoLastTime(request: StoreVideoLastTimeRequest, metadata?: Metadata): Observable<EmptyResponse>;
21
21
  getFileStatus(request: FileStatusRequest, metadata?: Metadata): Observable<FileStatusResponse>;
22
+ getWatchedVideos(request: ByIdRequest, metadata?: Metadata): Observable<WatchedVideoResponse>;
22
23
  }
23
24
  export interface PMediaServiceController {
24
25
  store(request: FileStoreRequest, metadata?: Metadata): Observable<EmptyResponse>;
@@ -27,6 +28,7 @@ export interface PMediaServiceController {
27
28
  getVideoLastTime(request: GetVideoLastTimeRequest, metadata?: Metadata): Observable<GetVideoLastTimeResponse>;
28
29
  storeVideoLastTime(request: StoreVideoLastTimeRequest, metadata?: Metadata): Observable<EmptyResponse>;
29
30
  getFileStatus(request: FileStatusRequest, metadata?: Metadata): Observable<FileStatusResponse>;
31
+ getWatchedVideos(request: ByIdRequest, metadata?: Metadata): Observable<WatchedVideoResponse>;
30
32
  }
31
33
  export declare function PMediaServiceControllerMethods(): (constructor: Function) => void;
32
34
  export declare const P_MEDIA_SERVICE_NAME = "PMediaService";
@@ -30,6 +30,7 @@ function PMediaServiceControllerMethods() {
30
30
  "getVideoLastTime",
31
31
  "storeVideoLastTime",
32
32
  "getFileStatus",
33
+ "getWatchedVideos",
33
34
  ];
34
35
  for (const method of grpcMethods) {
35
36
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jr-common-micro",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -17,6 +17,10 @@ enum FileStatus {
17
17
  COMPLETED = 2;
18
18
  FAILED = 3;
19
19
  }
20
+ message WatchedVideoResponse {
21
+ ResponseStatus status = 1;
22
+ repeated string file_uuids = 2;
23
+ }
20
24
 
21
25
  message FileStoreRequest {
22
26
  string uuid = 1;
@@ -26,7 +30,8 @@ message FileStoreRequest {
26
30
  int32 file_size = 5;
27
31
  string file_type = 6;
28
32
  string platform = 7;
29
- optional WatermarkDto watermark = 8;
33
+ string duration = 8;
34
+ optional WatermarkDto watermark = 9;
30
35
  }
31
36
 
32
37
  message WatermarkDto {
@@ -16,7 +16,7 @@ service PMediaService {
16
16
  rpc GetVideoLastTime(GetVideoLastTimeRequest) returns(stream GetVideoLastTimeResponse) {}
17
17
  rpc StoreVideoLastTime(StoreVideoLastTimeRequest) returns(stream EmptyResponse) {}
18
18
  rpc GetFileStatus(FileStatusRequest) returns(stream FileStatusResponse) {}
19
- //rpc GetFileStatus(ByIdRequest) returns(stream GetFileStatusResponse) {}
20
- //rpc GetFileUrl(ByIdRequest) returns(stream GetFileUrlResponse) {}
19
+ rpc GetWatchedVideos(ByIdRequest) returns(stream WatchedVideoResponse) {}
21
20
  }
22
21
 
22
+