Skip to content

Commit

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

The following keys were added:
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.description
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.flatPath
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.httpMethod
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.id
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.parameterOrder
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.parameters.name.description
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.parameters.name.location
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.parameters.name.pattern
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.parameters.name.required
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.parameters.name.type
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.parameters.pageSize.description
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.parameters.pageSize.format
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.parameters.pageSize.location
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.parameters.pageSize.type
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.parameters.pageToken.description
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.parameters.pageToken.location
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.parameters.pageToken.type
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.path
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.response.$ref
- resources.projects.resources.locations.resources.workflows.methods.listRevisions.scopes
- schemas.ListWorkflowRevisionsResponse.description
- schemas.ListWorkflowRevisionsResponse.id
- schemas.ListWorkflowRevisionsResponse.properties.nextPageToken.description
- schemas.ListWorkflowRevisionsResponse.properties.nextPageToken.type
- schemas.ListWorkflowRevisionsResponse.properties.workflows.description
- schemas.ListWorkflowRevisionsResponse.properties.workflows.items.$ref
- schemas.ListWorkflowRevisionsResponse.properties.workflows.type
- schemas.ListWorkflowRevisionsResponse.type
  • Loading branch information
yoshi-automation committed Sep 20, 2023
1 parent 651c4b9 commit f250574
Show file tree
Hide file tree
Showing 2 changed files with 180 additions and 1 deletion.
56 changes: 55 additions & 1 deletion discovery/workflows-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,42 @@
"https://www.googleapis.com/auth/cloud-platform"
]
},
"listRevisions": {
"description": "Lists revisions for a given workflow.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}:listRevisions",
"httpMethod": "GET",
"id": "workflows.projects.locations.workflows.listRevisions",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Workflow from which the revisions should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$",
"required": true,
"type": "string"
},
"pageSize": {
"description": "The maximum number of revisions to return per page. If a value is not specified, a default value of 20 is used. The maximum permitted value is 100 and values greater than 100 coerced down to 100.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "The page token, received from a previous ListWorkflowRevisions call. Provide this to retrieve the subsequent page.",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}:listRevisions",
"response": {
"$ref": "ListWorkflowRevisionsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"patch": {
"description": "Updates an existing workflow. Running this method has no impact on already running executions of the workflow. A new revision of the workflow might be created as a result of a successful update operation. In that case, the new revision is used in new workflow executions.",
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}",
Expand Down Expand Up @@ -449,7 +485,7 @@
}
}
},
"revision": "20230802",
"revision": "20230906",
"rootUrl": "https://workflows.googleapis.com/",
"schemas": {
"Empty": {
Expand Down Expand Up @@ -494,6 +530,24 @@
},
"type": "object"
},
"ListWorkflowRevisionsResponse": {
"description": "Response for the ListWorkflowRevisions method.",
"id": "ListWorkflowRevisionsResponse",
"properties": {
"nextPageToken": {
"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.",
"type": "string"
},
"workflows": {
"description": "The revisions of the workflow, ordered in reverse chronological order.",
"items": {
"$ref": "Workflow"
},
"type": "array"
}
},
"type": "object"
},
"ListWorkflowsResponse": {
"description": "Response for the ListWorkflows method.",
"id": "ListWorkflowsResponse",
Expand Down
125 changes: 125 additions & 0 deletions src/apis/workflows/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,19 @@ export namespace workflows_v1 {
*/
operations?: Schema$Operation[];
}
/**
* Response for the ListWorkflowRevisions method.
*/
export interface Schema$ListWorkflowRevisionsResponse {
/**
* A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
*/
nextPageToken?: string | null;
/**
* The revisions of the workflow, ordered in reverse chronological order.
*/
workflows?: Schema$Workflow[];
}
/**
* Response for the ListWorkflows method.
*/
Expand Down Expand Up @@ -1217,6 +1230,103 @@ export namespace workflows_v1 {
}
}

/**
* Lists revisions for a given workflow.
*
* @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.
*/
listRevisions(
params: Params$Resource$Projects$Locations$Workflows$Listrevisions,
options: StreamMethodOptions
): GaxiosPromise<Readable>;
listRevisions(
params?: Params$Resource$Projects$Locations$Workflows$Listrevisions,
options?: MethodOptions
): GaxiosPromise<Schema$ListWorkflowRevisionsResponse>;
listRevisions(
params: Params$Resource$Projects$Locations$Workflows$Listrevisions,
options: StreamMethodOptions | BodyResponseCallback<Readable>,
callback: BodyResponseCallback<Readable>
): void;
listRevisions(
params: Params$Resource$Projects$Locations$Workflows$Listrevisions,
options:
| MethodOptions
| BodyResponseCallback<Schema$ListWorkflowRevisionsResponse>,
callback: BodyResponseCallback<Schema$ListWorkflowRevisionsResponse>
): void;
listRevisions(
params: Params$Resource$Projects$Locations$Workflows$Listrevisions,
callback: BodyResponseCallback<Schema$ListWorkflowRevisionsResponse>
): void;
listRevisions(
callback: BodyResponseCallback<Schema$ListWorkflowRevisionsResponse>
): void;
listRevisions(
paramsOrCallback?:
| Params$Resource$Projects$Locations$Workflows$Listrevisions
| BodyResponseCallback<Schema$ListWorkflowRevisionsResponse>
| BodyResponseCallback<Readable>,
optionsOrCallback?:
| MethodOptions
| StreamMethodOptions
| BodyResponseCallback<Schema$ListWorkflowRevisionsResponse>
| BodyResponseCallback<Readable>,
callback?:
| BodyResponseCallback<Schema$ListWorkflowRevisionsResponse>
| BodyResponseCallback<Readable>
):
| void
| GaxiosPromise<Schema$ListWorkflowRevisionsResponse>
| GaxiosPromise<Readable> {
let params = (paramsOrCallback ||
{}) as Params$Resource$Projects$Locations$Workflows$Listrevisions;
let options = (optionsOrCallback || {}) as MethodOptions;

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

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

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

/**
* Updates an existing workflow. Running this method has no impact on already running executions of the workflow. A new revision of the workflow might be created as a result of a successful update operation. In that case, the new revision is used in new workflow executions.
*
Expand Down Expand Up @@ -1359,6 +1469,21 @@ export namespace workflows_v1 {
*/
parent?: string;
}
export interface Params$Resource$Projects$Locations$Workflows$Listrevisions
extends StandardParameters {
/**
* Required. Workflow from which the revisions should be listed. Format: projects/{project\}/locations/{location\}/workflows/{workflow\}
*/
name?: string;
/**
* The maximum number of revisions to return per page. If a value is not specified, a default value of 20 is used. The maximum permitted value is 100 and values greater than 100 coerced down to 100.
*/
pageSize?: number;
/**
* The page token, received from a previous ListWorkflowRevisions call. Provide this to retrieve the subsequent page.
*/
pageToken?: string;
}
export interface Params$Resource$Projects$Locations$Workflows$Patch
extends StandardParameters {
/**
Expand Down

0 comments on commit f250574

Please sign in to comment.