@punks/backend-entity-manager 0.0.469 → 0.0.470

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.
@@ -31,7 +31,7 @@ export declare class EntityNotFoundException<TEntityId> extends EntityManagerExc
31
31
  getEntityType(): string | undefined;
32
32
  }
33
33
  export declare class MultipleEntitiesFoundException extends EntityManagerException {
34
- constructor();
34
+ constructor(params: object, items: any[]);
35
35
  }
36
36
  export declare class EntityManagerConfigurationError extends EntityManagerException {
37
37
  constructor(message: string);
package/dist/esm/index.js CHANGED
@@ -109,8 +109,10 @@ class EntityNotFoundException extends EntityManagerException {
109
109
  }
110
110
  }
111
111
  class MultipleEntitiesFoundException extends EntityManagerException {
112
- constructor() {
113
- super("Multiple entities found");
112
+ constructor(params, items) {
113
+ super(`Multiple entities found: ${items
114
+ .map((item) => item.id)
115
+ .join(", ")} - params: ${JSON.stringify(params)}`);
114
116
  }
115
117
  }
116
118
  class EntityManagerConfigurationError extends EntityManagerException {
@@ -1248,7 +1250,7 @@ class EntitiesUpsertByCommand {
1248
1250
  };
1249
1251
  }
1250
1252
  if (items.length > 1) {
1251
- throw new Error("Multiple items found");
1253
+ throw new MultipleEntitiesFoundException(params, items);
1252
1254
  }
1253
1255
  // todo: parametrize id field
1254
1256
  const id = items[0].id;
@@ -41303,9 +41305,6 @@ let SendgridEmailProvider = class SendgridEmailProvider {
41303
41305
  : {}),
41304
41306
  ...(options?.forceDelivery || sendgridSettings.value.forceDelivery
41305
41307
  ? {
41306
- bypassListManagement: {
41307
- enable: true,
41308
- },
41309
41308
  bypassBounceManagement: {
41310
41309
  enable: true,
41311
41310
  },
@@ -41377,9 +41376,6 @@ let SendgridEmailProvider = class SendgridEmailProvider {
41377
41376
  : {}),
41378
41377
  ...(options?.forceDelivery || sendgridSettings.value.forceDelivery
41379
41378
  ? {
41380
- // bypassListManagement: {
41381
- // enable: true,
41382
- // },
41383
41379
  bypassBounceManagement: {
41384
41380
  enable: true,
41385
41381
  },