@wenex/sdk 1.3.7 → 1.3.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenex/sdk",
3
- "version": "1.3.7",
3
+ "version": "1.3.11",
4
4
  "description": "Wenex SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,14 +1,9 @@
1
1
  import type { AxiosInstance } from 'axios';
2
- import { Data } from '../../common/core/interfaces';
3
2
  import { RestfulService } from '../../common/core/classes';
4
- import { Filter } from '../../common/core/interfaces/mongo';
5
- import { Post, PostDto } from '../../common/interfaces/content';
6
- import { RequestConfig, ResponseType } from '../../common/core/types';
7
- import { SearchRequest, SearchResponse } from '../../common/core/interfaces/elastic';
8
- export declare class PostsService<Properties extends object = object> extends RestfulService<Post<Properties>, PostDto<Properties>> {
3
+ import { Note, NoteDto } from '../../common/interfaces/content';
4
+ export declare class PostsService<Properties extends object = object> extends RestfulService<Note<Properties>, NoteDto<Properties>> {
9
5
  protected readonly axios: AxiosInstance;
10
6
  protected readonly pathPrefix: string;
11
7
  constructor(axios: AxiosInstance, pathPrefix?: string);
12
- search<C extends RequestConfig<Post<Properties>> = RequestConfig<Post<Properties>>>(request: SearchRequest, filter: Filter<Post<Properties>>, config?: C): Promise<ResponseType<Data<SearchResponse>, SearchResponse, C>>;
13
8
  static build<Properties extends object = object>(axios: AxiosInstance, prefix?: string): PostsService<Properties>;
14
9
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PostsService = void 0;
4
- const utils_1 = require("../../common/core/utils");
5
4
  const classes_1 = require("../../common/core/classes");
6
5
  class PostsService extends classes_1.RestfulService {
7
6
  constructor(axios, pathPrefix = '/') {
@@ -9,14 +8,6 @@ class PostsService extends classes_1.RestfulService {
9
8
  this.axios = axios;
10
9
  this.pathPrefix = pathPrefix;
11
10
  }
12
- async search(request, filter, config) {
13
- const params = await (0, utils_1.getParams)(config, filter);
14
- const response = await this.post(this.url('search'), request, {
15
- ...config,
16
- params,
17
- });
18
- return (config?.fullResponse ? response : response.data);
19
- }
20
11
  static build(axios, prefix = '/') {
21
12
  return new PostsService(axios, prefix || '/');
22
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"posts.service.js","sourceRoot":"","sources":["../../src/services/content/posts.service.ts"],"names":[],"mappings":";;;AAGA,mDAAoD;AACpD,uDAA2D;AAM3D,MAAa,YAAiD,SAAQ,wBAAqD;IACzH,YACqB,KAAoB,EACpB,aAAqB,GAAG;QAE3C,KAAK,CAAC,eAAe,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;QAHvB,UAAK,GAAL,KAAK,CAAe;QACpB,eAAU,GAAV,UAAU,CAAc;IAG7C,CAAC;IAED,KAAK,CAAC,MAAM,CACV,OAAsB,EACtB,MAAgC,EAChC,MAAU;QAEV,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAS,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAI/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAsC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE;YACjG,GAAG,MAAM;YACT,MAAM;SACP,CAAC,CAAC;QAEH,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAa,CAAC;IACvE,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB,EAAE,SAAiB,GAAG;QACzF,OAAO,IAAI,YAAY,CAAa,KAAK,EAAE,MAAM,IAAI,GAAG,CAAC,CAAC;IAC5D,CAAC;CACF;AA5BD,oCA4BC"}
1
+ {"version":3,"file":"posts.service.js","sourceRoot":"","sources":["../../src/services/content/posts.service.ts"],"names":[],"mappings":";;;AAEA,uDAA2D;AAG3D,MAAa,YAAiD,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