@snap/camera-kit 0.15.0 → 0.16.2
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/README.md +3 -3
- package/docs/html/assets/main.js +4 -3
- package/docs/html/assets/navigation.js +1 -0
- package/docs/html/assets/search.js +1 -1
- package/docs/html/assets/style.css +72 -25
- package/docs/html/classes/CameraKit.html +11 -196
- package/docs/html/classes/CameraKitSession.html +43 -366
- package/docs/html/classes/CameraKitSource.html +14 -223
- package/docs/html/classes/LensPerformanceMeasurement.html +9 -184
- package/docs/html/classes/LensPerformanceMetrics.html +7 -148
- package/docs/html/classes/LensRepository.html +17 -234
- package/docs/html/classes/Transform2D.html +7 -176
- package/docs/html/classes/TypedCustomEvent.html +4 -178
- package/docs/html/classes/TypedEventTarget.html +4 -209
- package/docs/html/enums/Lens_CameraFacing.html +5 -0
- package/docs/html/enums/UserData_Zodiac.html +15 -0
- package/docs/html/functions/ConcatInjectable.html +10 -193
- package/docs/html/functions/Injectable.html +9 -192
- package/docs/html/functions/bootstrapCameraKit.html +6 -147
- package/docs/html/functions/createExtension.html +6 -123
- package/docs/html/functions/createImageSource.html +4 -130
- package/docs/html/functions/createMediaStreamSource.html +4 -130
- package/docs/html/functions/createVideoSource.html +4 -130
- package/docs/html/functions/estimateLensPerformance.html +3 -120
- package/docs/html/functions/lensSourcesFactory.html +6 -127
- package/docs/html/functions/remoteApiServicesFactory.html +3 -121
- package/docs/html/hierarchy.html +1 -0
- package/docs/html/index.html +8 -165
- package/docs/html/interfaces/CameraKitBootstrapConfiguration.html +11 -192
- package/docs/html/interfaces/CameraKitDeviceOptions.html +11 -0
- package/docs/html/interfaces/CameraKitSourceInfo.html +9 -0
- package/docs/html/interfaces/CameraKitSourceSubscriber.html +3 -194
- package/docs/html/interfaces/ComputedFrameMetrics.html +2 -150
- package/docs/html/interfaces/CreateSessionOptions.html +5 -148
- package/docs/html/interfaces/EstimatedLensPerformance.html +3 -146
- package/docs/html/interfaces/FunctionSourceOptions.html +7 -0
- package/docs/html/interfaces/Lens.html +12 -205
- package/docs/html/interfaces/LensCreator.html +3 -0
- package/docs/html/interfaces/LensLaunchData.html +3 -179
- package/docs/html/interfaces/LensSource.html +3 -172
- package/docs/html/interfaces/LoadAssetRequest.html +13 -0
- package/docs/html/interfaces/MediaStreamSourceOptions.html +16 -138
- package/docs/html/interfaces/Preview.html +4 -141
- package/docs/html/interfaces/RemoteApiRequest.html +7 -162
- package/docs/html/interfaces/RemoteApiResponse.html +6 -155
- package/docs/html/interfaces/RemoteApiService.html +9 -171
- package/docs/html/interfaces/Snapcode.html +5 -148
- package/docs/html/interfaces/UriCancelRequest.html +2 -138
- package/docs/html/interfaces/UriRequest.html +2 -154
- package/docs/html/interfaces/UriResponse.html +2 -150
- package/docs/html/interfaces/VideoSourceOptions.html +15 -134
- package/docs/html/modules.html +57 -175
- package/docs/html/types/AssetLoader.html +5 -132
- package/docs/html/types/AssetResponse.html +1 -0
- package/docs/html/types/AssetTiming.html +2 -115
- package/docs/html/types/BenchmarkError.html +1 -112
- package/docs/html/types/BootstrapError.html +2 -115
- package/docs/html/types/CacheKeyNotFoundError.html +1 -112
- package/docs/html/types/CameraKitSessionEventListener.html +2 -115
- package/docs/html/types/CameraKitSessionEvents.html +2 -122
- package/docs/html/types/CameraKitSourceError.html +1 -112
- package/docs/html/types/ConfigurationError.html +2 -115
- package/docs/html/types/FetchHandler.html +1 -0
- package/docs/html/types/Keyboard.html +14 -194
- package/docs/html/types/KeyboardEvents.html +2 -124
- package/docs/html/types/LegalError.html +1 -112
- package/docs/html/types/LensAbortError.html +2 -115
- package/docs/html/types/LensAssetError.html +2 -115
- package/docs/html/types/LensContentValidationError.html +1 -112
- package/docs/html/types/LensError.html +1 -112
- package/docs/html/types/LensExecutionError.html +2 -115
- package/docs/html/types/LensImagePickerError.html +2 -115
- package/docs/html/types/LensLaunchParams.html +2 -0
- package/docs/html/types/LensMetricsEvents.html +2 -115
- package/docs/html/types/LensPerformanceCluster.html +1 -113
- package/docs/html/types/LensView.html +2 -115
- package/docs/html/types/LensWait.html +2 -115
- package/docs/html/types/Matrix.html +3 -0
- package/docs/html/types/PersistentStoreError.html +2 -115
- package/docs/html/types/PlatformNotSupportedError.html +2 -115
- package/docs/html/types/PublicContainer.html +2 -115
- package/docs/html/types/PublicServices.html +2 -0
- package/docs/html/types/RemoteApiCancelRequestHandler.html +2 -0
- package/docs/html/types/RemoteApiRequestHandler.html +2 -139
- package/docs/html/types/RemoteApiServices.html +1 -112
- package/docs/html/types/RemoteApiStatus.html +2 -115
- package/docs/html/types/RenderTarget.html +2 -115
- package/docs/html/types/Uri.html +1 -112
- package/docs/html/types/WebGLError.html +1 -112
- package/docs/html/variables/extensionRequestContext.html +2 -115
- package/docs/md/README.md +3 -3
- package/docs/md/classes/CameraKit.md +15 -15
- package/docs/md/classes/CameraKitSession.md +38 -38
- package/docs/md/classes/CameraKitSource.md +22 -30
- package/docs/md/classes/LensPerformanceMeasurement.md +10 -6
- package/docs/md/classes/LensPerformanceMetrics.md +2 -2
- package/docs/md/classes/LensRepository.md +18 -18
- package/docs/md/classes/Transform2D.md +7 -3
- package/docs/md/classes/TypedCustomEvent.md +10 -6
- package/docs/md/classes/TypedEventTarget.md +12 -8
- package/docs/md/enums/Lens_CameraFacing.md +36 -0
- package/docs/md/enums/UserData_Zodiac.md +106 -0
- package/docs/md/interfaces/CameraKitBootstrapConfiguration.md +2 -2
- package/docs/md/interfaces/CameraKitDeviceOptions.md +41 -0
- package/docs/md/interfaces/CameraKitSourceInfo.md +43 -0
- package/docs/md/interfaces/CameraKitSourceSubscriber.md +7 -7
- 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/FunctionSourceOptions.md +22 -0
- package/docs/md/interfaces/Lens.md +4 -4
- package/docs/md/interfaces/LensCreator.md +17 -0
- package/docs/md/interfaces/LensLaunchData.md +6 -6
- package/docs/md/interfaces/LensSource.md +5 -5
- package/docs/md/interfaces/LoadAssetRequest.md +49 -0
- package/docs/md/interfaces/MediaStreamSourceOptions.md +46 -1
- package/docs/md/interfaces/Preview.md +1 -1
- package/docs/md/interfaces/RemoteApiRequest.md +2 -2
- package/docs/md/interfaces/RemoteApiResponse.md +2 -2
- package/docs/md/interfaces/RemoteApiService.md +1 -1
- package/docs/md/interfaces/Snapcode.md +1 -1
- package/docs/md/interfaces/UriCancelRequest.md +2 -2
- package/docs/md/interfaces/UriRequest.md +3 -3
- package/docs/md/interfaces/UriResponse.md +2 -2
- package/docs/md/interfaces/VideoSourceOptions.md +44 -1
- package/docs/md/modules.md +183 -201
- package/lib/CameraKit.d.ts +108 -108
- package/lib/CameraKit.js +1 -1
- package/lib/CameraKit.js.map +1 -1
- package/lib/bootstrapCameraKit.d.ts +4 -4
- package/lib/bootstrapCameraKit.js +18 -19
- package/lib/bootstrapCameraKit.js.map +1 -1
- package/lib/clients/createTsProtoClient.d.ts +5 -12
- package/lib/clients/createTsProtoClient.js +1 -2
- package/lib/clients/createTsProtoClient.js.map +1 -1
- package/lib/clients/grpcHandler.d.ts +7 -4
- package/lib/clients/grpcHandler.js +8 -5
- package/lib/clients/grpcHandler.js.map +1 -1
- package/lib/clients/lensesClient.d.ts +3 -3
- package/lib/clients/lensesClient.js +2 -2
- package/lib/clients/lensesClient.js.map +1 -1
- package/lib/clients/metricsClient.d.ts +26 -0
- package/lib/clients/metricsClient.js +120 -0
- package/lib/clients/metricsClient.js.map +1 -0
- package/lib/configuration.js +1 -1
- package/lib/configuration.js.map +1 -1
- package/lib/dependency-injection/Container.d.ts +1 -1
- package/lib/dependency-injection/Container.js +1 -1
- package/lib/dependency-injection/Container.js.map +1 -1
- package/lib/dependency-injection/Injectable.d.ts +6 -6
- package/lib/dependency-injection/Injectable.js.map +1 -1
- package/lib/dependency-injection/RootServices.d.ts +7 -8
- package/lib/dependency-injection/RootServices.js.map +1 -1
- package/lib/environment.d.ts +4 -0
- package/lib/environment.js +2 -0
- package/lib/environment.js.map +1 -0
- package/lib/extensions/RemoteApiServices.d.ts +2 -2
- package/lib/extensions/RemoteApiServices.js +11 -6
- package/lib/extensions/RemoteApiServices.js.map +1 -1
- package/lib/extensions/uriHandlersRegister.d.ts +4 -4
- package/lib/extensions/uriHandlersRegister.js +6 -6
- package/lib/extensions/uriHandlersRegister.js.map +1 -1
- package/lib/generated-proto/blizzard/cameraKitEvents.d.ts +4330 -678
- package/lib/generated-proto/blizzard/cameraKitEvents.js +515 -72
- package/lib/generated-proto/blizzard/cameraKitEvents.js.map +1 -1
- package/lib/generated-proto/pb_schema/camera_kit/v3/business_events.d.ts +3 -11
- package/lib/generated-proto/pb_schema/camera_kit/v3/business_events.js +6 -156
- 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 +19 -19
- package/lib/generated-proto/pb_schema/camera_kit/v3/export.js +13 -27
- 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 +0 -6
- package/lib/generated-proto/pb_schema/camera_kit/v3/legal_prompt.js +2 -83
- 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 +0 -22
- package/lib/generated-proto/pb_schema/camera_kit/v3/lens.js +0 -263
- 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 +30 -34
- package/lib/generated-proto/pb_schema/camera_kit/v3/operational_metrics.js +7 -73
- 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 +0 -6
- package/lib/generated-proto/pb_schema/camera_kit/v3/ranking.js +0 -110
- 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 +48 -114
- package/lib/generated-proto/pb_schema/camera_kit/v3/service.js +0 -225
- package/lib/generated-proto/pb_schema/camera_kit/v3/service.js.map +1 -1
- package/lib/generated-proto/pb_schema/cdp/cof/benchmark.d.ts +6 -6
- package/lib/generated-proto/pb_schema/cdp/cof/benchmark.js +5 -19
- package/lib/generated-proto/pb_schema/cdp/cof/benchmark.js.map +1 -1
- package/lib/generated-proto/pb_schema/cdp/cof/circumstance_service.d.ts +1422 -1422
- package/lib/generated-proto/pb_schema/cdp/cof/config_request.d.ts +12 -12
- package/lib/generated-proto/pb_schema/cdp/cof/config_request.js +10 -24
- package/lib/generated-proto/pb_schema/cdp/cof/config_request.js.map +1 -1
- package/lib/generated-proto/pb_schema/cdp/cof/config_response.d.ts +207 -207
- package/lib/generated-proto/pb_schema/cdp/cof/config_result.d.ts +530 -530
- package/lib/generated-proto/pb_schema/cdp/cof/config_result.js +10 -24
- package/lib/generated-proto/pb_schema/cdp/cof/config_result.js.map +1 -1
- package/lib/generated-proto/pb_schema/common/value.d.ts +6 -6
- package/lib/generated-proto/pb_schema/common/value.js +4 -18
- package/lib/generated-proto/pb_schema/common/value.js.map +1 -1
- package/lib/generated-proto/pb_schema/google/api/http.d.ts +0 -6
- package/lib/generated-proto/pb_schema/google/api/http.js +0 -77
- package/lib/generated-proto/pb_schema/google/api/http.js.map +1 -1
- package/lib/generated-proto/pb_schema/google/protobuf/any.d.ts +0 -2
- package/lib/generated-proto/pb_schema/google/protobuf/any.js +0 -44
- package/lib/generated-proto/pb_schema/google/protobuf/any.js.map +1 -1
- package/lib/generated-proto/pb_schema/google/protobuf/descriptor.d.ts +4830 -4896
- package/lib/generated-proto/pb_schema/google/protobuf/descriptor.js +10 -997
- package/lib/generated-proto/pb_schema/google/protobuf/descriptor.js.map +1 -1
- package/lib/generated-proto/pb_schema/google/protobuf/timestamp.d.ts +3 -5
- package/lib/generated-proto/pb_schema/google/protobuf/timestamp.js +6 -35
- package/lib/generated-proto/pb_schema/google/protobuf/timestamp.js.map +1 -1
- package/lib/generated-proto/pb_schema/google/protobuf/wrappers.d.ts +6 -6
- package/lib/generated-proto/pb_schema/google/protobuf/wrappers.js +10 -24
- package/lib/generated-proto/pb_schema/google/protobuf/wrappers.js.map +1 -1
- package/lib/generated-proto/pb_schema/lenses/launchdata.d.ts +9 -9
- package/lib/generated-proto/pb_schema/lenses/remote_api/remote_api_service.d.ts +11 -11
- package/lib/generated-proto/pb_schema/lenses/remote_api/remote_api_service.js +6 -20
- package/lib/generated-proto/pb_schema/lenses/remote_api/remote_api_service.js.map +1 -1
- package/lib/generated-proto/pb_schema/lenses/snappable.d.ts +42 -42
- package/lib/generated-proto/pb_schema/lenses/snappable.js +14 -28
- package/lib/generated-proto/pb_schema/lenses/snappable.js.map +1 -1
- package/lib/generated-proto/pb_schema/lenses/user_data.d.ts +8 -8
- package/lib/generated-proto/pb_schema/lenses/user_data.js +8 -22
- package/lib/generated-proto/pb_schema/lenses/user_data.js.map +1 -1
- package/lib/handlers/defaultFetchHandler.d.ts +1 -1
- package/lib/handlers/defaultFetchHandler.js.map +1 -1
- package/lib/handlers/requestStateEmittingHandler.d.ts +5 -6
- package/lib/handlers/requestStateEmittingHandler.js +6 -8
- package/lib/handlers/requestStateEmittingHandler.js.map +1 -1
- package/lib/handlers/responseCachingHandler.d.ts +9 -10
- package/lib/handlers/responseCachingHandler.js +9 -3
- package/lib/handlers/responseCachingHandler.js.map +1 -1
- package/lib/handlers/utils.d.ts +12 -0
- package/lib/handlers/utils.js +19 -0
- package/lib/handlers/utils.js.map +1 -0
- package/lib/index.d.ts +21 -15
- package/lib/index.js +17 -12
- package/lib/index.js.map +1 -1
- package/lib/lens/Lens.d.ts +12 -2
- package/lib/lens/Lens.js +5 -0
- package/lib/lens/Lens.js.map +1 -1
- package/lib/lens/LensLaunchData.d.ts +6 -3
- package/lib/lens/LensLaunchData.js +2 -0
- package/lib/lens/LensLaunchData.js.map +1 -1
- package/lib/lens/LensPersistenceStore.d.ts +1 -1
- package/lib/lens/LensPersistenceStore.js +1 -1
- package/lib/lens/LensPersistenceStore.js.map +1 -1
- package/lib/lens/LensRepository.d.ts +5 -1
- package/lib/lens/LensRepository.js +9 -5
- package/lib/lens/LensRepository.js.map +1 -1
- package/lib/lens/LensSource.d.ts +2 -2
- package/lib/lens/LensSource.js +2 -2
- package/lib/lens/LensSource.js.map +1 -1
- package/lib/lens/assets/LensAssetRepository.d.ts +35 -4
- package/lib/lens/assets/LensAssetRepository.js +9 -9
- package/lib/lens/assets/LensAssetRepository.js.map +1 -1
- package/lib/lens/assets/LensAssetsProvider.d.ts +1 -1
- package/lib/lens/assets/LensAssetsProvider.js +9 -4
- package/lib/lens/assets/LensAssetsProvider.js.map +1 -1
- package/lib/lens/assets/deviceDependentAssetLoader.js +3 -2
- package/lib/lens/assets/deviceDependentAssetLoader.js.map +1 -1
- package/lib/lens/assets/remoteMediaAssetLoaderFactory.js +4 -3
- package/lib/lens/assets/remoteMediaAssetLoaderFactory.js.map +1 -1
- package/lib/lens/assets/staticAssetLoader.js +5 -4
- package/lib/lens/assets/staticAssetLoader.js.map +1 -1
- package/lib/lens/cameraKitLensSource.js.map +1 -1
- package/lib/lens-client-interface/imagePicker.d.ts +2 -1
- package/lib/lens-client-interface/imagePicker.js.map +1 -1
- package/lib/lens-client-interface/lensClientInterface.d.ts +1 -1
- package/lib/lens-client-interface/lensClientInterface.js +1 -1
- package/lib/lens-client-interface/lensClientInterface.js.map +1 -1
- package/lib/lens-core-module/lensCore.d.ts +2 -1
- package/lib/lens-core-module/lensCore.js.map +1 -1
- package/lib/lens-core-module/loader/bootstrapURLs.d.ts +12 -0
- package/lib/lens-core-module/loader/bootstrapURLs.js +48 -0
- package/lib/lens-core-module/loader/bootstrapURLs.js.map +1 -0
- package/lib/lens-core-module/loader/lensCoreFactory.d.ts +0 -12
- package/lib/lens-core-module/loader/lensCoreFactory.js +4 -49
- package/lib/lens-core-module/loader/lensCoreFactory.js.map +1 -1
- package/lib/lensCoreWasmVersions.d.ts +6 -0
- package/lib/lensCoreWasmVersions.js +6 -0
- package/lib/lensCoreWasmVersions.js.map +1 -0
- package/lib/media-sources/CameraKitSource.d.ts +39 -17
- package/lib/media-sources/CameraKitSource.js +8 -2
- package/lib/media-sources/CameraKitSource.js.map +1 -1
- package/lib/media-sources/FunctionSource.d.ts +15 -4
- package/lib/media-sources/FunctionSource.js +1 -2
- package/lib/media-sources/FunctionSource.js.map +1 -1
- package/lib/media-sources/ImageSource.d.ts +3 -5
- package/lib/media-sources/ImageSource.js +1 -3
- package/lib/media-sources/ImageSource.js.map +1 -1
- package/lib/media-sources/MediaStreamSource.d.ts +17 -33
- package/lib/media-sources/MediaStreamSource.js +6 -41
- package/lib/media-sources/MediaStreamSource.js.map +1 -1
- package/lib/media-sources/VideoSource.d.ts +14 -10
- package/lib/media-sources/VideoSource.js +5 -11
- package/lib/media-sources/VideoSource.js.map +1 -1
- package/lib/metrics/businessEventsReporter.d.ts +3 -4
- package/lib/metrics/businessEventsReporter.js +11 -55
- package/lib/metrics/businessEventsReporter.js.map +1 -1
- package/lib/metrics/operational/Count.d.ts +2 -0
- package/lib/metrics/operational/Count.js +6 -1
- package/lib/metrics/operational/Count.js.map +1 -1
- package/lib/metrics/operational/Histogram.d.ts +1 -1
- package/lib/metrics/operational/Histogram.js +7 -3
- package/lib/metrics/operational/Histogram.js.map +1 -1
- package/lib/metrics/operational/Metric.js +2 -0
- package/lib/metrics/operational/Metric.js.map +1 -1
- package/lib/metrics/operational/Timer.d.ts +9 -6
- package/lib/metrics/operational/Timer.js +12 -26
- package/lib/metrics/operational/Timer.js.map +1 -1
- package/lib/metrics/reporters/reportBenchmarks.d.ts +3 -3
- package/lib/metrics/reporters/reportBenchmarks.js +6 -5
- package/lib/metrics/reporters/reportBenchmarks.js.map +1 -1
- package/lib/metrics/reporters/reportGlobalException.d.ts +4 -4
- package/lib/metrics/reporters/reportGlobalException.js +13 -11
- package/lib/metrics/reporters/reportGlobalException.js.map +1 -1
- package/lib/metrics/reporters/reportHttpMetrics.d.ts +3 -3
- package/lib/metrics/reporters/reportHttpMetrics.js +19 -16
- package/lib/metrics/reporters/reportHttpMetrics.js.map +1 -1
- package/lib/metrics/reporters/reportLegalState.d.ts +3 -3
- package/lib/metrics/reporters/reportLegalState.js +7 -9
- package/lib/metrics/reporters/reportLegalState.js.map +1 -1
- package/lib/metrics/reporters/reportLensAndAssetDownload.d.ts +3 -3
- package/lib/metrics/reporters/reportLensAndAssetDownload.js +12 -12
- package/lib/metrics/reporters/reportLensAndAssetDownload.js.map +1 -1
- package/lib/metrics/reporters/reportLensView.d.ts +3 -3
- package/lib/metrics/reporters/reportLensView.js +6 -6
- package/lib/metrics/reporters/reportLensView.js.map +1 -1
- package/lib/metrics/reporters/reportLensWait.d.ts +2 -3
- package/lib/metrics/reporters/reportLensWait.js +1 -3
- package/lib/metrics/reporters/reportLensWait.js.map +1 -1
- package/lib/metrics/reporters/reportPlatformCapabilities.d.ts +3 -3
- package/lib/metrics/reporters/reportPlatformCapabilities.js +6 -5
- package/lib/metrics/reporters/reportPlatformCapabilities.js.map +1 -1
- package/lib/metrics/reporters/reportUserSession.js +3 -3
- package/lib/metrics/reporters/reportUserSession.js.map +1 -1
- package/lib/metrics/reporters/reporters.d.ts +2 -2
- package/lib/namedErrors.d.ts +1 -1
- package/lib/namedErrors.js +1 -1
- package/lib/namedErrors.js.map +1 -1
- package/lib/observable-operators/unsubscribed.d.ts +1 -1
- package/lib/observable-operators/unsubscribed.js +1 -1
- package/lib/observable-operators/unsubscribed.js.map +1 -1
- package/lib/platform/platformCapabilities.d.ts +1 -1
- package/lib/platform/platformCapabilities.js +9 -3
- package/lib/platform/platformCapabilities.js.map +1 -1
- package/lib/platform/platformInfo.d.ts +1 -0
- package/lib/platform/platformInfo.js +3 -3
- package/lib/platform/platformInfo.js.map +1 -1
- package/lib/remote-configuration/cofHandler.d.ts +3 -3
- package/lib/remote-configuration/cofHandler.js +6 -4
- package/lib/remote-configuration/cofHandler.js.map +1 -1
- package/lib/remote-configuration/preloadConfiguration.d.ts +1 -1
- package/lib/remote-configuration/preloadConfiguration.js +1 -1
- package/lib/remote-configuration/preloadConfiguration.js.map +1 -1
- package/lib/remote-configuration/remoteConfiguration.d.ts +7 -6
- package/lib/remote-configuration/remoteConfiguration.js +18 -15
- package/lib/remote-configuration/remoteConfiguration.js.map +1 -1
- package/lib/session/CameraKitSession.d.ts +8 -8
- package/lib/session/CameraKitSession.js +11 -9
- package/lib/session/CameraKitSession.js.map +1 -1
- package/lib/session/LensKeyboard.d.ts +2 -3
- package/lib/session/LensKeyboard.js.map +1 -1
- package/lib/session/LensPerformanceMeasurement.d.ts +1 -1
- package/lib/session/LensPerformanceMeasurement.js +3 -3
- package/lib/session/LensPerformanceMeasurement.js.map +1 -1
- package/lib/session/LensPerformanceMetrics.d.ts +1 -1
- package/lib/session/LensPerformanceMetrics.js.map +1 -1
- package/lib/session/lensState.d.ts +4 -4
- package/lib/session/lensState.js +10 -10
- package/lib/session/lensState.js.map +1 -1
- package/lib/transforms/Transform2D.d.ts +8 -3
- package/lib/transforms/Transform2D.js +1 -1
- package/lib/transforms/Transform2D.js.map +1 -1
- package/lib/utils.d.ts +3 -0
- package/lib/utils.js +4 -0
- package/lib/utils.js.map +1 -0
- package/package.json +27 -6
- package/docs/html/functions/createUserMediaSource.html +0 -138
- package/docs/html/functions/getRequiredBootstrapURLs.html +0 -130
- package/docs/html/types/CameraKitDeviceInfo.html +0 -125
- package/docs/html/types/CameraKitDeviceOptions.html +0 -120
- package/docs/html/types/CameraKitSourceInfo.html +0 -112
- package/docs/html/types/CameraKitSourceOptions.html +0 -118
- package/lib/common/index.d.ts +0 -2
- package/lib/common/index.js +0 -3
- package/lib/common/index.js.map +0 -1
- package/lib/environment.json +0 -1
- package/lib/handlers/index.d.ts +0 -2
- package/lib/handlers/index.js +0 -3
- package/lib/handlers/index.js.map +0 -1
- package/lib/lens-core-module/index.d.ts +0 -3
- package/lib/lens-core-module/index.js +0 -4
- package/lib/lens-core-module/index.js.map +0 -1
- package/lib/lens-core-module/loader/index.d.ts +0 -1
- package/lib/lens-core-module/loader/index.js +0 -2
- package/lib/lens-core-module/loader/index.js.map +0 -1
- package/lib/lensCoreWasmVersions.json +0 -5
- package/lib/metrics/metricsHandler.d.ts +0 -10
- package/lib/metrics/metricsHandler.js +0 -13
- package/lib/metrics/metricsHandler.js.map +0 -1
- package/lib/metrics/operational/operationalMetricsReporter.d.ts +0 -64
- package/lib/metrics/operational/operationalMetricsReporter.js +0 -144
- package/lib/metrics/operational/operationalMetricsReporter.js.map +0 -1
- package/lib/session/index.d.ts +0 -1
- package/lib/session/index.js +0 -2
- package/lib/session/index.js.map +0 -1
- package/lib/transforms/index.d.ts +0 -1
- package/lib/transforms/index.js +0 -2
- package/lib/transforms/index.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { BenchmarkName } from "./benchmark_name";
|
|
|
3
3
|
export declare const protobufPackage = "snapchat.cdp.cof";
|
|
4
4
|
export interface BenchmarkValue {
|
|
5
5
|
intValue: number | undefined;
|
|
6
|
-
longValue:
|
|
6
|
+
longValue: string | undefined;
|
|
7
7
|
boolValue: boolean | undefined;
|
|
8
8
|
floatValue: number | undefined;
|
|
9
9
|
}
|
|
@@ -20,12 +20,12 @@ export declare const BenchmarkValue: {
|
|
|
20
20
|
decode(input: _m0.Reader | Uint8Array, length?: number): BenchmarkValue;
|
|
21
21
|
fromPartial<I extends {
|
|
22
22
|
intValue?: number | undefined;
|
|
23
|
-
longValue?:
|
|
23
|
+
longValue?: string | undefined;
|
|
24
24
|
boolValue?: boolean | undefined;
|
|
25
25
|
floatValue?: number | undefined;
|
|
26
26
|
} & {
|
|
27
27
|
intValue?: number | undefined;
|
|
28
|
-
longValue?:
|
|
28
|
+
longValue?: string | undefined;
|
|
29
29
|
boolValue?: boolean | undefined;
|
|
30
30
|
floatValue?: number | undefined;
|
|
31
31
|
} & Record<Exclude<keyof I, keyof BenchmarkValue>, never>>(object: I): BenchmarkValue;
|
|
@@ -48,7 +48,7 @@ export declare const BenchmarkResult: {
|
|
|
48
48
|
name?: BenchmarkName | undefined;
|
|
49
49
|
value?: {
|
|
50
50
|
intValue?: number | undefined;
|
|
51
|
-
longValue?:
|
|
51
|
+
longValue?: string | undefined;
|
|
52
52
|
boolValue?: boolean | undefined;
|
|
53
53
|
floatValue?: number | undefined;
|
|
54
54
|
} | undefined;
|
|
@@ -56,12 +56,12 @@ export declare const BenchmarkResult: {
|
|
|
56
56
|
name?: BenchmarkName | undefined;
|
|
57
57
|
value?: ({
|
|
58
58
|
intValue?: number | undefined;
|
|
59
|
-
longValue?:
|
|
59
|
+
longValue?: string | undefined;
|
|
60
60
|
boolValue?: boolean | undefined;
|
|
61
61
|
floatValue?: number | undefined;
|
|
62
62
|
} & {
|
|
63
63
|
intValue?: number | undefined;
|
|
64
|
-
longValue?:
|
|
64
|
+
longValue?: string | undefined;
|
|
65
65
|
boolValue?: boolean | undefined;
|
|
66
66
|
floatValue?: number | undefined;
|
|
67
67
|
} & Record<Exclude<keyof I["value"], keyof BenchmarkValue>, never>) | undefined;
|
|
@@ -32,7 +32,7 @@ export const BenchmarkValue = {
|
|
|
32
32
|
message.intValue = reader.int32();
|
|
33
33
|
break;
|
|
34
34
|
case 2:
|
|
35
|
-
message.longValue =
|
|
35
|
+
message.longValue = longToString(reader.int64());
|
|
36
36
|
break;
|
|
37
37
|
case 3:
|
|
38
38
|
message.boolValue = reader.bool();
|
|
@@ -150,32 +150,18 @@ export const BenchmarkResult = {
|
|
|
150
150
|
return message;
|
|
151
151
|
},
|
|
152
152
|
};
|
|
153
|
-
var globalThis = (() => {
|
|
154
|
-
if (typeof globalThis !== "undefined")
|
|
155
|
-
return globalThis;
|
|
156
|
-
if (typeof self !== "undefined")
|
|
157
|
-
return self;
|
|
158
|
-
if (typeof window !== "undefined")
|
|
159
|
-
return window;
|
|
160
|
-
if (typeof global !== "undefined")
|
|
161
|
-
return global;
|
|
162
|
-
throw "Unable to locate global object";
|
|
163
|
-
})();
|
|
164
153
|
function toTimestamp(date) {
|
|
165
|
-
const seconds = date.getTime() / 1000;
|
|
154
|
+
const seconds = Math.trunc(date.getTime() / 1000).toString();
|
|
166
155
|
const nanos = (date.getTime() % 1000) * 1000000;
|
|
167
156
|
return { seconds, nanos };
|
|
168
157
|
}
|
|
169
158
|
function fromTimestamp(t) {
|
|
170
|
-
let millis = t.seconds * 1000;
|
|
159
|
+
let millis = Number(t.seconds) * 1000;
|
|
171
160
|
millis += t.nanos / 1000000;
|
|
172
161
|
return new Date(millis);
|
|
173
162
|
}
|
|
174
|
-
function
|
|
175
|
-
|
|
176
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
177
|
-
}
|
|
178
|
-
return long.toNumber();
|
|
163
|
+
function longToString(long) {
|
|
164
|
+
return long.toString();
|
|
179
165
|
}
|
|
180
166
|
if (_m0.util.Long !== Long) {
|
|
181
167
|
_m0.util.Long = Long;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"benchmark.js","sourceRoot":"","sources":["../../../../../src/generated-proto/pb_schema/cdp/cof/benchmark.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,GAAG,MAAM,oBAAoB,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAelD,SAAS,wBAAwB;IAC7B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AACtG,CAAC;AACD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,MAAM,CAAC,OAAuB,EAAE,SAAqB,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE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OAAO,UAAU,CAAC;IACtB,IAAI,OAAO,IAAI,KAAK,WAAW;QAC3B,OAAO,IAAI,CAAC;IAChB,IAAI,OAAO,MAAM,KAAK,WAAW;QAC7B,OAAO,MAAM,CAAC;IAClB,IAAI,OAAO,MAAM,KAAK,WAAW;QAC7B,OAAO,MAAM,CAAC;IAClB,MAAM,gCAAgC,CAAC;AAC3C,CAAC,CAAC,EAAE,CAAC;AASL,SAAS,WAAW,CAAC,IAAU;IAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC;IACtC,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,OAAO,CAAC;IAChD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAC9B,CAAC;AACD,SAAS,aAAa,CAAC,CAAY;IAC/B,IAAI,MAAM,GAAG,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC;IAC9B,MAAM,IAAI,CAAC,CAAC,KAAK,GAAG,OAAO,CAAC;IAC5B,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC;AACD,SAAS,YAAY,CAAC,IAAU;IAC5B,IAAI,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE;QAClC,MAAM,IAAI,UAAU,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;KAC9E;IACD,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;AAC3B,CAAC;AACD,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE;IACxB,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,IAAW,CAAC;IAC5B,GAAG,CAAC,SAAS,EAAE,CAAC;CACnB","sourcesContent":["import Long from \"long\";\nimport _m0 from \"protobufjs/minimal\";\nimport { BenchmarkName } from \"./benchmark_name\";\nimport { Timestamp } from \"../../google/protobuf/timestamp\";\nexport const protobufPackage = \"snapchat.cdp.cof\";\nexport interface BenchmarkValue {\n intValue: number | undefined;\n longValue: number | undefined;\n boolValue: boolean | undefined;\n floatValue: number | undefined;\n}\nexport interface BenchmarkRequest {\n benchmarkNames: BenchmarkName[];\n expirationTimestamp: Date | undefined;\n}\nexport interface BenchmarkResult {\n name: BenchmarkName;\n value: BenchmarkValue | undefined;\n}\nfunction createBaseBenchmarkValue(): BenchmarkValue {\n return { intValue: undefined, longValue: undefined, boolValue: undefined, floatValue: undefined };\n}\nexport const BenchmarkValue = {\n encode(message: BenchmarkValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.intValue !== undefined) {\n writer.uint32(8).int32(message.intValue);\n }\n if (message.longValue !== undefined) {\n writer.uint32(16).int64(message.longValue);\n }\n if (message.boolValue !== undefined) {\n writer.uint32(24).bool(message.boolValue);\n }\n if (message.floatValue !== undefined) {\n writer.uint32(37).float(message.floatValue);\n }\n return writer;\n },\n decode(input: _m0.Reader | Uint8Array, length?: number): BenchmarkValue {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBenchmarkValue();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.intValue = reader.int32();\n break;\n case 2:\n message.longValue = longToNumber(reader.int64() as Long);\n break;\n case 3:\n message.boolValue = reader.bool();\n break;\n case 4:\n message.floatValue = reader.float();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n fromPartial<I extends Exact<DeepPartial<BenchmarkValue>, I>>(object: I): BenchmarkValue {\n const message = createBaseBenchmarkValue();\n message.intValue = object.intValue ?? undefined;\n message.longValue = object.longValue ?? undefined;\n message.boolValue = object.boolValue ?? undefined;\n message.floatValue = object.floatValue ?? undefined;\n return message;\n },\n};\nfunction createBaseBenchmarkRequest(): BenchmarkRequest {\n return { benchmarkNames: [], expirationTimestamp: undefined };\n}\nexport const BenchmarkRequest = {\n encode(message: BenchmarkRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n writer.uint32(10).fork();\n for (const v of message.benchmarkNames) {\n writer.int32(v);\n }\n writer.ldelim();\n if (message.expirationTimestamp !== undefined) {\n Timestamp.encode(toTimestamp(message.expirationTimestamp), writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n decode(input: _m0.Reader | Uint8Array, length?: number): BenchmarkRequest {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBenchmarkRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if ((tag & 7) === 2) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.benchmarkNames.push(reader.int32() as any);\n }\n }\n else {\n message.benchmarkNames.push(reader.int32() as any);\n }\n break;\n case 2:\n message.expirationTimestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n fromPartial<I extends Exact<DeepPartial<BenchmarkRequest>, I>>(object: I): BenchmarkRequest {\n const message = createBaseBenchmarkRequest();\n message.benchmarkNames = object.benchmarkNames?.map((e) => e) || [];\n message.expirationTimestamp = object.expirationTimestamp ?? undefined;\n return message;\n },\n};\nfunction createBaseBenchmarkResult(): BenchmarkResult {\n return { name: 0, value: undefined };\n}\nexport const BenchmarkResult = {\n encode(message: BenchmarkResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.name !== 0) {\n writer.uint32(8).int32(message.name);\n }\n if (message.value !== undefined) {\n BenchmarkValue.encode(message.value, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n decode(input: _m0.Reader | Uint8Array, length?: number): BenchmarkResult {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBenchmarkResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.int32() as any;\n break;\n case 2:\n message.value = BenchmarkValue.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n fromPartial<I extends Exact<DeepPartial<BenchmarkResult>, I>>(object: I): BenchmarkResult {\n const message = createBaseBenchmarkResult();\n message.name = object.name ?? 0;\n message.value =\n object.value !== undefined && object.value !== null ? BenchmarkValue.fromPartial(object.value) : undefined;\n return message;\n },\n};\ndeclare var self: any | undefined;\ndeclare var window: any | undefined;\ndeclare var global: any | undefined;\nvar globalThis: any = (() => {\n if (typeof globalThis !== \"undefined\")\n return globalThis;\n if (typeof self !== \"undefined\")\n return self;\n if (typeof window !== \"undefined\")\n return window;\n if (typeof global !== \"undefined\")\n return global;\n throw \"Unable to locate global object\";\n})();\ntype Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;\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>;\ntype KeysOfUnion<T> = T extends T ? keyof T : never;\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>;\nfunction toTimestamp(date: Date): Timestamp {\n const seconds = date.getTime() / 1000;\n const nanos = (date.getTime() % 1000) * 1000000;\n return { seconds, nanos };\n}\nfunction fromTimestamp(t: Timestamp): Date {\n let millis = t.seconds * 1000;\n millis += t.nanos / 1000000;\n return new Date(millis);\n}\nfunction longToNumber(long: Long): number {\n if (long.gt(Number.MAX_SAFE_INTEGER)) {\n throw new globalThis.Error(\"Value is larger than Number.MAX_SAFE_INTEGER\");\n }\n return long.toNumber();\n}\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n"]}
|
|
1
|
+
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\";\nimport _m0 from \"protobufjs/minimal\";\nimport { BenchmarkName } from \"./benchmark_name\";\nimport { Timestamp } from \"../../google/protobuf/timestamp\";\nexport const protobufPackage = \"snapchat.cdp.cof\";\nexport interface BenchmarkValue {\n intValue: number | undefined;\n longValue: string | undefined;\n boolValue: boolean | undefined;\n floatValue: number | undefined;\n}\nexport interface BenchmarkRequest {\n benchmarkNames: BenchmarkName[];\n expirationTimestamp: Date | undefined;\n}\nexport interface BenchmarkResult {\n name: BenchmarkName;\n value: BenchmarkValue | undefined;\n}\nfunction createBaseBenchmarkValue(): BenchmarkValue {\n return { intValue: undefined, longValue: undefined, boolValue: undefined, floatValue: undefined };\n}\nexport const BenchmarkValue = {\n encode(message: BenchmarkValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.intValue !== undefined) {\n writer.uint32(8).int32(message.intValue);\n }\n if (message.longValue !== undefined) {\n writer.uint32(16).int64(message.longValue);\n }\n if (message.boolValue !== undefined) {\n writer.uint32(24).bool(message.boolValue);\n }\n if (message.floatValue !== undefined) {\n writer.uint32(37).float(message.floatValue);\n }\n return writer;\n },\n decode(input: _m0.Reader | Uint8Array, length?: number): BenchmarkValue {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBenchmarkValue();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.intValue = reader.int32();\n break;\n case 2:\n message.longValue = longToString(reader.int64() as Long);\n break;\n case 3:\n message.boolValue = reader.bool();\n break;\n case 4:\n message.floatValue = reader.float();\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n fromPartial<I extends Exact<DeepPartial<BenchmarkValue>, I>>(object: I): BenchmarkValue {\n const message = createBaseBenchmarkValue();\n message.intValue = object.intValue ?? undefined;\n message.longValue = object.longValue ?? undefined;\n message.boolValue = object.boolValue ?? undefined;\n message.floatValue = object.floatValue ?? undefined;\n return message;\n },\n};\nfunction createBaseBenchmarkRequest(): BenchmarkRequest {\n return { benchmarkNames: [], expirationTimestamp: undefined };\n}\nexport const BenchmarkRequest = {\n encode(message: BenchmarkRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n writer.uint32(10).fork();\n for (const v of message.benchmarkNames) {\n writer.int32(v);\n }\n writer.ldelim();\n if (message.expirationTimestamp !== undefined) {\n Timestamp.encode(toTimestamp(message.expirationTimestamp), writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n decode(input: _m0.Reader | Uint8Array, length?: number): BenchmarkRequest {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBenchmarkRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if ((tag & 7) === 2) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.benchmarkNames.push(reader.int32() as any);\n }\n }\n else {\n message.benchmarkNames.push(reader.int32() as any);\n }\n break;\n case 2:\n message.expirationTimestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n fromPartial<I extends Exact<DeepPartial<BenchmarkRequest>, I>>(object: I): BenchmarkRequest {\n const message = createBaseBenchmarkRequest();\n message.benchmarkNames = object.benchmarkNames?.map((e) => e) || [];\n message.expirationTimestamp = object.expirationTimestamp ?? undefined;\n return message;\n },\n};\nfunction createBaseBenchmarkResult(): BenchmarkResult {\n return { name: 0, value: undefined };\n}\nexport const BenchmarkResult = {\n encode(message: BenchmarkResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.name !== 0) {\n writer.uint32(8).int32(message.name);\n }\n if (message.value !== undefined) {\n BenchmarkValue.encode(message.value, writer.uint32(18).fork()).ldelim();\n }\n return writer;\n },\n decode(input: _m0.Reader | Uint8Array, length?: number): BenchmarkResult {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);\n let end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseBenchmarkResult();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n message.name = reader.int32() as any;\n break;\n case 2:\n message.value = BenchmarkValue.decode(reader, reader.uint32());\n break;\n default:\n reader.skipType(tag & 7);\n break;\n }\n }\n return message;\n },\n fromPartial<I extends Exact<DeepPartial<BenchmarkResult>, I>>(object: I): BenchmarkResult {\n const message = createBaseBenchmarkResult();\n message.name = object.name ?? 0;\n message.value =\n object.value !== undefined && object.value !== null ? BenchmarkValue.fromPartial(object.value) : undefined;\n return message;\n },\n};\ntype Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;\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>;\ntype KeysOfUnion<T> = T extends T ? keyof T : never;\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>;\nfunction toTimestamp(date: Date): Timestamp {\n const seconds = Math.trunc(date.getTime() / 1000).toString();\n const nanos = (date.getTime() % 1000) * 1000000;\n return { seconds, nanos };\n}\nfunction fromTimestamp(t: Timestamp): Date {\n let millis = Number(t.seconds) * 1000;\n millis += t.nanos / 1000000;\n return new Date(millis);\n}\nfunction longToString(long: Long) {\n return long.toString();\n}\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long as any;\n _m0.configure();\n}\n"]}
|