@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.js
CHANGED
|
@@ -2002,7 +2002,7 @@ var getSessionCookie = (request2, config) => {
|
|
|
2002
2002
|
|
|
2003
2003
|
// package.json
|
|
2004
2004
|
var package_default = {
|
|
2005
|
-
version: "2.
|
|
2005
|
+
version: "2.11.0"
|
|
2006
2006
|
};
|
|
2007
2007
|
|
|
2008
2008
|
// src/sdk-version.ts
|
|
@@ -2992,6 +2992,21 @@ function copyDefinedField(target, source, targetKey, sourceKey) {
|
|
|
2992
2992
|
target[targetKey] = value;
|
|
2993
2993
|
}
|
|
2994
2994
|
}
|
|
2995
|
+
function normalizeEmailTemplateAttachmentsValue(value) {
|
|
2996
|
+
if (typeof value === "string" || value == null) {
|
|
2997
|
+
return value;
|
|
2998
|
+
}
|
|
2999
|
+
if (Array.isArray(value)) {
|
|
3000
|
+
return value.map((item) => normalizeEmailTemplateAttachmentsValue(item));
|
|
3001
|
+
}
|
|
3002
|
+
if (typeof value !== "object") {
|
|
3003
|
+
return value;
|
|
3004
|
+
}
|
|
3005
|
+
const attachment = { ...value };
|
|
3006
|
+
copyDefinedField(attachment, attachment, "file_url", "fileUrl");
|
|
3007
|
+
delete attachment.fileUrl;
|
|
3008
|
+
return attachment;
|
|
3009
|
+
}
|
|
2995
3010
|
function normalizeAdminEmailTemplatePayload(payload) {
|
|
2996
3011
|
const normalized = { ...payload };
|
|
2997
3012
|
copyDefinedField(normalized, payload, "template_key", "templateKey");
|
|
@@ -3002,6 +3017,17 @@ function normalizeAdminEmailTemplatePayload(payload) {
|
|
|
3002
3017
|
copyDefinedField(normalized, payload, "variable_bindings", "variableBindings");
|
|
3003
3018
|
copyDefinedField(normalized, payload, "attachment_failure_mode", "attachmentFailureMode");
|
|
3004
3019
|
copyDefinedField(normalized, payload, "is_active", "isActive");
|
|
3020
|
+
if (Object.hasOwn(payload, "attachments")) {
|
|
3021
|
+
normalized.attachments = normalizeEmailTemplateAttachmentsValue(payload.attachments);
|
|
3022
|
+
}
|
|
3023
|
+
delete normalized.templateKey;
|
|
3024
|
+
delete normalized.eventType;
|
|
3025
|
+
delete normalized.subjectTemplate;
|
|
3026
|
+
delete normalized.textTemplate;
|
|
3027
|
+
delete normalized.htmlTemplate;
|
|
3028
|
+
delete normalized.variableBindings;
|
|
3029
|
+
delete normalized.attachmentFailureMode;
|
|
3030
|
+
delete normalized.isActive;
|
|
3005
3031
|
return normalized;
|
|
3006
3032
|
}
|
|
3007
3033
|
function toReactEmailTemplateCompatibilityInput(input) {
|
|
@@ -3025,6 +3051,17 @@ function normalizeAdminEmailTemplateSendPayload(payload) {
|
|
|
3025
3051
|
copyDefinedField(normalized, payload, "user_id", "userId");
|
|
3026
3052
|
copyDefinedField(normalized, payload, "organization_id", "organizationId");
|
|
3027
3053
|
copyDefinedField(normalized, payload, "session_token", "sessionToken");
|
|
3054
|
+
copyDefinedField(normalized, payload, "attachment_failure_mode", "attachmentFailureMode");
|
|
3055
|
+
if (Object.hasOwn(payload, "attachments")) {
|
|
3056
|
+
normalized.attachments = normalizeEmailTemplateAttachmentsValue(payload.attachments);
|
|
3057
|
+
}
|
|
3058
|
+
delete normalized.templateId;
|
|
3059
|
+
delete normalized.recipientEmail;
|
|
3060
|
+
delete normalized.renderVariables;
|
|
3061
|
+
delete normalized.userId;
|
|
3062
|
+
delete normalized.organizationId;
|
|
3063
|
+
delete normalized.sessionToken;
|
|
3064
|
+
delete normalized.attachmentFailureMode;
|
|
3028
3065
|
return normalized;
|
|
3029
3066
|
}
|
|
3030
3067
|
function toSessionGuardFailure(sessionResult) {
|