@wenex/sdk 1.1.52 → 1.1.53
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/graphql.service.d.ts +1 -1
- package/common/core/classes/graphql.service.js +3 -1
- package/common/core/classes/graphql.service.js.map +1 -1
- package/common/core/classes/restful.service.d.ts +4 -61
- package/common/core/classes/restful.service.js +31 -40
- package/common/core/classes/restful.service.js.map +1 -1
- package/common/core/types/index.d.ts +1 -0
- package/common/core/types/index.js +18 -0
- package/common/core/types/index.js.map +1 -0
- package/common/core/types/restful.type.d.ts +26 -0
- package/common/core/types/restful.type.js +3 -0
- package/common/core/types/restful.type.js.map +1 -0
- package/common/core/utils/axios.util.d.ts +38 -0
- package/common/core/utils/axios.util.js +23 -0
- package/common/core/utils/axios.util.js.map +1 -0
- package/common/core/utils/index.d.ts +1 -0
- package/common/core/utils/index.js +1 -0
- package/common/core/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/services/auth/auths.service.d.ts +1 -1
- package/services/conjoint/accounts.service.d.ts +2 -1
- package/services/conjoint/accounts.service.js.map +1 -1
- package/services/essential/sagas.service.d.ts +2 -1
- package/services/essential/sagas.service.js.map +1 -1
- package/services/financial/invoices.service.d.ts +2 -1
- package/services/financial/invoices.service.js.map +1 -1
- package/services/financial/transactions.service.d.ts +2 -1
- package/services/financial/transactions.service.js.map +1 -1
- package/services/logistic/locations.service.d.ts +2 -1
- package/services/logistic/locations.service.js.map +1 -1
- package/services/special/files.service.d.ts +2 -1
- package/services/special/files.service.js.map +1 -1
- package/services/special/stats.service.d.ts +2 -1
- package/services/special/stats.service.js.map +1 -1
- package/services/touch/emails.service.d.ts +2 -1
- package/services/touch/emails.service.js.map +1 -1
- package/services/touch/pushes.service.d.ts +2 -1
- package/services/touch/pushes.service.js.map +1 -1
- package/services/touch/smss.service.d.ts +2 -1
- package/services/touch/smss.service.js.map +1 -1
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GraphqlService = void 0;
|
|
4
|
+
const utils_1 = require("../utils");
|
|
4
5
|
class GraphqlService {
|
|
5
6
|
constructor(axios) {
|
|
6
7
|
this.axios = axios;
|
|
7
8
|
}
|
|
8
9
|
async request(data, config) {
|
|
9
|
-
const
|
|
10
|
+
const params = await (0, utils_1.getParams)(config);
|
|
11
|
+
const { data: res } = await this.axios.post('/graphql', data, { ...config, params });
|
|
10
12
|
// eslint-disable-next-line @typescript-eslint/only-throw-error
|
|
11
13
|
if (res.errors?.length)
|
|
12
14
|
throw res.errors;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.service.js","sourceRoot":"","sources":["../../../src/common/core/classes/graphql.service.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"graphql.service.js","sourceRoot":"","sources":["../../../src/common/core/classes/graphql.service.ts"],"names":[],"mappings":";;;AAEA,oCAAqC;AAQrC,MAAa,cAAc;IACzB,YAA+B,KAAoB;QAApB,UAAK,GAAL,KAAK,CAAe;IAAG,CAAC;IAEvD,KAAK,CAAC,OAAO,CAAI,IAAoB,EAAE,MAAsB;QAC3D,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAS,EAAC,MAAM,CAAC,CAAC;QACvC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAqB,UAAU,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAEzG,+DAA+D;QAC/D,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM;YAAE,MAAM,GAAG,CAAC,MAAM,CAAC;;YACpC,OAAO,GAAG,CAAC,IAAK,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,KAAoB;QAC/B,OAAO,IAAI,cAAc,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;CACF;AAfD,wCAeC"}
|
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
import { FetchEventSourceInit } from '@microsoft/fetch-event-source';
|
|
2
|
-
import { AxiosInstance
|
|
2
|
+
import { AxiosInstance } from 'axios';
|
|
3
3
|
import { Collection } from '../collection';
|
|
4
4
|
import { RequestService } from '../providers';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
params?: Optional<Filter<T>> & {
|
|
9
|
-
zone?: string;
|
|
10
|
-
skip?: number;
|
|
11
|
-
limit?: number;
|
|
12
|
-
sort?: Pagination<T>['sort'];
|
|
13
|
-
} & {
|
|
14
|
-
[x: string]: any;
|
|
15
|
-
};
|
|
16
|
-
headers?: {
|
|
17
|
-
[k in keyof Metadata]?: boolean | string | number | null;
|
|
18
|
-
} & {
|
|
19
|
-
[x: string]: any;
|
|
20
|
-
};
|
|
21
|
-
} & {
|
|
22
|
-
fullResponse?: boolean;
|
|
23
|
-
brotli?: {
|
|
24
|
-
quality: number;
|
|
25
|
-
} | boolean;
|
|
26
|
-
};
|
|
27
|
-
export type ResponseType<T extends object = Core, D = any, C extends RequestConfig<T> | undefined = RequestConfig<T>> = C extends {
|
|
28
|
-
fullResponse: true;
|
|
29
|
-
} ? T : D;
|
|
5
|
+
import { RequestConfig, ResponseType } from '../types';
|
|
6
|
+
import { Filter, FilterOne, Query } from '../interfaces/mongo';
|
|
7
|
+
import { Dto, Core, Data, Items, Serializer, Total, Optional } from '../interfaces';
|
|
30
8
|
export declare class RestfulService<T extends Core, D extends Dto<Core>> extends RequestService {
|
|
31
9
|
protected readonly path: Collection;
|
|
32
10
|
protected readonly axios: AxiosInstance;
|
|
@@ -43,39 +21,4 @@ export declare class RestfulService<T extends Core, D extends Dto<Core>> extends
|
|
|
43
21
|
destroyById<Path extends object = object, C extends RequestConfig<T> = RequestConfig<T>>(id: string, config?: C): Promise<ResponseType<Data<Serializer<T, Path>>, Serializer<T, Path>, C>>;
|
|
44
22
|
updateBulk<C extends RequestConfig<T> = RequestConfig<T>>(data: Optional<D>, query: Query<T>, config?: C): Promise<ResponseType<Total, number, C>>;
|
|
45
23
|
updateById<Path extends object = object, C extends RequestConfig<T> = RequestConfig<T>>(id: string, data: Optional<D>, config?: C): Promise<ResponseType<Data<Serializer<T, Path>>, Serializer<T, Path>, C>>;
|
|
46
|
-
protected getParams(queryOrFilter: Query<any> | Filter<any>, config?: RequestConfig<any>): Promise<({
|
|
47
|
-
[x: string]: any;
|
|
48
|
-
$and?: import("mongoose").FilterQuery<any>[] | undefined;
|
|
49
|
-
$nor?: import("mongoose").FilterQuery<any>[] | undefined;
|
|
50
|
-
$or?: import("mongoose").FilterQuery<any>[] | undefined;
|
|
51
|
-
$text?: {
|
|
52
|
-
$search: string;
|
|
53
|
-
$language?: string;
|
|
54
|
-
$caseSensitive?: boolean;
|
|
55
|
-
$diacriticSensitive?: boolean;
|
|
56
|
-
};
|
|
57
|
-
$where?: string | Function;
|
|
58
|
-
$comment?: string;
|
|
59
|
-
$expr?: Record<string, any>;
|
|
60
|
-
_id?: import("mongoose").Condition<string>;
|
|
61
|
-
} | {
|
|
62
|
-
populate?: import("../interfaces/mongo").Populate;
|
|
63
|
-
projection?: import("../interfaces/mongo").Projection<any> | undefined;
|
|
64
|
-
pagination?: Pagination<any> | undefined;
|
|
65
|
-
query: Query<any>;
|
|
66
|
-
}) & {
|
|
67
|
-
[x: string]: any;
|
|
68
|
-
populate?: import("../interfaces/mongo").Populate;
|
|
69
|
-
projection?: import("../interfaces/mongo").Projection<any> | undefined;
|
|
70
|
-
pagination?: Pagination<any> | undefined;
|
|
71
|
-
query?: Query<any> | undefined;
|
|
72
|
-
zone?: string;
|
|
73
|
-
skip?: number;
|
|
74
|
-
limit?: number;
|
|
75
|
-
sort?: {
|
|
76
|
-
[x: string]: import("mongoose").SortOrder | {
|
|
77
|
-
$meta: "textScore";
|
|
78
|
-
} | undefined;
|
|
79
|
-
} | undefined;
|
|
80
|
-
}>;
|
|
81
24
|
}
|
|
@@ -5,17 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.RestfulService = void 0;
|
|
7
7
|
const fetch_event_source_1 = require("@microsoft/fetch-event-source");
|
|
8
|
-
const brotli_compress_1 = require("brotli-compress");
|
|
9
8
|
const qs_1 = __importDefault(require("qs"));
|
|
10
9
|
const utils_1 = require("../utils");
|
|
11
10
|
const providers_1 = require("../providers");
|
|
12
|
-
// Encode a string to Base64URL with UTF-8 support
|
|
13
|
-
function base64UrlEncode(bytes) {
|
|
14
|
-
// Convert bytes to binary string (btoa expects a string of Latin-1 chars)
|
|
15
|
-
const binary = String.fromCharCode(...bytes);
|
|
16
|
-
// Encode to Base64 and convert to Base64URL
|
|
17
|
-
return btoa(binary).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
|
18
|
-
}
|
|
19
11
|
class RestfulService extends providers_1.RequestService {
|
|
20
12
|
constructor(path, axios) {
|
|
21
13
|
super(axios);
|
|
@@ -24,7 +16,7 @@ class RestfulService extends providers_1.RequestService {
|
|
|
24
16
|
this.url = (path) => `/${this.path}${path ? `/${path}` : ''}`;
|
|
25
17
|
}
|
|
26
18
|
async count(query, config) {
|
|
27
|
-
const params = await
|
|
19
|
+
const params = await (0, utils_1.getParams)(config, query);
|
|
28
20
|
if (!config?.fullResponse) {
|
|
29
21
|
return (await this.get(this.url('count'), { ...config, params })).total;
|
|
30
22
|
}
|
|
@@ -32,18 +24,20 @@ class RestfulService extends providers_1.RequestService {
|
|
|
32
24
|
return (await this.get(this.url('count'), { ...config, params }));
|
|
33
25
|
}
|
|
34
26
|
async create(data, config) {
|
|
27
|
+
const params = await (0, utils_1.getParams)(config);
|
|
35
28
|
if (!config?.fullResponse) {
|
|
36
|
-
return (await this.post(this.url(), data, config)).data;
|
|
29
|
+
return (await this.post(this.url(), data, { ...config, params })).data;
|
|
37
30
|
}
|
|
38
31
|
else
|
|
39
|
-
return (await this.post(this.url(), data, config));
|
|
32
|
+
return (await this.post(this.url(), data, { ...config, params }));
|
|
40
33
|
}
|
|
41
34
|
async createBulk(data, config) {
|
|
35
|
+
const params = await (0, utils_1.getParams)(config);
|
|
42
36
|
if (!config?.fullResponse) {
|
|
43
|
-
return (await this.post(this.url('bulk'), data, config)).items;
|
|
37
|
+
return (await this.post(this.url('bulk'), data, { ...config, params })).items;
|
|
44
38
|
}
|
|
45
39
|
else
|
|
46
|
-
return (await this.post(this.url('bulk'), data, config));
|
|
40
|
+
return (await this.post(this.url('bulk'), data, { ...config, params }));
|
|
47
41
|
}
|
|
48
42
|
async cursor(filter, options, config) {
|
|
49
43
|
options.method = 'GET';
|
|
@@ -51,13 +45,13 @@ class RestfulService extends providers_1.RequestService {
|
|
|
51
45
|
const authorization = this.axios.defaults.headers['Authorization'] || this.axios.defaults.headers.common['Authorization'];
|
|
52
46
|
if (authorization)
|
|
53
47
|
Object.assign(options.headers, { Authorization: authorization });
|
|
54
|
-
const params = await
|
|
48
|
+
const params = await (0, utils_1.getParams)(config, filter);
|
|
55
49
|
const baseURL = this.axios.defaults.baseURL?.replace(/\/$/, '');
|
|
56
50
|
const input = `${baseURL}/${this.path}/cursor?${qs_1.default.stringify(params)}`;
|
|
57
51
|
await (0, fetch_event_source_1.fetchEventSource)(input, options);
|
|
58
52
|
}
|
|
59
53
|
async find(filter, config) {
|
|
60
|
-
const params = await
|
|
54
|
+
const params = await (0, utils_1.getParams)(config, filter);
|
|
61
55
|
if (!config?.fullResponse) {
|
|
62
56
|
return (await this.get(this.url(), { ...config, params })).items;
|
|
63
57
|
}
|
|
@@ -65,35 +59,44 @@ class RestfulService extends providers_1.RequestService {
|
|
|
65
59
|
return (await this.get(this.url(), { ...config, params }));
|
|
66
60
|
}
|
|
67
61
|
async findById(id, config) {
|
|
62
|
+
const params = await (0, utils_1.getParams)(config);
|
|
68
63
|
if (!config?.fullResponse) {
|
|
69
|
-
return (await this.get(this.url(id), config)).data;
|
|
64
|
+
return (await this.get(this.url(id), { ...config, params })).data;
|
|
70
65
|
}
|
|
71
66
|
else
|
|
72
|
-
return (await this.get(this.url(id), config));
|
|
67
|
+
return (await this.get(this.url(id), { ...config, params }));
|
|
73
68
|
}
|
|
74
69
|
async deleteById(id, config) {
|
|
70
|
+
const params = await (0, utils_1.getParams)(config);
|
|
75
71
|
if (!config?.fullResponse) {
|
|
76
|
-
return (await this.delete(this.url(id), config)).data;
|
|
72
|
+
return (await this.delete(this.url(id), { ...config, params })).data;
|
|
77
73
|
}
|
|
78
74
|
else
|
|
79
|
-
return (await this.delete(this.url(id), config));
|
|
75
|
+
return (await this.delete(this.url(id), { ...config, params }));
|
|
80
76
|
}
|
|
81
77
|
async restoreById(id, config) {
|
|
78
|
+
const params = await (0, utils_1.getParams)(config);
|
|
82
79
|
if (!config?.fullResponse) {
|
|
83
|
-
return (await this.put(this.url(`${id}/restore`), undefined, config))
|
|
80
|
+
return (await this.put(this.url(`${id}/restore`), undefined, { ...config, params }))
|
|
81
|
+
.data;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
return (await this.put(this.url(`${id}/restore`), undefined, {
|
|
85
|
+
...config,
|
|
86
|
+
params,
|
|
87
|
+
}));
|
|
84
88
|
}
|
|
85
|
-
else
|
|
86
|
-
return (await this.put(this.url(`${id}/restore`), undefined, config));
|
|
87
89
|
}
|
|
88
90
|
async destroyById(id, config) {
|
|
91
|
+
const params = await (0, utils_1.getParams)(config);
|
|
89
92
|
if (!config?.fullResponse) {
|
|
90
|
-
return (await this.delete(this.url(`${id}/destroy`), config)).data;
|
|
93
|
+
return (await this.delete(this.url(`${id}/destroy`), { ...config, params })).data;
|
|
91
94
|
}
|
|
92
95
|
else
|
|
93
|
-
return (await this.delete(this.url(`${id}/destroy`), config));
|
|
96
|
+
return (await this.delete(this.url(`${id}/destroy`), { ...config, params }));
|
|
94
97
|
}
|
|
95
98
|
async updateBulk(data, query, config) {
|
|
96
|
-
const params = await
|
|
99
|
+
const params = await (0, utils_1.getParams)(config, query);
|
|
97
100
|
if (!config?.fullResponse) {
|
|
98
101
|
return (await this.patch(this.url('bulk'), data, { ...config, params })).total;
|
|
99
102
|
}
|
|
@@ -101,24 +104,12 @@ class RestfulService extends providers_1.RequestService {
|
|
|
101
104
|
return (await this.patch(this.url('bulk'), data, { ...config, params }));
|
|
102
105
|
}
|
|
103
106
|
async updateById(id, data, config) {
|
|
107
|
+
const params = await (0, utils_1.getParams)(config);
|
|
104
108
|
if (!config?.fullResponse) {
|
|
105
|
-
return (await this.patch(this.url(id), data, config)).data;
|
|
106
|
-
}
|
|
107
|
-
else
|
|
108
|
-
return (await this.patch(this.url(id), data, config));
|
|
109
|
-
}
|
|
110
|
-
// ###############################
|
|
111
|
-
// Private / Protected Method's
|
|
112
|
-
// ###############################
|
|
113
|
-
async getParams(queryOrFilter, config) {
|
|
114
|
-
if (config?.brotli) {
|
|
115
|
-
const quality = typeof config?.brotli === 'object' ? config?.brotli.quality : 8;
|
|
116
|
-
const params = (0, utils_1.toString)(Object.assign({ ...queryOrFilter }, { ...config?.params }));
|
|
117
|
-
const compressed = await (0, brotli_compress_1.compress)(new TextEncoder().encode(params), { quality: quality });
|
|
118
|
-
return { q: base64UrlEncode(compressed) };
|
|
109
|
+
return (await this.patch(this.url(id), data, { ...config, params })).data;
|
|
119
110
|
}
|
|
120
111
|
else
|
|
121
|
-
return
|
|
112
|
+
return (await this.patch(this.url(id), data, { ...config, params }));
|
|
122
113
|
}
|
|
123
114
|
}
|
|
124
115
|
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,
|
|
1
|
+
{"version":3,"file":"restful.service.js","sourceRoot":"","sources":["../../../src/common/core/classes/restful.service.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAuF;AAEvF,4CAAoB;AA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,CAAC,CAAC,CAAC,IAAgB,CAAC;QAChI,CAAC;;YAAM,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAyC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAa,CAAC;IAClI,CAAC;CACF;AAzID,wCAyIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './restful.type';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./restful.type"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/core/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { Filter, Pagination } from '../interfaces/mongo';
|
|
3
|
+
import { Core, Metadata, Optional } from '../interfaces';
|
|
4
|
+
export type RequestConfig<T extends object = Core> = Omit<AxiosRequestConfig, 'params' | 'headers'> & {
|
|
5
|
+
params?: Optional<Filter<T>> & {
|
|
6
|
+
zone?: string;
|
|
7
|
+
skip?: number;
|
|
8
|
+
limit?: number;
|
|
9
|
+
sort?: Pagination<T>['sort'];
|
|
10
|
+
} & {
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
};
|
|
13
|
+
headers?: {
|
|
14
|
+
[k in keyof Metadata]?: boolean | string | number | null;
|
|
15
|
+
} & {
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
};
|
|
18
|
+
} & {
|
|
19
|
+
fullResponse?: boolean;
|
|
20
|
+
brotli?: {
|
|
21
|
+
quality: number;
|
|
22
|
+
} | boolean;
|
|
23
|
+
};
|
|
24
|
+
export type ResponseType<T extends object = Core, D = any, C extends RequestConfig<T> | undefined = RequestConfig<T>> = C extends {
|
|
25
|
+
fullResponse: true;
|
|
26
|
+
} ? T : D;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restful.type.js","sourceRoot":"","sources":["../../../src/common/core/types/restful.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { RequestConfig } from '../types';
|
|
2
|
+
import { Filter, Query } from '../interfaces/mongo';
|
|
3
|
+
export declare function base64UrlEncode(bytes: Uint8Array<ArrayBufferLike>): string;
|
|
4
|
+
export declare function getParams(config?: RequestConfig<any>, queryOrFilter?: Query<any> | Filter<any>): Promise<({
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
$and?: import("mongoose").FilterQuery<any>[] | undefined;
|
|
7
|
+
$nor?: import("mongoose").FilterQuery<any>[] | undefined;
|
|
8
|
+
$or?: import("mongoose").FilterQuery<any>[] | undefined;
|
|
9
|
+
$text?: {
|
|
10
|
+
$search: string;
|
|
11
|
+
$language?: string;
|
|
12
|
+
$caseSensitive?: boolean;
|
|
13
|
+
$diacriticSensitive?: boolean;
|
|
14
|
+
};
|
|
15
|
+
$where?: string | Function;
|
|
16
|
+
$comment?: string;
|
|
17
|
+
$expr?: Record<string, any>;
|
|
18
|
+
_id?: import("mongoose").Condition<string>;
|
|
19
|
+
} | {
|
|
20
|
+
populate?: import("../interfaces/mongo").Populate;
|
|
21
|
+
projection?: import("../interfaces/mongo").Projection<any> | undefined;
|
|
22
|
+
pagination?: import("../interfaces/mongo").Pagination<any> | undefined;
|
|
23
|
+
query: Query<any>;
|
|
24
|
+
}) & {
|
|
25
|
+
[x: string]: any;
|
|
26
|
+
populate?: import("../interfaces/mongo").Populate;
|
|
27
|
+
projection?: import("../interfaces/mongo").Projection<any> | undefined;
|
|
28
|
+
pagination?: import("../interfaces/mongo").Pagination<any> | undefined;
|
|
29
|
+
query?: Query<any> | undefined;
|
|
30
|
+
zone?: string;
|
|
31
|
+
skip?: number;
|
|
32
|
+
limit?: number;
|
|
33
|
+
sort?: {
|
|
34
|
+
[x: string]: import("mongoose").SortOrder | {
|
|
35
|
+
$meta: "textScore";
|
|
36
|
+
} | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.base64UrlEncode = base64UrlEncode;
|
|
4
|
+
exports.getParams = getParams;
|
|
5
|
+
const brotli_compress_1 = require("brotli-compress");
|
|
6
|
+
const transform_util_1 = require("./transform.util");
|
|
7
|
+
function base64UrlEncode(bytes) {
|
|
8
|
+
// Convert bytes to binary string (btoa expects a string of Latin-1 chars)
|
|
9
|
+
const binary = String.fromCharCode(...bytes);
|
|
10
|
+
// Encode to Base64 and convert to Base64URL
|
|
11
|
+
return btoa(binary).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
|
12
|
+
}
|
|
13
|
+
async function getParams(config, queryOrFilter = {}) {
|
|
14
|
+
if (config?.brotli) {
|
|
15
|
+
const quality = typeof config?.brotli === 'object' ? config?.brotli.quality : 8;
|
|
16
|
+
const params = (0, transform_util_1.toString)(Object.assign({ ...queryOrFilter }, { ...config?.params }));
|
|
17
|
+
const compressed = await (0, brotli_compress_1.compress)(new TextEncoder().encode(params), { quality: quality });
|
|
18
|
+
return { q: base64UrlEncode(compressed) };
|
|
19
|
+
}
|
|
20
|
+
else
|
|
21
|
+
return Object.assign({ ...queryOrFilter }, { ...config?.params });
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=axios.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axios.util.js","sourceRoot":"","sources":["../../../src/common/core/utils/axios.util.ts"],"names":[],"mappings":";;AAMA,0CAKC;AAED,8BAOC;AApBD,qDAA2C;AAG3C,qDAA4C;AAG5C,SAAgB,eAAe,CAAC,KAAkC;IAChE,0EAA0E;IAC1E,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,CAAC;IAC7C,4CAA4C;IAC5C,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACjF,CAAC;AAEM,KAAK,UAAU,SAAS,CAAC,MAA2B,EAAE,gBAA0C,EAAE;IACvG,IAAI,MAAM,EAAE,MAAM,EAAE,CAAC;QACnB,MAAM,OAAO,GAAG,OAAO,MAAM,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QAChF,MAAM,MAAM,GAAG,IAAA,yBAAQ,EAAC,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,aAAa,EAAE,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACpF,MAAM,UAAU,GAAG,MAAM,IAAA,0BAAQ,EAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAC1F,OAAO,EAAE,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC;IAC5C,CAAC;;QAAM,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,aAAa,EAAE,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./aes.util"), exports);
|
|
18
|
+
__exportStar(require("./axios.util"), exports);
|
|
18
19
|
__exportStar(require("./datetime.util"), exports);
|
|
19
20
|
__exportStar(require("./helper.util"), exports);
|
|
20
21
|
__exportStar(require("./ip-cidr.util"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/core/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,kDAAgC;AAChC,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAC9B,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,gDAA8B;AAC9B,oDAAkC;AAClC,+CAA6B;AAC7B,+CAA6B;AAC7B,mDAAiC;AACjC,8CAA4B;AAC5B,iDAA+B;AAC/B,oDAAkC;AAClC,iDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/core/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,+CAA6B;AAC7B,kDAAgC;AAChC,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAC9B,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,gDAA8B;AAC9B,oDAAkC;AAClC,+CAA6B;AAC7B,+CAA6B;AAC7B,mDAAiC;AACjC,8CAA4B;AAC5B,iDAA+B;AAC/B,oDAAkC;AAClC,iDAA+B"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
2
|
import { AuthCheck, AuthenticationRequest, AuthenticationResponse, AuthorizationRequest, AuthorizationResponse } from '../../common/interfaces/auth';
|
|
3
3
|
import { Result } from '../../common/core/interfaces';
|
|
4
|
-
import { RequestConfig } from '../../common/core/
|
|
4
|
+
import { RequestConfig } from '../../common/core/types';
|
|
5
5
|
import { JwtToken } from '../../common/core/interfaces/auth';
|
|
6
6
|
import { RequestService } from '../../common/core/providers';
|
|
7
7
|
export declare class AuthsService extends RequestService {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
|
-
import { RequestConfig
|
|
2
|
+
import { RequestConfig } from '../../common/core/types';
|
|
3
|
+
import { RestfulService } from '../../common/core/classes';
|
|
3
4
|
import { Account, AccountDto, Credential } from '../../common/interfaces/conjoint';
|
|
4
5
|
export declare class AccountsService<Properties extends object = object> extends RestfulService<Account<Properties>, AccountDto<Properties>> {
|
|
5
6
|
protected axios: AxiosInstance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.service.js","sourceRoot":"","sources":["../../src/services/conjoint/accounts.service.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"accounts.service.js","sourceRoot":"","sources":["../../src/services/conjoint/accounts.service.ts"],"names":[],"mappings":";;;AAGA,uDAA2D;AAG3D,MAAa,eAAoD,SAAQ,wBAGxE;IACC,YAAsB,KAAoB;QACxC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;QADd,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,IAAI,CAAC,MAAkC;QACrC,OAAO,IAAI,CAAC,IAAI,CAAqB,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;IACrE,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,eAAe,CAAa,KAAK,CAAC,CAAC;IAChD,CAAC;CACF;AAfD,0CAeC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
|
+
import { RequestConfig } from '../../common/core/types';
|
|
2
3
|
import { SagaStagesService } from './saga-stages.service';
|
|
3
|
-
import {
|
|
4
|
+
import { RestfulService } from '../../common/core/classes';
|
|
4
5
|
import { Saga, SagaDto, SagaStage, SagaStageAddDto, SagaStartDto } from '../../common/interfaces/essential';
|
|
5
6
|
export declare class SagasService<Properties extends object = object> extends RestfulService<Saga<Properties>, SagaDto<Properties>> {
|
|
6
7
|
protected axios: AxiosInstance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sagas.service.js","sourceRoot":"","sources":["../../src/services/essential/sagas.service.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"sagas.service.js","sourceRoot":"","sources":["../../src/services/essential/sagas.service.ts"],"names":[],"mappings":";;;AAIA,+DAA0D;AAC1D,uDAA2D;AAG3D,MAAa,YAAiD,SAAQ,wBAAqD;IAGzH,YAAsB,KAAoB;QACxC,KAAK,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;QADZ,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,IAA8B,EAAE,MAAwC;QAClF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAmD,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACnH,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,IAAqB,EAAE,MAAwC;QACvE,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAmC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACjG,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,EAAU,EAAE,MAAwC;QAC9D,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,CAAyB,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACxF,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,MAAwC;QAC/D,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,CAAyB,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACzF,CAAC;IAED,IAAI,MAAM;QACR,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,uCAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,YAAY,CAAa,KAAK,CAAC,CAAC;IAC7C,CAAC;CACF;AA9BD,oCA8BC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
|
+
import { RequestConfig } from '../../common/core/types';
|
|
3
|
+
import { RestfulService } from '../../common/core/classes';
|
|
2
4
|
import { Serializer } from '../../common/core/interfaces';
|
|
3
|
-
import { RequestConfig, RestfulService } from '../../common/core/classes';
|
|
4
5
|
import { Transaction, Invoice, InvoiceDto } from '../../common/interfaces/financial';
|
|
5
6
|
export declare class InvoicesService<Properties extends object = object> extends RestfulService<Invoice<Properties>, InvoiceDto<Properties>> {
|
|
6
7
|
protected axios: AxiosInstance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.service.js","sourceRoot":"","sources":["../../src/services/financial/invoices.service.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"invoices.service.js","sourceRoot":"","sources":["../../src/services/financial/invoices.service.ts"],"names":[],"mappings":";;;AAGA,uDAA2D;AAI3D,MAAa,eAAoD,SAAQ,wBAGxE;IACC,YAAsB,KAAoB;QACxC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;QADf,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,KAAK,CAAC,OAAO,CACX,EAAU,EACV,MAA2C;QAE3C,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,CAAkD,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACnH,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,eAAe,CAAa,KAAK,CAAC,CAAC;IAChD,CAAC;CACF;AAlBD,0CAkBC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
|
+
import { RequestConfig } from '../../common/core/types';
|
|
3
|
+
import { RestfulService } from '../../common/core/classes';
|
|
2
4
|
import { Serializer } from '../../common/core/interfaces';
|
|
3
|
-
import { RequestConfig, RestfulService } from '../../common/core/classes';
|
|
4
5
|
import { Transaction, TransactionDto, TransactionInitDto } from '../../common/interfaces/financial';
|
|
5
6
|
export declare class TransactionsService<Properties extends object = object> extends RestfulService<Transaction<Properties>, TransactionDto<Properties>> {
|
|
6
7
|
protected axios: AxiosInstance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.service.js","sourceRoot":"","sources":["../../src/services/financial/transactions.service.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"transactions.service.js","sourceRoot":"","sources":["../../src/services/financial/transactions.service.ts"],"names":[],"mappings":";;;AAGA,uDAA2D;AAI3D,MAAa,mBAAwD,SAAQ,wBAG5E;IACC,YAAsB,KAAoB;QACxC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QADnB,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,KAAK,CAAC,IAAI,CACR,IAAoC,EACpC,MAA+C;QAE/C,OAAO,CACL,MAAM,IAAI,CAAC,IAAI,CAA4E,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAC3H,CAAC,IAAI,CAAC;IACT,CAAC;IAED,KAAK,CAAC,KAAK,CACT,EAAU,EACV,MAA+C;QAE/C,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,CAAkD,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACjH,CAAC;IAED,KAAK,CAAC,MAAM,CACV,EAAU,EACV,MAA+C;QAE/C,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,CAAkD,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAClH,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,mBAAmB,CAAa,KAAK,CAAC,CAAC;IACpD,CAAC;CACF;AAlCD,kDAkCC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
|
-
import { RequestConfig
|
|
2
|
+
import { RequestConfig } from '../../common/core/types';
|
|
3
|
+
import { RestfulService } from '../../common/core/classes';
|
|
3
4
|
import { AddressLookup, GeocodeLookup, Location, LocationDto, NominatimPlace } from '../../common/interfaces/logistic';
|
|
4
5
|
export declare class LocationsService<Properties extends object = object> extends RestfulService<Location<Properties>, LocationDto<Properties>> {
|
|
5
6
|
protected axios: AxiosInstance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locations.service.js","sourceRoot":"","sources":["../../src/services/logistic/locations.service.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"locations.service.js","sourceRoot":"","sources":["../../src/services/logistic/locations.service.ts"],"names":[],"mappings":";;;AAIA,uDAA2D;AAG3D,MAAa,gBAAqD,SAAQ,wBAGzE;IACC,YAAsB,KAAoB;QACxC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;QADf,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,gBAAgB,CAAa,KAAK,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,IAAmB,EAAE,MAAsC;QAC7E,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAsC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/G,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,IAAmB,EAAE,MAAsC;QAC7E,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAuC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;IACjH,CAAC;CACF;AAnBD,4CAmBC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AxiosInstance, ResponseType } from 'axios';
|
|
2
|
+
import { RequestConfig } from '../../common/core/types';
|
|
3
|
+
import { RestfulService } from '../../common/core/classes';
|
|
2
4
|
import { Serializer } from '../../common/core/interfaces';
|
|
3
|
-
import { RequestConfig, RestfulService } from '../../common/core/classes';
|
|
4
5
|
import { File, FileDto, ShareLinkReq, ShareLinkRes } from '../../common/interfaces/special';
|
|
5
6
|
export declare class FilesService<Properties extends object = object> extends RestfulService<File<Properties>, FileDto<Properties>> {
|
|
6
7
|
protected axios: AxiosInstance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.service.js","sourceRoot":"","sources":["../../src/services/special/files.service.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"files.service.js","sourceRoot":"","sources":["../../src/services/special/files.service.ts"],"names":[],"mappings":";;;AAGA,uDAA2D;AAI3D,MAAa,YAAiD,SAAQ,wBAAqD;IACzH,YAAsB,KAAoB;QACxC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QADV,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,QAAQ,CAAU,EAAU,EAAE,SAA0C,EAAE,EAAE,eAA6B,MAAM;QAC7G,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;QACnC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC,GAAG,CAAI,GAAG,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,EAAU,EAAE,IAAkB,EAAE,SAA0C,EAAE;QACtF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAmC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACzG,CAAC;IAED,KAAK,CAAC,MAAM,CACV,KAA2C,EAC3C,KAA2B,EAC3B,SAA0C,EAAE;QAE5C,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC5B,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;QACtC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QACxE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE,CAAC,CAAC;QACzE,MAAM,GAAG,GAAW,IAAI,CAAC,GAAG,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC;QAChD,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAgD,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;IACnG,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,YAAY,CAAa,KAAK,CAAC,CAAC;IAC7C,CAAC;CACF;AA/BD,oCA+BC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
|
+
import { RequestConfig } from '../../common/core/types';
|
|
3
|
+
import { RestfulService } from '../../common/core/classes';
|
|
2
4
|
import { Result, Serializer } from '../../common/core/interfaces';
|
|
3
|
-
import { RequestConfig, RestfulService } from '../../common/core/classes';
|
|
4
5
|
import { Stat, StatCollectDto, StatDto } from '../../common/interfaces/special';
|
|
5
6
|
export declare class StatsService<Properties extends object = object> extends RestfulService<Stat<Properties>, StatDto<Properties>> {
|
|
6
7
|
protected axios: AxiosInstance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.service.js","sourceRoot":"","sources":["../../src/services/special/stats.service.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"stats.service.js","sourceRoot":"","sources":["../../src/services/special/stats.service.ts"],"names":[],"mappings":";;;AAGA,uDAA2D;AAI3D,MAAa,YAAiD,SAAQ,wBAAqD;IACzH,YAAsB,KAAoB;QACxC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QADV,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,KAAK,CAAC,OAAO,CACX,IAAgC,EAChC,MAAwC;QAExC,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAkE,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;aACzH,KAAK,CAAC;IACX,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,IAAgC,EAAE,MAAwC;QACtF,OAAO,MAAM,IAAI,CAAC,IAAI,CAAqC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAChG,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,YAAY,CAAa,KAAK,CAAC,CAAC;IAC7C,CAAC;CACF;AApBD,oCAoBC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
|
+
import { RequestConfig } from '../../common/core/types';
|
|
3
|
+
import { RestfulService } from '../../common/core/classes';
|
|
2
4
|
import { Serializer } from '../../common/core/interfaces';
|
|
3
|
-
import { RequestConfig, RestfulService } from '../../common/core/classes';
|
|
4
5
|
import { Email, EmailDto, EmailSendDto } from '../../common/interfaces/touch';
|
|
5
6
|
export declare class EmailsService<Properties extends object = object> extends RestfulService<Email<Properties>, EmailDto<Properties>> {
|
|
6
7
|
protected axios: AxiosInstance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emails.service.js","sourceRoot":"","sources":["../../src/services/touch/emails.service.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"emails.service.js","sourceRoot":"","sources":["../../src/services/touch/emails.service.ts"],"names":[],"mappings":";;;AAGA,uDAA2D;AAI3D,MAAa,aAAkD,SAAQ,wBAAuD;IAC5H,YAAsB,KAAoB;QACxC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QADT,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAA8B,EAAE,MAAyC;QAClF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAgE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/H,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,aAAa,CAAa,KAAK,CAAC,CAAC;IAC9C,CAAC;CACF;AAZD,sCAYC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
|
+
import { RequestConfig } from '../../common/core/types';
|
|
3
|
+
import { RestfulService } from '../../common/core/classes';
|
|
2
4
|
import { Serializer } from '../../common/core/interfaces';
|
|
3
|
-
import { RequestConfig, RestfulService } from '../../common/core/classes';
|
|
4
5
|
import { Push, PushDto, PusHistory, PusHistorySendDto } from '../../common/interfaces/touch';
|
|
5
6
|
export declare class PushesService<Properties extends object = object> extends RestfulService<Push<Properties>, PushDto<Properties>> {
|
|
6
7
|
protected axios: AxiosInstance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pushes.service.js","sourceRoot":"","sources":["../../src/services/touch/pushes.service.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"pushes.service.js","sourceRoot":"","sources":["../../src/services/touch/pushes.service.ts"],"names":[],"mappings":";;;AAGA,uDAA2D;AAI3D,MAAa,aAAkD,SAAQ,wBAAqD;IAC1H,YAAsB,KAAoB;QACxC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QADT,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAuB,EAAE,MAAkC;QACpE,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAkD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACjH,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,aAAa,CAAa,KAAK,CAAC,CAAC;IAC9C,CAAC;CACF;AAZD,sCAYC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
|
+
import { RequestConfig } from '../../common/core/types';
|
|
3
|
+
import { RestfulService } from '../../common/core/classes';
|
|
2
4
|
import { Serializer } from '../../common/core/interfaces';
|
|
3
5
|
import { Sms, SmsDto, SmsSendDto } from '../../common/interfaces/touch';
|
|
4
|
-
import { RequestConfig, RestfulService } from '../../common/core/classes';
|
|
5
6
|
export declare class SmssService<T = any, Properties extends object = object> extends RestfulService<Sms<T, Properties>, SmsDto<T, Properties>> {
|
|
6
7
|
protected axios: AxiosInstance;
|
|
7
8
|
constructor(axios: AxiosInstance);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smss.service.js","sourceRoot":"","sources":["../../src/services/touch/smss.service.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"smss.service.js","sourceRoot":"","sources":["../../src/services/touch/smss.service.ts"],"names":[],"mappings":";;;AAGA,uDAA2D;AAI3D,MAAa,WAAyD,SAAQ,wBAG7E;IACC,YAAsB,KAAoB;QACxC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QADP,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAA+B,EAAE,MAA0C;QACpF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAkE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACjI,CAAC;IAED,MAAM,CAAC,KAAK,CAA8C,KAAoB;QAC5E,OAAO,IAAI,WAAW,CAAgB,KAAK,CAAC,CAAC;IAC/C,CAAC;CACF;AAfD,kCAeC"}
|