@rtsdk/topia 0.12.6 → 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 CHANGED
@@ -41568,6 +41568,28 @@ class User extends SDKController {
41568
41568
  }
41569
41569
  });
41570
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
+ }
41571
41593
  /**
41572
41594
  * @summary
41573
41595
  * Retrieves the data object for a user.
package/dist/index.d.ts CHANGED
@@ -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.
package/dist/index.js CHANGED
@@ -41566,6 +41566,28 @@ class User extends SDKController {
41566
41566
  }
41567
41567
  });
41568
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
+ }
41569
41591
  /**
41570
41592
  * @summary
41571
41593
  * Retrieves the data object for a user.
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.12.06"
63
+ "version": "0.13.00"
64
64
  }