@jolibox/sdk 0.0.7 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-zh_cn.md +1 -1
- package/README.md +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/ads.JoliboxAds.html +41 -0
- package/docs/classes/index.JoliboxSDK.html +2 -2
- package/docs/classes/loader.JoliboxSDKLoader.html +7 -0
- package/docs/classes/{index.JoliboxRuntime.html → runtime.JoliboxRuntime.html} +5 -5
- package/docs/documents/README.html +7 -8
- package/docs/enums/{index.JoliboxRuntimeEvents.html → runtime.JoliboxRuntimeEvents.html} +3 -3
- package/docs/index.html +7 -8
- package/docs/interfaces/{index.IAdConfigParams.html → ads.IAdConfigParams.html} +3 -3
- package/docs/interfaces/{index.IAdUnitParams.html → ads.IAdUnitParams.html} +6 -6
- package/docs/interfaces/{index.IAdsInitParams.html → ads.IAdsInitParams.html} +2 -2
- package/docs/interfaces/{index.IInterstitialsParams.html → ads.IInterstitialsParams.html} +7 -7
- package/docs/interfaces/{index.IPlacementInfo.html → ads.IPlacementInfo.html} +5 -5
- package/docs/interfaces/{index.IPrerollParams.html → ads.IPrerollParams.html} +5 -5
- package/docs/interfaces/{index.IRewardParams.html → ads.IRewardParams.html} +10 -10
- package/docs/interfaces/index.IJoliboxConfig.html +2 -2
- package/docs/interfaces/loader.IJoliboxSDKLoaderConfig.html +3 -0
- package/docs/interfaces/loader.IRemoteVersionMetadata.html +4 -0
- package/docs/interfaces/{index.IVersionMetadata.html → loader.IVersionMetadata.html} +3 -3
- package/docs/modules/ads.html +12 -0
- package/docs/modules/index.html +3 -17
- package/docs/modules/loader.html +5 -0
- package/docs/modules/runtime.html +4 -0
- package/docs/modules.html +5 -2
- package/docs/types/{index.AdUnitFormat.html → ads.AdUnitFormat.html} +1 -1
- package/docs/types/{index.IAdBreakParams.html → ads.IAdBreakParams.html} +1 -1
- package/package.json +9 -9
- package/typedoc.config.mjs +3 -1
- package/docs/classes/index.JoliboxAds.html +0 -41
- package/docs/interfaces/index.IJoliboxSDKLoaderConfig.html +0 -3
package/README-zh_cn.md
CHANGED
|
@@ -13,7 +13,7 @@ Jolibox SDK 是一个 JavaScript 库,提供了一种简单的方法来集成 J
|
|
|
13
13
|
在这种情况下,你不应该在你的 JavaScript 文件中编写 import 语句。
|
|
14
14
|
|
|
15
15
|
```html
|
|
16
|
-
<script src="https://cdn.jsdelivr.net/npm/@jolibox/sdk@
|
|
16
|
+
<script src="https://cdn.jsdelivr.net/npm/@jolibox/sdk@1/dist/index.iife.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
### 通过 NPM 安装
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ If you want to use the library via CDN, you add the following script tag to your
|
|
|
13
13
|
In such case, you should not write the import statement in your JavaScript file.
|
|
14
14
|
|
|
15
15
|
```html
|
|
16
|
-
<script src="https://cdn.jsdelivr.net/npm/@jolibox/sdk@
|
|
16
|
+
<script src="https://cdn.jsdelivr.net/npm/@jolibox/sdk@1/dist/index.iife.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
### Via NPM
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.navigationData = "data:application/octet-stream;base64,
|
|
1
|
+
window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE6WVTU8CMRCG/0u9EvlG5IaCyaokBIMXwmHcDtLQbUnbVYzhvxvclXa/13DtvO/Tmc5MuvomBg+GjMhiOp7MpqRB9mC2ZESo9MMAhdHNKHK9NQEnDbJjgpLRsDscDlrDY+PsB6qtOZA05KibQHXS12kQf8s4VSjIaHU2U9xAyE0x4MoqIlCvfdvrtnpOAo+Sszd5GLt5+By0jjE2nkyp3XHL8Mb0XooNe5+DgsBBMWFQbcCPaSldqsr+IInUnmCmmujIKoDLWrxlPZx3MmrDDAOuq6g54lL4nIOPp0HyxEYWYxOycqBCJTmvyjMhKwUu8BMUreK5qjJc9OoPUgXgzLP52scgN57itG5v2v1OstF3CmGXzs3Skop83tohMkHxkF2z3+PLNtUi6u/qy+Qpu6sRyCpKtzWWRauY27wIlxRm++e+EZdAUWUrjM5rvZLN/jkF+6syhqWFdYo9i0uqjvEFlop1CKTBV1SaSTFDAxQMlF6S6yi94z/0Sq7bOxUKwwLMNi8OXDbjLqT+lC8i1/Tj9JtaKIowsMg8berLLSRnpyufmh2u9XH9A+2VeHcCCAAA"
|
package/docs/assets/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
window.searchData = "data:application/octet-stream;base64,
|
|
1
|
+
window.searchData = "data:application/octet-stream;base64,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";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>JoliboxAds | @jolibox/sdk</title><meta name="description" content="Documentation for @jolibox/sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css?cache=1729836066439"/><link rel="stylesheet" href="../assets/highlight.css?cache=1729836066439"/><script defer src="../assets/main.js?cache=1729836066439"></script><script async src="../assets/icons.js?cache=1729836066439" id="tsd-icons-script"></script><script async src="../assets/search.js?cache=1729836066439" id="tsd-search-script"></script><script async src="../assets/navigation.js?cache=1729836066439" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><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"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@jolibox/sdk</a></div><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"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@jolibox/sdk</a></li><li><a href="../modules/ads.html">ads</a></li><li><a href="ads.JoliboxAds.html">JoliboxAds</a></li></ul><h1> ClassJoliboxAds</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Jolibox Ads SDK</p>
|
|
2
|
+
</div><div class="tsd-comment tsd-typography"></div></section><aside class="tsd-sources"><ul><li>Defined in sdk/src/ads/index.ts:248</li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="ads.JoliboxAds.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
|
|
3
|
+
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="ads.JoliboxAds.html#adBreak" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ad<wbr/>Break</span></a>
|
|
4
|
+
<a href="ads.JoliboxAds.html#adConfig" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ad<wbr/>Config</span></a>
|
|
5
|
+
<a href="ads.JoliboxAds.html#adUnit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ad<wbr/>Unit</span></a>
|
|
6
|
+
<a href="ads.JoliboxAds.html#init" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>init</span></a>
|
|
7
|
+
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_JoliboxAds" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Jolibox<wbr/>Ads</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ads.JoliboxAds.html" class="tsd-signature-type tsd-kind-class">JoliboxAds</a><a href="#constructor.new_JoliboxAds" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Internal constructor, should not be called directly</p>
|
|
8
|
+
</div><h4 class="tsd-returns-title">Returns <a href="ads.JoliboxAds.html" class="tsd-signature-type tsd-kind-class">JoliboxAds</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in sdk/src/ads/index.ts:252</li></ul></aside></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="adBreak" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>ad<wbr/>Break</span><a href="#adBreak" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="adBreak.adBreak-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">ad<wbr/>Break</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">params</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#adBreak.adBreak-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>adBreak() is the key function for placing ads within your game. It defines an ad placement and takes an object called a placement config that specifies everything required to show an ad.</p>
|
|
9
|
+
<p>The adBreak() function defines a placement where an ad could be shown. Whether an ad actually shows depends on factors such as the following:</p>
|
|
10
|
+
<ul>
|
|
11
|
+
<li>The type of ad placement that you declared
|
|
12
|
+
<ul>
|
|
13
|
+
<li>Is this ad at the start of the game? Between levels? At a moment when the player has paused the game?</li>
|
|
14
|
+
</ul>
|
|
15
|
+
</li>
|
|
16
|
+
<li>Whether a suitable ad exists for the current player
|
|
17
|
+
<ul>
|
|
18
|
+
<li>Is this ad relevant to them?</li>
|
|
19
|
+
<li>Is it consistent with their data privacy and consent settings?</li>
|
|
20
|
+
</ul>
|
|
21
|
+
</li>
|
|
22
|
+
<li>The number of ads the player has seen recently</li>
|
|
23
|
+
<li>The control settings—for example, ad frequency, you've configured for this game
|
|
24
|
+
<ul>
|
|
25
|
+
<li>Either as hints in the tag, or,</li>
|
|
26
|
+
<li>Within AdSense—note that the controls available in AdSense will evolve over time.</li>
|
|
27
|
+
</ul>
|
|
28
|
+
</li>
|
|
29
|
+
</ul>
|
|
30
|
+
<p>The kind of ad that shows also depends on similar factors.</p>
|
|
31
|
+
<p>Note that a call to adBreak() might not show an ad at all. It simply declares a place where an ad could be shown.</p>
|
|
32
|
+
<p>This is unlike traditional APIs in which your code always knows if an ad is available, and you decide within the game whether to show it. This approach of letting the Ad Placement API decide if an ad shows in a particular placement is a pattern that is sometimes referred to as "inversion of control".</p>
|
|
33
|
+
<p>The reason we're transitioning our games API to this model is firstly, it shortens the code you have to write within your game. Secondly, it makes it easier to deliver policy compliant placements with a great user experience, which in turn has allowed us to deliver some of our highest performing formats to games publishers. Lastly, it more cleanly separates the process of placing ads in your game from the monetization decisions about the type and number of ads to show.</p>
|
|
34
|
+
<p>We want you to be able to change your monetization settings and control the user experience without having to edit and release a new version of your game, initially by specifying hints in the tag. But in future releases, we will be able to provide controls directly in the AdSense and AdMob frontends.</p>
|
|
35
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">params</span>: <a href="../types/ads.IAdBreakParams.html" class="tsd-signature-type tsd-kind-type-alias">IAdBreakParams</a></span><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in sdk/src/ads/index.ts:303</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="adConfig" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>ad<wbr/>Config</span><a href="#adConfig" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="adConfig.adConfig-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">ad<wbr/>Config</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">params</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#adConfig.adConfig-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The adConfig() call communicates the game's current configuration to the Ad Placement API. The Ad Placement API can use this to tune the way it preloads ads and to filter the kinds of ads it requests so they're suitable (eg. video ads that require sound).</p>
|
|
36
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">params</span>: <a href="../interfaces/ads.IAdConfigParams.html" class="tsd-signature-type tsd-kind-interface">IAdConfigParams</a></span><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in sdk/src/ads/index.ts:270</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="adUnit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>ad<wbr/>Unit</span><a href="#adUnit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="adUnit.adUnit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">ad<wbr/>Unit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">params</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#adUnit.adUnit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>adUnit() is a function that creates an ad unit and attaches it to a parent element. The ad unit is a single ad placement that can be used to show ads.</p>
|
|
37
|
+
<p>Currently we only provide support for creating ad units as <code><ins></code> tags with the class 'adsbygoogle'. This is the standard way to create ad units with Google AdSense.</p>
|
|
38
|
+
<p>After calling this method, the ad unit is attached to the parent element you specify as el in the params object.</p>
|
|
39
|
+
<p>By default, the client ID and channel ID are automatically set by the SDK. And the slot name is set to the position of the ad unit. You can override these values by passing the slot and channelId in the params object.</p>
|
|
40
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">params</span>: <a href="../interfaces/ads.IAdUnitParams.html" class="tsd-signature-type tsd-kind-interface">IAdUnitParams</a></span><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in sdk/src/ads/index.ts:322</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="init" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>init</span><a href="#init" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="init.init-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">init</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">config</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#init.init-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Init JoliboxAds. Must be called before any other ads functions.</p>
|
|
41
|
+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">config</span>: <a href="../interfaces/ads.IAdsInitParams.html" class="tsd-signature-type tsd-kind-interface">IAdsInitParams</a></span><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in sdk/src/ads/index.ts:259</li></ul></aside></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><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><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><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><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>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#adBreak" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ad<wbr/>Break</span></a><a href="#adConfig" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ad<wbr/>Config</span></a><a href="#adUnit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ad<wbr/>Unit</span></a><a href="#init" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>init</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@jolibox/sdk</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>JoliboxSDK | @jolibox/sdk</title><meta name="description" content="Documentation for @jolibox/sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css?cache=
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>JoliboxSDK | @jolibox/sdk</title><meta name="description" content="Documentation for @jolibox/sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css?cache=1729836066439"/><link rel="stylesheet" href="../assets/highlight.css?cache=1729836066439"/><script defer src="../assets/main.js?cache=1729836066439"></script><script async src="../assets/icons.js?cache=1729836066439" id="tsd-icons-script"></script><script async src="../assets/search.js?cache=1729836066439" id="tsd-search-script"></script><script async src="../assets/navigation.js?cache=1729836066439" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><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"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@jolibox/sdk</a></div><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"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@jolibox/sdk</a></li><li><a href="../modules/index.html">index</a></li><li><a href="index.JoliboxSDK.html">JoliboxSDK</a></li></ul><h1> ClassJoliboxSDK</h1></div><aside class="tsd-sources"><ul><li>Defined in sdk/src/index.ts:33</li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="index.JoliboxSDK.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
|
|
2
2
|
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="index.JoliboxSDK.html#ads" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>ads</span></a>
|
|
3
3
|
<a href="index.JoliboxSDK.html#runtime" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>runtime</span></a>
|
|
4
|
-
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_JoliboxSDK" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>JoliboxSDK</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">__namedParameters</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="index.JoliboxSDK.html" class="tsd-signature-type tsd-kind-class">JoliboxSDK</a><a href="#constructor.new_JoliboxSDK" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">__namedParameters</span>: <a href="../interfaces/index.IJoliboxConfig.html" class="tsd-signature-type tsd-kind-interface">IJoliboxConfig</a><span class="tsd-signature-symbol"> = {}</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="index.JoliboxSDK.html" class="tsd-signature-type tsd-kind-class">JoliboxSDK</a></h4><aside class="tsd-sources"><ul><li>Defined in sdk/src/index.ts:
|
|
4
|
+
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_JoliboxSDK" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>JoliboxSDK</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">__namedParameters</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="index.JoliboxSDK.html" class="tsd-signature-type tsd-kind-class">JoliboxSDK</a><a href="#constructor.new_JoliboxSDK" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">__namedParameters</span>: <a href="../interfaces/index.IJoliboxConfig.html" class="tsd-signature-type tsd-kind-interface">IJoliboxConfig</a><span class="tsd-signature-symbol"> = {}</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="index.JoliboxSDK.html" class="tsd-signature-type tsd-kind-class">JoliboxSDK</a></h4><aside class="tsd-sources"><ul><li>Defined in sdk/src/index.ts:38</li></ul></aside></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="ads" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>ads</span><a href="#ads" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">ads</span><span class="tsd-signature-symbol">:</span> <a href="ads.JoliboxAds.html" class="tsd-signature-type tsd-kind-class">JoliboxAds</a></div><aside class="tsd-sources"><ul><li>Defined in sdk/src/index.ts:35</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="runtime" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>runtime</span><a href="#runtime" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">runtime</span><span class="tsd-signature-symbol">:</span> <a href="runtime.JoliboxRuntime.html" class="tsd-signature-type tsd-kind-class">JoliboxRuntime</a></div><aside class="tsd-sources"><ul><li>Defined in sdk/src/index.ts:36</li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><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><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><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><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>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#ads" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>ads</span></a><a href="#runtime" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>runtime</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@jolibox/sdk</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>JoliboxSDKLoader | @jolibox/sdk</title><meta name="description" content="Documentation for @jolibox/sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css?cache=1729836066439"/><link rel="stylesheet" href="../assets/highlight.css?cache=1729836066439"/><script defer src="../assets/main.js?cache=1729836066439"></script><script async src="../assets/icons.js?cache=1729836066439" id="tsd-icons-script"></script><script async src="../assets/search.js?cache=1729836066439" id="tsd-search-script"></script><script async src="../assets/navigation.js?cache=1729836066439" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><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"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@jolibox/sdk</a></div><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"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@jolibox/sdk</a></li><li><a href="../modules/loader.html">loader</a></li><li><a href="loader.JoliboxSDKLoader.html">JoliboxSDKLoader</a></li></ul><h1> ClassJoliboxSDKLoader</h1></div><aside class="tsd-sources"><ul><li>Defined in sdk/src/loader/index.ts:29</li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="loader.JoliboxSDKLoader.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
|
|
2
|
+
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="loader.JoliboxSDKLoader.html#loaderMetadata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>loader<wbr/>Metadata</span></a>
|
|
3
|
+
<a href="loader.JoliboxSDKLoader.html#testMode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>test<wbr/>Mode</span></a>
|
|
4
|
+
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="loader.JoliboxSDKLoader.html#computeLoaderMetaData" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compute<wbr/>Loader<wbr/>Meta<wbr/>Data</span></a>
|
|
5
|
+
<a href="loader.JoliboxSDKLoader.html#fetchUpdateLoaderMetadata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>fetch<wbr/>Update<wbr/>Loader<wbr/>Metadata</span></a>
|
|
6
|
+
<a href="loader.JoliboxSDKLoader.html#loadScript" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>load<wbr/>Script</span></a>
|
|
7
|
+
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_JoliboxSDKLoader" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>JoliboxSDKLoader</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">__namedParameters</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="loader.JoliboxSDKLoader.html" class="tsd-signature-type tsd-kind-class">JoliboxSDKLoader</a><a href="#constructor.new_JoliboxSDKLoader" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">__namedParameters</span>: <a href="../interfaces/loader.IJoliboxSDKLoaderConfig.html" class="tsd-signature-type tsd-kind-interface">IJoliboxSDKLoaderConfig</a><span class="tsd-signature-symbol"> = {}</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="loader.JoliboxSDKLoader.html" class="tsd-signature-type tsd-kind-class">JoliboxSDKLoader</a></h4><aside class="tsd-sources"><ul><li>Defined in sdk/src/loader/index.ts:33</li></ul></aside></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="loaderMetadata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>loader<wbr/>Metadata</span><a href="#loaderMetadata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">loader<wbr/>Metadata</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/loader.IVersionMetadata.html" class="tsd-signature-type tsd-kind-interface">IVersionMetadata</a></div><aside class="tsd-sources"><ul><li>Defined in sdk/src/loader/index.ts:30</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="testMode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>test<wbr/>Mode</span><a href="#testMode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">test<wbr/>Mode</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources"><ul><li>Defined in sdk/src/loader/index.ts:31</li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="computeLoaderMetaData" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>compute<wbr/>Loader<wbr/>Meta<wbr/>Data</span><a href="#computeLoaderMetaData" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="computeLoaderMetaData.computeLoaderMetaData-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">compute<wbr/>Loader<wbr/>Meta<wbr/>Data</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/loader.IVersionMetadata.html" class="tsd-signature-type tsd-kind-interface">IVersionMetadata</a><a href="#computeLoaderMetaData.computeLoaderMetaData-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="../interfaces/loader.IVersionMetadata.html" class="tsd-signature-type tsd-kind-interface">IVersionMetadata</a></h4><aside class="tsd-sources"><ul><li>Defined in sdk/src/loader/index.ts:60</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="fetchUpdateLoaderMetadata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>fetch<wbr/>Update<wbr/>Loader<wbr/>Metadata</span><a href="#fetchUpdateLoaderMetadata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="fetchUpdateLoaderMetadata.fetchUpdateLoaderMetadata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">fetch<wbr/>Update<wbr/>Loader<wbr/>Metadata</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">installedSDKVersion</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">localSDKVersion</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">env</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#fetchUpdateLoaderMetadata.fetchUpdateLoaderMetadata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">installedSDKVersion</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ...</span></span></li><li><span><span class="tsd-kind-parameter">localSDKVersion</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ...</span></span></li><li><span><span class="tsd-kind-parameter">env</span>: <br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"WEB"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"IOS"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"ANDROID"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"WINDOWS"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"MACOS"</span><br/><span> </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">"LINUX"</span><span class="tsd-signature-symbol"> = ...</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources"><ul><li>Defined in sdk/src/loader/index.ts:111</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="loadScript" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>load<wbr/>Script</span><a href="#loadScript" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="loadScript.loadScript-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">load<wbr/>Script</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="#loadScript.loadScript-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in sdk/src/loader/index.ts:89</li></ul></aside></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><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><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><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><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>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#loaderMetadata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>loader<wbr/>Metadata</span></a><a href="#testMode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>test<wbr/>Mode</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#computeLoaderMetaData" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compute<wbr/>Loader<wbr/>Meta<wbr/>Data</span></a><a href="#fetchUpdateLoaderMetadata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>fetch<wbr/>Update<wbr/>Loader<wbr/>Metadata</span></a><a href="#loadScript" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>load<wbr/>Script</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@jolibox/sdk</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>JoliboxRuntime | @jolibox/sdk</title><meta name="description" content="Documentation for @jolibox/sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css?cache=
|
|
2
|
-
</div><div class="tsd-comment tsd-typography"></div></section><aside class="tsd-sources"><ul><li>Defined in web-sync-sdk/dist/index.d.ts:25</li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="
|
|
3
|
-
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="
|
|
4
|
-
<a href="
|
|
5
|
-
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_JoliboxRuntime" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Jolibox<wbr/>Runtime</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>JoliboxRuntime | @jolibox/sdk</title><meta name="description" content="Documentation for @jolibox/sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css?cache=1729836066439"/><link rel="stylesheet" href="../assets/highlight.css?cache=1729836066439"/><script defer src="../assets/main.js?cache=1729836066439"></script><script async src="../assets/icons.js?cache=1729836066439" id="tsd-icons-script"></script><script async src="../assets/search.js?cache=1729836066439" id="tsd-search-script"></script><script async src="../assets/navigation.js?cache=1729836066439" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><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"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@jolibox/sdk</a></div><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"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@jolibox/sdk</a></li><li><a href="../modules/runtime.html">runtime</a></li><li><a href="runtime.JoliboxRuntime.html">JoliboxRuntime</a></li></ul><h1> ClassJoliboxRuntime</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Jolibox Runtime, a set of utilities to interact with the Jolibox runtime</p>
|
|
2
|
+
</div><div class="tsd-comment tsd-typography"></div></section><aside class="tsd-sources"><ul><li>Defined in web-sync-sdk/dist/index.d.ts:25</li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="runtime.JoliboxRuntime.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
|
|
3
|
+
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="runtime.JoliboxRuntime.html#loadFinished" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>load<wbr/>Finished</span></a>
|
|
4
|
+
<a href="runtime.JoliboxRuntime.html#notifyLoadProgress" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>notify<wbr/>Load<wbr/>Progress</span></a>
|
|
5
|
+
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_JoliboxRuntime" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Jolibox<wbr/>Runtime</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="runtime.JoliboxRuntime.html" class="tsd-signature-type tsd-kind-class">JoliboxRuntime</a><a href="#constructor.new_JoliboxRuntime" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="runtime.JoliboxRuntime.html" class="tsd-signature-type tsd-kind-class">JoliboxRuntime</a></h4></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="loadFinished" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>load<wbr/>Finished</span><a href="#loadFinished" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">load<wbr/>Finished</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</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><span class="tsd-signature-symbol">)</span></div><div class="tsd-comment tsd-typography"><p>Notify the end of the loading, will close the loading splash screen</p>
|
|
6
6
|
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in web-sync-sdk/dist/index.d.ts:29</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="notifyLoadProgress" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>notify<wbr/>Load<wbr/>Progress</span><a href="#notifyLoadProgress" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">notify<wbr/>Load<wbr/>Progress</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">progress</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div><div class="tsd-comment tsd-typography"><p>Notify the progress of the loading, will update the loading splash screen</p>
|
|
7
7
|
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature" id="notifyLoadProgress.__type-2.__type-3"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">progress</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">progress</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The progress of the loading, should be an integer between 0 and 100</p>
|
|
8
8
|
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in web-sync-sdk/dist/index.d.ts:34</li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><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><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><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><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>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#loadFinished" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>load<wbr/>Finished</span></a><a href="#notifyLoadProgress" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>notify<wbr/>Load<wbr/>Progress</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@jolibox/sdk</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>README | @jolibox/sdk</title><meta name="description" content="Documentation for @jolibox/sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css?cache=
|
|
2
|
-
<p>Most functions are strictly follow Ad Placement API design. You can read Google's official documentations <a href="https://developers.google.com/ad-placement" target="_blank" class="external">here</a></p>
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>README | @jolibox/sdk</title><meta name="description" content="Documentation for @jolibox/sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css?cache=1729836066439"/><link rel="stylesheet" href="../assets/highlight.css?cache=1729836066439"/><script defer src="../assets/main.js?cache=1729836066439"></script><script async src="../assets/icons.js?cache=1729836066439" id="tsd-icons-script"></script><script async src="../assets/search.js?cache=1729836066439" id="tsd-search-script"></script><script async src="../assets/navigation.js?cache=1729836066439" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><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"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@jolibox/sdk</a></div><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"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@jolibox/sdk</a></li><li><a href="README.html">README</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="md:jolibox-sdk" class="tsd-anchor"></a><h1 class="tsd-anchor-link">Jolibox SDK<a href="#md:jolibox-sdk" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1><p>Jolibox SDK is a JavaScript library that provides a simple way to integrate with Jolibox Ads, Runtime, and other services.</p>
|
|
3
2
|
<p><strong>The current version is still in pre-release, so the API may change in the future.</strong></p>
|
|
4
3
|
<a id="md:installation" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Installation<a href="#md:installation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="md:via-cdn" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Via CDN<a href="#md:via-cdn" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>If you want to use the library via CDN, you add the following script tag to your HTML file.</p>
|
|
5
4
|
<p>In such case, you should not write the import statement in your JavaScript file.</p>
|
|
6
|
-
<pre><code class="html"><span class="hl-0"><</span><span class="hl-1">script</span><span class="hl-2"> </span><span class="hl-3">src</span><span class="hl-2">=</span><span class="hl-4">"https://cdn.jsdelivr.net/npm/@jolibox/
|
|
5
|
+
<pre><code class="html"><span class="hl-0"><</span><span class="hl-1">script</span><span class="hl-2"> </span><span class="hl-3">src</span><span class="hl-2">=</span><span class="hl-4">"https://cdn.jsdelivr.net/npm/@jolibox/sdk@0.0.8/dist/index.iife.js"</span><span class="hl-0">></</span><span class="hl-1">script</span><span class="hl-0">></span>
|
|
7
6
|
</code><button type="button">Copy</button></pre>
|
|
8
7
|
|
|
9
8
|
<a id="md:via-npm" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Via NPM<a href="#md:via-npm" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>If you want to use the library via NPM, you can install it via the following command:</p>
|
|
@@ -11,19 +10,19 @@
|
|
|
11
10
|
<ul>
|
|
12
11
|
<li>
|
|
13
12
|
<p>npm</p>
|
|
14
|
-
<pre><code class="bash"><span class="hl-5">npm</span><span class="hl-6"> </span><span class="hl-7">install</span><span class="hl-6"> </span><span class="hl-7">@jolibox/
|
|
13
|
+
<pre><code class="bash"><span class="hl-5">npm</span><span class="hl-6"> </span><span class="hl-7">install</span><span class="hl-6"> </span><span class="hl-7">@jolibox/sdk</span>
|
|
15
14
|
</code><button type="button">Copy</button></pre>
|
|
16
15
|
|
|
17
16
|
</li>
|
|
18
17
|
<li>
|
|
19
18
|
<p>pnpm</p>
|
|
20
|
-
<pre><code class="bash"><span class="hl-5">pnpm</span><span class="hl-6"> </span><span class="hl-7">add</span><span class="hl-6"> </span><span class="hl-7">@jolibox/
|
|
19
|
+
<pre><code class="bash"><span class="hl-5">pnpm</span><span class="hl-6"> </span><span class="hl-7">add</span><span class="hl-6"> </span><span class="hl-7">@jolibox/sdk</span>
|
|
21
20
|
</code><button type="button">Copy</button></pre>
|
|
22
21
|
|
|
23
22
|
</li>
|
|
24
23
|
<li>
|
|
25
24
|
<p>yarn</p>
|
|
26
|
-
<pre><code class="bash"><span class="hl-5">yarn</span><span class="hl-6"> </span><span class="hl-7">add</span><span class="hl-6"> </span><span class="hl-7">@jolibox/
|
|
25
|
+
<pre><code class="bash"><span class="hl-5">yarn</span><span class="hl-6"> </span><span class="hl-7">add</span><span class="hl-6"> </span><span class="hl-7">@jolibox/sdk</span>
|
|
27
26
|
</code><button type="button">Copy</button></pre>
|
|
28
27
|
|
|
29
28
|
</li>
|
|
@@ -31,9 +30,9 @@
|
|
|
31
30
|
<a id="md:basic-usage" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Basic usage<a href="#md:basic-usage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
|
|
32
31
|
<li>
|
|
33
32
|
<p>Initialization</p>
|
|
34
|
-
<pre><code class="typescript"><span class="hl-8">// If you are importing the library via NPM, you can use the following import statement</span><br/><span class="hl-8">// import {
|
|
33
|
+
<pre><code class="typescript"><span class="hl-8">// If you are importing the library via NPM, you can use the following import statement</span><br/><span class="hl-8">// import { JoliboxSDK } from "@jolibox/sdk";</span><br/><br/><span class="hl-9">const</span><span class="hl-6"> </span><span class="hl-10">jolibox</span><span class="hl-6"> = </span><span class="hl-9">new</span><span class="hl-6"> </span><span class="hl-5">JoliboxSDK</span><span class="hl-6">({</span><br/><span class="hl-6"> </span><span class="hl-11">loaderConfig:</span><span class="hl-6"> {</span><br/><span class="hl-6"> </span><span class="hl-11">testMode:</span><span class="hl-6"> </span><span class="hl-9">true</span><span class="hl-6">,</span><br/><span class="hl-6"> },</span><br/><span class="hl-6">});</span><br/><br/><span class="hl-8">// For example, if you want to use the Ads service</span><br/><span class="hl-9">const</span><span class="hl-6"> { </span><span class="hl-10">ads</span><span class="hl-6"> } = </span><span class="hl-11">jolibox</span><span class="hl-6">;</span><br/><span class="hl-11">ads</span><span class="hl-6">.</span><span class="hl-5">init</span><span class="hl-6">({ </span><span class="hl-11">testMode:</span><span class="hl-6"> </span><span class="hl-9">true</span><span class="hl-6"> });</span><br/><br/><span class="hl-8">// somewhere when you need to preload ads (e.g. in the game loading screen)</span><br/><span class="hl-11">ads</span><span class="hl-6">.</span><span class="hl-5">adConfig</span><span class="hl-6">({</span><br/><span class="hl-6"> </span><span class="hl-11">preloadAdBreaks:</span><span class="hl-6"> </span><span class="hl-7">"on"</span><span class="hl-6">,</span><br/><span class="hl-6"> </span><span class="hl-11">sound:</span><span class="hl-6"> </span><span class="hl-7">"on"</span><span class="hl-6">,</span><br/><span class="hl-6"> </span><span class="hl-5">onReady</span><span class="hl-11">:</span><span class="hl-6"> () </span><span class="hl-9">=></span><span class="hl-6"> {</span><br/><span class="hl-6"> </span><span class="hl-11">console</span><span class="hl-6">.</span><span class="hl-5">log</span><span class="hl-6">(</span><span class="hl-7">"onReady"</span><span class="hl-6">);</span><br/><span class="hl-6"> },</span><br/><span class="hl-6">});</span><br/><br/><span class="hl-8">// Somewhere when you need a popup ads for reward</span><br/><span class="hl-11">ads</span><span class="hl-6">.</span><span class="hl-5">adBreak</span><span class="hl-6">({</span><br/><span class="hl-6"> </span><span class="hl-11">type:</span><span class="hl-6"> </span><span class="hl-7">"reward"</span><span class="hl-6">,</span><br/><span class="hl-6"> </span><span class="hl-5">beforeReward</span><span class="hl-6">(</span><span class="hl-11">showAdFn</span><span class="hl-6">) {</span><br/><span class="hl-6"> </span><span class="hl-5">showAdFn</span><span class="hl-6">();</span><br/><span class="hl-6"> },</span><br/><span class="hl-6"> </span><span class="hl-5">adDismissed</span><span class="hl-11">:</span><span class="hl-6"> () </span><span class="hl-9">=></span><span class="hl-6"> {</span><br/><span class="hl-6"> </span><span class="hl-11">console</span><span class="hl-6">.</span><span class="hl-5">log</span><span class="hl-6">(</span><span class="hl-7">"adDismissed"</span><span class="hl-6">);</span><br/><span class="hl-6"> },</span><br/><span class="hl-6"> </span><span class="hl-5">adViewed</span><span class="hl-11">:</span><span class="hl-6"> () </span><span class="hl-9">=></span><span class="hl-6"> {</span><br/><span class="hl-6"> </span><span class="hl-11">console</span><span class="hl-6">.</span><span class="hl-5">log</span><span class="hl-6">(</span><span class="hl-7">"adViewed"</span><span class="hl-6">);</span><br/><span class="hl-6"> },</span><br/><span class="hl-6"> </span><span class="hl-5">adBreakDone</span><span class="hl-11">:</span><span class="hl-6"> () </span><span class="hl-9">=></span><span class="hl-6"> {</span><br/><span class="hl-6"> </span><span class="hl-11">console</span><span class="hl-6">.</span><span class="hl-5">log</span><span class="hl-6">(</span><span class="hl-7">"adBreakDone"</span><span class="hl-6">);</span><br/><span class="hl-6"> },</span><br/><span class="hl-6">});</span><br/><br/><span class="hl-8">// If you need to show a banner ad, you should call the following function when you start the App</span><br/><span class="hl-11">ads</span><span class="hl-6">.</span><span class="hl-5">adUnit</span><span class="hl-6">({</span><br/><span class="hl-6"> </span><span class="hl-11">el:</span><span class="hl-6"> </span><span class="hl-7">"#banner"</span><span class="hl-6">, </span><span class="hl-8">// or document.getElementById("banner")</span><br/><span class="hl-6">});</span>
|
|
35
34
|
</code><button type="button">Copy</button></pre>
|
|
36
35
|
|
|
37
36
|
</li>
|
|
38
37
|
</ul>
|
|
39
|
-
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><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><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><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><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>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#md:jolibox-
|
|
38
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><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><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><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><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>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#md:jolibox-sdk"><span>Jolibox SDK</span></a><ul><li><a href="#md:installation"><span>Installation</span></a></li><li><ul><li><a href="#md:via-cdn"><span>Via CDN</span></a></li><li><a href="#md:via-npm"><span>Via NPM</span></a></li></ul></li><li><a href="#md:basic-usage"><span>Basic usage</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@jolibox/sdk</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|