Skip to content

Commit

Permalink
Add info on converting types
Browse files Browse the repository at this point in the history
  • Loading branch information
SariSaar committed Feb 12, 2024
1 parent b3aedb5 commit a56944e
Show file tree
Hide file tree
Showing 16 changed files with 344 additions and 75 deletions.
79 changes: 63 additions & 16 deletions _docpress.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"toc": {
"sections": [
{
"title": "Sharetribe Flex Integration SDK for JavaScript",
"title": "Sharetribe Integration SDK for JavaScript",
"source": "README.md",
"url": "index.html",
"slug": "index",
Expand Down Expand Up @@ -215,6 +215,29 @@
"url": "keep-alive.html",
"slug": "keep-alive"
},
{
"title": "Rate limits",
"source": "docs/rate-limits.md",
"url": "rate-limits.html",
"slug": "rate-limits",
"headings": [
{
"title": "Dev and demo marketplace environments",
"depth": 2,
"id": "dev-and-demo-marketplace-environments"
},
{
"title": "Production marketplace environments",
"depth": 2,
"id": "production-marketplace-environments"
},
{
"title": "Custom rate limits",
"depth": 2,
"id": "custom-rate-limits"
}
]
},
{
"title": "Uploading images",
"source": "docs/uploading-images.md",
Expand All @@ -234,8 +257,8 @@
"index": {
"index.html": {
"source": "README.md",
"title": "Sharetribe Flex Integration SDK for JavaScript",
"pageTitle": "Sharetribe Flex Integration SDK for JavaScript",
"title": "Sharetribe Integration SDK for JavaScript",
"pageTitle": "Sharetribe Integration SDK for JavaScript",
"slug": "index",
"headings": [
{
Expand Down Expand Up @@ -282,19 +305,19 @@
},
"features.html": {
"source": "docs/features.md",
"title": "Features - Sharetribe Flex Integration SDK for JavaScript",
"title": "Features - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Features",
"slug": "features"
},
"try-it-in-command-line.html": {
"source": "docs/try-it-in-command-line.md",
"title": "Try it in command-line! - Sharetribe Flex Integration SDK for JavaScript",
"title": "Try it in command-line! - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Try it in command-line!",
"slug": "try-it-in-command-line"
},
"authentication.html": {
"source": "docs/authentication.md",
"title": "Authentication - Sharetribe Flex Integration SDK for JavaScript",
"title": "Authentication - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Authentication",
"slug": "authentication",
"headings": [
Expand All @@ -312,7 +335,7 @@
},
"calling-the-api.html": {
"source": "docs/calling-the-api.md",
"title": "Calling the API - Sharetribe Flex Integration SDK for JavaScript",
"title": "Calling the API - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Calling the API",
"slug": "calling-the-api",
"headings": [
Expand Down Expand Up @@ -369,37 +392,37 @@
},
"types.html": {
"source": "docs/types.md",
"title": "Types - Sharetribe Flex Integration SDK for JavaScript",
"title": "Types - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Types",
"slug": "types"
},
"configurations.html": {
"source": "docs/configurations.md",
"title": "Configurations - Sharetribe Flex Integration SDK for JavaScript",
"title": "Configurations - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Configurations",
"slug": "configurations"
},
"your-own-types.html": {
"source": "docs/your-own-types.md",
"title": "Your own types - Sharetribe Flex Integration SDK for JavaScript",
"title": "Your own types - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Your own types",
"slug": "your-own-types"
},
"serializing-types-to-json.html": {
"source": "docs/serializing-types-to-json.md",
"title": "Serializing types to JSON - Sharetribe Flex Integration SDK for JavaScript",
"title": "Serializing types to JSON - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Serializing types to JSON",
"slug": "serializing-types-to-json"
},
"object-query-parameters.html": {
"source": "docs/object-query-parameters.md",
"title": "Object query parameters - Sharetribe Flex Integration SDK for JavaScript",
"title": "Object query parameters - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Object query parameters",
"slug": "object-query-parameters"
},
"token-store.html": {
"source": "docs/token-store.md",
"title": "Token store - Sharetribe Flex Integration SDK for JavaScript",
"title": "Token store - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Token store",
"slug": "token-store",
"headings": [
Expand Down Expand Up @@ -434,19 +457,42 @@
},
"keep-alive.html": {
"source": "docs/keep-alive.md",
"title": "Keep-Alive - Sharetribe Flex Integration SDK for JavaScript",
"title": "Keep-Alive - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Keep-Alive",
"slug": "keep-alive"
},
"rate-limits.html": {
"source": "docs/rate-limits.md",
"title": "Rate limits - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Rate limits",
"slug": "rate-limits",
"headings": [
{
"title": "Dev and demo marketplace environments",
"depth": 2,
"id": "dev-and-demo-marketplace-environments"
},
{
"title": "Production marketplace environments",
"depth": 2,
"id": "production-marketplace-environments"
},
{
"title": "Custom rate limits",
"depth": 2,
"id": "custom-rate-limits"
}
]
},
"uploading-images.html": {
"source": "docs/uploading-images.md",
"title": "Uploading images - Sharetribe Flex Integration SDK for JavaScript",
"title": "Uploading images - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Uploading images",
"slug": "uploading-images"
},
"developing-sdk.html": {
"source": "docs/developing-sdk.md",
"title": "Developing SDK - Sharetribe Flex Integration SDK for JavaScript",
"title": "Developing SDK - Sharetribe Integration SDK for JavaScript",
"pageTitle": "Developing SDK",
"slug": "developing-sdk"
}
Expand All @@ -464,6 +510,7 @@
"docs/object-query-parameters.md": "object-query-parameters.html",
"docs/token-store.md": "token-store.html",
"docs/keep-alive.md": "keep-alive.html",
"docs/rate-limits.md": "rate-limits.html",
"docs/uploading-images.md": "uploading-images.html",
"docs/developing-sdk.md": "developing-sdk.html",
"docs/docpress.json": "docpress.json",
Expand Down
12 changes: 7 additions & 5 deletions authentication.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="assets/style.css?t=90051322">
<link rel="stylesheet" href="styles.css?t=6eea839d">
<script src="assets/script.js?t=93f1a66c"></script>
<script src="scripts.js?t=a9970145"></script>
<title>Authentication - Sharetribe Flex Integration SDK for JavaScript</title>
<title>Authentication - Sharetribe Integration SDK for JavaScript</title>
<meta name="viewport" content="width=device-width">
<script>if (false || window.location.hostname.indexOf("sharetribe.github.io") === window.location.hostname.length - 20) {
(function(d,o,c,p,r,e,s){d['GoogleAnalyticsObject']=r;d[r]=d[r]||function(){(d[r].q=d[r].q||[]).push(arguments)},d[r].l=1*new Date();e=o.createElement(c),s=o.getElementsByTagName(c)[0];e.async=1;e.src=p;s.parentNode.insertBefore(e,s)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
Expand All @@ -21,7 +21,7 @@
<ul>
<li class="menu-item -level-0 -parent">
<ul class="submenu">
<li class="menu-item -level-1"><a class="link title link-index" href="index.html">Sharetribe Flex Integration SDK for JavaScript</a>
<li class="menu-item -level-1"><a class="link title link-index" href="index.html">Sharetribe Integration SDK for JavaScript</a>
</li>
<li class="menu-item -level-1"><a class="link title link-features" href="features.html">Features</a>
</li>
Expand Down Expand Up @@ -57,6 +57,8 @@
</li>
<li class="menu-item -level-2"><a class="link title link-keep-alive" href="keep-alive.html">Keep-Alive</a>
</li>
<li class="menu-item -level-2"><a class="link title link-rate-limits" href="rate-limits.html">Rate limits</a>
</li>
<li class="menu-item -level-2"><a class="link title link-uploading-images" href="uploading-images.html">Uploading images</a>
</li>
</ul>
Expand All @@ -75,12 +77,12 @@
</div>
<div class="markdown-body"><h1 id="authentication">Authentication</h1>
<p>The SDK is ready to make API calls as soon as it is instantiated. It will
automatically use the Flex Authentication API to obtain access and refresh
automatically use the Sharetribe Authentication API to obtain access and refresh
tokens.</p>
<h2 id="revoke-refresh-token">Revoke refresh token</h2>
<p><strong><code>integrationSdk.revoke() : Promise</code></strong></p>
<p>Revokes the current refresh token and returns a Promise.</p>
<p>The SDK automatically obtains access and refresh tokens from the <a href="https://www.sharetribe.com/api-reference/authentication.html">Flex
<p>The SDK automatically obtains access and refresh tokens from the <a href="https://www.sharetribe.com/api-reference/authentication.html">Sharetribe
Authentication
API</a>. It uses the
configured <a href="token-store.html">token store</a> to hold the tokens. If the store is
Expand Down
8 changes: 5 additions & 3 deletions calling-the-api.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="assets/style.css?t=90051322">
<link rel="stylesheet" href="styles.css?t=6eea839d">
<script src="assets/script.js?t=93f1a66c"></script>
<script src="scripts.js?t=a9970145"></script>
<title>Calling the API - Sharetribe Flex Integration SDK for JavaScript</title>
<title>Calling the API - Sharetribe Integration SDK for JavaScript</title>
<meta name="viewport" content="width=device-width">
<script>if (false || window.location.hostname.indexOf("sharetribe.github.io") === window.location.hostname.length - 20) {
(function(d,o,c,p,r,e,s){d['GoogleAnalyticsObject']=r;d[r]=d[r]||function(){(d[r].q=d[r].q||[]).push(arguments)},d[r].l=1*new Date();e=o.createElement(c),s=o.getElementsByTagName(c)[0];e.async=1;e.src=p;s.parentNode.insertBefore(e,s)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
Expand All @@ -21,7 +21,7 @@
<ul>
<li class="menu-item -level-0 -parent">
<ul class="submenu">
<li class="menu-item -level-1"><a class="link title link-index" href="index.html">Sharetribe Flex Integration SDK for JavaScript</a>
<li class="menu-item -level-1"><a class="link title link-index" href="index.html">Sharetribe Integration SDK for JavaScript</a>
</li>
<li class="menu-item -level-1"><a class="link title link-features" href="features.html">Features</a>
</li>
Expand Down Expand Up @@ -75,6 +75,8 @@
</li>
<li class="menu-item -level-2"><a class="link title link-keep-alive" href="keep-alive.html">Keep-Alive</a>
</li>
<li class="menu-item -level-2"><a class="link title link-rate-limits" href="rate-limits.html">Rate limits</a>
</li>
<li class="menu-item -level-2"><a class="link title link-uploading-images" href="uploading-images.html">Uploading images</a>
</li>
</ul>
Expand Down
22 changes: 17 additions & 5 deletions configurations.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="assets/style.css?t=90051322">
<link rel="stylesheet" href="styles.css?t=6eea839d">
<script src="assets/script.js?t=93f1a66c"></script>
<script src="scripts.js?t=a9970145"></script>
<title>Configurations - Sharetribe Flex Integration SDK for JavaScript</title>
<title>Configurations - Sharetribe Integration SDK for JavaScript</title>
<meta name="viewport" content="width=device-width">
<script>if (false || window.location.hostname.indexOf("sharetribe.github.io") === window.location.hostname.length - 20) {
(function(d,o,c,p,r,e,s){d['GoogleAnalyticsObject']=r;d[r]=d[r]||function(){(d[r].q=d[r].q||[]).push(arguments)},d[r].l=1*new Date();e=o.createElement(c),s=o.getElementsByTagName(c)[0];e.async=1;e.src=p;s.parentNode.insertBefore(e,s)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
Expand All @@ -21,7 +21,7 @@
<ul>
<li class="menu-item -level-0 -parent">
<ul class="submenu">
<li class="menu-item -level-1"><a class="link title link-index" href="index.html">Sharetribe Flex Integration SDK for JavaScript</a>
<li class="menu-item -level-1"><a class="link title link-index" href="index.html">Sharetribe Integration SDK for JavaScript</a>
</li>
<li class="menu-item -level-1"><a class="link title link-features" href="features.html">Features</a>
</li>
Expand Down Expand Up @@ -51,6 +51,8 @@
</li>
<li class="menu-item -level-2"><a class="link title link-keep-alive" href="keep-alive.html">Keep-Alive</a>
</li>
<li class="menu-item -level-2"><a class="link title link-rate-limits" href="rate-limits.html">Rate limits</a>
</li>
<li class="menu-item -level-2"><a class="link title link-uploading-images" href="uploading-images.html">Uploading images</a>
</li>
</ul>
Expand All @@ -70,7 +72,7 @@
<div class="markdown-body"><h1 id="configurations">Configurations</h1>
<p>There are a few configuration options that can given to the
<code>createInstance</code> method:</p>
<pre><code class="lang-js"><span class="pl-k">const</span> sharetribeIntegrationSdk = <span class="pl-c1">require</span>(<span class="pl-s">&apos;sharetribe-flex-integration-sdk&apos;</span>);
<pre><code class="lang-js"><span class="pl-k">const</span> sharetribeIntegrationSdk = <span class="pl-c1">require</span>(<span class="pl-s">&apos;sharetribe-flex-sdk&apos;</span>);

<span class="pl-k">var</span> integrationSdk = sharetribeIntegrationSdk.createInstance({

Expand Down Expand Up @@ -103,9 +105,19 @@
<span class="pl-c">// HTTP and HTTPS agents to be used when performing</span>
<span class="pl-c">// http and https request. This allows defining non-default</span>
<span class="pl-c">// options for agent, such as `{ keepAlive: false }`.</span>
<span class="pl-c">// When creating custom httpsAgent, set `maxSockets` value to 10 or less.</span>
<span class="hljs-attr">httpAgent</span>: httpAgent,
<span class="hljs-attr">httpsAgent</span>: httpsAgent,

<span class="pl-c">// For dev and demo marketplace environments, add query and command rate</span>
<span class="pl-c">// limiters:</span>
<span class="hljs-attr">queryLimiter</span>: sharetribeIntegrationSdk.createRateLimiter(
sharetribeIntegrationSdk.util.devQueryLimiterConfig
),
<span class="hljs-attr">commandLimiter</span>: sharetribeIntegrationSdk.createRateLimiter(
sharetribeIntegrationSdk.util.devCommandLimiterConfig
),

<span class="pl-c">// Token store</span>
<span class="hljs-attr">tokenStore</span>: sharetribeIntegrationSdk.tokenStore.memoryStore(),

Expand All @@ -123,7 +135,7 @@

<span class="pl-c">// Allow use of Client Secret in browser (optional, defaults to false)</span>
<span class="pl-c">//</span>
<span class="pl-c">// Sharetribe Flex Integration SDK is meant to be used in a secure context, e.g.</span>
<span class="pl-c">// Sharetribe Integration SDK is meant to be used in a secure context, e.g.</span>
<span class="pl-c">// in a private Node.js server. Using it in an open website exposes the</span>
<span class="pl-c">// Client Secret to the public.</span>
<span class="pl-c">//</span>
Expand Down
10 changes: 6 additions & 4 deletions developing-sdk.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="assets/style.css?t=90051322">
<link rel="stylesheet" href="styles.css?t=6eea839d">
<script src="assets/script.js?t=93f1a66c"></script>
<script src="scripts.js?t=a9970145"></script>
<title>Developing SDK - Sharetribe Flex Integration SDK for JavaScript</title>
<title>Developing SDK - Sharetribe Integration SDK for JavaScript</title>
<meta name="viewport" content="width=device-width">
<script>if (false || window.location.hostname.indexOf("sharetribe.github.io") === window.location.hostname.length - 20) {
(function(d,o,c,p,r,e,s){d['GoogleAnalyticsObject']=r;d[r]=d[r]||function(){(d[r].q=d[r].q||[]).push(arguments)},d[r].l=1*new Date();e=o.createElement(c),s=o.getElementsByTagName(c)[0];e.async=1;e.src=p;s.parentNode.insertBefore(e,s)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
Expand All @@ -21,7 +21,7 @@
<ul>
<li class="menu-item -level-0 -parent">
<ul class="submenu">
<li class="menu-item -level-1"><a class="link title link-index" href="index.html">Sharetribe Flex Integration SDK for JavaScript</a>
<li class="menu-item -level-1"><a class="link title link-index" href="index.html">Sharetribe Integration SDK for JavaScript</a>
</li>
<li class="menu-item -level-1"><a class="link title link-features" href="features.html">Features</a>
</li>
Expand Down Expand Up @@ -51,6 +51,8 @@
</li>
<li class="menu-item -level-2"><a class="link title link-keep-alive" href="keep-alive.html">Keep-Alive</a>
</li>
<li class="menu-item -level-2"><a class="link title link-rate-limits" href="rate-limits.html">Rate limits</a>
</li>
<li class="menu-item -level-2"><a class="link title link-uploading-images" href="uploading-images.html">Uploading images</a>
</li>
</ul>
Expand Down Expand Up @@ -101,7 +103,7 @@ <h4 id="update-the-github-pages">Update the Github Pages</h4>
<h4 id="release-a-new-version-to-npm">Release a new version to NPM</h4>
<ol>
<li>
<p>Update version in <code>package.json</code></p>
<p>Update version in <code>package.json</code> and <code>src/version.js</code></p>
</li>
<li>
<p>Update <a href="http://CHANGELOG.md">CHANGELOG.md</a></p>
Expand Down
Loading

0 comments on commit a56944e

Please sign in to comment.