Skip to content

Commit

Permalink
publish v.11.7 with hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
LinaBell committed Jun 3, 2024
1 parent b46e1ba commit 74720fa
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 36 deletions.
2 changes: 1 addition & 1 deletion clients/client-topia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@
"local-publish": "yarn build && yalc publish --push --no-scripts"
},
"type": "module",
"version": "0.11.4"
"version": "0.11.7"
}
21 changes: 9 additions & 12 deletions clients/client-topia/src/factories/DroppedAssetFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,19 @@ export class DroppedAssetFactory extends SDKController {
async getWithUniqueName(
uniqueName: string,
urlSlug: string,
interactiveSecret: string,
credentials: {
apiKey?: string;
interactivePublicKey?: string;
interactiveSecret?: string;
interactiveNonce: string;
interactivePublicKey: string;
visitorId: number;
},
): Promise<DroppedAsset> {
const { apiKey, interactivePublicKey, interactiveSecret } = credentials;
const params = { apiKey, interactivePublicKey, interactiveSecret, uniqueName, urlSlug };
const params = { credentials, interactiveSecret, uniqueName, urlSlug };
try {
const headers: { Authorization?: string, interactiveJWT?: string, publickey?: string } = {};
if (apiKey) {
headers.Authorization = apiKey;
} else if (interactivePublicKey && interactiveSecret) {
headers.interactiveJWT = jwt.sign(interactivePublicKey, interactiveSecret);
headers.publickey = interactivePublicKey;
}
const headers: { Authorization?: string; interactiveJWT?: string; publickey?: string } = {};

headers.interactiveJWT = jwt.sign(credentials, interactiveSecret);
headers.publickey = credentials.interactivePublicKey;

const response: AxiosResponse = await this.topiaPublicApi().get(
`/world/${urlSlug}/asset-by-unique-name/${uniqueName}`,
Expand Down
20 changes: 8 additions & 12 deletions clients/client-topia/src/factories/WorldFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,19 @@ export class WorldFactory extends SDKController {
async deleteDroppedAssets(
urlSlug: string,
droppedAssetIds: string[],
interactiveSecret: string,
credentials: {
apiKey?: string;
interactivePublicKey?: string;
interactiveSecret?: string;
interactiveNonce: string;
interactivePublicKey: string;
visitorId: number;
},
) {
const { apiKey, interactivePublicKey, interactiveSecret } = credentials;
const params = { apiKey, droppedAssetIds, interactivePublicKey, interactiveSecret, urlSlug };
const params = { credentials, droppedAssetIds, urlSlug };

try {
const headers: { Authorization?: string, interactiveJWT?: string, publickey?: string } = {};
if (apiKey) {
headers.Authorization = apiKey;
} else if (interactivePublicKey && interactiveSecret) {
headers.interactiveJWT = jwt.sign(interactivePublicKey, interactiveSecret);
headers.publickey = interactivePublicKey;
}
const headers: { Authorization?: string; interactiveJWT?: string; publickey?: string } = {};
headers.interactiveJWT = jwt.sign(credentials, interactiveSecret);
headers.publickey = credentials.interactivePublicKey;

const promiseArray = [];
for (const id of droppedAssetIds) {
Expand Down
14 changes: 8 additions & 6 deletions docs/classes/factories.DroppedAssetFactory.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ <h5>url<wbr/>Slug<span class="tsd-signature-symbol">: </span><span class="tsd-si
<h5><code class="tsd-tag ts-flagOptional">Optional</code> y<wbr/>Order<wbr/>Adjust<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span></h5></li></ul></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="controllers.DroppedAsset.html" class="tsd-signature-type" data-tsd-kind="Class">DroppedAsset</a><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in factories/DroppedAssetFactory.ts:105</li></ul></aside></li></ul></section>
<li>Defined in factories/DroppedAssetFactory.ts:102</li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="errorHandler" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>error<wbr/>Handler</span><a href="#errorHandler" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
Expand Down Expand Up @@ -251,7 +251,7 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getWithUniqueName" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>get<wbr/>With<wbr/>Unique<wbr/>Name</span><a href="#getWithUniqueName" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="getWithUniqueName.getWithUniqueName-1">get<wbr/>With<wbr/>Unique<wbr/>Name<span class="tsd-signature-symbol">(</span>uniqueName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, urlSlug<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, credentials<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span><br/><span>    </span>apiKey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>interactivePublicKey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>interactiveSecret<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><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">&lt;</span><a href="controllers.DroppedAsset.html" class="tsd-signature-type" data-tsd-kind="Class">DroppedAsset</a><span class="tsd-signature-symbol">&gt;</span><a href="#getWithUniqueName.getWithUniqueName-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-signature tsd-anchor-link" id="getWithUniqueName.getWithUniqueName-1">get<wbr/>With<wbr/>Unique<wbr/>Name<span class="tsd-signature-symbol">(</span>uniqueName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, urlSlug<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, interactiveSecret<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, credentials<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span><br/><span>    </span>interactiveNonce<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>interactivePublicKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>visitorId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><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">&lt;</span><a href="controllers.DroppedAsset.html" class="tsd-signature-type" data-tsd-kind="Class">DroppedAsset</a><span class="tsd-signature-symbol">&gt;</span><a href="#getWithUniqueName.getWithUniqueName-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<h3>Summary</h3><p>Searches dropped assets within a world by a provide <code>uniqueName</code>. If a single match is found, a new instance of DroppedAsset class is returned all properties.</p>
Expand All @@ -267,14 +267,16 @@ <h5>uniqueName: <span class="tsd-signature-type">string</span></h5></li>
<li>
<h5>urlSlug: <span class="tsd-signature-type">string</span></h5></li>
<li>
<h5>credentials: <span class="tsd-signature-symbol">{ </span><br/><span>    </span>apiKey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>interactivePublicKey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>interactiveSecret<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h5>
<h5>interactiveSecret: <span class="tsd-signature-type">string</span></h5></li>
<li>
<h5>credentials: <span class="tsd-signature-symbol">{ </span><br/><span>    </span>interactiveNonce<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>interactivePublicKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>visitorId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h5>
<ul class="tsd-parameters">
<li class="tsd-parameter">
<h5><code class="tsd-tag ts-flagOptional">Optional</code> api<wbr/>Key<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5></li>
<h5>interactive<wbr/>Nonce<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li>
<li class="tsd-parameter">
<h5><code class="tsd-tag ts-flagOptional">Optional</code> interactive<wbr/>Public<wbr/>Key<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5></li>
<h5>interactive<wbr/>Public<wbr/>Key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li>
<li class="tsd-parameter">
<h5><code class="tsd-tag ts-flagOptional">Optional</code> interactive<wbr/>Secret<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5></li></ul></li></ul></div>
<h5>visitor<wbr/>Id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5></li></ul></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="controllers.DroppedAsset.html" class="tsd-signature-type" data-tsd-kind="Class">DroppedAsset</a><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in factories/DroppedAssetFactory.ts:54</li></ul></aside></li></ul></section>
Expand Down
12 changes: 7 additions & 5 deletions docs/classes/factories.WorldFactory.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ <h4 class="tsd-returns-title">Returns <a href="controllers.World.html" class="ts
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="deleteDroppedAssets" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>delete<wbr/>Dropped<wbr/>Assets</span><a href="#deleteDroppedAssets" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="deleteDroppedAssets.deleteDroppedAssets-1">delete<wbr/>Dropped<wbr/>Assets<span class="tsd-signature-symbol">(</span>urlSlug<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, droppedAssetIds<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span>, credentials<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span><br/><span>    </span>apiKey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>interactivePublicKey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>interactiveSecret<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><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">&lt;</span><span class="tsd-signature-symbol">{ </span><br/><span>    </span>success<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#deleteDroppedAssets.deleteDroppedAssets-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-signature tsd-anchor-link" id="deleteDroppedAssets.deleteDroppedAssets-1">delete<wbr/>Dropped<wbr/>Assets<span class="tsd-signature-symbol">(</span>urlSlug<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, droppedAssetIds<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span>, interactiveSecret<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, credentials<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span><br/><span>    </span>interactiveNonce<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>interactivePublicKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>visitorId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><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">&lt;</span><span class="tsd-signature-symbol">{ </span><br/><span>    </span>success<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#deleteDroppedAssets.deleteDroppedAssets-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<h3>Summary</h3><p>Deletes an array of Dropped Assets from within a world and returns success: true</p>
Expand All @@ -136,14 +136,16 @@ <h5>urlSlug: <span class="tsd-signature-type">string</span></h5></li>
<li>
<h5>droppedAssetIds: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5></li>
<li>
<h5>credentials: <span class="tsd-signature-symbol">{ </span><br/><span>    </span>apiKey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>interactivePublicKey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>interactiveSecret<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h5>
<h5>interactiveSecret: <span class="tsd-signature-type">string</span></h5></li>
<li>
<h5>credentials: <span class="tsd-signature-symbol">{ </span><br/><span>    </span>interactiveNonce<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>interactivePublicKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>visitorId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h5>
<ul class="tsd-parameters">
<li class="tsd-parameter">
<h5><code class="tsd-tag ts-flagOptional">Optional</code> api<wbr/>Key<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5></li>
<h5>interactive<wbr/>Nonce<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li>
<li class="tsd-parameter">
<h5><code class="tsd-tag ts-flagOptional">Optional</code> interactive<wbr/>Public<wbr/>Key<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5></li>
<h5>interactive<wbr/>Public<wbr/>Key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li>
<li class="tsd-parameter">
<h5><code class="tsd-tag ts-flagOptional">Optional</code> interactive<wbr/>Secret<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5></li></ul></li></ul></div>
<h5>visitor<wbr/>Id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5></li></ul></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span><br/><span>    </span>success<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in factories/WorldFactory.ts:38</li></ul></aside></li></ul></section>
Expand Down

0 comments on commit 74720fa

Please sign in to comment.