@infrab4a/connect 4.7.0-beta.0 → 4.7.0-beta.1

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/index.cjs.js CHANGED
@@ -5661,13 +5661,15 @@ class ProductStockNotificationHasuraGraphQLRepository extends withCrudHasuraGrap
5661
5661
  fields: [
5662
5662
  'id',
5663
5663
  { productId: { columnName: 'product_id' } },
5664
+ 'name',
5664
5665
  'email',
5666
+ 'shop',
5665
5667
  { createdAt: { columnName: 'created_at' } },
5666
5668
  { updatedAt: { columnName: 'updated_at' } },
5667
5669
  ],
5668
5670
  });
5669
5671
  }
5670
- async addCustomerEmail(productId, email) {
5672
+ async addCustomerEmail(shop, productId, name, email) {
5671
5673
  const notification = await this.find({
5672
5674
  filters: {
5673
5675
  productId,
@@ -5676,7 +5678,9 @@ class ProductStockNotificationHasuraGraphQLRepository extends withCrudHasuraGrap
5676
5678
  }).then((data) => data.data.shift());
5677
5679
  if (!notification)
5678
5680
  this.create({
5681
+ shop,
5679
5682
  productId,
5683
+ name,
5680
5684
  email,
5681
5685
  });
5682
5686
  }
package/index.esm.js CHANGED
@@ -5637,13 +5637,15 @@ class ProductStockNotificationHasuraGraphQLRepository extends withCrudHasuraGrap
5637
5637
  fields: [
5638
5638
  'id',
5639
5639
  { productId: { columnName: 'product_id' } },
5640
+ 'name',
5640
5641
  'email',
5642
+ 'shop',
5641
5643
  { createdAt: { columnName: 'created_at' } },
5642
5644
  { updatedAt: { columnName: 'updated_at' } },
5643
5645
  ],
5644
5646
  });
5645
5647
  }
5646
- async addCustomerEmail(productId, email) {
5648
+ async addCustomerEmail(shop, productId, name, email) {
5647
5649
  const notification = await this.find({
5648
5650
  filters: {
5649
5651
  productId,
@@ -5652,7 +5654,9 @@ class ProductStockNotificationHasuraGraphQLRepository extends withCrudHasuraGrap
5652
5654
  }).then((data) => data.data.shift());
5653
5655
  if (!notification)
5654
5656
  this.create({
5657
+ shop,
5655
5658
  productId,
5659
+ name,
5656
5660
  email,
5657
5661
  });
5658
5662
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "4.7.0-beta.0",
3
+ "version": "4.7.0-beta.1",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -1,8 +1,11 @@
1
1
  import { BaseModel, GenericIdentifier } from '../../generic/model';
2
+ import { Shops } from './enums';
2
3
  export declare class ProductStockNotification extends BaseModel<ProductStockNotification> {
3
4
  id: number;
4
5
  productId: string;
6
+ name: string;
5
7
  email: string;
8
+ shop: Shops;
6
9
  createdAt?: Date;
7
10
  updatedAt?: Date;
8
11
  static get identifiersFields(): GenericIdentifier[];
@@ -1,5 +1,5 @@
1
1
  import { CrudRepository } from '../../generic/repository/crud.repository';
2
- import { ProductStockNotification } from '../models';
2
+ import { ProductStockNotification, Shops } from '../models';
3
3
  export interface ProductStockNotificationRepository extends CrudRepository<ProductStockNotification> {
4
- addCustomerEmail(productId: string, email: string): Promise<void>;
4
+ addCustomerEmail(shop: Shops, productId: string, name: string, email: string): Promise<void>;
5
5
  }
@@ -1,4 +1,4 @@
1
- import { Filter, ProductStockNotification } from '../../../../domain';
1
+ import { Filter, ProductStockNotification, Shops } from '../../../../domain';
2
2
  import { ProductStockNotificationRepository } from '../../../../domain/catalog/repositories';
3
3
  import { HasuraConstructorParams } from '../../mixins';
4
4
  declare const ProductStockNotificationHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../..").GraphQLRepository<ProductStockNotification> & import("../../../../domain").CrudRepository<ProductStockNotification, import("../../../../domain").CrudParams<ProductStockNotification>> & import("../../../../domain").UpdateRepository<ProductStockNotification, import("../../../../domain").RepositoryUpdateParams<ProductStockNotification>> & {
@@ -6,6 +6,6 @@ declare const ProductStockNotificationHasuraGraphQLRepository_base: import("../.
6
6
  }, [HasuraConstructorParams<ProductStockNotification> & import("../../mixins").CreateConstructorParams & import("../../mixins").DeleteConstructorParams & import("../../mixins").GetConstructorParams & import("../../mixins").UpdateConstructorParams, ...any[]]>;
7
7
  export declare class ProductStockNotificationHasuraGraphQLRepository extends ProductStockNotificationHasuraGraphQLRepository_base implements ProductStockNotificationRepository {
8
8
  constructor({ endpoint, authOptions, interceptors, }: Pick<HasuraConstructorParams<Filter>, 'endpoint' | 'authOptions' | 'interceptors'>);
9
- addCustomerEmail(productId: string, email: string): Promise<void>;
9
+ addCustomerEmail(shop: Shops, productId: string, name: string, email: string): Promise<void>;
10
10
  }
11
11
  export {};