@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
|
@@ -744,6 +744,8 @@ interface AthenaAdminEmailTemplateSendRequest {
|
|
|
744
744
|
user_id?: string;
|
|
745
745
|
organization_id?: string;
|
|
746
746
|
session_token?: string;
|
|
747
|
+
attachments?: string | AthenaAuthEmailTemplateAttachment | AthenaAuthEmailTemplateAttachment[];
|
|
748
|
+
attachment_failure_mode?: 'fail' | 'skip';
|
|
747
749
|
metadata?: AthenaAuthLooseRecord;
|
|
748
750
|
}
|
|
749
751
|
interface AthenaAdminEmailTemplateSendResponse {
|
|
@@ -744,6 +744,8 @@ interface AthenaAdminEmailTemplateSendRequest {
|
|
|
744
744
|
user_id?: string;
|
|
745
745
|
organization_id?: string;
|
|
746
746
|
session_token?: string;
|
|
747
|
+
attachments?: string | AthenaAuthEmailTemplateAttachment | AthenaAuthEmailTemplateAttachment[];
|
|
748
|
+
attachment_failure_mode?: 'fail' | 'skip';
|
|
747
749
|
metadata?: AthenaAuthLooseRecord;
|
|
748
750
|
}
|
|
749
751
|
interface AthenaAdminEmailTemplateSendResponse {
|
package/dist/index.cjs
CHANGED
|
@@ -806,7 +806,7 @@ var getCookieCache = async (request2, config) => {
|
|
|
806
806
|
|
|
807
807
|
// package.json
|
|
808
808
|
var package_default = {
|
|
809
|
-
version: "2.
|
|
809
|
+
version: "2.11.0"
|
|
810
810
|
};
|
|
811
811
|
|
|
812
812
|
// src/sdk-version.ts
|
|
@@ -1867,6 +1867,21 @@ function copyDefinedField(target, source, targetKey, sourceKey) {
|
|
|
1867
1867
|
target[targetKey] = value;
|
|
1868
1868
|
}
|
|
1869
1869
|
}
|
|
1870
|
+
function normalizeEmailTemplateAttachmentsValue(value) {
|
|
1871
|
+
if (typeof value === "string" || value == null) {
|
|
1872
|
+
return value;
|
|
1873
|
+
}
|
|
1874
|
+
if (Array.isArray(value)) {
|
|
1875
|
+
return value.map((item) => normalizeEmailTemplateAttachmentsValue(item));
|
|
1876
|
+
}
|
|
1877
|
+
if (typeof value !== "object") {
|
|
1878
|
+
return value;
|
|
1879
|
+
}
|
|
1880
|
+
const attachment = { ...value };
|
|
1881
|
+
copyDefinedField(attachment, attachment, "file_url", "fileUrl");
|
|
1882
|
+
delete attachment.fileUrl;
|
|
1883
|
+
return attachment;
|
|
1884
|
+
}
|
|
1870
1885
|
function normalizeAdminEmailTemplatePayload(payload) {
|
|
1871
1886
|
const normalized = { ...payload };
|
|
1872
1887
|
copyDefinedField(normalized, payload, "template_key", "templateKey");
|
|
@@ -1877,6 +1892,17 @@ function normalizeAdminEmailTemplatePayload(payload) {
|
|
|
1877
1892
|
copyDefinedField(normalized, payload, "variable_bindings", "variableBindings");
|
|
1878
1893
|
copyDefinedField(normalized, payload, "attachment_failure_mode", "attachmentFailureMode");
|
|
1879
1894
|
copyDefinedField(normalized, payload, "is_active", "isActive");
|
|
1895
|
+
if (Object.hasOwn(payload, "attachments")) {
|
|
1896
|
+
normalized.attachments = normalizeEmailTemplateAttachmentsValue(payload.attachments);
|
|
1897
|
+
}
|
|
1898
|
+
delete normalized.templateKey;
|
|
1899
|
+
delete normalized.eventType;
|
|
1900
|
+
delete normalized.subjectTemplate;
|
|
1901
|
+
delete normalized.textTemplate;
|
|
1902
|
+
delete normalized.htmlTemplate;
|
|
1903
|
+
delete normalized.variableBindings;
|
|
1904
|
+
delete normalized.attachmentFailureMode;
|
|
1905
|
+
delete normalized.isActive;
|
|
1880
1906
|
return normalized;
|
|
1881
1907
|
}
|
|
1882
1908
|
function toReactEmailTemplateCompatibilityInput(input) {
|
|
@@ -1900,6 +1926,17 @@ function normalizeAdminEmailTemplateSendPayload(payload) {
|
|
|
1900
1926
|
copyDefinedField(normalized, payload, "user_id", "userId");
|
|
1901
1927
|
copyDefinedField(normalized, payload, "organization_id", "organizationId");
|
|
1902
1928
|
copyDefinedField(normalized, payload, "session_token", "sessionToken");
|
|
1929
|
+
copyDefinedField(normalized, payload, "attachment_failure_mode", "attachmentFailureMode");
|
|
1930
|
+
if (Object.hasOwn(payload, "attachments")) {
|
|
1931
|
+
normalized.attachments = normalizeEmailTemplateAttachmentsValue(payload.attachments);
|
|
1932
|
+
}
|
|
1933
|
+
delete normalized.templateId;
|
|
1934
|
+
delete normalized.recipientEmail;
|
|
1935
|
+
delete normalized.renderVariables;
|
|
1936
|
+
delete normalized.userId;
|
|
1937
|
+
delete normalized.organizationId;
|
|
1938
|
+
delete normalized.sessionToken;
|
|
1939
|
+
delete normalized.attachmentFailureMode;
|
|
1903
1940
|
return normalized;
|
|
1904
1941
|
}
|
|
1905
1942
|
function toSessionGuardFailure(sessionResult) {
|