@snap/push2web 0.11.0 → 0.12.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/Push2WebSDKExtension.js +1 -1
- package/dist/generated-api-client/camera_kit/v3/export.d.ts +0 -59
- package/dist/generated-api-client/camera_kit/v3/export.js +0 -10
- package/dist/generated-api-client/camera_kit/v3/lens.d.ts +0 -55
- package/dist/generated-api-client/camera_kit/v3/lens.js +0 -12
- package/dist/generated-api-client/camera_kit/v3/push_to_device.d.ts +0 -58
- package/dist/generated-api-client/camera_kit/v3/push_to_device.js +0 -16
- package/dist/generated-api-client/core/snap_status_code.d.ts +0 -209
- package/dist/generated-api-client/core/snap_status_code.js +0 -200
- package/dist/generated-api-client/google/protobuf/any.d.ts +0 -105
- package/dist/generated-api-client/google/protobuf/any.js +0 -1
- package/docs/html/.nojekyll +1 -0
- package/docs/html/assets/highlight.css +78 -0
- package/docs/html/assets/main.js +58 -0
- package/docs/html/assets/search.js +1 -0
- package/docs/html/assets/style.css +1367 -0
- package/docs/html/classes/Push2Web.html +159 -0
- package/docs/html/enums/Code.html +198 -0
- package/docs/html/enums/ListenLensPushResponse_ExcludedLens_Code.html +98 -0
- package/docs/html/enums/State.html +79 -0
- package/docs/html/index.html +89 -0
- package/docs/html/interfaces/Lens.html +143 -0
- package/docs/html/modules.html +68 -0
- package/docs/html/types/CommunicationErrorEvent.html +76 -0
- package/docs/html/types/ErrorEvent.html +50 -0
- package/docs/html/types/GenericErrorEvent.html +66 -0
- package/docs/html/types/LensExcludedErrorEvent.html +76 -0
- package/docs/html/types/LensReceivedEvent.html +50 -0
- package/docs/html/types/Push2WebEvents.html +50 -0
- package/docs/html/types/SubscriptionChangedEvent.html +50 -0
- package/docs/html/types/SubscriptionInstance.html +80 -0
- package/docs/md/.nojekyll +1 -0
- package/docs/md/README.md +68 -0
- package/docs/md/classes/Push2Web.md +106 -0
- package/docs/md/enums/Code.md +197 -0
- package/docs/md/enums/ListenLensPushResponse_ExcludedLens_Code.md +57 -0
- package/docs/md/enums/State.md +26 -0
- package/docs/md/interfaces/Lens.md +95 -0
- package/docs/md/modules.md +118 -0
- package/package.json +4 -3
|
@@ -31,7 +31,7 @@ export class Push2WebSDKExtension {
|
|
|
31
31
|
const handler = cameraKitServiceFetchHandlerFactory(configuration, fetch);
|
|
32
32
|
const pageVisibility = new PageVisibility();
|
|
33
33
|
const metricsHandler = new HandlerChainBuilder(handler).map(createRateLimitingHandler(this.metricRequestRateLimitMs, pageVisibility)).handler;
|
|
34
|
-
this.metricsReporter = operationalMetricReporterFactory(metricsHandler, pageVisibility);
|
|
34
|
+
this.metricsReporter = operationalMetricReporterFactory(metricsHandler, pageVisibility, configuration);
|
|
35
35
|
return new LensSources(lensSources, push2WebLensSource);
|
|
36
36
|
});
|
|
37
37
|
this.extension = createExtension().provides(lensSourceFactory);
|
|
@@ -2,48 +2,22 @@ import _m0 from "protobufjs/minimal";
|
|
|
2
2
|
import { Lens } from "./lens";
|
|
3
3
|
export declare const protobufPackage = "com.snap.camerakit.v3";
|
|
4
4
|
export interface ExportLensesByIdRequest {
|
|
5
|
-
/** Unlockable ids to export */
|
|
6
5
|
unlockableIds: number[];
|
|
7
|
-
/** Request context */
|
|
8
6
|
context: ExportLensesByIdRequest_Context | undefined;
|
|
9
7
|
}
|
|
10
8
|
export interface ExportLensesByIdRequest_Context {
|
|
11
|
-
/**
|
|
12
|
-
* User agent string
|
|
13
|
-
* For details link https://github.sc-corp.net/Snapchat/camera-kit-backend/blob/master/docs/useragent.md
|
|
14
|
-
*
|
|
15
|
-
* @deprecated
|
|
16
|
-
*/
|
|
17
9
|
userAgent: string;
|
|
18
|
-
/**
|
|
19
|
-
* User locale
|
|
20
|
-
* For details link https://github.sc-corp.net/Snapchat/camera-kit-backend/blob/master/docs/accept-language.md
|
|
21
|
-
*
|
|
22
|
-
* @deprecated
|
|
23
|
-
*/
|
|
24
10
|
locale: string;
|
|
25
|
-
/**
|
|
26
|
-
* Misspelled field. Use `extension` field instead
|
|
27
|
-
*
|
|
28
|
-
* @deprecated
|
|
29
|
-
*/
|
|
30
11
|
extention: ExportLensesByIdRequest_Context_Extension | undefined;
|
|
31
|
-
/** Extension that called export endpoint */
|
|
32
12
|
extension: ExportLensesByIdRequest_Context_Extension | undefined;
|
|
33
|
-
/** Extension request context */
|
|
34
13
|
extensionRequestContext: Uint8Array;
|
|
35
14
|
}
|
|
36
15
|
export interface ExportLensesByIdRequest_Context_Extension {
|
|
37
|
-
/** Extension name that called export endpoint */
|
|
38
16
|
name: ExportLensesByIdRequest_Context_Extension_Name;
|
|
39
|
-
/** Extension version (optional) that called export endpoint */
|
|
40
17
|
version: string;
|
|
41
18
|
}
|
|
42
|
-
/** Extension enum specifies list of supported extensions */
|
|
43
19
|
export declare enum ExportLensesByIdRequest_Context_Extension_Name {
|
|
44
|
-
/** UNSET - UNSET value */
|
|
45
20
|
UNSET = "UNSET",
|
|
46
|
-
/** SHOP_KIT - Shopkit */
|
|
47
21
|
SHOP_KIT = "SHOP_KIT",
|
|
48
22
|
UNRECOGNIZED = "UNRECOGNIZED"
|
|
49
23
|
}
|
|
@@ -51,11 +25,9 @@ export declare function exportLensesByIdRequest_Context_Extension_NameFromJSON(o
|
|
|
51
25
|
export declare function exportLensesByIdRequest_Context_Extension_NameToJSON(object: ExportLensesByIdRequest_Context_Extension_Name): string;
|
|
52
26
|
export declare function exportLensesByIdRequest_Context_Extension_NameToNumber(object: ExportLensesByIdRequest_Context_Extension_Name): number;
|
|
53
27
|
export interface ExportLensesByIdResponse {
|
|
54
|
-
/** Map between unlockable_id and exported lens object to pass in CameraKit SDK */
|
|
55
28
|
lenses: {
|
|
56
29
|
[key: number]: Uint8Array;
|
|
57
30
|
};
|
|
58
|
-
/** List of excluded lenses with code and reason */
|
|
59
31
|
excludedLenses: ExportLensesByIdResponse_ExcludedLens[];
|
|
60
32
|
}
|
|
61
33
|
export interface ExportLensesByIdResponse_LensesEntry {
|
|
@@ -63,53 +35,27 @@ export interface ExportLensesByIdResponse_LensesEntry {
|
|
|
63
35
|
value: Uint8Array;
|
|
64
36
|
}
|
|
65
37
|
export interface ExportLensesByIdResponse_ExcludedLens {
|
|
66
|
-
/** lens id */
|
|
67
38
|
lensId: number;
|
|
68
|
-
/** code why this lens been excluded */
|
|
69
39
|
code: ExportLensesByIdResponse_ExcludedLens_Code;
|
|
70
|
-
/** text reason why this lens been excluded */
|
|
71
40
|
reason: string;
|
|
72
41
|
}
|
|
73
42
|
export declare enum ExportLensesByIdResponse_ExcludedLens_Code {
|
|
74
|
-
/** UNSET - for linter */
|
|
75
43
|
UNSET = "UNSET",
|
|
76
|
-
/** UNKNOWN - reason unknown */
|
|
77
44
|
UNKNOWN = "UNKNOWN",
|
|
78
|
-
/** NOT_FOUND - lens not found */
|
|
79
45
|
NOT_FOUND = "NOT_FOUND",
|
|
80
|
-
/** INCOMPATIBLE_LENS_CORE_VERSION - client has core version less than core version of the lens */
|
|
81
46
|
INCOMPATIBLE_LENS_CORE_VERSION = "INCOMPATIBLE_LENS_CORE_VERSION",
|
|
82
|
-
/** ARCHIVED_OR_INVISIBLE - Lens archived or excluded due to visibility */
|
|
83
47
|
ARCHIVED_OR_INVISIBLE = "ARCHIVED_OR_INVISIBLE",
|
|
84
|
-
/** CONTAINS_MUSIC - lens contains music and cannot be provided by CameraKit */
|
|
85
48
|
CONTAINS_MUSIC = "CONTAINS_MUSIC",
|
|
86
49
|
UNRECOGNIZED = "UNRECOGNIZED"
|
|
87
50
|
}
|
|
88
51
|
export declare function exportLensesByIdResponse_ExcludedLens_CodeFromJSON(object: any): ExportLensesByIdResponse_ExcludedLens_Code;
|
|
89
52
|
export declare function exportLensesByIdResponse_ExcludedLens_CodeToJSON(object: ExportLensesByIdResponse_ExcludedLens_Code): string;
|
|
90
53
|
export declare function exportLensesByIdResponse_ExcludedLens_CodeToNumber(object: ExportLensesByIdResponse_ExcludedLens_Code): number;
|
|
91
|
-
/** ExtensionRequestContext message contains export context. */
|
|
92
54
|
export interface ExtensionRequestContext {
|
|
93
|
-
/**
|
|
94
|
-
* User agent string
|
|
95
|
-
* For details link https://github.sc-corp.net/Snapchat/camera-kit-backend/blob/master/docs/useragent.md
|
|
96
|
-
*/
|
|
97
55
|
userAgent: string;
|
|
98
|
-
/**
|
|
99
|
-
* User locale
|
|
100
|
-
* For details link https://github.sc-corp.net/Snapchat/camera-kit-backend/blob/master/docs/accept-language.md
|
|
101
|
-
*/
|
|
102
56
|
locale: string;
|
|
103
57
|
}
|
|
104
|
-
/**
|
|
105
|
-
* This message contains any auxiliary data to the exported lenses.
|
|
106
|
-
* ExportLensesByIdResponse returns this object in bytes representation to hide specific implementation from
|
|
107
|
-
* the extension.
|
|
108
|
-
* We expect that extension will simply pass through bytes to the
|
|
109
|
-
* SDK and do not perform any modifications to the original object.
|
|
110
|
-
*/
|
|
111
58
|
export interface Envelope {
|
|
112
|
-
/** Exported lenses */
|
|
113
59
|
lenses: Lens[];
|
|
114
60
|
}
|
|
115
61
|
export declare const ExportLensesByIdRequest: {
|
|
@@ -572,12 +518,7 @@ export declare const Envelope: {
|
|
|
572
518
|
}[]>, never>) | undefined;
|
|
573
519
|
} & Record<Exclude<keyof I, "lenses">, never>>(object: I): Envelope;
|
|
574
520
|
};
|
|
575
|
-
/** Export service exposes methods that relate to Export API */
|
|
576
521
|
export interface Export {
|
|
577
|
-
/**
|
|
578
|
-
* ExportLensesById exports CameraKit SDK compatible Lens data models
|
|
579
|
-
* by given lens ids
|
|
580
|
-
*/
|
|
581
522
|
ExportLensesById(request: ExportLensesByIdRequest): Promise<ExportLensesByIdResponse>;
|
|
582
523
|
}
|
|
583
524
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
1
|
import Long from "long";
|
|
3
2
|
import _m0 from "protobufjs/minimal";
|
|
4
3
|
import { Lens } from "./lens";
|
|
5
4
|
export const protobufPackage = "com.snap.camerakit.v3";
|
|
6
|
-
/** Extension enum specifies list of supported extensions */
|
|
7
5
|
export var ExportLensesByIdRequest_Context_Extension_Name;
|
|
8
6
|
(function (ExportLensesByIdRequest_Context_Extension_Name) {
|
|
9
|
-
/** UNSET - UNSET value */
|
|
10
7
|
ExportLensesByIdRequest_Context_Extension_Name["UNSET"] = "UNSET";
|
|
11
|
-
/** SHOP_KIT - Shopkit */
|
|
12
8
|
ExportLensesByIdRequest_Context_Extension_Name["SHOP_KIT"] = "SHOP_KIT";
|
|
13
9
|
ExportLensesByIdRequest_Context_Extension_Name["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
14
10
|
})(ExportLensesByIdRequest_Context_Extension_Name || (ExportLensesByIdRequest_Context_Extension_Name = {}));
|
|
@@ -48,17 +44,11 @@ export function exportLensesByIdRequest_Context_Extension_NameToNumber(object) {
|
|
|
48
44
|
}
|
|
49
45
|
export var ExportLensesByIdResponse_ExcludedLens_Code;
|
|
50
46
|
(function (ExportLensesByIdResponse_ExcludedLens_Code) {
|
|
51
|
-
/** UNSET - for linter */
|
|
52
47
|
ExportLensesByIdResponse_ExcludedLens_Code["UNSET"] = "UNSET";
|
|
53
|
-
/** UNKNOWN - reason unknown */
|
|
54
48
|
ExportLensesByIdResponse_ExcludedLens_Code["UNKNOWN"] = "UNKNOWN";
|
|
55
|
-
/** NOT_FOUND - lens not found */
|
|
56
49
|
ExportLensesByIdResponse_ExcludedLens_Code["NOT_FOUND"] = "NOT_FOUND";
|
|
57
|
-
/** INCOMPATIBLE_LENS_CORE_VERSION - client has core version less than core version of the lens */
|
|
58
50
|
ExportLensesByIdResponse_ExcludedLens_Code["INCOMPATIBLE_LENS_CORE_VERSION"] = "INCOMPATIBLE_LENS_CORE_VERSION";
|
|
59
|
-
/** ARCHIVED_OR_INVISIBLE - Lens archived or excluded due to visibility */
|
|
60
51
|
ExportLensesByIdResponse_ExcludedLens_Code["ARCHIVED_OR_INVISIBLE"] = "ARCHIVED_OR_INVISIBLE";
|
|
61
|
-
/** CONTAINS_MUSIC - lens contains music and cannot be provided by CameraKit */
|
|
62
52
|
ExportLensesByIdResponse_ExcludedLens_Code["CONTAINS_MUSIC"] = "CONTAINS_MUSIC";
|
|
63
53
|
ExportLensesByIdResponse_ExcludedLens_Code["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
64
54
|
})(ExportLensesByIdResponse_ExcludedLens_Code || (ExportLensesByIdResponse_ExcludedLens_Code = {}));
|
|
@@ -2,34 +2,21 @@ import _m0 from "protobufjs/minimal";
|
|
|
2
2
|
import { Any } from "../../google/protobuf/any";
|
|
3
3
|
export declare const protobufPackage = "com.snap.camerakit.v3";
|
|
4
4
|
export interface Lens {
|
|
5
|
-
/** Lens ID */
|
|
6
5
|
id: string;
|
|
7
|
-
/** Lens name */
|
|
8
6
|
name: string;
|
|
9
|
-
/** Lens custom vendor data */
|
|
10
7
|
vendorData: {
|
|
11
8
|
[key: string]: string;
|
|
12
9
|
};
|
|
13
|
-
/** Lens content */
|
|
14
10
|
content: Content | undefined;
|
|
15
|
-
/** Indicates if Lens private API is disabled */
|
|
16
11
|
isThirdParty: boolean;
|
|
17
|
-
/** camera facing enum. */
|
|
18
12
|
cameraFacingPreference: Lens_CameraFacing;
|
|
19
|
-
/** Lens feature metadata */
|
|
20
13
|
featureMetadata: Any[];
|
|
21
|
-
/** Lens creator. */
|
|
22
14
|
lensCreator: LensCreator | undefined;
|
|
23
|
-
/** Scannable snapcode. */
|
|
24
15
|
scannable: Scannable | undefined;
|
|
25
16
|
}
|
|
26
|
-
/** CameraFacing enum. */
|
|
27
17
|
export declare enum Lens_CameraFacing {
|
|
28
|
-
/** CAMERA_FACING_UNSET - unspecified value. */
|
|
29
18
|
CAMERA_FACING_UNSET = "CAMERA_FACING_UNSET",
|
|
30
|
-
/** CAMERA_FACING_FRONT - camera facing front */
|
|
31
19
|
CAMERA_FACING_FRONT = "CAMERA_FACING_FRONT",
|
|
32
|
-
/** CAMERA_FACING_BACK - camera facing back */
|
|
33
20
|
CAMERA_FACING_BACK = "CAMERA_FACING_BACK",
|
|
34
21
|
UNRECOGNIZED = "UNRECOGNIZED"
|
|
35
22
|
}
|
|
@@ -41,32 +28,16 @@ export interface Lens_VendorDataEntry {
|
|
|
41
28
|
value: string;
|
|
42
29
|
}
|
|
43
30
|
export interface Content {
|
|
44
|
-
/** Lens LNS URL */
|
|
45
31
|
lnsUrl: string;
|
|
46
|
-
/** Lens LNS SHA256 checksum */
|
|
47
32
|
lnsSha256: string;
|
|
48
|
-
/** Lens icon URL */
|
|
49
33
|
iconUrl: string;
|
|
50
|
-
/** Lens preview */
|
|
51
34
|
preview: Preview | undefined;
|
|
52
|
-
/** Lens asset manifest */
|
|
53
35
|
assetManifest: LensAssetManifestItem[];
|
|
54
|
-
/** Lens default hint id */
|
|
55
36
|
defaultHintId: string;
|
|
56
|
-
/** Lens hint translations. Contains hint id, manifest data id and corresponding translation string as a value */
|
|
57
37
|
hintTranslations: {
|
|
58
38
|
[key: string]: string;
|
|
59
39
|
};
|
|
60
|
-
/**
|
|
61
|
-
* Lens LNS archive URL in Bolt CDN (https://wiki.sc-corp.net/display/CDP/BOLT). Lens archive content is the same as
|
|
62
|
-
* in 'lns_url'. The field will eventually deprecate 'lns_url'.
|
|
63
|
-
*/
|
|
64
40
|
lnsUrlBolt: string;
|
|
65
|
-
/**
|
|
66
|
-
* Lens icon URL in Bolt CDN (https://wiki.sc-corp.net/display/CDP/BOLT). MIME type of the Bolt URL image may differ
|
|
67
|
-
* from the 'icon_url' image. At the moment of this writing, 'icon_url' refers to a PNG image, 'icon_url_bolt' refers
|
|
68
|
-
* to a WEBP image. The field will eventually deprecate 'icon_url'.
|
|
69
|
-
*/
|
|
70
41
|
iconUrlBolt: string;
|
|
71
42
|
}
|
|
72
43
|
export interface Content_HintTranslationsEntry {
|
|
@@ -74,35 +45,23 @@ export interface Content_HintTranslationsEntry {
|
|
|
74
45
|
value: string;
|
|
75
46
|
}
|
|
76
47
|
export interface LensAssetManifestItem {
|
|
77
|
-
/** Lens asset manifest type */
|
|
78
48
|
type: LensAssetManifestItem_Type;
|
|
79
|
-
/** Lens manifest item ID */
|
|
80
49
|
id: string;
|
|
81
|
-
/** Lens manifest item request timing */
|
|
82
50
|
requestTiming: LensAssetManifestItem_RequestTiming;
|
|
83
|
-
/** Lens asset url */
|
|
84
51
|
assetUrl: string;
|
|
85
|
-
/** asset checksum */
|
|
86
52
|
assetChecksum: string;
|
|
87
53
|
}
|
|
88
|
-
/** Manifest type */
|
|
89
54
|
export declare enum LensAssetManifestItem_Type {
|
|
90
|
-
/** DEVICE_DEPENDENT_ASSET_UNSET - Device dependent asset */
|
|
91
55
|
DEVICE_DEPENDENT_ASSET_UNSET = "DEVICE_DEPENDENT_ASSET_UNSET",
|
|
92
|
-
/** ASSET - Device independent asset */
|
|
93
56
|
ASSET = "ASSET",
|
|
94
57
|
UNRECOGNIZED = "UNRECOGNIZED"
|
|
95
58
|
}
|
|
96
59
|
export declare function lensAssetManifestItem_TypeFromJSON(object: any): LensAssetManifestItem_Type;
|
|
97
60
|
export declare function lensAssetManifestItem_TypeToJSON(object: LensAssetManifestItem_Type): string;
|
|
98
61
|
export declare function lensAssetManifestItem_TypeToNumber(object: LensAssetManifestItem_Type): number;
|
|
99
|
-
/** Manifest request timing */
|
|
100
62
|
export declare enum LensAssetManifestItem_RequestTiming {
|
|
101
|
-
/** PRELOAD_UNSET - Preload request timing */
|
|
102
63
|
PRELOAD_UNSET = "PRELOAD_UNSET",
|
|
103
|
-
/** ON_DEMAND - On demand request timing */
|
|
104
64
|
ON_DEMAND = "ON_DEMAND",
|
|
105
|
-
/** REQUIRED - Required request timing */
|
|
106
65
|
REQUIRED = "REQUIRED",
|
|
107
66
|
UNRECOGNIZED = "UNRECOGNIZED"
|
|
108
67
|
}
|
|
@@ -110,29 +69,15 @@ export declare function lensAssetManifestItem_RequestTimingFromJSON(object: any)
|
|
|
110
69
|
export declare function lensAssetManifestItem_RequestTimingToJSON(object: LensAssetManifestItem_RequestTiming): string;
|
|
111
70
|
export declare function lensAssetManifestItem_RequestTimingToNumber(object: LensAssetManifestItem_RequestTiming): number;
|
|
112
71
|
export interface Preview {
|
|
113
|
-
/** Lens preview image URL */
|
|
114
72
|
imageUrl: string;
|
|
115
|
-
/**
|
|
116
|
-
* This "size" defines the argument range [0..size-1] that can be used to substitute "%d" in
|
|
117
|
-
* image_sequence_webp_url_pattern and get preview image URLs.
|
|
118
|
-
*/
|
|
119
73
|
imageSequenceSize: number;
|
|
120
|
-
/**
|
|
121
|
-
* URL pattern for lens preview (webp) image sequence, adhering to IEEE printf specification. For example:
|
|
122
|
-
* https://lens-preview-storage.storage.googleapis.com/previewvideo/uuid/image_sequence/webp/image_%d.webp
|
|
123
|
-
* %d represents the index of images and image_sequence_size will be the size of the set of images
|
|
124
|
-
* https://snapchat.quip.com/YTZTAcX6VT4a.
|
|
125
|
-
*/
|
|
126
74
|
imageSequenceWebpUrlPattern: string;
|
|
127
75
|
}
|
|
128
76
|
export interface LensCreator {
|
|
129
|
-
/** Lens creator display name. */
|
|
130
77
|
displayName: string;
|
|
131
78
|
}
|
|
132
79
|
export interface Scannable {
|
|
133
|
-
/** Snapcode image URL. */
|
|
134
80
|
snapcodeImageUrl: string;
|
|
135
|
-
/** Snapcode deeplink. */
|
|
136
81
|
snapcodeDeeplink: string;
|
|
137
82
|
}
|
|
138
83
|
export declare const Lens: {
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
1
|
import Long from "long";
|
|
3
2
|
import _m0 from "protobufjs/minimal";
|
|
4
3
|
import { Any } from "../../google/protobuf/any";
|
|
5
4
|
export const protobufPackage = "com.snap.camerakit.v3";
|
|
6
|
-
/** CameraFacing enum. */
|
|
7
5
|
export var Lens_CameraFacing;
|
|
8
6
|
(function (Lens_CameraFacing) {
|
|
9
|
-
/** CAMERA_FACING_UNSET - unspecified value. */
|
|
10
7
|
Lens_CameraFacing["CAMERA_FACING_UNSET"] = "CAMERA_FACING_UNSET";
|
|
11
|
-
/** CAMERA_FACING_FRONT - camera facing front */
|
|
12
8
|
Lens_CameraFacing["CAMERA_FACING_FRONT"] = "CAMERA_FACING_FRONT";
|
|
13
|
-
/** CAMERA_FACING_BACK - camera facing back */
|
|
14
9
|
Lens_CameraFacing["CAMERA_FACING_BACK"] = "CAMERA_FACING_BACK";
|
|
15
10
|
Lens_CameraFacing["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
16
11
|
})(Lens_CameraFacing || (Lens_CameraFacing = {}));
|
|
@@ -55,12 +50,9 @@ export function lens_CameraFacingToNumber(object) {
|
|
|
55
50
|
return 0;
|
|
56
51
|
}
|
|
57
52
|
}
|
|
58
|
-
/** Manifest type */
|
|
59
53
|
export var LensAssetManifestItem_Type;
|
|
60
54
|
(function (LensAssetManifestItem_Type) {
|
|
61
|
-
/** DEVICE_DEPENDENT_ASSET_UNSET - Device dependent asset */
|
|
62
55
|
LensAssetManifestItem_Type["DEVICE_DEPENDENT_ASSET_UNSET"] = "DEVICE_DEPENDENT_ASSET_UNSET";
|
|
63
|
-
/** ASSET - Device independent asset */
|
|
64
56
|
LensAssetManifestItem_Type["ASSET"] = "ASSET";
|
|
65
57
|
LensAssetManifestItem_Type["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
66
58
|
})(LensAssetManifestItem_Type || (LensAssetManifestItem_Type = {}));
|
|
@@ -98,14 +90,10 @@ export function lensAssetManifestItem_TypeToNumber(object) {
|
|
|
98
90
|
return 0;
|
|
99
91
|
}
|
|
100
92
|
}
|
|
101
|
-
/** Manifest request timing */
|
|
102
93
|
export var LensAssetManifestItem_RequestTiming;
|
|
103
94
|
(function (LensAssetManifestItem_RequestTiming) {
|
|
104
|
-
/** PRELOAD_UNSET - Preload request timing */
|
|
105
95
|
LensAssetManifestItem_RequestTiming["PRELOAD_UNSET"] = "PRELOAD_UNSET";
|
|
106
|
-
/** ON_DEMAND - On demand request timing */
|
|
107
96
|
LensAssetManifestItem_RequestTiming["ON_DEMAND"] = "ON_DEMAND";
|
|
108
|
-
/** REQUIRED - Required request timing */
|
|
109
97
|
LensAssetManifestItem_RequestTiming["REQUIRED"] = "REQUIRED";
|
|
110
98
|
LensAssetManifestItem_RequestTiming["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
111
99
|
})(LensAssetManifestItem_RequestTiming || (LensAssetManifestItem_RequestTiming = {}));
|
|
@@ -4,35 +4,14 @@ import { Observable } from 'rxjs';
|
|
|
4
4
|
import { Lens } from './lens';
|
|
5
5
|
export declare const protobufPackage = "com.snap.camerakit.v3";
|
|
6
6
|
export interface PushLensSubscriptionRequest {
|
|
7
|
-
/**
|
|
8
|
-
* DEPRECATED: Account id of user logged in with LoginKit
|
|
9
|
-
* Backend will get this value from oAuth token instead
|
|
10
|
-
*
|
|
11
|
-
* @deprecated
|
|
12
|
-
*/
|
|
13
7
|
accountId: string;
|
|
14
|
-
/** Extension request context */
|
|
15
8
|
extensionRequestContext: Uint8Array;
|
|
16
|
-
/** Use this field > 0 for heartbeat, all other fields will not be respected */
|
|
17
9
|
heartbeat: number;
|
|
18
10
|
}
|
|
19
|
-
/** A response message will contain either a Lens or a ExcludedLens, but not both */
|
|
20
11
|
export interface PushLensSubscriptionResponse {
|
|
21
|
-
/**
|
|
22
|
-
* Deprecated: use lenses map instead
|
|
23
|
-
* Lens metadata
|
|
24
|
-
*
|
|
25
|
-
* @deprecated
|
|
26
|
-
*/
|
|
27
12
|
lens: Lens | undefined;
|
|
28
|
-
/** Excluded lens with code and reason */
|
|
29
13
|
excludedLens: PushLensSubscriptionResponse_ExcludedLens | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Echoes heartbeat if heartbeat != 0 in request
|
|
32
|
-
* all other fields will be empty
|
|
33
|
-
*/
|
|
34
14
|
heartbeat: number;
|
|
35
|
-
/** Map between lens_id and exported lens object (Envelope) to pass in CameraKit SDK */
|
|
36
15
|
lenses: {
|
|
37
16
|
[key: string]: Uint8Array;
|
|
38
17
|
};
|
|
@@ -41,49 +20,29 @@ export interface PushLensSubscriptionResponse_LensesEntry {
|
|
|
41
20
|
key: string;
|
|
42
21
|
value: Uint8Array;
|
|
43
22
|
}
|
|
44
|
-
/** Message indicates why lens cannot be exported */
|
|
45
23
|
export interface PushLensSubscriptionResponse_ExcludedLens {
|
|
46
|
-
/** lens id */
|
|
47
24
|
lensId: number;
|
|
48
|
-
/** code why this lens been excluded */
|
|
49
25
|
code: PushLensSubscriptionResponse_ExcludedLens_Code;
|
|
50
26
|
}
|
|
51
|
-
/** returned code */
|
|
52
27
|
export declare enum PushLensSubscriptionResponse_ExcludedLens_Code {
|
|
53
|
-
/** UNSET - for linter */
|
|
54
28
|
UNSET = "UNSET",
|
|
55
|
-
/** UNKNOWN - reason unknown */
|
|
56
29
|
UNKNOWN = "UNKNOWN",
|
|
57
|
-
/** NOT_FOUND - lens not found */
|
|
58
30
|
NOT_FOUND = "NOT_FOUND",
|
|
59
|
-
/** INCOMPATIBLE_LENS_CORE_VERSION - client has core version less than core version of the lens */
|
|
60
31
|
INCOMPATIBLE_LENS_CORE_VERSION = "INCOMPATIBLE_LENS_CORE_VERSION",
|
|
61
|
-
/** ARCHIVED_OR_INVISIBLE - Lens archived or excluded due to visibility */
|
|
62
32
|
ARCHIVED_OR_INVISIBLE = "ARCHIVED_OR_INVISIBLE",
|
|
63
|
-
/** CONTAINS_MUSIC - lens contains music and cannot be provided by CameraKit */
|
|
64
33
|
CONTAINS_MUSIC = "CONTAINS_MUSIC",
|
|
65
34
|
UNRECOGNIZED = "UNRECOGNIZED"
|
|
66
35
|
}
|
|
67
36
|
export declare function pushLensSubscriptionResponse_ExcludedLens_CodeFromJSON(object: any): PushLensSubscriptionResponse_ExcludedLens_Code;
|
|
68
37
|
export declare function pushLensSubscriptionResponse_ExcludedLens_CodeToJSON(object: PushLensSubscriptionResponse_ExcludedLens_Code): string;
|
|
69
38
|
export declare function pushLensSubscriptionResponse_ExcludedLens_CodeToNumber(object: PushLensSubscriptionResponse_ExcludedLens_Code): number;
|
|
70
|
-
/** ListenLensPush request */
|
|
71
39
|
export interface ListenLensPushRequest {
|
|
72
|
-
/** Extension request context */
|
|
73
40
|
extensionRequestContext: Uint8Array;
|
|
74
|
-
/** Use this field > 0 for heartbeat, all other fields will not be respected */
|
|
75
41
|
heartbeat: number;
|
|
76
42
|
}
|
|
77
|
-
/** ListenLensPushResponse message will contain either a Lens or a ExcludedLens, but not both */
|
|
78
43
|
export interface ListenLensPushResponse {
|
|
79
|
-
/** Excluded lens with code and reason */
|
|
80
44
|
excludedLens: ListenLensPushResponse_ExcludedLens | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* Echoes heartbeat if heartbeat != 0 in request
|
|
83
|
-
* all other fields will be empty
|
|
84
|
-
*/
|
|
85
45
|
heartbeat: number;
|
|
86
|
-
/** Map between lens_id and exported lens object (Envelope) to pass in CameraKit SDK */
|
|
87
46
|
lenses: {
|
|
88
47
|
[key: string]: Uint8Array;
|
|
89
48
|
};
|
|
@@ -92,26 +51,16 @@ export interface ListenLensPushResponse_LensesEntry {
|
|
|
92
51
|
key: string;
|
|
93
52
|
value: Uint8Array;
|
|
94
53
|
}
|
|
95
|
-
/** Message indicates why lens cannot be exported */
|
|
96
54
|
export interface ListenLensPushResponse_ExcludedLens {
|
|
97
|
-
/** lens id */
|
|
98
55
|
lensId: number;
|
|
99
|
-
/** code why this lens been excluded */
|
|
100
56
|
code: ListenLensPushResponse_ExcludedLens_Code;
|
|
101
57
|
}
|
|
102
|
-
/** returned code */
|
|
103
58
|
export declare enum ListenLensPushResponse_ExcludedLens_Code {
|
|
104
|
-
/** UNSET - for linter */
|
|
105
59
|
UNSET = "UNSET",
|
|
106
|
-
/** UNKNOWN - reason unknown */
|
|
107
60
|
UNKNOWN = "UNKNOWN",
|
|
108
|
-
/** NOT_FOUND - lens not found */
|
|
109
61
|
NOT_FOUND = "NOT_FOUND",
|
|
110
|
-
/** INCOMPATIBLE_LENS_CORE_VERSION - client has core version less than core version of the lens */
|
|
111
62
|
INCOMPATIBLE_LENS_CORE_VERSION = "INCOMPATIBLE_LENS_CORE_VERSION",
|
|
112
|
-
/** ARCHIVED_OR_INVISIBLE - Lens archived or excluded due to visibility */
|
|
113
63
|
ARCHIVED_OR_INVISIBLE = "ARCHIVED_OR_INVISIBLE",
|
|
114
|
-
/** CONTAINS_MUSIC - lens contains music and cannot be provided by CameraKit */
|
|
115
64
|
CONTAINS_MUSIC = "CONTAINS_MUSIC",
|
|
116
65
|
UNRECOGNIZED = "UNRECOGNIZED"
|
|
117
66
|
}
|
|
@@ -442,15 +391,8 @@ export declare const ListenLensPushResponse_ExcludedLens: {
|
|
|
442
391
|
code?: ListenLensPushResponse_ExcludedLens_Code | undefined;
|
|
443
392
|
} & Record<Exclude<keyof I, keyof ListenLensPushResponse_ExcludedLens>, never>>(object: I): ListenLensPushResponse_ExcludedLens;
|
|
444
393
|
};
|
|
445
|
-
/** PushToDevice service provides endpoint to subscribe on push to device events */
|
|
446
394
|
export interface PushToDevice {
|
|
447
|
-
/** endpoint to subscribe on push lens notifications from Push service */
|
|
448
395
|
PushLensSubscription(request: DeepPartial<Observable<PushLensSubscriptionRequest>>, metadata?: grpc.Metadata): Observable<PushLensSubscriptionResponse>;
|
|
449
|
-
/**
|
|
450
|
-
* ListenLensPush rpc subscribes on push lens notifications from Push service. The RPC is mostly identical to
|
|
451
|
-
* PushLensSubscription with the exception of Server-side streaming instead of bidirectional streaming.
|
|
452
|
-
* Server-side only streaming is needed for grpc-web as it does not support bidirectional streaming.
|
|
453
|
-
*/
|
|
454
396
|
ListenLensPush(request: DeepPartial<ListenLensPushRequest>, metadata?: grpc.Metadata): Observable<ListenLensPushResponse>;
|
|
455
397
|
}
|
|
456
398
|
export declare class PushToDeviceClientImpl implements PushToDevice {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
1
|
import Long from 'long';
|
|
3
2
|
import { grpc } from '@improbable-eng/grpc-web';
|
|
4
3
|
import _m0 from 'protobufjs/minimal';
|
|
@@ -7,20 +6,13 @@ import { BrowserHeaders } from 'browser-headers';
|
|
|
7
6
|
import { share } from 'rxjs/operators';
|
|
8
7
|
import { Lens } from './lens';
|
|
9
8
|
export const protobufPackage = 'com.snap.camerakit.v3';
|
|
10
|
-
/** returned code */
|
|
11
9
|
export var PushLensSubscriptionResponse_ExcludedLens_Code;
|
|
12
10
|
(function (PushLensSubscriptionResponse_ExcludedLens_Code) {
|
|
13
|
-
/** UNSET - for linter */
|
|
14
11
|
PushLensSubscriptionResponse_ExcludedLens_Code["UNSET"] = "UNSET";
|
|
15
|
-
/** UNKNOWN - reason unknown */
|
|
16
12
|
PushLensSubscriptionResponse_ExcludedLens_Code["UNKNOWN"] = "UNKNOWN";
|
|
17
|
-
/** NOT_FOUND - lens not found */
|
|
18
13
|
PushLensSubscriptionResponse_ExcludedLens_Code["NOT_FOUND"] = "NOT_FOUND";
|
|
19
|
-
/** INCOMPATIBLE_LENS_CORE_VERSION - client has core version less than core version of the lens */
|
|
20
14
|
PushLensSubscriptionResponse_ExcludedLens_Code["INCOMPATIBLE_LENS_CORE_VERSION"] = "INCOMPATIBLE_LENS_CORE_VERSION";
|
|
21
|
-
/** ARCHIVED_OR_INVISIBLE - Lens archived or excluded due to visibility */
|
|
22
15
|
PushLensSubscriptionResponse_ExcludedLens_Code["ARCHIVED_OR_INVISIBLE"] = "ARCHIVED_OR_INVISIBLE";
|
|
23
|
-
/** CONTAINS_MUSIC - lens contains music and cannot be provided by CameraKit */
|
|
24
16
|
PushLensSubscriptionResponse_ExcludedLens_Code["CONTAINS_MUSIC"] = "CONTAINS_MUSIC";
|
|
25
17
|
PushLensSubscriptionResponse_ExcludedLens_Code["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
26
18
|
})(PushLensSubscriptionResponse_ExcludedLens_Code || (PushLensSubscriptionResponse_ExcludedLens_Code = {}));
|
|
@@ -72,20 +64,13 @@ export function pushLensSubscriptionResponse_ExcludedLens_CodeToNumber(object) {
|
|
|
72
64
|
default: return 0;
|
|
73
65
|
}
|
|
74
66
|
}
|
|
75
|
-
/** returned code */
|
|
76
67
|
export var ListenLensPushResponse_ExcludedLens_Code;
|
|
77
68
|
(function (ListenLensPushResponse_ExcludedLens_Code) {
|
|
78
|
-
/** UNSET - for linter */
|
|
79
69
|
ListenLensPushResponse_ExcludedLens_Code["UNSET"] = "UNSET";
|
|
80
|
-
/** UNKNOWN - reason unknown */
|
|
81
70
|
ListenLensPushResponse_ExcludedLens_Code["UNKNOWN"] = "UNKNOWN";
|
|
82
|
-
/** NOT_FOUND - lens not found */
|
|
83
71
|
ListenLensPushResponse_ExcludedLens_Code["NOT_FOUND"] = "NOT_FOUND";
|
|
84
|
-
/** INCOMPATIBLE_LENS_CORE_VERSION - client has core version less than core version of the lens */
|
|
85
72
|
ListenLensPushResponse_ExcludedLens_Code["INCOMPATIBLE_LENS_CORE_VERSION"] = "INCOMPATIBLE_LENS_CORE_VERSION";
|
|
86
|
-
/** ARCHIVED_OR_INVISIBLE - Lens archived or excluded due to visibility */
|
|
87
73
|
ListenLensPushResponse_ExcludedLens_Code["ARCHIVED_OR_INVISIBLE"] = "ARCHIVED_OR_INVISIBLE";
|
|
88
|
-
/** CONTAINS_MUSIC - lens contains music and cannot be provided by CameraKit */
|
|
89
74
|
ListenLensPushResponse_ExcludedLens_Code["CONTAINS_MUSIC"] = "CONTAINS_MUSIC";
|
|
90
75
|
ListenLensPushResponse_ExcludedLens_Code["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
91
76
|
})(ListenLensPushResponse_ExcludedLens_Code || (ListenLensPushResponse_ExcludedLens_Code = {}));
|
|
@@ -687,7 +672,6 @@ export class GrpcWebImpl {
|
|
|
687
672
|
});
|
|
688
673
|
}
|
|
689
674
|
invoke(methodDesc, _request, metadata) {
|
|
690
|
-
// Status Response Codes (https://developers.google.com/maps-booking/reference/grpc-api/status_codes)
|
|
691
675
|
const upStreamCodes = [2, 4, 8, 9, 10, 13, 14, 15];
|
|
692
676
|
const DEFAULT_TIMEOUT_TIME = 3000;
|
|
693
677
|
const request = { ..._request, ...methodDesc.requestType };
|