@infrab4a/connect 4.15.0 → 4.15.2-beta.0

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
@@ -6262,6 +6262,12 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6262
6262
  options: {
6263
6263
  enableCount: false,
6264
6264
  },
6265
+ orderBy: {
6266
+ id: 'asc',
6267
+ },
6268
+ limits: {
6269
+ limit: 1,
6270
+ },
6265
6271
  });
6266
6272
  if (!data.length)
6267
6273
  throw new NotFoundError(`Wishlists from person ${personId} not found`);
@@ -6506,6 +6512,9 @@ class VertexAxiosAdapter {
6506
6512
  throw error;
6507
6513
  }
6508
6514
  }
6515
+ bulkProducts(products) {
6516
+ return;
6517
+ }
6509
6518
  }
6510
6519
 
6511
6520
  class ProductsVertexSearch {
package/index.esm.js CHANGED
@@ -6256,6 +6256,12 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
6256
6256
  options: {
6257
6257
  enableCount: false,
6258
6258
  },
6259
+ orderBy: {
6260
+ id: 'asc',
6261
+ },
6262
+ limits: {
6263
+ limit: 1,
6264
+ },
6259
6265
  });
6260
6266
  if (!data.length)
6261
6267
  throw new NotFoundError(`Wishlists from person ${personId} not found`);
@@ -6500,6 +6506,9 @@ class VertexAxiosAdapter {
6500
6506
  throw error;
6501
6507
  }
6502
6508
  }
6509
+ bulkProducts(products) {
6510
+ return;
6511
+ }
6503
6512
  }
6504
6513
 
6505
6514
  class ProductsVertexSearch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "4.15.0",
3
+ "version": "4.15.2-beta.0",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -2,7 +2,7 @@ import { CrudRepository } from '../../generic/repository/crud.repository';
2
2
  import { Product } from '../models';
3
3
  import { Category } from '../models/category';
4
4
  import { Shops } from '../models/enums/shops.enum';
5
- export interface CategoryRepository extends CrudRepository<Category> {
5
+ export interface CategoryRepository<T extends Category = Category> extends CrudRepository<T> {
6
6
  getCategoryBySlug(slug: string, shop: Shops): Promise<Category>;
7
7
  getCategoryByShop(shop: string): Promise<Category[]>;
8
8
  getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): Promise<{
@@ -2,7 +2,7 @@ import { CategoryRepository } from '.';
2
2
  import { FindRepositoryParams, RepositoryFindResult } from '../../generic';
3
3
  import { Shops } from '../models';
4
4
  import { Wishlist } from '../models/wishlist';
5
- export interface WishlistRepository extends CategoryRepository {
5
+ export interface WishlistRepository extends CategoryRepository<Wishlist> {
6
6
  getWishlistBySlug(slug: string): Promise<Wishlist>;
7
7
  getWishlistByPerson(personId: string): Promise<Wishlist[]>;
8
8
  findBfluOrGlamgirlWishlists(params: FindRepositoryParams<Wishlist>, shops: Shops[]): Promise<RepositoryFindResult<Wishlist>>;
@@ -1,9 +1,10 @@
1
1
  import { Product } from '../../../domain';
2
- import { ProductSearch } from '../types';
2
+ import { ProductBulk } from '../types';
3
3
  export interface VertexSearchAdapter<T> {
4
- query(searchTerm: string, total: number, gender?: String): Promise<ProductSearch[]>;
4
+ query(searchTerm: string, total: number, gender?: String): Promise<T[]>;
5
5
  get(id: string): Promise<T>;
6
6
  save(data: Product): Promise<any>;
7
7
  update(id: string, data: Product): Promise<any>;
8
8
  delete(id: string): Promise<void>;
9
+ bulkProducts(products: ProductBulk[]): Promise<void>;
9
10
  }
@@ -1,5 +1,5 @@
1
1
  import { Product } from '../../../domain';
2
- import { ProductSearch } from '../types';
2
+ import { ProductBulk, ProductSearch } from '../types';
3
3
  import { VertexSearchConfig } from '../types/axios-vertex-search-config';
4
4
  import { VertexSearchAdapter } from './vertex-ai-search.adapter';
5
5
  export declare class VertexAxiosAdapter implements VertexSearchAdapter<ProductSearch> {
@@ -11,4 +11,5 @@ export declare class VertexAxiosAdapter implements VertexSearchAdapter<ProductSe
11
11
  save(data: Product): Promise<any>;
12
12
  update(id: string, data: Product): Promise<any>;
13
13
  delete(id: string): Promise<void>;
14
+ bulkProducts(products: ProductBulk[]): Promise<void>;
14
15
  }
@@ -1,2 +1,3 @@
1
1
  export * from './axios-vertex-search-config';
2
+ export * from './product-bulk';
2
3
  export * from './product-search';
@@ -0,0 +1,4 @@
1
+ export type ProductBulk = {
2
+ id: string;
3
+ jsonData: string;
4
+ };