@etsoo/appscript 1.5.81 → 1.5.83
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/lib/cjs/api/AuthApi.js +1 -1
- package/lib/cjs/api/rq/SwitchOrgRQ.d.ts +4 -0
- package/lib/cjs/app/IApp.d.ts +2 -1
- package/lib/mjs/api/AuthApi.js +1 -1
- package/lib/mjs/api/rq/SwitchOrgRQ.d.ts +4 -0
- package/lib/mjs/app/IApp.d.ts +2 -1
- package/package.json +1 -1
- package/src/api/AuthApi.ts +1 -1
- package/src/api/rq/SwitchOrgRQ.ts +5 -0
- package/src/app/IApp.ts +2 -1
package/lib/cjs/api/AuthApi.js
CHANGED
|
@@ -171,7 +171,7 @@ class AuthApi extends BaseApi_1.BaseApi {
|
|
|
171
171
|
payload ?? (payload = {});
|
|
172
172
|
tokenKey ?? (tokenKey = AuthApi.HeaderTokenField);
|
|
173
173
|
// Call the API
|
|
174
|
-
const result = await this.api.
|
|
174
|
+
const result = await this.api.put("Auth/SwitchOrg", rq, payload);
|
|
175
175
|
// Get the refresh token
|
|
176
176
|
const refreshToken = result?.ok
|
|
177
177
|
? this.app.getResponseToken(payload.response, tokenKey)
|
package/lib/cjs/app/IApp.d.ts
CHANGED
|
@@ -69,8 +69,9 @@ export type AppLoginParams = {
|
|
|
69
69
|
export type AppTryLoginParams = AppLoginParams & {
|
|
70
70
|
/**
|
|
71
71
|
* Callback on failure
|
|
72
|
+
* @param type Failure type
|
|
72
73
|
*/
|
|
73
|
-
onFailure?: () => void;
|
|
74
|
+
onFailure?: (type: string) => void;
|
|
74
75
|
/**
|
|
75
76
|
* Callback on success
|
|
76
77
|
*/
|
package/lib/mjs/api/AuthApi.js
CHANGED
|
@@ -168,7 +168,7 @@ export class AuthApi extends BaseApi {
|
|
|
168
168
|
payload ?? (payload = {});
|
|
169
169
|
tokenKey ?? (tokenKey = AuthApi.HeaderTokenField);
|
|
170
170
|
// Call the API
|
|
171
|
-
const result = await this.api.
|
|
171
|
+
const result = await this.api.put("Auth/SwitchOrg", rq, payload);
|
|
172
172
|
// Get the refresh token
|
|
173
173
|
const refreshToken = result?.ok
|
|
174
174
|
? this.app.getResponseToken(payload.response, tokenKey)
|
package/lib/mjs/app/IApp.d.ts
CHANGED
|
@@ -69,8 +69,9 @@ export type AppLoginParams = {
|
|
|
69
69
|
export type AppTryLoginParams = AppLoginParams & {
|
|
70
70
|
/**
|
|
71
71
|
* Callback on failure
|
|
72
|
+
* @param type Failure type
|
|
72
73
|
*/
|
|
73
|
-
onFailure?: () => void;
|
|
74
|
+
onFailure?: (type: string) => void;
|
|
74
75
|
/**
|
|
75
76
|
* Callback on success
|
|
76
77
|
*/
|
package/package.json
CHANGED
package/src/api/AuthApi.ts
CHANGED
|
@@ -231,7 +231,7 @@ export class AuthApi extends BaseApi {
|
|
|
231
231
|
tokenKey ??= AuthApi.HeaderTokenField;
|
|
232
232
|
|
|
233
233
|
// Call the API
|
|
234
|
-
const result = await this.api.
|
|
234
|
+
const result = await this.api.put("Auth/SwitchOrg", rq, payload);
|
|
235
235
|
|
|
236
236
|
// Get the refresh token
|
|
237
237
|
const refreshToken = result?.ok
|
package/src/app/IApp.ts
CHANGED
|
@@ -95,8 +95,9 @@ export type AppLoginParams = {
|
|
|
95
95
|
export type AppTryLoginParams = AppLoginParams & {
|
|
96
96
|
/**
|
|
97
97
|
* Callback on failure
|
|
98
|
+
* @param type Failure type
|
|
98
99
|
*/
|
|
99
|
-
onFailure?: () => void;
|
|
100
|
+
onFailure?: (type: string) => void;
|
|
100
101
|
|
|
101
102
|
/**
|
|
102
103
|
* Callback on success
|