@ampsec/platform-client 45.8.0 → 45.8.1
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.
|
@@ -5,7 +5,7 @@ export declare class ConnectorInstallService {
|
|
|
5
5
|
constructor(rest: RestClient, targetApi: string);
|
|
6
6
|
credentials: (cid: string, credentials: {
|
|
7
7
|
[key: string]: unknown;
|
|
8
|
-
}) => Promise<
|
|
8
|
+
}) => Promise<boolean>;
|
|
9
9
|
getInstallToken: (cid: string) => Promise<string>;
|
|
10
10
|
getRedirectUrl: (token: string) => Promise<string>;
|
|
11
11
|
buildInstallOAuthUrl: (token: string, redirectUrl: string) => string;
|
|
@@ -9,8 +9,8 @@ class ConnectorInstallService {
|
|
|
9
9
|
method: 'POST',
|
|
10
10
|
data: { cid, credentials },
|
|
11
11
|
});
|
|
12
|
-
const
|
|
13
|
-
return
|
|
12
|
+
const success = res.data.success;
|
|
13
|
+
return success;
|
|
14
14
|
};
|
|
15
15
|
this.getInstallToken = async (cid) => {
|
|
16
16
|
const res = await this.rest.call({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectorInstallService.js","sourceRoot":"","sources":["../../../../src/services/rest/ConnectorInstallService.ts"],"names":[],"mappings":";;;AAEA,MAAa,uBAAuB;IAIlC,YAAY,IAAgB,EAAE,SAAiB;QAK/C,gBAAW,GAAG,KAAK,EAAE,GAAW,EAAE,WAAqC,
|
|
1
|
+
{"version":3,"file":"ConnectorInstallService.js","sourceRoot":"","sources":["../../../../src/services/rest/ConnectorInstallService.ts"],"names":[],"mappings":";;;AAEA,MAAa,uBAAuB;IAIlC,YAAY,IAAgB,EAAE,SAAiB;QAK/C,gBAAW,GAAG,KAAK,EAAE,GAAW,EAAE,WAAqC,EAAoB,EAAE;YAC3F,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAC/B,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,yB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15 @@ export class ConnectorInstallService {
|
|
|
9
9
|
this.targetApi = targetApi;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
credentials = async (cid: string, credentials: {[key: string]: unknown}): Promise<
|
|
12
|
+
credentials = async (cid: string, credentials: {[key: string]: unknown}): Promise<boolean> => {
|
|
13
13
|
const res = await this.rest.call({
|
|
14
14
|
url: `/${this.targetApi}/v1/install/credentials`,
|
|
15
15
|
method: 'POST',
|
|
16
16
|
data: {cid, credentials},
|
|
17
17
|
});
|
|
18
|
-
const
|
|
19
|
-
|
|
18
|
+
const success = (res.data as {success: boolean}).success;
|
|
19
|
+
|
|
20
|
+
return success;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
getInstallToken = async (cid: string): Promise<string> => {
|