@snap/push2web 0.11.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/LICENSE +290 -0
- package/README.md +67 -0
- package/dist/Push2Web.d.ts +155 -0
- package/dist/Push2Web.js +154 -0
- package/dist/Push2WebSDKExtension.d.ts +17 -0
- package/dist/Push2WebSDKExtension.js +47 -0
- package/dist/generated-api-client/camera_kit/v3/export.d.ts +597 -0
- package/dist/generated-api-client/camera_kit/v3/export.js +610 -0
- package/dist/generated-api-client/camera_kit/v3/lens.d.ts +456 -0
- package/dist/generated-api-client/camera_kit/v3/lens.js +703 -0
- package/dist/generated-api-client/camera_kit/v3/push_to_device.d.ts +502 -0
- package/dist/generated-api-client/camera_kit/v3/push_to_device.js +767 -0
- package/dist/generated-api-client/core/snap_status_code.d.ts +281 -0
- package/dist/generated-api-client/core/snap_status_code.js +512 -0
- package/dist/generated-api-client/google/api/annotations.d.ts +1 -0
- package/dist/generated-api-client/google/api/annotations.js +8 -0
- package/dist/generated-api-client/google/api/http.d.ts +3636 -0
- package/dist/generated-api-client/google/api/http.js +265 -0
- package/dist/generated-api-client/google/protobuf/any.d.ts +139 -0
- package/dist/generated-api-client/google/protobuf/any.js +92 -0
- package/dist/generated-api-client/google/protobuf/descriptor.d.ts +50968 -0
- package/dist/generated-api-client/google/protobuf/descriptor.js +2934 -0
- package/dist/public-api.d.ts +4 -0
- package/dist/public-api.js +3 -0
- package/dist/reportEvent.d.ts +3 -0
- package/dist/reportEvent.js +30 -0
- package/package.json +37 -0
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import Long from "long";
|
|
3
|
+
import _m0 from "protobufjs/minimal";
|
|
4
|
+
export const protobufPackage = "google.api";
|
|
5
|
+
function createBaseHttp() {
|
|
6
|
+
return { rules: [], fullyDecodeReservedExpansion: false };
|
|
7
|
+
}
|
|
8
|
+
export const Http = {
|
|
9
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
10
|
+
for (const v of message.rules) {
|
|
11
|
+
HttpRule.encode(v, writer.uint32(10).fork()).ldelim();
|
|
12
|
+
}
|
|
13
|
+
if (message.fullyDecodeReservedExpansion === true) {
|
|
14
|
+
writer.uint32(16).bool(message.fullyDecodeReservedExpansion);
|
|
15
|
+
}
|
|
16
|
+
return writer;
|
|
17
|
+
},
|
|
18
|
+
decode(input, length) {
|
|
19
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
20
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
21
|
+
const message = createBaseHttp();
|
|
22
|
+
while (reader.pos < end) {
|
|
23
|
+
const tag = reader.uint32();
|
|
24
|
+
switch (tag >>> 3) {
|
|
25
|
+
case 1:
|
|
26
|
+
message.rules.push(HttpRule.decode(reader, reader.uint32()));
|
|
27
|
+
break;
|
|
28
|
+
case 2:
|
|
29
|
+
message.fullyDecodeReservedExpansion = reader.bool();
|
|
30
|
+
break;
|
|
31
|
+
default:
|
|
32
|
+
reader.skipType(tag & 7);
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return message;
|
|
37
|
+
},
|
|
38
|
+
fromJSON(object) {
|
|
39
|
+
return {
|
|
40
|
+
rules: Array.isArray(object?.rules) ? object.rules.map((e) => HttpRule.fromJSON(e)) : [],
|
|
41
|
+
fullyDecodeReservedExpansion: isSet(object.fullyDecodeReservedExpansion)
|
|
42
|
+
? Boolean(object.fullyDecodeReservedExpansion)
|
|
43
|
+
: false,
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
toJSON(message) {
|
|
47
|
+
const obj = {};
|
|
48
|
+
if (message.rules) {
|
|
49
|
+
obj.rules = message.rules.map((e) => (e ? HttpRule.toJSON(e) : undefined));
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
obj.rules = [];
|
|
53
|
+
}
|
|
54
|
+
message.fullyDecodeReservedExpansion !== undefined &&
|
|
55
|
+
(obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion);
|
|
56
|
+
return obj;
|
|
57
|
+
},
|
|
58
|
+
fromPartial(object) {
|
|
59
|
+
const message = createBaseHttp();
|
|
60
|
+
message.rules = object.rules?.map((e) => HttpRule.fromPartial(e)) || [];
|
|
61
|
+
message.fullyDecodeReservedExpansion = object.fullyDecodeReservedExpansion ?? false;
|
|
62
|
+
return message;
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
function createBaseHttpRule() {
|
|
66
|
+
return { selector: "", pattern: undefined, body: "", additionalBindings: [] };
|
|
67
|
+
}
|
|
68
|
+
export const HttpRule = {
|
|
69
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
70
|
+
if (message.selector !== "") {
|
|
71
|
+
writer.uint32(10).string(message.selector);
|
|
72
|
+
}
|
|
73
|
+
if (message.pattern?.$case === "get") {
|
|
74
|
+
writer.uint32(18).string(message.pattern.get);
|
|
75
|
+
}
|
|
76
|
+
if (message.pattern?.$case === "put") {
|
|
77
|
+
writer.uint32(26).string(message.pattern.put);
|
|
78
|
+
}
|
|
79
|
+
if (message.pattern?.$case === "post") {
|
|
80
|
+
writer.uint32(34).string(message.pattern.post);
|
|
81
|
+
}
|
|
82
|
+
if (message.pattern?.$case === "delete") {
|
|
83
|
+
writer.uint32(42).string(message.pattern.delete);
|
|
84
|
+
}
|
|
85
|
+
if (message.pattern?.$case === "patch") {
|
|
86
|
+
writer.uint32(50).string(message.pattern.patch);
|
|
87
|
+
}
|
|
88
|
+
if (message.pattern?.$case === "custom") {
|
|
89
|
+
CustomHttpPattern.encode(message.pattern.custom, writer.uint32(66).fork()).ldelim();
|
|
90
|
+
}
|
|
91
|
+
if (message.body !== "") {
|
|
92
|
+
writer.uint32(58).string(message.body);
|
|
93
|
+
}
|
|
94
|
+
for (const v of message.additionalBindings) {
|
|
95
|
+
HttpRule.encode(v, writer.uint32(90).fork()).ldelim();
|
|
96
|
+
}
|
|
97
|
+
return writer;
|
|
98
|
+
},
|
|
99
|
+
decode(input, length) {
|
|
100
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
101
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
102
|
+
const message = createBaseHttpRule();
|
|
103
|
+
while (reader.pos < end) {
|
|
104
|
+
const tag = reader.uint32();
|
|
105
|
+
switch (tag >>> 3) {
|
|
106
|
+
case 1:
|
|
107
|
+
message.selector = reader.string();
|
|
108
|
+
break;
|
|
109
|
+
case 2:
|
|
110
|
+
message.pattern = { $case: "get", get: reader.string() };
|
|
111
|
+
break;
|
|
112
|
+
case 3:
|
|
113
|
+
message.pattern = { $case: "put", put: reader.string() };
|
|
114
|
+
break;
|
|
115
|
+
case 4:
|
|
116
|
+
message.pattern = { $case: "post", post: reader.string() };
|
|
117
|
+
break;
|
|
118
|
+
case 5:
|
|
119
|
+
message.pattern = { $case: "delete", delete: reader.string() };
|
|
120
|
+
break;
|
|
121
|
+
case 6:
|
|
122
|
+
message.pattern = { $case: "patch", patch: reader.string() };
|
|
123
|
+
break;
|
|
124
|
+
case 8:
|
|
125
|
+
message.pattern = { $case: "custom", custom: CustomHttpPattern.decode(reader, reader.uint32()) };
|
|
126
|
+
break;
|
|
127
|
+
case 7:
|
|
128
|
+
message.body = reader.string();
|
|
129
|
+
break;
|
|
130
|
+
case 11:
|
|
131
|
+
message.additionalBindings.push(HttpRule.decode(reader, reader.uint32()));
|
|
132
|
+
break;
|
|
133
|
+
default:
|
|
134
|
+
reader.skipType(tag & 7);
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return message;
|
|
139
|
+
},
|
|
140
|
+
fromJSON(object) {
|
|
141
|
+
return {
|
|
142
|
+
selector: isSet(object.selector) ? String(object.selector) : "",
|
|
143
|
+
pattern: isSet(object.get)
|
|
144
|
+
? { $case: "get", get: String(object.get) }
|
|
145
|
+
: isSet(object.put)
|
|
146
|
+
? { $case: "put", put: String(object.put) }
|
|
147
|
+
: isSet(object.post)
|
|
148
|
+
? { $case: "post", post: String(object.post) }
|
|
149
|
+
: isSet(object.delete)
|
|
150
|
+
? { $case: "delete", delete: String(object.delete) }
|
|
151
|
+
: isSet(object.patch)
|
|
152
|
+
? { $case: "patch", patch: String(object.patch) }
|
|
153
|
+
: isSet(object.custom)
|
|
154
|
+
? { $case: "custom", custom: CustomHttpPattern.fromJSON(object.custom) }
|
|
155
|
+
: undefined,
|
|
156
|
+
body: isSet(object.body) ? String(object.body) : "",
|
|
157
|
+
additionalBindings: Array.isArray(object?.additionalBindings)
|
|
158
|
+
? object.additionalBindings.map((e) => HttpRule.fromJSON(e))
|
|
159
|
+
: [],
|
|
160
|
+
};
|
|
161
|
+
},
|
|
162
|
+
toJSON(message) {
|
|
163
|
+
const obj = {};
|
|
164
|
+
message.selector !== undefined && (obj.selector = message.selector);
|
|
165
|
+
message.pattern?.$case === "get" && (obj.get = message.pattern?.get);
|
|
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));
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
obj.additionalBindings = [];
|
|
178
|
+
}
|
|
179
|
+
return obj;
|
|
180
|
+
},
|
|
181
|
+
fromPartial(object) {
|
|
182
|
+
const message = createBaseHttpRule();
|
|
183
|
+
message.selector = object.selector ?? "";
|
|
184
|
+
if (object.pattern?.$case === "get" && object.pattern?.get !== undefined && object.pattern?.get !== null) {
|
|
185
|
+
message.pattern = { $case: "get", get: object.pattern.get };
|
|
186
|
+
}
|
|
187
|
+
if (object.pattern?.$case === "put" && object.pattern?.put !== undefined && object.pattern?.put !== null) {
|
|
188
|
+
message.pattern = { $case: "put", put: object.pattern.put };
|
|
189
|
+
}
|
|
190
|
+
if (object.pattern?.$case === "post" && object.pattern?.post !== undefined && object.pattern?.post !== null) {
|
|
191
|
+
message.pattern = { $case: "post", post: object.pattern.post };
|
|
192
|
+
}
|
|
193
|
+
if (object.pattern?.$case === "delete" && object.pattern?.delete !== undefined && object.pattern?.delete !== null) {
|
|
194
|
+
message.pattern = { $case: "delete", delete: object.pattern.delete };
|
|
195
|
+
}
|
|
196
|
+
if (object.pattern?.$case === "patch" && object.pattern?.patch !== undefined && object.pattern?.patch !== null) {
|
|
197
|
+
message.pattern = { $case: "patch", patch: object.pattern.patch };
|
|
198
|
+
}
|
|
199
|
+
if (object.pattern?.$case === "custom" && object.pattern?.custom !== undefined && object.pattern?.custom !== null) {
|
|
200
|
+
message.pattern = { $case: "custom", custom: CustomHttpPattern.fromPartial(object.pattern.custom) };
|
|
201
|
+
}
|
|
202
|
+
message.body = object.body ?? "";
|
|
203
|
+
message.additionalBindings = object.additionalBindings?.map((e) => HttpRule.fromPartial(e)) || [];
|
|
204
|
+
return message;
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
function createBaseCustomHttpPattern() {
|
|
208
|
+
return { kind: "", path: "" };
|
|
209
|
+
}
|
|
210
|
+
export const CustomHttpPattern = {
|
|
211
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
212
|
+
if (message.kind !== "") {
|
|
213
|
+
writer.uint32(10).string(message.kind);
|
|
214
|
+
}
|
|
215
|
+
if (message.path !== "") {
|
|
216
|
+
writer.uint32(18).string(message.path);
|
|
217
|
+
}
|
|
218
|
+
return writer;
|
|
219
|
+
},
|
|
220
|
+
decode(input, length) {
|
|
221
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
222
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
223
|
+
const message = createBaseCustomHttpPattern();
|
|
224
|
+
while (reader.pos < end) {
|
|
225
|
+
const tag = reader.uint32();
|
|
226
|
+
switch (tag >>> 3) {
|
|
227
|
+
case 1:
|
|
228
|
+
message.kind = reader.string();
|
|
229
|
+
break;
|
|
230
|
+
case 2:
|
|
231
|
+
message.path = reader.string();
|
|
232
|
+
break;
|
|
233
|
+
default:
|
|
234
|
+
reader.skipType(tag & 7);
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return message;
|
|
239
|
+
},
|
|
240
|
+
fromJSON(object) {
|
|
241
|
+
return {
|
|
242
|
+
kind: isSet(object.kind) ? String(object.kind) : "",
|
|
243
|
+
path: isSet(object.path) ? String(object.path) : "",
|
|
244
|
+
};
|
|
245
|
+
},
|
|
246
|
+
toJSON(message) {
|
|
247
|
+
const obj = {};
|
|
248
|
+
message.kind !== undefined && (obj.kind = message.kind);
|
|
249
|
+
message.path !== undefined && (obj.path = message.path);
|
|
250
|
+
return obj;
|
|
251
|
+
},
|
|
252
|
+
fromPartial(object) {
|
|
253
|
+
const message = createBaseCustomHttpPattern();
|
|
254
|
+
message.kind = object.kind ?? "";
|
|
255
|
+
message.path = object.path ?? "";
|
|
256
|
+
return message;
|
|
257
|
+
},
|
|
258
|
+
};
|
|
259
|
+
if (_m0.util.Long !== Long) {
|
|
260
|
+
_m0.util.Long = Long;
|
|
261
|
+
_m0.configure();
|
|
262
|
+
}
|
|
263
|
+
function isSet(value) {
|
|
264
|
+
return value !== null && value !== undefined;
|
|
265
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "google.protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* `Any` contains an arbitrary serialized protocol buffer message along with a
|
|
5
|
+
* URL that describes the type of the serialized message.
|
|
6
|
+
*
|
|
7
|
+
* Protobuf library provides support to pack/unpack Any values in the form
|
|
8
|
+
* of utility functions or additional generated methods of the Any type.
|
|
9
|
+
*
|
|
10
|
+
* Example 1: Pack and unpack a message in C++.
|
|
11
|
+
*
|
|
12
|
+
* Foo foo = ...;
|
|
13
|
+
* Any any;
|
|
14
|
+
* any.PackFrom(foo);
|
|
15
|
+
* ...
|
|
16
|
+
* if (any.UnpackTo(&foo)) {
|
|
17
|
+
* ...
|
|
18
|
+
* }
|
|
19
|
+
*
|
|
20
|
+
* Example 2: Pack and unpack a message in Java.
|
|
21
|
+
*
|
|
22
|
+
* Foo foo = ...;
|
|
23
|
+
* Any any = Any.pack(foo);
|
|
24
|
+
* ...
|
|
25
|
+
* if (any.is(Foo.class)) {
|
|
26
|
+
* foo = any.unpack(Foo.class);
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* Example 3: Pack and unpack a message in Python.
|
|
30
|
+
*
|
|
31
|
+
* foo = Foo(...)
|
|
32
|
+
* any = Any()
|
|
33
|
+
* any.Pack(foo)
|
|
34
|
+
* ...
|
|
35
|
+
* if any.Is(Foo.DESCRIPTOR):
|
|
36
|
+
* any.Unpack(foo)
|
|
37
|
+
* ...
|
|
38
|
+
*
|
|
39
|
+
* Example 4: Pack and unpack a message in Go
|
|
40
|
+
*
|
|
41
|
+
* foo := &pb.Foo{...}
|
|
42
|
+
* any, err := ptypes.MarshalAny(foo)
|
|
43
|
+
* ...
|
|
44
|
+
* foo := &pb.Foo{}
|
|
45
|
+
* if err := ptypes.UnmarshalAny(any, foo); err != nil {
|
|
46
|
+
* ...
|
|
47
|
+
* }
|
|
48
|
+
*
|
|
49
|
+
* The pack methods provided by protobuf library will by default use
|
|
50
|
+
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
|
51
|
+
* methods only use the fully qualified type name after the last '/'
|
|
52
|
+
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
|
53
|
+
* name "y.z".
|
|
54
|
+
*
|
|
55
|
+
*
|
|
56
|
+
* JSON
|
|
57
|
+
* ====
|
|
58
|
+
* The JSON representation of an `Any` value uses the regular
|
|
59
|
+
* representation of the deserialized, embedded message, with an
|
|
60
|
+
* additional field `@type` which contains the type URL. Example:
|
|
61
|
+
*
|
|
62
|
+
* package google.profile;
|
|
63
|
+
* message Person {
|
|
64
|
+
* string first_name = 1;
|
|
65
|
+
* string last_name = 2;
|
|
66
|
+
* }
|
|
67
|
+
*
|
|
68
|
+
* {
|
|
69
|
+
* "@type": "type.googleapis.com/google.profile.Person",
|
|
70
|
+
* "firstName": <string>,
|
|
71
|
+
* "lastName": <string>
|
|
72
|
+
* }
|
|
73
|
+
*
|
|
74
|
+
* If the embedded message type is well-known and has a custom JSON
|
|
75
|
+
* representation, that representation will be embedded adding a field
|
|
76
|
+
* `value` which holds the custom JSON in addition to the `@type`
|
|
77
|
+
* field. Example (for message [google.protobuf.Duration][]):
|
|
78
|
+
*
|
|
79
|
+
* {
|
|
80
|
+
* "@type": "type.googleapis.com/google.protobuf.Duration",
|
|
81
|
+
* "value": "1.212s"
|
|
82
|
+
* }
|
|
83
|
+
*/
|
|
84
|
+
export interface Any {
|
|
85
|
+
/**
|
|
86
|
+
* A URL/resource name whose content describes the type of the
|
|
87
|
+
* serialized protocol buffer message.
|
|
88
|
+
*
|
|
89
|
+
* For URLs which use the scheme `http`, `https`, or no scheme, the
|
|
90
|
+
* following restrictions and interpretations apply:
|
|
91
|
+
*
|
|
92
|
+
* * If no scheme is provided, `https` is assumed.
|
|
93
|
+
* * The last segment of the URL's path must represent the fully
|
|
94
|
+
* qualified name of the type (as in `path/google.protobuf.Duration`).
|
|
95
|
+
* The name should be in a canonical form (e.g., leading "." is
|
|
96
|
+
* not accepted).
|
|
97
|
+
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
|
98
|
+
* value in binary format, or produce an error.
|
|
99
|
+
* * Applications are allowed to cache lookup results based on the
|
|
100
|
+
* URL, or have them precompiled into a binary to avoid any
|
|
101
|
+
* lookup. Therefore, binary compatibility needs to be preserved
|
|
102
|
+
* on changes to types. (Use versioned type names to manage
|
|
103
|
+
* breaking changes.)
|
|
104
|
+
*
|
|
105
|
+
* Schemes other than `http`, `https` (or the empty scheme) might be
|
|
106
|
+
* used with implementation specific semantics.
|
|
107
|
+
*/
|
|
108
|
+
typeUrl: string;
|
|
109
|
+
/** Must be a valid serialized protocol buffer of the above specified type. */
|
|
110
|
+
value: Uint8Array;
|
|
111
|
+
}
|
|
112
|
+
export declare const Any: {
|
|
113
|
+
encode(message: Any, writer?: _m0.Writer): _m0.Writer;
|
|
114
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Any;
|
|
115
|
+
fromJSON(object: any): Any;
|
|
116
|
+
toJSON(message: Any): unknown;
|
|
117
|
+
fromPartial<I extends {
|
|
118
|
+
typeUrl?: string | undefined;
|
|
119
|
+
value?: Uint8Array | undefined;
|
|
120
|
+
} & {
|
|
121
|
+
typeUrl?: string | undefined;
|
|
122
|
+
value?: Uint8Array | undefined;
|
|
123
|
+
} & Record<Exclude<keyof I, keyof Any>, never>>(object: I): Any;
|
|
124
|
+
};
|
|
125
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
126
|
+
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 {
|
|
127
|
+
$case: string;
|
|
128
|
+
} ? {
|
|
129
|
+
[K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
|
|
130
|
+
} & {
|
|
131
|
+
$case: T["$case"];
|
|
132
|
+
} : T extends {} ? {
|
|
133
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
134
|
+
} : Partial<T>;
|
|
135
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
136
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
137
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
138
|
+
} & Record<Exclude<keyof I, KeysOfUnion<P>>, never>;
|
|
139
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import Long from "long";
|
|
3
|
+
import _m0 from "protobufjs/minimal";
|
|
4
|
+
export const protobufPackage = "google.protobuf";
|
|
5
|
+
function createBaseAny() {
|
|
6
|
+
return { typeUrl: "", value: new Uint8Array() };
|
|
7
|
+
}
|
|
8
|
+
export const Any = {
|
|
9
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
10
|
+
if (message.typeUrl !== "") {
|
|
11
|
+
writer.uint32(10).string(message.typeUrl);
|
|
12
|
+
}
|
|
13
|
+
if (message.value.length !== 0) {
|
|
14
|
+
writer.uint32(18).bytes(message.value);
|
|
15
|
+
}
|
|
16
|
+
return writer;
|
|
17
|
+
},
|
|
18
|
+
decode(input, length) {
|
|
19
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
20
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
21
|
+
const message = createBaseAny();
|
|
22
|
+
while (reader.pos < end) {
|
|
23
|
+
const tag = reader.uint32();
|
|
24
|
+
switch (tag >>> 3) {
|
|
25
|
+
case 1:
|
|
26
|
+
message.typeUrl = reader.string();
|
|
27
|
+
break;
|
|
28
|
+
case 2:
|
|
29
|
+
message.value = reader.bytes();
|
|
30
|
+
break;
|
|
31
|
+
default:
|
|
32
|
+
reader.skipType(tag & 7);
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return message;
|
|
37
|
+
},
|
|
38
|
+
fromJSON(object) {
|
|
39
|
+
return {
|
|
40
|
+
typeUrl: isSet(object.typeUrl) ? String(object.typeUrl) : "",
|
|
41
|
+
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(),
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
toJSON(message) {
|
|
45
|
+
const obj = {};
|
|
46
|
+
message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl);
|
|
47
|
+
message.value !== undefined &&
|
|
48
|
+
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
|
|
49
|
+
return obj;
|
|
50
|
+
},
|
|
51
|
+
fromPartial(object) {
|
|
52
|
+
const message = createBaseAny();
|
|
53
|
+
message.typeUrl = object.typeUrl ?? "";
|
|
54
|
+
message.value = object.value ?? new Uint8Array();
|
|
55
|
+
return message;
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
var globalThis = (() => {
|
|
59
|
+
if (typeof globalThis !== "undefined")
|
|
60
|
+
return globalThis;
|
|
61
|
+
if (typeof self !== "undefined")
|
|
62
|
+
return self;
|
|
63
|
+
if (typeof window !== "undefined")
|
|
64
|
+
return window;
|
|
65
|
+
if (typeof global !== "undefined")
|
|
66
|
+
return global;
|
|
67
|
+
throw "Unable to locate global object";
|
|
68
|
+
})();
|
|
69
|
+
const atob = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
|
|
70
|
+
function bytesFromBase64(b64) {
|
|
71
|
+
const bin = atob(b64);
|
|
72
|
+
const arr = new Uint8Array(bin.length);
|
|
73
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
74
|
+
arr[i] = bin.charCodeAt(i);
|
|
75
|
+
}
|
|
76
|
+
return arr;
|
|
77
|
+
}
|
|
78
|
+
const btoa = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
|
|
79
|
+
function base64FromBytes(arr) {
|
|
80
|
+
const bin = [];
|
|
81
|
+
for (const byte of arr) {
|
|
82
|
+
bin.push(String.fromCharCode(byte));
|
|
83
|
+
}
|
|
84
|
+
return btoa(bin.join(""));
|
|
85
|
+
}
|
|
86
|
+
if (_m0.util.Long !== Long) {
|
|
87
|
+
_m0.util.Long = Long;
|
|
88
|
+
_m0.configure();
|
|
89
|
+
}
|
|
90
|
+
function isSet(value) {
|
|
91
|
+
return value !== null && value !== undefined;
|
|
92
|
+
}
|