nextemos 5.1.18 → 5.1.19

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,7 +1,7 @@
1
- import { IEnvironmentParameters, IInitEnvironmentResponse, IReadEnvironmentResponse, IService, IUpdateEnvironmentResponse } from '../../';
2
- import { IApiResponse, IRequestInit } from '../..';
1
+ import { IEnvironmentParameters, IInitEnvironmentResponse, IReadEnvironmentResponse, IService, IUpdateEnvironmentResponse } from "../../";
2
+ import { IApiResponse, IRequestInit } from "../..";
3
3
  export interface IInitEnvironmentRequest {
4
- platform: 'desktop' | 'mobile';
4
+ platform: "desktop" | "mobile";
5
5
  countryCode: string;
6
6
  language?: string;
7
7
  }
@@ -14,8 +14,12 @@ export interface IUpdateEnvironmentRequest {
14
14
  parameters: IEnvironmentParameters;
15
15
  language?: string;
16
16
  }
17
+ export interface IRefreshEnvironmentRequest extends IInitEnvironmentRequest {
18
+ environment: string;
19
+ }
17
20
  export interface IEnvironmentService extends IService {
18
21
  Init: (data: IInitEnvironmentRequest, options?: IRequestInit) => Promise<IApiResponse<IInitEnvironmentResponse>>;
19
22
  Read: (data: IReadEnvironmentRequest, options?: IRequestInit) => Promise<IApiResponse<IReadEnvironmentResponse>>;
20
23
  Update: (data: IUpdateEnvironmentRequest, options?: IRequestInit) => Promise<IApiResponse<IUpdateEnvironmentResponse>>;
24
+ Refresh: (data: IRefreshEnvironmentRequest, options?: IRequestInit) => Promise<IApiResponse<IInitEnvironmentResponse>>;
21
25
  }
@@ -60,4 +60,7 @@ exports.EnvironmentService = {
60
60
  Update: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
61
61
  return (0, __1.fetchRequest)().post(exports.EnvironmentService.Url(urls_1.default.Environment.Update, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
62
62
  }),
63
+ Refresh: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
64
+ return (0, __1.fetchRequest)().post(exports.EnvironmentService.Url(urls_1.default.Environment.Refresh, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
65
+ }),
63
66
  };
@@ -100,6 +100,7 @@ declare const _default: {
100
100
  Init: string;
101
101
  Read: string;
102
102
  Update: string;
103
+ Refresh: string;
103
104
  };
104
105
  Notification: {
105
106
  RenderTemplate: string;
@@ -111,6 +111,7 @@ exports.default = {
111
111
  Init: "/{language}/Environment/v1/Init",
112
112
  Read: "/{language}/Environment/v1/Read",
113
113
  Update: "/{language}/Environment/v1/Update",
114
+ Refresh: "/{language}/Environment/v1/Refresh",
114
115
  },
115
116
  Notification: {
116
117
  RenderTemplate: "/{language}/Template/v1/RenderTemplate",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "5.1.18",
3
+ "version": "5.1.19",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",