@snap/camera-kit 1.3.0 → 1.5.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.
Files changed (215) hide show
  1. package/README.md +1 -1
  2. package/dist/CameraKit.d.ts +1 -0
  3. package/dist/CameraKit.d.ts.map +1 -1
  4. package/dist/environment.js +1 -1
  5. package/dist/environment.js.map +1 -1
  6. package/dist/lens-core-module/generated-types.d.ts +5 -0
  7. package/dist/lens-core-module/generated-types.d.ts.map +1 -1
  8. package/dist/lens-core-module/generated-types.js.map +1 -1
  9. package/dist/lensCoreWasmVersions.js +3 -3
  10. package/dist/lensCoreWasmVersions.js.map +1 -1
  11. package/dist/session/LensKeyboard.d.ts +4 -4
  12. package/dist/session/LensKeyboard.d.ts.map +1 -1
  13. package/dist/session/LensKeyboard.js.map +1 -1
  14. package/dist/uri-handlers/internal-handlers/httpValidators.d.ts +1 -1
  15. package/dist/uri-handlers/internal-handlers/httpValidators.d.ts.map +1 -1
  16. package/dist/uri-handlers/internal-handlers/httpValidators.js +16 -19
  17. package/dist/uri-handlers/internal-handlers/httpValidators.js.map +1 -1
  18. package/dist/uri-handlers/internal-handlers/remoteApiUriHandler.d.ts +0 -3
  19. package/dist/uri-handlers/internal-handlers/remoteApiUriHandler.d.ts.map +1 -1
  20. package/dist/uri-handlers/internal-handlers/remoteApiUriHandler.js +1 -4
  21. package/dist/uri-handlers/internal-handlers/remoteApiUriHandler.js.map +1 -1
  22. package/docs/html/classes/CameraKit.html +2 -2
  23. package/docs/html/classes/CameraKitSession.html +2 -2
  24. package/docs/html/classes/CameraKitSource.html +2 -2
  25. package/docs/html/classes/LensPerformanceMeasurement.html +2 -2
  26. package/docs/html/classes/LensPerformanceMetrics.html +2 -2
  27. package/docs/html/classes/LensRepository.html +2 -2
  28. package/docs/html/classes/Transform2D.html +2 -2
  29. package/docs/html/classes/TypedCustomEvent.html +2 -2
  30. package/docs/html/classes/TypedEventTarget.html +2 -2
  31. package/docs/html/enums/Lens_CameraFacing.html +2 -2
  32. package/docs/html/functions/bootstrapCameraKit.html +2 -2
  33. package/docs/html/functions/createExtension.html +2 -2
  34. package/docs/html/functions/createImageSource.html +2 -2
  35. package/docs/html/functions/createMediaStreamSource.html +2 -2
  36. package/docs/html/functions/createVideoSource.html +2 -2
  37. package/docs/html/functions/estimateLensPerformance.html +2 -2
  38. package/docs/html/functions/filePickerFactory.html +2 -2
  39. package/docs/html/functions/getExtensionRequestContext.html +2 -2
  40. package/docs/html/functions/lensSourcesFactory.html +2 -2
  41. package/docs/html/functions/remoteApiServicesFactory.html +1 -1
  42. package/docs/html/hierarchy.html +1 -1
  43. package/docs/html/index.html +3 -3
  44. package/docs/html/interfaces/BitmojiUserInfo.html +2 -2
  45. package/docs/html/interfaces/CameraKitBootstrapConfiguration.html +2 -2
  46. package/docs/html/interfaces/CameraKitDeviceOptions.html +2 -2
  47. package/docs/html/interfaces/CameraKitSourceInfo.html +2 -2
  48. package/docs/html/interfaces/CameraKitSourceSubscriber.html +2 -2
  49. package/docs/html/interfaces/ComputedFrameMetrics.html +2 -2
  50. package/docs/html/interfaces/CreateSessionOptions.html +2 -2
  51. package/docs/html/interfaces/EstimatedLensPerformance.html +2 -2
  52. package/docs/html/interfaces/Font.html +2 -2
  53. package/docs/html/interfaces/FriendUserInfo.html +2 -2
  54. package/docs/html/interfaces/FunctionSourceOptions.html +2 -2
  55. package/docs/html/interfaces/Keyboard.html +9 -9
  56. package/docs/html/interfaces/KeyboardActiveEvent.html +2 -2
  57. package/docs/html/interfaces/Lens.html +2 -2
  58. package/docs/html/interfaces/LensCreator.html +2 -2
  59. package/docs/html/interfaces/LensHttpRequest.html +2 -2
  60. package/docs/html/interfaces/LensLaunchData.html +2 -2
  61. package/docs/html/interfaces/LensSource.html +2 -2
  62. package/docs/html/interfaces/LensUserData.html +2 -2
  63. package/docs/html/interfaces/LoadAssetRequest.html +2 -2
  64. package/docs/html/interfaces/MediaStreamSourceOptions.html +2 -2
  65. package/docs/html/interfaces/Preview.html +2 -2
  66. package/docs/html/interfaces/RemoteApiRequest.html +2 -2
  67. package/docs/html/interfaces/RemoteApiResponse.html +2 -2
  68. package/docs/html/interfaces/RemoteApiService.html +2 -2
  69. package/docs/html/interfaces/Snapcode.html +2 -2
  70. package/docs/html/interfaces/UriCancelRequest.html +2 -2
  71. package/docs/html/interfaces/UriRequest.html +2 -2
  72. package/docs/html/interfaces/UriResponse.html +2 -2
  73. package/docs/html/interfaces/VideoSourceOptions.html +2 -2
  74. package/docs/html/modules.html +1 -1
  75. package/docs/html/types/ArgumentValidationError.html +2 -2
  76. package/docs/html/types/AssetLoader.html +2 -2
  77. package/docs/html/types/AssetResponse.html +1 -1
  78. package/docs/html/types/AssetTiming.html +2 -2
  79. package/docs/html/types/BenchmarkError.html +1 -1
  80. package/docs/html/types/BootstrapError.html +2 -2
  81. package/docs/html/types/CacheKeyNotFoundError.html +1 -1
  82. package/docs/html/types/CameraKitSessionEventListener.html +2 -2
  83. package/docs/html/types/CameraKitSessionEvents.html +2 -2
  84. package/docs/html/types/CameraKitSourceError.html +1 -1
  85. package/docs/html/types/ConfigurationError.html +2 -2
  86. package/docs/html/types/FetchHandler.html +1 -1
  87. package/docs/html/types/FilePicker.html +2 -2
  88. package/docs/html/types/FilePickerOptions.html +2 -2
  89. package/docs/html/types/FilePickerResult.html +2 -2
  90. package/docs/html/types/KeyboardEventListener.html +2 -2
  91. package/docs/html/types/KeyboardEvents.html +2 -2
  92. package/docs/html/types/LegalError.html +1 -1
  93. package/docs/html/types/LensAbortError.html +2 -2
  94. package/docs/html/types/LensAssetError.html +2 -2
  95. package/docs/html/types/LensContentValidationError.html +1 -1
  96. package/docs/html/types/LensError.html +1 -1
  97. package/docs/html/types/LensExecutionError.html +2 -2
  98. package/docs/html/types/LensHttpHandler.html +2 -2
  99. package/docs/html/types/LensImagePickerError.html +2 -2
  100. package/docs/html/types/LensLaunchParams.html +2 -2
  101. package/docs/html/types/LensMetricsEvents.html +2 -2
  102. package/docs/html/types/LensPerformanceCluster.html +1 -1
  103. package/docs/html/types/LensView.html +2 -2
  104. package/docs/html/types/LensWait.html +2 -2
  105. package/docs/html/types/Matrix.html +2 -2
  106. package/docs/html/types/PersistentStoreError.html +2 -2
  107. package/docs/html/types/PlatformNotSupportedError.html +2 -2
  108. package/docs/html/types/PublicContainer.html +2 -2
  109. package/docs/html/types/PublicServices.html +2 -2
  110. package/docs/html/types/RemoteApiCancelRequestHandler.html +2 -2
  111. package/docs/html/types/RemoteApiRequestHandler.html +2 -2
  112. package/docs/html/types/RemoteApiServices.html +1 -1
  113. package/docs/html/types/RemoteApiStatus.html +2 -2
  114. package/docs/html/types/RenderTarget.html +2 -2
  115. package/docs/html/types/Uri.html +1 -1
  116. package/docs/html/types/WebGLError.html +1 -1
  117. package/docs/html/types/Zodiac.html +1 -1
  118. package/docs/html/variables/extensionRequestContext.html +2 -2
  119. package/docs/md/README.md +2 -2
  120. package/docs/md/classes/CameraKit.md +1 -1
  121. package/docs/md/classes/CameraKitSession.md +1 -1
  122. package/docs/md/classes/CameraKitSource.md +1 -1
  123. package/docs/md/classes/LensPerformanceMeasurement.md +1 -1
  124. package/docs/md/classes/LensPerformanceMetrics.md +1 -1
  125. package/docs/md/classes/LensRepository.md +1 -1
  126. package/docs/md/classes/Transform2D.md +1 -1
  127. package/docs/md/classes/TypedCustomEvent.md +1 -1
  128. package/docs/md/classes/TypedEventTarget.md +1 -1
  129. package/docs/md/enumerations/Lens_CameraFacing.md +1 -1
  130. package/docs/md/functions/bootstrapCameraKit.md +1 -1
  131. package/docs/md/functions/createExtension.md +1 -1
  132. package/docs/md/functions/createImageSource.md +1 -1
  133. package/docs/md/functions/createMediaStreamSource.md +1 -1
  134. package/docs/md/functions/createVideoSource.md +1 -1
  135. package/docs/md/functions/estimateLensPerformance.md +1 -1
  136. package/docs/md/functions/filePickerFactory.md +1 -1
  137. package/docs/md/functions/getExtensionRequestContext.md +1 -1
  138. package/docs/md/functions/lensSourcesFactory.md +1 -1
  139. package/docs/md/functions/remoteApiServicesFactory.md +1 -1
  140. package/docs/md/globals.md +2 -2
  141. package/docs/md/interfaces/BitmojiUserInfo.md +1 -1
  142. package/docs/md/interfaces/CameraKitBootstrapConfiguration.md +1 -1
  143. package/docs/md/interfaces/CameraKitDeviceOptions.md +1 -1
  144. package/docs/md/interfaces/CameraKitSourceInfo.md +1 -1
  145. package/docs/md/interfaces/CameraKitSourceSubscriber.md +1 -1
  146. package/docs/md/interfaces/ComputedFrameMetrics.md +1 -1
  147. package/docs/md/interfaces/CreateSessionOptions.md +1 -1
  148. package/docs/md/interfaces/EstimatedLensPerformance.md +1 -1
  149. package/docs/md/interfaces/Font.md +1 -1
  150. package/docs/md/interfaces/FriendUserInfo.md +1 -1
  151. package/docs/md/interfaces/FunctionSourceOptions.md +1 -1
  152. package/docs/md/interfaces/Keyboard.md +3 -3
  153. package/docs/md/interfaces/KeyboardActiveEvent.md +1 -1
  154. package/docs/md/interfaces/Lens.md +1 -1
  155. package/docs/md/interfaces/LensCreator.md +1 -1
  156. package/docs/md/interfaces/LensHttpRequest.md +1 -1
  157. package/docs/md/interfaces/LensLaunchData.md +1 -1
  158. package/docs/md/interfaces/LensSource.md +1 -1
  159. package/docs/md/interfaces/LensUserData.md +1 -1
  160. package/docs/md/interfaces/LoadAssetRequest.md +1 -1
  161. package/docs/md/interfaces/MediaStreamSourceOptions.md +1 -1
  162. package/docs/md/interfaces/Preview.md +1 -1
  163. package/docs/md/interfaces/RemoteApiRequest.md +1 -1
  164. package/docs/md/interfaces/RemoteApiResponse.md +1 -1
  165. package/docs/md/interfaces/RemoteApiService.md +1 -1
  166. package/docs/md/interfaces/Snapcode.md +1 -1
  167. package/docs/md/interfaces/UriCancelRequest.md +1 -1
  168. package/docs/md/interfaces/UriRequest.md +1 -1
  169. package/docs/md/interfaces/UriResponse.md +1 -1
  170. package/docs/md/interfaces/VideoSourceOptions.md +1 -1
  171. package/docs/md/type-aliases/ArgumentValidationError.md +1 -1
  172. package/docs/md/type-aliases/AssetLoader.md +1 -1
  173. package/docs/md/type-aliases/AssetResponse.md +1 -1
  174. package/docs/md/type-aliases/AssetTiming.md +1 -1
  175. package/docs/md/type-aliases/BenchmarkError.md +1 -1
  176. package/docs/md/type-aliases/BootstrapError.md +1 -1
  177. package/docs/md/type-aliases/CacheKeyNotFoundError.md +1 -1
  178. package/docs/md/type-aliases/CameraKitSessionEventListener.md +1 -1
  179. package/docs/md/type-aliases/CameraKitSessionEvents.md +1 -1
  180. package/docs/md/type-aliases/CameraKitSourceError.md +1 -1
  181. package/docs/md/type-aliases/ConfigurationError.md +1 -1
  182. package/docs/md/type-aliases/FetchHandler.md +1 -1
  183. package/docs/md/type-aliases/FilePicker.md +1 -1
  184. package/docs/md/type-aliases/FilePickerOptions.md +1 -1
  185. package/docs/md/type-aliases/FilePickerResult.md +1 -1
  186. package/docs/md/type-aliases/KeyboardEventListener.md +1 -1
  187. package/docs/md/type-aliases/KeyboardEvents.md +1 -1
  188. package/docs/md/type-aliases/LegalError.md +1 -1
  189. package/docs/md/type-aliases/LensAbortError.md +1 -1
  190. package/docs/md/type-aliases/LensAssetError.md +1 -1
  191. package/docs/md/type-aliases/LensContentValidationError.md +1 -1
  192. package/docs/md/type-aliases/LensError.md +1 -1
  193. package/docs/md/type-aliases/LensExecutionError.md +1 -1
  194. package/docs/md/type-aliases/LensHttpHandler.md +1 -1
  195. package/docs/md/type-aliases/LensImagePickerError.md +1 -1
  196. package/docs/md/type-aliases/LensLaunchParams.md +1 -1
  197. package/docs/md/type-aliases/LensMetricsEvents.md +1 -1
  198. package/docs/md/type-aliases/LensPerformanceCluster.md +1 -1
  199. package/docs/md/type-aliases/LensView.md +1 -1
  200. package/docs/md/type-aliases/LensWait.md +1 -1
  201. package/docs/md/type-aliases/Matrix.md +1 -1
  202. package/docs/md/type-aliases/PersistentStoreError.md +1 -1
  203. package/docs/md/type-aliases/PlatformNotSupportedError.md +1 -1
  204. package/docs/md/type-aliases/PublicContainer.md +1 -1
  205. package/docs/md/type-aliases/PublicServices.md +1 -1
  206. package/docs/md/type-aliases/RemoteApiCancelRequestHandler.md +1 -1
  207. package/docs/md/type-aliases/RemoteApiRequestHandler.md +1 -1
  208. package/docs/md/type-aliases/RemoteApiServices.md +1 -1
  209. package/docs/md/type-aliases/RemoteApiStatus.md +1 -1
  210. package/docs/md/type-aliases/RenderTarget.md +1 -1
  211. package/docs/md/type-aliases/Uri.md +1 -1
  212. package/docs/md/type-aliases/WebGLError.md +1 -1
  213. package/docs/md/type-aliases/Zodiac.md +1 -1
  214. package/docs/md/variables/extensionRequestContext.md +1 -1
  215. package/package.json +3 -2
