Skip to content

Commit

Permalink
feat(workflowexecutions): update the API
Browse files Browse the repository at this point in the history
#### workflowexecutions:v1

The following keys were added:
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.description
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.flatPath
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.httpMethod
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.id
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.parameterOrder
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.parameters.name.description
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.parameters.name.location
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.parameters.name.pattern
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.parameters.name.required
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.parameters.name.type
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.path
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.request.$ref
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.response.$ref
- resources.projects.resources.locations.resources.workflows.resources.executions.methods.deleteExecutionHistory.scopes
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.get.parameters.view.deprecated
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.get.parameters.view.description
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.get.parameters.view.enum
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.get.parameters.view.enumDescriptions
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.get.parameters.view.location
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.get.parameters.view.type
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.list.parameters.view.deprecated
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.list.parameters.view.description
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.list.parameters.view.enum
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.list.parameters.view.enumDescriptions
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.list.parameters.view.location
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.list.parameters.view.type
- schemas.DeleteExecutionHistoryRequest.description
- schemas.DeleteExecutionHistoryRequest.id
- schemas.DeleteExecutionHistoryRequest.type
- schemas.Empty.description
- schemas.Empty.id
- schemas.Empty.type
- schemas.StepEntry.properties.variableData.$ref
- schemas.StepEntry.properties.variableData.description
- schemas.StepEntry.properties.variableData.readOnly
- schemas.VariableData.description
- schemas.VariableData.id
- schemas.VariableData.properties.variables.additionalProperties.type
- schemas.VariableData.properties.variables.description
- schemas.VariableData.properties.variables.type
- schemas.VariableData.type

The following keys were changed:
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.list.parameters.filter.description
- resources.projects.resources.locations.resources.workflows.resources.executions.resources.stepEntries.methods.list.parameters.parent.description
  • Loading branch information
