@shock-cinema/contracts 1.0.4 → 1.0.5
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/google/protobuf/any.ts +5 -10
- package/gen/google/protobuf/duration.ts +1 -1
- package/gen/google/protobuf/empty.ts +1 -1
- package/gen/google/protobuf/struct.ts +2 -2
- package/gen/google/protobuf/timestamp.ts +8 -9
- package/gen/test.ts +1 -1
- package/package.json +8 -1
- package/proto/test.proto +43 -0
|
@@ -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.10.1
|
|
4
|
-
// protoc
|
|
4
|
+
// protoc v3.21.12
|
|
5
5
|
// source: google/protobuf/any.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
@@ -33,12 +33,8 @@ export const protobufPackage = "google.protobuf";
|
|
|
33
33
|
* if (any.is(Foo.class)) {
|
|
34
34
|
* foo = any.unpack(Foo.class);
|
|
35
35
|
* }
|
|
36
|
-
* // or ...
|
|
37
|
-
* if (any.isSameTypeAs(Foo.getDefaultInstance())) {
|
|
38
|
-
* foo = any.unpack(Foo.getDefaultInstance());
|
|
39
|
-
* }
|
|
40
36
|
*
|
|
41
|
-
*
|
|
37
|
+
* Example 3: Pack and unpack a message in Python.
|
|
42
38
|
*
|
|
43
39
|
* foo = Foo(...)
|
|
44
40
|
* any = Any()
|
|
@@ -48,7 +44,7 @@ export const protobufPackage = "google.protobuf";
|
|
|
48
44
|
* any.Unpack(foo)
|
|
49
45
|
* ...
|
|
50
46
|
*
|
|
51
|
-
*
|
|
47
|
+
* Example 4: Pack and unpack a message in Go
|
|
52
48
|
*
|
|
53
49
|
* foo := &pb.Foo{...}
|
|
54
50
|
* any, err := anypb.New(foo)
|
|
@@ -68,7 +64,7 @@ export const protobufPackage = "google.protobuf";
|
|
|
68
64
|
* name "y.z".
|
|
69
65
|
*
|
|
70
66
|
* JSON
|
|
71
|
-
*
|
|
67
|
+
*
|
|
72
68
|
* The JSON representation of an `Any` value uses the regular
|
|
73
69
|
* representation of the deserialized, embedded message, with an
|
|
74
70
|
* additional field `@type` which contains the type URL. Example:
|
|
@@ -120,8 +116,7 @@ export interface Any {
|
|
|
120
116
|
*
|
|
121
117
|
* Note: this functionality is not currently available in the official
|
|
122
118
|
* protobuf release, and it is not used for type URLs beginning with
|
|
123
|
-
* type.googleapis.com.
|
|
124
|
-
* implementations and no plans to implement one.
|
|
119
|
+
* type.googleapis.com.
|
|
125
120
|
*
|
|
126
121
|
* Schemes other than `http`, `https` (or the empty scheme) might be
|
|
127
122
|
* used with implementation specific semantics.
|
|
@@ -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.10.1
|
|
4
|
-
// protoc
|
|
4
|
+
// protoc v3.21.12
|
|
5
5
|
// source: google/protobuf/struct.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
@@ -13,7 +13,7 @@ export const protobufPackage = "google.protobuf";
|
|
|
13
13
|
* `NullValue` is a singleton enumeration to represent the null value for the
|
|
14
14
|
* `Value` type union.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
16
|
+
* The JSON representation for `NullValue` is JSON `null`.
|
|
17
17
|
*/
|
|
18
18
|
export enum NullValue {
|
|
19
19
|
/** NULL_VALUE - Null value. */
|
|
@@ -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.10.1
|
|
4
|
-
// protoc
|
|
4
|
+
// protoc v3.21.12
|
|
5
5
|
// source: google/protobuf/timestamp.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
@@ -96,21 +96,20 @@ 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://joda-time
|
|
99
|
+
* http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
|
|
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
|
-
*
|
|
104
|
+
* Represents seconds of UTC time since Unix epoch
|
|
105
|
+
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
|
106
|
+
* 9999-12-31T23:59:59Z inclusive.
|
|
107
107
|
*/
|
|
108
108
|
seconds: number;
|
|
109
109
|
/**
|
|
110
|
-
* Non-negative fractions of a second at nanosecond resolution.
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* values that count forward in time. Must be between 0 and 999,999,999
|
|
110
|
+
* Non-negative fractions of a second at nanosecond resolution. Negative
|
|
111
|
+
* second values with fractions must still have non-negative nanos values
|
|
112
|
+
* that count forward in time. Must be from 0 to 999,999,999
|
|
114
113
|
* inclusive.
|
|
115
114
|
*/
|
|
116
115
|
nanos: number;
|
package/gen/test.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shock-cinema/contracts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Protobuf definitions and generated TypeScript types",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
5
7
|
"scripts": {
|
|
8
|
+
"build": "tsc -p tsconfig.build.json",
|
|
6
9
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
10
|
},
|
|
8
11
|
"files": [
|
|
@@ -16,5 +19,9 @@
|
|
|
16
19
|
"@nestjs/microservices": "^11.1.11",
|
|
17
20
|
"rxjs": "^7.8.2",
|
|
18
21
|
"ts-proto": "^2.8.3"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/node": "^25.0.3",
|
|
25
|
+
"typescript": "^5.9.3"
|
|
19
26
|
}
|
|
20
27
|
}
|
package/proto/test.proto
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package test.v1;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/empty.proto";
|
|
6
|
+
import "google/protobuf/timestamp.proto";
|
|
7
|
+
import "google/protobuf/duration.proto";
|
|
8
|
+
import "google/protobuf/struct.proto";
|
|
9
|
+
import "google/protobuf/any.proto";
|
|
10
|
+
|
|
11
|
+
service TestService {
|
|
12
|
+
rpc Ping (google.protobuf.Empty) returns (PingResponse);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message PingResponse {
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message UserSession {
|
|
20
|
+
string id = 1;
|
|
21
|
+
google.protobuf.Timestamp created_at = 2;
|
|
22
|
+
google.protobuf.Duration duration = 3;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message UserProfile {
|
|
26
|
+
string id = 1;
|
|
27
|
+
int32 age = 2;
|
|
28
|
+
double rating = 3;
|
|
29
|
+
bool verified = 4;
|
|
30
|
+
repeated string roles = 5;
|
|
31
|
+
map<string, string> meta = 6;
|
|
32
|
+
Status status = 7;
|
|
33
|
+
oneof contact {
|
|
34
|
+
string phone = 8;
|
|
35
|
+
string email = 9;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
enum Status {
|
|
40
|
+
STATUS_UNKNOWN = 0;
|
|
41
|
+
STATUS_ACTIVE = 1;
|
|
42
|
+
STATUS_BANNED = 2;
|
|
43
|
+
}
|