@etsoo/react 1.3.64 → 1.3.65

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.
@@ -2,6 +2,10 @@
2
2
  * Refresh token request data
3
3
  */
4
4
  export declare type RefreshTokenRQ = {
5
+ /**
6
+ * Device id
7
+ */
8
+ deviceId: string;
5
9
  /**
6
10
  * Login password
7
11
  */
@@ -1,4 +1,4 @@
1
- import { IApi, RefreshTokenProps } from '@etsoo/appscript';
1
+ import { IApi, InitCallDto, InitCallResult, RefreshTokenProps } from '@etsoo/appscript';
2
2
  import { IServiceAppSettings } from './IServiceAppSettings';
3
3
  import { IServicePageData } from './IServicePage';
4
4
  import { IServiceUser } from './IServiceUser';
@@ -26,6 +26,12 @@ export declare class ServiceApp<P extends IServicePageData = IServicePageData, U
26
26
  * @param name Application name
27
27
  */
28
28
  constructor(settings: S, name: string);
29
+ /**
30
+ * Api init call, connect to the core Api
31
+ * @param data Data
32
+ * @returns Result
33
+ */
34
+ protected apiInitCall(data: InitCallDto): Promise<InitCallResult | undefined>;
29
35
  /**
30
36
  * Go to the login page
31
37
  */
@@ -26,6 +26,14 @@ export class ServiceApp extends ReactApp {
26
26
  this.setApi(api);
27
27
  this.coreApi = api;
28
28
  }
29
+ /**
30
+ * Api init call, connect to the core Api
31
+ * @param data Data
32
+ * @returns Result
33
+ */
34
+ async apiInitCall(data) {
35
+ return await this.coreApi.put(this.initCallApi, data);
36
+ }
29
37
  /**
30
38
  * Go to the login page
31
39
  */
@@ -57,6 +65,7 @@ export class ServiceApp extends ReactApp {
57
65
  // Reqest data
58
66
  // Merge additional data passed
59
67
  const rq = {
68
+ deviceId: this.deviceId,
60
69
  timezone: this.getTimeZone(),
61
70
  ...data
62
71
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.3.64",
3
+ "version": "1.3.65",
4
4
  "description": "TypeScript ReactJs framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -50,7 +50,7 @@
50
50
  "@emotion/react": "^11.7.1",
51
51
  "@emotion/style": "^0.8.0",
52
52
  "@emotion/styled": "^11.6.0",
53
- "@etsoo/appscript": "^1.1.80",
53
+ "@etsoo/appscript": "^1.1.82",
54
54
  "@etsoo/notificationbase": "^1.0.94",
55
55
  "@etsoo/shared": "^1.0.78",
56
56
  "@mui/icons-material": "^5.2.4",
@@ -2,6 +2,11 @@
2
2
  * Refresh token request data
3
3
  */
4
4
  export type RefreshTokenRQ = {
5
+ /**
6
+ * Device id
7
+ */
8
+ deviceId: string;
9
+
5
10
  /**
6
11
  * Login password
7
12
  */
@@ -2,6 +2,8 @@ import {
2
2
  createClient,
3
3
  IApi,
4
4
  IApiPayload,
5
+ InitCallDto,
6
+ InitCallResult,
5
7
  RefreshTokenProps,
6
8
  RefreshTokenResult
7
9
  } from '@etsoo/appscript';
@@ -56,6 +58,15 @@ export class ServiceApp<
56
58
  this.coreApi = api;
57
59
  }
58
60
 
61
+ /**
62
+ * Api init call, connect to the core Api
63
+ * @param data Data
64
+ * @returns Result
65
+ */
66
+ protected override async apiInitCall(data: InitCallDto) {
67
+ return await this.coreApi.put<InitCallResult>(this.initCallApi, data);
68
+ }
69
+
59
70
  /**
60
71
  * Go to the login page
61
72
  */
@@ -96,6 +107,7 @@ export class ServiceApp<
96
107
  // Reqest data
97
108
  // Merge additional data passed
98
109
  const rq: RefreshTokenRQ = {
110
+ deviceId: this.deviceId,
99
111
  timezone: this.getTimeZone(),
100
112
  ...data
101
113
  };