fix(basic.gblib): Fixed get token from BASIC methods.
This commit is contained in:
parent
b77a4b099b
commit
6399c2dd0f
4 changed files with 19 additions and 10 deletions
|
@ -73,3 +73,10 @@ ALTER TABLE dbo.GuaribasConversation ADD
|
||||||
instanceId int,
|
instanceId int,
|
||||||
feedback nvarchar(512) NULL
|
feedback nvarchar(512) NULL
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE [dbo].[GuaribasInstance] DROP COLUMN [translatorendpoint]
|
||||||
|
GO
|
||||||
|
ALTER TABLE dbo.GuaribasInstance ADD
|
||||||
|
translatorEndpoint nvarchar(128) NULL
|
||||||
|
GO
|
||||||
|
|
|
@ -261,6 +261,7 @@ export class GBAdminService implements IGBAdminService {
|
||||||
const refreshToken = await this.getValue(instanceId, 'refreshToken');
|
const refreshToken = await this.getValue(instanceId, 'refreshToken');
|
||||||
const resource = 'https://graph.microsoft.com';
|
const resource = 'https://graph.microsoft.com';
|
||||||
const authenticationContext = new AuthenticationContext(authorizationUrl);
|
const authenticationContext = new AuthenticationContext(authorizationUrl);
|
||||||
|
|
||||||
authenticationContext.acquireTokenWithRefreshToken(
|
authenticationContext.acquireTokenWithRefreshToken(
|
||||||
refreshToken,
|
refreshToken,
|
||||||
instance.marketplaceId,
|
instance.marketplaceId,
|
||||||
|
|
|
@ -81,7 +81,7 @@ export class SystemKeywords {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const baseUrl = `https://graph.microsoft.com/v1.0/sites/${siteId}/lists/${libraryId}`;
|
const baseUrl = `https://graph.microsoft.com/v1.0/sites/${siteId}/lists/${libraryId}`;
|
||||||
return [client, baseUrl];
|
return [baseUrl, client];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -259,6 +259,7 @@ export class SystemKeywords {
|
||||||
let document = await this.internalGetDocument(client, baseUrl, path, file);
|
let document = await this.internalGetDocument(client, baseUrl, path, file);
|
||||||
|
|
||||||
// Creates workbook session that will be discarded.
|
// Creates workbook session that will be discarded.
|
||||||
|
|
||||||
let sheets = await client
|
let sheets = await client
|
||||||
.api(`${baseUrl}/drive/items/${document.id}/workbook/worksheets`)
|
.api(`${baseUrl}/drive/items/${document.id}/workbook/worksheets`)
|
||||||
.get();
|
.get();
|
||||||
|
|
|
@ -381,15 +381,15 @@ export class GBDeployer implements IGBDeployer {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Retrieves all files in .bot folder.
|
||||||
// Retrives all files in .bot folder.
|
|
||||||
|
|
||||||
const botId = min.instance.botId;
|
const botId = min.instance.botId;
|
||||||
const path = `/${botId}.gbai/${botId}.gbot`;
|
const path = `/${botId}.gbai/${botId}.gbot`;
|
||||||
GBLog.info(`Loading .gbot from ${path}.`);
|
let url = `https://graph.microsoft.com/v1.0/sites/${siteId}/lists/${libraryId}/drive/root:${path}:/children`;
|
||||||
|
|
||||||
|
GBLog.info(`Loading .gbot from Excel: ${url}`);
|
||||||
const res = await client
|
const res = await client
|
||||||
.api(`https://graph.microsoft.com/v1.0/sites/${siteId}/lists/${libraryId}/drive/root:${path}:/children`)
|
.api(url)
|
||||||
.get();
|
.get();
|
||||||
|
|
||||||
// Finds Config.xlsx.
|
// Finds Config.xlsx.
|
||||||
|
|
Loading…
Add table
Reference in a new issue