@gitpod/public-api 0.1.5-mp-grpc-web-prototype.1 → 0.1.5-mp-dashboard-public-api-connect.7

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.
Files changed (44) hide show
  1. package/lib/gitpod/v1/pagination_pb.d.ts +46 -0
  2. package/lib/gitpod/v1/pagination_pb.js +23 -0
  3. package/lib/gitpod/v1/prebuilds_connectweb.d.ts +65 -0
  4. package/lib/gitpod/v1/prebuilds_connectweb.d.ts.map +1 -0
  5. package/lib/gitpod/v1/prebuilds_connectweb.js +72 -0
  6. package/lib/gitpod/v1/prebuilds_connectweb.js.map +1 -0
  7. package/lib/gitpod/v1/prebuilds_connectweb.ts +71 -0
  8. package/lib/gitpod/v1/prebuilds_pb.d.ts +377 -0
  9. package/lib/gitpod/v1/prebuilds_pb.js +161 -0
  10. package/lib/gitpod/v1/workspaces_connectweb.d.ts +134 -0
  11. package/lib/gitpod/v1/workspaces_connectweb.d.ts.map +1 -0
  12. package/lib/gitpod/v1/workspaces_connectweb.js +141 -0
  13. package/lib/gitpod/v1/workspaces_connectweb.js.map +1 -0
  14. package/lib/gitpod/v1/workspaces_connectweb.ts +140 -0
  15. package/lib/gitpod/v1/workspaces_pb.d.ts +1072 -0
  16. package/lib/gitpod/v1/workspaces_pb.js +403 -0
  17. package/package.json +14 -7
  18. package/pkg-yarn.lock +5 -4
  19. package/provenance-bundle.jsonl +2 -2
  20. package/lib/gitpod/v1/pagination.pb.d.ts +0 -31
  21. package/lib/gitpod/v1/pagination.pb.d.ts.map +0 -1
  22. package/lib/gitpod/v1/pagination.pb.js +0 -53
  23. package/lib/gitpod/v1/pagination.pb.js.map +0 -1
  24. package/lib/gitpod/v1/pagination.pb.ts +0 -77
  25. package/lib/gitpod/v1/prebuilds.pb.d.ts +0 -289
  26. package/lib/gitpod/v1/prebuilds.pb.d.ts.map +0 -1
  27. package/lib/gitpod/v1/prebuilds.pb.js +0 -585
  28. package/lib/gitpod/v1/prebuilds.pb.js.map +0 -1
  29. package/lib/gitpod/v1/prebuilds.pb.ts +0 -782
  30. package/lib/gitpod/v1/workspaces.pb.d.ts +0 -665
  31. package/lib/gitpod/v1/workspaces.pb.d.ts.map +0 -1
  32. package/lib/gitpod/v1/workspaces.pb.js +0 -1571
  33. package/lib/gitpod/v1/workspaces.pb.js.map +0 -1
  34. package/lib/gitpod/v1/workspaces.pb.ts +0 -2031
  35. package/lib/google/protobuf/field_mask.pb.d.ts +0 -231
  36. package/lib/google/protobuf/field_mask.pb.d.ts.map +0 -1
  37. package/lib/google/protobuf/field_mask.pb.js +0 -54
  38. package/lib/google/protobuf/field_mask.pb.js.map +0 -1
  39. package/lib/google/protobuf/field_mask.pb.ts +0 -280
  40. package/lib/google/protobuf/timestamp.pb.d.ts +0 -131
  41. package/lib/google/protobuf/timestamp.pb.d.ts.map +0 -1
  42. package/lib/google/protobuf/timestamp.pb.js +0 -81
  43. package/lib/google/protobuf/timestamp.pb.js.map +0 -1
  44. package/lib/google/protobuf/timestamp.pb.ts +0 -211
