@wenex/sdk 1.3.3 → 1.3.4
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/common/core/classes/restful.service.js +23 -55
- package/common/core/classes/restful.service.js.map +1 -1
- package/common/interfaces/general/workflows/workflow.interface.d.ts +2 -2
- package/common/interfaces/logistic/locations/index.d.ts +0 -1
- package/common/interfaces/logistic/locations/index.js +0 -1
- package/common/interfaces/logistic/locations/index.js.map +1 -1
- package/package.json +1 -1
- package/services/career/products.service.js +2 -6
- package/services/career/products.service.js.map +1 -1
- package/services/conjoint/messages.service.js +2 -6
- package/services/conjoint/messages.service.js.map +1 -1
- package/services/content/posts.service.d.ts +5 -0
- package/services/content/posts.service.js +6 -0
- package/services/content/posts.service.js.map +1 -1
|
@@ -20,27 +20,18 @@ class RestfulService extends providers_1.RequestService {
|
|
|
20
20
|
}
|
|
21
21
|
async count(query, config) {
|
|
22
22
|
const params = await (0, utils_1.getParams)(config, query);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
else
|
|
27
|
-
return (await this.get(this.url('count'), { ...config, params }));
|
|
23
|
+
const response = await this.get(this.url('count'), { ...config, params });
|
|
24
|
+
return (config?.fullResponse ? response : response.total);
|
|
28
25
|
}
|
|
29
26
|
async create(data, config) {
|
|
30
27
|
const params = await (0, utils_1.getParams)(config);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
else
|
|
35
|
-
return (await this.post(this.url(), data, { ...config, params }));
|
|
28
|
+
const response = await this.post(this.url(), data, { ...config, params });
|
|
29
|
+
return (config?.fullResponse ? response : response.data);
|
|
36
30
|
}
|
|
37
31
|
async createBulk(data, config) {
|
|
38
32
|
const params = await (0, utils_1.getParams)(config);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
else
|
|
43
|
-
return (await this.post(this.url('bulk'), data, { ...config, params }));
|
|
33
|
+
const response = await this.post(this.url('bulk'), data, { ...config, params });
|
|
34
|
+
return (config?.fullResponse ? response : response.items);
|
|
44
35
|
}
|
|
45
36
|
async cursor(filter, options, config) {
|
|
46
37
|
options.method = 'GET';
|
|
@@ -55,64 +46,41 @@ class RestfulService extends providers_1.RequestService {
|
|
|
55
46
|
}
|
|
56
47
|
async find(filter, config) {
|
|
57
48
|
const params = await (0, utils_1.getParams)(config, filter);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
else
|
|
62
|
-
return (await this.get(this.url(), { ...config, params }));
|
|
49
|
+
const response = await this.get(this.url(), { ...config, params });
|
|
50
|
+
return (config?.fullResponse ? response : response.items);
|
|
63
51
|
}
|
|
64
52
|
async findById(id, config) {
|
|
65
53
|
const params = await (0, utils_1.getParams)(config);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
else
|
|
70
|
-
return (await this.get(this.url(id), { ...config, params }));
|
|
54
|
+
const response = await this.get(this.url(id), { ...config, params });
|
|
55
|
+
return (config?.fullResponse ? response : response.data);
|
|
71
56
|
}
|
|
72
57
|
async deleteById(id, config) {
|
|
73
58
|
const params = await (0, utils_1.getParams)(config);
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
else
|
|
78
|
-
return (await this.delete(this.url(id), { ...config, params }));
|
|
59
|
+
const response = await this.delete(this.url(id), { ...config, params });
|
|
60
|
+
return (config?.fullResponse ? response : response.data);
|
|
79
61
|
}
|
|
80
62
|
async restoreById(id, config) {
|
|
81
63
|
const params = await (0, utils_1.getParams)(config);
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return (await this.put(this.url(`${id}/restore`), undefined, {
|
|
88
|
-
...config,
|
|
89
|
-
params,
|
|
90
|
-
}));
|
|
91
|
-
}
|
|
64
|
+
const response = await this.put(this.url(`${id}/restore`), undefined, {
|
|
65
|
+
...config,
|
|
66
|
+
params,
|
|
67
|
+
});
|
|
68
|
+
return (config?.fullResponse ? response : response.data);
|
|
92
69
|
}
|
|
93
70
|
async destroyById(id, config) {
|
|
94
71
|
const params = await (0, utils_1.getParams)(config);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
else
|
|
99
|
-
return (await this.delete(this.url(`${id}/destroy`), { ...config, params }));
|
|
72
|
+
const response = await this.delete(this.url(`${id}/destroy`), { ...config, params });
|
|
73
|
+
return (config?.fullResponse ? response : response.data);
|
|
100
74
|
}
|
|
101
75
|
async updateBulk(data, query, config) {
|
|
102
76
|
const params = await (0, utils_1.getParams)(config, query);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
else
|
|
107
|
-
return (await this.patch(this.url('bulk'), data, { ...config, params }));
|
|
77
|
+
const response = await this.patch(this.url('bulk'), data, { ...config, params });
|
|
78
|
+
return (config?.fullResponse ? response : response.total);
|
|
108
79
|
}
|
|
109
80
|
async updateById(id, data, config) {
|
|
110
81
|
const params = await (0, utils_1.getParams)(config);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
else
|
|
115
|
-
return (await this.patch(this.url(id), data, { ...config, params }));
|
|
82
|
+
const response = await this.patch(this.url(id), data, { ...config, params });
|
|
83
|
+
return (config?.fullResponse ? response : response.data);
|
|
116
84
|
}
|
|
117
85
|
}
|
|
118
86
|
exports.RestfulService = RestfulService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restful.service.js","sourceRoot":"","sources":["../../../src/common/core/classes/restful.service.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAuF;AAEvF,4CAAoB;AAEpB,oCAAqC;AAErC,4CAA8C;AAK9C,MAAa,cAAoD,SAAQ,0BAAc;IAKrF,YACqB,IAAgB,EAChB,KAAoB,EACpB,aAAqB,GAAG;QAE3C,KAAK,CAAC,KAAK,CAAC,CAAC;QAJM,SAAI,GAAJ,IAAI,CAAY;QAChB,UAAK,GAAL,KAAK,CAAe;QACpB,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AE,CAAC,CAAC;QAChH,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAa,CAAC;IACvE,CAAC;IAED,KAAK,CAAC,UAAU,CACd,IAAiB,EACjB,KAAe,EACf,MAAU;QAGV,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAS,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC9C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAqB,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QACrG,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAa,CAAC;IACxE,CAAC;IAED,KAAK,CAAC,UAAU,CACd,EAAU,EACV,IAAiB,EACjB,MAAU;QAGV,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAS,EAAC,MAAM,CAAC,CAAC;QACvC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAyC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QACrH,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAa,CAAC;IACvE,CAAC;CACF;AA/HD,wCA+HC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
|
-
import { WorkflowToken } from './token.interface';
|
|
3
2
|
import { Core, Dto } from '../../../core/interfaces';
|
|
4
3
|
import { WorkflowStatus } from '../../../enums/general';
|
|
4
|
+
import { WorkflowToken, WorkflowTokenDto } from './token.interface';
|
|
5
5
|
export interface Workflow<D = any, V = any, Properties extends object = object> extends Core<Properties> {
|
|
6
6
|
name: string;
|
|
7
7
|
status: WorkflowStatus;
|
|
@@ -10,5 +10,5 @@ export interface Workflow<D = any, V = any, Properties extends object = object>
|
|
|
10
10
|
}
|
|
11
11
|
export type WorkflowDoc<D = any, V = any, Properties extends object = object> = Workflow<D, V, Properties> & Document;
|
|
12
12
|
export type WorkflowDto<D = any, V = any, Properties extends object = object> = Dto<Omit<Workflow<D, V, Properties>, 'tokens'> & {
|
|
13
|
-
tokens:
|
|
13
|
+
tokens: WorkflowTokenDto<V>[];
|
|
14
14
|
}>;
|
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./nominatim.interface"), exports);
|
|
18
17
|
__exportStar(require("./geometry.interface"), exports);
|
|
19
18
|
__exportStar(require("./location.interface"), exports);
|
|
20
19
|
__exportStar(require("./nominatim.interface"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/locations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/locations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,uDAAqC;AACrC,wDAAsC"}
|
package/package.json
CHANGED
|
@@ -11,12 +11,8 @@ class ProductsService extends classes_1.RestfulService {
|
|
|
11
11
|
}
|
|
12
12
|
async search(request, filter, config) {
|
|
13
13
|
const params = await (0, utils_1.getParams)(config, filter);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.data;
|
|
17
|
-
}
|
|
18
|
-
else
|
|
19
|
-
return (await this.post(this.url('search'), request, { ...config, params }));
|
|
14
|
+
const response = await this.post(this.url('search'), request, { ...config, params });
|
|
15
|
+
return (config?.fullResponse ? response : response.data);
|
|
20
16
|
}
|
|
21
17
|
static build(axios, prefix = '/') {
|
|
22
18
|
return new ProductsService(axios, prefix || '/');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.service.js","sourceRoot":"","sources":["../../src/services/career/products.service.ts"],"names":[],"mappings":";;;AAGA,mDAAoD;AACpD,uDAA2D;AAM3D,MAAa,eAAoD,SAAQ,wBAGxE;IACC,YACqB,KAAoB,EACpB,aAAqB,GAAG;QAE3C,KAAK,CAAC,iBAAiB,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;QAHzB,UAAK,GAAL,KAAK,CAAe;QACpB,eAAU,GAAV,UAAU,CAAc;IAG7C,CAAC;IAED,KAAK,CAAC,MAAM,CACV,OAAsB,EACtB,MAAmC,EACnC,MAAU;QAEV,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAS,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAE/C,
|
|
1
|
+
{"version":3,"file":"products.service.js","sourceRoot":"","sources":["../../src/services/career/products.service.ts"],"names":[],"mappings":";;;AAGA,mDAAoD;AACpD,uDAA2D;AAM3D,MAAa,eAAoD,SAAQ,wBAGxE;IACC,YACqB,KAAoB,EACpB,aAAqB,GAAG;QAE3C,KAAK,CAAC,iBAAiB,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;QAHzB,UAAK,GAAL,KAAK,CAAe;QACpB,eAAU,GAAV,UAAU,CAAc;IAG7C,CAAC;IAED,KAAK,CAAC,MAAM,CACV,OAAsB,EACtB,MAAmC,EACnC,MAAU;QAEV,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAS,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAE/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAsC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAC1H,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,eAAe,CAAa,KAAK,EAAE,MAAM,IAAI,GAAG,CAAC,CAAC;IAC/D,CAAC;CACF;AAzBD,0CAyBC"}
|
|
@@ -11,12 +11,8 @@ class MessagesService extends classes_1.RestfulService {
|
|
|
11
11
|
}
|
|
12
12
|
async search(request, filter, config) {
|
|
13
13
|
const params = await (0, utils_1.getParams)(config, filter);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.data;
|
|
17
|
-
}
|
|
18
|
-
else
|
|
19
|
-
return (await this.post(this.url('search'), request, { ...config, params }));
|
|
14
|
+
const response = await this.post(this.url('search'), request, { ...config, params });
|
|
15
|
+
return (config?.fullResponse ? response : response.data);
|
|
20
16
|
}
|
|
21
17
|
static build(axios, prefix = '/') {
|
|
22
18
|
return new MessagesService(axios, prefix);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.service.js","sourceRoot":"","sources":["../../src/services/conjoint/messages.service.ts"],"names":[],"mappings":";;;AAGA,mDAAoD;AACpD,uDAA2D;AAM3D,MAAa,eAA6D,SAAQ,wBAGjF;IACC,YACqB,KAAoB,EACpB,aAAqB,GAAG;QAE3C,KAAK,CAAC,mBAAmB,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;QAH3B,UAAK,GAAL,KAAK,CAAe;QACpB,eAAU,GAAV,UAAU,CAAc;IAG7C,CAAC;IAED,KAAK,CAAC,MAAM,CACV,OAAsB,EACtB,MAAiB,EACjB,MAAU;QAEV,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAS,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAE/C,
|
|
1
|
+
{"version":3,"file":"messages.service.js","sourceRoot":"","sources":["../../src/services/conjoint/messages.service.ts"],"names":[],"mappings":";;;AAGA,mDAAoD;AACpD,uDAA2D;AAM3D,MAAa,eAA6D,SAAQ,wBAGjF;IACC,YACqB,KAAoB,EACpB,aAAqB,GAAG;QAE3C,KAAK,CAAC,mBAAmB,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;QAH3B,UAAK,GAAL,KAAK,CAAe;QACpB,eAAU,GAAV,UAAU,CAAc;IAG7C,CAAC;IAED,KAAK,CAAC,MAAM,CACV,OAAsB,EACtB,MAAiB,EACjB,MAAU;QAEV,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAS,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAE/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAsC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAC1H,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAa,CAAC;IACvE,CAAC;IAED,MAAM,CAAC,KAAK,CAA8C,KAAoB,EAAE,SAAiB,GAAG;QAClG,OAAO,IAAI,eAAe,CAAgB,KAAK,EAAE,MAAM,CAAC,CAAC;IAC3D,CAAC;CACF;AAzBD,0CAyBC"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
|
+
import { Data } from '../../common/core/interfaces';
|
|
2
3
|
import { RestfulService } from '../../common/core/classes';
|
|
4
|
+
import { Filter } from '../../common/core/interfaces/mongo';
|
|
3
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';
|
|
4
8
|
export declare class PostsService<Properties extends object = object> extends RestfulService<Post<Properties>, PostDto<Properties>> {
|
|
5
9
|
protected readonly axios: AxiosInstance;
|
|
6
10
|
protected readonly pathPrefix: string;
|
|
7
11
|
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>>;
|
|
8
13
|
static build<Properties extends object = object>(axios: AxiosInstance, prefix?: string): PostsService<Properties>;
|
|
9
14
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
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");
|
|
4
5
|
const classes_1 = require("../../common/core/classes");
|
|
5
6
|
class PostsService extends classes_1.RestfulService {
|
|
6
7
|
constructor(axios, pathPrefix = '/') {
|
|
@@ -8,6 +9,11 @@ class PostsService extends classes_1.RestfulService {
|
|
|
8
9
|
this.axios = axios;
|
|
9
10
|
this.pathPrefix = pathPrefix;
|
|
10
11
|
}
|
|
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, { ...config, params });
|
|
15
|
+
return (config?.fullResponse ? response : response.data);
|
|
16
|
+
}
|
|
11
17
|
static build(axios, prefix = '/') {
|
|
12
18
|
return new PostsService(axios, prefix || '/');
|
|
13
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posts.service.js","sourceRoot":"","sources":["../../src/services/content/posts.service.ts"],"names":[],"mappings":";;;
|
|
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;QAE/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAsC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAC1H,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;AAtBD,oCAsBC"}
|