@snap/push2web 0.11.0 → 0.13.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 (40) hide show
  1. package/dist/Push2WebSDKExtension.js +1 -1
  2. package/dist/generated-api-client/camera_kit/v3/export.d.ts +0 -59
  3. package/dist/generated-api-client/camera_kit/v3/export.js +0 -10
  4. package/dist/generated-api-client/camera_kit/v3/lens.d.ts +0 -55
  5. package/dist/generated-api-client/camera_kit/v3/lens.js +0 -12
  6. package/dist/generated-api-client/camera_kit/v3/push_to_device.d.ts +0 -58
  7. package/dist/generated-api-client/camera_kit/v3/push_to_device.js +0 -16
  8. package/dist/generated-api-client/core/snap_status_code.d.ts +0 -209
  9. package/dist/generated-api-client/core/snap_status_code.js +0 -200
  10. package/dist/generated-api-client/google/protobuf/any.d.ts +0 -105
  11. package/dist/generated-api-client/google/protobuf/any.js +0 -1
  12. package/docs/html/.nojekyll +1 -0
  13. package/docs/html/assets/highlight.css +78 -0
  14. package/docs/html/assets/main.js +58 -0
  15. package/docs/html/assets/search.js +1 -0
  16. package/docs/html/assets/style.css +1367 -0
  17. package/docs/html/classes/Push2Web.html +159 -0
  18. package/docs/html/enums/Code.html +198 -0
  19. package/docs/html/enums/ListenLensPushResponse_ExcludedLens_Code.html +98 -0
  20. package/docs/html/enums/State.html +79 -0
  21. package/docs/html/index.html +89 -0
  22. package/docs/html/interfaces/Lens.html +143 -0
  23. package/docs/html/modules.html +68 -0
  24. package/docs/html/types/CommunicationErrorEvent.html +76 -0
  25. package/docs/html/types/ErrorEvent.html +50 -0
  26. package/docs/html/types/GenericErrorEvent.html +66 -0
  27. package/docs/html/types/LensExcludedErrorEvent.html +76 -0
  28. package/docs/html/types/LensReceivedEvent.html +50 -0
  29. package/docs/html/types/Push2WebEvents.html +50 -0
  30. package/docs/html/types/SubscriptionChangedEvent.html +50 -0
  31. package/docs/html/types/SubscriptionInstance.html +80 -0
  32. package/docs/md/.nojekyll +1 -0
  33. package/docs/md/README.md +68 -0
  34. package/docs/md/classes/Push2Web.md +106 -0
  35. package/docs/md/enums/Code.md +197 -0
  36. package/docs/md/enums/ListenLensPushResponse_ExcludedLens_Code.md +57 -0
  37. package/docs/md/enums/State.md +26 -0
  38. package/docs/md/interfaces/Lens.md +95 -0
  39. package/docs/md/modules.md +118 -0
  40. package/package.json +4 -3
