@etsoo/appscript 1.1.89 → 1.1.90
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/app/CoreApp.d.ts
CHANGED
|
@@ -291,9 +291,10 @@ export interface ICoreApp<S extends IAppSettings, N, C extends NotificationCallP
|
|
|
291
291
|
orgList(items?: number, serviceId?: number): Promise<IdLabelDto[] | undefined>;
|
|
292
292
|
/**
|
|
293
293
|
* Switch organization
|
|
294
|
-
* @param
|
|
294
|
+
* @param id Organization id
|
|
295
|
+
* @param serviceId Service id
|
|
295
296
|
*/
|
|
296
|
-
switchOrg(
|
|
297
|
+
switchOrg(id: number, serviceId?: number): Promise<boolean | undefined>;
|
|
297
298
|
/**
|
|
298
299
|
* Go to the login page
|
|
299
300
|
*/
|
|
@@ -688,8 +689,9 @@ export declare abstract class CoreApp<S extends IAppSettings, N, C extends Notif
|
|
|
688
689
|
/**
|
|
689
690
|
* Switch organization
|
|
690
691
|
* @param id Organization id
|
|
692
|
+
* @param serviceId Service id
|
|
691
693
|
*/
|
|
692
|
-
switchOrg(id: number): Promise<boolean | undefined>;
|
|
694
|
+
switchOrg(id: number, serviceId?: number): Promise<boolean | undefined>;
|
|
693
695
|
/**
|
|
694
696
|
* Go to the login page
|
|
695
697
|
*/
|
package/lib/cjs/app/CoreApp.js
CHANGED
|
@@ -818,10 +818,11 @@ class CoreApp {
|
|
|
818
818
|
/**
|
|
819
819
|
* Switch organization
|
|
820
820
|
* @param id Organization id
|
|
821
|
+
* @param serviceId Service id
|
|
821
822
|
*/
|
|
822
|
-
async switchOrg(id) {
|
|
823
|
-
const api = `Organization/Switch
|
|
824
|
-
const result = await this.api.put(api);
|
|
823
|
+
async switchOrg(id, serviceId) {
|
|
824
|
+
const api = `Organization/Switch`;
|
|
825
|
+
const result = await this.api.put(api, { id, serviceId });
|
|
825
826
|
if (result)
|
|
826
827
|
return await this.refreshToken();
|
|
827
828
|
return result;
|
package/lib/mjs/app/CoreApp.d.ts
CHANGED
|
@@ -291,9 +291,10 @@ export interface ICoreApp<S extends IAppSettings, N, C extends NotificationCallP
|
|
|
291
291
|
orgList(items?: number, serviceId?: number): Promise<IdLabelDto[] | undefined>;
|
|
292
292
|
/**
|
|
293
293
|
* Switch organization
|
|
294
|
-
* @param
|
|
294
|
+
* @param id Organization id
|
|
295
|
+
* @param serviceId Service id
|
|
295
296
|
*/
|
|
296
|
-
switchOrg(
|
|
297
|
+
switchOrg(id: number, serviceId?: number): Promise<boolean | undefined>;
|
|
297
298
|
/**
|
|
298
299
|
* Go to the login page
|
|
299
300
|
*/
|
|
@@ -688,8 +689,9 @@ export declare abstract class CoreApp<S extends IAppSettings, N, C extends Notif
|
|
|
688
689
|
/**
|
|
689
690
|
* Switch organization
|
|
690
691
|
* @param id Organization id
|
|
692
|
+
* @param serviceId Service id
|
|
691
693
|
*/
|
|
692
|
-
switchOrg(id: number): Promise<boolean | undefined>;
|
|
694
|
+
switchOrg(id: number, serviceId?: number): Promise<boolean | undefined>;
|
|
693
695
|
/**
|
|
694
696
|
* Go to the login page
|
|
695
697
|
*/
|
package/lib/mjs/app/CoreApp.js
CHANGED
|
@@ -815,10 +815,11 @@ export class CoreApp {
|
|
|
815
815
|
/**
|
|
816
816
|
* Switch organization
|
|
817
817
|
* @param id Organization id
|
|
818
|
+
* @param serviceId Service id
|
|
818
819
|
*/
|
|
819
|
-
async switchOrg(id) {
|
|
820
|
-
const api = `Organization/Switch
|
|
821
|
-
const result = await this.api.put(api);
|
|
820
|
+
async switchOrg(id, serviceId) {
|
|
821
|
+
const api = `Organization/Switch`;
|
|
822
|
+
const result = await this.api.put(api, { id, serviceId });
|
|
822
823
|
if (result)
|
|
823
824
|
return await this.refreshToken();
|
|
824
825
|
return result;
|
package/package.json
CHANGED
package/src/app/CoreApp.ts
CHANGED
|
@@ -400,9 +400,10 @@ export interface ICoreApp<
|
|
|
400
400
|
|
|
401
401
|
/**
|
|
402
402
|
* Switch organization
|
|
403
|
-
* @param
|
|
403
|
+
* @param id Organization id
|
|
404
|
+
* @param serviceId Service id
|
|
404
405
|
*/
|
|
405
|
-
switchOrg(
|
|
406
|
+
switchOrg(id: number, serviceId?: number): Promise<boolean | undefined>;
|
|
406
407
|
|
|
407
408
|
/**
|
|
408
409
|
* Go to the login page
|
|
@@ -1474,10 +1475,11 @@ export abstract class CoreApp<
|
|
|
1474
1475
|
/**
|
|
1475
1476
|
* Switch organization
|
|
1476
1477
|
* @param id Organization id
|
|
1478
|
+
* @param serviceId Service id
|
|
1477
1479
|
*/
|
|
1478
|
-
async switchOrg(id: number) {
|
|
1479
|
-
const api = `Organization/Switch
|
|
1480
|
-
const result = await this.api.put<boolean>(api);
|
|
1480
|
+
async switchOrg(id: number, serviceId?: number) {
|
|
1481
|
+
const api = `Organization/Switch`;
|
|
1482
|
+
const result = await this.api.put<boolean>(api, { id, serviceId });
|
|
1481
1483
|
if (result) return await this.refreshToken();
|
|
1482
1484
|
return result;
|
|
1483
1485
|
}
|