yoshi-automation authored and sofisl committed Aug 27, 2024
1 parent 614baa2 commit 7e5f42a
Show file tree
Hide file tree
Showing 2 changed files with 227 additions and 5 deletions.
97 changes: 94 additions & 3 deletions discovery/workflowexecutions-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,34 @@
"https://www.googleapis.com/auth/cloud-platform"
]
},
"deleteExecutionHistory": {
"description": "Deletes all step entries for an execution.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}:deleteExecutionHistory",
"httpMethod": "POST",
"id": "workflowexecutions.projects.locations.workflows.executions.deleteExecutionHistory",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Name of the execution for which step entries should be deleted. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}:deleteExecutionHistory",
"request": {
"$ref": "DeleteExecutionHistoryRequest"
},
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"exportData": {
"description": "Returns all metadata stored about an execution, excluding most data that is already accessible using other API methods.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}:exportData",
Expand Down Expand Up @@ -384,6 +412,22 @@
"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+/stepEntries/[^/]+$",
"required": true,
"type": "string"
},
"view": {
"deprecated": true,
"description": "Deprecated field.",
"enum": [
"EXECUTION_ENTRY_VIEW_UNSPECIFIED",
"EXECUTION_ENTRY_VIEW_BASIC",
"EXECUTION_ENTRY_VIEW_DETAILED"
],
"enumDescriptions": [
"The default/unset value.",
"Include basic information in the step entries. All fields in StepEntry are returned except for variable_data.",
"Include all data."
],
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
Expand All @@ -404,7 +448,7 @@
],
"parameters": {
"filter": {
"description": "Optional. Filters applied to the `[StepEntries.ListStepEntries]` results. The following fields are supported for filtering: `entryId`, `createTime`, `updateTime`, `routine`, `step`, `stepType`, `state`. For details, see AIP-160. For example, if you are using the Google APIs Explorer: `state=\"SUCCEEDED\"` or `createTime>\"2023-08-01\" AND state=\"FAILED\"`",
"description": "Optional. Filters applied to the `[StepEntries.ListStepEntries]` results. The following fields are supported for filtering: `entryId`, `createTime`, `updateTime`, `routine`, `step`, `stepType`, `parent`, `state`. For details, see AIP-160. For example, if you are using the Google APIs Explorer: `state=\"SUCCEEDED\"` or `createTime>\"2023-08-01\" AND state=\"FAILED\"`",
"location": "query",
"type": "string"
},
Expand All @@ -425,7 +469,7 @@
"type": "string"
},
"parent": {
"description": "Required. Name of the workflow execution to list entries for. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}/stepEntries/",
"description": "Required. Name of the workflow execution to list entries for. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$",
"required": true,
Expand All @@ -436,6 +480,22 @@
"format": "int32",
"location": "query",
"type": "integer"
},
"view": {
"deprecated": true,
"description": "Deprecated field.",
"enum": [
"EXECUTION_ENTRY_VIEW_UNSPECIFIED",
"EXECUTION_ENTRY_VIEW_BASIC",
"EXECUTION_ENTRY_VIEW_DETAILED"
],
"enumDescriptions": [
"The default/unset value.",
"Include basic information in the step entries. All fields in StepEntry are returned except for variable_data.",
"Include all data."
],
"location": "query",
"type": "string"
}
},
"path": "v1/{+parent}/stepEntries",
Expand All @@ -457,7 +517,7 @@
}
}
},
"revision": "20240715",
"revision": "20240813",
"rootUrl": "https://workflowexecutions.googleapis.com/",
"schemas": {
"Callback": {
Expand Down Expand Up @@ -497,6 +557,18 @@
"properties": {},
"type": "object"
},
"DeleteExecutionHistoryRequest": {
"description": "Request for the DeleteExecutionHistory method.",
"id": "DeleteExecutionHistoryRequest",
"properties": {},
"type": "object"
},
"Empty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
"id": "Empty",
"properties": {},
"type": "object"
},
"Error": {
"description": "Error describes why the execution was abnormally terminated.",
"id": "Error",
Expand Down Expand Up @@ -1012,6 +1084,11 @@
"format": "google-datetime",
"readOnly": true,
"type": "string"
},
"variableData": {
"$ref": "VariableData",
"description": "Output only. The VariableData associated to this step.",
"readOnly": true
}
},
"type": "object"
Expand Down Expand Up @@ -1080,6 +1157,20 @@
}
},
"type": "object"
},
"VariableData": {
"description": "VariableData contains the variable data for this step.",
"id": "VariableData",
"properties": {
"variables": {
"additionalProperties": {
"type": "any"
},
"description": "Variables that are associated with this step.",
"type": "object"
}
},
"type": "object"
}
},
"servicePath": "",
Expand Down
135 changes: 133 additions & 2 deletions src/apis/workflowexecutions/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ export namespace workflowexecutions_v1 {
* Request for the CancelExecution method.
*/
export interface Schema$CancelExecutionRequest {}
/**
* Request for the DeleteExecutionHistory method.
*/
export interface Schema$DeleteExecutionHistoryRequest {}
/**
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
*/
export interface Schema$Empty {}
/**
* Error describes why the execution was abnormally terminated.
*/
Expand Down Expand Up @@ -468,6 +476,10 @@ export namespace workflowexecutions_v1 {
* Output only. The most recently updated time of the step entry.
*/
updateTime?: string | null;
/**
* Output only. The VariableData associated to this step.
*/
variableData?: Schema$VariableData;
}
/**
* StepEntryMetadata contains metadata information about this step.
Expand Down Expand Up @@ -511,6 +523,15 @@ export namespace workflowexecutions_v1 {
*/
subscription?: string | null;
}
/**
* VariableData contains the variable data for this step.
*/
export interface Schema$VariableData {
/**
* Variables that are associated with this step.
*/
variables?: {[key: string]: any} | null;
}

export class Resource$Projects {
context: APIRequestContext;
Expand Down Expand Up @@ -839,6 +860,96 @@ export namespace workflowexecutions_v1 {
}
}

