@rtsdk/topia 0.13.0 → 0.13.1

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/dist/index.cjs CHANGED
@@ -40955,7 +40955,7 @@ class World extends SDKController {
40955
40955
  const params = { allowNonAdmins, assetSuffix, position, sceneDropId, sceneId };
40956
40956
  try {
40957
40957
  const result = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/drop-scene`, params, this.requestOptions);
40958
- return result;
40958
+ return result.data;
40959
40959
  }
40960
40960
  catch (error) {
40961
40961
  throw this.errorHandler({ error, params, sdkMethod: "World.dropScene" });
@@ -41032,7 +41032,7 @@ class World extends SDKController {
41032
41032
  if (!particleId)
41033
41033
  return "No particleId found.";
41034
41034
  const result = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/particles`, { particleId, position, duration }, this.requestOptions);
41035
- return result;
41035
+ return result.data;
41036
41036
  }
41037
41037
  catch (error) {
41038
41038
  throw this.errorHandler({ error, params: { id, name }, sdkMethod: "World.triggerParticle" });
@@ -41906,7 +41906,7 @@ class Visitor extends User {
41906
41906
  expressionId = response.data[0].id;
41907
41907
  }
41908
41908
  const result = yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/grant-expression/${expressionId}`, {}, this.requestOptions);
41909
- return result;
41909
+ return result.data;
41910
41910
  }
41911
41911
  catch (error) {
41912
41912
  throw this.errorHandler({ error, params: { id, name }, sdkMethod: "Visitor.grantExpression" });
@@ -41956,7 +41956,7 @@ class Visitor extends User {
41956
41956
  if (!particleId)
41957
41957
  return "No particleId found.";
41958
41958
  const result = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/particles`, { particleId, position: { x: 1, y: 1 }, duration, followPlayerId: this.id }, this.requestOptions);
41959
- return result;
41959
+ return result.data;
41960
41960
  }
41961
41961
  catch (error) {
41962
41962
  throw this.errorHandler({ error, params: { id, name }, sdkMethod: "Visitor.triggerParticle" });
package/dist/index.d.ts CHANGED
@@ -66,8 +66,9 @@ type WorldOptions = {
66
66
  };
67
67
 
68
68
  type ResponseType$1 = {
69
- message: string;
70
- success: boolean;
69
+ message?: string;
70
+ statusCode?: number;
71
+ success?: boolean;
71
72
  };
72
73
 
73
74
  /**
@@ -678,7 +679,7 @@ declare class World extends SDKController implements WorldInterface {
678
679
  position: object;
679
680
  sceneDropId?: string;
680
681
  sceneId: string;
681
- }): Promise<object | ResponseType$1>;
682
+ }): Promise<ResponseType$1>;
682
683
  /**
683
684
  * @summary
684
685
  * Replace the current scene of a world.
@@ -721,7 +722,7 @@ declare class World extends SDKController implements WorldInterface {
721
722
  name?: string;
722
723
  duration?: number;
723
724
  position?: object;
724
- }): Promise<object | ResponseType$1 | string>;
725
+ }): Promise<ResponseType$1 | string>;
725
726
  /**
726
727
  * @summary
727
728
  * Retrieves the data object for a world. Must have valid interactive credentials from a visitor in the world.
@@ -1300,7 +1301,7 @@ declare class Visitor extends User implements VisitorInterface {
1300
1301
  grantExpression({ id, name }: {
1301
1302
  id?: string;
1302
1303
  name?: string;
1303
- }): Promise<object | ResponseType$1>;
1304
+ }): Promise<ResponseType$1>;
1304
1305
  /**
1305
1306
  * @summary
1306
1307
  * Get all particles available
@@ -1310,7 +1311,7 @@ declare class Visitor extends User implements VisitorInterface {
1310
1311
  * await visitor.getAllParticles();
1311
1312
  * ```
1312
1313
  */
1313
- getAllParticles(): Promise<object | ResponseType$1>;
1314
+ getAllParticles(): Promise<ResponseType$1>;
1314
1315
  /**
1315
1316
  * @summary
1316
1317
  * Trigger a particle effect on a visitor
@@ -1324,7 +1325,7 @@ declare class Visitor extends User implements VisitorInterface {
1324
1325
  id?: string;
1325
1326
  name?: string;
1326
1327
  duration?: number;
1327
- }): Promise<object | ResponseType$1 | string>;
1328
+ }): Promise<ResponseType$1 | string>;
1328
1329
  /**
1329
1330
  * @summary
1330
1331
  * Retrieves the data object for a visitor.
package/dist/index.js CHANGED
@@ -40953,7 +40953,7 @@ class World extends SDKController {
40953
40953
  const params = { allowNonAdmins, assetSuffix, position, sceneDropId, sceneId };
40954
40954
  try {
40955
40955
  const result = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/drop-scene`, params, this.requestOptions);
40956
- return result;
40956
+ return result.data;
40957
40957
  }
40958
40958
  catch (error) {
40959
40959
  throw this.errorHandler({ error, params, sdkMethod: "World.dropScene" });
@@ -41030,7 +41030,7 @@ class World extends SDKController {
41030
41030
  if (!particleId)
41031
41031
  return "No particleId found.";
41032
41032
  const result = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/particles`, { particleId, position, duration }, this.requestOptions);
41033
- return result;
41033
+ return result.data;
41034
41034
  }
41035
41035
  catch (error) {
41036
41036
  throw this.errorHandler({ error, params: { id, name }, sdkMethod: "World.triggerParticle" });
@@ -41904,7 +41904,7 @@ class Visitor extends User {
41904
41904
  expressionId = response.data[0].id;
41905
41905
  }
41906
41906
  const result = yield this.topiaPublicApi().put(`/world/${this.urlSlug}/visitors/${this.id}/grant-expression/${expressionId}`, {}, this.requestOptions);
41907
- return result;
41907
+ return result.data;
41908
41908
  }
41909
41909
  catch (error) {
41910
41910
  throw this.errorHandler({ error, params: { id, name }, sdkMethod: "Visitor.grantExpression" });
@@ -41954,7 +41954,7 @@ class Visitor extends User {
41954
41954
  if (!particleId)
41955
41955
  return "No particleId found.";
41956
41956
  const result = yield this.topiaPublicApi().post(`/world/${this.urlSlug}/particles`, { particleId, position: { x: 1, y: 1 }, duration, followPlayerId: this.id }, this.requestOptions);
41957
- return result;
41957
+ return result.data;
41958
41958
  }
41959
41959
  catch (error) {
41960
41960
  throw this.errorHandler({ error, params: { id, name }, sdkMethod: "Visitor.triggerParticle" });
package/package.json CHANGED
@@ -60,5 +60,5 @@
60
60
  "yalc-push": "yarn build && yalc publish --push --dev --no-scripts"
61
61
  },
62
62
  "type": "module",
63
- "version": "0.13.00"
63
+ "version": "0.13.01"
64
64
  }