@xylex-group/athena 2.10.0 → 2.11.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/README.md +112 -28
- package/dist/browser.cjs +38 -1
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +3 -3
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +38 -1
- package/dist/browser.js.map +1 -1
- package/dist/cli/index.cjs +38 -1
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +38 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/{client-BYii6dU9.d.ts → client-DD_UeF3Q.d.ts} +2 -0
- package/dist/{client-B7EQ_hPV.d.cts → client-WqBuu60O.d.cts} +2 -0
- package/dist/index.cjs +38 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +38 -1
- package/dist/index.js.map +1 -1
- package/dist/{module-DC96HJa3.d.cts → module-BFMyVmwX.d.cts} +1 -1
- package/dist/{module-DbHlxpeR.d.ts → module-DRkIHtY-.d.ts} +1 -1
- package/dist/next/client.cjs +38 -1
- package/dist/next/client.cjs.map +1 -1
- package/dist/next/client.d.cts +2 -2
- package/dist/next/client.d.ts +2 -2
- package/dist/next/client.js +38 -1
- package/dist/next/client.js.map +1 -1
- package/dist/next/server.cjs +38 -1
- package/dist/next/server.cjs.map +1 -1
- package/dist/next/server.d.cts +2 -2
- package/dist/next/server.d.ts +2 -2
- package/dist/next/server.js +38 -1
- package/dist/next/server.js.map +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/{shared-BMVGMnti.d.cts → shared-B1ueL-Ox.d.cts} +1 -1
- package/dist/{shared-DRptGBWP.d.ts → shared-GPAprhBb.d.ts} +1 -1
- package/package.json +2 -2
package/dist/cli/index.cjs
CHANGED
|
@@ -2004,7 +2004,7 @@ var getSessionCookie = (request2, config) => {
|
|
|
2004
2004
|
|
|
2005
2005
|
// package.json
|
|
2006
2006
|
var package_default = {
|
|
2007
|
-
version: "2.
|
|
2007
|
+
version: "2.11.0"
|
|
2008
2008
|
};
|
|
2009
2009
|
|
|
2010
2010
|
// src/sdk-version.ts
|
|
@@ -2994,6 +2994,21 @@ function copyDefinedField(target, source, targetKey, sourceKey) {
|
|
|
2994
2994
|
target[targetKey] = value;
|
|
2995
2995
|
}
|
|
2996
2996
|
}
|
|
2997
|
+
function normalizeEmailTemplateAttachmentsValue(value) {
|
|
2998
|
+
if (typeof value === "string" || value == null) {
|
|
2999
|
+
return value;
|
|
3000
|
+
}
|
|
3001
|
+
if (Array.isArray(value)) {
|
|
3002
|
+
return value.map((item) => normalizeEmailTemplateAttachmentsValue(item));
|
|
3003
|
+
}
|
|
3004
|
+
if (typeof value !== "object") {
|
|
3005
|
+
return value;
|
|
3006
|
+
}
|
|
3007
|
+
const attachment = { ...value };
|
|
3008
|
+
copyDefinedField(attachment, attachment, "file_url", "fileUrl");
|
|
3009
|
+
delete attachment.fileUrl;
|
|
3010
|
+
return attachment;
|
|
3011
|
+
}
|
|
2997
3012
|
function normalizeAdminEmailTemplatePayload(payload) {
|
|
2998
3013
|
const normalized = { ...payload };
|
|
2999
3014
|
copyDefinedField(normalized, payload, "template_key", "templateKey");
|
|
@@ -3004,6 +3019,17 @@ function normalizeAdminEmailTemplatePayload(payload) {
|
|
|
3004
3019
|
copyDefinedField(normalized, payload, "variable_bindings", "variableBindings");
|
|
3005
3020
|
copyDefinedField(normalized, payload, "attachment_failure_mode", "attachmentFailureMode");
|
|
3006
3021
|
copyDefinedField(normalized, payload, "is_active", "isActive");
|
|
3022
|
+
if (Object.hasOwn(payload, "attachments")) {
|
|
3023
|
+
normalized.attachments = normalizeEmailTemplateAttachmentsValue(payload.attachments);
|
|
3024
|
+
}
|
|
3025
|
+
delete normalized.templateKey;
|
|
3026
|
+
delete normalized.eventType;
|
|
3027
|
+
delete normalized.subjectTemplate;
|
|
3028
|
+
delete normalized.textTemplate;
|
|
3029
|
+
delete normalized.htmlTemplate;
|
|
3030
|
+
delete normalized.variableBindings;
|
|
3031
|
+
delete normalized.attachmentFailureMode;
|
|
3032
|
+
delete normalized.isActive;
|
|
3007
3033
|
return normalized;
|
|
3008
3034
|
}
|
|
3009
3035
|
function toReactEmailTemplateCompatibilityInput(input) {
|
|
@@ -3027,6 +3053,17 @@ function normalizeAdminEmailTemplateSendPayload(payload) {
|
|
|
3027
3053
|
copyDefinedField(normalized, payload, "user_id", "userId");
|
|
3028
3054
|
copyDefinedField(normalized, payload, "organization_id", "organizationId");
|
|
3029
3055
|
copyDefinedField(normalized, payload, "session_token", "sessionToken");
|
|
3056
|
+
copyDefinedField(normalized, payload, "attachment_failure_mode", "attachmentFailureMode");
|
|
3057
|
+
if (Object.hasOwn(payload, "attachments")) {
|
|
3058
|
+
normalized.attachments = normalizeEmailTemplateAttachmentsValue(payload.attachments);
|
|
3059
|
+
}
|
|
3060
|
+
delete normalized.templateId;
|
|
3061
|
+
delete normalized.recipientEmail;
|
|
3062
|
+
delete normalized.renderVariables;
|
|
3063
|
+
delete normalized.userId;
|
|
3064
|
+
delete normalized.organizationId;
|
|
3065
|
+
delete normalized.sessionToken;
|
|
3066
|
+
delete normalized.attachmentFailureMode;
|
|
3030
3067
|
return normalized;
|
|
3031
3068
|
}
|
|
3032
3069
|
function toSessionGuardFailure(sessionResult) {
|