@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.
@@ -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(input),
22683
+ ...normalizeAddresses(transformedInput),
22685
22684
  };
22686
22685
  await this.provider.sendTemplatedEmail(normalizedInput, template);
22687
22686
  await this.logger.logTemplatedEmail(normalizedInput);