nextemos 6.1.13 → 6.1.15
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.
|
@@ -56,3 +56,23 @@ export interface ICurrency {
|
|
|
56
56
|
currencyPositivePatternId: number;
|
|
57
57
|
currencyNegativePatternId: number;
|
|
58
58
|
}
|
|
59
|
+
export interface ISectionsResponse extends IResponse {
|
|
60
|
+
data: {
|
|
61
|
+
id: number;
|
|
62
|
+
name: string;
|
|
63
|
+
}[];
|
|
64
|
+
}
|
|
65
|
+
export interface IConfigsResponse extends IResponse {
|
|
66
|
+
data: {
|
|
67
|
+
id: number;
|
|
68
|
+
section: string;
|
|
69
|
+
configs: IConfig[];
|
|
70
|
+
}[];
|
|
71
|
+
}
|
|
72
|
+
export interface IConfig {
|
|
73
|
+
id: number;
|
|
74
|
+
keyName: string;
|
|
75
|
+
type: string;
|
|
76
|
+
isDynamic: boolean;
|
|
77
|
+
value: string;
|
|
78
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IApiResponse, ICheckUpdateResponse, ICurrenciesResponse, IDynamicPropertiesResponse, IDynamicValuesResponse, IRequestBase, IRequestInit, IResponse, IService } from "../..";
|
|
1
|
+
import { IApiResponse, ICheckUpdateResponse, IConfigsResponse, ICurrenciesResponse, IDynamicPropertiesResponse, IDynamicValuesResponse, IRequestBase, IRequestInit, IResponse, ISectionsResponse, IService } from "../..";
|
|
2
2
|
export interface ICheckUpdateRequest extends IRequestBase {
|
|
3
3
|
version: string;
|
|
4
4
|
mobilePlatform: string;
|
|
@@ -20,4 +20,8 @@ export interface ICoreService extends IService {
|
|
|
20
20
|
Currencies: (options?: IRequestInit) => Promise<IApiResponse<ICurrenciesResponse>>;
|
|
21
21
|
SetCurrency: (data: ISetCurrencyRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
22
22
|
Log: (data: ILogRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
23
|
+
Sections: (options?: IRequestInit) => Promise<IApiResponse<ISectionsResponse>>;
|
|
24
|
+
Configs: (payload: {
|
|
25
|
+
section: string[];
|
|
26
|
+
}, options?: IRequestInit) => Promise<IApiResponse<IConfigsResponse>>;
|
|
23
27
|
}
|
|
@@ -73,4 +73,11 @@ exports.CoreService = {
|
|
|
73
73
|
Log: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
74
74
|
return (0, __1.fetchRequest)().post(exports.CoreService.Url(urls_1.default.Core.Log, options), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
75
75
|
}),
|
|
76
|
+
// Configurations
|
|
77
|
+
Sections: (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
78
|
+
return (0, __1.fetchRequest)().post(exports.CoreService.Url(urls_1.default.Core.Sections, options), Object.assign({}, options));
|
|
79
|
+
}),
|
|
80
|
+
Configs: (payload, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
81
|
+
return (0, __1.fetchRequest)().post(exports.CoreService.Url(urls_1.default.Core.Configs, options), Object.assign(Object.assign({}, options), { body: JSON.stringify(payload) }));
|
|
82
|
+
}),
|
|
76
83
|
};
|
package/dist/services/urls.d.ts
CHANGED
package/dist/services/urls.js
CHANGED
|
@@ -231,6 +231,8 @@ exports.default = {
|
|
|
231
231
|
Currencies: "/{language}/Currency/{version}/GetList",
|
|
232
232
|
SetCurrency: "/{language}/Currency/{version}/SetCurrency",
|
|
233
233
|
Log: "/{language}/LogApi/{version}/Log",
|
|
234
|
+
Sections: "/{language}/Configuration/{version}/Sections",
|
|
235
|
+
Configs: "/{language}/Configuration/{version}/Configs",
|
|
234
236
|
},
|
|
235
237
|
Coupon: {
|
|
236
238
|
GetMemberCoupons: "/{language}/CouponGateway/{version}/GetMemberCoupons",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nextemos",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.15",
|
|
4
4
|
"description": "For helpers and hooks used in NextJS projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -9,12 +9,6 @@
|
|
|
9
9
|
"LICENSE",
|
|
10
10
|
"README.md"
|
|
11
11
|
],
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
|
-
"default": "./dist/index.js"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
12
|
"scripts": {
|
|
19
13
|
"clean": "rimraf dist",
|
|
20
14
|
"prebuild": "npm run clean",
|