@rtsdk/topia 0.12.5 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +25 -2
- package/dist/index.d.ts +25 -6
- package/dist/index.js +25 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -39825,8 +39825,8 @@ var _DroppedAsset_updateDroppedAsset;
|
|
|
39825
39825
|
* ```
|
|
39826
39826
|
*/
|
|
39827
39827
|
class DroppedAsset extends Asset {
|
|
39828
|
-
constructor(topia, id, urlSlug, options = { attributes: {
|
|
39829
|
-
var _a;
|
|
39828
|
+
constructor(topia, id, urlSlug, options = { attributes: {}, credentials: {} }) {
|
|
39829
|
+
var _a, _b;
|
|
39830
39830
|
super(topia, id, { attributes: options.attributes, credentials: Object.assign({ assetId: id, urlSlug }, options.credentials) });
|
|
39831
39831
|
// private methods
|
|
39832
39832
|
_DroppedAsset_updateDroppedAsset.set(this, (payload, updateType) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -39841,6 +39841,7 @@ class DroppedAsset extends Asset {
|
|
|
39841
39841
|
this.id = id;
|
|
39842
39842
|
this.text = (_a = options.attributes) === null || _a === void 0 ? void 0 : _a.text;
|
|
39843
39843
|
this.urlSlug = urlSlug;
|
|
39844
|
+
this.position = ((_b = options.attributes) === null || _b === void 0 ? void 0 : _b.position) || { x: 0, y: 0 };
|
|
39844
39845
|
}
|
|
39845
39846
|
/**
|
|
39846
39847
|
* @summary
|
|
@@ -41567,6 +41568,28 @@ class User extends SDKController {
|
|
|
41567
41568
|
}
|
|
41568
41569
|
});
|
|
41569
41570
|
}
|
|
41571
|
+
/**
|
|
41572
|
+
* @summary
|
|
41573
|
+
* Send an email
|
|
41574
|
+
*
|
|
41575
|
+
* @usage
|
|
41576
|
+
* ```ts
|
|
41577
|
+
* const html = `<p><b>Hello World!</b></p><p>This email is being sent from via SDK.</p>`
|
|
41578
|
+
* await user.sendEmail({ html, subject: "Example", to: "example@email.io" });
|
|
41579
|
+
* ```
|
|
41580
|
+
*/
|
|
41581
|
+
sendEmail({ html, subject, to, }) {
|
|
41582
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41583
|
+
const params = { html, subject, to };
|
|
41584
|
+
try {
|
|
41585
|
+
const response = yield this.topiaPublicApi().post(`/notifications/send-email`, params, this.requestOptions);
|
|
41586
|
+
return response.data;
|
|
41587
|
+
}
|
|
41588
|
+
catch (error) {
|
|
41589
|
+
throw this.errorHandler({ error, params, sdkMethod: "User.sendEmail" });
|
|
41590
|
+
}
|
|
41591
|
+
});
|
|
41592
|
+
}
|
|
41570
41593
|
/**
|
|
41571
41594
|
* @summary
|
|
41572
41595
|
* Retrieves the data object for a user.
|
package/dist/index.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
|
|
|
116
116
|
dataObject?: object | null;
|
|
117
117
|
isInteractive?: boolean | null;
|
|
118
118
|
interactivePublicKey?: string | null;
|
|
119
|
-
position
|
|
119
|
+
position: {
|
|
120
120
|
x: number;
|
|
121
121
|
y: number;
|
|
122
122
|
};
|
|
@@ -1100,6 +1100,21 @@ declare class User extends SDKController implements UserInterface {
|
|
|
1100
1100
|
* ```
|
|
1101
1101
|
*/
|
|
1102
1102
|
fetchInteractiveWorldsByKey(interactivePublicKey: string): Promise<object | ResponseType$1>;
|
|
1103
|
+
/**
|
|
1104
|
+
* @summary
|
|
1105
|
+
* Send an email
|
|
1106
|
+
*
|
|
1107
|
+
* @usage
|
|
1108
|
+
* ```ts
|
|
1109
|
+
* const html = `<p><b>Hello World!</b></p><p>This email is being sent from via SDK.</p>`
|
|
1110
|
+
* await user.sendEmail({ html, subject: "Example", to: "example@email.io" });
|
|
1111
|
+
* ```
|
|
1112
|
+
*/
|
|
1113
|
+
sendEmail({ html, subject, to, }: {
|
|
1114
|
+
html: string;
|
|
1115
|
+
subject: string;
|
|
1116
|
+
to: string;
|
|
1117
|
+
}): Promise<object | ResponseType$1>;
|
|
1103
1118
|
/**
|
|
1104
1119
|
* @summary
|
|
1105
1120
|
* Retrieves the data object for a user.
|
|
@@ -1480,7 +1495,7 @@ interface DroppedAssetInterface extends AssetInterface {
|
|
|
1480
1495
|
updateMediaType({ audioRadius, audioSliderVolume, isVideo, mediaLink, mediaName, mediaType, portalName, syncUserMedia, }: UpdateMediaTypeInterface): Promise<void | ResponseType$1>;
|
|
1481
1496
|
updateMuteZone(isMutezone: boolean): Promise<void | ResponseType$1>;
|
|
1482
1497
|
updateWebhookZone(isWebhookZoneEnabled: boolean): Promise<void | ResponseType$1>;
|
|
1483
|
-
updatePosition(x: number, y: number, yOrderAdjust
|
|
1498
|
+
updatePosition(x: number, y: number, yOrderAdjust?: number): Promise<void | ResponseType$1>;
|
|
1484
1499
|
updatePrivateZone({ isPrivateZone, isPrivateZoneChatDisabled, privateZoneUserCap, }: UpdatePrivateZoneInterface): Promise<void | ResponseType$1>;
|
|
1485
1500
|
updateScale(assetScale: number): Promise<void | ResponseType$1>;
|
|
1486
1501
|
updateUploadedMediaSelected(mediaId: string): Promise<void | ResponseType$1>;
|
|
@@ -1533,9 +1548,9 @@ interface DroppedAssetInterface extends AssetInterface {
|
|
|
1533
1548
|
mediaUploadedId?: string | null;
|
|
1534
1549
|
mediaUploadedLink?: string | null;
|
|
1535
1550
|
metaName?: string | null;
|
|
1536
|
-
position
|
|
1537
|
-
x
|
|
1538
|
-
y
|
|
1551
|
+
position: {
|
|
1552
|
+
x: number;
|
|
1553
|
+
y: number;
|
|
1539
1554
|
};
|
|
1540
1555
|
portalCoordsX?: number | null;
|
|
1541
1556
|
portalCoordsY?: number | null;
|
|
@@ -1562,7 +1577,11 @@ interface DroppedAssetInterface extends AssetInterface {
|
|
|
1562
1577
|
}
|
|
1563
1578
|
interface DroppedAssetOptionalInterface {
|
|
1564
1579
|
attributes?: DroppedAssetInterface | {
|
|
1565
|
-
|
|
1580
|
+
position?: {
|
|
1581
|
+
x: number;
|
|
1582
|
+
y: number;
|
|
1583
|
+
};
|
|
1584
|
+
text?: string;
|
|
1566
1585
|
urlSlug?: string;
|
|
1567
1586
|
};
|
|
1568
1587
|
credentials?: InteractiveCredentials | object;
|
package/dist/index.js
CHANGED
|
@@ -39823,8 +39823,8 @@ var _DroppedAsset_updateDroppedAsset;
|
|
|
39823
39823
|
* ```
|
|
39824
39824
|
*/
|
|
39825
39825
|
class DroppedAsset extends Asset {
|
|
39826
|
-
constructor(topia, id, urlSlug, options = { attributes: {
|
|
39827
|
-
var _a;
|
|
39826
|
+
constructor(topia, id, urlSlug, options = { attributes: {}, credentials: {} }) {
|
|
39827
|
+
var _a, _b;
|
|
39828
39828
|
super(topia, id, { attributes: options.attributes, credentials: Object.assign({ assetId: id, urlSlug }, options.credentials) });
|
|
39829
39829
|
// private methods
|
|
39830
39830
|
_DroppedAsset_updateDroppedAsset.set(this, (payload, updateType) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -39839,6 +39839,7 @@ class DroppedAsset extends Asset {
|
|
|
39839
39839
|
this.id = id;
|
|
39840
39840
|
this.text = (_a = options.attributes) === null || _a === void 0 ? void 0 : _a.text;
|
|
39841
39841
|
this.urlSlug = urlSlug;
|
|
39842
|
+
this.position = ((_b = options.attributes) === null || _b === void 0 ? void 0 : _b.position) || { x: 0, y: 0 };
|
|
39842
39843
|
}
|
|
39843
39844
|
/**
|
|
39844
39845
|
* @summary
|
|
@@ -41565,6 +41566,28 @@ class User extends SDKController {
|
|
|
41565
41566
|
}
|
|
41566
41567
|
});
|
|
41567
41568
|
}
|
|
41569
|
+
/**
|
|
41570
|
+
* @summary
|
|
41571
|
+
* Send an email
|
|
41572
|
+
*
|
|
41573
|
+
* @usage
|
|
41574
|
+
* ```ts
|
|
41575
|
+
* const html = `<p><b>Hello World!</b></p><p>This email is being sent from via SDK.</p>`
|
|
41576
|
+
* await user.sendEmail({ html, subject: "Example", to: "example@email.io" });
|
|
41577
|
+
* ```
|
|
41578
|
+
*/
|
|
41579
|
+
sendEmail({ html, subject, to, }) {
|
|
41580
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41581
|
+
const params = { html, subject, to };
|
|
41582
|
+
try {
|
|
41583
|
+
const response = yield this.topiaPublicApi().post(`/notifications/send-email`, params, this.requestOptions);
|
|
41584
|
+
return response.data;
|
|
41585
|
+
}
|
|
41586
|
+
catch (error) {
|
|
41587
|
+
throw this.errorHandler({ error, params, sdkMethod: "User.sendEmail" });
|
|
41588
|
+
}
|
|
41589
|
+
});
|
|
41590
|
+
}
|
|
41568
41591
|
/**
|
|
41569
41592
|
* @summary
|
|
41570
41593
|
* Retrieves the data object for a user.
|
package/package.json
CHANGED