dymo-api 1.0.46 → 1.0.48
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.
|
@@ -99,8 +99,10 @@ const sendEmail = async (token, data) => {
|
|
|
99
99
|
data.html = await (0, render_1.render)(data.react);
|
|
100
100
|
delete data.react;
|
|
101
101
|
}
|
|
102
|
-
if (data.options && data.options.composeTailwindClasses)
|
|
102
|
+
if (data.options && data.options.composeTailwindClasses) {
|
|
103
103
|
data.html = convertTailwindToInlineCss(data.html);
|
|
104
|
+
delete data.options.composeTailwindClasses;
|
|
105
|
+
}
|
|
104
106
|
}
|
|
105
107
|
catch (error) {
|
|
106
108
|
throw customError(1500, `An error occurred while rendering your React component. Details: ${error}`);
|
package/dist/cjs/dymo-api.js
CHANGED
|
@@ -172,6 +172,7 @@ class DymoAPI {
|
|
|
172
172
|
* @param {string} [data.html] - The HTML content of the email.
|
|
173
173
|
* @param {React.ReactElement} [data.react] - The React component to be rendered as the email content.
|
|
174
174
|
* @param {Object} [data.options] - Content configuration options.
|
|
175
|
+
* @param {"high" | "normal" | "low" | undefined} [data.options.priority="normal"] - Email priority (default: normal).
|
|
175
176
|
* @param {boolean} [data.options.composeTailwindClasses] - Whether to compose tailwind classes.
|
|
176
177
|
* @returns {Promise<Object>} A promise that resolves to the response from the server.
|
|
177
178
|
* @throws Will throw an error if there is an issue with the email sending process.
|
|
@@ -99,8 +99,10 @@ const sendEmail = async (token, data) => {
|
|
|
99
99
|
data.html = await (0, render_1.render)(data.react);
|
|
100
100
|
delete data.react;
|
|
101
101
|
}
|
|
102
|
-
if (data.options && data.options.composeTailwindClasses)
|
|
102
|
+
if (data.options && data.options.composeTailwindClasses) {
|
|
103
103
|
data.html = convertTailwindToInlineCss(data.html);
|
|
104
|
+
delete data.options.composeTailwindClasses;
|
|
105
|
+
}
|
|
104
106
|
}
|
|
105
107
|
catch (error) {
|
|
106
108
|
throw customError(1500, `An error occurred while rendering your React component. Details: ${error}`);
|
package/dist/esm/dymo-api.js
CHANGED
|
@@ -172,6 +172,7 @@ class DymoAPI {
|
|
|
172
172
|
* @param {string} [data.html] - The HTML content of the email.
|
|
173
173
|
* @param {React.ReactElement} [data.react] - The React component to be rendered as the email content.
|
|
174
174
|
* @param {Object} [data.options] - Content configuration options.
|
|
175
|
+
* @param {"high" | "normal" | "low" | undefined} [data.options.priority="normal"] - Email priority (default: normal).
|
|
175
176
|
* @param {boolean} [data.options.composeTailwindClasses] - Whether to compose tailwind classes.
|
|
176
177
|
* @returns {Promise<Object>} A promise that resolves to the response from the server.
|
|
177
178
|
* @throws Will throw an error if there is an issue with the email sending process.
|
package/dist/types/dymo-api.d.ts
CHANGED
|
@@ -103,6 +103,7 @@ declare class DymoAPI {
|
|
|
103
103
|
* @param {string} [data.html] - The HTML content of the email.
|
|
104
104
|
* @param {React.ReactElement} [data.react] - The React component to be rendered as the email content.
|
|
105
105
|
* @param {Object} [data.options] - Content configuration options.
|
|
106
|
+
* @param {"high" | "normal" | "low" | undefined} [data.options.priority="normal"] - Email priority (default: normal).
|
|
106
107
|
* @param {boolean} [data.options.composeTailwindClasses] - Whether to compose tailwind classes.
|
|
107
108
|
* @returns {Promise<Object>} A promise that resolves to the response from the server.
|
|
108
109
|
* @throws Will throw an error if there is an issue with the email sending process.
|