@etsoo/appscript 1.6.16 → 1.6.18

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.
@@ -64,6 +64,14 @@ export declare class AuthApi extends BaseApi {
64
64
  * @returns Result
65
65
  */
66
66
  exchangeToken(rq: TokenInputRQ, payload?: IApiPayload<ApiRefreshTokenDto>): Promise<ApiRefreshTokenDto | undefined>;
67
+ /**
68
+ * Get auth request
69
+ * @param deviceId Device ID
70
+ * @param payload Payload
71
+ * @param apiHost API host
72
+ * @returns Result
73
+ */
74
+ getAuthRequest(deviceId?: string, payload?: IApiPayload<AuthRequest>, apiHost?: string): Promise<AuthRequest | undefined>;
67
75
  /**
68
76
  * Get log in url
69
77
  * @param deviceId Device ID
@@ -76,6 +76,20 @@ class AuthApi extends BaseApi_1.BaseApi {
76
76
  const data = { ...rq, timeZone: this.app.getTimeZone() };
77
77
  return this.api.put("Auth/ExchangeToken", data, payload);
78
78
  }
79
+ /**
80
+ * Get auth request
81
+ * @param deviceId Device ID
82
+ * @param payload Payload
83
+ * @param apiHost API host
84
+ * @returns Result
85
+ */
86
+ getAuthRequest(deviceId, payload, apiHost) {
87
+ const rq = {
88
+ region: this.app.region,
89
+ device: deviceId ?? this.app.deviceId
90
+ };
91
+ return this.api.post(`${apiHost ?? ""}Auth/GetAuthRequest`, rq, payload);
92
+ }
79
93
  /**
80
94
  * Get log in url
81
95
  * @param deviceId Device ID
@@ -64,6 +64,14 @@ export declare class AuthApi extends BaseApi {
64
64
  * @returns Result
65
65
  */
66
66
  exchangeToken(rq: TokenInputRQ, payload?: IApiPayload<ApiRefreshTokenDto>): Promise<ApiRefreshTokenDto | undefined>;
67
+ /**
68
+ * Get auth request
69
+ * @param deviceId Device ID
70
+ * @param payload Payload
71
+ * @param apiHost API host
72
+ * @returns Result
73
+ */
74
+ getAuthRequest(deviceId?: string, payload?: IApiPayload<AuthRequest>, apiHost?: string): Promise<AuthRequest | undefined>;
67
75
  /**
68
76
  * Get log in url
69
77
  * @param deviceId Device ID
@@ -73,6 +73,20 @@ export class AuthApi extends BaseApi {
73
73
  const data = { ...rq, timeZone: this.app.getTimeZone() };
74
74
  return this.api.put("Auth/ExchangeToken", data, payload);
75
75
  }
76
+ /**
77
+ * Get auth request
78
+ * @param deviceId Device ID
79
+ * @param payload Payload
80
+ * @param apiHost API host
81
+ * @returns Result
82
+ */
83
+ getAuthRequest(deviceId, payload, apiHost) {
84
+ const rq = {
85
+ region: this.app.region,
86
+ device: deviceId ?? this.app.deviceId
87
+ };
88
+ return this.api.post(`${apiHost ?? ""}Auth/GetAuthRequest`, rq, payload);
89
+ }
76
90
  /**
77
91
  * Get log in url
78
92
  * @param deviceId Device ID
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.6.16",
3
+ "version": "1.6.18",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -36,20 +36,20 @@
36
36
  "homepage": "https://github.com/ETSOO/AppScript#readme",
37
37
  "dependencies": {
38
38
  "@etsoo/notificationbase": "^1.1.59",
39
- "@etsoo/restclient": "^1.1.24",
39
+ "@etsoo/restclient": "^1.1.25",
40
40
  "@etsoo/shared": "^1.2.62",
41
41
  "crypto-js": "^4.2.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@babel/cli": "^7.26.4",
45
- "@babel/core": "^7.26.9",
46
- "@babel/plugin-transform-runtime": "^7.26.9",
45
+ "@babel/core": "^7.26.10",
46
+ "@babel/plugin-transform-runtime": "^7.26.10",
47
47
  "@babel/preset-env": "^7.26.9",
48
- "@babel/runtime-corejs3": "^7.26.9",
48
+ "@babel/runtime-corejs3": "^7.26.10",
49
49
  "@types/crypto-js": "^4.2.2",
50
50
  "@vitejs/plugin-react": "^4.3.4",
51
51
  "jsdom": "^26.0.0",
52
- "typescript": "^5.7.3",
53
- "vitest": "^3.0.7"
52
+ "typescript": "^5.8.2",
53
+ "vitest": "^3.0.8"
54
54
  }
55
55
  }
@@ -113,6 +113,25 @@ export class AuthApi extends BaseApi {
113
113
  return this.api.put("Auth/ExchangeToken", data, payload);
114
114
  }
115
115
 
116
+ /**
117
+ * Get auth request
118
+ * @param deviceId Device ID
119
+ * @param payload Payload
120
+ * @param apiHost API host
121
+ * @returns Result
122
+ */
123
+ getAuthRequest(
124
+ deviceId?: string,
125
+ payload?: IApiPayload<AuthRequest>,
126
+ apiHost?: string
127
+ ) {
128
+ const rq: GetLogInUrlRQ = {
129
+ region: this.app.region,
130
+ device: deviceId ?? this.app.deviceId
131
+ };
132
+ return this.api.post(`${apiHost ?? ""}Auth/GetAuthRequest`, rq, payload);
133
+ }
134
+
116
135
  /**
117
136
  * Get log in url
118
137
  * @param deviceId Device ID