@snap/push2web 0.23.0 → 1.0.0
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/dist/Push2Web.d.ts +1 -1
- package/dist/Push2Web.js +1 -1
- package/dist/generated-api-client/camera_kit/v3/export.d.ts +21 -463
- package/dist/generated-api-client/camera_kit/v3/export.js +322 -186
- package/dist/generated-api-client/camera_kit/v3/lens.d.ts +21 -307
- package/dist/generated-api-client/camera_kit/v3/lens.js +445 -203
- package/dist/generated-api-client/camera_kit/v3/push_to_device.d.ts +34 -335
- package/dist/generated-api-client/camera_kit/v3/push_to_device.js +431 -265
- package/dist/generated-api-client/core/snap_status_code.d.ts +14 -20
- package/dist/generated-api-client/core/snap_status_code.js +55 -30
- package/dist/generated-api-client/google/api/annotations.js +5 -6
- package/dist/generated-api-client/google/api/http.d.ts +17 -3342
- package/dist/generated-api-client/google/api/http.js +180 -100
- package/dist/generated-api-client/google/protobuf/any.d.ts +14 -16
- package/dist/generated-api-client/google/protobuf/any.js +51 -44
- package/dist/generated-api-client/google/protobuf/descriptor.d.ts +128 -50211
- package/dist/generated-api-client/google/protobuf/descriptor.js +1665 -966
- package/docs/html/classes/Push2Web.html +2 -2
- package/docs/html/enums/Code.html +2 -2
- package/docs/html/enums/ListenLensPushResponse_ExcludedLens_Code.html +2 -2
- package/docs/html/enums/State.html +2 -2
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/Lens.html +2 -2
- package/docs/html/modules.html +2 -2
- package/docs/html/types/CommunicationErrorEvent.html +2 -2
- package/docs/html/types/ErrorEvent.html +1 -1
- package/docs/html/types/GenericErrorEvent.html +2 -2
- package/docs/html/types/LensExcludedErrorEvent.html +2 -2
- package/docs/html/types/LensReceivedEvent.html +1 -1
- package/docs/html/types/Push2WebEvents.html +1 -1
- package/docs/html/types/SubscriptionChangedEvent.html +1 -1
- package/docs/html/types/SubscriptionInstance.html +2 -2
- package/docs/md/classes/Push2Web.md +1 -1
- package/docs/md/enums/Code.md +1 -1
- package/docs/md/enums/ListenLensPushResponse_ExcludedLens_Code.md +1 -1
- package/docs/md/enums/State.md +1 -1
- package/docs/md/interfaces/Lens.md +1 -1
- package/docs/md/modules.md +2 -2
- package/package.json +4 -5
|
@@ -1,60 +1,74 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.2.4
|
|
4
|
+
// protoc v5.28.2
|
|
5
|
+
// source: google/api/http.proto
|
|
1
6
|
/* eslint-disable */
|
|
2
|
-
import
|
|
3
|
-
import _m0 from "protobufjs/minimal";
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
4
8
|
export const protobufPackage = "google.api";
|
|
5
9
|
function createBaseHttp() {
|
|
6
10
|
return { rules: [], fullyDecodeReservedExpansion: false };
|
|
7
11
|
}
|
|
8
12
|
export const Http = {
|
|
9
|
-
encode(message, writer =
|
|
13
|
+
encode(message, writer = new BinaryWriter()) {
|
|
10
14
|
for (const v of message.rules) {
|
|
11
|
-
HttpRule.encode(v, writer.uint32(10).fork()).
|
|
15
|
+
HttpRule.encode(v, writer.uint32(10).fork()).join();
|
|
12
16
|
}
|
|
13
|
-
if (message.fullyDecodeReservedExpansion
|
|
17
|
+
if (message.fullyDecodeReservedExpansion !== false) {
|
|
14
18
|
writer.uint32(16).bool(message.fullyDecodeReservedExpansion);
|
|
15
19
|
}
|
|
16
20
|
return writer;
|
|
17
21
|
},
|
|
18
22
|
decode(input, length) {
|
|
19
|
-
const reader = input instanceof
|
|
23
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
20
24
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
21
25
|
const message = createBaseHttp();
|
|
22
26
|
while (reader.pos < end) {
|
|
23
27
|
const tag = reader.uint32();
|
|
24
28
|
switch (tag >>> 3) {
|
|
25
|
-
case 1:
|
|
29
|
+
case 1: {
|
|
30
|
+
if (tag !== 10) {
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
26
33
|
message.rules.push(HttpRule.decode(reader, reader.uint32()));
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
case 2: {
|
|
37
|
+
if (tag !== 16) {
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
29
40
|
message.fullyDecodeReservedExpansion = reader.bool();
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
reader.skipType(tag & 7);
|
|
33
|
-
break;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
34
43
|
}
|
|
44
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
reader.skip(tag & 7);
|
|
35
48
|
}
|
|
36
49
|
return message;
|
|
37
50
|
},
|
|
38
51
|
fromJSON(object) {
|
|
39
52
|
return {
|
|
40
|
-
rules: Array.isArray(object?.rules) ? object.rules.map((e) => HttpRule.fromJSON(e)) : [],
|
|
53
|
+
rules: globalThis.Array.isArray(object?.rules) ? object.rules.map((e) => HttpRule.fromJSON(e)) : [],
|
|
41
54
|
fullyDecodeReservedExpansion: isSet(object.fullyDecodeReservedExpansion)
|
|
42
|
-
? Boolean(object.fullyDecodeReservedExpansion)
|
|
55
|
+
? globalThis.Boolean(object.fullyDecodeReservedExpansion)
|
|
43
56
|
: false,
|
|
44
57
|
};
|
|
45
58
|
},
|
|
46
59
|
toJSON(message) {
|
|
47
60
|
const obj = {};
|
|
48
|
-
if (message.rules) {
|
|
49
|
-
obj.rules = message.rules.map((e) =>
|
|
61
|
+
if (message.rules?.length) {
|
|
62
|
+
obj.rules = message.rules.map((e) => HttpRule.toJSON(e));
|
|
50
63
|
}
|
|
51
|
-
|
|
52
|
-
obj.
|
|
64
|
+
if (message.fullyDecodeReservedExpansion !== false) {
|
|
65
|
+
obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion;
|
|
53
66
|
}
|
|
54
|
-
message.fullyDecodeReservedExpansion !== undefined &&
|
|
55
|
-
(obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion);
|
|
56
67
|
return obj;
|
|
57
68
|
},
|
|
69
|
+
create(base) {
|
|
70
|
+
return Http.fromPartial(base ?? {});
|
|
71
|
+
},
|
|
58
72
|
fromPartial(object) {
|
|
59
73
|
const message = createBaseHttp();
|
|
60
74
|
message.rules = object.rules?.map((e) => HttpRule.fromPartial(e)) || [];
|
|
@@ -66,118 +80,172 @@ function createBaseHttpRule() {
|
|
|
66
80
|
return { selector: "", pattern: undefined, body: "", additionalBindings: [] };
|
|
67
81
|
}
|
|
68
82
|
export const HttpRule = {
|
|
69
|
-
encode(message, writer =
|
|
83
|
+
encode(message, writer = new BinaryWriter()) {
|
|
70
84
|
if (message.selector !== "") {
|
|
71
85
|
writer.uint32(10).string(message.selector);
|
|
72
86
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
switch (message.pattern?.$case) {
|
|
88
|
+
case "get":
|
|
89
|
+
writer.uint32(18).string(message.pattern.get);
|
|
90
|
+
break;
|
|
91
|
+
case "put":
|
|
92
|
+
writer.uint32(26).string(message.pattern.put);
|
|
93
|
+
break;
|
|
94
|
+
case "post":
|
|
95
|
+
writer.uint32(34).string(message.pattern.post);
|
|
96
|
+
break;
|
|
97
|
+
case "delete":
|
|
98
|
+
writer.uint32(42).string(message.pattern.delete);
|
|
99
|
+
break;
|
|
100
|
+
case "patch":
|
|
101
|
+
writer.uint32(50).string(message.pattern.patch);
|
|
102
|
+
break;
|
|
103
|
+
case "custom":
|
|
104
|
+
CustomHttpPattern.encode(message.pattern.custom, writer.uint32(66).fork()).join();
|
|
105
|
+
break;
|
|
90
106
|
}
|
|
91
107
|
if (message.body !== "") {
|
|
92
108
|
writer.uint32(58).string(message.body);
|
|
93
109
|
}
|
|
94
110
|
for (const v of message.additionalBindings) {
|
|
95
|
-
HttpRule.encode(v, writer.uint32(90).fork()).
|
|
111
|
+
HttpRule.encode(v, writer.uint32(90).fork()).join();
|
|
96
112
|
}
|
|
97
113
|
return writer;
|
|
98
114
|
},
|
|
99
115
|
decode(input, length) {
|
|
100
|
-
const reader = input instanceof
|
|
116
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
101
117
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
102
118
|
const message = createBaseHttpRule();
|
|
103
119
|
while (reader.pos < end) {
|
|
104
120
|
const tag = reader.uint32();
|
|
105
121
|
switch (tag >>> 3) {
|
|
106
|
-
case 1:
|
|
122
|
+
case 1: {
|
|
123
|
+
if (tag !== 10) {
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
107
126
|
message.selector = reader.string();
|
|
108
|
-
|
|
109
|
-
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
case 2: {
|
|
130
|
+
if (tag !== 18) {
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
110
133
|
message.pattern = { $case: "get", get: reader.string() };
|
|
111
|
-
|
|
112
|
-
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
case 3: {
|
|
137
|
+
if (tag !== 26) {
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
113
140
|
message.pattern = { $case: "put", put: reader.string() };
|
|
114
|
-
|
|
115
|
-
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
case 4: {
|
|
144
|
+
if (tag !== 34) {
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
116
147
|
message.pattern = { $case: "post", post: reader.string() };
|
|
117
|
-
|
|
118
|
-
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
case 5: {
|
|
151
|
+
if (tag !== 42) {
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
119
154
|
message.pattern = { $case: "delete", delete: reader.string() };
|
|
120
|
-
|
|
121
|
-
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
case 6: {
|
|
158
|
+
if (tag !== 50) {
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
122
161
|
message.pattern = { $case: "patch", patch: reader.string() };
|
|
123
|
-
|
|
124
|
-
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
case 8: {
|
|
165
|
+
if (tag !== 66) {
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
125
168
|
message.pattern = { $case: "custom", custom: CustomHttpPattern.decode(reader, reader.uint32()) };
|
|
126
|
-
|
|
127
|
-
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
case 7: {
|
|
172
|
+
if (tag !== 58) {
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
128
175
|
message.body = reader.string();
|
|
129
|
-
|
|
130
|
-
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
case 11: {
|
|
179
|
+
if (tag !== 90) {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
131
182
|
message.additionalBindings.push(HttpRule.decode(reader, reader.uint32()));
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
reader.skipType(tag & 7);
|
|
135
|
-
break;
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
136
185
|
}
|
|
186
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
reader.skip(tag & 7);
|
|
137
190
|
}
|
|
138
191
|
return message;
|
|
139
192
|
},
|
|
140
193
|
fromJSON(object) {
|
|
141
194
|
return {
|
|
142
|
-
selector: isSet(object.selector) ? String(object.selector) : "",
|
|
195
|
+
selector: isSet(object.selector) ? globalThis.String(object.selector) : "",
|
|
143
196
|
pattern: isSet(object.get)
|
|
144
|
-
? { $case: "get", get: String(object.get) }
|
|
197
|
+
? { $case: "get", get: globalThis.String(object.get) }
|
|
145
198
|
: isSet(object.put)
|
|
146
|
-
? { $case: "put", put: String(object.put) }
|
|
199
|
+
? { $case: "put", put: globalThis.String(object.put) }
|
|
147
200
|
: isSet(object.post)
|
|
148
|
-
? { $case: "post", post: String(object.post) }
|
|
201
|
+
? { $case: "post", post: globalThis.String(object.post) }
|
|
149
202
|
: isSet(object.delete)
|
|
150
|
-
? { $case: "delete", delete: String(object.delete) }
|
|
203
|
+
? { $case: "delete", delete: globalThis.String(object.delete) }
|
|
151
204
|
: isSet(object.patch)
|
|
152
|
-
? { $case: "patch", patch: String(object.patch) }
|
|
205
|
+
? { $case: "patch", patch: globalThis.String(object.patch) }
|
|
153
206
|
: isSet(object.custom)
|
|
154
207
|
? { $case: "custom", custom: CustomHttpPattern.fromJSON(object.custom) }
|
|
155
208
|
: undefined,
|
|
156
|
-
body: isSet(object.body) ? String(object.body) : "",
|
|
157
|
-
additionalBindings: Array.isArray(object?.additionalBindings)
|
|
209
|
+
body: isSet(object.body) ? globalThis.String(object.body) : "",
|
|
210
|
+
additionalBindings: globalThis.Array.isArray(object?.additionalBindings)
|
|
158
211
|
? object.additionalBindings.map((e) => HttpRule.fromJSON(e))
|
|
159
212
|
: [],
|
|
160
213
|
};
|
|
161
214
|
},
|
|
162
215
|
toJSON(message) {
|
|
163
216
|
const obj = {};
|
|
164
|
-
message.selector !==
|
|
165
|
-
|
|
166
|
-
message.pattern?.$case === "put" && (obj.put = message.pattern?.put);
|
|
167
|
-
message.pattern?.$case === "post" && (obj.post = message.pattern?.post);
|
|
168
|
-
message.pattern?.$case === "delete" && (obj.delete = message.pattern?.delete);
|
|
169
|
-
message.pattern?.$case === "patch" && (obj.patch = message.pattern?.patch);
|
|
170
|
-
message.pattern?.$case === "custom" &&
|
|
171
|
-
(obj.custom = message.pattern?.custom ? CustomHttpPattern.toJSON(message.pattern?.custom) : undefined);
|
|
172
|
-
message.body !== undefined && (obj.body = message.body);
|
|
173
|
-
if (message.additionalBindings) {
|
|
174
|
-
obj.additionalBindings = message.additionalBindings.map((e) => (e ? HttpRule.toJSON(e) : undefined));
|
|
217
|
+
if (message.selector !== "") {
|
|
218
|
+
obj.selector = message.selector;
|
|
175
219
|
}
|
|
176
|
-
|
|
177
|
-
obj.
|
|
220
|
+
if (message.pattern?.$case === "get") {
|
|
221
|
+
obj.get = message.pattern.get;
|
|
222
|
+
}
|
|
223
|
+
if (message.pattern?.$case === "put") {
|
|
224
|
+
obj.put = message.pattern.put;
|
|
225
|
+
}
|
|
226
|
+
if (message.pattern?.$case === "post") {
|
|
227
|
+
obj.post = message.pattern.post;
|
|
228
|
+
}
|
|
229
|
+
if (message.pattern?.$case === "delete") {
|
|
230
|
+
obj.delete = message.pattern.delete;
|
|
231
|
+
}
|
|
232
|
+
if (message.pattern?.$case === "patch") {
|
|
233
|
+
obj.patch = message.pattern.patch;
|
|
234
|
+
}
|
|
235
|
+
if (message.pattern?.$case === "custom") {
|
|
236
|
+
obj.custom = CustomHttpPattern.toJSON(message.pattern.custom);
|
|
237
|
+
}
|
|
238
|
+
if (message.body !== "") {
|
|
239
|
+
obj.body = message.body;
|
|
240
|
+
}
|
|
241
|
+
if (message.additionalBindings?.length) {
|
|
242
|
+
obj.additionalBindings = message.additionalBindings.map((e) => HttpRule.toJSON(e));
|
|
178
243
|
}
|
|
179
244
|
return obj;
|
|
180
245
|
},
|
|
246
|
+
create(base) {
|
|
247
|
+
return HttpRule.fromPartial(base ?? {});
|
|
248
|
+
},
|
|
181
249
|
fromPartial(object) {
|
|
182
250
|
const message = createBaseHttpRule();
|
|
183
251
|
message.selector = object.selector ?? "";
|
|
@@ -208,7 +276,7 @@ function createBaseCustomHttpPattern() {
|
|
|
208
276
|
return { kind: "", path: "" };
|
|
209
277
|
}
|
|
210
278
|
export const CustomHttpPattern = {
|
|
211
|
-
encode(message, writer =
|
|
279
|
+
encode(message, writer = new BinaryWriter()) {
|
|
212
280
|
if (message.kind !== "") {
|
|
213
281
|
writer.uint32(10).string(message.kind);
|
|
214
282
|
}
|
|
@@ -218,37 +286,53 @@ export const CustomHttpPattern = {
|
|
|
218
286
|
return writer;
|
|
219
287
|
},
|
|
220
288
|
decode(input, length) {
|
|
221
|
-
const reader = input instanceof
|
|
289
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
222
290
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
223
291
|
const message = createBaseCustomHttpPattern();
|
|
224
292
|
while (reader.pos < end) {
|
|
225
293
|
const tag = reader.uint32();
|
|
226
294
|
switch (tag >>> 3) {
|
|
227
|
-
case 1:
|
|
295
|
+
case 1: {
|
|
296
|
+
if (tag !== 10) {
|
|
297
|
+
break;
|
|
298
|
+
}
|
|
228
299
|
message.kind = reader.string();
|
|
229
|
-
|
|
230
|
-
|
|
300
|
+
continue;
|
|
301
|
+
}
|
|
302
|
+
case 2: {
|
|
303
|
+
if (tag !== 18) {
|
|
304
|
+
break;
|
|
305
|
+
}
|
|
231
306
|
message.path = reader.string();
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
307
|
+
continue;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
311
|
+
break;
|
|
236
312
|
}
|
|
313
|
+
reader.skip(tag & 7);
|
|
237
314
|
}
|
|
238
315
|
return message;
|
|
239
316
|
},
|
|
240
317
|
fromJSON(object) {
|
|
241
318
|
return {
|
|
242
|
-
kind: isSet(object.kind) ? String(object.kind) : "",
|
|
243
|
-
path: isSet(object.path) ? String(object.path) : "",
|
|
319
|
+
kind: isSet(object.kind) ? globalThis.String(object.kind) : "",
|
|
320
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
244
321
|
};
|
|
245
322
|
},
|
|
246
323
|
toJSON(message) {
|
|
247
324
|
const obj = {};
|
|
248
|
-
message.kind !==
|
|
249
|
-
|
|
325
|
+
if (message.kind !== "") {
|
|
326
|
+
obj.kind = message.kind;
|
|
327
|
+
}
|
|
328
|
+
if (message.path !== "") {
|
|
329
|
+
obj.path = message.path;
|
|
330
|
+
}
|
|
250
331
|
return obj;
|
|
251
332
|
},
|
|
333
|
+
create(base) {
|
|
334
|
+
return CustomHttpPattern.fromPartial(base ?? {});
|
|
335
|
+
},
|
|
252
336
|
fromPartial(object) {
|
|
253
337
|
const message = createBaseCustomHttpPattern();
|
|
254
338
|
message.kind = object.kind ?? "";
|
|
@@ -256,10 +340,6 @@ export const CustomHttpPattern = {
|
|
|
256
340
|
return message;
|
|
257
341
|
},
|
|
258
342
|
};
|
|
259
|
-
if (_m0.util.Long !== Long) {
|
|
260
|
-
_m0.util.Long = Long;
|
|
261
|
-
_m0.configure();
|
|
262
|
-
}
|
|
263
343
|
function isSet(value) {
|
|
264
344
|
return value !== null && value !== undefined;
|
|
265
345
|
}
|
|
@@ -1,24 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
export declare const protobufPackage = "google.protobuf";
|
|
3
3
|
export interface Any {
|
|
4
4
|
typeUrl: string;
|
|
5
5
|
value: Uint8Array;
|
|
6
6
|
}
|
|
7
|
-
export declare const Any:
|
|
8
|
-
encode(message: Any, writer?: _m0.Writer): _m0.Writer;
|
|
9
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Any;
|
|
10
|
-
fromJSON(object: any): Any;
|
|
11
|
-
toJSON(message: Any): unknown;
|
|
12
|
-
fromPartial<I extends {
|
|
13
|
-
typeUrl?: string | undefined;
|
|
14
|
-
value?: Uint8Array | undefined;
|
|
15
|
-
} & {
|
|
16
|
-
typeUrl?: string | undefined;
|
|
17
|
-
value?: Uint8Array | undefined;
|
|
18
|
-
} & Record<Exclude<keyof I, keyof Any>, never>>(object: I): Any;
|
|
19
|
-
};
|
|
7
|
+
export declare const Any: MessageFns<Any>;
|
|
20
8
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
21
|
-
export 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 {
|
|
9
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
|
|
22
10
|
$case: string;
|
|
23
11
|
} ? {
|
|
24
12
|
[K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
|
|
@@ -30,5 +18,15 @@ export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ?
|
|
|
30
18
|
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
31
19
|
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
32
20
|
[K in keyof P]: Exact<P[K], I[K]>;
|
|
33
|
-
} &
|
|
21
|
+
} & {
|
|
22
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
23
|
+
};
|
|
24
|
+
export interface MessageFns<T> {
|
|
25
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
26
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
27
|
+
fromJSON(object: any): T;
|
|
28
|
+
toJSON(message: T): unknown;
|
|
29
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
30
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
31
|
+
}
|
|
34
32
|
export {};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _m0 from "protobufjs/minimal";
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
3
2
|
export const protobufPackage = "google.protobuf";
|
|
4
3
|
function createBaseAny() {
|
|
5
|
-
return { typeUrl: "", value: new Uint8Array() };
|
|
4
|
+
return { typeUrl: "", value: new Uint8Array(0) };
|
|
6
5
|
}
|
|
7
6
|
export const Any = {
|
|
8
|
-
encode(message, writer =
|
|
7
|
+
encode(message, writer = new BinaryWriter()) {
|
|
9
8
|
if (message.typeUrl !== "") {
|
|
10
9
|
writer.uint32(10).string(message.typeUrl);
|
|
11
10
|
}
|
|
@@ -15,76 +14,84 @@ export const Any = {
|
|
|
15
14
|
return writer;
|
|
16
15
|
},
|
|
17
16
|
decode(input, length) {
|
|
18
|
-
const reader = input instanceof
|
|
17
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
19
18
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
20
19
|
const message = createBaseAny();
|
|
21
20
|
while (reader.pos < end) {
|
|
22
21
|
const tag = reader.uint32();
|
|
23
22
|
switch (tag >>> 3) {
|
|
24
|
-
case 1:
|
|
23
|
+
case 1: {
|
|
24
|
+
if (tag !== 10) {
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
25
27
|
message.typeUrl = reader.string();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
case 2: {
|
|
31
|
+
if (tag !== 18) {
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
28
34
|
message.value = reader.bytes();
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
reader.skipType(tag & 7);
|
|
32
|
-
break;
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
33
37
|
}
|
|
38
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
reader.skip(tag & 7);
|
|
34
42
|
}
|
|
35
43
|
return message;
|
|
36
44
|
},
|
|
37
45
|
fromJSON(object) {
|
|
38
46
|
return {
|
|
39
|
-
typeUrl: isSet(object.typeUrl) ? String(object.typeUrl) : "",
|
|
40
|
-
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(),
|
|
47
|
+
typeUrl: isSet(object.typeUrl) ? globalThis.String(object.typeUrl) : "",
|
|
48
|
+
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
|
|
41
49
|
};
|
|
42
50
|
},
|
|
43
51
|
toJSON(message) {
|
|
44
52
|
const obj = {};
|
|
45
|
-
message.typeUrl !==
|
|
46
|
-
|
|
47
|
-
|
|
53
|
+
if (message.typeUrl !== "") {
|
|
54
|
+
obj.typeUrl = message.typeUrl;
|
|
55
|
+
}
|
|
56
|
+
if (message.value.length !== 0) {
|
|
57
|
+
obj.value = base64FromBytes(message.value);
|
|
58
|
+
}
|
|
48
59
|
return obj;
|
|
49
60
|
},
|
|
61
|
+
create(base) {
|
|
62
|
+
return Any.fromPartial(base ?? {});
|
|
63
|
+
},
|
|
50
64
|
fromPartial(object) {
|
|
51
65
|
const message = createBaseAny();
|
|
52
66
|
message.typeUrl = object.typeUrl ?? "";
|
|
53
|
-
message.value = object.value ?? new Uint8Array();
|
|
67
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
54
68
|
return message;
|
|
55
69
|
},
|
|
56
70
|
};
|
|
57
|
-
var globalThis = (() => {
|
|
58
|
-
if (typeof globalThis !== "undefined")
|
|
59
|
-
return globalThis;
|
|
60
|
-
if (typeof self !== "undefined")
|
|
61
|
-
return self;
|
|
62
|
-
if (typeof window !== "undefined")
|
|
63
|
-
return window;
|
|
64
|
-
if (typeof global !== "undefined")
|
|
65
|
-
return global;
|
|
66
|
-
throw "Unable to locate global object";
|
|
67
|
-
})();
|
|
68
|
-
const atob = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
|
|
69
71
|
function bytesFromBase64(b64) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
if (globalThis.Buffer) {
|
|
73
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
const bin = globalThis.atob(b64);
|
|
77
|
+
const arr = new Uint8Array(bin.length);
|
|
78
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
79
|
+
arr[i] = bin.charCodeAt(i);
|
|
80
|
+
}
|
|
81
|
+
return arr;
|
|
74
82
|
}
|
|
75
|
-
return arr;
|
|
76
83
|
}
|
|
77
|
-
const btoa = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
|
|
78
84
|
function base64FromBytes(arr) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
85
|
+
if (globalThis.Buffer) {
|
|
86
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
const bin = [];
|
|
90
|
+
arr.forEach((byte) => {
|
|
91
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
92
|
+
});
|
|
93
|
+
return globalThis.btoa(bin.join(""));
|
|
82
94
|
}
|
|
83
|
-
return btoa(bin.join(""));
|
|
84
|
-
}
|
|
85
|
-
if (_m0.util.Long !== Long) {
|
|
86
|
-
_m0.util.Long = Long;
|
|
87
|
-
_m0.configure();
|
|
88
95
|
}
|
|
89
96
|
function isSet(value) {
|
|
90
97
|
return value !== null && value !== undefined;
|