@snap/camera-kit 0.14.0 → 0.15.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.md +5921 -1485
- package/README.md +1 -1
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/CameraKit.html +7 -7
- package/docs/html/classes/CameraKitSession.html +17 -25
- package/docs/html/classes/CameraKitSource.html +15 -10
- package/docs/html/classes/LensPerformanceMeasurement.html +7 -7
- package/docs/html/classes/LensPerformanceMetrics.html +7 -7
- package/docs/html/classes/LensRepository.html +7 -7
- package/docs/html/classes/Transform2D.html +7 -7
- package/docs/html/classes/TypedCustomEvent.html +7 -7
- package/docs/html/classes/TypedEventTarget.html +7 -7
- package/docs/html/functions/ConcatInjectable.html +202 -0
- package/docs/html/functions/Injectable.html +15 -16
- package/docs/html/functions/bootstrapCameraKit.html +7 -7
- package/docs/html/functions/createExtension.html +7 -7
- package/docs/html/functions/createImageSource.html +7 -7
- package/docs/html/functions/createMediaStreamSource.html +7 -7
- package/docs/html/functions/createUserMediaSource.html +7 -7
- package/docs/html/functions/createVideoSource.html +7 -7
- package/docs/html/functions/estimateLensPerformance.html +7 -7
- package/docs/html/functions/getRequiredBootstrapURLs.html +7 -7
- package/docs/html/functions/lensSourcesFactory.html +17 -9
- package/docs/html/functions/remoteApiServicesFactory.html +7 -7
- package/docs/html/index.html +9 -9
- package/docs/html/interfaces/CameraKitBootstrapConfiguration.html +7 -7
- package/docs/html/interfaces/CameraKitSourceSubscriber.html +7 -7
- package/docs/html/interfaces/ComputedFrameMetrics.html +7 -7
- package/docs/html/interfaces/CreateSessionOptions.html +7 -7
- package/docs/html/interfaces/EstimatedLensPerformance.html +7 -7
- package/docs/html/interfaces/Lens.html +7 -7
- package/docs/html/interfaces/LensLaunchData.html +183 -0
- package/docs/html/interfaces/LensSource.html +28 -46
- package/docs/html/interfaces/MediaStreamSourceOptions.html +7 -7
- package/docs/html/interfaces/Preview.html +7 -7
- package/docs/html/interfaces/RemoteApiRequest.html +7 -7
- package/docs/html/interfaces/RemoteApiResponse.html +7 -7
- package/docs/html/interfaces/RemoteApiService.html +7 -7
- package/docs/html/interfaces/Snapcode.html +7 -7
- package/docs/html/interfaces/UriCancelRequest.html +7 -7
- package/docs/html/interfaces/UriRequest.html +7 -7
- package/docs/html/interfaces/UriResponse.html +7 -7
- package/docs/html/interfaces/VideoSourceOptions.html +7 -7
- package/docs/html/modules.html +12 -12
- package/docs/html/types/AssetLoader.html +7 -7
- package/docs/html/types/AssetTiming.html +7 -7
- package/docs/html/types/BenchmarkError.html +7 -7
- package/docs/html/types/BootstrapError.html +7 -7
- package/docs/html/types/CacheKeyNotFoundError.html +7 -7
- package/docs/html/types/CameraKitDeviceInfo.html +7 -7
- package/docs/html/types/CameraKitDeviceOptions.html +7 -7
- package/docs/html/types/CameraKitSessionEventListener.html +7 -7
- package/docs/html/types/CameraKitSessionEvents.html +7 -7
- package/docs/html/types/CameraKitSourceError.html +7 -7
- package/docs/html/types/CameraKitSourceInfo.html +7 -7
- package/docs/html/types/CameraKitSourceOptions.html +7 -7
- package/docs/html/types/ConfigurationError.html +7 -7
- package/docs/html/types/Keyboard.html +7 -7
- package/docs/html/types/KeyboardEvents.html +7 -7
- package/docs/html/types/LegalError.html +7 -7
- package/docs/html/types/LensAbortError.html +7 -7
- package/docs/html/types/LensAssetError.html +7 -7
- package/docs/html/types/LensContentValidationError.html +7 -7
- package/docs/html/types/LensError.html +7 -7
- package/docs/html/types/LensExecutionError.html +7 -7
- package/docs/html/types/LensImagePickerError.html +7 -7
- package/docs/html/types/LensMetricsEvents.html +7 -7
- package/docs/html/types/LensPerformanceCluster.html +7 -7
- package/docs/html/types/LensView.html +7 -7
- package/docs/html/types/LensWait.html +7 -7
- package/docs/html/types/PersistentStoreError.html +7 -7
- package/docs/html/types/PlatformNotSupportedError.html +7 -7
- package/docs/html/types/PublicContainer.html +7 -7
- package/docs/html/types/RemoteApiRequestHandler.html +7 -7
- package/docs/html/types/RemoteApiServices.html +7 -7
- package/docs/html/types/RemoteApiStatus.html +7 -7
- package/docs/html/types/RenderTarget.html +7 -7
- package/docs/html/types/Uri.html +7 -7
- package/docs/html/types/WebGLError.html +7 -7
- package/docs/html/variables/extensionRequestContext.html +7 -7
- package/docs/md/README.md +1 -1
- package/docs/md/classes/CameraKit.md +1 -1
- package/docs/md/classes/CameraKitSession.md +11 -22
- package/docs/md/classes/CameraKitSource.md +11 -5
- package/docs/md/classes/LensPerformanceMeasurement.md +1 -1
- package/docs/md/classes/LensPerformanceMetrics.md +1 -1
- package/docs/md/classes/LensRepository.md +1 -1
- package/docs/md/classes/Transform2D.md +1 -1
- package/docs/md/classes/TypedCustomEvent.md +1 -1
- package/docs/md/classes/TypedEventTarget.md +1 -1
- package/docs/md/interfaces/CameraKitBootstrapConfiguration.md +1 -1
- package/docs/md/interfaces/CameraKitSourceSubscriber.md +1 -1
- package/docs/md/interfaces/ComputedFrameMetrics.md +1 -1
- package/docs/md/interfaces/CreateSessionOptions.md +1 -1
- package/docs/md/interfaces/EstimatedLensPerformance.md +1 -1
- package/docs/md/interfaces/Lens.md +1 -1
- package/docs/md/interfaces/LensLaunchData.md +53 -0
- package/docs/md/interfaces/LensSource.md +23 -25
- package/docs/md/interfaces/MediaStreamSourceOptions.md +1 -1
- package/docs/md/interfaces/Preview.md +1 -1
- package/docs/md/interfaces/RemoteApiRequest.md +1 -1
- package/docs/md/interfaces/RemoteApiResponse.md +1 -1
- package/docs/md/interfaces/RemoteApiService.md +1 -1
- package/docs/md/interfaces/Snapcode.md +1 -1
- package/docs/md/interfaces/UriCancelRequest.md +1 -1
- package/docs/md/interfaces/UriRequest.md +1 -1
- package/docs/md/interfaces/UriResponse.md +1 -1
- package/docs/md/interfaces/VideoSourceOptions.md +1 -1
- package/docs/md/modules.md +125 -28
- package/lib/CameraKit.d.ts +14 -6
- package/lib/__tests__/data.d.ts +2 -2
- package/lib/__tests__/data.js +2 -2
- package/lib/__tests__/data.js.map +1 -1
- package/lib/bootstrapCameraKit.js +12 -3
- package/lib/bootstrapCameraKit.js.map +1 -1
- package/lib/clients/createTsProtoClient.d.ts +47 -0
- package/lib/clients/createTsProtoClient.js +53 -0
- package/lib/clients/createTsProtoClient.js.map +1 -0
- package/lib/clients/grpcHandler.d.ts +23 -0
- package/lib/clients/grpcHandler.js +87 -0
- package/lib/clients/grpcHandler.js.map +1 -0
- package/lib/clients/lensesClient.d.ts +9 -0
- package/lib/clients/lensesClient.js +6 -0
- package/lib/clients/lensesClient.js.map +1 -0
- package/lib/common/entries.d.ts +1 -0
- package/lib/common/entries.js +2 -0
- package/lib/common/entries.js.map +1 -1
- package/lib/common/result.d.ts +36 -0
- package/lib/common/result.js +40 -0
- package/lib/common/result.js.map +1 -0
- package/lib/common/unionBy.d.ts +28 -0
- package/lib/common/unionBy.js +46 -0
- package/lib/common/unionBy.js.map +1 -0
- package/lib/configuration.js +14 -1
- package/lib/configuration.js.map +1 -1
- package/lib/dependency-injection/Injectable.d.ts +67 -11
- package/lib/dependency-injection/Injectable.js +21 -2
- package/lib/dependency-injection/Injectable.js.map +1 -1
- package/lib/dependency-injection/RootServices.d.ts +5 -1
- package/lib/dependency-injection/RootServices.js.map +1 -1
- package/lib/environment.json +1 -1
- package/lib/extensions/RemoteApiServices.d.ts +1 -1
- package/lib/extensions/RemoteApiServices.js +7 -7
- package/lib/extensions/RemoteApiServices.js.map +1 -1
- package/lib/extensions/uriHandlersRegister.d.ts +6 -6
- package/lib/extensions/uriHandlersRegister.js +1 -1
- package/lib/extensions/uriHandlersRegister.js.map +1 -1
- package/lib/generated-proto/blizzard/cameraKitEvents.js.map +1 -1
- package/lib/generated-proto/pb_schema/camera_kit/v3/business_events.d.ts +15 -17
- package/lib/generated-proto/pb_schema/camera_kit/v3/business_events.js +62 -69
- package/lib/generated-proto/pb_schema/camera_kit/v3/business_events.js.map +1 -1
- package/lib/generated-proto/pb_schema/camera_kit/v3/export.d.ts +6 -0
- package/lib/generated-proto/pb_schema/camera_kit/v3/export.js +68 -0
- package/lib/generated-proto/pb_schema/camera_kit/v3/export.js.map +1 -1
- package/lib/generated-proto/pb_schema/camera_kit/v3/legal_prompt.d.ts +5 -6
- package/lib/generated-proto/pb_schema/camera_kit/v3/legal_prompt.js +11 -25
- package/lib/generated-proto/pb_schema/camera_kit/v3/legal_prompt.js.map +1 -1
- package/lib/generated-proto/pb_schema/camera_kit/v3/lens.d.ts +19 -14
- package/lib/generated-proto/pb_schema/camera_kit/v3/lens.js +145 -64
- package/lib/generated-proto/pb_schema/camera_kit/v3/lens.js.map +1 -1
- package/lib/generated-proto/pb_schema/camera_kit/v3/operational_metrics.d.ts +2 -0
- package/lib/generated-proto/pb_schema/camera_kit/v3/operational_metrics.js +30 -0
- package/lib/generated-proto/pb_schema/camera_kit/v3/operational_metrics.js.map +1 -1
- package/lib/generated-proto/pb_schema/camera_kit/v3/ranking.d.ts +15 -16
- package/lib/generated-proto/pb_schema/camera_kit/v3/ranking.js +36 -62
- package/lib/generated-proto/pb_schema/camera_kit/v3/ranking.js.map +1 -1
- package/lib/generated-proto/pb_schema/camera_kit/v3/service.d.ts +1294 -12
- package/lib/generated-proto/pb_schema/camera_kit/v3/service.js +200 -0
- package/lib/generated-proto/pb_schema/camera_kit/v3/service.js.map +1 -1
- package/lib/generated-proto/pb_schema/cdp/cof/config_result.d.ts +4 -0
- package/lib/generated-proto/pb_schema/cdp/cof/config_result.js +4 -0
- package/lib/generated-proto/pb_schema/cdp/cof/config_result.js.map +1 -1
- package/lib/generated-proto/pb_schema/google/protobuf/descriptor.d.ts +39 -45
- package/lib/generated-proto/pb_schema/google/protobuf/descriptor.js +74 -192
- package/lib/generated-proto/pb_schema/google/protobuf/descriptor.js.map +1 -1
- package/lib/handlers/defaultFetchHandler.js +1 -5
- package/lib/handlers/defaultFetchHandler.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +2 -6
- package/lib/index.js.map +1 -1
- package/lib/lens/Lens.d.ts +2 -12
- package/lib/lens/Lens.js +2 -2
- package/lib/lens/Lens.js.map +1 -1
- package/lib/lens/LensLaunchData.d.ts +37 -0
- package/lib/lens/LensLaunchData.js +35 -0
- package/lib/lens/LensLaunchData.js.map +1 -0
- package/lib/lens/LensRepository.d.ts +4 -7
- package/lib/lens/LensRepository.js +24 -35
- package/lib/lens/LensRepository.js.map +1 -1
- package/lib/lens/LensSource.d.ts +43 -0
- package/lib/lens/LensSource.js +42 -0
- package/lib/lens/LensSource.js.map +1 -0
- package/lib/lens/assets/LensAssetRepository.js +2 -4
- package/lib/lens/assets/LensAssetRepository.js.map +1 -1
- package/lib/lens/assets/LensAssetsProvider.d.ts +1 -1
- package/lib/lens/cameraKitLensSource.d.ts +16 -0
- package/lib/lens/cameraKitLensSource.js +59 -0
- package/lib/lens/cameraKitLensSource.js.map +1 -0
- package/lib/lens-core-module/lensCore.d.ts +2 -1
- package/lib/lens-core-module/lensCore.js +6 -1
- package/lib/lens-core-module/lensCore.js.map +1 -1
- package/lib/lens-core-module/lensCoreError.js +1 -1
- package/lib/lens-core-module/lensCoreError.js.map +1 -1
- package/lib/lensCoreWasmVersions.json +3 -3
- package/lib/media-sources/CameraKitSource.d.ts +10 -4
- package/lib/media-sources/CameraKitSource.js +11 -4
- package/lib/media-sources/CameraKitSource.js.map +1 -1
- package/lib/media-sources/ImageSource.js +1 -11
- package/lib/media-sources/ImageSource.js.map +1 -1
- package/lib/media-sources/MediaStreamSource.js +1 -5
- package/lib/media-sources/MediaStreamSource.js.map +1 -1
- package/lib/media-sources/VideoSource.js +1 -11
- package/lib/media-sources/VideoSource.js.map +1 -1
- package/lib/metrics/businessEventsReporter.js +1 -1
- package/lib/metrics/businessEventsReporter.js.map +1 -1
- package/lib/metrics/reporters/reportGlobalException.d.ts +7 -0
- package/lib/metrics/reporters/reportGlobalException.js +22 -4
- package/lib/metrics/reporters/reportGlobalException.js.map +1 -1
- package/lib/metrics/reporters/reportHttpMetrics.js +14 -0
- package/lib/metrics/reporters/reportHttpMetrics.js.map +1 -1
- package/lib/metrics/reporters/reportLensValidationFailed.d.ts +1 -1
- package/lib/metrics/reporters/reportLensView.d.ts +1 -1
- package/lib/metrics/reporters/reportLensWait.d.ts +1 -1
- package/lib/metrics/reporters/reportSessionException.d.ts +1 -1
- package/lib/metrics/reporters/reporters.d.ts +1 -1
- package/lib/persistence/ExpiringPersistence.js +3 -4
- package/lib/persistence/ExpiringPersistence.js.map +1 -1
- package/lib/platform/platformCapabilities.js +2 -1
- package/lib/platform/platformCapabilities.js.map +1 -1
- package/lib/platform/platformInfo.js +1 -1
- package/lib/platform/platformInfo.js.map +1 -1
- package/lib/remote-configuration/cofHandler.d.ts +1 -0
- package/lib/remote-configuration/cofHandler.js +61 -50
- package/lib/remote-configuration/cofHandler.js.map +1 -1
- package/lib/session/CameraKitSession.d.ts +9 -11
- package/lib/session/CameraKitSession.js +22 -18
- package/lib/session/CameraKitSession.js.map +1 -1
- package/lib/session/CameraKitSessionEvents.d.ts +1 -1
- package/lib/session/CameraKitSessionEvents.js.map +1 -1
- package/lib/session/LensKeyboard.d.ts +7 -1
- package/lib/session/lensState.d.ts +3 -3
- package/lib/session/lensState.js +40 -15
- package/lib/session/lensState.js.map +1 -1
- package/package.json +1 -1
- package/docs/html/classes/LensSources.html +0 -160
- package/docs/html/types/LensLaunchParams.html +0 -115
- package/docs/md/classes/LensSources.md +0 -29
- package/lib/common/any.d.ts +0 -19
- package/lib/common/any.js +0 -53
- package/lib/common/any.js.map +0 -1
- package/lib/extensions/LensSources.d.ts +0 -58
- package/lib/extensions/LensSources.js +0 -54
- package/lib/extensions/LensSources.js.map +0 -1
- package/lib/lens/LensLaunchParams.d.ts +0 -19
- package/lib/lens/LensLaunchParams.js +0 -40
- package/lib/lens/LensLaunchParams.js.map +0 -1
- package/lib/lens/index.d.ts +0 -7
- package/lib/lens/index.js +0 -7
- package/lib/lens/index.js.map +0 -1
- package/lib/lens/lensEnvelopeUtil.d.ts +0 -5
- package/lib/lens/lensEnvelopeUtil.js +0 -19
- package/lib/lens/lensEnvelopeUtil.js.map +0 -1
- package/lib/lens/lensHttpUtil.d.ts +0 -5
- package/lib/lens/lensHttpUtil.js +0 -52
- package/lib/lens/lensHttpUtil.js.map +0 -1
|
@@ -10,7 +10,7 @@ import { LensCore } from "../lens-core-module/lensCore";
|
|
|
10
10
|
import { metricsEventTargetFactory } from "../metrics/metricsEventTarget";
|
|
11
11
|
import { metricsHandlerFactory } from "../metrics/metricsHandler";
|
|
12
12
|
import { operationalMetricReporterFactory } from "../metrics/operational/operationalMetricsReporter";
|
|
13
|
-
import { lensSourcesFactory } from "../
|
|
13
|
+
import { lensSourcesFactory } from "../lens/LensSource";
|
|
14
14
|
import { uriHandlersFactory } from "../extensions/UriHandlers";
|
|
15
15
|
import { lensPersistenceStoreFactory } from "../lens/LensPersistenceStore";
|
|
16
16
|
import { cofHandlerFactory } from "../remote-configuration/cofHandler";
|
|
@@ -21,8 +21,10 @@ import { legalPromptFactory } from "../legal/legalPrompt";
|
|
|
21
21
|
import { logEntriesFactory } from "../logger/logEntries";
|
|
22
22
|
import { reportGlobalException } from "../metrics/reporters/reportGlobalException";
|
|
23
23
|
import { requestStateEventTargetFactory } from "../handlers/requestStateEmittingHandler";
|
|
24
|
+
import { lensesClientFactory } from "../clients/lensesClient";
|
|
24
25
|
import { pageVisibilityFactory } from "../common/pageVisibility";
|
|
25
26
|
import { remoteApiServicesFactory } from "../extensions/RemoteApiServices";
|
|
27
|
+
import { gprcHandlerFactory } from "../clients/grpcHandler";
|
|
26
28
|
import { ServicesFromInjectables } from "./types";
|
|
27
29
|
/**
|
|
28
30
|
* All services available to be customized by client app.
|
|
@@ -54,6 +56,8 @@ export type RootServices = {
|
|
|
54
56
|
typeof metricsEventTargetFactory,
|
|
55
57
|
typeof requestStateEventTargetFactory,
|
|
56
58
|
typeof cameraKitServiceFetchHandlerFactory,
|
|
59
|
+
typeof gprcHandlerFactory,
|
|
60
|
+
typeof lensesClientFactory,
|
|
57
61
|
typeof cofHandlerFactory,
|
|
58
62
|
typeof remoteConfigurationFactory,
|
|
59
63
|
typeof lensRepositoryFactory,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootServices.js","sourceRoot":"","sources":["../../src/dependency-injection/RootServices.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC","sourcesContent":["import { lensRepositoryFactory } from \"../lens/LensRepository\";\nimport { lensCoreFactory } from \"../lens-core-module/loader/lensCoreFactory\";\nimport { remoteMediaAssetLoaderFactory } from \"../lens/assets/remoteMediaAssetLoaderFactory\";\nimport { deviceDependentAssetLoaderFactory } from \"../lens/assets/deviceDependentAssetLoader\";\nimport { staticAssetLoaderFactory } from \"../lens/assets/staticAssetLoader\";\nimport { defaultFetchHandlerFactory } from \"../handlers/defaultFetchHandler\";\nimport { cameraKitServiceFetchHandlerFactory } from \"../handlers/cameraKitServiceFetchHandlerFactory\";\nimport { createCameraKitConfigurationFactory } from \"../configuration\";\nimport { LensCore } from \"../lens-core-module/lensCore\";\nimport { metricsEventTargetFactory } from \"../metrics/metricsEventTarget\";\nimport { metricsHandlerFactory } from \"../metrics/metricsHandler\";\nimport { operationalMetricReporterFactory } from \"../metrics/operational/operationalMetricsReporter\";\nimport { lensSourcesFactory } from \"../
|
|
1
|
+
{"version":3,"file":"RootServices.js","sourceRoot":"","sources":["../../src/dependency-injection/RootServices.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC","sourcesContent":["import { lensRepositoryFactory } from \"../lens/LensRepository\";\nimport { lensCoreFactory } from \"../lens-core-module/loader/lensCoreFactory\";\nimport { remoteMediaAssetLoaderFactory } from \"../lens/assets/remoteMediaAssetLoaderFactory\";\nimport { deviceDependentAssetLoaderFactory } from \"../lens/assets/deviceDependentAssetLoader\";\nimport { staticAssetLoaderFactory } from \"../lens/assets/staticAssetLoader\";\nimport { defaultFetchHandlerFactory } from \"../handlers/defaultFetchHandler\";\nimport { cameraKitServiceFetchHandlerFactory } from \"../handlers/cameraKitServiceFetchHandlerFactory\";\nimport { createCameraKitConfigurationFactory } from \"../configuration\";\nimport { LensCore } from \"../lens-core-module/lensCore\";\nimport { metricsEventTargetFactory } from \"../metrics/metricsEventTarget\";\nimport { metricsHandlerFactory } from \"../metrics/metricsHandler\";\nimport { operationalMetricReporterFactory } from \"../metrics/operational/operationalMetricsReporter\";\nimport { lensSourcesFactory } from \"../lens/LensSource\";\nimport { uriHandlersFactory } from \"../extensions/UriHandlers\";\nimport { lensPersistenceStoreFactory } from \"../lens/LensPersistenceStore\";\nimport { cofHandlerFactory } from \"../remote-configuration/cofHandler\";\nimport { remoteConfigurationFactory } from \"../remote-configuration/remoteConfiguration\";\nimport { lensAssetRepositoryFactory } from \"../lens/assets/LensAssetRepository\";\nimport { legalStateFactory } from \"../legal/legalState\";\nimport { legalPromptFactory } from \"../legal/legalPrompt\";\nimport { logEntriesFactory } from \"../logger/logEntries\";\nimport { reportGlobalException } from \"../metrics/reporters/reportGlobalException\";\nimport { requestStateEventTargetFactory } from \"../handlers/requestStateEmittingHandler\";\nimport { lensesClientFactory } from \"../clients/lensesClient\";\nimport { pageVisibilityFactory } from \"../common/pageVisibility\";\nimport { remoteApiServicesFactory } from \"../extensions/RemoteApiServices\";\nimport { gprcHandlerFactory } from \"../clients/grpcHandler\";\nimport { ServicesFromInjectables } from \"./types\";\n\n/**\n * All services available to be customized by client app.\n */\nexport type PublicServices = ServicesFromInjectables<\n [\n ReturnType<typeof createCameraKitConfigurationFactory>,\n typeof pageVisibilityFactory,\n typeof defaultFetchHandlerFactory,\n typeof remoteMediaAssetLoaderFactory,\n typeof lensSourcesFactory,\n typeof remoteApiServicesFactory,\n typeof uriHandlersFactory\n ]\n>;\n\n/**\n * Define all the Services contained in CameraKit's root dependency injection container.\n *\n * Note: we do end up defining this list of Services twice (once here to create the type, once when we actually\n * create the Container inside the `bootstrapCameraKit` function). We could avoid doing this and just infer the\n * RootContainer type from the constructed container – but since we can only do that *inside* `bootstrapCameraKit`, it\n * makes it more awkward to provide a type for the `provide` user-supplied function (or use the type elsewhere, like in\n * CameraKitSession).\n *\n * There may be a way to eliminate this extra boilerplate, but for now it's required in order to present a cleaner\n * `bootstrapCameraKit` API to applications.\n */\nexport type RootServices = {\n // bootstrapCameraKit replaces the lensCoreFactory token's value with the resolved LensCore (rather than the\n // Promise of the LensCore), so we need to do the same re-mapping here.\n [lensCoreFactory.token]: LensCore;\n} & PublicServices &\n ServicesFromInjectables<\n [\n typeof metricsEventTargetFactory,\n typeof requestStateEventTargetFactory,\n typeof cameraKitServiceFetchHandlerFactory,\n typeof gprcHandlerFactory,\n typeof lensesClientFactory,\n typeof cofHandlerFactory,\n typeof remoteConfigurationFactory,\n typeof lensRepositoryFactory,\n typeof lensPersistenceStoreFactory,\n typeof metricsHandlerFactory,\n typeof operationalMetricReporterFactory,\n typeof lensAssetRepositoryFactory,\n typeof deviceDependentAssetLoaderFactory,\n typeof staticAssetLoaderFactory,\n typeof legalStateFactory,\n typeof legalPromptFactory,\n typeof logEntriesFactory,\n typeof reportGlobalException\n ]\n >;\n"]}
|
package/lib/environment.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "PACKAGE_VERSION": "0.
|
|
1
|
+
{ "PACKAGE_VERSION": "0.15.0-alpha.1" }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResponseCode } from "../generated-proto/pb_schema/lenses/remote_api/remote_api_service";
|
|
2
|
-
import { LensRepository } from "../lens";
|
|
2
|
+
import { LensRepository } from "../lens/LensRepository";
|
|
3
3
|
import { Lens } from "../lens/Lens";
|
|
4
4
|
import { LensState } from "../session/lensState";
|
|
5
5
|
import { SessionState } from "../session/sessionState";
|
|
@@ -4,7 +4,6 @@ import { Injectable } from "../dependency-injection/Injectable";
|
|
|
4
4
|
import { RemoteApiInfo } from "../generated-proto/pb_schema/camera_kit/v3/features/remote_api_info";
|
|
5
5
|
import { ResponseCode, responseCodeToNumber } from "../generated-proto/pb_schema/lenses/remote_api/remote_api_service";
|
|
6
6
|
import { getLogger } from "../logger/logger";
|
|
7
|
-
import { knownAnyTypes } from "../common/any";
|
|
8
7
|
import { extractSchemeAndRoute } from "./UriHandlers";
|
|
9
8
|
// NOTE: There's potential for overloads when reporting metrics if reporting is triggered on each frame,
|
|
10
9
|
// (i.e., when the lens sends Remote API requests every frame).
|
|
@@ -21,6 +20,7 @@ const logger = getLogger("RemoteApiServices");
|
|
|
21
20
|
const uriResponseOkCode = 200;
|
|
22
21
|
const apiResponseStatusHeader = ":sc_lens_api_status";
|
|
23
22
|
const apiBinaryContentType = "application/octet-stream";
|
|
23
|
+
const remoteApiInfoProtobufTypeUrl = "type.googleapis.com/com.snap.camerakit.v3.features.RemoteApiInfo";
|
|
24
24
|
const statusToResponseCodeMap = {
|
|
25
25
|
success: ResponseCode.SUCCESS,
|
|
26
26
|
redirected: ResponseCode.REDIRECTED,
|
|
@@ -90,7 +90,7 @@ export function getRemoteApiUriHandler(registeredServices, sessionState, lensSta
|
|
|
90
90
|
cancellationHandlers: new Map(),
|
|
91
91
|
// Parse lens metadata to obtain supported Remote API specs.
|
|
92
92
|
supportedSpecIds: new Set(((_b = (_a = lensRepository.getLensMetadata(lensId)) === null || _a === void 0 ? void 0 : _a.featureMetadata) !== null && _b !== void 0 ? _b : [])
|
|
93
|
-
.filter((feature) => feature.typeUrl ===
|
|
93
|
+
.filter((feature) => feature.typeUrl === remoteApiInfoProtobufTypeUrl)
|
|
94
94
|
.flatMap((any) => RemoteApiInfo.decode(any.value).apiSpecIds)),
|
|
95
95
|
});
|
|
96
96
|
}
|
|
@@ -123,8 +123,8 @@ export function getRemoteApiUriHandler(registeredServices, sessionState, lensSta
|
|
|
123
123
|
try {
|
|
124
124
|
requestHandler = service.getRequestHandler(remoteApiRequest, uriRequest.lens);
|
|
125
125
|
}
|
|
126
|
-
catch (
|
|
127
|
-
logger.warn("Client's Remote API request handler factory threw an error.");
|
|
126
|
+
catch (error) {
|
|
127
|
+
logger.warn("Client's Remote API request handler factory threw an error.", error);
|
|
128
128
|
}
|
|
129
129
|
if (requestHandler) {
|
|
130
130
|
reporter.count("lens_remote-api_handled-requests", 1, dimensions);
|
|
@@ -146,15 +146,15 @@ export function getRemoteApiUriHandler(registeredServices, sessionState, lensSta
|
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
catch (error) {
|
|
149
|
-
logger.warn("Client's Remote API request handler threw an error.");
|
|
149
|
+
logger.warn("Client's Remote API request handler threw an error.", error);
|
|
150
150
|
}
|
|
151
151
|
if (typeof cancellationHandler === "function") {
|
|
152
152
|
requestState.cancellationHandlers.set(uriRequest.request.identifier, () => {
|
|
153
153
|
try {
|
|
154
154
|
cancellationHandler();
|
|
155
155
|
}
|
|
156
|
-
catch (
|
|
157
|
-
logger.warn("Client's Remote API request cancellation handler threw an error.");
|
|
156
|
+
catch (error) {
|
|
157
|
+
logger.warn("Client's Remote API request cancellation handler threw an error.", error);
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
160
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteApiServices.js","sourceRoot":"","sources":["../../src/extensions/RemoteApiServices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mEAAmE,CAAC;AAKvH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG9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CAAC,oBAAoB,EAAE,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;SAC/E;IACL,CAAC,CAAC,CACL,CAAC;IAEF,KAAK,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,sBAAsB,CAAC;SAC7D,IAAI,CACD,UAAU,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE;QAC7B,oFAAoF;QACpF,4DAA4D;QAC5D,iDAAiD;QACjD,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACpB,QAAQ,CAAC,KAAK,CAAC,wBAAwB,EAAE,CAAC,CAAC,CAAC;QAC5C,sFAAsF;QACtF,OAAO,UAAU,CAAC;IACtB,CAAC,CAAC;IACF,2CAA2C;IAC3C,gEAAgE;IAChE,KAAK,EAAE,EACP,SAAS,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAC7D;SACA,SAAS,CAAC;QACP,QAAQ,EAAE,GAAG,EAAE,CAAC,wBAAwB,CAAC,gBAAgB,EAAE,GAAG,gBAAgB,CAAC,IAAI,EAAE,CAAC;KACzF,CAAC,CAAC;IAEP,OAAO;QACH,GAAG,EAAE,oCAAoC;QAEzC,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI;YAC9B,WAAW,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/C,CAAC;QAED,aAAa,CAAC,OAAO,EAAE,IAAI;YACvB,iBAAiB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9C,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["import { Subject, catchError, filter, map, merge, retry, takeUntil, tap } from \"rxjs\";\nimport { forActions } from \"@snap/state-management\";\nimport { Injectable } from \"../dependency-injection/Injectable\";\nimport { RemoteApiInfo } from \"../generated-proto/pb_schema/camera_kit/v3/features/remote_api_info\";\nimport { ResponseCode, responseCodeToNumber } from \"../generated-proto/pb_schema/lenses/remote_api/remote_api_service\";\nimport { LensRepository } from \"../lens\";\nimport { Lens } from \"../lens/Lens\";\nimport { LensState } from \"../session/lensState\";\nimport { SessionState } from \"../session/sessionState\";\nimport { getLogger } from \"../logger/logger\";\nimport { knownAnyTypes } from \"../common/any\";\nimport { CamelToSnakeCase, SnakeToCamelCase } from \"../common/types\";\nimport { OperationalMetricsReporter } from \"../metrics/operational/operationalMetricsReporter\";\nimport { UriCancelRequest, UriHandler, UriRequest, UriResponse, extractSchemeAndRoute } from \"./UriHandlers\";\n\n// NOTE: There's potential for overloads when reporting metrics if reporting is triggered on each frame,\n// (i.e., when the lens sends Remote API requests every frame).\n// As of now, this isn't a concern because src/metrics/operational/operationalMetricsReporter.ts aggregates\n// \"count\" metrics into a single metric within a batch, and the Remote API service currently\n// reports only \"count\" metrics. For instance, if 30 metrics with the same name are generated per second,\n// given the current bundle size of 100 operational metrics, there will be one metrics report approximately\n// every 3.3 seconds.\n// In the future, if we opt to report \"histogram\" or other metric types, they must be approached with caution:\n// either the operationalMetricsReporter should be enhanced to aggregate such metrics,\n// or the Remote API service should manage it directly.\n// Mobiles ticket: https://jira.sc-corp.net/browse/CAMKIT-3092\n\nconst logger = getLogger(\"RemoteApiServices\");\n\nconst uriResponseOkCode = 200;\nconst apiResponseStatusHeader = \":sc_lens_api_status\";\nconst apiBinaryContentType = \"application/octet-stream\";\n\nconst statusToResponseCodeMap = {\n success: ResponseCode.SUCCESS,\n redirected: ResponseCode.REDIRECTED,\n badRequest: ResponseCode.BAD_REQUEST,\n accessDenied: ResponseCode.ACCESS_DENIED,\n notFound: ResponseCode.NOT_FOUND,\n timeout: ResponseCode.TIMEOUT,\n requestTooLarge: ResponseCode.REQUEST_TOO_LARGE,\n serverError: ResponseCode.SERVER_ERROR,\n cancelled: ResponseCode.CANCELLED,\n proxyError: ResponseCode.PROXY_ERROR,\n} satisfies { [Status in RemoteApiStatusInternal]: Uppercase<CamelToSnakeCase<Status>> };\n\ntype RemoteApiStatusInternal = SnakeToCamelCase<\n Lowercase<Exclude<keyof typeof ResponseCode, \"RESPONSE_CODE_UNSET\" | \"UNRECOGNIZED\">>\n>;\n\ntype LensId = string;\ntype RequestId = string;\n\ntype UriRequestEvent = {\n request: UriRequest;\n reply: (response: UriResponse) => void;\n lens: Lens;\n};\n\ntype UriCancelRequestEvent = {\n request: UriCancelRequest;\n lens: Lens;\n};\n\ninterface LensRequestState {\n cancellationHandlers: Map<RequestId, RemoteApiCancelRequestHandler>;\n supportedSpecIds: Set<string>;\n}\n\n/**\n * Invokes the cancellation handler associated with the provided key and removes it from the collection of handlers.\n */\nfunction callCancellationHandler(\n cancellationHandlers: Map<RequestId, RemoteApiCancelRequestHandler>,\n ...keys: RequestId[]\n) {\n for (const key of keys) {\n cancellationHandlers.get(key)?.();\n cancellationHandlers.delete(key);\n }\n}\n\n/**\n * Removes the specified lenses' metadata from the cache and invokes their cancellation callbacks.\n *\n * @param lensRequestState The state representing the lens cache.\n * @param lensIds An array of lens IDs to be removed from the cache\n * and for which the cancellation callbacks will be invoked.\n */\nfunction handleLensApplicationEnd(lensRequestState: Map<LensId, LensRequestState>, ...lensIds: LensId[]) {\n for (const lensId of lensIds) {\n const state = lensRequestState.get(lensId);\n if (state) {\n callCancellationHandler(state.cancellationHandlers, ...state.cancellationHandlers.keys());\n lensRequestState.delete(lensId);\n }\n }\n}\n\n/**\n * Status of a Remote API response.\n */\nexport type RemoteApiStatus = keyof typeof statusToResponseCodeMap;\n\n/**\n * Remote API request sent by a lens.\n */\nexport interface RemoteApiRequest {\n /**\n * Unique id of the remote API service specification.\n */\n apiSpecId: string;\n /**\n * Unique id of the remote API service endpoint requested by this request.\n */\n endpointId: string;\n /**\n * A map of named parameters associated with the request.\n */\n parameters: Record<string, string>;\n /**\n * Additional binary request payload.\n */\n body: ArrayBuffer;\n}\n\n/**\n * Remote API response to a request sent by a lens.\n */\nexport interface RemoteApiResponse {\n /**\n * Status of the response\n */\n status: RemoteApiStatus;\n /**\n * A map of named metadata associated with the response.\n */\n metadata: Record<string, string>;\n /**\n * Additional binary request payload.\n */\n body: ArrayBuffer;\n}\n\n/**\n * Represents a Remote API request cancellation handler function.\n */\nexport type RemoteApiCancelRequestHandler = () => void;\n\n/**\n * Represents a Remote API request handler function.\n * It is provided with a reply callback that must be invoked to send a response back to the lens.\n * The reply callback can be invoked multiple times if needed.\n * Additionally, the handler can return a cancellation callback, which is triggered when the lens cancels the request.\n */\nexport type RemoteApiRequestHandler = (\n reply: (response: RemoteApiResponse) => void\n) => RemoteApiCancelRequestHandler | void;\n\n/**\n * Service to handle a lens Remote API request.\n */\nexport interface RemoteApiService {\n /**\n * Remote API spec ID(s).\n */\n apiSpecId: string;\n\n /**\n * This method is called by Camera Kit when a lens triggers a Remote API request with a corresponding spec ID.\n * If the service can handle the request, the method returns a request handler; otherwise, it returns nothing.\n * @param request Remote API request object.\n * @param lens Lens that trigges the request.\n * @returns A request handler if applicable.\n */\n getRequestHandler(request: RemoteApiRequest, lens: Lens): RemoteApiRequestHandler | undefined;\n}\n\nexport type RemoteApiServices = RemoteApiService[];\n\nexport const remoteApiServicesFactory = Injectable(\"remoteApiServices\", () => {\n const remoteApiServices: RemoteApiServices = [];\n return remoteApiServices;\n});\n\n/**\n * Provides a URI handler that searches for a match within the provided services to handle Remote API requests,\n * i.e., those whose URI starts with 'app://remote-api/performApiRequest'.\n */\nexport function getRemoteApiUriHandler(\n registeredServices: RemoteApiService[],\n sessionState: SessionState,\n lensState: LensState,\n lensRepository: LensRepository,\n reporter: OperationalMetricsReporter\n): UriHandler {\n // Groups services by spec ID for faster lookups.\n const registeredServiceMap = new Map<string, RemoteApiService[]>();\n for (const service of registeredServices) {\n const existingServices = registeredServiceMap.get(service.apiSpecId) || [];\n registeredServiceMap.set(service.apiSpecId, [...existingServices, service]);\n }\n\n const uriRequests = new Subject<UriRequestEvent>();\n const uriCancelRequests = new Subject<UriCancelRequestEvent>();\n const lensRequestState = new Map<LensId, LensRequestState>();\n\n const lensTurnOffEvents = lensState.events.pipe(\n forActions(\"turnedOff\"),\n\n tap(([action]) => handleLensApplicationEnd(lensRequestState, action.data.id))\n );\n\n const uriRequestEvents = uriRequests.pipe(\n map((uriRequest) => {\n const lensId = uriRequest.lens.id;\n\n if (!lensRequestState.has(lensId)) {\n lensRequestState.set(lensId, {\n // Prepares a collection to store cancellation handlers.\n // A specific handler will be invoked when a cancellation request is issued by the lens.\n // All handlers will be invoked when the lens is replaced with another one or the session\n // is destroyed.\n cancellationHandlers: new Map(),\n // Parse lens metadata to obtain supported Remote API specs.\n supportedSpecIds: new Set(\n (lensRepository.getLensMetadata(lensId)?.featureMetadata ?? [])\n .filter((feature) => feature.typeUrl === knownAnyTypes.remoteApiInfo)\n .flatMap((any) => RemoteApiInfo.decode(any.value).apiSpecIds)\n ),\n });\n }\n const requestState = lensRequestState.get(lensId)!;\n\n // Extracts the spec ID and endpoint ID from the provided Remote API request URI.\n // The given URI is expected to conform to the following specification:\n // eslint-disable-next-line max-len\n // https://docs.google.com/document/d/18fbGYDhD2N_aMTe4ZLY4QKeCSoMeJuklG28TutDzLZc/edit#bookmark=id.p2y39gwgbm4g\n const { route } = extractSchemeAndRoute(uriRequest.request.uri);\n const [specId, endpointIdWithQuery] = route.split(\"/\").slice(2);\n const [endpointId] = endpointIdWithQuery.split(\"?\");\n\n return { uriRequest, specId, endpointId, requestState };\n }),\n\n // only handle requests for API spec ID that current lens supports\n filter(({ specId, requestState }) => requestState.supportedSpecIds.has(specId)),\n\n // only handle requests if we have a registered service for it\n filter(({ specId }) => registeredServiceMap.has(specId)),\n\n map(({ uriRequest, specId, endpointId, requestState }) => {\n const dimensions = new Map([[\"specId\", specId]]);\n reporter.count(\"lens_remote-api_requests\", 1, dimensions);\n\n const remoteApiRequest: RemoteApiRequest = {\n apiSpecId: specId,\n body: uriRequest.request.data,\n endpointId,\n parameters: uriRequest.request.metadata,\n };\n\n // Looks for the first Remote API request handler.\n for (const service of registeredServiceMap.get(specId) ?? []) {\n let requestHandler: RemoteApiRequestHandler | undefined = undefined;\n try {\n requestHandler = service.getRequestHandler(remoteApiRequest, uriRequest.lens);\n } catch {\n logger.warn(\"Client's Remote API request handler factory threw an error.\");\n }\n\n if (requestHandler) {\n reporter.count(\"lens_remote-api_handled-requests\", 1, dimensions);\n\n let cancellationHandler: RemoteApiCancelRequestHandler | void = undefined;\n try {\n // Calls client's Remote API handler to process the request.\n cancellationHandler = requestHandler((response) => {\n reporter.count(\"lens_remote-api_responses\", 1, dimensions);\n\n const responseCode = statusToResponseCodeMap[response.status] ?? ResponseCode.UNRECOGNIZED;\n const uriResponse: UriResponse = {\n code: uriResponseOkCode,\n description: \"\",\n contentType: apiBinaryContentType,\n data: response.body,\n metadata: {\n ...response.metadata,\n [apiResponseStatusHeader]: responseCodeToNumber(responseCode).toString(),\n },\n };\n uriRequest.reply(uriResponse);\n });\n } catch (error) {\n logger.warn(\"Client's Remote API request handler threw an error.\");\n }\n\n if (typeof cancellationHandler === \"function\") {\n requestState.cancellationHandlers.set(uriRequest.request.identifier, () => {\n try {\n cancellationHandler!();\n } catch {\n logger.warn(\"Client's Remote API request cancellation handler threw an error.\");\n }\n });\n }\n\n break;\n }\n }\n })\n );\n\n const uriCancelRequestEvents = uriCancelRequests.pipe(\n tap((uriRequest) => {\n const cancellationHandlers = lensRequestState.get(uriRequest.lens.id)?.cancellationHandlers;\n if (cancellationHandlers) {\n callCancellationHandler(cancellationHandlers, uriRequest.request.requestId);\n }\n })\n );\n\n merge(lensTurnOffEvents, uriRequestEvents, uriCancelRequestEvents)\n .pipe(\n catchError((error, sourcePipe) => {\n // The expectation is that if an error occurs, it happens in our own implementation,\n // because app callbacks are wrapped with try..catch blocks.\n // Therefore, we would like to report this error.\n logger.error(error);\n reporter.count(\"lens_remote-api_errors\", 1);\n // Return the source pipe so that we can retry the pipe instead of just completing it.\n return sourcePipe;\n }),\n // When the pipe completes due to an error,\n // we want to resubscribe to the original pipe to keep it alive.\n retry(),\n takeUntil(sessionState.events.pipe(forActions(\"destroy\")))\n )\n .subscribe({\n complete: () => handleLensApplicationEnd(lensRequestState, ...lensRequestState.keys()),\n });\n\n return {\n uri: \"app://remote-api/performApiRequest\",\n\n handleRequest(request, reply, lens) {\n uriRequests.next({ request, reply, lens });\n },\n\n cancelRequest(request, lens) {\n uriCancelRequests.next({ request, lens });\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RemoteApiServices.js","sourceRoot":"","sources":["../../src/extensions/RemoteApiServices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mEAAmE,CAAC;AAKvH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,OAAO,EAAyD,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE7G,wGAAwG;AACxG,+DAA+D;AAC/D,2GAA2G;AAC3G,4FAA4F;AAC5F,yGAAyG;AACzG,2GAA2G;AAC3G,qBAAqB;AACrB,8GAA8G;AAC9G,sFAAsF;AACtF,uDAAuD;AACvD,8DAA8D;AAE9D,MAAM,MAAM,GAAG,SAAS,CAAC,mBAAmB,CAAC,CAAC;AAE9C,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AACtD,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AACxD,MAAM,4BAA4B,GAAG,kEAAkE,CAAC;AAExG,MAAM,uBAAuB,GAAG;IAC5B,OAAO,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QAC5C,sFAAsF;QACtF,OAAO,UAAU,CAAC;IACtB,CAAC,CAAC;IACF,2CAA2C;IAC3C,gEAAgE;IAChE,KAAK,EAAE,EACP,SAAS,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAC7D;SACA,SAAS,CAAC;QACP,QAAQ,EAAE,GAAG,EAAE,CAAC,wBAAwB,CAAC,gBAAgB,EAAE,GAAG,gBAAgB,CAAC,IAAI,EAAE,CAAC;KACzF,CAAC,CAAC;IAEP,OAAO;QACH,GAAG,EAAE,oCAAoC;QAEzC,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI;YAC9B,WAAW,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/C,CAAC;QAED,aAAa,CAAC,OAAO,EAAE,IAAI;YACvB,iBAAiB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9C,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["import { Subject, catchError, filter, map, merge, retry, takeUntil, tap } from \"rxjs\";\nimport { forActions } from \"@snap/state-management\";\nimport { Injectable } from \"../dependency-injection/Injectable\";\nimport { RemoteApiInfo } from \"../generated-proto/pb_schema/camera_kit/v3/features/remote_api_info\";\nimport { ResponseCode, responseCodeToNumber } from \"../generated-proto/pb_schema/lenses/remote_api/remote_api_service\";\nimport { LensRepository } from \"../lens/LensRepository\";\nimport { Lens } from \"../lens/Lens\";\nimport { LensState } from \"../session/lensState\";\nimport { SessionState } from \"../session/sessionState\";\nimport { getLogger } from \"../logger/logger\";\nimport { CamelToSnakeCase, SnakeToCamelCase } from \"../common/types\";\nimport { OperationalMetricsReporter } from \"../metrics/operational/operationalMetricsReporter\";\nimport { UriCancelRequest, UriHandler, UriRequest, UriResponse, extractSchemeAndRoute } from \"./UriHandlers\";\n\n// NOTE: There's potential for overloads when reporting metrics if reporting is triggered on each frame,\n// (i.e., when the lens sends Remote API requests every frame).\n// As of now, this isn't a concern because src/metrics/operational/operationalMetricsReporter.ts aggregates\n// \"count\" metrics into a single metric within a batch, and the Remote API service currently\n// reports only \"count\" metrics. For instance, if 30 metrics with the same name are generated per second,\n// given the current bundle size of 100 operational metrics, there will be one metrics report approximately\n// every 3.3 seconds.\n// In the future, if we opt to report \"histogram\" or other metric types, they must be approached with caution:\n// either the operationalMetricsReporter should be enhanced to aggregate such metrics,\n// or the Remote API service should manage it directly.\n// Mobiles ticket: https://jira.sc-corp.net/browse/CAMKIT-3092\n\nconst logger = getLogger(\"RemoteApiServices\");\n\nconst uriResponseOkCode = 200;\nconst apiResponseStatusHeader = \":sc_lens_api_status\";\nconst apiBinaryContentType = \"application/octet-stream\";\nconst remoteApiInfoProtobufTypeUrl = \"type.googleapis.com/com.snap.camerakit.v3.features.RemoteApiInfo\";\n\nconst statusToResponseCodeMap = {\n success: ResponseCode.SUCCESS,\n redirected: ResponseCode.REDIRECTED,\n badRequest: ResponseCode.BAD_REQUEST,\n accessDenied: ResponseCode.ACCESS_DENIED,\n notFound: ResponseCode.NOT_FOUND,\n timeout: ResponseCode.TIMEOUT,\n requestTooLarge: ResponseCode.REQUEST_TOO_LARGE,\n serverError: ResponseCode.SERVER_ERROR,\n cancelled: ResponseCode.CANCELLED,\n proxyError: ResponseCode.PROXY_ERROR,\n} satisfies { [Status in RemoteApiStatusInternal]: Uppercase<CamelToSnakeCase<Status>> };\n\ntype RemoteApiStatusInternal = SnakeToCamelCase<\n Lowercase<Exclude<keyof typeof ResponseCode, \"RESPONSE_CODE_UNSET\" | \"UNRECOGNIZED\">>\n>;\n\ntype LensId = string;\ntype RequestId = string;\n\ntype UriRequestEvent = {\n request: UriRequest;\n reply: (response: UriResponse) => void;\n lens: Lens;\n};\n\ntype UriCancelRequestEvent = {\n request: UriCancelRequest;\n lens: Lens;\n};\n\ninterface LensRequestState {\n cancellationHandlers: Map<RequestId, RemoteApiCancelRequestHandler>;\n supportedSpecIds: Set<string>;\n}\n\n/**\n * Invokes the cancellation handler associated with the provided key and removes it from the collection of handlers.\n */\nfunction callCancellationHandler(\n cancellationHandlers: Map<RequestId, RemoteApiCancelRequestHandler>,\n ...keys: RequestId[]\n) {\n for (const key of keys) {\n cancellationHandlers.get(key)?.();\n cancellationHandlers.delete(key);\n }\n}\n\n/**\n * Removes the specified lenses' metadata from the cache and invokes their cancellation callbacks.\n *\n * @param lensRequestState The state representing the lens cache.\n * @param lensIds An array of lens IDs to be removed from the cache\n * and for which the cancellation callbacks will be invoked.\n */\nfunction handleLensApplicationEnd(lensRequestState: Map<LensId, LensRequestState>, ...lensIds: LensId[]) {\n for (const lensId of lensIds) {\n const state = lensRequestState.get(lensId);\n if (state) {\n callCancellationHandler(state.cancellationHandlers, ...state.cancellationHandlers.keys());\n lensRequestState.delete(lensId);\n }\n }\n}\n\n/**\n * Status of a Remote API response.\n */\nexport type RemoteApiStatus = keyof typeof statusToResponseCodeMap;\n\n/**\n * Remote API request sent by a lens.\n */\nexport interface RemoteApiRequest {\n /**\n * Unique id of the remote API service specification.\n */\n apiSpecId: string;\n /**\n * Unique id of the remote API service endpoint requested by this request.\n */\n endpointId: string;\n /**\n * A map of named parameters associated with the request.\n */\n parameters: Record<string, string>;\n /**\n * Additional binary request payload.\n */\n body: ArrayBuffer;\n}\n\n/**\n * Remote API response to a request sent by a lens.\n */\nexport interface RemoteApiResponse {\n /**\n * Status of the response\n */\n status: RemoteApiStatus;\n /**\n * A map of named metadata associated with the response.\n */\n metadata: Record<string, string>;\n /**\n * Additional binary request payload.\n */\n body: ArrayBuffer;\n}\n\n/**\n * Represents a Remote API request cancellation handler function.\n */\nexport type RemoteApiCancelRequestHandler = () => void;\n\n/**\n * Represents a Remote API request handler function.\n * It is provided with a reply callback that must be invoked to send a response back to the lens.\n * The reply callback can be invoked multiple times if needed.\n * Additionally, the handler can return a cancellation callback, which is triggered when the lens cancels the request.\n */\nexport type RemoteApiRequestHandler = (\n reply: (response: RemoteApiResponse) => void\n) => RemoteApiCancelRequestHandler | void;\n\n/**\n * Service to handle a lens Remote API request.\n */\nexport interface RemoteApiService {\n /**\n * Remote API spec ID(s).\n */\n apiSpecId: string;\n\n /**\n * This method is called by Camera Kit when a lens triggers a Remote API request with a corresponding spec ID.\n * If the service can handle the request, the method returns a request handler; otherwise, it returns nothing.\n * @param request Remote API request object.\n * @param lens Lens that trigges the request.\n * @returns A request handler if applicable.\n */\n getRequestHandler(request: RemoteApiRequest, lens: Lens): RemoteApiRequestHandler | undefined;\n}\n\nexport type RemoteApiServices = RemoteApiService[];\n\nexport const remoteApiServicesFactory = Injectable(\"remoteApiServices\", () => {\n const remoteApiServices: RemoteApiServices = [];\n return remoteApiServices;\n});\n\n/**\n * Provides a URI handler that searches for a match within the provided services to handle Remote API requests,\n * i.e., those whose URI starts with 'app://remote-api/performApiRequest'.\n */\nexport function getRemoteApiUriHandler(\n registeredServices: RemoteApiService[],\n sessionState: SessionState,\n lensState: LensState,\n lensRepository: LensRepository,\n reporter: OperationalMetricsReporter\n): UriHandler {\n // Groups services by spec ID for faster lookups.\n const registeredServiceMap = new Map<string, RemoteApiService[]>();\n for (const service of registeredServices) {\n const existingServices = registeredServiceMap.get(service.apiSpecId) || [];\n registeredServiceMap.set(service.apiSpecId, [...existingServices, service]);\n }\n\n const uriRequests = new Subject<UriRequestEvent>();\n const uriCancelRequests = new Subject<UriCancelRequestEvent>();\n const lensRequestState = new Map<LensId, LensRequestState>();\n\n const lensTurnOffEvents = lensState.events.pipe(\n forActions(\"turnedOff\"),\n\n tap(([action]) => handleLensApplicationEnd(lensRequestState, action.data.id))\n );\n\n const uriRequestEvents = uriRequests.pipe(\n map((uriRequest) => {\n const lensId = uriRequest.lens.id;\n\n if (!lensRequestState.has(lensId)) {\n lensRequestState.set(lensId, {\n // Prepares a collection to store cancellation handlers.\n // A specific handler will be invoked when a cancellation request is issued by the lens.\n // All handlers will be invoked when the lens is replaced with another one or the session\n // is destroyed.\n cancellationHandlers: new Map(),\n // Parse lens metadata to obtain supported Remote API specs.\n supportedSpecIds: new Set(\n (lensRepository.getLensMetadata(lensId)?.featureMetadata ?? [])\n .filter((feature) => feature.typeUrl === remoteApiInfoProtobufTypeUrl)\n .flatMap((any) => RemoteApiInfo.decode(any.value).apiSpecIds)\n ),\n });\n }\n const requestState = lensRequestState.get(lensId)!;\n\n // Extracts the spec ID and endpoint ID from the provided Remote API request URI.\n // The given URI is expected to conform to the following specification:\n // eslint-disable-next-line max-len\n // https://docs.google.com/document/d/18fbGYDhD2N_aMTe4ZLY4QKeCSoMeJuklG28TutDzLZc/edit#bookmark=id.p2y39gwgbm4g\n const { route } = extractSchemeAndRoute(uriRequest.request.uri);\n const [specId, endpointIdWithQuery] = route.split(\"/\").slice(2);\n const [endpointId] = endpointIdWithQuery.split(\"?\");\n\n return { uriRequest, specId, endpointId, requestState };\n }),\n\n // only handle requests for API spec ID that current lens supports\n filter(({ specId, requestState }) => requestState.supportedSpecIds.has(specId)),\n\n // only handle requests if we have a registered service for it\n filter(({ specId }) => registeredServiceMap.has(specId)),\n\n map(({ uriRequest, specId, endpointId, requestState }) => {\n const dimensions = new Map([[\"specId\", specId]]);\n reporter.count(\"lens_remote-api_requests\", 1, dimensions);\n\n const remoteApiRequest: RemoteApiRequest = {\n apiSpecId: specId,\n body: uriRequest.request.data,\n endpointId,\n parameters: uriRequest.request.metadata,\n };\n\n // Looks for the first Remote API request handler.\n for (const service of registeredServiceMap.get(specId) ?? []) {\n let requestHandler: RemoteApiRequestHandler | undefined = undefined;\n try {\n requestHandler = service.getRequestHandler(remoteApiRequest, uriRequest.lens);\n } catch (error) {\n logger.warn(\"Client's Remote API request handler factory threw an error.\", error);\n }\n\n if (requestHandler) {\n reporter.count(\"lens_remote-api_handled-requests\", 1, dimensions);\n\n let cancellationHandler: RemoteApiCancelRequestHandler | void = undefined;\n try {\n // Calls client's Remote API handler to process the request.\n cancellationHandler = requestHandler((response) => {\n reporter.count(\"lens_remote-api_responses\", 1, dimensions);\n\n const responseCode = statusToResponseCodeMap[response.status] ?? ResponseCode.UNRECOGNIZED;\n const uriResponse: UriResponse = {\n code: uriResponseOkCode,\n description: \"\",\n contentType: apiBinaryContentType,\n data: response.body,\n metadata: {\n ...response.metadata,\n [apiResponseStatusHeader]: responseCodeToNumber(responseCode).toString(),\n },\n };\n uriRequest.reply(uriResponse);\n });\n } catch (error) {\n logger.warn(\"Client's Remote API request handler threw an error.\", error);\n }\n\n if (typeof cancellationHandler === \"function\") {\n requestState.cancellationHandlers.set(uriRequest.request.identifier, () => {\n try {\n cancellationHandler!();\n } catch (error) {\n logger.warn(\"Client's Remote API request cancellation handler threw an error.\", error);\n }\n });\n }\n\n break;\n }\n }\n })\n );\n\n const uriCancelRequestEvents = uriCancelRequests.pipe(\n tap((uriRequest) => {\n const cancellationHandlers = lensRequestState.get(uriRequest.lens.id)?.cancellationHandlers;\n if (cancellationHandlers) {\n callCancellationHandler(cancellationHandlers, uriRequest.request.requestId);\n }\n })\n );\n\n merge(lensTurnOffEvents, uriRequestEvents, uriCancelRequestEvents)\n .pipe(\n catchError((error, sourcePipe) => {\n // The expectation is that if an error occurs, it happens in our own implementation,\n // because app callbacks are wrapped with try..catch blocks.\n // Therefore, we would like to report this error.\n logger.error(error);\n reporter.count(\"lens_remote-api_errors\", 1);\n // Return the source pipe so that we can retry the pipe instead of just completing it.\n return sourcePipe;\n }),\n // When the pipe completes due to an error,\n // we want to resubscribe to the original pipe to keep it alive.\n retry(),\n takeUntil(sessionState.events.pipe(forActions(\"destroy\")))\n )\n .subscribe({\n complete: () => handleLensApplicationEnd(lensRequestState, ...lensRequestState.keys()),\n });\n\n return {\n uri: \"app://remote-api/performApiRequest\",\n\n handleRequest(request, reply, lens) {\n uriRequests.next({ request, reply, lens });\n },\n\n cancelRequest(request, lens) {\n uriCancelRequests.next({ request, lens });\n },\n };\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LensKeyboard } from "../session/LensKeyboard";
|
|
2
|
-
import { LensRepository } from "../lens";
|
|
2
|
+
import { LensRepository } from "../lens/LensRepository";
|
|
3
3
|
import { LensCore } from "../lens-core-module";
|
|
4
4
|
import { OperationalMetricsReporter } from "../metrics/operational/operationalMetricsReporter";
|
|
5
5
|
import { RemoteApiServices } from "./RemoteApiServices";
|
|
@@ -10,12 +10,12 @@ import { UriHandlers } from "./UriHandlers";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare const registerUriHandlers: {
|
|
12
12
|
(args_0: LensCore, args_1: import("@snap/state-management").StateMachine<import("@snap/state-management").Action<"applyLens", {
|
|
13
|
-
lens: import("
|
|
14
|
-
|
|
15
|
-
}> | import("@snap/state-management").Action<"downloadComplete", import("
|
|
13
|
+
lens: import("..").Lens;
|
|
14
|
+
launchData?: import("..").LensLaunchData | undefined;
|
|
15
|
+
}> | import("@snap/state-management").Action<"downloadComplete", import("..").Lens> | import("@snap/state-management").Action<"turnedOn", import("..").Lens> | import("@snap/state-management").Action<"resourcesLoaded", import("..").Lens> | import("@snap/state-management").Action<"firstFrameProcessed", import("..").Lens> | import("@snap/state-management").Action<"applyLensComplete", import("..").Lens> | import("@snap/state-management").Action<"applyLensFailed", {
|
|
16
16
|
error: import("../session/lensState").LensErrors;
|
|
17
|
-
lens: import("
|
|
18
|
-
}> | import("@snap/state-management").Action<"applyLensAborted", import("
|
|
17
|
+
lens: import("..").Lens;
|
|
18
|
+
}> | import("@snap/state-management").Action<"applyLensAborted", import("..").Lens> | import("@snap/state-management").Action<"removeLens", undefined> | import("@snap/state-management").Action<"turnedOff", import("..").Lens> | import("@snap/state-management").Action<"removeLensComplete", undefined> | import("@snap/state-management").Action<"removeLensFailed", Error>, import("@snap/state-management").State<"noLensApplied", undefined> | import("@snap/state-management").State<"applyingLens", import("..").Lens> | import("@snap/state-management").State<"lensApplied", import("..").Lens>>, args_2: UriHandlers, args_3: LensKeyboard, args_4: RemoteApiServices, args_5: LensRepository, args_6: import("@snap/state-management").StateMachine<import("@snap/state-management").Action<"suspend", import("..").CameraKitSession> | import("@snap/state-management").Action<"resume", import("..").CameraKitSession> | import("@snap/state-management").Action<"destroy", undefined>, import("@snap/state-management").State<"inactive", undefined> | import("@snap/state-management").State<"active", import("..").CameraKitSession> | import("@snap/state-management").State<"destroyed", undefined>>, args_7: OperationalMetricsReporter): void;
|
|
19
19
|
token: "registerUriHandlers";
|
|
20
20
|
dependencies: readonly ["lensCore", "lensState", "UriHandlers", "lensKeyboard", "remoteApiServices", "LensRepository", "sessionState", "operationalMetricsReporter"];
|
|
21
21
|
};
|
|
@@ -2,7 +2,7 @@ import { isState } from "@snap/state-management";
|
|
|
2
2
|
import { Injectable } from "../dependency-injection/Injectable";
|
|
3
3
|
import { lensKeyboardFactory } from "../session/LensKeyboard";
|
|
4
4
|
import { lensStateFactory } from "../session/lensState";
|
|
5
|
-
import { lensRepositoryFactory } from "../lens";
|
|
5
|
+
import { lensRepositoryFactory } from "../lens/LensRepository";
|
|
6
6
|
import { sessionStateFactory } from "../session/sessionState";
|
|
7
7
|
import { lensCoreFactory } from "../lens-core-module";
|
|
8
8
|
import { getLogger } from "../logger/logger";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uriHandlersRegister.js","sourceRoot":"","sources":["../../src/extensions/uriHandlersRegister.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAgB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAa,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAkB,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"uriHandlersRegister.js","sourceRoot":"","sources":["../../src/extensions/uriHandlersRegister.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,O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AAI,aAAa,EAAE;wBACf,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;wBACnC,IAAI,OAAO,CAAC,KAAK,EAAE,eAAe,CAAC,EAAE;4BACjC,MAAM,CAAC,IAAI,CACP,gCAAgC,OAAO,CAAC,GAAG,2BAA2B;gCAClE,iDAAiD,CACxD,CAAC;4BACF,OAAO;yBACV;wBACD,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;qBACtC;gBACL,CAAC;aACJ,CAAC,CAAC;SACN;KACJ;AACL,CAAC,CACJ,CAAC","sourcesContent":["import { isState } from \"@snap/state-management\";\n\nimport { Injectable } from \"../dependency-injection/Injectable\";\nimport { LensKeyboard, lensKeyboardFactory } from \"../session/LensKeyboard\";\nimport { LensState, lensStateFactory } from \"../session/lensState\";\nimport { LensRepository, lensRepositoryFactory } from \"../lens/LensRepository\";\nimport { SessionState, sessionStateFactory } from \"../session/sessionState\";\nimport { LensCore, UriResponse, lensCoreFactory } from \"../lens-core-module\";\nimport { getLogger } from \"../logger/logger\";\nimport {\n OperationalMetricsReporter,\n operationalMetricReporterFactory,\n} from \"../metrics/operational/operationalMetricsReporter\";\nimport { RemoteApiServices, getRemoteApiUriHandler, remoteApiServicesFactory } from \"./RemoteApiServices\";\nimport { UriHandlers, extractSchemeAndRoute, isUriHandlers, isUriResponse, uriHandlersFactory } from \"./UriHandlers\";\n\nconst logger = getLogger(\"uriHandlersRegister\");\n\n/**\n * Registers URI handlers within LensCore.\n * @internal\n */\nexport const registerUriHandlers = Injectable(\n \"registerUriHandlers\",\n [\n lensCoreFactory.token,\n lensStateFactory.token,\n uriHandlersFactory.token,\n lensKeyboardFactory.token,\n remoteApiServicesFactory.token,\n lensRepositoryFactory.token,\n sessionStateFactory.token,\n operationalMetricReporterFactory.token,\n ] as const,\n (\n lensCore: LensCore,\n lensState: LensState,\n userHandlers: UriHandlers,\n lensKeyboard: LensKeyboard,\n remoteApiServices: RemoteApiServices,\n lensRepository: LensRepository,\n sessionState: SessionState,\n operationalMetricsReporter: OperationalMetricsReporter\n ): void => {\n if (!isUriHandlers(userHandlers)) {\n throw new Error(\"Expected an array of UriHandler objects\");\n }\n\n // Users may define UriHandlers using the uriHandlersFactory.token, but we need to add some internally-defined\n // handlers (lens keyboard and Remote API) before registering handlers with LensCore.\n const allHandlers = userHandlers.concat(\n lensKeyboard.uriHandler,\n getRemoteApiUriHandler(\n remoteApiServices,\n sessionState,\n lensState,\n lensRepository,\n operationalMetricsReporter\n )\n );\n\n for (const { uri, handleRequest, cancelRequest } of allHandlers) {\n const uris = Array.isArray(uri) ? uri : [uri];\n for (const { scheme, route } of uris.map(extractSchemeAndRoute)) {\n lensCore.registerUriListener(scheme, route, {\n handleRequest: (request) => {\n const reply = (response: UriResponse) => {\n if (!isUriResponse(response)) {\n throw new Error(\"Expected UriResponse object\");\n }\n lensCore.provideUriResponse(request.identifier, response);\n };\n\n // Since lenses are the only things that make URI requests, we expect to always be in the\n // \"lensApplied\" state – we'll sanity check, though, and log a warning if we're not.\n const state = lensState.getState();\n if (isState(state, \"noLensApplied\")) {\n logger.warn(\n `Got a URI request for ${request.uri}, but there is no active lens. The ` +\n `request will not be processed.`\n );\n return;\n }\n\n // NOTE: we do not handle any error thrown on an extension side when handleRequest() is called.\n // That responsibility is delegated to the extension by design and that is exactly what Android\n // and iOS SDKs do.\n handleRequest(request, reply, state.data);\n },\n cancelRequest: (request) => {\n if (cancelRequest) {\n const state = lensState.getState();\n if (isState(state, \"noLensApplied\")) {\n logger.warn(\n `Got a URI cancel request for ${request.uri}, but there is no active ` +\n `lens. The cancel request will not be processed.`\n );\n return;\n }\n cancelRequest(request, state.data);\n }\n },\n });\n }\n }\n }\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cameraKitEvents.js","sourceRoot":"","sources":["../../../src/generated-proto/blizzard/cameraKitEvents.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAA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AK1B;AAED,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IACxB,mGAA8B,CAAA;IAC9B,mGAA8B,CAAA;IAC9B,iGAA6B,CAAA;IAC7B,wEAAiB,CAAA;AACrB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAwBD,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,2DAAa,CAAA;IACb,mDAAS,CAAA;IACT,kEAAiB,CAAA;AACrB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED,MAAM,CAAN,IAAY,OAaX;AAbD,WAAY,OAAO;IACf,6DAAoB,CAAA;IACpB,mDAAe,CAAA;IACf,qDAAgB,CAAA;IAChB,+CAAa,CAAA;IACb,+CAAa,CAAA;IACb,iDAAc,CAAA;IACd,6CAAY,CAAA;IACZ,6CAAY,CAAA;IACZ,qDAAgB,CAAA;IAChB,iDAAc,CAAA;IACd,0DAAmB,CAAA;IACnB,sDAAiB,CAAA;AACrB,CAAC,EAbW,OAAO,KAAP,OAAO,QAalB","sourcesContent":["export const ServerEvent = {\n fromPartial<I extends Exact<DeepPartial<ServerEvent>, I>>(object: I): ServerEvent {\n const message = createBaseServerEvent();\n message.eventName = object.eventName ?? \"\";\n message.serverTs = object.serverTs ?? 0;\n message.userId = object.userId ?? \"\";\n message.userAgent = object.userAgent ?? \"\";\n message.country = object.country ?? \"\";\n message.city = object.city ?? \"\";\n message.region = object.region ?? \"\";\n message.eventId = object.eventId ?? \"\";\n message.instanceId = object.instanceId ?? \"\";\n message.sequenceId = object.sequenceId ?? 0;\n message.osType = object.osType ?? \"\";\n message.osVersion = object.osVersion ?? \"\";\n message.appVersion = object.appVersion ?? \"\";\n message.appBuild = object.appBuild ?? \"\";\n message.serverUploadTs = object.serverUploadTs ?? 0;\n message.eventTime = object.eventTime ?? 0;\n message.serverReceiptTime = object.serverReceiptTime ?? 0;\n message.maxSequenceIdOnInstance = object.maxSequenceIdOnInstance ?? 0;\n message.userGuid = object.userGuid ?? \"\";\n message.collection = object.collection ?? 0;\n message.serviceId = object.serviceId ?? \"\";\n message.appType = object.appType ?? 0;\n message.spectrumInstanceId = object.spectrumInstanceId ?? \"\";\n message.spectrumSequenceId = object.spectrumSequenceId ?? 0;\n message.eventData =\n object.eventData !== undefined && object.eventData !== null\n ? ServerEventData.fromPartial(object.eventData)\n : undefined;\n return message;\n },\n};\n\nexport const ServerEventData = {\n fromPartial<I extends Exact<DeepPartial<ServerEventData>, I>>(object: I): ServerEventData {\n const message = createBaseServerEventData();\n message.cameraKitException =\n object.cameraKitException !== undefined && object.cameraKitException !== null\n ? CameraKitException.fromPartial(object.cameraKitException)\n : undefined;\n message.cameraKitLensSpin =\n object.cameraKitLensSpin !== undefined && object.cameraKitLensSpin !== null\n ? CameraKitLensSpin.fromPartial(object.cameraKitLensSpin)\n : undefined;\n message.cameraKitAssetDownload =\n object.cameraKitAssetDownload !== undefined && object.cameraKitAssetDownload !== null\n ? CameraKitAssetDownload.fromPartial(object.cameraKitAssetDownload)\n : undefined;\n message.cameraKitLensContentValidationFailed =\n object.cameraKitLensContentValidationFailed !== undefined && object.cameraKitLensContentValidationFailed !== null\n ? CameraKitLensContentValidationFailed.fromPartial(object.cameraKitLensContentValidationFailed)\n : undefined;\n message.cameraKitLensDownload =\n object.cameraKitLensDownload !== undefined && object.cameraKitLensDownload !== null\n ? CameraKitLensDownload.fromPartial(object.cameraKitLensDownload)\n : undefined;\n message.cameraKitAssetValidationFailed =\n object.cameraKitAssetValidationFailed !== undefined && object.cameraKitAssetValidationFailed !== null\n ? CameraKitAssetValidationFailed.fromPartial(object.cameraKitAssetValidationFailed)\n : undefined;\n message.cameraKitSession =\n object.cameraKitSession !== undefined && object.cameraKitSession !== null\n ? CameraKitSession.fromPartial(object.cameraKitSession)\n : undefined;\n message.cameraKitWebLensSwipe =\n object.cameraKitWebLensSwipe !== undefined && object.cameraKitWebLensSwipe !== null\n ? CameraKitWebLensSwipe.fromPartial(object.cameraKitWebLensSwipe)\n : undefined;\n message.cameraKitWebBenchmarkComplete =\n object.cameraKitWebBenchmarkComplete !== undefined && object.cameraKitWebBenchmarkComplete !== null\n ? CameraKitWebBenchmarkComplete.fromPartial(object.cameraKitWebBenchmarkComplete)\n : undefined;\n message.cameraKitLegalPrompt =\n object.cameraKitLegalPrompt !== undefined && object.cameraKitLegalPrompt !== null\n ? CameraKitLegalPrompt.fromPartial(object.cameraKitLegalPrompt)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseServerEventData(): ServerEventData {\n return {\n cameraKitException: undefined,\n cameraKitLensSpin: undefined,\n cameraKitAssetDownload: undefined,\n cameraKitLensContentValidationFailed: undefined,\n cameraKitLensDownload: undefined,\n cameraKitAssetValidationFailed: undefined,\n cameraKitSession: undefined,\n cameraKitWebLensSwipe: undefined,\n cameraKitWebBenchmarkComplete: undefined,\n cameraKitLegalPrompt: undefined,\n };\n}\n\nfunction createBaseServerEvent(): ServerEvent {\n return {\n eventName: \"\",\n serverTs: 0,\n userId: \"\",\n userAgent: \"\",\n country: \"\",\n city: \"\",\n region: \"\",\n eventId: \"\",\n instanceId: \"\",\n sequenceId: 0,\n osType: \"\",\n osVersion: \"\",\n appVersion: \"\",\n appBuild: \"\",\n serverUploadTs: 0,\n eventTime: 0,\n serverReceiptTime: 0,\n maxSequenceIdOnInstance: 0,\n userGuid: \"\",\n collection: 0,\n serviceId: \"\",\n appType: 0,\n spectrumInstanceId: \"\",\n spectrumSequenceId: 0,\n eventData: undefined,\n };\n}\n\nexport interface ServerEvent {\n eventName: string;\n serverTs: number;\n userId: string;\n userAgent: string;\n country: string;\n city: string;\n region: string;\n eventId: string;\n instanceId: string;\n sequenceId: number;\n osType: string;\n osVersion: string;\n appVersion: string;\n appBuild: string;\n serverUploadTs: number;\n eventTime: number;\n serverReceiptTime: number;\n maxSequenceIdOnInstance: number;\n userGuid: string;\n collection: Collection;\n serviceId: string;\n appType: AppType;\n spectrumInstanceId: string;\n spectrumSequenceId: number;\n eventData: ServerEventData | undefined;\n}\n\nexport interface ServerEventData {\n cameraKitException: CameraKitException | undefined;\n cameraKitLensSpin: CameraKitLensSpin | undefined;\n cameraKitAssetDownload: CameraKitAssetDownload | undefined;\n cameraKitLensContentValidationFailed: CameraKitLensContentValidationFailed | undefined;\n cameraKitLensDownload: CameraKitLensDownload | undefined;\n cameraKitAssetValidationFailed: CameraKitAssetValidationFailed | undefined;\n cameraKitSession: CameraKitSession | undefined;\n cameraKitWebLensSwipe: CameraKitWebLensSwipe | undefined;\n cameraKitWebBenchmarkComplete: CameraKitWebBenchmarkComplete | undefined;\n cameraKitLegalPrompt: CameraKitLegalPrompt | undefined;\n}\n\nexport enum AppType {\n IOS_NATIVE = 0,\n IOS_WEB_DESKTOP = 1,\n IOS_WEB_MOBILE = 2,\n ANDROID_NATIVE = 3,\n ANDROID_WEB_DESKTOP = 4,\n ANDROID_WEB_MOBILE = 5,\n OSX_WEB_DESKTOP = 6,\n OSX_WEB_MOBILE = 7,\n WINDOWS_WEB_DESKTOP = 8,\n WINDOWS_WEB_MOBILE = 9,\n LINUX_WEB_DESKTOP = 10,\n LINUX_WEB_MOBILE = 11,\n LENSSTUDIO = 12,\n SNAPCAMERA = 13,\n WEB_DESKTOP = 14,\n WEB_MOBILE = 15,\n LENSSTUDIO_REMAKE = 16,\n UNRECOGNIZED = -1\n}\n\nexport enum Collection {\n COLLECTION_UNUSED = 0,\n GAE = 1,\n GCE_M = 2,\n GCE_S = 3,\n GCE_T = 4,\n GKE_M = 5,\n GKE_S = 6,\n GKE_T = 7,\n LOCAL = 8,\n GCE_ST = 9,\n GKE_ST = 10,\n GCE_C = 11,\n GCE_SC = 12,\n GCE_TC = 13,\n GCE_TSC = 14,\n GKE_C = 15,\n GKE_SC = 16,\n GKE_TC = 17,\n GKE_TSC = 18,\n GKE_W = 19,\n GKE_WT = 20,\n GKE_WC = 21,\n GKE_WSC = 22,\n UNRECOGNIZED = -1\n}\n\nexport const CameraKitLensSpin = {\n fromPartial<I extends Exact<DeepPartial<CameraKitLensSpin>, I>>(object: I): CameraKitLensSpin {\n const message = createBaseCameraKitLensSpin();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.lensId = object.lensId ?? \"\";\n message.viewTimeSec = object.viewTimeSec ?? 0;\n message.lensGroupId = object.lensGroupId ?? \"\";\n return message;\n },\n};\n\nfunction createBaseCameraKitLensSpin(): CameraKitLensSpin {\n return { cameraKitEventBase: undefined, lensId: \"\", viewTimeSec: 0, lensGroupId: \"\" };\n}\n\nexport interface CameraKitLensSpin {\n cameraKitEventBase: CameraKitEventBase | undefined;\n lensId: string;\n viewTimeSec: number;\n lensGroupId: string;\n}\n\nexport const CameraKitWebLensSwipe = {\n fromPartial<I extends Exact<DeepPartial<CameraKitWebLensSwipe>, I>>(object: I): CameraKitWebLensSwipe {\n const message = createBaseCameraKitWebLensSwipe();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.performanceCluster = object.performanceCluster ?? 0;\n message.webglRendererInfo = object.webglRendererInfo ?? \"\";\n message.lensId = object.lensId ?? \"\";\n message.lensFrameProcessingTimeMsAvg = object.lensFrameProcessingTimeMsAvg ?? 0;\n message.lensFrameProcessingTimeMsStd = object.lensFrameProcessingTimeMsStd ?? 0;\n message.viewTimeSec = object.viewTimeSec ?? 0;\n message.recordingTimeSec = object.recordingTimeSec ?? 0;\n message.applyDelaySec = object.applyDelaySec ?? 0;\n message.avgFps = object.avgFps ?? 0;\n message.isLensFirstWithinDay = object.isLensFirstWithinDay ?? false;\n message.isLensFirstWithinMonth = object.isLensFirstWithinMonth ?? false;\n message.lensGroupId = object.lensGroupId ?? \"\";\n return message;\n },\n};\n\nfunction createBaseCameraKitWebLensSwipe(): CameraKitWebLensSwipe {\n return {\n cameraKitEventBase: undefined,\n performanceCluster: 0,\n webglRendererInfo: \"\",\n lensId: \"\",\n lensFrameProcessingTimeMsAvg: 0,\n lensFrameProcessingTimeMsStd: 0,\n viewTimeSec: 0,\n recordingTimeSec: 0,\n applyDelaySec: 0,\n avgFps: 0,\n isLensFirstWithinDay: false,\n isLensFirstWithinMonth: false,\n lensGroupId: \"\",\n };\n}\n\nexport interface CameraKitWebLensSwipe {\n cameraKitEventBase: CameraKitEventBase | undefined;\n performanceCluster: number;\n webglRendererInfo: string;\n lensId: string;\n lensFrameProcessingTimeMsAvg: number;\n lensFrameProcessingTimeMsStd: number;\n viewTimeSec: number;\n recordingTimeSec: number;\n applyDelaySec: number;\n avgFps: number;\n isLensFirstWithinDay: boolean;\n isLensFirstWithinMonth: boolean;\n lensGroupId: string;\n}\n\nexport const CameraKitLensDownload = {\n fromPartial<I extends Exact<DeepPartial<CameraKitLensDownload>, I>>(object: I): CameraKitLensDownload {\n const message = createBaseCameraKitLensDownload();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.lensId = object.lensId ?? \"\";\n message.automaticDownload = object.automaticDownload ?? false;\n message.downloadTimeSec = object.downloadTimeSec ?? 0;\n message.sizeByte = object.sizeByte ?? 0;\n return message;\n },\n};\n\nfunction createBaseCameraKitLensDownload(): CameraKitLensDownload {\n return { cameraKitEventBase: undefined, lensId: \"\", automaticDownload: false, downloadTimeSec: 0, sizeByte: 0 };\n}\n\nexport interface CameraKitLensDownload {\n cameraKitEventBase: CameraKitEventBase | undefined;\n lensId: string;\n automaticDownload: boolean;\n downloadTimeSec: number;\n sizeByte: number;\n}\n\nexport const CameraKitAssetDownload = {\n fromPartial<I extends Exact<DeepPartial<CameraKitAssetDownload>, I>>(object: I): CameraKitAssetDownload {\n const message = createBaseCameraKitAssetDownload();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.automaticDownload = object.automaticDownload ?? false;\n message.downloadTimeSec = object.downloadTimeSec ?? 0;\n message.sizeByte = object.sizeByte ?? 0;\n message.assetId = object.assetId ?? \"\";\n return message;\n },\n};\n\nfunction createBaseCameraKitAssetDownload(): CameraKitAssetDownload {\n return { cameraKitEventBase: undefined, automaticDownload: false, downloadTimeSec: 0, sizeByte: 0, assetId: \"\" };\n}\n\nexport interface CameraKitAssetDownload {\n cameraKitEventBase: CameraKitEventBase | undefined;\n automaticDownload: boolean;\n downloadTimeSec: number;\n sizeByte: number;\n assetId: string;\n}\n\nexport const CameraKitException = {\n fromPartial<I extends Exact<DeepPartial<CameraKitException>, I>>(object: I): CameraKitException {\n const message = createBaseCameraKitException();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.lensId = object.lensId ?? \"\";\n message.type = object.type ?? \"\";\n message.reason = object.reason ?? \"\";\n return message;\n },\n};\n\nfunction createBaseCameraKitException(): CameraKitException {\n return { cameraKitEventBase: undefined, lensId: \"\", type: \"\", reason: \"\" };\n}\n\nexport interface CameraKitException {\n cameraKitEventBase: CameraKitEventBase | undefined;\n lensId: string;\n type: string;\n reason: string;\n}\n\nexport const CameraKitSession = {\n fromPartial<I extends Exact<DeepPartial<CameraKitSession>, I>>(object: I): CameraKitSession {\n const message = createBaseCameraKitSession();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.dailySessionBucket = object.dailySessionBucket ?? 0;\n message.isFirstWithinMonth = object.isFirstWithinMonth ?? false;\n message.day = object.day ?? 0;\n message.month = object.month ?? 0;\n message.year = object.year ?? 0;\n return message;\n },\n};\n\nfunction createBaseCameraKitSession(): CameraKitSession {\n return { cameraKitEventBase: undefined, dailySessionBucket: 0, isFirstWithinMonth: false, day: 0, month: 0, year: 0 };\n}\n\nexport interface CameraKitSession {\n cameraKitEventBase: CameraKitEventBase | undefined;\n dailySessionBucket: DailySessionBucket;\n isFirstWithinMonth: boolean;\n day: number;\n month: number;\n year: number;\n}\n\nexport enum DailySessionBucket {\n NO_SESSION_BUCKET = 0,\n ONE_SESSION = 1,\n TWO_SESSION = 2,\n THREE_SESSION = 3,\n FOUR_SESSION = 4,\n FIVE_SESSION = 5,\n SIX_SESSION = 6,\n SEVEN_SESSION = 7,\n EIGHT_SESSION = 8,\n NINE_SESSION = 9,\n TEN_OR_MORE_SESSION = 10,\n UNRECOGNIZED = -1\n}\n\nexport const CameraKitLensContentValidationFailed = {\n fromPartial<I extends Exact<DeepPartial<CameraKitLensContentValidationFailed>, I>>(object: I): CameraKitLensContentValidationFailed {\n const message = createBaseCameraKitLensContentValidationFailed();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.lensId = object.lensId ?? \"\";\n return message;\n },\n};\n\nfunction createBaseCameraKitLensContentValidationFailed(): CameraKitLensContentValidationFailed {\n return { cameraKitEventBase: undefined, lensId: \"\" };\n}\n\nexport interface CameraKitLensContentValidationFailed {\n cameraKitEventBase: CameraKitEventBase | undefined;\n lensId: string;\n}\n\nexport const CameraKitAssetValidationFailed = {\n fromPartial<I extends Exact<DeepPartial<CameraKitAssetValidationFailed>, I>>(object: I): CameraKitAssetValidationFailed {\n const message = createBaseCameraKitAssetValidationFailed();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.assetId = object.assetId ?? \"\";\n return message;\n },\n};\n\nfunction createBaseCameraKitAssetValidationFailed(): CameraKitAssetValidationFailed {\n return { cameraKitEventBase: undefined, assetId: \"\" };\n}\n\nexport interface CameraKitAssetValidationFailed {\n cameraKitEventBase: CameraKitEventBase | undefined;\n assetId: string;\n}\n\nexport const CameraKitWebBenchmarkComplete = {\n fromPartial<I extends Exact<DeepPartial<CameraKitWebBenchmarkComplete>, I>>(object: I): CameraKitWebBenchmarkComplete {\n const message = createBaseCameraKitWebBenchmarkComplete();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.benchmarkName = object.benchmarkName ?? \"\";\n message.benchmarkValue = object.benchmarkValue ?? 0;\n message.performanceCluster = object.performanceCluster ?? 0;\n message.webglRendererInfo = object.webglRendererInfo ?? \"\";\n return message;\n },\n};\n\nfunction createBaseCameraKitWebBenchmarkComplete(): CameraKitWebBenchmarkComplete {\n return {\n cameraKitEventBase: undefined,\n benchmarkName: \"\",\n benchmarkValue: 0,\n performanceCluster: 0,\n webglRendererInfo: \"\",\n };\n}\n\nexport interface CameraKitWebBenchmarkComplete {\n cameraKitEventBase: CameraKitEventBase | undefined;\n benchmarkName: string;\n benchmarkValue: number;\n performanceCluster: number;\n webglRendererInfo: string;\n}\n\nexport const CameraKitLegalPrompt = {\n fromPartial<I extends Exact<DeepPartial<CameraKitLegalPrompt>, I>>(object: I): CameraKitLegalPrompt {\n const message = createBaseCameraKitLegalPrompt();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.legalPromptId = object.legalPromptId ?? \"\";\n message.legalPromptResult = object.legalPromptResult ?? 0;\n return message;\n },\n};\n\nexport const CameraKitEventBase = {\n fromPartial<I extends Exact<DeepPartial<CameraKitEventBase>, I>>(object: I): CameraKitEventBase {\n const message = createBaseCameraKitEventBase();\n message.kitEventBase =\n object.kitEventBase !== undefined && object.kitEventBase !== null\n ? KitEventBase.fromPartial(object.kitEventBase)\n : undefined;\n message.deviceCluster = object.deviceCluster ?? 0;\n message.cameraKitVersion = object.cameraKitVersion ?? \"\";\n message.lensCoreVersion = object.lensCoreVersion ?? \"\";\n message.deviceModel = object.deviceModel ?? \"\";\n message.cameraKitVariant = object.cameraKitVariant ?? 0;\n message.cameraKitFlavor = object.cameraKitFlavor ?? 0;\n message.appId = object.appId ?? \"\";\n message.deviceConnectivity = object.deviceConnectivity ?? 0;\n message.sessionId = object.sessionId ?? \"\";\n message.appVendorUuid = object.appVendorUuid ?? \"\";\n message.rankingRequestId = object.rankingRequestId ?? \"\";\n message.cameraKitEnvironment = object.cameraKitEnvironment ?? 0;\n message.partnerUuid = object.partnerUuid ?? \"\";\n return message;\n },\n};\n\nexport const KitEventBase = {\n fromPartial<I extends Exact<DeepPartial<KitEventBase>, I>>(object: I): KitEventBase {\n const message = createBaseKitEventBase();\n message.oauthClientId = object.oauthClientId ?? \"\";\n message.locale = object.locale ?? \"\";\n message.kitUserAgent = object.kitUserAgent ?? \"\";\n message.ipAddress = object.ipAddress ?? \"\";\n message.osMinorVersion = object.osMinorVersion ?? \"\";\n message.kitVariant = object.kitVariant ?? 0;\n message.kitVariantVersion = object.kitVariantVersion ?? \"\";\n message.kitClientTimestampMillis = object.kitClientTimestampMillis ?? 0;\n message.clientSequenceId = object.clientSequenceId ?? 0;\n message.maxClientSequenceIdOnInstance = object.maxClientSequenceIdOnInstance ?? 0;\n message.targetArchitecture = object.targetArchitecture ?? \"\";\n message.runningWithDebuggerAttached = object.runningWithDebuggerAttached ?? false;\n message.runningInTests = object.runningInTests ?? false;\n message.runningInSimulator = object.runningInSimulator ?? false;\n message.isAppPrerelease = object.isAppPrerelease ?? false;\n message.kitAppId = object.kitAppId ?? \"\";\n message.kitSessionId = object.kitSessionId ?? \"\";\n message.kitPluginType = object.kitPluginType ?? 0;\n message.isFromReactNativePlugin = object.isFromReactNativePlugin ?? false;\n return message;\n },\n};\n\nfunction createBaseKitEventBase(): KitEventBase {\n return {\n oauthClientId: \"\",\n locale: \"\",\n kitUserAgent: \"\",\n ipAddress: \"\",\n osMinorVersion: \"\",\n kitVariant: 0,\n kitVariantVersion: \"\",\n kitClientTimestampMillis: 0,\n clientSequenceId: 0,\n maxClientSequenceIdOnInstance: 0,\n targetArchitecture: \"\",\n runningWithDebuggerAttached: false,\n runningInTests: false,\n runningInSimulator: false,\n isAppPrerelease: false,\n kitAppId: \"\",\n kitSessionId: \"\",\n kitPluginType: 0,\n isFromReactNativePlugin: false,\n };\n}\n\nfunction createBaseCameraKitEventBase(): CameraKitEventBase {\n return {\n kitEventBase: undefined,\n deviceCluster: 0,\n cameraKitVersion: \"\",\n lensCoreVersion: \"\",\n deviceModel: \"\",\n cameraKitVariant: 0,\n cameraKitFlavor: 0,\n appId: \"\",\n deviceConnectivity: 0,\n sessionId: \"\",\n appVendorUuid: \"\",\n rankingRequestId: \"\",\n cameraKitEnvironment: 0,\n partnerUuid: \"\",\n };\n}\n\nfunction createBaseCameraKitLegalPrompt(): CameraKitLegalPrompt {\n return { cameraKitEventBase: undefined, legalPromptId: \"\", legalPromptResult: 0 };\n}\n\nexport interface CameraKitLegalPrompt {\n cameraKitEventBase: CameraKitEventBase | undefined;\n legalPromptId: string;\n legalPromptResult: CameraKitLegalPromptResult;\n}\n\nexport enum CameraKitLegalPromptResult {\n CAMERA_KIT_LEGAL_PROMPT_MISSING = 0,\n CAMERA_KIT_LEGAL_PROMPT_ACCEPTED = 1,\n CAMERA_KIT_LEGAL_PROMPT_DISMISSED = 2,\n UNRECOGNIZED = -1\n}\n\nexport interface CameraKitEventBase {\n kitEventBase: KitEventBase | undefined;\n deviceCluster: number;\n cameraKitVersion: string;\n lensCoreVersion: string;\n deviceModel: string;\n cameraKitVariant: CameraKitVariant;\n cameraKitFlavor: CameraKitFlavor;\n appId: string;\n deviceConnectivity: CameraKitConnectivityType;\n sessionId: string;\n appVendorUuid: string;\n rankingRequestId: string;\n cameraKitEnvironment: CameraKitEnvironment;\n partnerUuid: string;\n}\n\nexport enum CameraKitEnvironment {\n CAMERA_KIT_ENVIRONMENT_UNKNOWN = 0,\n CAMERA_KIT_ENVIRONMENT_STAGING = 1,\n CAMERA_KIT_ENVIRONMENT_PRODUCTION = 2,\n UNRECOGNIZED = -1\n}\n\nexport enum CameraKitConnectivityType {\n CAMERA_KIT_CONNECTIVITY_TYPE_UNKNOWN = 0,\n CAMERA_KIT_CONNECTIVITY_TYPE_WIFI = 1,\n CAMERA_KIT_CONNECTIVITY_TYPE_MOBILE = 2,\n CAMERA_KIT_CONNECTIVITY_TYPE_UNREACHABLE = 3,\n CAMERA_KIT_CONNECTIVITY_TYPE_BLUETOOTH = 4,\n UNRECOGNIZED = -1\n}\n\nexport enum CameraKitFlavor {\n CAMERA_KIT_FLAVOR_UNKNOWN = 0,\n CAMERA_KIT_FLAVOR_DEBUG = 1,\n CAMERA_KIT_FLAVOR_RELEASE = 2,\n UNRECOGNIZED = -1\n}\n\nexport enum CameraKitVariant {\n CAMERA_KIT_VARIANT_UNKNOWN = 0,\n CAMERA_KIT_VARIANT_PARTNER = 1,\n CAMERA_KIT_VARIANT_PUBLIC = 2,\n UNRECOGNIZED = -1\n}\n\nexport interface KitEventBase {\n oauthClientId: string;\n locale: string;\n kitUserAgent: string;\n ipAddress: string;\n osMinorVersion: string;\n kitVariant: KitType;\n kitVariantVersion: string;\n kitClientTimestampMillis: number;\n clientSequenceId: number;\n maxClientSequenceIdOnInstance: number;\n targetArchitecture: string;\n runningWithDebuggerAttached: boolean;\n runningInTests: boolean;\n runningInSimulator: boolean;\n isAppPrerelease: boolean;\n kitAppId: string;\n kitSessionId: string;\n kitPluginType: KitPluginType;\n isFromReactNativePlugin: boolean;\n}\n\nexport enum KitPluginType {\n NO_PLUGIN = 0,\n UNITY = 1,\n UNRECOGNIZED = -1\n}\n\nexport enum KitType {\n UNKNOWN_KIT_TYPE = 0,\n BITMOJI_KIT = 1,\n CREATIVE_KIT = 2,\n LOGIN_KIT = 3,\n STORY_KIT = 4,\n CAMERA_KIT = 5,\n SHOP_KIT = 6,\n EULA_KIT = 7,\n PAYMENTS_KIT = 8,\n INVITE_KIT = 9,\n CAMERA_KIT_WEB = 10,\n UNRECOGNIZED = -1\n}\n\nexport 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 {} ? {\n [K in keyof T]?: DeepPartial<T[K]>;\n} : Partial<T>;\n\nexport type Exact<P, I extends P> = P extends Builtin ? P : P & {\n [K in keyof P]: Exact<P[K], I[K]>;\n} & Record<Exclude<keyof I, KeysOfUnion<P>>, never>;\n\ntype KeysOfUnion<T> = T extends T ? keyof T : never;\n\ntype Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;\n"]}
|
|
1
|
+
{"version":3,"file":"cameraKitEvents.js","sourceRoot":"","sources":["../../../src/generated-proto/blizzard/cameraKitEvents.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,WAAW,CAA+C,MAAS;;QAC/D,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;QACxC,OAAO,CAAC,SAAS,GAAG,MAAA,MAAM,CAAC,SAAS,mCAAI,EAAE,CAAC;QAC3C,OAAO,CAAC,QAAQ,GAAG,MAAA,MAAM,CAAC,QAAQ,mCAAI,CAAC,CAAC;QACxC,OAAO,CAAC,MAAM,GAAG,MAAA,MAAM,CAAC,MAAM,mCAAI,EAAE,CAAC;QACrC,OAAO,CAAC,SAAS,GAAG,MAAA,MAAM,CAAC,SAAS,mCAAI,EAAE,CAAC;QAC3C,OAAO,CAAC,OAAO,GAAG,MAAA,MAAM,CAAC,OAAO,mCAAI,EAAE,CAAC;QACvC,OAAO,CAAC,IAAI,GAAG,MAAA,MAAM,CAAC,IAAI,mCAAI,EAAE,CAAC;QACjC,OAAO,CAAC,MAAM,GAAG,MAAA,MAAM,CAAC,MAAM,mCAAI,EAAE,CAAC;QACrC,OAAO,CAAC,OAAO,GAAG,MAAA,MAAM,CAAC,OAAO,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ent":["export const ServerEvent = {\n fromPartial<I extends Exact<DeepPartial<ServerEvent>, I>>(object: I): ServerEvent {\n const message = createBaseServerEvent();\n message.eventName = object.eventName ?? \"\";\n message.serverTs = object.serverTs ?? 0;\n message.userId = object.userId ?? \"\";\n message.userAgent = object.userAgent ?? \"\";\n message.country = object.country ?? \"\";\n message.city = object.city ?? \"\";\n message.region = object.region ?? \"\";\n message.eventId = object.eventId ?? \"\";\n message.instanceId = object.instanceId ?? \"\";\n message.sequenceId = object.sequenceId ?? 0;\n message.osType = object.osType ?? \"\";\n message.osVersion = object.osVersion ?? \"\";\n message.appVersion = object.appVersion ?? \"\";\n message.appBuild = object.appBuild ?? \"\";\n message.serverUploadTs = object.serverUploadTs ?? 0;\n message.eventTime = object.eventTime ?? 0;\n message.serverReceiptTime = object.serverReceiptTime ?? 0;\n message.maxSequenceIdOnInstance = object.maxSequenceIdOnInstance ?? 0;\n message.userGuid = object.userGuid ?? \"\";\n message.collection = object.collection ?? 0;\n message.serviceId = object.serviceId ?? \"\";\n message.appType = object.appType ?? 0;\n message.spectrumInstanceId = object.spectrumInstanceId ?? \"\";\n message.spectrumSequenceId = object.spectrumSequenceId ?? 0;\n message.eventData =\n object.eventData !== undefined && object.eventData !== null\n ? ServerEventData.fromPartial(object.eventData)\n : undefined;\n return message;\n },\n};\nexport const ServerEventData = {\n fromPartial<I extends Exact<DeepPartial<ServerEventData>, I>>(object: I): ServerEventData {\n const message = createBaseServerEventData();\n message.cameraKitException =\n object.cameraKitException !== undefined && object.cameraKitException !== null\n ? CameraKitException.fromPartial(object.cameraKitException)\n : undefined;\n message.cameraKitLensSpin =\n object.cameraKitLensSpin !== undefined && object.cameraKitLensSpin !== null\n ? CameraKitLensSpin.fromPartial(object.cameraKitLensSpin)\n : undefined;\n message.cameraKitAssetDownload =\n object.cameraKitAssetDownload !== undefined && object.cameraKitAssetDownload !== null\n ? CameraKitAssetDownload.fromPartial(object.cameraKitAssetDownload)\n : undefined;\n message.cameraKitLensContentValidationFailed =\n object.cameraKitLensContentValidationFailed !== undefined && object.cameraKitLensContentValidationFailed !== null\n ? CameraKitLensContentValidationFailed.fromPartial(object.cameraKitLensContentValidationFailed)\n : undefined;\n message.cameraKitLensDownload =\n object.cameraKitLensDownload !== undefined && object.cameraKitLensDownload !== null\n ? CameraKitLensDownload.fromPartial(object.cameraKitLensDownload)\n : undefined;\n message.cameraKitAssetValidationFailed =\n object.cameraKitAssetValidationFailed !== undefined && object.cameraKitAssetValidationFailed !== null\n ? CameraKitAssetValidationFailed.fromPartial(object.cameraKitAssetValidationFailed)\n : undefined;\n message.cameraKitSession =\n object.cameraKitSession !== undefined && object.cameraKitSession !== null\n ? CameraKitSession.fromPartial(object.cameraKitSession)\n : undefined;\n message.cameraKitWebLensSwipe =\n object.cameraKitWebLensSwipe !== undefined && object.cameraKitWebLensSwipe !== null\n ? CameraKitWebLensSwipe.fromPartial(object.cameraKitWebLensSwipe)\n : undefined;\n message.cameraKitWebBenchmarkComplete =\n object.cameraKitWebBenchmarkComplete !== undefined && object.cameraKitWebBenchmarkComplete !== null\n ? CameraKitWebBenchmarkComplete.fromPartial(object.cameraKitWebBenchmarkComplete)\n : undefined;\n message.cameraKitLegalPrompt =\n object.cameraKitLegalPrompt !== undefined && object.cameraKitLegalPrompt !== null\n ? CameraKitLegalPrompt.fromPartial(object.cameraKitLegalPrompt)\n : undefined;\n return message;\n },\n};\nfunction createBaseServerEventData(): ServerEventData {\n return {\n cameraKitException: undefined,\n cameraKitLensSpin: undefined,\n cameraKitAssetDownload: undefined,\n cameraKitLensContentValidationFailed: undefined,\n cameraKitLensDownload: undefined,\n cameraKitAssetValidationFailed: undefined,\n cameraKitSession: undefined,\n cameraKitWebLensSwipe: undefined,\n cameraKitWebBenchmarkComplete: undefined,\n cameraKitLegalPrompt: undefined,\n };\n}\nfunction createBaseServerEvent(): ServerEvent {\n return {\n eventName: \"\",\n serverTs: 0,\n userId: \"\",\n userAgent: \"\",\n country: \"\",\n city: \"\",\n region: \"\",\n eventId: \"\",\n instanceId: \"\",\n sequenceId: 0,\n osType: \"\",\n osVersion: \"\",\n appVersion: \"\",\n appBuild: \"\",\n serverUploadTs: 0,\n eventTime: 0,\n serverReceiptTime: 0,\n maxSequenceIdOnInstance: 0,\n userGuid: \"\",\n collection: 0,\n serviceId: \"\",\n appType: 0,\n spectrumInstanceId: \"\",\n spectrumSequenceId: 0,\n eventData: undefined,\n };\n}\nexport interface ServerEvent {\n eventName: string;\n serverTs: number;\n userId: string;\n userAgent: string;\n country: string;\n city: string;\n region: string;\n eventId: string;\n instanceId: string;\n sequenceId: number;\n osType: string;\n osVersion: string;\n appVersion: string;\n appBuild: string;\n serverUploadTs: number;\n eventTime: number;\n serverReceiptTime: number;\n maxSequenceIdOnInstance: number;\n userGuid: string;\n collection: Collection;\n serviceId: string;\n appType: AppType;\n spectrumInstanceId: string;\n spectrumSequenceId: number;\n eventData: ServerEventData | undefined;\n}\nexport interface ServerEventData {\n cameraKitException: CameraKitException | undefined;\n cameraKitLensSpin: CameraKitLensSpin | undefined;\n cameraKitAssetDownload: CameraKitAssetDownload | undefined;\n cameraKitLensContentValidationFailed: CameraKitLensContentValidationFailed | undefined;\n cameraKitLensDownload: CameraKitLensDownload | undefined;\n cameraKitAssetValidationFailed: CameraKitAssetValidationFailed | undefined;\n cameraKitSession: CameraKitSession | undefined;\n cameraKitWebLensSwipe: CameraKitWebLensSwipe | undefined;\n cameraKitWebBenchmarkComplete: CameraKitWebBenchmarkComplete | undefined;\n cameraKitLegalPrompt: CameraKitLegalPrompt | undefined;\n}\nexport enum AppType {\n IOS_NATIVE = 0,\n IOS_WEB_DESKTOP = 1,\n IOS_WEB_MOBILE = 2,\n ANDROID_NATIVE = 3,\n ANDROID_WEB_DESKTOP = 4,\n ANDROID_WEB_MOBILE = 5,\n OSX_WEB_DESKTOP = 6,\n OSX_WEB_MOBILE = 7,\n WINDOWS_WEB_DESKTOP = 8,\n WINDOWS_WEB_MOBILE = 9,\n LINUX_WEB_DESKTOP = 10,\n LINUX_WEB_MOBILE = 11,\n LENSSTUDIO = 12,\n SNAPCAMERA = 13,\n WEB_DESKTOP = 14,\n WEB_MOBILE = 15,\n LENSSTUDIO_REMAKE = 16,\n UNRECOGNIZED = -1\n}\nexport enum Collection {\n COLLECTION_UNUSED = 0,\n GAE = 1,\n GCE_M = 2,\n GCE_S = 3,\n GCE_T = 4,\n GKE_M = 5,\n GKE_S = 6,\n GKE_T = 7,\n LOCAL = 8,\n GCE_ST = 9,\n GKE_ST = 10,\n GCE_C = 11,\n GCE_SC = 12,\n GCE_TC = 13,\n GCE_TSC = 14,\n GKE_C = 15,\n GKE_SC = 16,\n GKE_TC = 17,\n GKE_TSC = 18,\n GKE_W = 19,\n GKE_WT = 20,\n GKE_WC = 21,\n GKE_WSC = 22,\n UNRECOGNIZED = -1\n}\nexport const CameraKitLensSpin = {\n fromPartial<I extends Exact<DeepPartial<CameraKitLensSpin>, I>>(object: I): CameraKitLensSpin {\n const message = createBaseCameraKitLensSpin();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.lensId = object.lensId ?? \"\";\n message.viewTimeSec = object.viewTimeSec ?? 0;\n message.lensGroupId = object.lensGroupId ?? \"\";\n return message;\n },\n};\nfunction createBaseCameraKitLensSpin(): CameraKitLensSpin {\n return { cameraKitEventBase: undefined, lensId: \"\", viewTimeSec: 0, lensGroupId: \"\" };\n}\nexport interface CameraKitLensSpin {\n cameraKitEventBase: CameraKitEventBase | undefined;\n lensId: string;\n viewTimeSec: number;\n lensGroupId: string;\n}\nexport const CameraKitWebLensSwipe = {\n fromPartial<I extends Exact<DeepPartial<CameraKitWebLensSwipe>, I>>(object: I): CameraKitWebLensSwipe {\n const message = createBaseCameraKitWebLensSwipe();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.performanceCluster = object.performanceCluster ?? 0;\n message.webglRendererInfo = object.webglRendererInfo ?? \"\";\n message.lensId = object.lensId ?? \"\";\n message.lensFrameProcessingTimeMsAvg = object.lensFrameProcessingTimeMsAvg ?? 0;\n message.lensFrameProcessingTimeMsStd = object.lensFrameProcessingTimeMsStd ?? 0;\n message.viewTimeSec = object.viewTimeSec ?? 0;\n message.recordingTimeSec = object.recordingTimeSec ?? 0;\n message.applyDelaySec = object.applyDelaySec ?? 0;\n message.avgFps = object.avgFps ?? 0;\n message.isLensFirstWithinDay = object.isLensFirstWithinDay ?? false;\n message.isLensFirstWithinMonth = object.isLensFirstWithinMonth ?? false;\n message.lensGroupId = object.lensGroupId ?? \"\";\n return message;\n },\n};\nfunction createBaseCameraKitWebLensSwipe(): CameraKitWebLensSwipe {\n return {\n cameraKitEventBase: undefined,\n performanceCluster: 0,\n webglRendererInfo: \"\",\n lensId: \"\",\n lensFrameProcessingTimeMsAvg: 0,\n lensFrameProcessingTimeMsStd: 0,\n viewTimeSec: 0,\n recordingTimeSec: 0,\n applyDelaySec: 0,\n avgFps: 0,\n isLensFirstWithinDay: false,\n isLensFirstWithinMonth: false,\n lensGroupId: \"\",\n };\n}\nexport interface CameraKitWebLensSwipe {\n cameraKitEventBase: CameraKitEventBase | undefined;\n performanceCluster: number;\n webglRendererInfo: string;\n lensId: string;\n lensFrameProcessingTimeMsAvg: number;\n lensFrameProcessingTimeMsStd: number;\n viewTimeSec: number;\n recordingTimeSec: number;\n applyDelaySec: number;\n avgFps: number;\n isLensFirstWithinDay: boolean;\n isLensFirstWithinMonth: boolean;\n lensGroupId: string;\n}\nexport const CameraKitLensDownload = {\n fromPartial<I extends Exact<DeepPartial<CameraKitLensDownload>, I>>(object: I): CameraKitLensDownload {\n const message = createBaseCameraKitLensDownload();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.lensId = object.lensId ?? \"\";\n message.automaticDownload = object.automaticDownload ?? false;\n message.downloadTimeSec = object.downloadTimeSec ?? 0;\n message.sizeByte = object.sizeByte ?? 0;\n return message;\n },\n};\nfunction createBaseCameraKitLensDownload(): CameraKitLensDownload {\n return { cameraKitEventBase: undefined, lensId: \"\", automaticDownload: false, downloadTimeSec: 0, sizeByte: 0 };\n}\nexport interface CameraKitLensDownload {\n cameraKitEventBase: CameraKitEventBase | undefined;\n lensId: string;\n automaticDownload: boolean;\n downloadTimeSec: number;\n sizeByte: number;\n}\nexport const CameraKitAssetDownload = {\n fromPartial<I extends Exact<DeepPartial<CameraKitAssetDownload>, I>>(object: I): CameraKitAssetDownload {\n const message = createBaseCameraKitAssetDownload();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.automaticDownload = object.automaticDownload ?? false;\n message.downloadTimeSec = object.downloadTimeSec ?? 0;\n message.sizeByte = object.sizeByte ?? 0;\n message.assetId = object.assetId ?? \"\";\n return message;\n },\n};\nfunction createBaseCameraKitAssetDownload(): CameraKitAssetDownload {\n return { cameraKitEventBase: undefined, automaticDownload: false, downloadTimeSec: 0, sizeByte: 0, assetId: \"\" };\n}\nexport interface CameraKitAssetDownload {\n cameraKitEventBase: CameraKitEventBase | undefined;\n automaticDownload: boolean;\n downloadTimeSec: number;\n sizeByte: number;\n assetId: string;\n}\nexport const CameraKitException = {\n fromPartial<I extends Exact<DeepPartial<CameraKitException>, I>>(object: I): CameraKitException {\n const message = createBaseCameraKitException();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.lensId = object.lensId ?? \"\";\n message.type = object.type ?? \"\";\n message.reason = object.reason ?? \"\";\n return message;\n },\n};\nfunction createBaseCameraKitException(): CameraKitException {\n return { cameraKitEventBase: undefined, lensId: \"\", type: \"\", reason: \"\" };\n}\nexport interface CameraKitException {\n cameraKitEventBase: CameraKitEventBase | undefined;\n lensId: string;\n type: string;\n reason: string;\n}\nexport const CameraKitSession = {\n fromPartial<I extends Exact<DeepPartial<CameraKitSession>, I>>(object: I): CameraKitSession {\n const message = createBaseCameraKitSession();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.dailySessionBucket = object.dailySessionBucket ?? 0;\n message.isFirstWithinMonth = object.isFirstWithinMonth ?? false;\n message.day = object.day ?? 0;\n message.month = object.month ?? 0;\n message.year = object.year ?? 0;\n return message;\n },\n};\nfunction createBaseCameraKitSession(): CameraKitSession {\n return { cameraKitEventBase: undefined, dailySessionBucket: 0, isFirstWithinMonth: false, day: 0, month: 0, year: 0 };\n}\nexport interface CameraKitSession {\n cameraKitEventBase: CameraKitEventBase | undefined;\n dailySessionBucket: DailySessionBucket;\n isFirstWithinMonth: boolean;\n day: number;\n month: number;\n year: number;\n}\nexport enum DailySessionBucket {\n NO_SESSION_BUCKET = 0,\n ONE_SESSION = 1,\n TWO_SESSION = 2,\n THREE_SESSION = 3,\n FOUR_SESSION = 4,\n FIVE_SESSION = 5,\n SIX_SESSION = 6,\n SEVEN_SESSION = 7,\n EIGHT_SESSION = 8,\n NINE_SESSION = 9,\n TEN_OR_MORE_SESSION = 10,\n UNRECOGNIZED = -1\n}\nexport const CameraKitLensContentValidationFailed = {\n fromPartial<I extends Exact<DeepPartial<CameraKitLensContentValidationFailed>, I>>(object: I): CameraKitLensContentValidationFailed {\n const message = createBaseCameraKitLensContentValidationFailed();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.lensId = object.lensId ?? \"\";\n return message;\n },\n};\nfunction createBaseCameraKitLensContentValidationFailed(): CameraKitLensContentValidationFailed {\n return { cameraKitEventBase: undefined, lensId: \"\" };\n}\nexport interface CameraKitLensContentValidationFailed {\n cameraKitEventBase: CameraKitEventBase | undefined;\n lensId: string;\n}\nexport const CameraKitAssetValidationFailed = {\n fromPartial<I extends Exact<DeepPartial<CameraKitAssetValidationFailed>, I>>(object: I): CameraKitAssetValidationFailed {\n const message = createBaseCameraKitAssetValidationFailed();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.assetId = object.assetId ?? \"\";\n return message;\n },\n};\nfunction createBaseCameraKitAssetValidationFailed(): CameraKitAssetValidationFailed {\n return { cameraKitEventBase: undefined, assetId: \"\" };\n}\nexport interface CameraKitAssetValidationFailed {\n cameraKitEventBase: CameraKitEventBase | undefined;\n assetId: string;\n}\nexport const CameraKitWebBenchmarkComplete = {\n fromPartial<I extends Exact<DeepPartial<CameraKitWebBenchmarkComplete>, I>>(object: I): CameraKitWebBenchmarkComplete {\n const message = createBaseCameraKitWebBenchmarkComplete();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.benchmarkName = object.benchmarkName ?? \"\";\n message.benchmarkValue = object.benchmarkValue ?? 0;\n message.performanceCluster = object.performanceCluster ?? 0;\n message.webglRendererInfo = object.webglRendererInfo ?? \"\";\n return message;\n },\n};\nfunction createBaseCameraKitWebBenchmarkComplete(): CameraKitWebBenchmarkComplete {\n return {\n cameraKitEventBase: undefined,\n benchmarkName: \"\",\n benchmarkValue: 0,\n performanceCluster: 0,\n webglRendererInfo: \"\",\n };\n}\nexport interface CameraKitWebBenchmarkComplete {\n cameraKitEventBase: CameraKitEventBase | undefined;\n benchmarkName: string;\n benchmarkValue: number;\n performanceCluster: number;\n webglRendererInfo: string;\n}\nexport const CameraKitLegalPrompt = {\n fromPartial<I extends Exact<DeepPartial<CameraKitLegalPrompt>, I>>(object: I): CameraKitLegalPrompt {\n const message = createBaseCameraKitLegalPrompt();\n message.cameraKitEventBase =\n object.cameraKitEventBase !== undefined && object.cameraKitEventBase !== null\n ? CameraKitEventBase.fromPartial(object.cameraKitEventBase)\n : undefined;\n message.legalPromptId = object.legalPromptId ?? \"\";\n message.legalPromptResult = object.legalPromptResult ?? 0;\n return message;\n },\n};\nexport const CameraKitEventBase = {\n fromPartial<I extends Exact<DeepPartial<CameraKitEventBase>, I>>(object: I): CameraKitEventBase {\n const message = createBaseCameraKitEventBase();\n message.kitEventBase =\n object.kitEventBase !== undefined && object.kitEventBase !== null\n ? KitEventBase.fromPartial(object.kitEventBase)\n : undefined;\n message.deviceCluster = object.deviceCluster ?? 0;\n message.cameraKitVersion = object.cameraKitVersion ?? \"\";\n message.lensCoreVersion = object.lensCoreVersion ?? \"\";\n message.deviceModel = object.deviceModel ?? \"\";\n message.cameraKitVariant = object.cameraKitVariant ?? 0;\n message.cameraKitFlavor = object.cameraKitFlavor ?? 0;\n message.appId = object.appId ?? \"\";\n message.deviceConnectivity = object.deviceConnectivity ?? 0;\n message.sessionId = object.sessionId ?? \"\";\n message.appVendorUuid = object.appVendorUuid ?? \"\";\n message.rankingRequestId = object.rankingRequestId ?? \"\";\n message.cameraKitEnvironment = object.cameraKitEnvironment ?? 0;\n message.partnerUuid = object.partnerUuid ?? \"\";\n return message;\n },\n};\nexport const KitEventBase = {\n fromPartial<I extends Exact<DeepPartial<KitEventBase>, I>>(object: I): KitEventBase {\n const message = createBaseKitEventBase();\n message.oauthClientId = object.oauthClientId ?? \"\";\n message.locale = object.locale ?? \"\";\n message.kitUserAgent = object.kitUserAgent ?? \"\";\n message.ipAddress = object.ipAddress ?? \"\";\n message.osMinorVersion = object.osMinorVersion ?? \"\";\n message.kitVariant = object.kitVariant ?? 0;\n message.kitVariantVersion = object.kitVariantVersion ?? \"\";\n message.kitClientTimestampMillis = object.kitClientTimestampMillis ?? 0;\n message.clientSequenceId = object.clientSequenceId ?? 0;\n message.maxClientSequenceIdOnInstance = object.maxClientSequenceIdOnInstance ?? 0;\n message.targetArchitecture = object.targetArchitecture ?? \"\";\n message.runningWithDebuggerAttached = object.runningWithDebuggerAttached ?? false;\n message.runningInTests = object.runningInTests ?? false;\n message.runningInSimulator = object.runningInSimulator ?? false;\n message.isAppPrerelease = object.isAppPrerelease ?? false;\n message.kitAppId = object.kitAppId ?? \"\";\n message.kitSessionId = object.kitSessionId ?? \"\";\n message.kitPluginType = object.kitPluginType ?? 0;\n message.isFromReactNativePlugin = object.isFromReactNativePlugin ?? false;\n return message;\n },\n};\nfunction createBaseKitEventBase(): KitEventBase {\n return {\n oauthClientId: \"\",\n locale: \"\",\n kitUserAgent: \"\",\n ipAddress: \"\",\n osMinorVersion: \"\",\n kitVariant: 0,\n kitVariantVersion: \"\",\n kitClientTimestampMillis: 0,\n clientSequenceId: 0,\n maxClientSequenceIdOnInstance: 0,\n targetArchitecture: \"\",\n runningWithDebuggerAttached: false,\n runningInTests: false,\n runningInSimulator: false,\n isAppPrerelease: false,\n kitAppId: \"\",\n kitSessionId: \"\",\n kitPluginType: 0,\n isFromReactNativePlugin: false,\n };\n}\nfunction createBaseCameraKitEventBase(): CameraKitEventBase {\n return {\n kitEventBase: undefined,\n deviceCluster: 0,\n cameraKitVersion: \"\",\n lensCoreVersion: \"\",\n deviceModel: \"\",\n cameraKitVariant: 0,\n cameraKitFlavor: 0,\n appId: \"\",\n deviceConnectivity: 0,\n sessionId: \"\",\n appVendorUuid: \"\",\n rankingRequestId: \"\",\n cameraKitEnvironment: 0,\n partnerUuid: \"\",\n };\n}\nfunction createBaseCameraKitLegalPrompt(): CameraKitLegalPrompt {\n return { cameraKitEventBase: undefined, legalPromptId: \"\", legalPromptResult: 0 };\n}\nexport interface CameraKitLegalPrompt {\n cameraKitEventBase: CameraKitEventBase | undefined;\n legalPromptId: string;\n legalPromptResult: CameraKitLegalPromptResult;\n}\nexport enum CameraKitLegalPromptResult {\n CAMERA_KIT_LEGAL_PROMPT_MISSING = 0,\n CAMERA_KIT_LEGAL_PROMPT_ACCEPTED = 1,\n CAMERA_KIT_LEGAL_PROMPT_DISMISSED = 2,\n UNRECOGNIZED = -1\n}\nexport interface CameraKitEventBase {\n kitEventBase: KitEventBase | undefined;\n deviceCluster: number;\n cameraKitVersion: string;\n lensCoreVersion: string;\n deviceModel: string;\n cameraKitVariant: CameraKitVariant;\n cameraKitFlavor: CameraKitFlavor;\n appId: string;\n deviceConnectivity: CameraKitConnectivityType;\n sessionId: string;\n appVendorUuid: string;\n rankingRequestId: string;\n cameraKitEnvironment: CameraKitEnvironment;\n partnerUuid: string;\n}\nexport enum CameraKitEnvironment {\n CAMERA_KIT_ENVIRONMENT_UNKNOWN = 0,\n CAMERA_KIT_ENVIRONMENT_STAGING = 1,\n CAMERA_KIT_ENVIRONMENT_PRODUCTION = 2,\n UNRECOGNIZED = -1\n}\nexport enum CameraKitConnectivityType {\n CAMERA_KIT_CONNECTIVITY_TYPE_UNKNOWN = 0,\n CAMERA_KIT_CONNECTIVITY_TYPE_WIFI = 1,\n CAMERA_KIT_CONNECTIVITY_TYPE_MOBILE = 2,\n CAMERA_KIT_CONNECTIVITY_TYPE_UNREACHABLE = 3,\n CAMERA_KIT_CONNECTIVITY_TYPE_BLUETOOTH = 4,\n UNRECOGNIZED = -1\n}\nexport enum CameraKitFlavor {\n CAMERA_KIT_FLAVOR_UNKNOWN = 0,\n CAMERA_KIT_FLAVOR_DEBUG = 1,\n CAMERA_KIT_FLAVOR_RELEASE = 2,\n UNRECOGNIZED = -1\n}\nexport enum CameraKitVariant {\n CAMERA_KIT_VARIANT_UNKNOWN = 0,\n CAMERA_KIT_VARIANT_PARTNER = 1,\n CAMERA_KIT_VARIANT_PUBLIC = 2,\n UNRECOGNIZED = -1\n}\nexport interface KitEventBase {\n oauthClientId: string;\n locale: string;\n kitUserAgent: string;\n ipAddress: string;\n osMinorVersion: string;\n kitVariant: KitType;\n kitVariantVersion: string;\n kitClientTimestampMillis: number;\n clientSequenceId: number;\n maxClientSequenceIdOnInstance: number;\n targetArchitecture: string;\n runningWithDebuggerAttached: boolean;\n runningInTests: boolean;\n runningInSimulator: boolean;\n isAppPrerelease: boolean;\n kitAppId: string;\n kitSessionId: string;\n kitPluginType: KitPluginType;\n isFromReactNativePlugin: boolean;\n}\nexport enum KitPluginType {\n NO_PLUGIN = 0,\n UNITY = 1,\n UNRECOGNIZED = -1\n}\nexport enum KitType {\n UNKNOWN_KIT_TYPE = 0,\n BITMOJI_KIT = 1,\n CREATIVE_KIT = 2,\n LOGIN_KIT = 3,\n STORY_KIT = 4,\n CAMERA_KIT = 5,\n SHOP_KIT = 6,\n EULA_KIT = 7,\n PAYMENTS_KIT = 8,\n INVITE_KIT = 9,\n CAMERA_KIT_WEB = 10,\n UNRECOGNIZED = -1\n}\nexport 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 {} ? {\n [K in keyof T]?: DeepPartial<T[K]>;\n} : Partial<T>;\nexport type Exact<P, I extends P> = P extends Builtin ? P : P & {\n [K in keyof P]: Exact<P[K], I[K]>;\n} & Record<Exclude<keyof I, KeysOfUnion<P>>, never>;\ntype KeysOfUnion<T> = T extends T ? keyof T : never;\ntype Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;\n"]}
|
|
@@ -1,34 +1,31 @@
|
|
|
1
1
|
import _m0 from "protobufjs/minimal";
|
|
2
2
|
export declare const protobufPackage = "com.snap.camerakit.v3";
|
|
3
3
|
export declare enum CameraKitFlavor {
|
|
4
|
-
CAMERA_KIT_FLAVOR_UNSET =
|
|
5
|
-
CAMERA_KIT_FLAVOR_DEBUG =
|
|
6
|
-
CAMERA_KIT_FLAVOR_RELEASE =
|
|
7
|
-
UNRECOGNIZED =
|
|
4
|
+
CAMERA_KIT_FLAVOR_UNSET = 0,
|
|
5
|
+
CAMERA_KIT_FLAVOR_DEBUG = 1,
|
|
6
|
+
CAMERA_KIT_FLAVOR_RELEASE = 2,
|
|
7
|
+
UNRECOGNIZED = -1
|
|
8
8
|
}
|
|
9
9
|
export declare function cameraKitFlavorFromJSON(object: any): CameraKitFlavor;
|
|
10
10
|
export declare function cameraKitFlavorToJSON(object: CameraKitFlavor): string;
|
|
11
|
-
export declare function cameraKitFlavorToNumber(object: CameraKitFlavor): number;
|
|
12
11
|
export declare enum CameraKitConnectivityType {
|
|
13
|
-
CAMERA_KIT_CONNECTIVITY_TYPE_UNSET =
|
|
14
|
-
CAMERA_KIT_CONNECTIVITY_TYPE_WIFI =
|
|
15
|
-
CAMERA_KIT_CONNECTIVITY_TYPE_MOBILE =
|
|
16
|
-
CAMERA_KIT_CONNECTIVITY_TYPE_UNREACHABLE =
|
|
17
|
-
CAMERA_KIT_CONNECTIVITY_TYPE_BLUETOOTH =
|
|
18
|
-
UNRECOGNIZED =
|
|
12
|
+
CAMERA_KIT_CONNECTIVITY_TYPE_UNSET = 0,
|
|
13
|
+
CAMERA_KIT_CONNECTIVITY_TYPE_WIFI = 1,
|
|
14
|
+
CAMERA_KIT_CONNECTIVITY_TYPE_MOBILE = 2,
|
|
15
|
+
CAMERA_KIT_CONNECTIVITY_TYPE_UNREACHABLE = 3,
|
|
16
|
+
CAMERA_KIT_CONNECTIVITY_TYPE_BLUETOOTH = 4,
|
|
17
|
+
UNRECOGNIZED = -1
|
|
19
18
|
}
|
|
20
19
|
export declare function cameraKitConnectivityTypeFromJSON(object: any): CameraKitConnectivityType;
|
|
21
20
|
export declare function cameraKitConnectivityTypeToJSON(object: CameraKitConnectivityType): string;
|
|
22
|
-
export declare function cameraKitConnectivityTypeToNumber(object: CameraKitConnectivityType): number;
|
|
23
21
|
export declare enum CameraKitEnvironment {
|
|
24
|
-
CAMERA_KIT_ENVIRONMENT_UNSET =
|
|
25
|
-
CAMERA_KIT_ENVIRONMENT_STAGING =
|
|
26
|
-
CAMERA_KIT_ENVIRONMENT_PRODUCTION =
|
|
27
|
-
UNRECOGNIZED =
|
|
22
|
+
CAMERA_KIT_ENVIRONMENT_UNSET = 0,
|
|
23
|
+
CAMERA_KIT_ENVIRONMENT_STAGING = 1,
|
|
24
|
+
CAMERA_KIT_ENVIRONMENT_PRODUCTION = 2,
|
|
25
|
+
UNRECOGNIZED = -1
|
|
28
26
|
}
|
|
29
27
|
export declare function cameraKitEnvironmentFromJSON(object: any): CameraKitEnvironment;
|
|
30
28
|
export declare function cameraKitEnvironmentToJSON(object: CameraKitEnvironment): string;
|
|
31
|
-
export declare function cameraKitEnvironmentToNumber(object: CameraKitEnvironment): number;
|
|
32
29
|
export interface ExtensionEventBase {
|
|
33
30
|
extensionName: string;
|
|
34
31
|
extensionVersion: string;
|
|
@@ -43,6 +40,7 @@ export interface ExtensionEventBase {
|
|
|
43
40
|
cameraKitEnvironment: CameraKitEnvironment;
|
|
44
41
|
}
|
|
45
42
|
export declare const ExtensionEventBase: {
|
|
43
|
+
encode(message: ExtensionEventBase, writer?: _m0.Writer): _m0.Writer;
|
|
46
44
|
decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionEventBase;
|
|
47
45
|
fromJSON(object: any): ExtensionEventBase;
|
|
48
46
|
toJSON(message: ExtensionEventBase): unknown;
|