@punks/backend-entity-manager 0.0.386 → 0.0.388
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/dist/cjs/index.js +2 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/abstractions/serializer.d.ts +4 -0
- package/dist/cjs/types/platforms/nest/services/email/utils.d.ts +1 -1
- package/dist/esm/index.js +2 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/abstractions/serializer.d.ts +4 -0
- package/dist/esm/types/platforms/nest/services/email/utils.d.ts +1 -1
- package/dist/index.d.ts +4 -0
- package/package.json +3 -3
|
@@ -42,8 +42,12 @@ export type EntitySerializerColumnDefinition<TSheetItem> = {
|
|
|
42
42
|
array?: boolean;
|
|
43
43
|
arraySeparator?: string;
|
|
44
44
|
};
|
|
45
|
+
export type EntitySerializerSheetOptions = {
|
|
46
|
+
name?: string;
|
|
47
|
+
};
|
|
45
48
|
export type EntitySerializerSheetDefinition<TSheetItem> = {
|
|
46
49
|
columns: EntitySerializerColumnDefinition<TSheetItem>[];
|
|
50
|
+
sheet?: EntitySerializerSheetOptions;
|
|
47
51
|
};
|
|
48
52
|
export type EntityExportFile = {
|
|
49
53
|
content: Buffer;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TemplatedEmailInput } from "../../../../abstractions";
|
|
2
|
-
export declare const normalizeAddresses: <TPayload>(input: TemplatedEmailInput<TPayload>) => TemplatedEmailInput<TPayload
|
|
2
|
+
export declare const normalizeAddresses: <TPayload>(input: TemplatedEmailInput<TPayload>) => Partial<TemplatedEmailInput<TPayload>>;
|
package/dist/esm/index.js
CHANGED
|
@@ -332,7 +332,7 @@ class EntitySerializer {
|
|
|
332
332
|
contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
333
333
|
content: Buffer.from(excelBuild({
|
|
334
334
|
data: [{}],
|
|
335
|
-
sheetName: this.entityName,
|
|
335
|
+
sheetName: definition?.sheet?.name ?? this.entityName,
|
|
336
336
|
columns: [
|
|
337
337
|
...(this.options?.useTypeColumn
|
|
338
338
|
? [
|
|
@@ -22656,7 +22656,6 @@ const normalizeAddressField = (values, invalidValues) => {
|
|
|
22656
22656
|
};
|
|
22657
22657
|
const normalizeAddresses = (input) => {
|
|
22658
22658
|
return {
|
|
22659
|
-
...input,
|
|
22660
22659
|
to: normalizeAddressField(input.to, []),
|
|
22661
22660
|
cc: normalizeAddressField(input.cc, [...(input.to ?? [])]),
|
|
22662
22661
|
bcc: normalizeAddressField(input.bcc, [
|
|
@@ -22681,7 +22680,7 @@ let EmailService = class EmailService {
|
|
|
22681
22680
|
const transformedInput = (await this.templateMiddleware?.processInput(sendInput)) ?? sendInput;
|
|
22682
22681
|
const normalizedInput = {
|
|
22683
22682
|
...transformedInput,
|
|
22684
|
-
...normalizeAddresses(
|
|
22683
|
+
...normalizeAddresses(transformedInput),
|
|
22685
22684
|
};
|
|
22686
22685
|
await this.provider.sendTemplatedEmail(normalizedInput, template);
|
|
22687
22686
|
await this.logger.logTemplatedEmail(normalizedInput);
|