Skip to content

Commit

Permalink
feat(dialogflow)!: update the API
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This release has breaking changes.
#### dialogflow:v2
The following keys were deleted:
- schemas.GoogleCloudDialogflowCxV3beta1PageInfo.properties.nextPage.description
- schemas.GoogleCloudDialogflowCxV3beta1PageInfo.properties.nextPage.type
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfo.properties.state.description
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfo.properties.state.enum
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfo.properties.state.enumDescriptions
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfo.properties.state.type
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo.properties.prompt.description
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo.properties.prompt.items.$ref
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo.properties.prompt.type

The following keys were changed:
- schemas.GoogleCloudDialogflowV2Agent.description

#### dialogflow:v2beta1
The following keys were deleted:
- schemas.GoogleCloudDialogflowCxV3beta1PageInfo.properties.nextPage.description
- schemas.GoogleCloudDialogflowCxV3beta1PageInfo.properties.nextPage.type
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfo.properties.state.description
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfo.properties.state.enum
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfo.properties.state.enumDescriptions
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfo.properties.state.type
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo.properties.prompt.description
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo.properties.prompt.items.$ref
- schemas.GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo.properties.prompt.type
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jun 5, 2020
1 parent 71960a2 commit 979ad5a
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 3,763 deletions.
31 changes: 2 additions & 29 deletions discovery/dialogflow-v2.json
Expand Up @@ -2049,7 +2049,7 @@
}
}
},
"revision": "20200527",
"revision": "20200604",
"rootUrl": "https://dialogflow.googleapis.com/",
"schemas": {
"GoogleCloudDialogflowCxV3beta1ExportAgentResponse": {
Expand Down Expand Up @@ -2079,10 +2079,6 @@
"formInfo": {
"$ref": "GoogleCloudDialogflowCxV3beta1PageInfoFormInfo",
"description": "Optional for both WebhookRequest and WebhookResponse.\nInformation about the form."
},
"nextPage": {
"description": "Deprecated. Please use WebhookResponse.target_page or\nWebhookResponse.target_flow instead.\n\nOptional for WebhookResponse.\nThe unique identifier of the next page. This field can be set by the\nwebhook to immediately transition to a page different from `current_page`.\nFormat: `projects/<Project ID>/locations/<Location ID>/agents/<Agent\nID>/flows/<Flow ID>/pages/<Page ID>`.",
"type": "string"
}
},
"type": "object"
Expand All @@ -2097,22 +2093,6 @@
"$ref": "GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo"
},
"type": "array"
},
"state": {
"description": "Always present for WebhookRequest. Ignored for WebhookResponse.\nThe current state of the form.",
"enum": [
"FORM_STATE_UNSPECIFIED",
"INITIALIZING",
"COLLECTING",
"FINALIZED"
],
"enumDescriptions": [
"Not specified. This value should be never used.",
"The server is initializing the form. The webhook can process the form\nbefore parameter collection begins.",
"The server is collecting form parameters from the user. The webhook can\nmodify form parameters that have been collected or are to be collected.",
"The server has collected all required form parameters from the user.\nThe webhook can modify collected form parameters. If any required\nparameter is invalidated by the webhook, the form will return to the\nparameter collection state; otherwise, parameter collection will\nconclude."
],
"type": "string"
}
},
"type": "object"
Expand All @@ -2129,13 +2109,6 @@
"description": "Optional for WebhookRequest. Ignored for WebhookResponse.\nIndicates if the parameter value was just collected on the last\nconversation turn.",
"type": "boolean"
},
"prompt": {
"description": "Not set for WebhookRequest. Optional for WebhookResponse.\nThe prompt to send to the user to fill a required form parameter. This\nfield can be set by the webhook. If set, this field overrides the\nprompt defined for the form parameter.",
"items": {
"$ref": "GoogleCloudDialogflowCxV3beta1ResponseMessage"
},
"type": "array"
},
"required": {
"description": "Optional for both WebhookRequest and WebhookResponse.\nIndicates whether the parameter is required. Optional parameters will\nnot trigger prompts; however, they are filled if the user specifies\nthem. Required parameters must be filled before form filling concludes.",
"type": "boolean"
Expand Down Expand Up @@ -2402,7 +2375,7 @@
"type": "object"
},
"GoogleCloudDialogflowV2Agent": {
"description": "Represents a conversational agent.",
"description": "A Dialogflow agent is a virtual agent that handles conversations with your\nend-users. It is a natural language understanding module that understands the\nnuances of human language. Dialogflow translates end-user text or audio\nduring a conversation to structured data that your apps and services can\nunderstand. You design and build a Dialogflow agent to handle the types of\nconversations required for your system.\n\nFor more information about agents, see the\n[Agents\ndocumentation](https://cloud.google.com/dialogflow/docs/agents-overview).",
"id": "GoogleCloudDialogflowV2Agent",
"properties": {
"apiVersion": {
Expand Down
29 changes: 1 addition & 28 deletions discovery/dialogflow-v2beta1.json
Expand Up @@ -4454,7 +4454,7 @@
}
}
},
"revision": "20200527",
"revision": "20200604",
"rootUrl": "https://dialogflow.googleapis.com/",
"schemas": {
"GoogleCloudDialogflowCxV3beta1ExportAgentResponse": {
Expand Down Expand Up @@ -4484,10 +4484,6 @@
"formInfo": {
"$ref": "GoogleCloudDialogflowCxV3beta1PageInfoFormInfo",
"description": "Optional for both WebhookRequest and WebhookResponse.\nInformation about the form."
},
"nextPage": {
"description": "Deprecated. Please use WebhookResponse.target_page or\nWebhookResponse.target_flow instead.\n\nOptional for WebhookResponse.\nThe unique identifier of the next page. This field can be set by the\nwebhook to immediately transition to a page different from `current_page`.\nFormat: `projects/<Project ID>/locations/<Location ID>/agents/<Agent\nID>/flows/<Flow ID>/pages/<Page ID>`.",
"type": "string"
}
},
"type": "object"
Expand All @@ -4502,22 +4498,6 @@
"$ref": "GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo"
},
"type": "array"
},
"state": {
"description": "Always present for WebhookRequest. Ignored for WebhookResponse.\nThe current state of the form.",
"enum": [
"FORM_STATE_UNSPECIFIED",
"INITIALIZING",
"COLLECTING",
"FINALIZED"
],
"enumDescriptions": [
"Not specified. This value should be never used.",
"The server is initializing the form. The webhook can process the form\nbefore parameter collection begins.",
"The server is collecting form parameters from the user. The webhook can\nmodify form parameters that have been collected or are to be collected.",
"The server has collected all required form parameters from the user.\nThe webhook can modify collected form parameters. If any required\nparameter is invalidated by the webhook, the form will return to the\nparameter collection state; otherwise, parameter collection will\nconclude."
],
"type": "string"
}
},
"type": "object"
Expand All @@ -4534,13 +4514,6 @@
"description": "Optional for WebhookRequest. Ignored for WebhookResponse.\nIndicates if the parameter value was just collected on the last\nconversation turn.",
"type": "boolean"
},
"prompt": {
"description": "Not set for WebhookRequest. Optional for WebhookResponse.\nThe prompt to send to the user to fill a required form parameter. This\nfield can be set by the webhook. If set, this field overrides the\nprompt defined for the form parameter.",
"items": {
"$ref": "GoogleCloudDialogflowCxV3beta1ResponseMessage"
},
"type": "array"
},
"required": {
"description": "Optional for both WebhookRequest and WebhookResponse.\nIndicates whether the parameter is required. Optional parameters will\nnot trigger prompts; however, they are filled if the user specifies\nthem. Required parameters must be filled before form filling concludes.",
"type": "boolean"
Expand Down
13 changes: 1 addition & 12 deletions src/apis/dialogflow/index.ts
Expand Up @@ -16,12 +16,10 @@
import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common';
import {dialogflow_v2} from './v2';
import {dialogflow_v2beta1} from './v2beta1';
import {dialogflow_v3alpha1} from './v3alpha1';

export const VERSIONS = {
v2: dialogflow_v2.Dialogflow,
v2beta1: dialogflow_v2beta1.Dialogflow,
v3alpha1: dialogflow_v3alpha1.Dialogflow,
};

export function dialogflow(version: 'v2'): dialogflow_v2.Dialogflow;
Expand All @@ -32,24 +30,15 @@ export function dialogflow(version: 'v2beta1'): dialogflow_v2beta1.Dialogflow;
export function dialogflow(
options: dialogflow_v2beta1.Options
): dialogflow_v2beta1.Dialogflow;
export function dialogflow(version: 'v3alpha1'): dialogflow_v3alpha1.Dialogflow;
export function dialogflow(
options: dialogflow_v3alpha1.Options
): dialogflow_v3alpha1.Dialogflow;
export function dialogflow<
T =
| dialogflow_v2.Dialogflow
| dialogflow_v2beta1.Dialogflow
| dialogflow_v3alpha1.Dialogflow
T = dialogflow_v2.Dialogflow | dialogflow_v2beta1.Dialogflow
>(
this: GoogleConfigurable,
versionOrOptions:
| 'v2'
| dialogflow_v2.Options
| 'v2beta1'
| dialogflow_v2beta1.Options
| 'v3alpha1'
| dialogflow_v3alpha1.Options
) {
return getAPI<T>('dialogflow', versionOrOptions, VERSIONS, this);
}
Expand Down
14 changes: 1 addition & 13 deletions src/apis/dialogflow/v2.ts
Expand Up @@ -152,10 +152,6 @@ export namespace dialogflow_v2 {
* Optional for both WebhookRequest and WebhookResponse. Information about the form.
*/
formInfo?: Schema$GoogleCloudDialogflowCxV3beta1PageInfoFormInfo;
/**
* Deprecated. Please use WebhookResponse.target_page or WebhookResponse.target_flow instead. Optional for WebhookResponse. The unique identifier of the next page. This field can be set by the webhook to immediately transition to a page different from `current_page`. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;`.
*/
nextPage?: string | null;
}
/**
* Represents form information.
Expand All @@ -165,10 +161,6 @@ export namespace dialogflow_v2 {
* Optional for both WebhookRequest and WebhookResponse. The parameters contained in the form. Note that the webhook cannot add or remove any form parameter.
*/
parameterInfo?: Schema$GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo[];
/**
* Always present for WebhookRequest. Ignored for WebhookResponse. The current state of the form.
*/
state?: string | null;
}
/**
* Represents parameter information.
Expand All @@ -182,10 +174,6 @@ export namespace dialogflow_v2 {
* Optional for WebhookRequest. Ignored for WebhookResponse. Indicates if the parameter value was just collected on the last conversation turn.
*/
justCollected?: boolean | null;
/**
* Not set for WebhookRequest. Optional for WebhookResponse. The prompt to send to the user to fill a required form parameter. This field can be set by the webhook. If set, this field overrides the prompt defined for the form parameter.
*/
prompt?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessage[];
/**
* Optional for both WebhookRequest and WebhookResponse. Indicates whether the parameter is required. Optional parameters will not trigger prompts; however, they are filled if the user specifies them. Required parameters must be filled before form filling concludes.
*/
Expand Down Expand Up @@ -375,7 +363,7 @@ export namespace dialogflow_v2 {
messages?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessage[];
}
/**
* Represents a conversational agent.
* A Dialogflow agent is a virtual agent that handles conversations with your end-users. It is a natural language understanding module that understands the nuances of human language. Dialogflow translates end-user text or audio during a conversation to structured data that your apps and services can understand. You design and build a Dialogflow agent to handle the types of conversations required for your system. For more information about agents, see the [Agents documentation](https://cloud.google.com/dialogflow/docs/agents-overview).
*/
export interface Schema$GoogleCloudDialogflowV2Agent {
/**
Expand Down
12 changes: 0 additions & 12 deletions src/apis/dialogflow/v2beta1.ts
Expand Up @@ -152,10 +152,6 @@ export namespace dialogflow_v2beta1 {
* Optional for both WebhookRequest and WebhookResponse. Information about the form.
*/
formInfo?: Schema$GoogleCloudDialogflowCxV3beta1PageInfoFormInfo;
/**
* Deprecated. Please use WebhookResponse.target_page or WebhookResponse.target_flow instead. Optional for WebhookResponse. The unique identifier of the next page. This field can be set by the webhook to immediately transition to a page different from `current_page`. Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;`.
*/
nextPage?: string | null;
}
/**
* Represents form information.
Expand All @@ -165,10 +161,6 @@ export namespace dialogflow_v2beta1 {
* Optional for both WebhookRequest and WebhookResponse. The parameters contained in the form. Note that the webhook cannot add or remove any form parameter.
*/
parameterInfo?: Schema$GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo[];
/**
* Always present for WebhookRequest. Ignored for WebhookResponse. The current state of the form.
*/
state?: string | null;
}
/**
* Represents parameter information.
Expand All @@ -182,10 +174,6 @@ export namespace dialogflow_v2beta1 {
* Optional for WebhookRequest. Ignored for WebhookResponse. Indicates if the parameter value was just collected on the last conversation turn.
*/
justCollected?: boolean | null;
/**
* Not set for WebhookRequest. Optional for WebhookResponse. The prompt to send to the user to fill a required form parameter. This field can be set by the webhook. If set, this field overrides the prompt defined for the form parameter.
*/
prompt?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessage[];
/**
* Optional for both WebhookRequest and WebhookResponse. Indicates whether the parameter is required. Optional parameters will not trigger prompts; however, they are filled if the user specifies them. Required parameters must be filled before form filling concludes.
*/
Expand Down

0 comments on commit 979ad5a

Please sign in to comment.