@shock-cinema/contracts 1.0.1 → 1.0.3
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/auth.ts +20 -175
- package/gen/google/protobuf/any.ts +2 -127
- package/gen/google/protobuf/duration.ts +2 -113
- package/gen/google/protobuf/empty.ts +2 -65
- package/gen/google/protobuf/struct.ts +21 -415
- package/gen/google/protobuf/timestamp.ts +2 -113
- package/gen/test.ts +21 -536
- package/package.json +3 -5
package/gen/auth.ts
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
// source: auth.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
8
|
-
import {
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
9
10
|
|
|
10
11
|
export const protobufPackage = "auth.v1";
|
|
11
12
|
|
|
@@ -18,185 +19,29 @@ export interface SendOtpResponse {
|
|
|
18
19
|
ok: boolean;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
return { identifier: "", type: "" };
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const SendOtpRequest: MessageFns<SendOtpRequest> = {
|
|
26
|
-
encode(message: SendOtpRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
27
|
-
if (message.identifier !== "") {
|
|
28
|
-
writer.uint32(10).string(message.identifier);
|
|
29
|
-
}
|
|
30
|
-
if (message.type !== "") {
|
|
31
|
-
writer.uint32(18).string(message.type);
|
|
32
|
-
}
|
|
33
|
-
return writer;
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
decode(input: BinaryReader | Uint8Array, length?: number): SendOtpRequest {
|
|
37
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
38
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
39
|
-
const message = createBaseSendOtpRequest();
|
|
40
|
-
while (reader.pos < end) {
|
|
41
|
-
const tag = reader.uint32();
|
|
42
|
-
switch (tag >>> 3) {
|
|
43
|
-
case 1: {
|
|
44
|
-
if (tag !== 10) {
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
message.identifier = reader.string();
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
case 2: {
|
|
52
|
-
if (tag !== 18) {
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
message.type = reader.string();
|
|
57
|
-
continue;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
reader.skip(tag & 7);
|
|
64
|
-
}
|
|
65
|
-
return message;
|
|
66
|
-
},
|
|
22
|
+
export const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
67
23
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
identifier: isSet(object.identifier) ? globalThis.String(object.identifier) : "",
|
|
71
|
-
type: isSet(object.type) ? globalThis.String(object.type) : "",
|
|
72
|
-
};
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
toJSON(message: SendOtpRequest): unknown {
|
|
76
|
-
const obj: any = {};
|
|
77
|
-
if (message.identifier !== "") {
|
|
78
|
-
obj.identifier = message.identifier;
|
|
79
|
-
}
|
|
80
|
-
if (message.type !== "") {
|
|
81
|
-
obj.type = message.type;
|
|
82
|
-
}
|
|
83
|
-
return obj;
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
create<I extends Exact<DeepPartial<SendOtpRequest>, I>>(base?: I): SendOtpRequest {
|
|
87
|
-
return SendOtpRequest.fromPartial(base ?? ({} as any));
|
|
88
|
-
},
|
|
89
|
-
fromPartial<I extends Exact<DeepPartial<SendOtpRequest>, I>>(object: I): SendOtpRequest {
|
|
90
|
-
const message = createBaseSendOtpRequest();
|
|
91
|
-
message.identifier = object.identifier ?? "";
|
|
92
|
-
message.type = object.type ?? "";
|
|
93
|
-
return message;
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
function createBaseSendOtpResponse(): SendOtpResponse {
|
|
98
|
-
return { ok: false };
|
|
24
|
+
export interface AuthServiceClient {
|
|
25
|
+
sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
|
|
99
26
|
}
|
|
100
27
|
|
|
101
|
-
export
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
writer.uint32(8).bool(message.ok);
|
|
105
|
-
}
|
|
106
|
-
return writer;
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
decode(input: BinaryReader | Uint8Array, length?: number): SendOtpResponse {
|
|
110
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
111
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
112
|
-
const message = createBaseSendOtpResponse();
|
|
113
|
-
while (reader.pos < end) {
|
|
114
|
-
const tag = reader.uint32();
|
|
115
|
-
switch (tag >>> 3) {
|
|
116
|
-
case 1: {
|
|
117
|
-
if (tag !== 8) {
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
28
|
+
export interface AuthServiceController {
|
|
29
|
+
sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
|
|
30
|
+
}
|
|
120
31
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
reader.skip(tag & 7);
|
|
32
|
+
export function AuthServiceControllerMethods() {
|
|
33
|
+
return function (constructor: Function) {
|
|
34
|
+
const grpcMethods: string[] = ["sendOtp"];
|
|
35
|
+
for (const method of grpcMethods) {
|
|
36
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
37
|
+
GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
|
129
38
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return { ok: isSet(object.ok) ? globalThis.Boolean(object.ok) : false };
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
toJSON(message: SendOtpResponse): unknown {
|
|
138
|
-
const obj: any = {};
|
|
139
|
-
if (message.ok !== false) {
|
|
140
|
-
obj.ok = message.ok;
|
|
39
|
+
const grpcStreamMethods: string[] = [];
|
|
40
|
+
for (const method of grpcStreamMethods) {
|
|
41
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
42
|
+
GrpcStreamMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
|
141
43
|
}
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
create<I extends Exact<DeepPartial<SendOtpResponse>, I>>(base?: I): SendOtpResponse {
|
|
146
|
-
return SendOtpResponse.fromPartial(base ?? ({} as any));
|
|
147
|
-
},
|
|
148
|
-
fromPartial<I extends Exact<DeepPartial<SendOtpResponse>, I>>(object: I): SendOtpResponse {
|
|
149
|
-
const message = createBaseSendOtpResponse();
|
|
150
|
-
message.ok = object.ok ?? false;
|
|
151
|
-
return message;
|
|
152
|
-
},
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
export interface AuthService {
|
|
156
|
-
SendOtp(request: SendOtpRequest): Promise<SendOtpResponse>;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export const AuthServiceServiceName = "auth.v1.AuthService";
|
|
160
|
-
export class AuthServiceClientImpl implements AuthService {
|
|
161
|
-
private readonly rpc: Rpc;
|
|
162
|
-
private readonly service: string;
|
|
163
|
-
constructor(rpc: Rpc, opts?: { service?: string }) {
|
|
164
|
-
this.service = opts?.service || AuthServiceServiceName;
|
|
165
|
-
this.rpc = rpc;
|
|
166
|
-
this.SendOtp = this.SendOtp.bind(this);
|
|
167
|
-
}
|
|
168
|
-
SendOtp(request: SendOtpRequest): Promise<SendOtpResponse> {
|
|
169
|
-
const data = SendOtpRequest.encode(request).finish();
|
|
170
|
-
const promise = this.rpc.request(this.service, "SendOtp", data);
|
|
171
|
-
return promise.then((data) => SendOtpResponse.decode(new BinaryReader(data)));
|
|
172
|
-
}
|
|
44
|
+
};
|
|
173
45
|
}
|
|
174
46
|
|
|
175
|
-
|
|
176
|
-
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
180
|
-
|
|
181
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
182
|
-
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
183
|
-
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
184
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
185
|
-
: Partial<T>;
|
|
186
|
-
|
|
187
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
188
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
189
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
190
|
-
|
|
191
|
-
function isSet(value: any): boolean {
|
|
192
|
-
return value !== null && value !== undefined;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export interface MessageFns<T> {
|
|
196
|
-
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
197
|
-
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
198
|
-
fromJSON(object: any): T;
|
|
199
|
-
toJSON(message: T): unknown;
|
|
200
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
201
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
202
|
-
}
|
|
47
|
+
export const AUTH_SERVICE_NAME = "AuthService";
|
|
@@ -1,11 +1,10 @@
|
|
|
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 v6.33.
|
|
4
|
+
// protoc v6.33.1
|
|
5
5
|
// source: google/protobuf/any.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
8
|
-
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
8
|
|
|
10
9
|
export const protobufPackage = "google.protobuf";
|
|
11
10
|
|
|
@@ -132,128 +131,4 @@ export interface Any {
|
|
|
132
131
|
value: Uint8Array;
|
|
133
132
|
}
|
|
134
133
|
|
|
135
|
-
|
|
136
|
-
return { typeUrl: "", value: new Uint8Array(0) };
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export const Any: MessageFns<Any> = {
|
|
140
|
-
encode(message: Any, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
141
|
-
if (message.typeUrl !== "") {
|
|
142
|
-
writer.uint32(10).string(message.typeUrl);
|
|
143
|
-
}
|
|
144
|
-
if (message.value.length !== 0) {
|
|
145
|
-
writer.uint32(18).bytes(message.value);
|
|
146
|
-
}
|
|
147
|
-
return writer;
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
decode(input: BinaryReader | Uint8Array, length?: number): Any {
|
|
151
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
152
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
153
|
-
const message = createBaseAny();
|
|
154
|
-
while (reader.pos < end) {
|
|
155
|
-
const tag = reader.uint32();
|
|
156
|
-
switch (tag >>> 3) {
|
|
157
|
-
case 1: {
|
|
158
|
-
if (tag !== 10) {
|
|
159
|
-
break;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
message.typeUrl = reader.string();
|
|
163
|
-
continue;
|
|
164
|
-
}
|
|
165
|
-
case 2: {
|
|
166
|
-
if (tag !== 18) {
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
message.value = reader.bytes();
|
|
171
|
-
continue;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
177
|
-
reader.skip(tag & 7);
|
|
178
|
-
}
|
|
179
|
-
return message;
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
fromJSON(object: any): Any {
|
|
183
|
-
return {
|
|
184
|
-
typeUrl: isSet(object.typeUrl) ? globalThis.String(object.typeUrl) : "",
|
|
185
|
-
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
|
|
186
|
-
};
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
toJSON(message: Any): unknown {
|
|
190
|
-
const obj: any = {};
|
|
191
|
-
if (message.typeUrl !== "") {
|
|
192
|
-
obj.typeUrl = message.typeUrl;
|
|
193
|
-
}
|
|
194
|
-
if (message.value.length !== 0) {
|
|
195
|
-
obj.value = base64FromBytes(message.value);
|
|
196
|
-
}
|
|
197
|
-
return obj;
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
create<I extends Exact<DeepPartial<Any>, I>>(base?: I): Any {
|
|
201
|
-
return Any.fromPartial(base ?? ({} as any));
|
|
202
|
-
},
|
|
203
|
-
fromPartial<I extends Exact<DeepPartial<Any>, I>>(object: I): Any {
|
|
204
|
-
const message = createBaseAny();
|
|
205
|
-
message.typeUrl = object.typeUrl ?? "";
|
|
206
|
-
message.value = object.value ?? new Uint8Array(0);
|
|
207
|
-
return message;
|
|
208
|
-
},
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
function bytesFromBase64(b64: string): Uint8Array {
|
|
212
|
-
if ((globalThis as any).Buffer) {
|
|
213
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
214
|
-
} else {
|
|
215
|
-
const bin = globalThis.atob(b64);
|
|
216
|
-
const arr = new Uint8Array(bin.length);
|
|
217
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
218
|
-
arr[i] = bin.charCodeAt(i);
|
|
219
|
-
}
|
|
220
|
-
return arr;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
function base64FromBytes(arr: Uint8Array): string {
|
|
225
|
-
if ((globalThis as any).Buffer) {
|
|
226
|
-
return globalThis.Buffer.from(arr).toString("base64");
|
|
227
|
-
} else {
|
|
228
|
-
const bin: string[] = [];
|
|
229
|
-
arr.forEach((byte) => {
|
|
230
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
231
|
-
});
|
|
232
|
-
return globalThis.btoa(bin.join(""));
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
237
|
-
|
|
238
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
239
|
-
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
240
|
-
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
241
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
242
|
-
: Partial<T>;
|
|
243
|
-
|
|
244
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
245
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
246
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
247
|
-
|
|
248
|
-
function isSet(value: any): boolean {
|
|
249
|
-
return value !== null && value !== undefined;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
export interface MessageFns<T> {
|
|
253
|
-
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
254
|
-
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
255
|
-
fromJSON(object: any): T;
|
|
256
|
-
toJSON(message: T): unknown;
|
|
257
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
258
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
259
|
-
}
|
|
134
|
+
export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
@@ -1,11 +1,10 @@
|
|
|
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 v6.33.
|
|
4
|
+
// protoc v6.33.1
|
|
5
5
|
// source: google/protobuf/duration.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
8
|
-
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
8
|
|
|
10
9
|
export const protobufPackage = "google.protobuf";
|
|
11
10
|
|
|
@@ -87,114 +86,4 @@ export interface Duration {
|
|
|
87
86
|
nanos: number;
|
|
88
87
|
}
|
|
89
88
|
|
|
90
|
-
|
|
91
|
-
return { seconds: 0, nanos: 0 };
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export const Duration: MessageFns<Duration> = {
|
|
95
|
-
encode(message: Duration, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
96
|
-
if (message.seconds !== 0) {
|
|
97
|
-
writer.uint32(8).int64(message.seconds);
|
|
98
|
-
}
|
|
99
|
-
if (message.nanos !== 0) {
|
|
100
|
-
writer.uint32(16).int32(message.nanos);
|
|
101
|
-
}
|
|
102
|
-
return writer;
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
decode(input: BinaryReader | Uint8Array, length?: number): Duration {
|
|
106
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
107
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
108
|
-
const message = createBaseDuration();
|
|
109
|
-
while (reader.pos < end) {
|
|
110
|
-
const tag = reader.uint32();
|
|
111
|
-
switch (tag >>> 3) {
|
|
112
|
-
case 1: {
|
|
113
|
-
if (tag !== 8) {
|
|
114
|
-
break;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
message.seconds = longToNumber(reader.int64());
|
|
118
|
-
continue;
|
|
119
|
-
}
|
|
120
|
-
case 2: {
|
|
121
|
-
if (tag !== 16) {
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
message.nanos = reader.int32();
|
|
126
|
-
continue;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
reader.skip(tag & 7);
|
|
133
|
-
}
|
|
134
|
-
return message;
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
fromJSON(object: any): Duration {
|
|
138
|
-
return {
|
|
139
|
-
seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
|
|
140
|
-
nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
|
|
141
|
-
};
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
toJSON(message: Duration): unknown {
|
|
145
|
-
const obj: any = {};
|
|
146
|
-
if (message.seconds !== 0) {
|
|
147
|
-
obj.seconds = Math.round(message.seconds);
|
|
148
|
-
}
|
|
149
|
-
if (message.nanos !== 0) {
|
|
150
|
-
obj.nanos = Math.round(message.nanos);
|
|
151
|
-
}
|
|
152
|
-
return obj;
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
create<I extends Exact<DeepPartial<Duration>, I>>(base?: I): Duration {
|
|
156
|
-
return Duration.fromPartial(base ?? ({} as any));
|
|
157
|
-
},
|
|
158
|
-
fromPartial<I extends Exact<DeepPartial<Duration>, I>>(object: I): Duration {
|
|
159
|
-
const message = createBaseDuration();
|
|
160
|
-
message.seconds = object.seconds ?? 0;
|
|
161
|
-
message.nanos = object.nanos ?? 0;
|
|
162
|
-
return message;
|
|
163
|
-
},
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
167
|
-
|
|
168
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
169
|
-
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
170
|
-
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
171
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
172
|
-
: Partial<T>;
|
|
173
|
-
|
|
174
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
175
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
176
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
177
|
-
|
|
178
|
-
function longToNumber(int64: { toString(): string }): number {
|
|
179
|
-
const num = globalThis.Number(int64.toString());
|
|
180
|
-
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
181
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
182
|
-
}
|
|
183
|
-
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
184
|
-
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
185
|
-
}
|
|
186
|
-
return num;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
function isSet(value: any): boolean {
|
|
190
|
-
return value !== null && value !== undefined;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export interface MessageFns<T> {
|
|
194
|
-
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
195
|
-
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
196
|
-
fromJSON(object: any): T;
|
|
197
|
-
toJSON(message: T): unknown;
|
|
198
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
199
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
200
|
-
}
|
|
89
|
+
export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
@@ -1,11 +1,10 @@
|
|
|
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 v6.33.
|
|
4
|
+
// protoc v6.33.1
|
|
5
5
|
// source: google/protobuf/empty.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
8
|
-
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
8
|
|
|
10
9
|
export const protobufPackage = "google.protobuf";
|
|
11
10
|
|
|
@@ -21,66 +20,4 @@ export const protobufPackage = "google.protobuf";
|
|
|
21
20
|
export interface Empty {
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
return {};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const Empty: MessageFns<Empty> = {
|
|
29
|
-
encode(_: Empty, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
30
|
-
return writer;
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
decode(input: BinaryReader | Uint8Array, length?: number): Empty {
|
|
34
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
35
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
36
|
-
const message = createBaseEmpty();
|
|
37
|
-
while (reader.pos < end) {
|
|
38
|
-
const tag = reader.uint32();
|
|
39
|
-
switch (tag >>> 3) {
|
|
40
|
-
}
|
|
41
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
reader.skip(tag & 7);
|
|
45
|
-
}
|
|
46
|
-
return message;
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
fromJSON(_: any): Empty {
|
|
50
|
-
return {};
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
toJSON(_: Empty): unknown {
|
|
54
|
-
const obj: any = {};
|
|
55
|
-
return obj;
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
create<I extends Exact<DeepPartial<Empty>, I>>(base?: I): Empty {
|
|
59
|
-
return Empty.fromPartial(base ?? ({} as any));
|
|
60
|
-
},
|
|
61
|
-
fromPartial<I extends Exact<DeepPartial<Empty>, I>>(_: I): Empty {
|
|
62
|
-
const message = createBaseEmpty();
|
|
63
|
-
return message;
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
68
|
-
|
|
69
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
70
|
-
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
71
|
-
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
72
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
73
|
-
: Partial<T>;
|
|
74
|
-
|
|
75
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
76
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
77
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
78
|
-
|
|
79
|
-
export interface MessageFns<T> {
|
|
80
|
-
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
81
|
-
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
82
|
-
fromJSON(object: any): T;
|
|
83
|
-
toJSON(message: T): unknown;
|
|
84
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
85
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
86
|
-
}
|
|
23
|
+
export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|