From ef0420cb87b1b20ba72206c4eb5cfb48e1498a09 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Fri, 2 Feb 2024 01:30:46 +0000 Subject: [PATCH] fix(workspaceevents): update the API --- discovery/workspaceevents-v1.json | 106 ++++++++++++++++++ src/apis/workspaceevents/README.md | 28 +++++ src/apis/workspaceevents/index.ts | 48 ++++++++ src/apis/workspaceevents/package.json | 43 +++++++ src/apis/workspaceevents/tsconfig.json | 10 ++ src/apis/workspaceevents/v1.ts | 123 +++++++++++++++++++++ src/apis/workspaceevents/webpack.config.js | 79 +++++++++++++ 7 files changed, 437 insertions(+) create mode 100644 discovery/workspaceevents-v1.json create mode 100644 src/apis/workspaceevents/README.md create mode 100644 src/apis/workspaceevents/index.ts create mode 100644 src/apis/workspaceevents/package.json create mode 100644 src/apis/workspaceevents/tsconfig.json create mode 100644 src/apis/workspaceevents/v1.ts create mode 100644 src/apis/workspaceevents/webpack.config.js diff --git a/discovery/workspaceevents-v1.json b/discovery/workspaceevents-v1.json new file mode 100644 index 0000000000..5296966c46 --- /dev/null +++ b/discovery/workspaceevents-v1.json @@ -0,0 +1,106 @@ +{ + "basePath": "", + "baseUrl": "https://workspaceevents.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Workspace Events", + "description": "The Google Workspace Events API lets you subscribe to events and manage change notifications across Google Workspace applications.", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/workspace/events", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "workspaceevents:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://workspaceevents.mtls.googleapis.com/", + "name": "workspaceevents", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": {}, + "revision": "20240130", + "rootUrl": "https://workspaceevents.googleapis.com/", + "schemas": {}, + "servicePath": "", + "title": "Google Workspace Events API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/src/apis/workspaceevents/README.md b/src/apis/workspaceevents/README.md new file mode 100644 index 0000000000..0f3e600304 --- /dev/null +++ b/src/apis/workspaceevents/README.md @@ -0,0 +1,28 @@ +Google Inc. logo + +# workspaceevents + +> The Google Workspace Events API lets you subscribe to events and manage change notifications across Google Workspace applications. + +## Installation + +```sh +$ npm install @googleapis/workspaceevents +``` + +## Usage +All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client). +Information on classes can be found in [Googleapis Documentation](https://googleapis.dev/nodejs/googleapis/latest/workspaceevents/classes/Workspaceevents.html). + +## License +This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/main/LICENSE). + +## Contributing +We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/main/.github/CONTRIBUTING.md). + +## Questions/problems? +* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client). +* If you've found an bug/issue, please [file it on GitHub](https://github.com/googleapis/google-api-nodejs-client/issues). + + +*Crafted with ❤️ by the Google Node.js team* diff --git a/src/apis/workspaceevents/index.ts b/src/apis/workspaceevents/index.ts new file mode 100644 index 0000000000..afad5de255 --- /dev/null +++ b/src/apis/workspaceevents/index.ts @@ -0,0 +1,48 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! THIS FILE IS AUTO-GENERATED */ + +import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common'; +import {workspaceevents_v1} from './v1'; + +export const VERSIONS = { + v1: workspaceevents_v1.Workspaceevents, +}; + +export function workspaceevents( + version: 'v1' +): workspaceevents_v1.Workspaceevents; +export function workspaceevents( + options: workspaceevents_v1.Options +): workspaceevents_v1.Workspaceevents; +export function workspaceevents( + this: GoogleConfigurable, + versionOrOptions: 'v1' | workspaceevents_v1.Options +) { + return getAPI('workspaceevents', versionOrOptions, VERSIONS, this); +} + +const auth = new AuthPlus(); +export {auth}; +export {workspaceevents_v1}; +export { + AuthPlus, + GlobalOptions, + APIRequestContext, + GoogleConfigurable, + StreamMethodOptions, + GaxiosPromise, + MethodOptions, + BodyResponseCallback, +} from 'googleapis-common'; diff --git a/src/apis/workspaceevents/package.json b/src/apis/workspaceevents/package.json new file mode 100644 index 0000000000..62cdef24bb --- /dev/null +++ b/src/apis/workspaceevents/package.json @@ -0,0 +1,43 @@ +{ + "name": "@googleapis/workspaceevents", + "version": "0.1.0", + "description": "workspaceevents", + "main": "build/index.js", + "types": "build/index.d.ts", + "keywords": [ + "google" + ], + "author": "Google LLC", + "license": "Apache-2.0", + "homepage": "https://github.com/googleapis/google-api-nodejs-client", + "bugs": { + "url": "https://github.com/googleapis/google-api-nodejs-client/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-api-nodejs-client.git" + }, + "engines": { + "node": ">=12.0.0" + }, + "scripts": { + "fix": "gts fix", + "lint": "gts check", + "compile": "tsc -p .", + "prepare": "npm run compile", + "webpack": "webpack" + }, + "dependencies": { + "googleapis-common": "^7.0.0" + }, + "devDependencies": { + "@microsoft/api-documenter": "^7.8.10", + "@microsoft/api-extractor": "^7.8.10", + "gts": "^5.0.0", + "null-loader": "^4.0.0", + "ts-loader": "^9.0.0", + "typescript": "~4.8.4", + "webpack": "^5.0.0", + "webpack-cli": "^5.0.0" + } +} diff --git a/src/apis/workspaceevents/tsconfig.json b/src/apis/workspaceevents/tsconfig.json new file mode 100644 index 0000000000..e081090496 --- /dev/null +++ b/src/apis/workspaceevents/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "*.ts", + ] +} diff --git a/src/apis/workspaceevents/v1.ts b/src/apis/workspaceevents/v1.ts new file mode 100644 index 0000000000..4f058719be --- /dev/null +++ b/src/apis/workspaceevents/v1.ts @@ -0,0 +1,123 @@ +// Copyright 2020 Google LLC +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-empty-interface */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable no-irregular-whitespace */ + +import { + OAuth2Client, + JWT, + Compute, + UserRefreshClient, + BaseExternalAccountClient, + GaxiosPromise, + GoogleConfigurable, + createAPIRequest, + MethodOptions, + StreamMethodOptions, + GlobalOptions, + GoogleAuth, + BodyResponseCallback, + APIRequestContext, +} from 'googleapis-common'; +import {Readable} from 'stream'; + +export namespace workspaceevents_v1 { + export interface Options extends GlobalOptions { + version: 'v1'; + } + + interface StandardParameters { + /** + * Auth client or API Key for the request + */ + auth?: + | string + | OAuth2Client + | JWT + | Compute + | UserRefreshClient + | BaseExternalAccountClient + | GoogleAuth; + + /** + * V1 error format. + */ + '$.xgafv'?: string; + /** + * OAuth access token. + */ + access_token?: string; + /** + * Data format for response. + */ + alt?: string; + /** + * JSONP + */ + callback?: string; + /** + * Selector specifying which fields to include in a partial response. + */ + fields?: string; + /** + * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + */ + key?: string; + /** + * OAuth 2.0 token for the current user. + */ + oauth_token?: string; + /** + * Returns response with indentations and line breaks. + */ + prettyPrint?: boolean; + /** + * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + */ + quotaUser?: string; + /** + * Legacy upload protocol for media (e.g. "media", "multipart"). + */ + uploadType?: string; + /** + * Upload protocol for media (e.g. "raw", "multipart"). + */ + upload_protocol?: string; + } + + /** + * Google Workspace Events API + * + * The Google Workspace Events API lets you subscribe to events and manage change notifications across Google Workspace applications. + * + * @example + * ```js + * const {google} = require('googleapis'); + * const workspaceevents = google.workspaceevents('v1'); + * ``` + */ + export class Workspaceevents { + context: APIRequestContext; + + constructor(options: GlobalOptions, google?: GoogleConfigurable) { + this.context = { + _options: options || {}, + google, + }; + } + } +} diff --git a/src/apis/workspaceevents/webpack.config.js b/src/apis/workspaceevents/webpack.config.js new file mode 100644 index 0000000000..f9e3033fd7 --- /dev/null +++ b/src/apis/workspaceevents/webpack.config.js @@ -0,0 +1,79 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Use `npm run webpack` to produce Webpack bundle for this library. + +const path = require('path'); + +module.exports = { + entry: './index.ts', + resolve: { + extensions: ['.ts', '.js', '.json'], + fallback: { + crypto: false, + child_process: false, + fs: false, + http2: false, + buffer: 'browserify', + process: false, + os: false, + querystring: false, + path: false, + stream: 'stream-browserify', + url: false, + util: false, + zlib: false, + }, + }, + output: { + library: 'Workspaceevents', + filename: 'workspaceevents.min.js', + path: path.resolve(__dirname, 'dist'), + }, + module: { + rules: [ + { + test: /node_modules[\\/]google-auth-library[\\/]src[\\/]crypto[\\/]node[\\/]crypto/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https-proxy-agent[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gcp-metadata[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]pkginfo[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]semver[\\/]/, + use: 'null-loader', + }, + { + test: /\.ts$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + ], + }, + mode: 'production', + plugins: [], +};