@@ -0,0 +1,50 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Push2WebEvents | CameraKit Web SDK - Push 2 Web - v0.13.0</title><meta name="description" content="Documentation for CameraKit Web SDK - Push 2 Web"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
+ <div class="tsd-toolbar-contents container">
3
+ <div class="table-cell" id="tsd-search" data-base="..">
4
+ <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
5
+ <div class="field">
6
+ <div id="tsd-toolbar-links"></div></div>
7
+ <ul class="results">
8
+ <li class="state loading">Preparing search index...</li>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">CameraKit Web SDK - Push 2 Web - v0.13.0</a></div>
10
+ <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
11
+ <div class="container container-main">
12
+ <div class="col-content">
13
+ <div class="tsd-page-title">
14
+ <ul class="tsd-breadcrumb">
15
+ <li><a href="../modules.html">CameraKit Web SDK - Push 2 Web</a></li>
16
+ <li><a href="Push2WebEvents.html">Push2WebEvents</a></li></ul>
17
+ <h1>Type alias Push2WebEvents</h1></div>
18
+ <div class="tsd-signature"><span class="tsd-kind-type-alias">Push2<wbr/>Web<wbr/>Events</span><span class="tsd-signature-symbol">:</span> <a href="LensReceivedEvent.html" class="tsd-signature-type tsd-kind-type-alias">LensReceivedEvent</a><span class="tsd-signature-symbol"> | </span><a href="ErrorEvent.html" class="tsd-signature-type tsd-kind-type-alias">ErrorEvent</a><span class="tsd-signature-symbol"> | </span><a href="SubscriptionChangedEvent.html" class="tsd-signature-type tsd-kind-type-alias">SubscriptionChangedEvent</a></div></div>
19
+ <div class="col-sidebar">
20
+ <div class="page-menu">
21
+ <div class="tsd-navigation settings">
22
+ <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
23
+ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)" id="icon-chevronDown"></path></svg>Settings</h3></summary>
24
+ <div class="tsd-accordion-details">
25
+ <div class="tsd-filter-visibility">
26
+ <h4 class="uppercase">Member Visibility</h4><form>
27
+ <ul id="tsd-filter-options">
28
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
29
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></form></div>
30
+ <div class="tsd-theme-toggle">
31
+ <h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
32
+ <div class="site-menu">
33
+ <nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>Camera<wbr/>Kit <wbr/>Web SDK -<wbr/> <wbr/>Push 2 <wbr/>Web -<wbr/> v0.13.0</span></a>
34
+ <ul class="tsd-small-nested-navigation">
35
+ <li><a href="../enums/State.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>State</span></a></li>
36
+ <li><a href="../enums/ListenLensPushResponse_ExcludedLens_Code.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Listen<wbr/>Lens<wbr/>Push<wbr/>Response_<wbr/>Excluded<wbr/>Lens_<wbr/>Code</span></a></li>
37
+ <li><a href="../enums/Code.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Code</span></a></li>
38
+ <li><a href="../classes/Push2Web.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>Push2<wbr/>Web</span></a></li>
39
+ <li><a href="../interfaces/Lens.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g></svg><span>Lens</span></a></li>
40
+ <li><a href="GenericErrorEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>Generic<wbr/>Error<wbr/>Event</span></a></li>
41
+ <li><a href="CommunicationErrorEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Communication<wbr/>Error<wbr/>Event</span></a></li>
42
+ <li><a href="LensExcludedErrorEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Lens<wbr/>Excluded<wbr/>Error<wbr/>Event</span></a></li>
43
+ <li><a href="SubscriptionInstance.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Subscription<wbr/>Instance</span></a></li>
44
+ <li><a href="ErrorEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Error<wbr/>Event</span></a></li>
45
+ <li><a href="LensReceivedEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Lens<wbr/>Received<wbr/>Event</span></a></li>
46
+ <li><a href="SubscriptionChangedEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Subscription<wbr/>Changed<wbr/>Event</span></a></li>
47
+ <li><a href="Push2WebEvents.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Push2<wbr/>Web<wbr/>Events</span></a></li></ul></nav></div></div></div>
48
+ <div class="tsd-generator">
49
+ <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
50
+ <div class="overlay"></div></body></html>
@@ -0,0 +1,50 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SubscriptionChangedEvent | CameraKit Web SDK - Push 2 Web - v0.13.0</title><meta name="description" content="Documentation for CameraKit Web SDK - Push 2 Web"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
+ <div class="tsd-toolbar-contents container">
3
+ <div class="table-cell" id="tsd-search" data-base="..">
4
+ <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
5
+ <div class="field">
6
+ <div id="tsd-toolbar-links"></div></div>
7
+ <ul class="results">
8
+ <li class="state loading">Preparing search index...</li>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">CameraKit Web SDK - Push 2 Web - v0.13.0</a></div>
10
+ <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
11
+ <div class="container container-main">
12
+ <div class="col-content">
13
+ <div class="tsd-page-title">
14
+ <ul class="tsd-breadcrumb">
15
+ <li><a href="../modules.html">CameraKit Web SDK - Push 2 Web</a></li>
16
+ <li><a href="SubscriptionChangedEvent.html">SubscriptionChangedEvent</a></li></ul>
17
+ <h1>Type alias SubscriptionChangedEvent</h1></div>
18
+ <div class="tsd-signature"><span class="tsd-kind-type-alias">Subscription<wbr/>Changed<wbr/>Event</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">TypedCustomEvent</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">&quot;subscriptionChanged&quot;</span><span class="tsd-signature-symbol">, </span><a href="../enums/State.html" class="tsd-signature-type tsd-kind-enum">State</a><span class="tsd-signature-symbol">&gt;</span></div></div>
19
+ <div class="col-sidebar">
20
+ <div class="page-menu">
21
+ <div class="tsd-navigation settings">
22
+ <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
23
+ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)" id="icon-chevronDown"></path></svg>Settings</h3></summary>
24
+ <div class="tsd-accordion-details">
25
+ <div class="tsd-filter-visibility">
26
+ <h4 class="uppercase">Member Visibility</h4><form>
27
+ <ul id="tsd-filter-options">
28
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
29
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></form></div>
30
+ <div class="tsd-theme-toggle">
31
+ <h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
32
+ <div class="site-menu">
33
+ <nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>Camera<wbr/>Kit <wbr/>Web SDK -<wbr/> <wbr/>Push 2 <wbr/>Web -<wbr/> v0.13.0</span></a>
34
+ <ul class="tsd-small-nested-navigation">
35
+ <li><a href="../enums/State.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>State</span></a></li>
36
+ <li><a href="../enums/ListenLensPushResponse_ExcludedLens_Code.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Listen<wbr/>Lens<wbr/>Push<wbr/>Response_<wbr/>Excluded<wbr/>Lens_<wbr/>Code</span></a></li>
37
+ <li><a href="../enums/Code.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Code</span></a></li>
38
+ <li><a href="../classes/Push2Web.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>Push2<wbr/>Web</span></a></li>
39
+ <li><a href="../interfaces/Lens.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g></svg><span>Lens</span></a></li>
40
+ <li><a href="GenericErrorEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>Generic<wbr/>Error<wbr/>Event</span></a></li>
41
+ <li><a href="CommunicationErrorEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Communication<wbr/>Error<wbr/>Event</span></a></li>
42
+ <li><a href="LensExcludedErrorEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Lens<wbr/>Excluded<wbr/>Error<wbr/>Event</span></a></li>
43
+ <li><a href="SubscriptionInstance.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Subscription<wbr/>Instance</span></a></li>
44
+ <li><a href="ErrorEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Error<wbr/>Event</span></a></li>
45
+ <li><a href="LensReceivedEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Lens<wbr/>Received<wbr/>Event</span></a></li>
46
+ <li><a href="SubscriptionChangedEvent.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Subscription<wbr/>Changed<wbr/>Event</span></a></li>
47
+ <li><a href="Push2WebEvents.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Push2<wbr/>Web<wbr/>Events</span></a></li></ul></nav></div></div></div>
48
+ <div class="tsd-generator">
49
+ <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
50
+ <div class="overlay"></div></body></html>
@@ -0,0 +1,80 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SubscriptionInstance | CameraKit Web SDK - Push 2 Web - v0.13.0</title><meta name="description" content="Documentation for CameraKit Web SDK - Push 2 Web"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
+ <div class="tsd-toolbar-contents container">
3
+ <div class="table-cell" id="tsd-search" data-base="..">
4
+ <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
5
+ <div class="field">
6
+ <div id="tsd-toolbar-links"></div></div>
7
+ <ul class="results">
8
+ <li class="state loading">Preparing search index...</li>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">CameraKit Web SDK - Push 2 Web - v0.13.0</a></div>
10
+ <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
11
+ <div class="container container-main">
12
+ <div class="col-content">
13
+ <div class="tsd-page-title">
14
+ <ul class="tsd-breadcrumb">
15
+ <li><a href="../modules.html">CameraKit Web SDK - Push 2 Web</a></li>
16
+ <li><a href="SubscriptionInstance.html">SubscriptionInstance</a></li></ul>
17
+ <h1>Type alias SubscriptionInstance</h1></div>
18
+ <div class="tsd-signature"><span class="tsd-kind-type-alias">Subscription<wbr/>Instance</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-call-signature">unsubscribe</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span>    </span><span class="tsd-kind-call-signature">updateAccessToken</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">accessToken</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div>
19
+ <div class="tsd-comment tsd-typography"><p>Object that represents active connection with Lens Studio.</p>
20
+ </div>
21
+ <div class="tsd-type-declaration">
22
+ <h4>Type declaration</h4>
23
+ <ul class="tsd-parameters">
24
+ <li class="tsd-parameter">
25
+ <h5><span class="tsd-kind-method">unsubscribe</span><span class="tsd-signature-symbol">:</span>function</h5>
26
+ <ul class="tsd-signatures">
27
+ <li class="tsd-signature tsd-anchor-link" id="__type.unsubscribe.unsubscribe-1"><span class="tsd-kind-call-signature">unsubscribe</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.unsubscribe.unsubscribe-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" id="icon-anchor"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></svg></a></li>
28
+ <li class="tsd-description">
29
+ <div class="tsd-comment tsd-typography"><p>Close current connection and unsubscribe from the events form Lens Studio.</p>
30
+ </div>
31
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
32
+ <div class="tsd-comment tsd-typography"></div></li></ul></li>
33
+ <li class="tsd-parameter">
34
+ <h5><span class="tsd-kind-method">update<wbr/>Access<wbr/>Token</span><span class="tsd-signature-symbol">:</span>function</h5>
35
+ <ul class="tsd-signatures">
36
+ <li class="tsd-signature tsd-anchor-link" id="__type.updateAccessToken.updateAccessToken-1"><span class="tsd-kind-call-signature">update<wbr/>Access<wbr/>Token</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">accessToken</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#__type.updateAccessToken.updateAccessToken-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
37
+ <li class="tsd-description">
38
+ <div class="tsd-comment tsd-typography"><p>This method can be used to provide a new access token for an active connection
39
+ in case the previous one has expired.</p>
40
+ </div>
41
+ <div class="tsd-parameters">
42
+ <h4 class="tsd-parameters-title">Parameters</h4>
43
+ <ul class="tsd-parameter-list">
44
+ <li>
45
+ <h5><span class="tsd-kind-parameter">accessToken</span>: <span class="tsd-signature-type">string</span></h5></li></ul></div>
46
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
47
+ <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div>
48
+ <div class="tsd-comment tsd-typography"></div></div>
49
+ <div class="col-sidebar">
50
+ <div class="page-menu">
51
+ <div class="tsd-navigation settings">
52
+ <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
53
+ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)" id="icon-chevronDown"></path></svg>Settings</h3></summary>
54
+ <div class="tsd-accordion-details">
55
+ <div class="tsd-filter-visibility">
56
+ <h4 class="uppercase">Member Visibility</h4><form>
57
+ <ul id="tsd-filter-options">
58
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
59
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></form></div>
60
+ <div class="tsd-theme-toggle">
61
+ <h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
62
+ <div class="site-menu">
63
+ <nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>Camera<wbr/>Kit <wbr/>Web SDK -<wbr/> <wbr/>Push 2 <wbr/>Web -<wbr/> v0.13.0</span></a>
64
+ <ul class="tsd-small-nested-navigation">
65
+ <li><a href="../enums/State.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>State</span></a></li>
66
+ <li><a href="../enums/ListenLensPushResponse_ExcludedLens_Code.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Listen<wbr/>Lens<wbr/>Push<wbr/>Response_<wbr/>Excluded<wbr/>Lens_<wbr/>Code</span></a></li>
67
+ <li><a href="../enums/Code.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Code</span></a></li>
68
+ <li><a href="../classes/Push2Web.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>Push2<wbr/>Web</span></a></li>
69
+ <li><a href="../interfaces/Lens.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g></svg><span>Lens</span></a></li>
70
+ <li><a href="GenericErrorEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>Generic<wbr/>Error<wbr/>Event</span></a></li>
71
+ <li><a href="CommunicationErrorEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Communication<wbr/>Error<wbr/>Event</span></a></li>
72
+ <li><a href="LensExcludedErrorEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Lens<wbr/>Excluded<wbr/>Error<wbr/>Event</span></a></li>
73
+ <li><a href="SubscriptionInstance.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Subscription<wbr/>Instance</span></a></li>
74
+ <li><a href="ErrorEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Error<wbr/>Event</span></a></li>
75
+ <li><a href="LensReceivedEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Lens<wbr/>Received<wbr/>Event</span></a></li>
76
+ <li><a href="SubscriptionChangedEvent.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Subscription<wbr/>Changed<wbr/>Event</span></a></li>
77
+ <li><a href="Push2WebEvents.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Push2<wbr/>Web<wbr/>Events</span></a></li></ul></nav></div></div></div>
78
+ <div class="tsd-generator">
79
+ <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
80
+ <div class="overlay"></div></body></html>
@@ -0,0 +1 @@
1
+ TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
@@ -0,0 +1,68 @@
1
+ CameraKit Web SDK - Push 2 Web / [Exports](modules.md)
2
+
3
+ # Snap Camera Kit Web SDK - Push to Web Extension
4
+
5
+ This extension for [Camera Kit Web SDK](https://www.npmjs.com/package/@snap/camera-kit) package, allows users to send lenses created in [Lens Studio](https://ar.snap.com/lens-studio) to their web pages. Simply create a lens in Lens Studio and then click the "Send to Camera Kit" button.
6
+
7
+ ## Prerequisites
8
+
9
+ Web pages should be integrated with Snap Login Kit in advance. This will allow users to sign in to your web page using their Snapchat account.
10
+
11
+ For quick integration, the Client-Side Only Web Application Integration method can be used. This method does not require any changes to the server-side code of your web page. Instead, it uses JavaScript to interact with the Snap Login Kit API.
12
+
13
+ ### !!! Important !!!
14
+ ```
15
+ !!! ONLY STAGING LOGIN KIT CLIENT ID IS SUPPORTED !!!
16
+ ```
17
+
18
+ [Login Kit](https://docs.snap.com/snap-kit/login-kit/Tutorials/web#requirements)
19
+
20
+ [Client-Side Only Web Application Integration](https://docs.snap.com/snap-kit/login-kit/Tutorials/web#client-side-only-web-application-integration)
21
+
22
+ ###
23
+
24
+ ## Getting started
25
+
26
+ ```
27
+ npm install @snap/push2web
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ Import the extension object from the package and create a new instance.
33
+ ```ts
34
+ import { Push2Web } from "@snap/push2web";
35
+
36
+ const push2Web = new Push2Web();
37
+ ```
38
+
39
+ The following events are available for subscription, if needed.
40
+ ```ts
41
+ push2Web.events.addEventListener("lensReceived", (event) => { const lensDetails = event.detail; });
42
+ push2Web.events.addEventListener("error", (event) => { const errorDetails = event.detail; });
43
+ push2Web.events.addEventListener("subscriptionChanged", (event) => { const subState = event.detail; };)
44
+ ```
45
+
46
+ Provide the push2web extension object during the Camera Kit bootstrap. It is essential to be familiar with the `@snap/camera-kit` package before using the `@snap/push2web` extension. Please find more details on [Camera Kit Web SDK documentation](https://docs.snap.com/camera-kit/quick-start/integrate-sdk/integrate-sdk-web/web-configuration) page.
47
+ ```ts
48
+ import { bootstrapCameraKit } from "@snap/camera-kit";
49
+
50
+ const extensions = (container) => container.provides(push2Web.extension);
51
+
52
+ const cameraKit = await bootstrapCameraKit({ apiToken: "token from developer portal" }, extensions);
53
+ const cameraKitSession = await cameraKit.createSession();
54
+ ```
55
+
56
+ Before pushing any lenses from Lens Studio, a subscription to a network stream must be established. Subscription should be created with the access token received after the user logs in to the web page using Login Kit integration.
57
+ ```ts
58
+ const loginKitAccessToken = "this token will be provided by Login Kit after user login";
59
+ const subscription = push2Web.subscribe(loginKitAccessToken, cameraKitSession, cameraKit.lensRepository);
60
+ ```
61
+
62
+ To unsubscribe from a stream, just call unsubscribe method on a subscription object.
63
+ ```ts
64
+ subscription.unsubscribe();
65
+ ```
66
+ ## Documentation
67
+
68
+ See https://docs.snap.com/camera-kit/quick-start/integrate-sdk/integrate-sdk-web/guides/push-2-web
@@ -0,0 +1,106 @@
1
+ [CameraKit Web SDK - Push 2 Web - v0.13.0](../README.md) / [Exports](../modules.md) / Push2Web
2
+
3
+ # Class: Push2Web
4
+
5
+ ## Table of contents
6
+
7
+ ### Constructors
8
+
9
+ - [constructor](Push2Web.md#constructor)
10
+
11
+ ### Properties
12
+
13
+ - [events](Push2Web.md#events)
14
+
15
+ ### Accessors
16
+
17
+ - [extension](Push2Web.md#extension)
18
+
19
+ ### Methods
20
+
21
+ - [subscribe](Push2Web.md#subscribe)
22
+
23
+ ## Constructors
24
+
25
+ ### constructor
26
+
27
+ • **new Push2Web**()
28
+
29
+ Create new instance of Push2Web object,
30
+ it can be used to start listening for the events,
31
+ subscribe or unsubscribe for notifications from Lens Studio.
32
+ Also provides the extension object for the @snap/camera-kit package.
33
+
34
+ ## Properties
35
+
36
+ ### events
37
+
38
+ • `Readonly` **events**: `TypedEventTarget`<[`Push2WebEvents`](../modules.md#push2webevents)\>
39
+
40
+ Use this property to subscribe for the different types of events that can occur during push 2 web execution.
41
+
42
+ Subscribe to `error` event to be aware if something has happened during the lens push,
43
+ with network communication or any other type of error,
44
+ event object also contains detailed expalantion of the cause.
45
+
46
+ Use `subscriptionChanged` event to be aware when subscription state is changed.
47
+
48
+ Use `lensReceived` event to be aware when new lens is received from Lens Studio,
49
+ also you can get the additional details about the pushed lens.
50
+
51
+ **`Example`**
52
+
53
+ ```ts
54
+ push2web.events.addEventListener('error', ({ detail }) => {
55
+ if (detail.name === 'LensExcludedError') {
56
+ console.log(`Lens is excluded from the push, by the following reason: ${detail.reason}.`)
57
+ }
58
+ })
59
+ ```
60
+
61
+ ## Accessors
62
+
63
+ ### extension
64
+
65
+ • `get` **extension**(): `PartialContainer`<{ `lensSources`: `LensSources` }, { `lensSources`: `LensSources` ; `configuration`: `CameraKitConfiguration` }\>
66
+
67
+ The extension object must be passed to the Camera Kit object during its bootstrap process.
68
+ This is a requirement for the proper functioning of push to web functionality.
69
+
70
+ **`Example`**
71
+
72
+ ```ts
73
+ import { bootstrapCameraKit } from "@snap/camera-kit";
74
+
75
+ const push2web = new Push2Web();
76
+ const extensions = (container) => container.provides(push2Web.extension);
77
+
78
+ const cameraKit = await bootstrapCameraKit({ apiToken: "token from developer portal" }, extensions);
79
+ const cameraKitSession = await cameraKit.createSession();
80
+ ```
81
+
82
+ #### Returns
83
+
84
+ `PartialContainer`<{ `lensSources`: `LensSources` }, { `lensSources`: `LensSources` ; `configuration`: `CameraKitConfiguration` }\>
85
+
86
+ ## Methods
87
+
88
+ ### subscribe
89
+
90
+ ▸ **subscribe**(`accessToken`, `cameraKitSession`, `repository`): [`SubscriptionInstance`](../modules.md#subscriptioninstance)
91
+
92
+ Initiate subscription for the events from Lens Studio.
93
+
94
+ **`Subscription Instance`**
95
+
96
+ #### Parameters
97
+
98
+ | Name | Type | Description |
99
+ | :------ | :------ | :------ |
100
+ | `accessToken` | `string` | After user will be logged in to the web page, using Snapchat account, you can get access token from Login Kit. |
101
+ | `cameraKitSession` | `CameraKitSession` | Instance of CameraKitSesion object form @snap/camera-kit package. |
102
+ | `repository` | `LensRepository` | Instance of LensRepository object from @snap/camera-kit package. |
103
+
104
+ #### Returns
105
+
106
+ [`SubscriptionInstance`](../modules.md#subscriptioninstance)
@@ -0,0 +1,197 @@
1
+ [CameraKit Web SDK - Push 2 Web - v0.13.0](../README.md) / [Exports](../modules.md) / Code
2
+
3
+ # Enumeration: Code
4
+
5
+ ## Table of contents
6
+
7
+ ### Enumeration Members
8
+
9
+ - [OK](Code.md#ok)
10
+ - [CANCELLED](Code.md#cancelled)
11
+ - [UNKNOWN](Code.md#unknown)
12
+ - [INVALID\_ARGUMENT](Code.md#invalid_argument)
13
+ - [DEADLINE\_EXCEEDED](Code.md#deadline_exceeded)
14
+ - [NOT\_FOUND](Code.md#not_found)
15
+ - [ALREADY\_EXISTS](Code.md#already_exists)
16
+ - [PERMISSION\_DENIED](Code.md#permission_denied)
17
+ - [UNAUTHENTICATED](Code.md#unauthenticated)
18
+ - [RESOURCE\_EXHAUSTED](Code.md#resource_exhausted)
19
+ - [FAILED\_PRECONDITION](Code.md#failed_precondition)
20
+ - [ABORTED](Code.md#aborted)
21
+ - [OUT\_OF\_RANGE](Code.md#out_of_range)
22
+ - [UNIMPLEMENTED](Code.md#unimplemented)
23
+ - [INTERNAL](Code.md#internal)
24
+ - [UNAVAILABLE](Code.md#unavailable)
25
+ - [DATA\_LOSS](Code.md#data_loss)
26
+ - [NOT\_MODIFIED](Code.md#not_modified)
27
+ - [DECRYPTION\_FAILED](Code.md#decryption_failed)
28
+ - [INVALID\_MEDIA](Code.md#invalid_media)
29
+ - [IN\_PROGRESS](Code.md#in_progress)
30
+ - [CONTENT\_TOO\_LARGE](Code.md#content_too_large)
31
+ - [URL\_PROTOCOL\_NOT\_SUPPORTED](Code.md#url_protocol_not_supported)
32
+ - [URL\_CONTENT\_TYPE\_NOT\_WHITELISTED](Code.md#url_content_type_not_whitelisted)
33
+ - [URL\_DOWNLOAD\_FAILURE](Code.md#url_download_failure)
34
+ - [CLOUD\_STORAGE\_FAILURE](Code.md#cloud_storage_failure)
35
+ - [UNRECOGNIZED](Code.md#unrecognized)
36
+
37
+ ## Enumeration Members
38
+
39
+ ### OK
40
+
41
+ • **OK** = ``"OK"``
42
+
43
+ ___
44
+
45
+ ### CANCELLED
46
+
47
+ • **CANCELLED** = ``"CANCELLED"``
48
+
49
+ ___
50
+
51
+ ### UNKNOWN
52
+
53
+ • **UNKNOWN** = ``"UNKNOWN"``
54
+
55
+ ___
56
+
57
+ ### INVALID\_ARGUMENT
58
+
59
+ • **INVALID\_ARGUMENT** = ``"INVALID_ARGUMENT"``
60
+
61
+ ___
62
+
63
+ ### DEADLINE\_EXCEEDED
64
+
65
+ • **DEADLINE\_EXCEEDED** = ``"DEADLINE_EXCEEDED"``
66
+
67
+ ___
68
+
69
+ ### NOT\_FOUND
70
+
71
+ • **NOT\_FOUND** = ``"NOT_FOUND"``
72
+
73
+ ___
74
+
75
+ ### ALREADY\_EXISTS
76
+
77
+ • **ALREADY\_EXISTS** = ``"ALREADY_EXISTS"``
78
+
79
+ ___
80
+
81
+ ### PERMISSION\_DENIED
82
+
83
+ • **PERMISSION\_DENIED** = ``"PERMISSION_DENIED"``
84
+
85
+ ___
86
+
87
+ ### UNAUTHENTICATED
88
+
89
+ • **UNAUTHENTICATED** = ``"UNAUTHENTICATED"``
90
+
91
+ ___
92
+
93
+ ### RESOURCE\_EXHAUSTED
94
+
95
+ • **RESOURCE\_EXHAUSTED** = ``"RESOURCE_EXHAUSTED"``
96
+
97
+ ___
98
+
99
+ ### FAILED\_PRECONDITION
100
+
101
+ • **FAILED\_PRECONDITION** = ``"FAILED_PRECONDITION"``
102
+
103
+ ___
104
+
105
+ ### ABORTED
106
+
107
+ • **ABORTED** = ``"ABORTED"``
108
+
109
+ ___
110
+
111
+ ### OUT\_OF\_RANGE
112
+
113
+ • **OUT\_OF\_RANGE** = ``"OUT_OF_RANGE"``
114
+
115
+ ___
116
+
117
+ ### UNIMPLEMENTED
118
+
119
+ • **UNIMPLEMENTED** = ``"UNIMPLEMENTED"``
120
+
121
+ ___
122
+
123
+ ### INTERNAL
124
+
125
+ • **INTERNAL** = ``"INTERNAL"``
126
+
127
+ ___
128
+
129
+ ### UNAVAILABLE
130
+
131
+ • **UNAVAILABLE** = ``"UNAVAILABLE"``
132
+
133
+ ___
134
+
135
+ ### DATA\_LOSS
136
+
137
+ • **DATA\_LOSS** = ``"DATA_LOSS"``
138
+
139
+ ___
140
+
141
+ ### NOT\_MODIFIED
142
+
143
+ • **NOT\_MODIFIED** = ``"NOT_MODIFIED"``
144
+
145
+ ___
146
+
147
+ ### DECRYPTION\_FAILED
148
+
149
+ • **DECRYPTION\_FAILED** = ``"DECRYPTION_FAILED"``
150
+
151
+ ___
152
+
153
+ ### INVALID\_MEDIA
154
+
155
+ • **INVALID\_MEDIA** = ``"INVALID_MEDIA"``
156
+
157
+ ___
158
+
159
+ ### IN\_PROGRESS
160
+
161
+ • **IN\_PROGRESS** = ``"IN_PROGRESS"``
162
+
163
+ ___
164
+
165
+ ### CONTENT\_TOO\_LARGE
166
+
167
+ • **CONTENT\_TOO\_LARGE** = ``"CONTENT_TOO_LARGE"``
168
+
169
+ ___
170
+
171
+ ### URL\_PROTOCOL\_NOT\_SUPPORTED
172
+
173
+ • **URL\_PROTOCOL\_NOT\_SUPPORTED** = ``"URL_PROTOCOL_NOT_SUPPORTED"``
174
+
175
+ ___
176
+
177
+ ### URL\_CONTENT\_TYPE\_NOT\_WHITELISTED
178
+
179
+ • **URL\_CONTENT\_TYPE\_NOT\_WHITELISTED** = ``"URL_CONTENT_TYPE_NOT_WHITELISTED"``
180
+
181
+ ___
182
+
183
+ ### URL\_DOWNLOAD\_FAILURE
184
+
185
+ • **URL\_DOWNLOAD\_FAILURE** = ``"URL_DOWNLOAD_FAILURE"``
186
+
187
+ ___
188
+
189
+ ### CLOUD\_STORAGE\_FAILURE
190
+
191
+ • **CLOUD\_STORAGE\_FAILURE** = ``"CLOUD_STORAGE_FAILURE"``
192
+
193
+ ___
194
+
195
+ ### UNRECOGNIZED
196
+
197
+ • **UNRECOGNIZED** = ``"UNRECOGNIZED"``