@infrab4a/connect 1.0.0-beta.20 → 1.0.0-beta.22

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.
@@ -1,9 +1,11 @@
1
1
  import { FirebaseFirestore } from '@firebase/firestore-types';
2
- import { Product, ProductRepository, Shops } from '../../../../../domain';
2
+ import { Product, ProductRepository, ReviewStatusParams, ReviewWithProductData, Shops } from '../../../../../domain';
3
3
  declare const ProductFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("@infrab4a/connect").FirestoreRepository<Product> & import("../../../../../domain").CrudRepository<Product, import("../../../../../domain").CrudParams<Product>> & import("@infrab4a/connect").FirestoreHelpers, never>;
4
4
  export declare class ProductFirestoreRepository extends ProductFirestoreRepository_base implements ProductRepository {
5
5
  readonly firestore: FirebaseFirestore;
6
+ private reviews;
6
7
  constructor(firestore: FirebaseFirestore);
7
8
  getBySlug(slug: string, shop: Shops): Promise<Product>;
9
+ fetchReviews(status: ReviewStatusParams): Promise<ReviewWithProductData[]>;
8
10
  }
9
11
  export {};
@@ -1,4 +1,4 @@
1
- import { CreateRepositoryParams, GetRepositoryParams, ProductRepository, Shops, UpdateRepositoryParams } from '../../../../domain';
1
+ import { CreateRepositoryParams, GetRepositoryParams, ProductRepository, ReviewStatusParams, ReviewWithProductData, Shops, UpdateRepositoryParams } from '../../../../domain';
2
2
  import { ProductHasuraGraphQL } from '../../models';
3
3
  import { HasuraGraphQLAuthOptions } from '../../types';
4
4
  declare const ProductHasuraGraphQLRepository_base: import("../../../../utils").MixinCtor<import("../../types").GraphQLRepository<ProductHasuraGraphQL> & import("../../../../domain").CrudRepository<ProductHasuraGraphQL, import("../../../../domain").CrudParams<ProductHasuraGraphQL>> & import("../../../../domain").UpdateRepository<ProductHasuraGraphQL, import("../../../../domain").RepositoryUpdateParams<ProductHasuraGraphQL>> & {
@@ -11,6 +11,7 @@ export declare class ProductHasuraGraphQLRepository extends ProductHasuraGraphQL
11
11
  get(identifiers: GetRepositoryParams<ProductHasuraGraphQL>): Promise<ProductHasuraGraphQL>;
12
12
  getBySlug(slug: string, shop: Shops): Promise<ProductHasuraGraphQL>;
13
13
  update(params: UpdateRepositoryParams<ProductHasuraGraphQL>): Promise<ProductHasuraGraphQL>;
14
+ fetchReviews(status: ReviewStatusParams): Promise<ReviewWithProductData[]>;
14
15
  private updateCategories;
15
16
  private updateKitProducts;
16
17
  private updateReviews;
@@ -28,7 +28,7 @@ export declare type AggregateOptions<Model> = {
28
28
  variance?: Array<AggregateOptionFields<Model, number>>;
29
29
  };
30
30
  export declare type HasuraGraphQLFields<Model> = ((Model extends ModelBaseStructure ? NonFunctionAndIdentifierPropertyNames<Model> | {
31
- [key in NonFunctionAndIdentifierPropertyNames<Model>]?: PropType<Model, key> extends ModelBaseStructure ? HasuraGraphQLFields<PropType<Model, key>> : never;
31
+ [key in NonFunctionAndIdentifierPropertyNames<Model>]?: PropType<Model, key> extends ModelBaseStructure ? HasuraGraphQLFields<PropType<Model, key>> : PropType<Model, key> extends any[] ? PropType<Model, key>[] extends ModelBaseStructure[] ? HasuraGraphQLFields<PropType<Model, key>[]> : never : never;
32
32
  } | {
33
33
  [key in NonFunctionAndIdentifierPropertyNames<Model>]?: key extends 'aggregate' ? never : PropType<Model, key> extends ModelBaseStructure ? ColumnOptions<PropType<Model, key>, Model> : ColumnOptions<PropType<Model, key>, Model>;
34
34
  } : string) | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "1.0.0-beta.20",
3
+ "version": "1.0.0-beta.22",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },