@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/next/server.cjs
CHANGED
|
@@ -162,7 +162,7 @@ var getSessionCookie = (request2, config) => {
|
|
|
162
162
|
|
|
163
163
|
// package.json
|
|
164
164
|
var package_default = {
|
|
165
|
-
version: "2.
|
|
165
|
+
version: "2.11.0"
|
|
166
166
|
};
|
|
167
167
|
|
|
168
168
|
// src/sdk-version.ts
|
|
@@ -1152,6 +1152,21 @@ function copyDefinedField(target, source, targetKey, sourceKey) {
|
|
|
1152
1152
|
target[targetKey] = value;
|
|
1153
1153
|
}
|
|
1154
1154
|
}
|
|
1155
|
+
function normalizeEmailTemplateAttachmentsValue(value) {
|
|
1156
|
+
if (typeof value === "string" || value == null) {
|
|
1157
|
+
return value;
|
|
1158
|
+
}
|
|
1159
|
+
if (Array.isArray(value)) {
|
|
1160
|
+
return value.map((item) => normalizeEmailTemplateAttachmentsValue(item));
|
|
1161
|
+
}
|
|
1162
|
+
if (typeof value !== "object") {
|
|
1163
|
+
return value;
|
|
1164
|
+
}
|
|
1165
|
+
const attachment = { ...value };
|
|
1166
|
+
copyDefinedField(attachment, attachment, "file_url", "fileUrl");
|
|
1167
|
+
delete attachment.fileUrl;
|
|
1168
|
+
return attachment;
|
|
1169
|
+
}
|
|
1155
1170
|
function normalizeAdminEmailTemplatePayload(payload) {
|
|
1156
1171
|
const normalized = { ...payload };
|
|
1157
1172
|
copyDefinedField(normalized, payload, "template_key", "templateKey");
|
|
@@ -1162,6 +1177,17 @@ function normalizeAdminEmailTemplatePayload(payload) {
|
|
|
1162
1177
|
copyDefinedField(normalized, payload, "variable_bindings", "variableBindings");
|
|
1163
1178
|
copyDefinedField(normalized, payload, "attachment_failure_mode", "attachmentFailureMode");
|
|
1164
1179
|
copyDefinedField(normalized, payload, "is_active", "isActive");
|
|
1180
|
+
if (Object.hasOwn(payload, "attachments")) {
|
|
1181
|
+
normalized.attachments = normalizeEmailTemplateAttachmentsValue(payload.attachments);
|
|
1182
|
+
}
|
|
1183
|
+
delete normalized.templateKey;
|
|
1184
|
+
delete normalized.eventType;
|
|
1185
|
+
delete normalized.subjectTemplate;
|
|
1186
|
+
delete normalized.textTemplate;
|
|
1187
|
+
delete normalized.htmlTemplate;
|
|
1188
|
+
delete normalized.variableBindings;
|
|
1189
|
+
delete normalized.attachmentFailureMode;
|
|
1190
|
+
delete normalized.isActive;
|
|
1165
1191
|
return normalized;
|
|
1166
1192
|
}
|
|
1167
1193
|
function toReactEmailTemplateCompatibilityInput(input) {
|
|
@@ -1185,6 +1211,17 @@ function normalizeAdminEmailTemplateSendPayload(payload) {
|
|
|
1185
1211
|
copyDefinedField(normalized, payload, "user_id", "userId");
|
|
1186
1212
|
copyDefinedField(normalized, payload, "organization_id", "organizationId");
|
|
1187
1213
|
copyDefinedField(normalized, payload, "session_token", "sessionToken");
|
|
1214
|
+
copyDefinedField(normalized, payload, "attachment_failure_mode", "attachmentFailureMode");
|
|
1215
|
+
if (Object.hasOwn(payload, "attachments")) {
|
|
1216
|
+
normalized.attachments = normalizeEmailTemplateAttachmentsValue(payload.attachments);
|
|
1217
|
+
}
|
|
1218
|
+
delete normalized.templateId;
|
|
1219
|
+
delete normalized.recipientEmail;
|
|
1220
|
+
delete normalized.renderVariables;
|
|
1221
|
+
delete normalized.userId;
|
|
1222
|
+
delete normalized.organizationId;
|
|
1223
|
+
delete normalized.sessionToken;
|
|
1224
|
+
delete normalized.attachmentFailureMode;
|
|
1188
1225
|
return normalized;
|
|
1189
1226
|
}
|
|
1190
1227
|
function toSessionGuardFailure(sessionResult) {
|