@trash-streamers/contracts 1.1.17 → 1.1.19

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,4 +1,5 @@
1
1
  import { Observable } from "rxjs";
2
+ import { Timestamp } from "./google/protobuf/timestamp";
2
3
  export declare const protobufPackage = "account.v1";
3
4
  export declare enum Role {
4
5
  USER = "USER",
@@ -55,6 +56,8 @@ export interface Account {
55
56
  isEmailVerified: boolean;
56
57
  role: Role;
57
58
  userId: string;
59
+ createdAt: Timestamp | undefined;
60
+ updatedAt: Timestamp | undefined;
58
61
  }
59
62
  export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
60
63
  export interface AccountServiceClient {
@@ -0,0 +1,109 @@
1
+ export declare const protobufPackage = "google.protobuf";
2
+ /**
3
+ * A Timestamp represents a point in time independent of any time zone or local
4
+ * calendar, encoded as a count of seconds and fractions of seconds at
5
+ * nanosecond resolution. The count is relative to an epoch at UTC midnight on
6
+ * January 1, 1970, in the proleptic Gregorian calendar which extends the
7
+ * Gregorian calendar backwards to year one.
8
+ *
9
+ * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
10
+ * second table is needed for interpretation, using a [24-hour linear
11
+ * smear](https://developers.google.com/time/smear).
12
+ *
13
+ * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
14
+ * restricting to that range, we ensure that we can convert to and from [RFC
15
+ * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
16
+ *
17
+ * # Examples
18
+ *
19
+ * Example 1: Compute Timestamp from POSIX `time()`.
20
+ *
21
+ * Timestamp timestamp;
22
+ * timestamp.set_seconds(time(NULL));
23
+ * timestamp.set_nanos(0);
24
+ *
25
+ * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
26
+ *
27
+ * struct timeval tv;
28
+ * gettimeofday(&tv, NULL);
29
+ *
30
+ * Timestamp timestamp;
31
+ * timestamp.set_seconds(tv.tv_sec);
32
+ * timestamp.set_nanos(tv.tv_usec * 1000);
33
+ *
34
+ * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
35
+ *
36
+ * FILETIME ft;
37
+ * GetSystemTimeAsFileTime(&ft);
38
+ * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
39
+ *
40
+ * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
41
+ * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
42
+ * Timestamp timestamp;
43
+ * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
44
+ * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
45
+ *
46
+ * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
47
+ *
48
+ * long millis = System.currentTimeMillis();
49
+ *
50
+ * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
51
+ * .setNanos((int) ((millis % 1000) * 1000000)).build();
52
+ *
53
+ * Example 5: Compute Timestamp from Java `Instant.now()`.
54
+ *
55
+ * Instant now = Instant.now();
56
+ *
57
+ * Timestamp timestamp =
58
+ * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
59
+ * .setNanos(now.getNano()).build();
60
+ *
61
+ * Example 6: Compute Timestamp from current time in Python.
62
+ *
63
+ * timestamp = Timestamp()
64
+ * timestamp.GetCurrentTime()
65
+ *
66
+ * # JSON Mapping
67
+ *
68
+ * In JSON format, the Timestamp type is encoded as a string in the
69
+ * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
70
+ * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
71
+ * where {year} is always expressed using four digits while {month}, {day},
72
+ * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
73
+ * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
74
+ * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
75
+ * is required. A proto3 JSON serializer should always use UTC (as indicated by
76
+ * "Z") when printing the Timestamp type and a proto3 JSON parser should be
77
+ * able to accept both UTC and other timezones (as indicated by an offset).
78
+ *
79
+ * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
80
+ * 01:30 UTC on January 15, 2017.
81
+ *
82
+ * In JavaScript, one can convert a Date object to this format using the
83
+ * standard
84
+ * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
85
+ * method. In Python, a standard `datetime.datetime` object can be converted
86
+ * to this format using
87
+ * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
88
+ * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
89
+ * the Joda Time's [`ISODateTimeFormat.dateTime()`](
90
+ * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
91
+ * ) to obtain a formatter capable of generating timestamps in this format.
92
+ */
93
+ export interface Timestamp {
94
+ /**
95
+ * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
96
+ * be between -315576000000 and 315576000000 inclusive (which corresponds to
97
+ * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
98
+ */
99
+ seconds: number;
100
+ /**
101
+ * Non-negative fractions of a second at nanosecond resolution. This field is
102
+ * the nanosecond portion of the duration, not an alternative to seconds.
103
+ * Negative second values with fractions must still have non-negative nanos
104
+ * values that count forward in time. Must be between 0 and 999,999,999
105
+ * inclusive.
106
+ */
107
+ nanos: number;
108
+ }
109
+ export declare const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.10.1
5
+ // protoc v6.33.2
6
+ // source: google/protobuf/timestamp.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.GOOGLE_PROTOBUF_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ exports.protobufPackage = "google.protobuf";
11
+ exports.GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROTO_PATHS = void 0;
4
- const path_1 = require("path");
5
4
  exports.PROTO_PATHS = {
6
- AUTH: (0, path_1.join)(__dirname, '../../proto/auth.proto'),
7
- ACCOUNT: (0, path_1.join)(__dirname, '../../proto/account.proto'),
8
- USERS: (0, path_1.join)(__dirname, '../../proto/users.proto')
5
+ AUTH: require.resolve('@trash-streamers/contracts/proto/auth.proto'),
6
+ ACCOUNT: require.resolve('@trash-streamers/contracts/proto/account.proto'),
7
+ USERS: require.resolve('@trash-streamers/contracts/proto/users.proto')
9
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trash-streamers/contracts",
3
- "version": "1.1.17",
3
+ "version": "1.1.19",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "scripts": {
@@ -1,6 +1,8 @@
1
1
  syntax = "proto3";
2
2
 
3
3
  package account.v1;
4
+
5
+ import "google/protobuf/timestamp.proto";
4
6
  service AccountService {
5
7
  rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
6
8
  rpc GetAccounts (GetAccountsRequest) returns (GetAccountsResponse);
@@ -77,4 +79,6 @@ message Account {
77
79
  bool is_email_verified = 5;
78
80
  Role role = 6;
79
81
  string user_id = 7;
82
+ google.protobuf.Timestamp created_at = 8;
83
+ google.protobuf.Timestamp updated_at = 9;
80
84
  }