@readytomog/contracts 1.4.0 → 1.4.2
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/gen/chat.ts +4 -5
- package/gen/google/protobuf/timestamp.ts +11 -10
- package/package.json +2 -2
- package/proto/chat.proto +5 -5
package/gen/chat.ts
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
9
|
import { Observable } from "rxjs";
|
|
10
|
-
import { Timestamp } from "./google/protobuf/timestamp";
|
|
11
10
|
|
|
12
11
|
export const protobufPackage = "chat.v1";
|
|
13
12
|
|
|
@@ -32,8 +31,8 @@ export interface Message {
|
|
|
32
31
|
message: string;
|
|
33
32
|
senderId: string;
|
|
34
33
|
id: string;
|
|
35
|
-
createdAt:
|
|
36
|
-
updatedAt:
|
|
34
|
+
createdAt: string;
|
|
35
|
+
updatedAt: string;
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
export interface User {
|
|
@@ -47,8 +46,8 @@ export interface Chat {
|
|
|
47
46
|
id: string;
|
|
48
47
|
users: User[];
|
|
49
48
|
lastMessage: string;
|
|
50
|
-
createdAt:
|
|
51
|
-
updatedAt:
|
|
49
|
+
createdAt: string;
|
|
50
|
+
updatedAt: string;
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
export interface GetMessagesRequest {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.11.8
|
|
4
|
-
// protoc
|
|
4
|
+
// protoc v7.35.1
|
|
5
5
|
// source: google/protobuf/timestamp.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
@@ -81,8 +81,8 @@ export const protobufPackage = "google.protobuf";
|
|
|
81
81
|
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
|
|
82
82
|
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
|
83
83
|
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
|
84
|
-
* is required. A
|
|
85
|
-
* "Z") when printing the Timestamp type and a
|
|
84
|
+
* is required. A ProtoJSON serializer should always use UTC (as indicated by
|
|
85
|
+
* "Z") when printing the Timestamp type and a ProtoJSON parser should be
|
|
86
86
|
* able to accept both UTC and other timezones (as indicated by an offset).
|
|
87
87
|
*
|
|
88
88
|
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
|
@@ -96,20 +96,21 @@ export const protobufPackage = "google.protobuf";
|
|
|
96
96
|
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
|
97
97
|
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
|
98
98
|
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
|
99
|
-
* http://
|
|
99
|
+
* http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
|
|
100
100
|
* ) to obtain a formatter capable of generating timestamps in this format.
|
|
101
101
|
*/
|
|
102
102
|
export interface Timestamp {
|
|
103
103
|
/**
|
|
104
|
-
* Represents seconds of UTC time since Unix epoch
|
|
105
|
-
*
|
|
106
|
-
* 9999-12-31T23:59:59Z
|
|
104
|
+
* Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
|
|
105
|
+
* be between -62135596800 and 253402300799 inclusive (which corresponds to
|
|
106
|
+
* 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
|
|
107
107
|
*/
|
|
108
108
|
seconds: number;
|
|
109
109
|
/**
|
|
110
|
-
* Non-negative fractions of a second at nanosecond resolution.
|
|
111
|
-
*
|
|
112
|
-
*
|
|
110
|
+
* Non-negative fractions of a second at nanosecond resolution. This field is
|
|
111
|
+
* the nanosecond portion of the duration, not an alternative to seconds.
|
|
112
|
+
* Negative second values with fractions must still have non-negative nanos
|
|
113
|
+
* values that count forward in time. Must be between 0 and 999,999,999
|
|
113
114
|
* inclusive.
|
|
114
115
|
*/
|
|
115
116
|
nanos: number;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@readytomog/contracts",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Protobuf definitions and generated Typescript types",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit",
|
|
8
|
+
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=useDate=true,nestJs=true,package=omit",
|
|
9
9
|
"build": "tsc -p tsconfig.build.json"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
package/proto/chat.proto
CHANGED
|
@@ -2,7 +2,7 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package chat.v1;
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
|
|
7
7
|
service ChatService {
|
|
8
8
|
rpc CreateChat(CreateChatRequest) returns (CreateChatResponse);
|
|
@@ -32,8 +32,8 @@ message Message {
|
|
|
32
32
|
string message = 1;
|
|
33
33
|
string senderId = 2;
|
|
34
34
|
string id = 4;
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
string created_at = 5;
|
|
36
|
+
string updated_at = 6;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
message User {
|
|
@@ -47,8 +47,8 @@ message Chat {
|
|
|
47
47
|
string id = 1;
|
|
48
48
|
repeated User users = 2;
|
|
49
49
|
string lastMessage = 3;
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
string created_at = 5;
|
|
51
|
+
string updated_at = 6;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
message GetMessagesRequest {
|