@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.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { an as AthenaAuthSessionResponse, bI as AthenaClientSessionLike, cA as AthenaSdkClientWithStorage, cz as AthenaSdkClientWithAuth } from '../client-
|
|
2
|
-
import { A as AthenaAdapterBaseOptions, b as AthenaServerRequestOptions, a as AthenaAdapterExperimentalOptions } from '../shared-
|
|
1
|
+
import { an as AthenaAuthSessionResponse, bI as AthenaClientSessionLike, cA as AthenaSdkClientWithStorage, cz as AthenaSdkClientWithAuth } from '../client-WqBuu60O.cjs';
|
|
2
|
+
import { A as AthenaAdapterBaseOptions, b as AthenaServerRequestOptions, a as AthenaAdapterExperimentalOptions } from '../shared-B1ueL-Ox.cjs';
|
|
3
3
|
import '../types-BeZIHduP.cjs';
|
|
4
4
|
|
|
5
5
|
interface AthenaServerClientOptions extends AthenaAdapterBaseOptions, AthenaServerRequestOptions {
|
package/dist/next/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { an as AthenaAuthSessionResponse, bI as AthenaClientSessionLike, cA as AthenaSdkClientWithStorage, cz as AthenaSdkClientWithAuth } from '../client-
|
|
2
|
-
import { A as AthenaAdapterBaseOptions, b as AthenaServerRequestOptions, a as AthenaAdapterExperimentalOptions } from '../shared-
|
|
1
|
+
import { an as AthenaAuthSessionResponse, bI as AthenaClientSessionLike, cA as AthenaSdkClientWithStorage, cz as AthenaSdkClientWithAuth } from '../client-DD_UeF3Q.js';
|
|
2
|
+
import { A as AthenaAdapterBaseOptions, b as AthenaServerRequestOptions, a as AthenaAdapterExperimentalOptions } from '../shared-GPAprhBb.js';
|
|
3
3
|
import '../types-BeZIHduP.js';
|
|
4
4
|
|
|
5
5
|
interface AthenaServerClientOptions extends AthenaAdapterBaseOptions, AthenaServerRequestOptions {
|
package/dist/next/server.js
CHANGED
|
@@ -160,7 +160,7 @@ var getSessionCookie = (request2, config) => {
|
|
|
160
160
|
|
|
161
161
|
// package.json
|
|
162
162
|
var package_default = {
|
|
163
|
-
version: "2.
|
|
163
|
+
version: "2.11.0"
|
|
164
164
|
};
|
|
165
165
|
|
|
166
166
|
// src/sdk-version.ts
|
|
@@ -1150,6 +1150,21 @@ function copyDefinedField(target, source, targetKey, sourceKey) {
|
|
|
1150
1150
|
target[targetKey] = value;
|
|
1151
1151
|
}
|
|
1152
1152
|
}
|
|
1153
|
+
function normalizeEmailTemplateAttachmentsValue(value) {
|
|
1154
|
+
if (typeof value === "string" || value == null) {
|
|
1155
|
+
return value;
|
|
1156
|
+
}
|
|
1157
|
+
if (Array.isArray(value)) {
|
|
1158
|
+
return value.map((item) => normalizeEmailTemplateAttachmentsValue(item));
|
|
1159
|
+
}
|
|
1160
|
+
if (typeof value !== "object") {
|
|
1161
|
+
return value;
|
|
1162
|
+
}
|
|
1163
|
+
const attachment = { ...value };
|
|
1164
|
+
copyDefinedField(attachment, attachment, "file_url", "fileUrl");
|
|
1165
|
+
delete attachment.fileUrl;
|
|
1166
|
+
return attachment;
|
|
1167
|
+
}
|
|
1153
1168
|
function normalizeAdminEmailTemplatePayload(payload) {
|
|
1154
1169
|
const normalized = { ...payload };
|
|
1155
1170
|
copyDefinedField(normalized, payload, "template_key", "templateKey");
|
|
@@ -1160,6 +1175,17 @@ function normalizeAdminEmailTemplatePayload(payload) {
|
|
|
1160
1175
|
copyDefinedField(normalized, payload, "variable_bindings", "variableBindings");
|
|
1161
1176
|
copyDefinedField(normalized, payload, "attachment_failure_mode", "attachmentFailureMode");
|
|
1162
1177
|
copyDefinedField(normalized, payload, "is_active", "isActive");
|
|
1178
|
+
if (Object.hasOwn(payload, "attachments")) {
|
|
1179
|
+
normalized.attachments = normalizeEmailTemplateAttachmentsValue(payload.attachments);
|
|
1180
|
+
}
|
|
1181
|
+
delete normalized.templateKey;
|
|
1182
|
+
delete normalized.eventType;
|
|
1183
|
+
delete normalized.subjectTemplate;
|
|
1184
|
+
delete normalized.textTemplate;
|
|
1185
|
+
delete normalized.htmlTemplate;
|
|
1186
|
+
delete normalized.variableBindings;
|
|
1187
|
+
delete normalized.attachmentFailureMode;
|
|
1188
|
+
delete normalized.isActive;
|
|
1163
1189
|
return normalized;
|
|
1164
1190
|
}
|
|
1165
1191
|
function toReactEmailTemplateCompatibilityInput(input) {
|
|
@@ -1183,6 +1209,17 @@ function normalizeAdminEmailTemplateSendPayload(payload) {
|
|
|
1183
1209
|
copyDefinedField(normalized, payload, "user_id", "userId");
|
|
1184
1210
|
copyDefinedField(normalized, payload, "organization_id", "organizationId");
|
|
1185
1211
|
copyDefinedField(normalized, payload, "session_token", "sessionToken");
|
|
1212
|
+
copyDefinedField(normalized, payload, "attachment_failure_mode", "attachmentFailureMode");
|
|
1213
|
+
if (Object.hasOwn(payload, "attachments")) {
|
|
1214
|
+
normalized.attachments = normalizeEmailTemplateAttachmentsValue(payload.attachments);
|
|
1215
|
+
}
|
|
1216
|
+
delete normalized.templateId;
|
|
1217
|
+
delete normalized.recipientEmail;
|
|
1218
|
+
delete normalized.renderVariables;
|
|
1219
|
+
delete normalized.userId;
|
|
1220
|
+
delete normalized.organizationId;
|
|
1221
|
+
delete normalized.sessionToken;
|
|
1222
|
+
delete normalized.attachmentFailureMode;
|
|
1186
1223
|
return normalized;
|
|
1187
1224
|
}
|
|
1188
1225
|
function toSessionGuardFailure(sessionResult) {
|