@snap/push2web 0.22.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/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- 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 -20
- package/docs/html/modules.html +5 -5
- 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 -33
- package/docs/md/modules.md +3 -3
- package/package.json +4 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
export declare const protobufPackage = "snapchat.core";
|
|
3
3
|
export declare enum Code {
|
|
4
4
|
OK = "OK",
|
|
@@ -38,25 +38,9 @@ export interface CodeProperties {
|
|
|
38
38
|
isRetryable: boolean;
|
|
39
39
|
source: string;
|
|
40
40
|
}
|
|
41
|
-
export declare const CodeProperties:
|
|
42
|
-
encode(message: CodeProperties, writer?: _m0.Writer): _m0.Writer;
|
|
43
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): CodeProperties;
|
|
44
|
-
fromJSON(object: any): CodeProperties;
|
|
45
|
-
toJSON(message: CodeProperties): unknown;
|
|
46
|
-
fromPartial<I extends {
|
|
47
|
-
errorCode?: number | undefined;
|
|
48
|
-
errorDescription?: string | undefined;
|
|
49
|
-
isRetryable?: boolean | undefined;
|
|
50
|
-
source?: string | undefined;
|
|
51
|
-
} & {
|
|
52
|
-
errorCode?: number | undefined;
|
|
53
|
-
errorDescription?: string | undefined;
|
|
54
|
-
isRetryable?: boolean | undefined;
|
|
55
|
-
source?: string | undefined;
|
|
56
|
-
} & Record<Exclude<keyof I, keyof CodeProperties>, never>>(object: I): CodeProperties;
|
|
57
|
-
};
|
|
41
|
+
export declare const CodeProperties: MessageFns<CodeProperties>;
|
|
58
42
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
59
|
-
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 {
|
|
43
|
+
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 {
|
|
60
44
|
$case: string;
|
|
61
45
|
} ? {
|
|
62
46
|
[K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
|
|
@@ -68,5 +52,15 @@ export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ?
|
|
|
68
52
|
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
69
53
|
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
70
54
|
[K in keyof P]: Exact<P[K], I[K]>;
|
|
71
|
-
} &
|
|
55
|
+
} & {
|
|
56
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
57
|
+
};
|
|
58
|
+
export interface MessageFns<T> {
|
|
59
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
60
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
61
|
+
fromJSON(object: any): T;
|
|
62
|
+
toJSON(message: T): unknown;
|
|
63
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
64
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
65
|
+
}
|
|
72
66
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _m0 from "protobufjs/minimal";
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
3
2
|
export const protobufPackage = "snapchat.core";
|
|
4
3
|
export var Code;
|
|
5
4
|
(function (Code) {
|
|
@@ -171,8 +170,9 @@ export function codeToJSON(object) {
|
|
|
171
170
|
return "URL_DOWNLOAD_FAILURE";
|
|
172
171
|
case Code.CLOUD_STORAGE_FAILURE:
|
|
173
172
|
return "CLOUD_STORAGE_FAILURE";
|
|
173
|
+
case Code.UNRECOGNIZED:
|
|
174
174
|
default:
|
|
175
|
-
return "
|
|
175
|
+
return "UNRECOGNIZED";
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
export function codeToNumber(object) {
|
|
@@ -229,22 +229,23 @@ export function codeToNumber(object) {
|
|
|
229
229
|
return 204;
|
|
230
230
|
case Code.CLOUD_STORAGE_FAILURE:
|
|
231
231
|
return 205;
|
|
232
|
+
case Code.UNRECOGNIZED:
|
|
232
233
|
default:
|
|
233
|
-
return
|
|
234
|
+
return -1;
|
|
234
235
|
}
|
|
235
236
|
}
|
|
236
237
|
function createBaseCodeProperties() {
|
|
237
238
|
return { errorCode: 0, errorDescription: "", isRetryable: false, source: "" };
|
|
238
239
|
}
|
|
239
240
|
export const CodeProperties = {
|
|
240
|
-
encode(message, writer =
|
|
241
|
+
encode(message, writer = new BinaryWriter()) {
|
|
241
242
|
if (message.errorCode !== 0) {
|
|
242
243
|
writer.uint32(8).uint32(message.errorCode);
|
|
243
244
|
}
|
|
244
245
|
if (message.errorDescription !== "") {
|
|
245
246
|
writer.uint32(18).string(message.errorDescription);
|
|
246
247
|
}
|
|
247
|
-
if (message.isRetryable
|
|
248
|
+
if (message.isRetryable !== false) {
|
|
248
249
|
writer.uint32(24).bool(message.isRetryable);
|
|
249
250
|
}
|
|
250
251
|
if (message.source !== "") {
|
|
@@ -253,47 +254,75 @@ export const CodeProperties = {
|
|
|
253
254
|
return writer;
|
|
254
255
|
},
|
|
255
256
|
decode(input, length) {
|
|
256
|
-
const reader = input instanceof
|
|
257
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
257
258
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
258
259
|
const message = createBaseCodeProperties();
|
|
259
260
|
while (reader.pos < end) {
|
|
260
261
|
const tag = reader.uint32();
|
|
261
262
|
switch (tag >>> 3) {
|
|
262
|
-
case 1:
|
|
263
|
+
case 1: {
|
|
264
|
+
if (tag !== 8) {
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
263
267
|
message.errorCode = reader.uint32();
|
|
264
|
-
|
|
265
|
-
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
case 2: {
|
|
271
|
+
if (tag !== 18) {
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
266
274
|
message.errorDescription = reader.string();
|
|
267
|
-
|
|
268
|
-
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
case 3: {
|
|
278
|
+
if (tag !== 24) {
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
269
281
|
message.isRetryable = reader.bool();
|
|
270
|
-
|
|
271
|
-
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
case 4: {
|
|
285
|
+
if (tag !== 34) {
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
272
288
|
message.source = reader.string();
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
293
|
+
break;
|
|
277
294
|
}
|
|
295
|
+
reader.skip(tag & 7);
|
|
278
296
|
}
|
|
279
297
|
return message;
|
|
280
298
|
},
|
|
281
299
|
fromJSON(object) {
|
|
282
300
|
return {
|
|
283
|
-
errorCode: isSet(object.errorCode) ? Number(object.errorCode) : 0,
|
|
284
|
-
errorDescription: isSet(object.errorDescription) ? String(object.errorDescription) : "",
|
|
285
|
-
isRetryable: isSet(object.isRetryable) ? Boolean(object.isRetryable) : false,
|
|
286
|
-
source: isSet(object.source) ? String(object.source) : "",
|
|
301
|
+
errorCode: isSet(object.errorCode) ? globalThis.Number(object.errorCode) : 0,
|
|
302
|
+
errorDescription: isSet(object.errorDescription) ? globalThis.String(object.errorDescription) : "",
|
|
303
|
+
isRetryable: isSet(object.isRetryable) ? globalThis.Boolean(object.isRetryable) : false,
|
|
304
|
+
source: isSet(object.source) ? globalThis.String(object.source) : "",
|
|
287
305
|
};
|
|
288
306
|
},
|
|
289
307
|
toJSON(message) {
|
|
290
308
|
const obj = {};
|
|
291
|
-
message.errorCode !==
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
message.
|
|
309
|
+
if (message.errorCode !== 0) {
|
|
310
|
+
obj.errorCode = Math.round(message.errorCode);
|
|
311
|
+
}
|
|
312
|
+
if (message.errorDescription !== "") {
|
|
313
|
+
obj.errorDescription = message.errorDescription;
|
|
314
|
+
}
|
|
315
|
+
if (message.isRetryable !== false) {
|
|
316
|
+
obj.isRetryable = message.isRetryable;
|
|
317
|
+
}
|
|
318
|
+
if (message.source !== "") {
|
|
319
|
+
obj.source = message.source;
|
|
320
|
+
}
|
|
295
321
|
return obj;
|
|
296
322
|
},
|
|
323
|
+
create(base) {
|
|
324
|
+
return CodeProperties.fromPartial(base ?? {});
|
|
325
|
+
},
|
|
297
326
|
fromPartial(object) {
|
|
298
327
|
const message = createBaseCodeProperties();
|
|
299
328
|
message.errorCode = object.errorCode ?? 0;
|
|
@@ -303,10 +332,6 @@ export const CodeProperties = {
|
|
|
303
332
|
return message;
|
|
304
333
|
},
|
|
305
334
|
};
|
|
306
|
-
if (_m0.util.Long !== Long) {
|
|
307
|
-
_m0.util.Long = Long;
|
|
308
|
-
_m0.configure();
|
|
309
|
-
}
|
|
310
335
|
function isSet(value) {
|
|
311
336
|
return value !== null && value !== undefined;
|
|
312
337
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
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/annotations.proto
|
|
1
6
|
/* eslint-disable */
|
|
2
|
-
import Long from "long";
|
|
3
|
-
import _m0 from "protobufjs/minimal";
|
|
4
7
|
export const protobufPackage = "google.api";
|
|
5
|
-
if (_m0.util.Long !== Long) {
|
|
6
|
-
_m0.util.Long = Long;
|
|
7
|
-
_m0.configure();
|
|
8
|
-
}
|