/**
* Deletes all step entries for an execution.
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
deleteExecutionHistory(
params: Params$Resource$Projects$Locations$Workflows$Executions$Deleteexecutionhistory,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
deleteExecutionHistory(
params?: Params$Resource$Projects$Locations$Workflows$Executions$Deleteexecutionhistory,
options?: MethodOptions
): GaxiosPromise<Schema$Empty>;
deleteExecutionHistory(
params: Params$Resource$Projects$Locations$Workflows$Executions$Deleteexecutionhistory,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
deleteExecutionHistory(
params: Params$Resource$Projects$Locations$Workflows$Executions$Deleteexecutionhistory,
options: MethodOptions | BodyResponseCallback<Schema$Empty>,
callback: BodyResponseCallback<Schema$Empty>
): void;
deleteExecutionHistory(
params: Params$Resource$Projects$Locations$Workflows$Executions$Deleteexecutionhistory,
callback: BodyResponseCallback<Schema$Empty>
): void;
deleteExecutionHistory(callback: BodyResponseCallback<Schema$Empty>): void;
deleteExecutionHistory(
paramsOrCallback?:
| Params$Resource$Projects$Locations$Workflows$Executions$Deleteexecutionhistory
| BodyResponseCallback<Schema$Empty>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$Empty>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$Empty>
| BodyResponseCallback<Readable>
): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Projects$Locations$Workflows$Executions$Deleteexecutionhistory;
let options = (optionsOrCallback || {}) as MethodOptions;

if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params =
{} as Params$Resource$Projects$Locations$Workflows$Executions$Deleteexecutionhistory;
options = {};
}

if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}

const rootUrl =
options.rootUrl || 'https://workflowexecutions.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/v1/{+name}:deleteExecutionHistory').replace(
/([^:]\/)\/+/g,
'$1'
),
method: 'POST',
apiVersion: '',
},
options
),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
createAPIRequest<Schema$Empty>(
parameters,
callback as BodyResponseCallback<unknown>
);
} else {
return createAPIRequest<Schema$Empty>(parameters);
}
}

/**
* Returns all metadata stored about an execution, excluding most data that is already accessible using other API methods.
*
Expand Down Expand Up @@ -1139,6 +1250,18 @@ export namespace workflowexecutions_v1 {
*/
requestBody?: Schema$Execution;
}
export interface Params$Resource$Projects$Locations$Workflows$Executions$Deleteexecutionhistory
extends StandardParameters {
/**
* Required. Name of the execution for which step entries should be deleted. Format: projects/{project\}/locations/{location\}/workflows/{workflow\}/executions/{execution\}
*/
name?: string;

/**
* Request body metadata
*/
requestBody?: Schema$DeleteExecutionHistoryRequest;
}
export interface Params$Resource$Projects$Locations$Workflows$Executions$Exportdata
extends StandardParameters {
/**
Expand Down Expand Up @@ -1498,11 +1621,15 @@ export namespace workflowexecutions_v1 {
* Required. The name of the step entry to retrieve. Format: projects/{project\}/locations/{location\}/workflows/{workflow\}/executions/{execution\}/stepEntries/{step_entry\}
*/
name?: string;
/**
* Deprecated field.
*/
view?: string;
}
export interface Params$Resource$Projects$Locations$Workflows$Executions$Stepentries$List
extends StandardParameters {
/**
* Optional. Filters applied to the `[StepEntries.ListStepEntries]` results. The following fields are supported for filtering: `entryId`, `createTime`, `updateTime`, `routine`, `step`, `stepType`, `state`. For details, see AIP-160. For example, if you are using the Google APIs Explorer: `state="SUCCEEDED"` or `createTime\>"2023-08-01" AND state="FAILED"`
* Optional. Filters applied to the `[StepEntries.ListStepEntries]` results. The following fields are supported for filtering: `entryId`, `createTime`, `updateTime`, `routine`, `step`, `stepType`, `parent`, `state`. For details, see AIP-160. For example, if you are using the Google APIs Explorer: `state="SUCCEEDED"` or `createTime\>"2023-08-01" AND state="FAILED"`
*/
filter?: string;
/**
Expand All @@ -1518,12 +1645,16 @@ export namespace workflowexecutions_v1 {
*/
pageToken?: string;
/**
* Required. Name of the workflow execution to list entries for. Format: projects/{project\}/locations/{location\}/workflows/{workflow\}/executions/{execution\}/stepEntries/
* Required. Name of the workflow execution to list entries for. Format: projects/{project\}/locations/{location\}/workflows/{workflow\}/executions/{execution\}
*/
parent?: string;
/**
* Optional. The number of step entries to skip. It can be used with or without a pageToken. If used with a pageToken, then it indicates the number of step entries to skip starting from the requested page.
*/
skip?: number;
/**
* Deprecated field.
*/
view?: string;
}
}

0 comments on commit 7e5f42a

Please sign in to comment.