package/README.md CHANGED
@@ -181,7 +181,7 @@ session.pause('capture');
181
181
 
182
182
  ## Error Handling
183
183
 
184
- Camera Kit Web SDK methods may throw errors, or return rejected Promises -- these are documented in the [API docs](https://kit.snapchat.com/reference/CameraKit/web/1.3.0/index.html). It is good practice to handle such cases, to provide a good experience to your users.
184
+ Camera Kit Web SDK methods may throw errors, or return rejected Promises -- these are documented in the [API docs](https://kit.snapchat.com/reference/CameraKit/web/1.5.0/index.html). It is good practice to handle such cases, to provide a good experience to your users.
185
185
 
186
186
  Errors may also occur during Lens rendering. For example, Lenses contain their own scripting, which could throw an error. A rendering error could also occur if a Lens attempts to use a feature that is not supported by Camera Kit Web SDK.
187
187
 
@@ -206,6 +206,7 @@ export declare const cameraKitFactory: {
206
206
  registerEndWebXrHandler: (handler: (() => void) | null) => void;
207
207
  setGeoDataProvider: (provider: import("./lens-core-module/generated-types").SetGeoDataProviderInput) => void;
208
208
  provideGeoData: (config: import("./lens-core-module/generated-types").ProvideGeoDataInput) => void;
209
+ setConfigurationProvider: (provider: import("./lens-core-module/generated-types").ConfigurationProvider) => void;
209
210
  } & {
210
211
  processFrame: (input: Omit<import("./lens-core-module/generated-types").ProcessFrameInput, "onFailure" | "onSuccess">) => Promise<any>;
211
212
  addLens: (input: Omit<import("./lens-core-module/generated-types").AddLensInput, "onFailure" | "onSuccess">)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C,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,YAAY;IApBjC,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,cAAc,CAAA;KAAE,CAAC;IAEhD;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAA0B;IAE/E,OAAO,CAAC,QAAQ,CAA0B;IAE1C,gBAAgB;;IAEZ;;OAEG;IACM,cAAc,EAAE,cAAc,EAEtB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC,EAClC,YAAY,EAAE,mBAAmB,EAClD,UAAU,EAAE,kBAAkB;IAUlC;;;;;;;;;;;;;;;;OAgBG;IAEG,aAAa,CAAC,EAChB,gBAAgB,EAChB,oBAAoB,GACvB,GAAE,oBAAyB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAmGxD;;OAEG;IAEG,OAAO;CAMhB;AAED,gBAAgB;AAChB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkB5B,CAAC"}
@@ -1,2 +1,2 @@
1
- export default { PACKAGE_VERSION: "1.3.0" };
1
+ export default { PACKAGE_VERSION: "1.5.0" };
2
2
  //# sourceMappingURL=environment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC","sourcesContent":["export default { PACKAGE_VERSION: \"1.3.0\" };\n"]}
1
+ {"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC","sourcesContent":["export default { PACKAGE_VERSION: \"1.5.0\" };\n"]}
@@ -310,6 +310,10 @@ export interface LensCoreConfig {
310
310
  };
311
311
  }
312
312
  export type SetPreloadedConfigurationInput = Array<LensCoreConfig>;
313
+ export interface ConfigurationRequest {
314
+ configId: string;
315
+ }
316
+ export type ConfigurationProvider = (configurationRequest: ConfigurationRequest) => Promise<LensCoreConfig | undefined>;
313
317
  export interface SetAllSoundsMutedInput {
314
318
  muted: boolean;
315
319
  fade: boolean;
@@ -495,6 +499,7 @@ export interface LensCoreModule extends InitialEmscriptenModule {
495
499
  setGpuIndex: (config: SetGpuIndexInput) => void;
496
500
  setGeoDataProvider: (provider: SetGeoDataProviderInput) => void;
497
501
  provideGeoData: (config: ProvideGeoDataInput) => void;
502
+ setConfigurationProvider: (provider: ConfigurationProvider) => void;
498
503
  }
499
504
  declare global {
500
505
  function createLensesModule(module: InitialEmscriptenModule): Promise<InitialEmscriptenModule & LensCoreModule>;
@@ -1 +1 @@
1
- {"version":3,"file":"generated-types.d.ts","sourceRoot":"","sources":["../../src/lens-core-module/generated-types.ts"],"names":[],"mappings":";;AAAA,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AAE3D,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;AAE/D,MAAM,MAAM,iBAAiB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAExE,MAAM,MAAM,kBAAkB,GAAG,sCAAsC,GAAG,0BAA0B,CAAC;AA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AC;IAChE,WAAW,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAChD,kBAAkB,EAAE,CAAC,QAAQ,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAChE,cAAc,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACtD,wBAAwB,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACvE;AAED,OAAO,CAAC,MAAM,CAAC;IAQX,SAAS,kBAAkB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,GAAG,cAAc,CAAC,CAAC;CACnH"}
@@ -1 +1 @@
1
- {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../src/lens-core-module/generated-types.ts"],"names":[],"mappings":"","sourcesContent":["export type DefaultEventHandler = (...data: any[]) => void;\n\nexport type DefaultErrorHandler = (err: LensCoreError) => void;\n\nexport type LensCoreEnumValue = { value: number };\n\nexport type GetOutputCanvasesOutput = Record<number, HTMLCanvasElement>;\n\nexport type SetRenderSizeInput = SetRenderSizeMatchInputResolutionInput | SetRenderSizeExplicitInput;\n\nexport type SetRemoteAssetsProviderInput = (assetDescriptor: AssetDescriptor) => void;\n\nexport type SetRemoteAssetsUploadHandlerInput = (assetUploadDescriptor: AssetUploadDescriptor) => void;\n\nexport type ContentType =\n | \"text/plain\"\n | \"text/html\"\n | \"application/json\"\n | \"application/octet-stream\"\n | \"application/x-protobuf\"\n | \"application/grpc\";\n\nexport type SavePersistentStoreCallback = (id: string, data: ArrayBuffer) => void;\n\nexport type ShowHintCallback = (effectId: string, hintId: string) => void;\n\nexport type HideHintCallback = (effectId: string) => void;\n\nexport type ReceiveInstanceCallback = (instance: WebAssembly.Instance, module: WebAssembly.Module) => void;\n\nexport type AssetType = LensCoreEnumValue;\n\nexport type CanvasType = LensCoreEnumValue;\n\nexport type RenderLoopMode = LensCoreEnumValue;\n\nexport type LensApiVisibility = LensCoreEnumValue;\n\nexport type DeviceClass = LensCoreEnumValue;\n\nexport type UserDataAccess = LensCoreEnumValue;\n\nexport type InterfaceControl = LensCoreEnumValue;\n\nexport type InterfaceAction = LensCoreEnumValue;\n\nexport type ExternalMediaOrientation = LensCoreEnumValue;\n\nexport type ErrorType = LensCoreEnumValue;\n\nexport type Uri = `${string}://${string}`;\n\nexport type Dimensions = { width: number; height: number };\n\nexport type Size2D = { width: number; height: number };\n\nexport type Vec2D = { x: number; y: number };\n\nexport type Rect = { origin: Vec2D; size: Size2D };\n\nexport interface ClearAllLensesInput {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface OnFrameProcessedParam {\n processingTimeMs: number;\n}\n\nexport interface XrCapabilities {\n sixDofSupported: boolean;\n sceneDepthSupported: boolean;\n}\n\nexport interface OnTurnOnParam {\n needsAudioInput: boolean;\n}\n\nexport type TurnOnEventHandler = (arg: OnTurnOnParam) => void;\n\nexport interface InitializeInput {\n canvas?: HTMLCanvasElement | string;\n outputResolution?: Dimensions;\n showFpsPanel?: boolean;\n shouldUseWorker?: boolean;\n onFrameProcessed?: (arg: OnFrameProcessedParam) => void;\n xrCapabilities?: XrCapabilities;\n onFailure?: DefaultErrorHandler;\n onSuccess?: DefaultEventHandler;\n exceptionHandler?: (error: LensCoreError) => void;\n}\n\nexport interface PlayCanvasInput {\n type: CanvasType;\n onReady?: () => void;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface PauseCanvasInput {\n type: CanvasType;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetFpsLimitInput {\n fps: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetInputTransformInput {\n matrix: Float32Array | ArrayBuffer;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetOnFrameProcessedInput {\n onFrameProcessed: (arg: OnFrameProcessedParam) => void;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderSizeMatchInputResolutionInput {\n mode: \"matchInputResolution\";\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderSizeExplicitInput {\n mode: \"explicit\";\n target: Dimensions;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderLoopInput {\n mode: RenderLoopMode;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface TeardownInput {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultEventHandler;\n}\n\nexport interface ReplayTrackingDataInput {\n buffer: Uint8Array | ArrayBuffer;\n}\n\nexport interface UseMediaElementInput {\n media?: HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | MediaStream;\n requestWebcam?: boolean;\n startOnFrontCamera?: boolean;\n mirrorMedia?: boolean;\n pauseExistingMedia?: boolean;\n autoplayNewMedia?: boolean;\n autoplayPreviewCanvas?: boolean;\n useManualFrameProcessing?: boolean;\n replayTrackingData?: ReplayTrackingDataInput;\n onFailure?: DefaultErrorHandler;\n onSuccess?: DefaultEventHandler;\n}\n\nexport interface UriListener {\n handleRequest: (request: UriRequest) => void;\n cancelRequest?: (request: UriCancelRequest) => void;\n}\n\nexport interface UriRequest {\n uri: Uri;\n identifier: string;\n method: \"GET\" | \"POST\";\n contentType: ContentType;\n data: ArrayBuffer;\n metadata: Record<string, string>;\n}\n\nexport interface UriResponse {\n code: number;\n description: string;\n contentType: ContentType;\n data: ArrayBuffer;\n metadata?: Record<string, string>;\n}\n\nexport interface UriCancelRequest {\n uri: Uri;\n requestId: string;\n}\n\nexport interface LensDescriptor {\n lensId: string;\n lensChecksum: string;\n lensPath?: string;\n lensDataBuffer?: Uint8Array | ArrayBuffer;\n onTurnOn?: TurnOnEventHandler;\n onTurnOff?: DefaultEventHandler;\n onFirstFrameProcessed?: DefaultEventHandler;\n onResourcesLoaded?: DefaultEventHandler;\n launchData?: Uint8Array | ArrayBuffer;\n apiVisibility?: LensApiVisibility;\n publicApiUserDataAccess?: UserDataAccess;\n}\n\nexport interface AddLensInput extends LensDescriptor {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface ReplaceLensesInput {\n lenses: LensDescriptor | Array<LensDescriptor>;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface RemoveLensInput {\n lensId: string;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface AssetDescriptor {\n assetId: string;\n assetType: AssetType;\n avatarId?: string;\n effectId?: string;\n encryptionKey?: ArrayBuffer;\n}\n\nexport interface AssetUploadDescriptor {\n requestId: number;\n assetId: string;\n assetType: AssetType;\n effectId: string;\n assetBuffer: ArrayBuffer;\n encryptionKey?: ArrayBuffer;\n encryptionIv?: ArrayBuffer;\n assetBatchId?: string;\n}\n\nexport interface ProvideRemoteAssetsResponseInput {\n assetId: string;\n assetType: AssetType;\n assetBuffer?: ArrayBuffer;\n assetChecksum?: string;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface ProvideRemoteAssetsUploadResponseInput {\n requestId: number;\n success: boolean;\n assetUrl?: string;\n assetUploadMetadata?: ArrayBuffer;\n}\n\nexport interface XRInput {\n layer: XRWebGLLayer;\n binding: XRWebGLBinding;\n frame: XRFrame;\n referenceSpace: XRReferenceSpace;\n}\n\nexport interface ProcessFrameInput {\n inputFrame: ImageBitmap | HTMLCanvasElement | HTMLImageElement | VideoFrame | XRInput;\n timestampMillis: number;\n renderTimestampMillis?: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface LensCoreError extends Error {\n otherExceptions?: Array<Error>;\n cause: { type: ErrorType; metadata?: any };\n}\n\nexport interface ImageToYuvBufferInput {\n image: Uint8Array | ArrayBuffer | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap;\n width: number;\n height: number;\n outputBuffer?: Uint8Array | ArrayBuffer;\n onSuccess: (buffer: ArrayBuffer) => void;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface YuvBufferToBitmapInput {\n buffer: Uint8Array | ArrayBuffer;\n width: number;\n height: number;\n targetWidth?: number;\n targetHeight?: number;\n preserveCanvasState?: boolean;\n allowBufferTransfer?: boolean;\n onSuccess: (bitmap: ImageBitmap) => void;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetInterfaceControlVisibilityInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n visibility: boolean;\n}\n\nexport interface HandleClientInterfaceActionInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n interfaceAction: InterfaceAction;\n}\n\nexport interface ProvideExternalImageInput {\n data: Uint8Array | ArrayBuffer;\n orientation: ExternalMediaOrientation;\n faceRects?: Array<Rect>;\n}\n\nexport interface ProvideExternalVideoInput {\n data: Uint8Array | ArrayBuffer;\n orientation: ExternalMediaOrientation;\n relStartPosition?: number;\n relEndPosition?: number;\n volume?: number;\n}\n\nexport interface ScreenDimmingRequestInput {\n effectId: string;\n enabled: boolean;\n}\n\nexport type ScreenDimmingRequestHandler = (config: ScreenDimmingRequestInput) => void;\n\nexport interface ClientInterfaceData {\n HeaderId?: string;\n DescriptionId?: string;\n FaceFilteringEnabled?: \"0\" | \"1\";\n FaceFilteringMultipleFaces?: \"0\" | \"1\";\n ImageEnabled?: \"0\" | \"1\";\n VideoEnabled?: \"0\" | \"1\";\n}\n\nexport interface ClientInterfaceRequestInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n interfaceAction: InterfaceAction;\n data: ClientInterfaceData;\n}\n\nexport type ClientInterfaceRequestHandler = (config: ClientInterfaceRequestInput) => void;\n\nexport interface LensCoreConfig {\n configId: string;\n value:\n | { stringValue: string }\n | { boolValue: boolean }\n | { intValue: number }\n | { longValue: number }\n | { floatValue: number }\n | {\n anyValue: {\n typeUrl: string;\n value: Uint8Array | ArrayBuffer;\n };\n };\n}\n\nexport type SetPreloadedConfigurationInput = Array<LensCoreConfig>;\n\nexport interface SetAllSoundsMutedInput {\n muted: boolean;\n fade: boolean;\n}\n\nexport interface SetDeviceClassInput {\n deviceClass: DeviceClass;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetAudioParametersInput {\n parameters: {\n numChannels?: number;\n sampleRate?: number;\n };\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SystemFont {\n name: string;\n data: Uint8Array | ArrayBuffer;\n}\n\nexport interface SetSystemFontsInput {\n fonts: SystemFont[]\n}\n\nexport interface ProcessAudioSampleBufferInput {\n input: Float32Array[] | ArrayBuffer[];\n output?: Float32Array[] | ArrayBuffer[];\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface BeginWebXrInput {\n glContext: WebGL2RenderingContext;\n requestConfig: {\n requiredFeatures?: string[]\n }\n}\n\nexport interface InitialEmscriptenModule {\n mainScriptUrlOrBlob: string;\n compiledModule?: WebAssembly.Module;\n pthreadWorkerScriptUrl?: string;\n instantiateWasm?: (importObject: WebAssembly.Imports, receiveInstance: ReceiveInstanceCallback) => void;\n print?: (text: string) => void;\n printErr?: (text: string) => void;\n}\n\nexport interface SetGpuIndexInput {\n gpuIndex: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport type SetGeoDataProviderInput = () => void;\n\nexport interface HourlyWeatherForecast {\n celsius: number;\n fahrenheit: number;\n displayTime: string;\n weatherCondition: string;\n localizedWeatherCondition: string;\n}\n\nexport interface WeatherData {\n locationName: string;\n celsius: number;\n fahrenheit: number;\n hourlyForecasts: HourlyWeatherForecast[];\n}\n\nexport interface GeoData {\n weather: WeatherData;\n}\n\nexport interface ProvideGeoDataInput {\n geoData: GeoData;\n}\n\nexport interface LensCoreModule extends InitialEmscriptenModule {\n AssetType: {\n RemoteMediaByUrl: AssetType;\n DeviceDependent: AssetType;\n Static: AssetType;\n URL: AssetType;\n BitmojiDynamicAsset: AssetType;\n };\n\n CanvasType: {\n None: CanvasType;\n Preview: CanvasType;\n Capture: CanvasType;\n All: CanvasType;\n };\n\n LensApiVisibility: {\n Dev: LensApiVisibility;\n Private: LensApiVisibility;\n Public: LensApiVisibility;\n };\n\n DeviceClass: {\n Undefined: DeviceClass;\n BarelyWorking: DeviceClass;\n LowEnd: DeviceClass;\n MidEnd: DeviceClass;\n HighEnd: DeviceClass;\n };\n\n RenderLoopMode: {\n SetTimeout: RenderLoopMode;\n RequestAnimationFrame: RenderLoopMode;\n };\n\n UserDataAccess: {\n Restricted: UserDataAccess;\n Unrestricted: UserDataAccess;\n };\n\n InterfaceControl: {\n ToggleCameraButton: InterfaceControl;\n ImagePicker: InterfaceControl;\n Hint: InterfaceControl;\n Modal: InterfaceControl;\n LinkBitmojiCallToAction: InterfaceControl;\n SnapButton: InterfaceControl;\n PlayButton: InterfaceControl;\n All: InterfaceControl;\n ExitFullScreenButton: InterfaceControl;\n MemoriesButton: InterfaceControl;\n LensAttachmentButton: InterfaceControl;\n ReverseCamera: InterfaceControl;\n };\n\n InterfaceAction: {\n EnableHighlight: InterfaceAction;\n DisableHighlight: InterfaceAction;\n Trigger: InterfaceAction;\n Show: InterfaceAction;\n Hide: InterfaceAction;\n };\n\n ExternalMediaOrientation: {\n CW0: ExternalMediaOrientation;\n CW90: ExternalMediaOrientation;\n CW180: ExternalMediaOrientation;\n CW270: ExternalMediaOrientation;\n };\n\n ErrorType: {\n LensDeserialization: ErrorType;\n Validation: ErrorType;\n Uncategorized: ErrorType;\n LensExecution: ErrorType;\n Abort: ErrorType;\n Uninitialized: ErrorType;\n };\n\n initialize: (config: InitializeInput) => void;\n processFrame: (config: ProcessFrameInput) => void;\n addLens: (config: AddLensInput) => void;\n replaceLenses: (config: ReplaceLensesInput) => void;\n removeLens: (config: RemoveLensInput) => void;\n clearAllLenses: (config: ClearAllLensesInput) => void;\n teardown: (config: TeardownInput) => void;\n useMediaElement: (config: UseMediaElementInput) => void;\n setFPSLimit: (config: SetFpsLimitInput) => void;\n setRenderLoopMode: (config: SetRenderLoopInput) => void;\n getCoreVersion: () => number;\n playCanvas: (input: PlayCanvasInput) => void;\n pauseCanvas: (input: PauseCanvasInput) => void;\n getOutputCanvases: () => GetOutputCanvasesOutput;\n setRenderSize: (input: SetRenderSizeInput) => void;\n startProfiling: () => void;\n endProfiling: () => void;\n setInputTransform: (config: SetInputTransformInput) => void;\n registerUriListener: (scheme: string, route: string, listener: UriListener) => void;\n provideUriResponse: (requestId: string, response: UriResponse) => void;\n setRemoteAssetsProvider: (provider: SetRemoteAssetsProviderInput) => void;\n provideRemoteAssetsResponse: (assetResponse: ProvideRemoteAssetsResponseInput) => void;\n setRemoteAssetsUploadHandler: (provider: SetRemoteAssetsUploadHandlerInput) => void;\n provideRemoteAssetsUploadResponse: (assetResponse: ProvideRemoteAssetsUploadResponseInput) => void;\n registerShowHintCallback: (callback: ShowHintCallback) => void;\n registerHideHintCallback: (callback: HideHintCallback) => void;\n registerSavePersistentStoreCallback: (callback: SavePersistentStoreCallback) => void;\n imageToYuvBuffer: (config: ImageToYuvBufferInput) => void;\n yuvBufferToBitmap: (config: YuvBufferToBitmapInput) => void;\n setOnFrameProcessedCallback: (config: SetOnFrameProcessedInput) => void;\n setInterfaceControlVisibility: (config: SetInterfaceControlVisibilityInput) => void;\n handleClientInterfaceAction: (config: HandleClientInterfaceActionInput) => void;\n provideExternalImage: (config: ProvideExternalImageInput) => void;\n provideExternalVideo: (config: ProvideExternalVideoInput) => void;\n setScreenDimmingRequestHandler: (callback: ScreenDimmingRequestHandler) => void;\n setClientInterfaceRequestHandler: (callback: ClientInterfaceRequestHandler) => void;\n setPreloadedConfiguration: (config: SetPreloadedConfigurationInput) => void;\n setAllSoundsMuted: (config: SetAllSoundsMutedInput) => void;\n setDeviceClass: (config: SetDeviceClassInput) => void;\n setSystemFonts: (config: SetSystemFontsInput) => void;\n setAudioParameters: (config: SetAudioParametersInput) => void;\n processAudioSampleBuffer: (config: ProcessAudioSampleBufferInput) => void;\n registerBeginWebXrHandler: (handler: ((config: BeginWebXrInput) => void) | null) => void;\n registerEndWebXrHandler: (handler: (() => void) | null) => void;\n setGpuIndex: (config: SetGpuIndexInput) => void;\n setGeoDataProvider: (provider: SetGeoDataProviderInput) => void;\n provideGeoData: (config: ProvideGeoDataInput) => void;\n}\n\ndeclare global {\n // This function is provided by the Emscripten glue file and responsible for initialization, will be fullfiled\n // when everything is loaded and it is safe to call compiled functions\n // eslint-disable-next-line max-len\n // https://emscripten.org/docs/getting_started/FAQ.html#how-can-i-tell-when-the-page-is-fully-loaded-and-it-is-safe-to-call-compiled-functions\n // Function is defined by the LensCore web assembly\n // eslint-disable-next-line max-len\n // https://github.sc-corp.net/Snapchat/LensCore/blob/6715da8c877d593e4fe133f4145eb3022204525d/Platforms/WebAssembly/LookserySDK/CMakeLists.txt#L65\n function createLensesModule(module: InitialEmscriptenModule): Promise<InitialEmscriptenModule & LensCoreModule>;\n}\n"]}
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../src/lens-core-module/generated-types.ts"],"names":[],"mappings":"","sourcesContent":["export type DefaultEventHandler = (...data: any[]) => void;\n\nexport type DefaultErrorHandler = (err: LensCoreError) => void;\n\nexport type LensCoreEnumValue = { value: number };\n\nexport type GetOutputCanvasesOutput = Record<number, HTMLCanvasElement>;\n\nexport type SetRenderSizeInput = SetRenderSizeMatchInputResolutionInput | SetRenderSizeExplicitInput;\n\nexport type SetRemoteAssetsProviderInput = (assetDescriptor: AssetDescriptor) => void;\n\nexport type SetRemoteAssetsUploadHandlerInput = (assetUploadDescriptor: AssetUploadDescriptor) => void;\n\nexport type ContentType =\n | \"text/plain\"\n | \"text/html\"\n | \"application/json\"\n | \"application/octet-stream\"\n | \"application/x-protobuf\"\n | \"application/grpc\";\n\nexport type SavePersistentStoreCallback = (id: string, data: ArrayBuffer) => void;\n\nexport type ShowHintCallback = (effectId: string, hintId: string) => void;\n\nexport type HideHintCallback = (effectId: string) => void;\n\nexport type ReceiveInstanceCallback = (instance: WebAssembly.Instance, module: WebAssembly.Module) => void;\n\nexport type AssetType = LensCoreEnumValue;\n\nexport type CanvasType = LensCoreEnumValue;\n\nexport type RenderLoopMode = LensCoreEnumValue;\n\nexport type LensApiVisibility = LensCoreEnumValue;\n\nexport type DeviceClass = LensCoreEnumValue;\n\nexport type UserDataAccess = LensCoreEnumValue;\n\nexport type InterfaceControl = LensCoreEnumValue;\n\nexport type InterfaceAction = LensCoreEnumValue;\n\nexport type ExternalMediaOrientation = LensCoreEnumValue;\n\nexport type ErrorType = LensCoreEnumValue;\n\nexport type Uri = `${string}://${string}`;\n\nexport type Dimensions = { width: number; height: number };\n\nexport type Size2D = { width: number; height: number };\n\nexport type Vec2D = { x: number; y: number };\n\nexport type Rect = { origin: Vec2D; size: Size2D };\n\nexport interface ClearAllLensesInput {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface OnFrameProcessedParam {\n processingTimeMs: number;\n}\n\nexport interface XrCapabilities {\n sixDofSupported: boolean;\n sceneDepthSupported: boolean;\n}\n\nexport interface OnTurnOnParam {\n needsAudioInput: boolean;\n}\n\nexport type TurnOnEventHandler = (arg: OnTurnOnParam) => void;\n\nexport interface InitializeInput {\n canvas?: HTMLCanvasElement | string;\n outputResolution?: Dimensions;\n showFpsPanel?: boolean;\n shouldUseWorker?: boolean;\n onFrameProcessed?: (arg: OnFrameProcessedParam) => void;\n xrCapabilities?: XrCapabilities;\n onFailure?: DefaultErrorHandler;\n onSuccess?: DefaultEventHandler;\n exceptionHandler?: (error: LensCoreError) => void;\n}\n\nexport interface PlayCanvasInput {\n type: CanvasType;\n onReady?: () => void;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface PauseCanvasInput {\n type: CanvasType;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetFpsLimitInput {\n fps: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetInputTransformInput {\n matrix: Float32Array | ArrayBuffer;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetOnFrameProcessedInput {\n onFrameProcessed: (arg: OnFrameProcessedParam) => void;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderSizeMatchInputResolutionInput {\n mode: \"matchInputResolution\";\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderSizeExplicitInput {\n mode: \"explicit\";\n target: Dimensions;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderLoopInput {\n mode: RenderLoopMode;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface TeardownInput {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultEventHandler;\n}\n\nexport interface ReplayTrackingDataInput {\n buffer: Uint8Array | ArrayBuffer;\n}\n\nexport interface UseMediaElementInput {\n media?: HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | MediaStream;\n requestWebcam?: boolean;\n startOnFrontCamera?: boolean;\n mirrorMedia?: boolean;\n pauseExistingMedia?: boolean;\n autoplayNewMedia?: boolean;\n autoplayPreviewCanvas?: boolean;\n useManualFrameProcessing?: boolean;\n replayTrackingData?: ReplayTrackingDataInput;\n onFailure?: DefaultErrorHandler;\n onSuccess?: DefaultEventHandler;\n}\n\nexport interface UriListener {\n handleRequest: (request: UriRequest) => void;\n cancelRequest?: (request: UriCancelRequest) => void;\n}\n\nexport interface UriRequest {\n uri: Uri;\n identifier: string;\n method: \"GET\" | \"POST\";\n contentType: ContentType;\n data: ArrayBuffer;\n metadata: Record<string, string>;\n}\n\nexport interface UriResponse {\n code: number;\n description: string;\n contentType: ContentType;\n data: ArrayBuffer;\n metadata?: Record<string, string>;\n}\n\nexport interface UriCancelRequest {\n uri: Uri;\n requestId: string;\n}\n\nexport interface LensDescriptor {\n lensId: string;\n lensChecksum: string;\n lensPath?: string;\n lensDataBuffer?: Uint8Array | ArrayBuffer;\n onTurnOn?: TurnOnEventHandler;\n onTurnOff?: DefaultEventHandler;\n onFirstFrameProcessed?: DefaultEventHandler;\n onResourcesLoaded?: DefaultEventHandler;\n launchData?: Uint8Array | ArrayBuffer;\n apiVisibility?: LensApiVisibility;\n publicApiUserDataAccess?: UserDataAccess;\n}\n\nexport interface AddLensInput extends LensDescriptor {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface ReplaceLensesInput {\n lenses: LensDescriptor | Array<LensDescriptor>;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface RemoveLensInput {\n lensId: string;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface AssetDescriptor {\n assetId: string;\n assetType: AssetType;\n avatarId?: string;\n effectId?: string;\n encryptionKey?: ArrayBuffer;\n}\n\nexport interface AssetUploadDescriptor {\n requestId: number;\n assetId: string;\n assetType: AssetType;\n effectId: string;\n assetBuffer: ArrayBuffer;\n encryptionKey?: ArrayBuffer;\n encryptionIv?: ArrayBuffer;\n assetBatchId?: string;\n}\n\nexport interface ProvideRemoteAssetsResponseInput {\n assetId: string;\n assetType: AssetType;\n assetBuffer?: ArrayBuffer;\n assetChecksum?: string;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface ProvideRemoteAssetsUploadResponseInput {\n requestId: number;\n success: boolean;\n assetUrl?: string;\n assetUploadMetadata?: ArrayBuffer;\n}\n\nexport interface XRInput {\n layer: XRWebGLLayer;\n binding: XRWebGLBinding;\n frame: XRFrame;\n referenceSpace: XRReferenceSpace;\n}\n\nexport interface ProcessFrameInput {\n inputFrame: ImageBitmap | HTMLCanvasElement | HTMLImageElement | VideoFrame | XRInput;\n timestampMillis: number;\n renderTimestampMillis?: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface LensCoreError extends Error {\n otherExceptions?: Array<Error>;\n cause: { type: ErrorType; metadata?: any };\n}\n\nexport interface ImageToYuvBufferInput {\n image: Uint8Array | ArrayBuffer | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap;\n width: number;\n height: number;\n outputBuffer?: Uint8Array | ArrayBuffer;\n onSuccess: (buffer: ArrayBuffer) => void;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface YuvBufferToBitmapInput {\n buffer: Uint8Array | ArrayBuffer;\n width: number;\n height: number;\n targetWidth?: number;\n targetHeight?: number;\n preserveCanvasState?: boolean;\n allowBufferTransfer?: boolean;\n onSuccess: (bitmap: ImageBitmap) => void;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetInterfaceControlVisibilityInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n visibility: boolean;\n}\n\nexport interface HandleClientInterfaceActionInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n interfaceAction: InterfaceAction;\n}\n\nexport interface ProvideExternalImageInput {\n data: Uint8Array | ArrayBuffer;\n orientation: ExternalMediaOrientation;\n faceRects?: Array<Rect>;\n}\n\nexport interface ProvideExternalVideoInput {\n data: Uint8Array | ArrayBuffer;\n orientation: ExternalMediaOrientation;\n relStartPosition?: number;\n relEndPosition?: number;\n volume?: number;\n}\n\nexport interface ScreenDimmingRequestInput {\n effectId: string;\n enabled: boolean;\n}\n\nexport type ScreenDimmingRequestHandler = (config: ScreenDimmingRequestInput) => void;\n\nexport interface ClientInterfaceData {\n HeaderId?: string;\n DescriptionId?: string;\n FaceFilteringEnabled?: \"0\" | \"1\";\n FaceFilteringMultipleFaces?: \"0\" | \"1\";\n ImageEnabled?: \"0\" | \"1\";\n VideoEnabled?: \"0\" | \"1\";\n}\n\nexport interface ClientInterfaceRequestInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n interfaceAction: InterfaceAction;\n data: ClientInterfaceData;\n}\n\nexport type ClientInterfaceRequestHandler = (config: ClientInterfaceRequestInput) => void;\n\nexport interface LensCoreConfig {\n configId: string;\n value:\n | { stringValue: string }\n | { boolValue: boolean }\n | { intValue: number }\n | { longValue: number }\n | { floatValue: number }\n | {\n anyValue: {\n typeUrl: string;\n value: Uint8Array | ArrayBuffer;\n };\n };\n}\n\nexport type SetPreloadedConfigurationInput = Array<LensCoreConfig>;\n\nexport interface ConfigurationRequest {\n configId: string;\n}\n\nexport type ConfigurationProvider = (configurationRequest: ConfigurationRequest) => Promise<LensCoreConfig | undefined>;\n\nexport interface SetAllSoundsMutedInput {\n muted: boolean;\n fade: boolean;\n}\n\nexport interface SetDeviceClassInput {\n deviceClass: DeviceClass;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetAudioParametersInput {\n parameters: {\n numChannels?: number;\n sampleRate?: number;\n };\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SystemFont {\n name: string;\n data: Uint8Array | ArrayBuffer;\n}\n\nexport interface SetSystemFontsInput {\n fonts: SystemFont[]\n}\n\nexport interface ProcessAudioSampleBufferInput {\n input: Float32Array[] | ArrayBuffer[];\n output?: Float32Array[] | ArrayBuffer[];\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface BeginWebXrInput {\n glContext: WebGL2RenderingContext;\n requestConfig: {\n requiredFeatures?: string[]\n }\n}\n\nexport interface InitialEmscriptenModule {\n mainScriptUrlOrBlob: string;\n compiledModule?: WebAssembly.Module;\n pthreadWorkerScriptUrl?: string;\n instantiateWasm?: (importObject: WebAssembly.Imports, receiveInstance: ReceiveInstanceCallback) => void;\n print?: (text: string) => void;\n printErr?: (text: string) => void;\n}\n\nexport interface SetGpuIndexInput {\n gpuIndex: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport type SetGeoDataProviderInput = () => void;\n\nexport interface HourlyWeatherForecast {\n celsius: number;\n fahrenheit: number;\n displayTime: string;\n weatherCondition: string;\n localizedWeatherCondition: string;\n}\n\nexport interface WeatherData {\n locationName: string;\n celsius: number;\n fahrenheit: number;\n hourlyForecasts: HourlyWeatherForecast[];\n}\n\nexport interface GeoData {\n weather: WeatherData;\n}\n\nexport interface ProvideGeoDataInput {\n geoData: GeoData;\n}\n\nexport interface LensCoreModule extends InitialEmscriptenModule {\n AssetType: {\n RemoteMediaByUrl: AssetType;\n DeviceDependent: AssetType;\n Static: AssetType;\n URL: AssetType;\n BitmojiDynamicAsset: AssetType;\n };\n\n CanvasType: {\n None: CanvasType;\n Preview: CanvasType;\n Capture: CanvasType;\n All: CanvasType;\n };\n\n LensApiVisibility: {\n Dev: LensApiVisibility;\n Private: LensApiVisibility;\n Public: LensApiVisibility;\n };\n\n DeviceClass: {\n Undefined: DeviceClass;\n BarelyWorking: DeviceClass;\n LowEnd: DeviceClass;\n MidEnd: DeviceClass;\n HighEnd: DeviceClass;\n };\n\n RenderLoopMode: {\n SetTimeout: RenderLoopMode;\n RequestAnimationFrame: RenderLoopMode;\n };\n\n UserDataAccess: {\n Restricted: UserDataAccess;\n Unrestricted: UserDataAccess;\n };\n\n InterfaceControl: {\n ToggleCameraButton: InterfaceControl;\n ImagePicker: InterfaceControl;\n Hint: InterfaceControl;\n Modal: InterfaceControl;\n LinkBitmojiCallToAction: InterfaceControl;\n SnapButton: InterfaceControl;\n PlayButton: InterfaceControl;\n All: InterfaceControl;\n ExitFullScreenButton: InterfaceControl;\n MemoriesButton: InterfaceControl;\n LensAttachmentButton: InterfaceControl;\n ReverseCamera: InterfaceControl;\n };\n\n InterfaceAction: {\n EnableHighlight: InterfaceAction;\n DisableHighlight: InterfaceAction;\n Trigger: InterfaceAction;\n Show: InterfaceAction;\n Hide: InterfaceAction;\n };\n\n ExternalMediaOrientation: {\n CW0: ExternalMediaOrientation;\n CW90: ExternalMediaOrientation;\n CW180: ExternalMediaOrientation;\n CW270: ExternalMediaOrientation;\n };\n\n ErrorType: {\n LensDeserialization: ErrorType;\n Validation: ErrorType;\n Uncategorized: ErrorType;\n LensExecution: ErrorType;\n Abort: ErrorType;\n Uninitialized: ErrorType;\n };\n\n initialize: (config: InitializeInput) => void;\n processFrame: (config: ProcessFrameInput) => void;\n addLens: (config: AddLensInput) => void;\n replaceLenses: (config: ReplaceLensesInput) => void;\n removeLens: (config: RemoveLensInput) => void;\n clearAllLenses: (config: ClearAllLensesInput) => void;\n teardown: (config: TeardownInput) => void;\n useMediaElement: (config: UseMediaElementInput) => void;\n setFPSLimit: (config: SetFpsLimitInput) => void;\n setRenderLoopMode: (config: SetRenderLoopInput) => void;\n getCoreVersion: () => number;\n playCanvas: (input: PlayCanvasInput) => void;\n pauseCanvas: (input: PauseCanvasInput) => void;\n getOutputCanvases: () => GetOutputCanvasesOutput;\n setRenderSize: (input: SetRenderSizeInput) => void;\n startProfiling: () => void;\n endProfiling: () => void;\n setInputTransform: (config: SetInputTransformInput) => void;\n registerUriListener: (scheme: string, route: string, listener: UriListener) => void;\n provideUriResponse: (requestId: string, response: UriResponse) => void;\n setRemoteAssetsProvider: (provider: SetRemoteAssetsProviderInput) => void;\n provideRemoteAssetsResponse: (assetResponse: ProvideRemoteAssetsResponseInput) => void;\n setRemoteAssetsUploadHandler: (provider: SetRemoteAssetsUploadHandlerInput) => void;\n provideRemoteAssetsUploadResponse: (assetResponse: ProvideRemoteAssetsUploadResponseInput) => void;\n registerShowHintCallback: (callback: ShowHintCallback) => void;\n registerHideHintCallback: (callback: HideHintCallback) => void;\n registerSavePersistentStoreCallback: (callback: SavePersistentStoreCallback) => void;\n imageToYuvBuffer: (config: ImageToYuvBufferInput) => void;\n yuvBufferToBitmap: (config: YuvBufferToBitmapInput) => void;\n setOnFrameProcessedCallback: (config: SetOnFrameProcessedInput) => void;\n setInterfaceControlVisibility: (config: SetInterfaceControlVisibilityInput) => void;\n handleClientInterfaceAction: (config: HandleClientInterfaceActionInput) => void;\n provideExternalImage: (config: ProvideExternalImageInput) => void;\n provideExternalVideo: (config: ProvideExternalVideoInput) => void;\n setScreenDimmingRequestHandler: (callback: ScreenDimmingRequestHandler) => void;\n setClientInterfaceRequestHandler: (callback: ClientInterfaceRequestHandler) => void;\n setPreloadedConfiguration: (config: SetPreloadedConfigurationInput) => void;\n setAllSoundsMuted: (config: SetAllSoundsMutedInput) => void;\n setDeviceClass: (config: SetDeviceClassInput) => void;\n setSystemFonts: (config: SetSystemFontsInput) => void;\n setAudioParameters: (config: SetAudioParametersInput) => void;\n processAudioSampleBuffer: (config: ProcessAudioSampleBufferInput) => void;\n registerBeginWebXrHandler: (handler: ((config: BeginWebXrInput) => void) | null) => void;\n registerEndWebXrHandler: (handler: (() => void) | null) => void;\n setGpuIndex: (config: SetGpuIndexInput) => void;\n setGeoDataProvider: (provider: SetGeoDataProviderInput) => void;\n provideGeoData: (config: ProvideGeoDataInput) => void;\n setConfigurationProvider: (provider: ConfigurationProvider) => void;\n}\n\ndeclare global {\n // This function is provided by the Emscripten glue file and responsible for initialization, will be fullfiled\n // when everything is loaded and it is safe to call compiled functions\n // eslint-disable-next-line max-len\n // https://emscripten.org/docs/getting_started/FAQ.html#how-can-i-tell-when-the-page-is-fully-loaded-and-it-is-safe-to-call-compiled-functions\n // Function is defined by the LensCore web assembly\n // eslint-disable-next-line max-len\n // https://github.sc-corp.net/Snapchat/LensCore/blob/6715da8c877d593e4fe133f4145eb3022204525d/Platforms/WebAssembly/LookserySDK/CMakeLists.txt#L65\n function createLensesModule(module: InitialEmscriptenModule): Promise<InitialEmscriptenModule & LensCoreModule>;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  export default {
2
- version: "301",
3
- buildNumber: "516",
4
- baseUrl: "https://cf-st.sc-cdn.net/d/cntubJAn8jSUJVXTzyhlx?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92",
2
+ version: "309",
3
+ buildNumber: "586",
4
+ baseUrl: "https://cf-st.sc-cdn.net/d/r38Sk7x9s1MK7V7P6U2SZ?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92",
5
5
  };
6
6
  //# sourceMappingURL=lensCoreWasmVersions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lensCoreWasmVersions.js","sourceRoot":"","sources":["../src/lensCoreWasmVersions.ts"],"names":[],"mappings":"AAAA,eAAe;IACX,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,oFAAoF;CAChG,CAAC","sourcesContent":["export default {\n version: \"301\",\n buildNumber: \"516\",\n baseUrl: \"https://cf-st.sc-cdn.net/d/cntubJAn8jSUJVXTzyhlx?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92\",\n};\n"]}
1
+ {"version":3,"file":"lensCoreWasmVersions.js","sourceRoot":"","sources":["../src/lensCoreWasmVersions.ts"],"names":[],"mappings":"AAAA,eAAe;IACX,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,oFAAoF;CAChG,CAAC","sourcesContent":["export default {\n version: \"309\",\n buildNumber: \"586\",\n baseUrl: \"https://cf-st.sc-cdn.net/d/r38Sk7x9s1MK7V7P6U2SZ?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92\",\n};\n"]}
@@ -69,14 +69,14 @@ export interface Keyboard {
69
69
  * @param callback - Function that handles the event.
70
70
  * @param options - Additional options for event listener behavior (optional).
71
71
  */
72
- addEventListener: (type: "active", callback: TypedEventListener<KeyboardEvents>, options?: TypedEventListenerOptions) => void;
72
+ addEventListener: (type: "active", callback: KeyboardEventListener, options?: TypedEventListenerOptions) => void;
73
73
  /**
74
74
  * Removes a previously added event listener.
75
75
  *
76
76
  * @param type - The type of event to remove.
77
77
  * @param callback - The event listener function to remove.
78
78
  */
79
- removeEventListener: (type: "active", callback: TypedEventListener<KeyboardEvents>) => void;
79
+ removeEventListener: (type: "active", callback: KeyboardEventListener) => void;
80
80
  /**
81
81
  * Sends a string of text to the active lens. The application should use this method
82
82
  * to provide user-typed input to the lens for display.
@@ -107,8 +107,8 @@ export declare class LensKeyboard {
107
107
  dismiss(): void;
108
108
  getElement(): HTMLTextAreaElement;
109
109
  sendInputToLens(text: string): void;
110
- addEventListener(type: "active", callback: TypedEventListener<KeyboardEvents>, options?: TypedEventListenerOptions): void;
111
- removeEventListener(type: "active", callback: TypedEventListener<KeyboardEvents>): void;
110
+ addEventListener(type: "active", callback: KeyboardEventListener, options?: TypedEventListenerOptions): void;
111
+ removeEventListener(type: "active", callback: KeyboardEventListener): void;
112
112
  toPublicInterface(): Keyboard;
113
113
  destroy(): void;
114
114
  private sendReply;
@@ -1 +1 @@
1
- {"version":3,"file":"LensKeyboard.d.ts","sourceRoot":"","sources":["../../src/session/LensKeyboard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEhG,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,6BAA6B,CAAC;AAC3E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAK7C;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAChC;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;OAEG;IACH,OAAO,EAAE,mBAAmB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,gBAAgB,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;AA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Aa,CACrB,IAAI,gBAAgB,CAAC,QAAQ,EAAE;YAC3B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE;YAErB,IAAI,EAAE,KAAK,CAAC,IAAI;SACnB,CAAC,CACL,CAAC;IACN,CAAC;IAEO,iBAAiB,CAAC,KAAoB;QAC1C,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YAC3C,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;SAC5C;IACL,CAAC;CACJ;AAOD,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CACzC,cAAc,EACd,CAAC,gBAAgB,CAAC,KAAK,CAAU,EACjC,CAAC,SAAoB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,SAAS,CAAC,CACxD,CAAC","sourcesContent":["import { isState, forActions } from \"@snap/state-management\";\nimport { Injectable } from \"@snap/ts-inject\";\nimport { TypedCustomEvent } from \"../events/TypedCustomEvent\";\nimport type { TypedEventListener, TypedEventListenerOptions } from \"../events/TypedEventTarget\";\nimport { TypedEventTarget } from \"../events/TypedEventTarget\";\nimport type { UriHandler, UriResponse } from \"../uri-handlers/UriHandlers\";\nimport type { Lens } from \"../lens/Lens\";\nimport { getLogger } from \"../logger/logger\";\nimport type { LensState } from \"./lensState\";\nimport { lensStateFactory } from \"./lensState\";\n\nconst logger = getLogger(\"LensKeyboard\");\n\n/**\n * \"active\" event payload.\n *\n * This event is emitted when a lens requests a keyboard to be shown or dismissed.\n * The application should listen for this event and display or remove its keyboard UI accordingly.\n */\nexport interface KeyboardActiveEvent {\n /**\n * Indicates whether the keyboard should be displayed (`true`) or hidden (`false`).\n */\n active: boolean;\n\n /**\n * The current text input associated with the keyboard.\n */\n text: string;\n\n /**\n * The lens that initiated the keyboard request.\n */\n lens: Lens;\n\n /**\n * @deprecated Clients apps are responsible to create keyboard UI.\n */\n element: HTMLTextAreaElement;\n}\n\n/**\n * Defines events emitted by the `Keyboard` API.\n */\nexport type KeyboardEvents = TypedCustomEvent<\"active\", KeyboardActiveEvent>;\n\n/**\n * Listener of {@link KeyboardEvents} events.\n */\nexport type KeyboardEventListener = TypedEventListener<KeyboardEvents>;\n\n/**\n * The `Keyboard` API enables applications to handle text input requests triggered by lenses.\n *\n * Lenses can request a keyboard display by emitting an `active` event. The application is responsible for displaying\n * a keyboard UI in response to this event.\n *\n * As users type, the application sends the typed text back to the lens using {@link Keyboard.sendInputToLens},\n * allowing the lens to display the text accordingly.\n *\n * Lenses can also request the keyboard to be dismissed. When this happens, the application receives an event\n * and should remove the displayed keyboard UI.\n *\n * @example\n * ```ts\n * cameraKitSession.keyboard.addEventListener('active', ({ detail }) => {\n * const { active, text } = detail;\n * if (active) {\n * showKeyboard(text, (newText) => cameraKitSession.keyboard.sendInputToLens(newText));\n * } else {\n * hideKeyboard();\n * }\n * });\n * ```\n *\n * @category Lenses\n */\nexport interface Keyboard {\n /**\n * Adds an event listener for keyboard-related events.\n *\n * @param type - The type of event to listen for (e.g., \"active\").\n * @param callback - Function that handles the event.\n * @param options - Additional options for event listener behavior (optional).\n */\n addEventListener: (\n type: \"active\",\n callback: TypedEventListener<KeyboardEvents>,\n options?: TypedEventListenerOptions\n ) => void;\n\n /**\n * Removes a previously added event listener.\n *\n * @param type - The type of event to remove.\n * @param callback - The event listener function to remove.\n */\n removeEventListener: (type: \"active\", callback: TypedEventListener<KeyboardEvents>) => void;\n\n /**\n * Sends a string of text to the active lens. The application should use this method\n * to provide user-typed input to the lens for display.\n *\n * @param text - The text to send to the lens. Supports escape sequences (e.g., `\\n` for multiline input).\n */\n sendInputToLens: (text: string) => void;\n\n /**\n * Dismisses the keyboard, clears the text input, and triggers an `active` event with `active: false`.\n * Applications can use this to remove on-screen text input elements when input is no longer needed.\n */\n dismiss: () => void;\n\n /**\n * @deprecated Clients apps are responsible to create keyboard UI.\n */\n getElement: () => HTMLTextAreaElement;\n}\n\n// eslint-disable-next-line max-len\n// https://github.sc-corp.net/Snapchat/LensCore/blob/4c05e721d0321133d50148e5b37fea5078516abd/Src/Scenarium/Infrastructure/TextInputSystem.Scn.hpp#L38\ntype KeyboardType = \"Text\" | \"Number\" | \"Phone\" | \"Url\";\n\n// eslint-disable-next-line max-len\n// https://github.sc-corp.net/Snapchat/LensCore/blob/4c05e721d0321133d50148e5b37fea5078516abd/Src/Scenarium/Infrastructure/TextInputSystem.Scn.hpp#L44\ntype ReturnKeyType = \"Done\" | \"Go\" | \"Next\" | \"Return\" | \"Search\" | \"Send\";\n\ninterface RequestKeyboardData {\n enablePreview: boolean;\n end: number;\n keyboardType: KeyboardType;\n returnKeyType: ReturnKeyType;\n start: number;\n text: string;\n}\n\ninterface DismissReply {\n keyboardOpen: false;\n}\n\ninterface SetTextReply {\n text: string;\n start: number;\n end: number;\n done: boolean;\n shouldNotify: boolean;\n}\n\n/** @internal */\nexport class LensKeyboard {\n public readonly uriHandler: UriHandler;\n private readonly events: TypedEventTarget<KeyboardEvents>;\n private readonly element: HTMLTextAreaElement;\n private active = false;\n private text: string | undefined = undefined;\n private reply: (response: UriResponse) => void = () => {};\n\n constructor(private readonly lensState: LensState) {\n this.onElementKeyPress = this.onElementKeyPress.bind(this);\n this.events = new TypedEventTarget<KeyboardEvents>();\n this.element = document.createElement(\"textarea\");\n this.element.addEventListener(\"keypress\", this.onElementKeyPress);\n this.uriHandler = {\n uri: \"app://textInput/\",\n handleRequest: (request, reply) => {\n if (request.uri === \"app://textInput/requestKeyboard\") {\n const data = JSON.parse(new TextDecoder().decode(request.data)) as RequestKeyboardData;\n this.element.value = data.text;\n this.text = data.text;\n this.reply = reply;\n this.active = true;\n this.notifyClient();\n this.element.focus();\n } else if (request.uri === \"app://textInput/dismissKeyboard\") {\n this.active = false;\n this.sendReply({ keyboardOpen: false });\n this.notifyClient();\n } else {\n logger.error(new Error(`Unhandled lens keyboard request '${request.uri}'.`));\n }\n },\n };\n lensState.events.pipe(forActions(\"turnedOff\")).subscribe(() => {\n this.dismiss();\n });\n }\n\n dismiss(): void {\n this.active = false;\n this.element.value = \"\";\n this.text = \"\";\n this.sendReply({ keyboardOpen: false });\n this.notifyClient();\n }\n\n getElement(): HTMLTextAreaElement {\n return this.element;\n }\n\n sendInputToLens(text: string): void {\n this.element.value = text;\n this.text = text;\n this.sendReply({\n text: text,\n start: text.length,\n end: text.length,\n done: true,\n shouldNotify: true,\n });\n }\n\n addEventListener(\n type: \"active\",\n callback: TypedEventListener<KeyboardEvents>,\n options?: TypedEventListenerOptions\n ): void {\n this.events.addEventListener(type, callback, options);\n }\n\n removeEventListener(type: \"active\", callback: TypedEventListener<KeyboardEvents>): void {\n this.events.removeEventListener(type, callback);\n }\n\n toPublicInterface(): Keyboard {\n return {\n addEventListener: this.addEventListener.bind(this),\n removeEventListener: this.removeEventListener.bind(this),\n sendInputToLens: this.sendInputToLens.bind(this),\n dismiss: this.dismiss.bind(this),\n getElement: this.getElement.bind(this),\n };\n }\n\n destroy() {\n // TODO: remove when removing deprecated element ref\n this.element.removeEventListener(\"keypress\", this.onElementKeyPress);\n }\n\n private sendReply(data: DismissReply | SetTextReply) {\n this.reply({\n code: 200,\n description: \"\",\n contentType: \"application/json\",\n data: new TextEncoder().encode(JSON.stringify(data)),\n });\n }\n\n private notifyClient(): void {\n const state = this.lensState.getState();\n // If lens keyboard status is changing, we know a lens must be applied.\n if (isState(state, \"noLensApplied\")) return;\n this.events.dispatchEvent(\n new TypedCustomEvent(\"active\", {\n element: this.element,\n active: this.active,\n text: this.text ?? \"\",\n // If the keyboard is up, it has been triggered by an active lens.\n lens: state.data,\n })\n );\n }\n\n private onElementKeyPress(event: KeyboardEvent) {\n if (event.code === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n this.sendInputToLens(this.element.value);\n }\n }\n}\n\n/**\n * Factory function for creating a LensKeyboard instance.\n *\n * @internal\n */\nexport const lensKeyboardFactory = Injectable(\n \"lensKeyboard\",\n [lensStateFactory.token] as const,\n (lensState: LensState) => new LensKeyboard(lensState)\n);\n"]}
1
+ {"version":3,"file":"LensKeyboard.js","sourceRoot":"","sources":["../../src/session/LensKeyboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,MAAM,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;AAsIzC,MAAM,OAAO,YAAY;IAQrB,YAA6B,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;QAJzC,WAAM,GAAG,KAAK,CAAC;QACf,SAAI,GAAuB,SAAS,CAAC;QACrC,UAAK,GAAoC,GAAG,EAAE,GAAE,CAAC,CAAC;QAGtD,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3D,IAAI,CAAC,MAAM,GAAG,IAAI,gBAAgB,EAAkB,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAClD,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAClE,IAAI,CAAC,UAAU,GAAG;YACd,GAAG,EAAE,kBAAkB;YACvB,aAAa,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;gBAC9B,IAAI,OA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C;YACP,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,EAAE;YACf,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;SACvD,CAAC,CAAC;IACP,CAAC;IAEO,YAAY;;QAChB,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QAExC,IAAI,OAAO,CAAC,KAAK,EAAE,eAAe,CAAC;YAAE,OAAO;QAC5C,IAAI,CAAC,MAAM,CAAC,aAAa,CACrB,IAAI,gBAAgB,CAAC,QAAQ,EAAE;YAC3B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE;YAErB,IAAI,EAAE,KAAK,CAAC,IAAI;SACnB,CAAC,CACL,CAAC;IACN,CAAC;IAEO,iBAAiB,CAAC,KAAoB;QAC1C,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YAC3C,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;SAC5C;IACL,CAAC;CACJ;AAOD,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CACzC,cAAc,EACd,CAAC,gBAAgB,CAAC,KAAK,CAAU,EACjC,CAAC,SAAoB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,SAAS,CAAC,CACxD,CAAC","sourcesContent":["import { isState, forActions } from \"@snap/state-management\";\nimport { Injectable } from \"@snap/ts-inject\";\nimport { TypedCustomEvent } from \"../events/TypedCustomEvent\";\nimport type { TypedEventListener, TypedEventListenerOptions } from \"../events/TypedEventTarget\";\nimport { TypedEventTarget } from \"../events/TypedEventTarget\";\nimport type { UriHandler, UriResponse } from \"../uri-handlers/UriHandlers\";\nimport type { Lens } from \"../lens/Lens\";\nimport { getLogger } from \"../logger/logger\";\nimport type { LensState } from \"./lensState\";\nimport { lensStateFactory } from \"./lensState\";\n\nconst logger = getLogger(\"LensKeyboard\");\n\n/**\n * \"active\" event payload.\n *\n * This event is emitted when a lens requests a keyboard to be shown or dismissed.\n * The application should listen for this event and display or remove its keyboard UI accordingly.\n */\nexport interface KeyboardActiveEvent {\n /**\n * Indicates whether the keyboard should be displayed (`true`) or hidden (`false`).\n */\n active: boolean;\n\n /**\n * The current text input associated with the keyboard.\n */\n text: string;\n\n /**\n * The lens that initiated the keyboard request.\n */\n lens: Lens;\n\n /**\n * @deprecated Clients apps are responsible to create keyboard UI.\n */\n element: HTMLTextAreaElement;\n}\n\n/**\n * Defines events emitted by the `Keyboard` API.\n */\nexport type KeyboardEvents = TypedCustomEvent<\"active\", KeyboardActiveEvent>;\n\n/**\n * Listener of {@link KeyboardEvents} events.\n */\nexport type KeyboardEventListener = TypedEventListener<KeyboardEvents>;\n\n/**\n * The `Keyboard` API enables applications to handle text input requests triggered by lenses.\n *\n * Lenses can request a keyboard display by emitting an `active` event. The application is responsible for displaying\n * a keyboard UI in response to this event.\n *\n * As users type, the application sends the typed text back to the lens using {@link Keyboard.sendInputToLens},\n * allowing the lens to display the text accordingly.\n *\n * Lenses can also request the keyboard to be dismissed. When this happens, the application receives an event\n * and should remove the displayed keyboard UI.\n *\n * @example\n * ```ts\n * cameraKitSession.keyboard.addEventListener('active', ({ detail }) => {\n * const { active, text } = detail;\n * if (active) {\n * showKeyboard(text, (newText) => cameraKitSession.keyboard.sendInputToLens(newText));\n * } else {\n * hideKeyboard();\n * }\n * });\n * ```\n *\n * @category Lenses\n */\nexport interface Keyboard {\n /**\n * Adds an event listener for keyboard-related events.\n *\n * @param type - The type of event to listen for (e.g., \"active\").\n * @param callback - Function that handles the event.\n * @param options - Additional options for event listener behavior (optional).\n */\n addEventListener: (type: \"active\", callback: KeyboardEventListener, options?: TypedEventListenerOptions) => void;\n\n /**\n * Removes a previously added event listener.\n *\n * @param type - The type of event to remove.\n * @param callback - The event listener function to remove.\n */\n removeEventListener: (type: \"active\", callback: KeyboardEventListener) => void;\n\n /**\n * Sends a string of text to the active lens. The application should use this method\n * to provide user-typed input to the lens for display.\n *\n * @param text - The text to send to the lens. Supports escape sequences (e.g., `\\n` for multiline input).\n */\n sendInputToLens: (text: string) => void;\n\n /**\n * Dismisses the keyboard, clears the text input, and triggers an `active` event with `active: false`.\n * Applications can use this to remove on-screen text input elements when input is no longer needed.\n */\n dismiss: () => void;\n\n /**\n * @deprecated Clients apps are responsible to create keyboard UI.\n */\n getElement: () => HTMLTextAreaElement;\n}\n\n// eslint-disable-next-line max-len\n// https://github.sc-corp.net/Snapchat/LensCore/blob/4c05e721d0321133d50148e5b37fea5078516abd/Src/Scenarium/Infrastructure/TextInputSystem.Scn.hpp#L38\ntype KeyboardType = \"Text\" | \"Number\" | \"Phone\" | \"Url\";\n\n// eslint-disable-next-line max-len\n// https://github.sc-corp.net/Snapchat/LensCore/blob/4c05e721d0321133d50148e5b37fea5078516abd/Src/Scenarium/Infrastructure/TextInputSystem.Scn.hpp#L44\ntype ReturnKeyType = \"Done\" | \"Go\" | \"Next\" | \"Return\" | \"Search\" | \"Send\";\n\ninterface RequestKeyboardData {\n enablePreview: boolean;\n end: number;\n keyboardType: KeyboardType;\n returnKeyType: ReturnKeyType;\n start: number;\n text: string;\n}\n\ninterface DismissReply {\n keyboardOpen: false;\n}\n\ninterface SetTextReply {\n text: string;\n start: number;\n end: number;\n done: boolean;\n shouldNotify: boolean;\n}\n\n/** @internal */\nexport class LensKeyboard {\n public readonly uriHandler: UriHandler;\n private readonly events: TypedEventTarget<KeyboardEvents>;\n private readonly element: HTMLTextAreaElement;\n private active = false;\n private text: string | undefined = undefined;\n private reply: (response: UriResponse) => void = () => {};\n\n constructor(private readonly lensState: LensState) {\n this.onElementKeyPress = this.onElementKeyPress.bind(this);\n this.events = new TypedEventTarget<KeyboardEvents>();\n this.element = document.createElement(\"textarea\");\n this.element.addEventListener(\"keypress\", this.onElementKeyPress);\n this.uriHandler = {\n uri: \"app://textInput/\",\n handleRequest: (request, reply) => {\n if (request.uri === \"app://textInput/requestKeyboard\") {\n const data = JSON.parse(new TextDecoder().decode(request.data)) as RequestKeyboardData;\n this.element.value = data.text;\n this.text = data.text;\n this.reply = reply;\n this.active = true;\n this.notifyClient();\n this.element.focus();\n } else if (request.uri === \"app://textInput/dismissKeyboard\") {\n this.active = false;\n this.sendReply({ keyboardOpen: false });\n this.notifyClient();\n } else {\n logger.error(new Error(`Unhandled lens keyboard request '${request.uri}'.`));\n }\n },\n };\n lensState.events.pipe(forActions(\"turnedOff\")).subscribe(() => {\n this.dismiss();\n });\n }\n\n dismiss(): void {\n this.active = false;\n this.element.value = \"\";\n this.text = \"\";\n this.sendReply({ keyboardOpen: false });\n this.notifyClient();\n }\n\n getElement(): HTMLTextAreaElement {\n return this.element;\n }\n\n sendInputToLens(text: string): void {\n this.element.value = text;\n this.text = text;\n this.sendReply({\n text: text,\n start: text.length,\n end: text.length,\n done: true,\n shouldNotify: true,\n });\n }\n\n addEventListener(type: \"active\", callback: KeyboardEventListener, options?: TypedEventListenerOptions): void {\n this.events.addEventListener(type, callback, options);\n }\n\n removeEventListener(type: \"active\", callback: KeyboardEventListener): void {\n this.events.removeEventListener(type, callback);\n }\n\n toPublicInterface(): Keyboard {\n return {\n addEventListener: this.addEventListener.bind(this),\n removeEventListener: this.removeEventListener.bind(this),\n sendInputToLens: this.sendInputToLens.bind(this),\n dismiss: this.dismiss.bind(this),\n getElement: this.getElement.bind(this),\n };\n }\n\n destroy() {\n // TODO: remove when removing deprecated element ref\n this.element.removeEventListener(\"keypress\", this.onElementKeyPress);\n }\n\n private sendReply(data: DismissReply | SetTextReply) {\n this.reply({\n code: 200,\n description: \"\",\n contentType: \"application/json\",\n data: new TextEncoder().encode(JSON.stringify(data)),\n });\n }\n\n private notifyClient(): void {\n const state = this.lensState.getState();\n // If lens keyboard status is changing, we know a lens must be applied.\n if (isState(state, \"noLensApplied\")) return;\n this.events.dispatchEvent(\n new TypedCustomEvent(\"active\", {\n element: this.element,\n active: this.active,\n text: this.text ?? \"\",\n // If the keyboard is up, it has been triggered by an active lens.\n lens: state.data,\n })\n );\n }\n\n private onElementKeyPress(event: KeyboardEvent) {\n if (event.code === \"Enter\" && !event.shiftKey) {\n event.preventDefault();\n this.sendInputToLens(this.element.value);\n }\n }\n}\n\n/**\n * Factory function for creating a LensKeyboard instance.\n *\n * @internal\n */\nexport const lensKeyboardFactory = Injectable(\n \"lensKeyboard\",\n [lensStateFactory.token] as const,\n (lensState: LensState) => new LensKeyboard(lensState)\n);\n"]}
@@ -5,5 +5,5 @@ export declare const requestValidationError: (message: string, cause?: unknown)
5
5
  export declare function validateRequest(request: UriRequest, specs: RemoteApiSpec[]): void;
6
6
  export declare function validatePath(path: string, parameters: RemoteParameter[]): void;
7
7
  export declare function validateHeaders(headers: Record<string, string>, parameters: RemoteParameter[]): void;
8
- export declare function validateQuery(uri: string, parameters: RemoteParameter[]): void;
8
+ export declare function validateQuery(queryParams: URLSearchParams, parameters: RemoteParameter[]): void;
9
9
  //# sourceMappingURL=httpValidators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"httpValidators.d.ts","sourceRoot":"","sources":["../../../src/uri-handlers/internal-handlers/httpValidators.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,+DAA+D,CAAC;AAIpH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,eAAO,MAAM,0BAA0B,2BAA2B,CAAC;AACnE,eAAO,MAAM,sBAAsB,6CAAyC,CAAC;AAE7E,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,QA2B1E;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,QA8CvE;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,UAAU,EAAE,eAAe,EAAE,QA4B7F;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,QAgCvE"}
1
+ {"version":3,"file":"httpValidators.d.ts","sourceRoot":"","sources":["../../../src/uri-handlers/internal-handlers/httpValidators.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,+DAA+D,CAAC;AAIpH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,eAAO,MAAM,0BAA0B,2BAA2B,CAAC;AACnE,eAAO,MAAM,sBAAsB,6CAAyC,CAAC;AAE7E,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,QA8B1E;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,QAqDvE;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,UAAU,EAAE,eAAe,EAAE,QAuB7F;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,eAAe,EAAE,QAwBxF"}
@@ -5,22 +5,23 @@ import { namedError } from "../../namedErrors";
5
5
  export const requestValidationErrorName = "RequestValidationError";
6
6
  export const requestValidationError = namedError(requestValidationErrorName);
7
7
  export function validateRequest(request, specs) {
8
- var _a, _b, _c;
8
+ var _a;
9
+ const url = new URL(request.uri);
9
10
  for (const spec of specs) {
10
- const url = `${spec.tlsRequired ? "https://" : "http://"}${spec.host}`;
11
- if (!request.uri.startsWith(url))
11
+ if (url.host !== spec.host || url.protocol !== (spec.tlsRequired ? "https:" : "http:")) {
12
12
  continue;
13
- const path = ((_a = request.uri.split(url)[1]) !== null && _a !== void 0 ? _a : "").replace(/^\//, "").replace(/\/$/, "");
13
+ }
14
+ const path = url.pathname.replace(/^\/|\/$/g, "");
14
15
  for (const endpoint of spec.endpoints) {
15
- const endpointPath = endpoint.path.replace(/^\//, "").replace(/\/$/, "");
16
+ const endpointPath = endpoint.path.replace(/^\/|\/$/g, "");
16
17
  if (!path.startsWith(endpointPath))
17
18
  continue;
18
- const method = (_b = RemoteEndpoint_HttpRequestMethod[request.method]) !== null && _b !== void 0 ? _b : RemoteEndpoint_HttpRequestMethod.UNRECOGNIZED;
19
+ const method = (_a = RemoteEndpoint_HttpRequestMethod[request.method]) !== null && _a !== void 0 ? _a : RemoteEndpoint_HttpRequestMethod.UNRECOGNIZED;
19
20
  if (!endpoint.methods.includes(method))
20
21
  continue;
21
- validatePath((_c = path.split(endpointPath)[1]) !== null && _c !== void 0 ? _c : "", endpoint.parameters);
22
+ validatePath(path.split(endpointPath)[1], endpoint.parameters);
22
23
  validateHeaders(request.metadata, endpoint.parameters);
23
- validateQuery(request.uri, endpoint.parameters);
24
+ validateQuery(url.searchParams, endpoint.parameters);
24
25
  return;
25
26
  }
26
27
  }
@@ -45,7 +46,12 @@ export function validatePath(path, parameters) {
45
46
  }
46
47
  else if (param.optional) {
47
48
  if (paramNameComponent === param.name) {
48
- paramIndex += 2;
49
+ if (paramValueComponent !== undefined) {
50
+ paramIndex += 2;
51
+ }
52
+ else {
53
+ paramIndex += 1;
54
+ }
49
55
  }
50
56
  }
51
57
  else {
@@ -75,9 +81,6 @@ export function validateHeaders(headers, parameters) {
75
81
  }
76
82
  }
77
83
  else if (param.optional) {
78
- if (headerValue != undefined && isEmptyString(headerValue)) {
79
- throw requestValidationError(`Header '${param.name}' is present but empty. If provided, it should not be empty.`);
80
- }
81
84
  }
82
85
  else {
83
86
  if (headerValue == undefined || isEmptyString(headerValue)) {
@@ -86,9 +89,7 @@ export function validateHeaders(headers, parameters) {
86
89
  }
87
90
  }
88
91
  }
89
- export function validateQuery(uri, parameters) {
90
- const url = new URL(uri);
91
- const queryParams = new URLSearchParams(url.search);
92
+ export function validateQuery(queryParams, parameters) {
92
93
  for (const param of parameters) {
93
94
  if (param.location !== RemoteParameter_ParameterLocation.QUERY)
94
95
  continue;
@@ -100,10 +101,6 @@ export function validateQuery(uri, parameters) {
100
101
  }
101
102
  }
102
103
  else if (param.optional) {
103
- if (paramValue != undefined && isEmptyString(paramValue)) {
104
- throw requestValidationError(`Optional query parameter '${param.name}' is present but empty. ` +
105
- `If provided, it should not be empty.`);
106
- }
107
104
  }
108
105
  else {
109
106
  if (paramValue == undefined || isEmptyString(paramValue)) {
@@ -1 +1 @@
1
- {"version":3,"file":"httpValidators.js","sourceRoot":"","sources":["../../../src/uri-handlers/internal-handlers/httpValidators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,gCAAgC,EAAE,MAAM,+DAA+D,CAAC;AACjH,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAClH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,MAAM,CAAC,MAAM,0BAA0B,GAAG,wBAAwB,CAAC;AACnE,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAAC,0BAA0B,CAAC,CAAC;AAE7E,MAAM,UAAU,eAAe,CAAC,OAAmB,EAAE,KAAsB;;IAEvE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACtB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAEvE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QAG3C,MAAM,IAAI,GAAG,CAAC,MAAA,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,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AAI,iBAAiB,KAAK,CAAC,YAAY,KAAK;oBACpF,cAAc,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,WAAW,IAAI,CAClD,CAAC;aACL;SACJ;aAAM,IAAI,KAAK,CAAC,QAAQ,EAAE;YAEvB,IAAI,UAAU,IAAI,SAAS,IAAI,aAAa,CAAC,UAAU,CAAC,EAAE;gBACtD,MAAM,sBAAsB,CACxB,6BAA6B,KAAK,CAAC,IAAI,0BAA0B;oBAC7D,sCAAsC,CAC7C,CAAC;aACL;SACJ;aAAM;YAEH,IAAI,UAAU,IAAI,SAAS,IAAI,aAAa,CAAC,UAAU,CAAC,EAAE;gBACtD,MAAM,sBAAsB,CAAC,6BAA6B,KAAK,CAAC,IAAI,wBAAwB,CAAC,CAAC;aACjG;SACJ;KACJ;AAEL,CAAC","sourcesContent":["import { isEmptyString } from \"../../common/typeguards\";\nimport type { RemoteApiSpec, RemoteParameter } from \"../../generated-proto/pb_schema/camera_kit/v3/remote_api_spec\";\nimport { RemoteEndpoint_HttpRequestMethod } from \"../../generated-proto/pb_schema/camera_kit/v3/remote_api_spec\";\nimport { RemoteParameter_ParameterLocation } from \"../../generated-proto/pb_schema/camera_kit/v3/remote_api_spec\";\nimport { namedError } from \"../../namedErrors\";\nimport type { UriRequest } from \"../UriHandlers\";\n\nexport const requestValidationErrorName = \"RequestValidationError\";\nexport const requestValidationError = namedError(requestValidationErrorName);\n\nexport function validateRequest(request: UriRequest, specs: RemoteApiSpec[]) {\n // 1. Given url, method and headers and spec:\n for (const spec of specs) {\n const url = `${spec.tlsRequired ? \"https://\" : \"http://\"}${spec.host}`;\n // 2. Check url starts with schema + the host. If yes trim that part and split by /\n if (!request.uri.startsWith(url)) continue;\n\n // 3. Split the rest by / and go for each part together with the path parameters.\n const path = (request.uri.split(url)[1] ?? \"\").replace(/^\\//, \"\").replace(/\\/$/, \"\");\n for (const endpoint of spec.endpoints) {\n const endpointPath = endpoint.path.replace(/^\\//, \"\").replace(/\\/$/, \"\");\n if (!path.startsWith(endpointPath)) continue;\n\n const method =\n RemoteEndpoint_HttpRequestMethod[request.method] ?? RemoteEndpoint_HttpRequestMethod.UNRECOGNIZED;\n if (!endpoint.methods.includes(method)) continue;\n\n validatePath(path.split(endpointPath)[1] ?? \"\", endpoint.parameters);\n validateHeaders(request.metadata, endpoint.parameters);\n validateQuery(request.uri, endpoint.parameters);\n // The request matches the current endpoint\n return;\n }\n }\n\n // The request does not match any of the endpoints\n throw requestValidationError(\"The request does not match any of the Remote API specifications.\");\n}\n\nexport function validatePath(path: string, parameters: RemoteParameter[]) {\n const pathComponents = path.split(\"/\").filter(Boolean);\n\n let paramIndex = 0;\n\n for (const param of parameters) {\n if (param.location !== RemoteParameter_ParameterLocation.PATH) continue;\n\n const paramNameComponent = pathComponents[paramIndex];\n const paramValueComponent = pathComponents[paramIndex + 1];\n\n if (param.constant) {\n // For constant parameters, the value must match the defaultValue\n if (paramNameComponent === param.name && paramValueComponent === param.defaultValue) {\n paramIndex += 2; // Move to the next parameter pair\n } else {\n throw requestValidationError(\n `Expected constant parameter '${param.name}' with value '${param.defaultValue}' ` +\n `at position ${paramIndex}, but found '${paramNameComponent}' and '${paramValueComponent}'.`\n );\n }\n } else if (param.optional) {\n if (paramNameComponent === param.name) {\n paramIndex += 2; // Move to the next parameter pair if optional parameter exists\n }\n // If optional and not present, continue without incrementing paramIndex\n } else {\n // For regular parameters, we just need to ensure a name/value pair exists\n if (paramNameComponent === param.name && paramValueComponent !== undefined) {\n paramIndex += 2; // Move to the next parameter pair\n } else {\n throw requestValidationError(\n `Expected parameter '${param.name}' with a value at position ${paramIndex}, ` +\n `but found '${paramNameComponent}' and '${paramValueComponent}'.`\n );\n }\n }\n }\n\n // After processing all parameters, there should be no extra path components\n if (paramIndex !== pathComponents.length) {\n const invalidPath = pathComponents.slice(paramIndex).join(\"/\");\n throw requestValidationError(\n `Unexpected extra path components starting at position ${paramIndex}: '${invalidPath}'.`\n );\n }\n}\n\nexport function validateHeaders(headers: Record<string, string>, parameters: RemoteParameter[]) {\n for (const param of parameters) {\n if (param.location !== RemoteParameter_ParameterLocation.HEADER) continue;\n\n const headerValue = headers[param.name];\n\n if (param.constant) {\n // For constant parameters, the header must exist and match defaultValue\n if (headerValue !== param.defaultValue) {\n throw requestValidationError(\n `Expected constant header '${param.name}' with value '${param.defaultValue}', ` +\n `but found '${headerValue ?? \"undefined\"}'.`\n );\n }\n } else if (param.optional) {\n // If optional, we only validate if the header exists\n if (headerValue != undefined && isEmptyString(headerValue)) {\n throw requestValidationError(\n `Header '${param.name}' is present but empty. If provided, it should not be empty.`\n );\n }\n } else {\n // For regular parameters, the header must exist and have a non-empty value\n if (headerValue == undefined || isEmptyString(headerValue)) {\n throw requestValidationError(`Required header '${param.name}' is missing or empty.`);\n }\n }\n }\n}\n\nexport function validateQuery(uri: string, parameters: RemoteParameter[]) {\n const url = new URL(uri);\n const queryParams = new URLSearchParams(url.search);\n for (const param of parameters) {\n if (param.location !== RemoteParameter_ParameterLocation.QUERY) continue;\n\n const paramValue = queryParams.get(param.name);\n\n if (param.constant) {\n // For constant parameters, the query parameter must exist and match defaultValue\n if (paramValue !== param.defaultValue) {\n throw requestValidationError(\n `Expected constant query parameter '${param.name}' with value '${param.defaultValue}', ` +\n `but found '${paramValue ?? \"undefined\"}'.`\n );\n }\n } else if (param.optional) {\n // If optional, validate only if the query parameter exists\n if (paramValue != undefined && isEmptyString(paramValue)) {\n throw requestValidationError(\n `Optional query parameter '${param.name}' is present but empty. ` +\n `If provided, it should not be empty.`\n );\n }\n } else {\n // For regular parameters, the query parameter must exist and have a non-empty value\n if (paramValue == undefined || isEmptyString(paramValue)) {\n throw requestValidationError(`Required query parameter '${param.name}' is missing or empty.`);\n }\n }\n }\n // All query parameters are valid\n}\n"]}
1
+ {"version":3,"file":"httpValidators.js","sourceRoot":"","sources":["../../../src/uri-handlers/internal-handlers/httpValidators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,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U,aAAa,CAAC,WAA4B,EAAE,UAA6B;IACrF,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE;QAC5B,IAAI,KAAK,CAAC,QAAQ,KAAK,iCAAiC,CAAC,KAAK;YAAE,SAAS;QAEzE,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAE/C,IAAI,KAAK,CAAC,QAAQ,EAAE;YAEhB,IAAI,UAAU,KAAK,KAAK,CAAC,YAAY,EAAE;gBACnC,MAAM,sBAAsB,CACxB,sCAAsC,KAAK,CAAC,IAAI,iBAAiB,KAAK,CAAC,YAAY,KAAK;oBACpF,cAAc,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,WAAW,IAAI,CAClD,CAAC;aACL;SACJ;aAAM,IAAI,KAAK,CAAC,QAAQ,EAAE;SAE1B;aAAM;YAEH,IAAI,UAAU,IAAI,SAAS,IAAI,aAAa,CAAC,UAAU,CAAC,EAAE;gBACtD,MAAM,sBAAsB,CAAC,6BAA6B,KAAK,CAAC,IAAI,wBAAwB,CAAC,CAAC;aACjG;SACJ;KACJ;AAEL,CAAC","sourcesContent":["import { isEmptyString } from \"../../common/typeguards\";\nimport type { RemoteApiSpec, RemoteParameter } from \"../../generated-proto/pb_schema/camera_kit/v3/remote_api_spec\";\nimport { RemoteEndpoint_HttpRequestMethod } from \"../../generated-proto/pb_schema/camera_kit/v3/remote_api_spec\";\nimport { RemoteParameter_ParameterLocation } from \"../../generated-proto/pb_schema/camera_kit/v3/remote_api_spec\";\nimport { namedError } from \"../../namedErrors\";\nimport type { UriRequest } from \"../UriHandlers\";\n\nexport const requestValidationErrorName = \"RequestValidationError\";\nexport const requestValidationError = namedError(requestValidationErrorName);\n\nexport function validateRequest(request: UriRequest, specs: RemoteApiSpec[]) {\n const url = new URL(request.uri);\n\n // 1. Given url, method and headers and spec:\n for (const spec of specs) {\n // 2. Check protocol and host.\n if (url.host !== spec.host || url.protocol !== (spec.tlsRequired ? \"https:\" : \"http:\")) {\n continue;\n }\n\n // 3. Go for each part together with the path parameters.\n const path = url.pathname.replace(/^\\/|\\/$/g, \"\");\n for (const endpoint of spec.endpoints) {\n const endpointPath = endpoint.path.replace(/^\\/|\\/$/g, \"\");\n if (!path.startsWith(endpointPath)) continue;\n\n const method =\n RemoteEndpoint_HttpRequestMethod[request.method] ?? RemoteEndpoint_HttpRequestMethod.UNRECOGNIZED;\n if (!endpoint.methods.includes(method)) continue;\n\n validatePath(path.split(endpointPath)[1], endpoint.parameters);\n validateHeaders(request.metadata, endpoint.parameters);\n validateQuery(url.searchParams, endpoint.parameters);\n // The request matches the current endpoint\n return;\n }\n }\n\n // The request does not match any of the endpoints\n throw requestValidationError(\"The request does not match any of the Remote API specifications.\");\n}\n\nexport function validatePath(path: string, parameters: RemoteParameter[]) {\n const pathComponents = path.split(\"/\").filter(Boolean);\n\n let paramIndex = 0;\n\n for (const param of parameters) {\n if (param.location !== RemoteParameter_ParameterLocation.PATH) continue;\n\n const paramNameComponent = pathComponents[paramIndex];\n const paramValueComponent = pathComponents[paramIndex + 1];\n\n if (param.constant) {\n // For constant parameters, the value must match the defaultValue\n if (paramNameComponent === param.name && paramValueComponent === param.defaultValue) {\n paramIndex += 2; // Move to the next parameter pair\n } else {\n throw requestValidationError(\n `Expected constant parameter '${param.name}' with value '${param.defaultValue}' ` +\n `at position ${paramIndex}, but found '${paramNameComponent}' and '${paramValueComponent}'.`\n );\n }\n } else if (param.optional) {\n if (paramNameComponent === param.name) {\n // Check if there's another component for its value\n if (paramValueComponent !== undefined) {\n // Optional param with a value\n paramIndex += 2;\n } else {\n // Optional param without a value\n paramIndex += 1;\n }\n }\n // If optional and not present, continue without incrementing paramIndex\n } else {\n // For regular parameters, we just need to ensure a name/value pair exists\n if (paramNameComponent === param.name && paramValueComponent !== undefined) {\n paramIndex += 2; // Move to the next parameter pair\n } else {\n throw requestValidationError(\n `Expected parameter '${param.name}' with a value at position ${paramIndex}, ` +\n `but found '${paramNameComponent}' and '${paramValueComponent}'.`\n );\n }\n }\n }\n\n // After processing all parameters, there should be no extra path components\n if (paramIndex !== pathComponents.length) {\n const invalidPath = pathComponents.slice(paramIndex).join(\"/\");\n throw requestValidationError(\n `Unexpected extra path components starting at position ${paramIndex}: '${invalidPath}'.`\n );\n }\n}\n\nexport function validateHeaders(headers: Record<string, string>, parameters: RemoteParameter[]) {\n for (const param of parameters) {\n if (param.location !== RemoteParameter_ParameterLocation.HEADER) continue;\n\n const headerValue = headers[param.name];\n\n if (param.constant) {\n // For constant parameters, the header must exist and match defaultValue\n if (headerValue !== param.defaultValue) {\n throw requestValidationError(\n `Expected constant header '${param.name}' with value '${param.defaultValue}', ` +\n `but found '${headerValue ?? \"undefined\"}'.`\n );\n }\n } else if (param.optional) {\n // If optional, missing or present value is OK\n } else {\n // For required parameters, the header must exist and have a non-empty value\n if (headerValue == undefined || isEmptyString(headerValue)) {\n throw requestValidationError(`Required header '${param.name}' is missing or empty.`);\n }\n }\n }\n}\n\nexport function validateQuery(queryParams: URLSearchParams, parameters: RemoteParameter[]) {\n for (const param of parameters) {\n if (param.location !== RemoteParameter_ParameterLocation.QUERY) continue;\n\n const paramValue = queryParams.get(param.name);\n\n if (param.constant) {\n // For constant parameters, the query parameter must exist and match defaultValue\n if (paramValue !== param.defaultValue) {\n throw requestValidationError(\n `Expected constant query parameter '${param.name}' with value '${param.defaultValue}', ` +\n `but found '${paramValue ?? \"undefined\"}'.`\n );\n }\n } else if (param.optional) {\n // If optional, missing or present value is OK\n } else {\n // For required parameters, the query parameter must exist and have a non-empty value\n if (paramValue == undefined || isEmptyString(paramValue)) {\n throw requestValidationError(`Required query parameter '${param.name}' is missing or empty.`);\n }\n }\n }\n // All query parameters are valid\n}\n"]}
@@ -80,9 +80,6 @@ export declare const remoteApiServicesFactory: {
80
80
  token: "remoteApiServices";
81
81
  dependencies: [];
82
82
  };
83
- declare global {
84
- var __snap_camkit_ra_1: string | undefined;
85
- }
86
83
  /**
87
84
  * Provides a URI handler that searches for a match within the provided services to handle Remote API requests,
88
85
  * i.e., those whose URI starts with 'app://remote-api/performApiRequest'.
@@ -1 +1 @@
1
- {"version":3,"file":"remoteApiUriHandler.d.ts","sourceRoot":"","sources":["../../../src/uri-handlers/internal-handlers/remoteApiUriHandler.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAIjE,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,gBAAgB,CAAC;AAyC9D;;GAEG;AACH,MAAM,MAAM,eAAe,GACrB,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,aAAa,GACb,WAAW,GACX,YAAY,CAAC;AAEnB;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC;IACxB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,MAAM,IAAI,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,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export function createRemoteApiUriHandler(registeredServices, sessionState, lens
61
61
  };
62
62
  },
63
63
  processRequest({ request, reply, lens, setCancellationHandler, state }) {
64
- var _a, _b;
64
+ var _a;
65
65
  const { route } = extractSchemeAndRoute(request.uri);
66
66
  const [specId, endpointIdWithQuery] = route.split("/").slice(2);
67
67
  const [endpointId] = endpointIdWithQuery.split("?");
@@ -79,9 +79,6 @@ export function createRemoteApiUriHandler(registeredServices, sessionState, lens
79
79
  parameters: request.metadata,
80
80
  };
81
81
  let requestHandler = getFirstRequestHandler((_a = registeredServiceMap.get(specId)) !== null && _a !== void 0 ? _a : [], remoteApiRequest, lens);
82
- if (!requestHandler && globalThis.__snap_camkit_ra_1) {
83
- requestHandler = getFirstRequestHandler((_b = registeredServiceMap.get(globalThis.__snap_camkit_ra_1)) !== null && _b !== void 0 ? _b : [], remoteApiRequest, lens);
84
- }
85
82
  if (!requestHandler)
86
83
  return;
87
84
  reportSingleCount("handled-requests");