@@ -1,131 +0,0 @@
1
- /**
2
- * Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
- * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
5
- */
6
- import * as _m0 from "protobufjs/minimal";
7
- export declare const protobufPackage = "google.protobuf";
8
- /**
9
- * A Timestamp represents a point in time independent of any time zone or local
10
- * calendar, encoded as a count of seconds and fractions of seconds at
11
- * nanosecond resolution. The count is relative to an epoch at UTC midnight on
12
- * January 1, 1970, in the proleptic Gregorian calendar which extends the
13
- * Gregorian calendar backwards to year one.
14
- *
15
- * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
16
- * second table is needed for interpretation, using a [24-hour linear
17
- * smear](https://developers.google.com/time/smear).
18
- *
19
- * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
20
- * restricting to that range, we ensure that we can convert to and from [RFC
21
- * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
22
- *
23
- * # Examples
24
- *
25
- * Example 1: Compute Timestamp from POSIX `time()`.
26
- *
27
- * Timestamp timestamp;
28
- * timestamp.set_seconds(time(NULL));
29
- * timestamp.set_nanos(0);
30
- *
31
- * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
32
- *
33
- * struct timeval tv;
34
- * gettimeofday(&tv, NULL);
35
- *
36
- * Timestamp timestamp;
37
- * timestamp.set_seconds(tv.tv_sec);
38
- * timestamp.set_nanos(tv.tv_usec * 1000);
39
- *
40
- * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
41
- *
42
- * FILETIME ft;
43
- * GetSystemTimeAsFileTime(&ft);
44
- * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
45
- *
46
- * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
47
- * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
48
- * Timestamp timestamp;
49
- * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
50
- * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
51
- *
52
- * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
53
- *
54
- * long millis = System.currentTimeMillis();
55
- *
56
- * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
57
- * .setNanos((int) ((millis % 1000) * 1000000)).build();
58
- *
59
- * Example 5: Compute Timestamp from Java `Instant.now()`.
60
- *
61
- * Instant now = Instant.now();
62
- *
63
- * Timestamp timestamp =
64
- * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
65
- * .setNanos(now.getNano()).build();
66
- *
67
- * Example 6: Compute Timestamp from current time in Python.
68
- *
69
- * timestamp = Timestamp()
70
- * timestamp.GetCurrentTime()
71
- *
72
- * # JSON Mapping
73
- *
74
- * In JSON format, the Timestamp type is encoded as a string in the
75
- * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
76
- * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
77
- * where {year} is always expressed using four digits while {month}, {day},
78
- * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
79
- * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
80
- * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
81
- * is required. A proto3 JSON serializer should always use UTC (as indicated by
82
- * "Z") when printing the Timestamp type and a proto3 JSON parser should be
83
- * able to accept both UTC and other timezones (as indicated by an offset).
84
- *
85
- * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
86
- * 01:30 UTC on January 15, 2017.
87
- *
88
- * In JavaScript, one can convert a Date object to this format using the
89
- * standard
90
- * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
91
- * method. In Python, a standard `datetime.datetime` object can be converted
92
- * to this format using
93
- * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
94
- * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
95
- * the Joda Time's [`ISODateTimeFormat.dateTime()`](
96
- * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
97
- * ) to obtain a formatter capable of generating timestamps in this format.
98
- */
99
- export interface Timestamp {
100
- /**
101
- * Represents seconds of UTC time since Unix epoch
102
- * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
103
- * 9999-12-31T23:59:59Z inclusive.
104
- */
105
- seconds: number;
106
- /**
107
- * Non-negative fractions of a second at nanosecond resolution. Negative
108
- * second values with fractions must still have non-negative nanos values
109
- * that count forward in time. Must be from 0 to 999,999,999
110
- * inclusive.
111
- */
112
- nanos: number;
113
- }
114
- export declare const Timestamp: {
115
- encode(message: Timestamp, writer?: _m0.Writer): _m0.Writer;
116
- decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Timestamp;
117
- fromPartial(object: DeepPartial<Timestamp>): Timestamp;
118
- };
119
- export interface DataLoaderOptions {
120
- cache?: boolean;
121
- }
122
- export interface DataLoaders {
123
- rpcDataLoaderOptions?: DataLoaderOptions;
124
- getDataLoader<T>(identifier: string, constructorFn: () => T): T;
125
- }
126
- declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
127
- export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
128
- [K in keyof T]?: DeepPartial<T[K]>;
129
- } : Partial<T>;
130
- export {};
131
- //# sourceMappingURL=timestamp.pb.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timestamp.pb.d.ts","sourceRoot":"","sources":["../../../src/google/protobuf/timestamp.pb.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AACH,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAMD,eAAO,MAAM,SAAS;oBACJ,SAAS,WAAU,IAAI,MAAM,GAAyB,IAAI,MAAM;kBAUlE,IAAI,MAAM,GAAG,UAAU,gCAAoB,SAAS;wBAqB9C,YAAY,SAAS,CAAC,GAAG,SAAS;CAMvD,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,oBAAoB,CAAC,EAAE,iBAAiB,CAAC;IACzC,aAAa,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;CACjE;AAqBD,aAAK,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpF,oBAAY,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,GAC9C,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GACnH,CAAC,SAAS,EAAE,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACrD,OAAO,CAAC,CAAC,CAAC,CAAC"}
@@ -1,81 +0,0 @@
1
- "use strict";
2
- /**
3
- * Copyright (c) 2022 Gitpod GmbH. All rights reserved.
4
- * Licensed under the GNU Affero General Public License (AGPL).
5
- * See License-AGPL.txt in the project root for license information.
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.Timestamp = exports.protobufPackage = void 0;
9
- /* eslint-disable */
10
- const Long = require("long");
11
- const _m0 = require("protobufjs/minimal");
12
- exports.protobufPackage = "google.protobuf";
13
- function createBaseTimestamp() {
14
- return { seconds: 0, nanos: 0 };
15
- }
16
- exports.Timestamp = {
17
- encode(message, writer = _m0.Writer.create()) {
18
- if (message.seconds !== 0) {
19
- writer.uint32(8).int64(message.seconds);
20
- }
21
- if (message.nanos !== 0) {
22
- writer.uint32(16).int32(message.nanos);
23
- }
24
- return writer;
25
- },
26
- decode(input, length) {
27
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
28
- let end = length === undefined ? reader.len : reader.pos + length;
29
- const message = createBaseTimestamp();
30
- while (reader.pos < end) {
31
- const tag = reader.uint32();
32
- switch (tag >>> 3) {
33
- case 1:
34
- message.seconds = longToNumber(reader.int64());
35
- break;
36
- case 2:
37
- message.nanos = reader.int32();
38
- break;
39
- default:
40
- reader.skipType(tag & 7);
41
- break;
42
- }
43
- }
44
- return message;
45
- },
46
- fromPartial(object) {
47
- var _a, _b;
48
- const message = createBaseTimestamp();
49
- message.seconds = (_a = object.seconds) !== null && _a !== void 0 ? _a : 0;
50
- message.nanos = (_b = object.nanos) !== null && _b !== void 0 ? _b : 0;
51
- return message;
52
- },
53
- };
54
- var globalThis = (() => {
55
- if (typeof globalThis !== "undefined") {
56
- return globalThis;
57
- }
58
- if (typeof self !== "undefined") {
59
- return self;
60
- }
61
- if (typeof window !== "undefined") {
62
- return window;
63
- }
64
- if (typeof global !== "undefined") {
65
- return global;
66
- }
67
- throw "Unable to locate global object";
68
- })();
69
- function longToNumber(long) {
70
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
71
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
72
- }
73
- return long.toNumber();
74
- }
75
- // If you get a compile-error about 'Constructor<Long> and ... have no overlap',
76
- // add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
77
- if (_m0.util.Long !== Long) {
78
- _m0.util.Long = Long;
79
- _m0.configure();
80
- }
81
- //# sourceMappingURL=timestamp.pb.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timestamp.pb.js","sourceRoot":"","sources":["../../../src/google/protobuf/timestamp.pb.ts"],"names":[],"mappings":"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"}
@@ -1,211 +0,0 @@
1
- /**
2
- * Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
- * Licensed under the GNU Affero General Public License (AGPL).
4
- * See License-AGPL.txt in the project root for license information.
5
- */
6
-
7
- /* eslint-disable */
8
- import * as Long from "long";
9
- import * as _m0 from "protobufjs/minimal";
10
-
11
- export const protobufPackage = "google.protobuf";
12
-
13
- /**
14
- * A Timestamp represents a point in time independent of any time zone or local
15
- * calendar, encoded as a count of seconds and fractions of seconds at
16
- * nanosecond resolution. The count is relative to an epoch at UTC midnight on
17
- * January 1, 1970, in the proleptic Gregorian calendar which extends the
18
- * Gregorian calendar backwards to year one.
19
- *
20
- * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
21
- * second table is needed for interpretation, using a [24-hour linear
22
- * smear](https://developers.google.com/time/smear).
23
- *
24
- * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
25
- * restricting to that range, we ensure that we can convert to and from [RFC
26
- * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
27
- *
28
- * # Examples
29
- *
30
- * Example 1: Compute Timestamp from POSIX `time()`.
31
- *
32
- * Timestamp timestamp;
33
- * timestamp.set_seconds(time(NULL));
34
- * timestamp.set_nanos(0);
35
- *
36
- * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
37
- *
38
- * struct timeval tv;
39
- * gettimeofday(&tv, NULL);
40
- *
41
- * Timestamp timestamp;
42
- * timestamp.set_seconds(tv.tv_sec);
43
- * timestamp.set_nanos(tv.tv_usec * 1000);
44
- *
45
- * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
46
- *
47
- * FILETIME ft;
48
- * GetSystemTimeAsFileTime(&ft);
49
- * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
50
- *
51
- * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
52
- * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
53
- * Timestamp timestamp;
54
- * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
55
- * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
56
- *
57
- * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
58
- *
59
- * long millis = System.currentTimeMillis();
60
- *
61
- * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
62
- * .setNanos((int) ((millis % 1000) * 1000000)).build();
63
- *
64
- * Example 5: Compute Timestamp from Java `Instant.now()`.
65
- *
66
- * Instant now = Instant.now();
67
- *
68
- * Timestamp timestamp =
69
- * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
70
- * .setNanos(now.getNano()).build();
71
- *
72
- * Example 6: Compute Timestamp from current time in Python.
73
- *
74
- * timestamp = Timestamp()
75
- * timestamp.GetCurrentTime()
76
- *
77
- * # JSON Mapping
78
- *
79
- * In JSON format, the Timestamp type is encoded as a string in the
80
- * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
81
- * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
82
- * where {year} is always expressed using four digits while {month}, {day},
83
- * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
84
- * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
85
- * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
86
- * is required. A proto3 JSON serializer should always use UTC (as indicated by
87
- * "Z") when printing the Timestamp type and a proto3 JSON parser should be
88
- * able to accept both UTC and other timezones (as indicated by an offset).
89
- *
90
- * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
91
- * 01:30 UTC on January 15, 2017.
92
- *
93
- * In JavaScript, one can convert a Date object to this format using the
94
- * standard
95
- * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
96
- * method. In Python, a standard `datetime.datetime` object can be converted
97
- * to this format using
98
- * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
99
- * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
100
- * the Joda Time's [`ISODateTimeFormat.dateTime()`](
101
- * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
102
- * ) to obtain a formatter capable of generating timestamps in this format.
103
- */
104
- export interface Timestamp {
105
- /**
106
- * Represents seconds of UTC time since Unix epoch
107
- * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
108
- * 9999-12-31T23:59:59Z inclusive.
109
- */
110
- seconds: number;
111
- /**
112
- * Non-negative fractions of a second at nanosecond resolution. Negative
113
- * second values with fractions must still have non-negative nanos values
114
- * that count forward in time. Must be from 0 to 999,999,999
115
- * inclusive.
116
- */
117
- nanos: number;
118
- }
119
-
120
- function createBaseTimestamp(): Timestamp {
121
- return { seconds: 0, nanos: 0 };
122
- }
123
-
124
- export const Timestamp = {
125
- encode(message: Timestamp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
126
- if (message.seconds !== 0) {
127
- writer.uint32(8).int64(message.seconds);
128
- }
129
- if (message.nanos !== 0) {
130
- writer.uint32(16).int32(message.nanos);
131
- }
132
- return writer;
133
- },
134
-
135
- decode(input: _m0.Reader | Uint8Array, length?: number): Timestamp {
136
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
137
- let end = length === undefined ? reader.len : reader.pos + length;
138
- const message = createBaseTimestamp();
139
- while (reader.pos < end) {
140
- const tag = reader.uint32();
141
- switch (tag >>> 3) {
142
- case 1:
143
- message.seconds = longToNumber(reader.int64() as Long);
144
- break;
145
- case 2:
146
- message.nanos = reader.int32();
147
- break;
148
- default:
149
- reader.skipType(tag & 7);
150
- break;
151
- }
152
- }
153
- return message;
154
- },
155
-
156
- fromPartial(object: DeepPartial<Timestamp>): Timestamp {
157
- const message = createBaseTimestamp();
158
- message.seconds = object.seconds ?? 0;
159
- message.nanos = object.nanos ?? 0;
160
- return message;
161
- },
162
- };
163
-
164
- export interface DataLoaderOptions {
165
- cache?: boolean;
166
- }
167
-
168
- export interface DataLoaders {
169
- rpcDataLoaderOptions?: DataLoaderOptions;
170
- getDataLoader<T>(identifier: string, constructorFn: () => T): T;
171
- }
172
-
173
- declare var self: any | undefined;
174
- declare var window: any | undefined;
175
- declare var global: any | undefined;
176
- var globalThis: any = (() => {
177
- if (typeof globalThis !== "undefined") {
178
- return globalThis;
179
- }
180
- if (typeof self !== "undefined") {
181
- return self;
182
- }
183
- if (typeof window !== "undefined") {
184
- return window;
185
- }
186
- if (typeof global !== "undefined") {
187
- return global;
188
- }
189
- throw "Unable to locate global object";
190
- })();
191
-
192
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
193
-
194
- export type DeepPartial<T> = T extends Builtin ? T
195
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
196
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
197
- : Partial<T>;
198
-
199
- function longToNumber(long: Long): number {
200
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
201
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
202
- }
203
- return long.toNumber();
204
- }
205
-
206
- // If you get a compile-error about 'Constructor<Long> and ... have no overlap',
207
- // add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.
208
- if (_m0.util.Long !== Long) {
209
- _m0.util.Long = Long as any;
210
- _m0.configure();
211
- }