@infrab4a/connect 3.9.0-beta.10 → 3.9.0-beta.3

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,16 +1,14 @@
1
1
  import { BaseModel } from '../../../domain';
2
2
  import { ElasticSearchResult } from '../types/elastic-search-result';
3
- import { ElasticSearchAdapter } from './elastic-search.adapter';
4
3
  export declare type AxiosElasticSearchConfig = {
5
4
  url: string;
6
5
  credential: string;
7
6
  };
8
- export declare class AxiosAdapter<T extends BaseModel<T>> implements ElasticSearchAdapter {
7
+ export declare class AxiosAdapter<T extends BaseModel<T>> {
9
8
  private readonly config;
10
9
  constructor(config: AxiosElasticSearchConfig);
11
10
  get(index: string, id: string): Promise<Partial<T>>;
12
11
  query(index: string, query: any): Promise<ElasticSearchResult<Partial<T>>>;
13
12
  save(index: string, data: Partial<T>): Promise<void>;
14
- update(index: string, id: string, data: Partial<T>): Promise<void>;
15
- delete(index: string, id: string): Promise<void>;
13
+ delete(index: string): Promise<void>;
16
14
  }
@@ -3,12 +3,10 @@ import { ProductHasuraGraphQL } from '../../hasura-graphql';
3
3
  import { AxiosAdapter } from '../adapters';
4
4
  export declare class ProductsIndex {
5
5
  private readonly adapter;
6
- private index;
7
6
  constructor(adapter: AxiosAdapter<Product>);
8
- getById(id: string): Promise<Product>;
9
- getByAlloyId(id: string): Promise<Product>;
10
- search(searchTerm: string, total: number, shop: string): Promise<import("@infrab4a/connect").ElasticSearchResult<Partial<Product>>>;
7
+ get(id: string): Promise<Product>;
8
+ search(searchTerm: string): Promise<import("@infrab4a/connect").ElasticSearchResult<Partial<Product>>>;
11
9
  save(product: ProductHasuraGraphQL): Promise<void>;
12
- update(product: ProductHasuraGraphQL): Promise<void>;
10
+ update(product: ProductHasuraGraphQL): void;
13
11
  delete(id: string): Promise<void>;
14
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "3.9.0-beta.10",
3
+ "version": "3.9.0-beta.3",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxhc3RpYy1zZWFyY2guYWRhcHRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nvbm5lY3Qvc3JjL2luZnJhL2VsYXN0aWNzZWFyY2gvYWRhcHRlcnMvZWxhc3RpYy1zZWFyY2guYWRhcHRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRWxhc3RpY1NlYXJjaFJlc3VsdCB9IGZyb20gJy4uL3R5cGVzL2VsYXN0aWMtc2VhcmNoLXJlc3VsdCdcclxuXHJcbmV4cG9ydCBpbnRlcmZhY2UgRWxhc3RpY1NlYXJjaEFkYXB0ZXI8VCA9IGFueT4ge1xyXG4gIGdldChpbmRleDogc3RyaW5nLCBpZDogc3RyaW5nKTogUHJvbWlzZTxUPlxyXG4gIHF1ZXJ5KGluZGV4OiBzdHJpbmcsIHF1ZXJ5OiBhbnkpOiBQcm9taXNlPEVsYXN0aWNTZWFyY2hSZXN1bHQ8VD4+XHJcbiAgc2F2ZShpbmRleDogc3RyaW5nLCBkYXRhOiBQYXJ0aWFsPFQ+KTogUHJvbWlzZTx2b2lkPlxyXG4gIHVwZGF0ZShpbmRleDogc3RyaW5nLCBpZDogc3RyaW5nLCBkYXRhOiBQYXJ0aWFsPFQ+KTogUHJvbWlzZTx2b2lkPlxyXG4gIGRlbGV0ZShpbmRleDogc3RyaW5nLCBpZDogc3RyaW5nKTogUHJvbWlzZTx2b2lkPlxyXG59XHJcbiJdfQ==
@@ -1,8 +0,0 @@
1
- import { ElasticSearchResult } from '../types/elastic-search-result';
2
- export interface ElasticSearchAdapter<T = any> {
3
- get(index: string, id: string): Promise<T>;
4
- query(index: string, query: any): Promise<ElasticSearchResult<T>>;
5
- save(index: string, data: Partial<T>): Promise<void>;
6
- update(index: string, id: string, data: Partial<T>): Promise<void>;
7
- delete(index: string, id: string): Promise<void>;
8
- }