@teacinema/common 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.
@@ -19,4 +19,14 @@ export declare const GRPC_CLIENTS: {
19
19
  readonly protoPath: string;
20
20
  readonly env: "MEDIA_GRPC_URL";
21
21
  };
22
+ readonly MOVIE_PACKAGE: {
23
+ readonly package: "movie.v1";
24
+ readonly protoPath: string;
25
+ readonly env: "MOVIE_GRPC_URL";
26
+ };
27
+ readonly CATEGORY_PACKAGE: {
28
+ readonly package: "category.v1";
29
+ readonly protoPath: string;
30
+ readonly env: "MOVIE_GRPC_URL";
31
+ };
22
32
  };
@@ -22,5 +22,15 @@ exports.GRPC_CLIENTS = {
22
22
  package: 'media.v1',
23
23
  protoPath: contracts_1.PROTO_PATHS.MEDIA,
24
24
  env: 'MEDIA_GRPC_URL'
25
+ },
26
+ MOVIE_PACKAGE: {
27
+ package: 'movie.v1',
28
+ protoPath: contracts_1.PROTO_PATHS.MOVIE,
29
+ env: 'MOVIE_GRPC_URL'
30
+ },
31
+ CATEGORY_PACKAGE: {
32
+ package: 'category.v1',
33
+ protoPath: contracts_1.PROTO_PATHS.CATEGORY,
34
+ env: 'MOVIE_GRPC_URL'
25
35
  }
26
36
  };
@@ -1 +1,2 @@
1
1
  export * from './convert-enum';
2
+ export * from './timestamp-to-iso';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./convert-enum"), exports);
18
+ __exportStar(require("./timestamp-to-iso"), exports);
@@ -0,0 +1,2 @@
1
+ import { Timestamp } from '@teacinema/contracts/gen/ts/google/protobuf/timestamp';
2
+ export declare function timestampToISO(ts: Timestamp): string | null;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.timestampToISO = timestampToISO;
4
+ function timestampToISO(ts) {
5
+ return new Date(ts.seconds * 1000 + ts.nanos / 1_000_000).toISOString();
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teacinema/common",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Core shared components for TeaCinema microservice ecosystem",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",