Skip to content

Commit

Permalink
chore(nodejs): remove api-extractor dependencies (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
fhinkel authored Jun 10, 2021
1 parent fd3b244 commit 0f23191
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
21 changes: 12 additions & 9 deletions dialogflow/detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,10 @@ async function detectEventIntent(
if (result.outputContexts && result.outputContexts.length) {
console.log(' Output contexts:');
result.outputContexts.forEach(context => {
const contextId = contextClient.matchContextFromProjectAgentSessionContextName(
context.name
);
const contextId =
contextClient.matchContextFromProjectAgentSessionContextName(
context.name
);
const contextParameters = JSON.stringify(
struct.decode(context.parameters)
);
Expand Down Expand Up @@ -224,9 +225,10 @@ async function detectAudioIntent(
if (result.outputContexts && result.outputContexts.length) {
console.log(' Output contexts:');
result.outputContexts.forEach(context => {
const contextId = contextClient.matchContextFromProjectAgentSessionContextName(
context.name
);
const contextId =
contextClient.matchContextFromProjectAgentSessionContextName(
context.name
);
const contextParameters = JSON.stringify(
struct.decode(context.parameters)
);
Expand Down Expand Up @@ -314,9 +316,10 @@ async function streamingDetectIntent(
if (result.outputContexts && result.outputContexts.length) {
console.log(' Output contexts:');
result.outputContexts.forEach(context => {
const contextId = contextClient.matchContextFromProjectAgentSessionContextName(
context.name
);
const contextId =
contextClient.matchContextFromProjectAgentSessionContextName(
context.name
);
const contextParameters = JSON.stringify(
struct.decode(context.parameters)
);
Expand Down
22 changes: 12 additions & 10 deletions dialogflow/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ async function createSessionEntityType(
projectId,
sessionId
);
const sessionEntityTypePath = sessionEntityTypesClient.projectAgentSessionEntityTypePath(
projectId,
sessionId,
entityTypeDisplayName
);
const sessionEntityTypePath =
sessionEntityTypesClient.projectAgentSessionEntityTypePath(
projectId,
sessionId,
entityTypeDisplayName
);

// Here we use the entity value as the only synonym.
const entities = [];
Expand Down Expand Up @@ -126,11 +127,12 @@ async function deleteSessionEntityType(
const sessionEntityTypesClient = new dialogflow.SessionEntityTypesClient();

// The path to identify the sessionEntityType to be deleted.
const sessionEntityTypePath = sessionEntityTypesClient.projectAgentSessionEntityTypePath(
projectId,
sessionId,
entityTypeDisplayName
);
const sessionEntityTypePath =
sessionEntityTypesClient.projectAgentSessionEntityTypePath(
projectId,
sessionId,
entityTypeDisplayName
);

const request = {
name: sessionEntityTypePath,
Expand Down

0 comments on commit 0f23191

Please sign in to comment.