From 2dbd27d9b7db1d50da7d279800888b2a68058036 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 3 Mar 2020 17:18:52 +0100 Subject: [PATCH] frontend: remove protobuf and entity related plugins --- frontend/packages/app/package.json | 2 - frontend/packages/app/src/entities/index.ts | 9 +- frontend/packages/app/src/plugins.ts | 1 - .../packages/plugins/create-entity/README.md | 1 - .../plugins/create-entity/jest.config.js | 4 - .../plugins/create-entity/jest.setup.ts | 1 - .../plugins/create-entity/package.json | 29 - .../CreateEntityFormPage.tsx | 100 - .../components/CreateEntityFormPage/index.ts | 1 - .../CreateEntityPage.test.tsx | 12 - .../CreateEntityPage/CreateEntityPage.tsx | 27 - .../src/components/CreateEntityPage/index.ts | 1 - .../plugins/create-entity/src/index.ts | 2 - .../plugins/create-entity/src/plugin.test.ts | 7 - .../plugins/create-entity/src/plugin.ts | 11 - .../packages/plugins/github-actions/README.md | 1 - .../plugins/github-actions/jest.config.js | 4 - .../plugins/github-actions/jest.setup.ts | 1 - .../plugins/github-actions/package.json | 29 - .../src/apis/builds/BuildsClient.ts | 60 - .../github-actions/src/apis/builds/index.ts | 2 - .../github-actions/src/apis/builds/types.ts | 22 - .../BuildDetailsPage/BuildDetailsPage.tsx | 130 - .../src/components/BuildDetailsPage/index.ts | 1 - .../BuildInfoCard/BuildInfoCard.tsx | 91 - .../src/components/BuildInfoCard/index.ts | 1 - .../BuildListPage/BuildListPage.tsx | 115 - .../src/components/BuildListPage/index.ts | 1 - .../BuildStatusIndicator.tsx | 63 - .../components/BuildStatusIndicator/index.ts | 1 - .../plugins/github-actions/src/index.ts | 1 - .../plugins/github-actions/src/plugin.test.ts | 7 - .../plugins/github-actions/src/plugin.ts | 19 - .../src/components/HomePage/HomePage.tsx | 34 +- frontend/packages/proto/package.json | 11 - frontend/packages/proto/src/buildsv1.ts | 2 - .../builds/v1/builds_grpc_web_pb.d.ts | 46 - .../generated/builds/v1/builds_grpc_web_pb.js | 233 -- .../src/generated/builds/v1/builds_pb.d.ts | 155 -- .../src/generated/builds/v1/builds_pb.js | 1205 ---------- .../identity/v1/identity_grpc_web_pb.d.ts | 46 - .../identity/v1/identity_grpc_web_pb.js | 233 -- .../generated/identity/v1/identity_pb.d.ts | 136 -- .../src/generated/identity/v1/identity_pb.js | 1136 --------- .../inventory/v1/inventory_grpc_web_pb.d.ts | 88 - .../inventory/v1/inventory_grpc_web_pb.js | 473 ---- .../generated/inventory/v1/inventory_pb.d.ts | 254 -- .../generated/inventory/v1/inventory_pb.js | 2115 ----------------- .../scaffolder/v1/scaffolder_grpc_web_pb.d.ts | 49 - .../scaffolder/v1/scaffolder_grpc_web_pb.js | 237 -- .../scaffolder/v1/scaffolder_pb.d.ts | 125 - .../generated/scaffolder/v1/scaffolder_pb.js | 995 -------- frontend/packages/proto/src/identityv1.ts | 2 - frontend/packages/proto/src/index.ts | 6 - frontend/packages/proto/src/inventoryv1.ts | 2 - frontend/packages/proto/src/scaffolderv1.ts | 2 - proto/prototool.yaml | 6 - 57 files changed, 5 insertions(+), 8343 deletions(-) delete mode 100644 frontend/packages/plugins/create-entity/README.md delete mode 100644 frontend/packages/plugins/create-entity/jest.config.js delete mode 100644 frontend/packages/plugins/create-entity/jest.setup.ts delete mode 100644 frontend/packages/plugins/create-entity/package.json delete mode 100644 frontend/packages/plugins/create-entity/src/components/CreateEntityFormPage/CreateEntityFormPage.tsx delete mode 100644 frontend/packages/plugins/create-entity/src/components/CreateEntityFormPage/index.ts delete mode 100644 frontend/packages/plugins/create-entity/src/components/CreateEntityPage/CreateEntityPage.test.tsx delete mode 100644 frontend/packages/plugins/create-entity/src/components/CreateEntityPage/CreateEntityPage.tsx delete mode 100644 frontend/packages/plugins/create-entity/src/components/CreateEntityPage/index.ts delete mode 100644 frontend/packages/plugins/create-entity/src/index.ts delete mode 100644 frontend/packages/plugins/create-entity/src/plugin.test.ts delete mode 100644 frontend/packages/plugins/create-entity/src/plugin.ts delete mode 100644 frontend/packages/plugins/github-actions/README.md delete mode 100644 frontend/packages/plugins/github-actions/jest.config.js delete mode 100644 frontend/packages/plugins/github-actions/jest.setup.ts delete mode 100644 frontend/packages/plugins/github-actions/package.json delete mode 100644 frontend/packages/plugins/github-actions/src/apis/builds/BuildsClient.ts delete mode 100644 frontend/packages/plugins/github-actions/src/apis/builds/index.ts delete mode 100644 frontend/packages/plugins/github-actions/src/apis/builds/types.ts delete mode 100644 frontend/packages/plugins/github-actions/src/components/BuildDetailsPage/BuildDetailsPage.tsx delete mode 100644 frontend/packages/plugins/github-actions/src/components/BuildDetailsPage/index.ts delete mode 100644 frontend/packages/plugins/github-actions/src/components/BuildInfoCard/BuildInfoCard.tsx delete mode 100644 frontend/packages/plugins/github-actions/src/components/BuildInfoCard/index.ts delete mode 100644 frontend/packages/plugins/github-actions/src/components/BuildListPage/BuildListPage.tsx delete mode 100644 frontend/packages/plugins/github-actions/src/components/BuildListPage/index.ts delete mode 100644 frontend/packages/plugins/github-actions/src/components/BuildStatusIndicator/BuildStatusIndicator.tsx delete mode 100644 frontend/packages/plugins/github-actions/src/components/BuildStatusIndicator/index.ts delete mode 100644 frontend/packages/plugins/github-actions/src/index.ts delete mode 100644 frontend/packages/plugins/github-actions/src/plugin.test.ts delete mode 100644 frontend/packages/plugins/github-actions/src/plugin.ts delete mode 100644 frontend/packages/proto/package.json delete mode 100644 frontend/packages/proto/src/buildsv1.ts delete mode 100644 frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.d.ts delete mode 100644 frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.js delete mode 100644 frontend/packages/proto/src/generated/builds/v1/builds_pb.d.ts delete mode 100644 frontend/packages/proto/src/generated/builds/v1/builds_pb.js delete mode 100644 frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.d.ts delete mode 100644 frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.js delete mode 100644 frontend/packages/proto/src/generated/identity/v1/identity_pb.d.ts delete mode 100644 frontend/packages/proto/src/generated/identity/v1/identity_pb.js delete mode 100644 frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.d.ts delete mode 100644 frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.js delete mode 100644 frontend/packages/proto/src/generated/inventory/v1/inventory_pb.d.ts delete mode 100644 frontend/packages/proto/src/generated/inventory/v1/inventory_pb.js delete mode 100644 frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.d.ts delete mode 100644 frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.js delete mode 100644 frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_pb.d.ts delete mode 100644 frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_pb.js delete mode 100644 frontend/packages/proto/src/identityv1.ts delete mode 100644 frontend/packages/proto/src/index.ts delete mode 100644 frontend/packages/proto/src/inventoryv1.ts delete mode 100644 frontend/packages/proto/src/scaffolderv1.ts diff --git a/frontend/packages/app/package.json b/frontend/packages/app/package.json index 58ac4da593..fa180eca9d 100644 --- a/frontend/packages/app/package.json +++ b/frontend/packages/app/package.json @@ -6,10 +6,8 @@ "@material-ui/core": "^4.9.1", "@material-ui/icons": "^4.9.1", "@spotify-backstage/core": "1.0.0", - "@spotify-backstage/plugin-github-actions": "0.0.0", "@spotify-backstage/plugin-home-page": "0.0.0", "@spotify-backstage/plugin-login": "0.0.0", - "@spotify-backstage/plugin-create-entity": "0.0.0", "@react-workspaces/react-scripts": "^3.3.0-alpha-08", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", diff --git a/frontend/packages/app/src/entities/index.ts b/frontend/packages/app/src/entities/index.ts index 7f418106f0..f30c0b64bb 100644 --- a/frontend/packages/app/src/entities/index.ts +++ b/frontend/packages/app/src/entities/index.ts @@ -13,16 +13,15 @@ import VpnKeyIcon from '@material-ui/icons/VpnKey'; import DnsIcon from '@material-ui/icons/Dns'; import MockEntityPage from './MockEntityPage'; import MockEntityCard from './MockEntityCard'; -import GithubActionsPlugin from '@spotify-backstage/plugin-github-actions'; /* SERVICE */ -const serviceOverviewPage = createWidgetView() - .add({ size: 4, component: MockEntityCard }) - .register(GithubActionsPlugin); +const serviceOverviewPage = createWidgetView().add({ + size: 4, + component: MockEntityCard, +}); const serviceView = createEntityPage() .addPage('Overview', WebIcon, '/overview', serviceOverviewPage) - .register(GithubActionsPlugin) .addComponent('Tests', VerifiedUserIcon, '/tests', MockEntityPage) .addComponent('Deployment', CloudIcon, '/deployment', MockEntityPage) .addComponent('Monitoring', TimelineIcon, '/monitoring', MockEntityPage) diff --git a/frontend/packages/app/src/plugins.ts b/frontend/packages/app/src/plugins.ts index c48233a5e2..3f286d67bc 100644 --- a/frontend/packages/app/src/plugins.ts +++ b/frontend/packages/app/src/plugins.ts @@ -1,2 +1 @@ export { default as HomePagePlugin } from '@spotify-backstage/plugin-home-page'; -export { default as CreateEntityPlugin } from '@spotify-backstage/plugin-create-entity'; diff --git a/frontend/packages/plugins/create-entity/README.md b/frontend/packages/plugins/create-entity/README.md deleted file mode 100644 index e084431c00..0000000000 --- a/frontend/packages/plugins/create-entity/README.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to your create-entity plugin! diff --git a/frontend/packages/plugins/create-entity/jest.config.js b/frontend/packages/plugins/create-entity/jest.config.js deleted file mode 100644 index 6b28dacb3d..0000000000 --- a/frontend/packages/plugins/create-entity/jest.config.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - ...require('@spotify/web-scripts/config/jest.config.js'), - setupFilesAfterEnv: ['../jest.setup.ts'], -}; diff --git a/frontend/packages/plugins/create-entity/jest.setup.ts b/frontend/packages/plugins/create-entity/jest.setup.ts deleted file mode 100644 index 666127af39..0000000000 --- a/frontend/packages/plugins/create-entity/jest.setup.ts +++ /dev/null @@ -1 +0,0 @@ -import '@testing-library/jest-dom/extend-expect'; diff --git a/frontend/packages/plugins/create-entity/package.json b/frontend/packages/plugins/create-entity/package.json deleted file mode 100644 index 76afc07312..0000000000 --- a/frontend/packages/plugins/create-entity/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "@spotify-backstage/plugin-create-entity", - "version": "0.0.0", - "main": "src/index.ts", - "main:src": "src/index.ts", - "devDependencies": { - "@spotify-backstage/core": "1.0.0", - "@spotify-backstage/protobuf-definitions": "0.0.0", - "@spotify/web-scripts": "^6.0.0", - "@testing-library/jest-dom": "^4.2.4", - "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", - "@types/jest": "^24.0.0", - "@types/node": "^12.0.0", - "@types/react": "^16.9.0", - "@types/react-dom": "^16.9.0", - "react": "^16.12.0", - "react-dom": "^16.12.0", - "@material-ui/core": "^4.9.1", - "@material-ui/icons": "^4.9.1", - "formik": "2.1.4", - "formik-material-ui": "2.0.0-alpha.3" - }, - "scripts": { - "lint": "web-scripts lint", - "test": "web-scripts test" - }, - "license": "Apache-2.0" -} diff --git a/frontend/packages/plugins/create-entity/src/components/CreateEntityFormPage/CreateEntityFormPage.tsx b/frontend/packages/plugins/create-entity/src/components/CreateEntityFormPage/CreateEntityFormPage.tsx deleted file mode 100644 index 0046ad57ca..0000000000 --- a/frontend/packages/plugins/create-entity/src/components/CreateEntityFormPage/CreateEntityFormPage.tsx +++ /dev/null @@ -1,100 +0,0 @@ -import React, { Fragment, useState } from 'react'; -import { useRouteMatch } from 'react-router-dom'; -import { useFormik } from 'formik'; -import { Button, TextField, makeStyles } from '@material-ui/core'; -import { InfoCard, Progress } from '@spotify-backstage/core'; -import { scaffolderV1 } from '@spotify-backstage/protobuf-definitions'; -const google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); -// import * as google_protobuf_struct_pb from 'google-protobuf/google/protobuf/struct_pb.js'; - -const useStyles = makeStyles(theme => ({ - formGroup: { - padding: theme.spacing(2), - }, -})); - -const CreateEntityFormPage = () => { - const classes = useStyles(); - const [submitting, setSubmitting] = useState(false); - const [componentCreated, setComponentCreated] = useState(''); - const match = useRouteMatch<{ templateId: string }>(); - const templateId = decodeURIComponent(match.params.templateId); - - const formik = useFormik({ - initialValues: { - entityId: '', - description: '', - }, - onSubmit: (values: any) => { - setSubmitting(true); - const client = new scaffolderV1.Client('http://localhost:8080'); - const req = new scaffolderV1.CreateRequest(); - req.setComponentId(values.entityId); - req.setTemplateId(templateId); - - req.setMetadata( - new google_protobuf_struct_pb.Struct.fromJavaScript({ - description: values.description, - }), - ); - req.setPrivate(false); - client.create(req).then((res: scaffolderV1.CreateReply) => { - setSubmitting(false); - console.log('COMPONENT CREATED'); - console.log(res.toObject().componentId); - setComponentCreated(res.toObject().componentId); - }); - }, - }); - - if (submitting) { - return ; - } - - return ( - - - {componentCreated ? ( -
- {componentCreated} is created!{' '} - - 🎉 - -
- ) : ( -
-
- -
-
- -
-
- -
-
- )} -
-
- ); -}; - -export default CreateEntityFormPage; diff --git a/frontend/packages/plugins/create-entity/src/components/CreateEntityFormPage/index.ts b/frontend/packages/plugins/create-entity/src/components/CreateEntityFormPage/index.ts deleted file mode 100644 index e5eabfdf87..0000000000 --- a/frontend/packages/plugins/create-entity/src/components/CreateEntityFormPage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './CreateEntityFormPage'; diff --git a/frontend/packages/plugins/create-entity/src/components/CreateEntityPage/CreateEntityPage.test.tsx b/frontend/packages/plugins/create-entity/src/components/CreateEntityPage/CreateEntityPage.test.tsx deleted file mode 100644 index 5e84fa9a51..0000000000 --- a/frontend/packages/plugins/create-entity/src/components/CreateEntityPage/CreateEntityPage.test.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import CreateEntityPage from './CreateEntityPage'; - -describe('CreateEntityPage', () => { - it('should render', () => { - const rendered = render(); - expect( - rendered.getByText('Create New', { exact: false }), - ).toBeInTheDocument(); - }); -}); diff --git a/frontend/packages/plugins/create-entity/src/components/CreateEntityPage/CreateEntityPage.tsx b/frontend/packages/plugins/create-entity/src/components/CreateEntityPage/CreateEntityPage.tsx deleted file mode 100644 index 892cb89333..0000000000 --- a/frontend/packages/plugins/create-entity/src/components/CreateEntityPage/CreateEntityPage.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React, { FC, Fragment, useEffect, useState } from 'react'; -import { InfoCard, TemplateList } from '@spotify-backstage/core'; -import { scaffolderV1 } from '@spotify-backstage/protobuf-definitions'; - -const CreateEntityPage: FC<{}> = () => { - const [templates, setTemplates] = useState< - scaffolderV1.Template.AsObject[] - >(); - - useEffect(() => { - const client = new scaffolderV1.Client('http://localhost:8080'); - const req = new scaffolderV1.Empty(); - client.listTemplates(req).then((res: scaffolderV1.ListTemplatesReply) => { - setTemplates(res.toObject().templatesList); - }); - }, []); - - return ( - - - {templates && } - - - ); -}; - -export default CreateEntityPage; diff --git a/frontend/packages/plugins/create-entity/src/components/CreateEntityPage/index.ts b/frontend/packages/plugins/create-entity/src/components/CreateEntityPage/index.ts deleted file mode 100644 index 9593a79ece..0000000000 --- a/frontend/packages/plugins/create-entity/src/components/CreateEntityPage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './CreateEntityPage'; diff --git a/frontend/packages/plugins/create-entity/src/index.ts b/frontend/packages/plugins/create-entity/src/index.ts deleted file mode 100644 index ee7f3893af..0000000000 --- a/frontend/packages/plugins/create-entity/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default } from './plugin'; -export { default as CreateEntityPage } from './components/CreateEntityPage'; diff --git a/frontend/packages/plugins/create-entity/src/plugin.test.ts b/frontend/packages/plugins/create-entity/src/plugin.test.ts deleted file mode 100644 index 0f9e9609f4..0000000000 --- a/frontend/packages/plugins/create-entity/src/plugin.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import plugin from './plugin'; - -describe('create-entity', () => { - it('should export plugin', () => { - expect(plugin).toBeDefined(); - }); -}); diff --git a/frontend/packages/plugins/create-entity/src/plugin.ts b/frontend/packages/plugins/create-entity/src/plugin.ts deleted file mode 100644 index 2e4328c40a..0000000000 --- a/frontend/packages/plugins/create-entity/src/plugin.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { createPlugin } from '@spotify-backstage/core'; -import CreateEntityPage from './components/CreateEntityPage'; -import CreateEntityFormPage from './components/CreateEntityFormPage'; - -export default createPlugin({ - id: 'create-entity', - register({ router }) { - router.registerRoute('/create', CreateEntityPage); - router.registerRoute('/create/:templateId', CreateEntityFormPage); - }, -}); diff --git a/frontend/packages/plugins/github-actions/README.md b/frontend/packages/plugins/github-actions/README.md deleted file mode 100644 index d55e47c5b1..0000000000 --- a/frontend/packages/plugins/github-actions/README.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to your github-actions plugin! diff --git a/frontend/packages/plugins/github-actions/jest.config.js b/frontend/packages/plugins/github-actions/jest.config.js deleted file mode 100644 index 6b28dacb3d..0000000000 --- a/frontend/packages/plugins/github-actions/jest.config.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - ...require('@spotify/web-scripts/config/jest.config.js'), - setupFilesAfterEnv: ['../jest.setup.ts'], -}; diff --git a/frontend/packages/plugins/github-actions/jest.setup.ts b/frontend/packages/plugins/github-actions/jest.setup.ts deleted file mode 100644 index 666127af39..0000000000 --- a/frontend/packages/plugins/github-actions/jest.setup.ts +++ /dev/null @@ -1 +0,0 @@ -import '@testing-library/jest-dom/extend-expect'; diff --git a/frontend/packages/plugins/github-actions/package.json b/frontend/packages/plugins/github-actions/package.json deleted file mode 100644 index ed19dfe780..0000000000 --- a/frontend/packages/plugins/github-actions/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "@spotify-backstage/plugin-github-actions", - "version": "0.0.0", - "main": "src/index.ts", - "main:src": "src/index.ts", - "devDependencies": { - "@spotify-backstage/core": "1.0.0", - "@spotify-backstage/protobuf-definitions": "0.0.0", - "@spotify/web-scripts": "^6.0.0", - "@testing-library/jest-dom": "^4.2.4", - "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^7.1.2", - "@types/jest": "^24.0.0", - "@types/node": "^12.0.0", - "@types/react": "^16.9.0", - "@types/react-dom": "^16.9.0", - "@types/react-router-dom": "^5.1.3", - "react": "^16.12.0", - "react-dom": "^16.12.0", - "react-router-dom": "^5.1.2", - "@material-ui/core": "^4.9.1", - "@material-ui/icons": "^4.9.1" - }, - "scripts": { - "lint": "web-scripts lint", - "test": "web-scripts test" - }, - "license": "Apache-2.0" -} diff --git a/frontend/packages/plugins/github-actions/src/apis/builds/BuildsClient.ts b/frontend/packages/plugins/github-actions/src/apis/builds/BuildsClient.ts deleted file mode 100644 index 1ec45d9555..0000000000 --- a/frontend/packages/plugins/github-actions/src/apis/builds/BuildsClient.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { buildsV1 } from '@spotify-backstage/protobuf-definitions'; -import { BuildStatus, Build, BuildDetails } from './types'; - -const statusTable = { - [buildsV1.BuildStatus.NULL]: BuildStatus.Null, - [buildsV1.BuildStatus.SUCCESS]: BuildStatus.Success, - [buildsV1.BuildStatus.FAILURE]: BuildStatus.Failure, - [buildsV1.BuildStatus.PENDING]: BuildStatus.Pending, - [buildsV1.BuildStatus.RUNNING]: BuildStatus.Running, -}; - -export default class BuildsClient { - static create(grpcAddress: string): BuildsClient { - return new BuildsClient(new buildsV1.Client(grpcAddress)); - } - - constructor(private readonly client: buildsV1.Client) {} - - async listBuilds(entityUri: string): Promise { - const req = new buildsV1.ListBuildsRequest(); - req.setEntityUri(entityUri); - - const res = await this.client.listBuilds(req); - - return res.getBuildsList().map(this.transformBuild); - } - - async getBuild(buildUri: string): Promise { - const req = new buildsV1.GetBuildRequest(); - req.setBuildUri(buildUri); - - const res = await this.client.getBuild(req); - - const build = res.getBuild(); - if (!build) { - throw new Error('No build in GetBuild response'); - } - const details = res.getDetails(); - if (!details) { - throw new Error('No details in GetBuild response'); - } - - return { - build: this.transformBuild(build), - author: details.getAuthor(), - logUrl: details.getLogUrl(), - overviewUrl: details.getOverviewUrl(), - }; - } - - private transformBuild = (build: buildsV1.Build): Build => { - return { - commitId: build.getCommitId(), - message: build.getMessage(), - branch: build.getBranch(), - status: statusTable[build.getStatus()] || BuildStatus.Null, - uri: build.getUri(), - }; - }; -} diff --git a/frontend/packages/plugins/github-actions/src/apis/builds/index.ts b/frontend/packages/plugins/github-actions/src/apis/builds/index.ts deleted file mode 100644 index 8a294efdf5..0000000000 --- a/frontend/packages/plugins/github-actions/src/apis/builds/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './types'; -export { default as BuildsClient } from './BuildsClient'; diff --git a/frontend/packages/plugins/github-actions/src/apis/builds/types.ts b/frontend/packages/plugins/github-actions/src/apis/builds/types.ts deleted file mode 100644 index ee57f00b5a..0000000000 --- a/frontend/packages/plugins/github-actions/src/apis/builds/types.ts +++ /dev/null @@ -1,22 +0,0 @@ -export enum BuildStatus { - Null, - Success, - Failure, - Pending, - Running, -} - -export type Build = { - commitId: string; - message: string; - branch: string; - status: BuildStatus; - uri: string; -}; - -export type BuildDetails = { - build: Build; - author: string; - logUrl: string; - overviewUrl: string; -}; diff --git a/frontend/packages/plugins/github-actions/src/components/BuildDetailsPage/BuildDetailsPage.tsx b/frontend/packages/plugins/github-actions/src/components/BuildDetailsPage/BuildDetailsPage.tsx deleted file mode 100644 index 27c3f6ef14..0000000000 --- a/frontend/packages/plugins/github-actions/src/components/BuildDetailsPage/BuildDetailsPage.tsx +++ /dev/null @@ -1,130 +0,0 @@ -import React, { FC } from 'react'; -import { BuildsClient } from '../../apis/builds'; -import { useAsync } from 'react-use'; -import { useRouteMatch } from 'react-router-dom'; -import { - LinearProgress, - Typography, - TableContainer, - Paper, - Table, - TableBody, - TableRow, - TableCell, - Link, - makeStyles, - ButtonGroup, - Button, - Theme, -} from '@material-ui/core'; -import { RelativeEntityLink } from '@spotify-backstage/core'; -import BuildStatusIndicator from '../BuildStatusIndicator'; - -const useStyles = makeStyles(theme => ({ - root: { - maxWidth: 720, - margin: theme.spacing(2), - }, - title: { - padding: theme.spacing(1, 0, 2, 0), - }, - table: { - padding: theme.spacing(1), - }, -})); - -type Props = {}; - -const client = BuildsClient.create('http://localhost:8080'); - -const BuildDetailsPage: FC = () => { - const classes = useStyles(); - const match = useRouteMatch<{ buildUri: string }>(); - const buildUri = decodeURIComponent(match.params.buildUri); - const status = useAsync(() => client.getBuild(buildUri), [buildUri]); - - if (status.loading) { - return ; - } - if (status.error) { - return ( - - Failed to load build, {status.error.message} - - ); - } - - const details = status.value; - - return ( -
- - - - <{' '} - - - Build Details - - - - - - - Branch - - {details?.build.branch} - - - - Message - - {details?.build.message} - - - - Commit ID - - {details?.build.commitId} - - - - Status - - - - - - - - Author - - {details?.author} - - - - Links - - - - - - - - - -
-
-
- ); -}; - -export default BuildDetailsPage; diff --git a/frontend/packages/plugins/github-actions/src/components/BuildDetailsPage/index.ts b/frontend/packages/plugins/github-actions/src/components/BuildDetailsPage/index.ts deleted file mode 100644 index a2b6def3b0..0000000000 --- a/frontend/packages/plugins/github-actions/src/components/BuildDetailsPage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './BuildDetailsPage'; diff --git a/frontend/packages/plugins/github-actions/src/components/BuildInfoCard/BuildInfoCard.tsx b/frontend/packages/plugins/github-actions/src/components/BuildInfoCard/BuildInfoCard.tsx deleted file mode 100644 index d890c8203d..0000000000 --- a/frontend/packages/plugins/github-actions/src/components/BuildInfoCard/BuildInfoCard.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import React, { FC } from 'react'; -import { RelativeEntityLink, useEntity } from '@spotify-backstage/core'; -import { BuildsClient } from '../../apis/builds'; -import { useAsync } from 'react-use'; -import { - Typography, - Table, - TableBody, - TableRow, - TableCell, - LinearProgress, - makeStyles, - Theme, -} from '@material-ui/core'; -import BuildStatusIndicator from '../BuildStatusIndicator'; - -const client = BuildsClient.create('http://localhost:8080'); - -const useStyles = makeStyles(theme => ({ - root: { - // height: 400, - }, - title: { - paddingBottom: theme.spacing(1), - }, -})); - -const BuildInfoCard: FC<{}> = () => { - const classes = useStyles(); - const { kind, id } = useEntity(); - const status = useAsync(() => client.listBuilds(`entity:${kind}:${id}`)); - - let content: JSX.Element; - - if (status.loading) { - content = ; - } else if (status.error) { - content = ( - - Failed to load builds, {status.error.message} - - ); - } else { - const [build] = - status.value?.filter(({ branch }) => branch === 'master') ?? []; - - content = ( - - - - - Message - - - - {build?.message} - - - - - - Commit ID - - {build?.commitId} - - - - Status - - - - - - -
- ); - } - - return ( -
- - Master Build - - {content} -
- ); -}; - -export default BuildInfoCard; diff --git a/frontend/packages/plugins/github-actions/src/components/BuildInfoCard/index.ts b/frontend/packages/plugins/github-actions/src/components/BuildInfoCard/index.ts deleted file mode 100644 index 21c0b99099..0000000000 --- a/frontend/packages/plugins/github-actions/src/components/BuildInfoCard/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './BuildInfoCard'; diff --git a/frontend/packages/plugins/github-actions/src/components/BuildListPage/BuildListPage.tsx b/frontend/packages/plugins/github-actions/src/components/BuildListPage/BuildListPage.tsx deleted file mode 100644 index dc46c5caa7..0000000000 --- a/frontend/packages/plugins/github-actions/src/components/BuildListPage/BuildListPage.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import React, { FC } from 'react'; -import { - TableContainer, - Table, - TableHead, - TableRow, - TableCell, - Paper, - TableBody, - LinearProgress, - Typography, - Tooltip, - makeStyles, - Theme, -} from '@material-ui/core'; -import { RelativeEntityLink, useEntity } from '@spotify-backstage/core'; -import { BuildsClient } from '../../apis/builds'; -import { useAsync } from 'react-use'; -import BuildStatusIndicator from '../BuildStatusIndicator'; - -const client = BuildsClient.create('http://localhost:8080'); - -const LongText: FC<{ text: string; max: number }> = ({ text, max }) => { - if (text.length < max) { - return {text}; - } - return ( - - {text.slice(0, max)}... - - ); -}; - -const useStyles = makeStyles(theme => ({ - root: { - padding: theme.spacing(2), - }, - title: { - padding: theme.spacing(1, 0, 2, 0), - }, -})); - -const BuildListPage: FC<{}> = () => { - const classes = useStyles(); - const { kind, id } = useEntity(); - const status = useAsync(() => client.listBuilds(`entity:${kind}:${id}`)); - - let content: JSX.Element; - - if (status.loading) { - content = ; - } else if (status.error) { - content = ( - - Failed to load builds, {status.error.message} - - ); - } else { - content = ( - - - - - Status - Branch - Message - Commit - - - - {status.value!.map(build => ( - - - - - - - - - - - - - - - - - - - - {build.commitId.slice(0, 10)} - - - - - ))} - -
-
- ); - } - - return ( -
- - CI/CD Builds - - {content} -
- ); -}; - -export default BuildListPage; diff --git a/frontend/packages/plugins/github-actions/src/components/BuildListPage/index.ts b/frontend/packages/plugins/github-actions/src/components/BuildListPage/index.ts deleted file mode 100644 index 497fb05ab5..0000000000 --- a/frontend/packages/plugins/github-actions/src/components/BuildListPage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './BuildListPage'; diff --git a/frontend/packages/plugins/github-actions/src/components/BuildStatusIndicator/BuildStatusIndicator.tsx b/frontend/packages/plugins/github-actions/src/components/BuildStatusIndicator/BuildStatusIndicator.tsx deleted file mode 100644 index 071dae4e8f..0000000000 --- a/frontend/packages/plugins/github-actions/src/components/BuildStatusIndicator/BuildStatusIndicator.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import React, { FC } from 'react'; -import { makeStyles, Theme } from '@material-ui/core'; -import { BuildStatus } from '../../apis/builds'; -import FailureIcon from '@material-ui/icons/Error'; -import SuccessIcon from '@material-ui/icons/CheckCircle'; -import ProgressIcon from '@material-ui/icons/Autorenew'; -import UnknownIcon from '@material-ui/icons/Help'; -import { IconComponent } from '@spotify-backstage/core'; - -type Props = { - status?: BuildStatus; -}; - -type StatusStyle = { - icon: IconComponent; - color: string; -}; - -const styles: { [key in BuildStatus]: StatusStyle } = { - [BuildStatus.Null]: { - icon: UnknownIcon, - color: '#f49b20', - }, - [BuildStatus.Success]: { - icon: SuccessIcon, - color: '#1db855', - }, - [BuildStatus.Failure]: { - icon: FailureIcon, - color: '#CA001B', - }, - [BuildStatus.Pending]: { - icon: UnknownIcon, - color: '#5BC0DE', - }, - [BuildStatus.Running]: { - icon: ProgressIcon, - color: '#BEBEBE', - }, -}; - -const useStyles = makeStyles({ - icon: style => ({ - color: style.color, - }), -}); - -const BuildStatusIndicator: FC = props => { - const { status } = props; - const style = (status && styles[status]) || styles[BuildStatus.Null]; - - const classes = useStyles(style); - - const IconComponent = style.icon; - - return ( -
- -
- ); -}; - -export default BuildStatusIndicator; diff --git a/frontend/packages/plugins/github-actions/src/components/BuildStatusIndicator/index.ts b/frontend/packages/plugins/github-actions/src/components/BuildStatusIndicator/index.ts deleted file mode 100644 index de5992cc40..0000000000 --- a/frontend/packages/plugins/github-actions/src/components/BuildStatusIndicator/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './BuildStatusIndicator'; diff --git a/frontend/packages/plugins/github-actions/src/index.ts b/frontend/packages/plugins/github-actions/src/index.ts deleted file mode 100644 index b68aea57f9..0000000000 --- a/frontend/packages/plugins/github-actions/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './plugin'; diff --git a/frontend/packages/plugins/github-actions/src/plugin.test.ts b/frontend/packages/plugins/github-actions/src/plugin.test.ts deleted file mode 100644 index c202f56231..0000000000 --- a/frontend/packages/plugins/github-actions/src/plugin.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import plugin from './plugin'; - -describe('github-actions', () => { - it('should export plugin', () => { - expect(plugin).toBeDefined(); - }); -}); diff --git a/frontend/packages/plugins/github-actions/src/plugin.ts b/frontend/packages/plugins/github-actions/src/plugin.ts deleted file mode 100644 index 8c8f854a34..0000000000 --- a/frontend/packages/plugins/github-actions/src/plugin.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { createPlugin } from '@spotify-backstage/core'; -import BuildDetailsPage from './components/BuildDetailsPage'; -import BuildListPage from './components/BuildListPage'; -import BuildIcon from '@material-ui/icons/Build'; -import BuildInfoCard from './components/BuildInfoCard'; - -// export const buildListRoute = createEntityRoute<[]>('/builds') -// export const buildDetailsRoute = createEntityRoute<[number]>('/builds/:buildId') - -export default createPlugin({ - id: 'github-actions', - - register({ entityPage, widgets }) { - entityPage.navItem({ title: 'CI/CD', icon: BuildIcon, target: '/builds' }); - entityPage.route('/builds', BuildListPage); - entityPage.route('/builds/:buildUri', BuildDetailsPage); - widgets.add({ size: 8, component: BuildInfoCard }); - }, -}); diff --git a/frontend/packages/plugins/home-page/src/components/HomePage/HomePage.tsx b/frontend/packages/plugins/home-page/src/components/HomePage/HomePage.tsx index 031ecb02b8..d64592a347 100644 --- a/frontend/packages/plugins/home-page/src/components/HomePage/HomePage.tsx +++ b/frontend/packages/plugins/home-page/src/components/HomePage/HomePage.tsx @@ -9,35 +9,8 @@ import { Header, Page, theme, - Progress, } from '@spotify-backstage/core'; import SquadTechHealth from './SquadTechHealth'; -import { useAsync } from 'react-use'; - -import { inventoryV1 } from '@spotify-backstage/protobuf-definitions'; - -const client = new inventoryV1.Client('http://localhost:8080'); - -const entityUriRegex = /entity:service:(.*)/; - -async function fetchServices() { - const req = new inventoryV1.ListEntitiesRequest(); - req.setUriprefix('entity:service:'); - const res = await client.listEntities(req); - - return res - .getEntitiesList() - .map(entity => { - const match = entity.getUri()?.match(entityUriRegex); - console.log('DEBUG: match =', match); - if (!match) { - return undefined; - } - return { id: match[1], kind: 'service' }; - }) - .filter(Boolean) - .map(x => x!); -} const STATIC_DATA = [ { id: 'backstage', kind: 'service' }, @@ -56,17 +29,12 @@ const useStyles = makeStyles(theme => ({ const HomePage: FC<{}> = () => { const classes = useStyles(); - const status = useAsync(fetchServices); const columns = [ { id: 'entity', label: 'ID' }, { id: 'kind', label: 'Kind' }, ]; - if (status.loading) { - return ; - } - - const data = STATIC_DATA.concat(status?.value ?? []).map(({ id, kind }) => { + const data = STATIC_DATA.map(({ id, kind }) => { return { id, entity: ( diff --git a/frontend/packages/proto/package.json b/frontend/packages/proto/package.json deleted file mode 100644 index eb59161692..0000000000 --- a/frontend/packages/proto/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "private": true, - "name": "@spotify-backstage/protobuf-definitions", - "main": "src/index.ts", - "main:src": "src/index.ts", - "version": "0.0.0", - "dependencies": { - "google-protobuf": "^3.11.2", - "grpc-web": "^1.0.7" - } -} diff --git a/frontend/packages/proto/src/buildsv1.ts b/frontend/packages/proto/src/buildsv1.ts deleted file mode 100644 index 689f8dac0e..0000000000 --- a/frontend/packages/proto/src/buildsv1.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { BuildsPromiseClient as Client } from './generated/builds/v1/builds_grpc_web_pb'; -export * from './generated/builds/v1/builds_pb'; diff --git a/frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.d.ts b/frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.d.ts deleted file mode 100644 index 18b2187499..0000000000 --- a/frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import * as grpcWeb from 'grpc-web'; - -import { - GetBuildReply, - GetBuildRequest, - ListBuildsReply, - ListBuildsRequest} from './builds_pb'; - -export class BuildsClient { - constructor (hostname: string, - credentials?: null | { [index: string]: string; }, - options?: null | { [index: string]: string; }); - - listBuilds( - request: ListBuildsRequest, - metadata: grpcWeb.Metadata | undefined, - callback: (err: grpcWeb.Error, - response: ListBuildsReply) => void - ): grpcWeb.ClientReadableStream; - - getBuild( - request: GetBuildRequest, - metadata: grpcWeb.Metadata | undefined, - callback: (err: grpcWeb.Error, - response: GetBuildReply) => void - ): grpcWeb.ClientReadableStream; - -} - -export class BuildsPromiseClient { - constructor (hostname: string, - credentials?: null | { [index: string]: string; }, - options?: null | { [index: string]: string; }); - - listBuilds( - request: ListBuildsRequest, - metadata?: grpcWeb.Metadata - ): Promise; - - getBuild( - request: GetBuildRequest, - metadata?: grpcWeb.Metadata - ): Promise; - -} - diff --git a/frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.js b/frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.js deleted file mode 100644 index b7b5369f0b..0000000000 --- a/frontend/packages/proto/src/generated/builds/v1/builds_grpc_web_pb.js +++ /dev/null @@ -1,233 +0,0 @@ -/** - * @fileoverview gRPC-Web generated client stub for spotify.backstage.builds.v1 - * @enhanceable - * @public - */ - -// GENERATED CODE -- DO NOT EDIT! - - - -const grpc = {}; -grpc.web = require('grpc-web'); - -const proto = {}; -proto.spotify = {}; -proto.spotify.backstage = {}; -proto.spotify.backstage.builds = {}; -proto.spotify.backstage.builds.v1 = require('./builds_pb.js'); - -/** - * @param {string} hostname - * @param {?Object} credentials - * @param {?Object} options - * @constructor - * @struct - * @final - */ -proto.spotify.backstage.builds.v1.BuildsClient = - function(hostname, credentials, options) { - if (!options) options = {}; - options['format'] = 'text'; - - /** - * @private @const {!grpc.web.GrpcWebClientBase} The client - */ - this.client_ = new grpc.web.GrpcWebClientBase(options); - - /** - * @private @const {string} The hostname - */ - this.hostname_ = hostname; - -}; - - -/** - * @param {string} hostname - * @param {?Object} credentials - * @param {?Object} options - * @constructor - * @struct - * @final - */ -proto.spotify.backstage.builds.v1.BuildsPromiseClient = - function(hostname, credentials, options) { - if (!options) options = {}; - options['format'] = 'text'; - - /** - * @private @const {!grpc.web.GrpcWebClientBase} The client - */ - this.client_ = new grpc.web.GrpcWebClientBase(options); - - /** - * @private @const {string} The hostname - */ - this.hostname_ = hostname; - -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.spotify.backstage.builds.v1.ListBuildsRequest, - * !proto.spotify.backstage.builds.v1.ListBuildsReply>} - */ -const methodDescriptor_Builds_ListBuilds = new grpc.web.MethodDescriptor( - '/spotify.backstage.builds.v1.Builds/ListBuilds', - grpc.web.MethodType.UNARY, - proto.spotify.backstage.builds.v1.ListBuildsRequest, - proto.spotify.backstage.builds.v1.ListBuildsReply, - /** - * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.builds.v1.ListBuildsReply.deserializeBinary -); - - -/** - * @const - * @type {!grpc.web.AbstractClientBase.MethodInfo< - * !proto.spotify.backstage.builds.v1.ListBuildsRequest, - * !proto.spotify.backstage.builds.v1.ListBuildsReply>} - */ -const methodInfo_Builds_ListBuilds = new grpc.web.AbstractClientBase.MethodInfo( - proto.spotify.backstage.builds.v1.ListBuildsReply, - /** - * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.builds.v1.ListBuildsReply.deserializeBinary -); - - -/** - * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.Error, ?proto.spotify.backstage.builds.v1.ListBuildsReply)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.spotify.backstage.builds.v1.BuildsClient.prototype.listBuilds = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/spotify.backstage.builds.v1.Builds/ListBuilds', - request, - metadata || {}, - methodDescriptor_Builds_ListBuilds, - callback); -}; - - -/** - * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @return {!Promise} - * A native promise that resolves to the response - */ -proto.spotify.backstage.builds.v1.BuildsPromiseClient.prototype.listBuilds = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/spotify.backstage.builds.v1.Builds/ListBuilds', - request, - metadata || {}, - methodDescriptor_Builds_ListBuilds); -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.spotify.backstage.builds.v1.GetBuildRequest, - * !proto.spotify.backstage.builds.v1.GetBuildReply>} - */ -const methodDescriptor_Builds_GetBuild = new grpc.web.MethodDescriptor( - '/spotify.backstage.builds.v1.Builds/GetBuild', - grpc.web.MethodType.UNARY, - proto.spotify.backstage.builds.v1.GetBuildRequest, - proto.spotify.backstage.builds.v1.GetBuildReply, - /** - * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.builds.v1.GetBuildReply.deserializeBinary -); - - -/** - * @const - * @type {!grpc.web.AbstractClientBase.MethodInfo< - * !proto.spotify.backstage.builds.v1.GetBuildRequest, - * !proto.spotify.backstage.builds.v1.GetBuildReply>} - */ -const methodInfo_Builds_GetBuild = new grpc.web.AbstractClientBase.MethodInfo( - proto.spotify.backstage.builds.v1.GetBuildReply, - /** - * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.builds.v1.GetBuildReply.deserializeBinary -); - - -/** - * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.Error, ?proto.spotify.backstage.builds.v1.GetBuildReply)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.spotify.backstage.builds.v1.BuildsClient.prototype.getBuild = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/spotify.backstage.builds.v1.Builds/GetBuild', - request, - metadata || {}, - methodDescriptor_Builds_GetBuild, - callback); -}; - - -/** - * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @return {!Promise} - * A native promise that resolves to the response - */ -proto.spotify.backstage.builds.v1.BuildsPromiseClient.prototype.getBuild = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/spotify.backstage.builds.v1.Builds/GetBuild', - request, - metadata || {}, - methodDescriptor_Builds_GetBuild); -}; - - -module.exports = proto.spotify.backstage.builds.v1; - diff --git a/frontend/packages/proto/src/generated/builds/v1/builds_pb.d.ts b/frontend/packages/proto/src/generated/builds/v1/builds_pb.d.ts deleted file mode 100644 index 6120c5e705..0000000000 --- a/frontend/packages/proto/src/generated/builds/v1/builds_pb.d.ts +++ /dev/null @@ -1,155 +0,0 @@ -import * as jspb from "google-protobuf" - -export class ListBuildsRequest extends jspb.Message { - getEntityUri(): string; - setEntityUri(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListBuildsRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListBuildsRequest): ListBuildsRequest.AsObject; - static serializeBinaryToWriter(message: ListBuildsRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListBuildsRequest; - static deserializeBinaryFromReader(message: ListBuildsRequest, reader: jspb.BinaryReader): ListBuildsRequest; -} - -export namespace ListBuildsRequest { - export type AsObject = { - entityUri: string, - } -} - -export class ListBuildsReply extends jspb.Message { - getEntityUri(): string; - setEntityUri(value: string): void; - - getBuildsList(): Array; - setBuildsList(value: Array): void; - clearBuildsList(): void; - addBuilds(value?: Build, index?: number): Build; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListBuildsReply.AsObject; - static toObject(includeInstance: boolean, msg: ListBuildsReply): ListBuildsReply.AsObject; - static serializeBinaryToWriter(message: ListBuildsReply, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListBuildsReply; - static deserializeBinaryFromReader(message: ListBuildsReply, reader: jspb.BinaryReader): ListBuildsReply; -} - -export namespace ListBuildsReply { - export type AsObject = { - entityUri: string, - buildsList: Array, - } -} - -export class GetBuildRequest extends jspb.Message { - getBuildUri(): string; - setBuildUri(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetBuildRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetBuildRequest): GetBuildRequest.AsObject; - static serializeBinaryToWriter(message: GetBuildRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetBuildRequest; - static deserializeBinaryFromReader(message: GetBuildRequest, reader: jspb.BinaryReader): GetBuildRequest; -} - -export namespace GetBuildRequest { - export type AsObject = { - buildUri: string, - } -} - -export class GetBuildReply extends jspb.Message { - getBuild(): Build | undefined; - setBuild(value?: Build): void; - hasBuild(): boolean; - clearBuild(): void; - - getDetails(): BuildDetails | undefined; - setDetails(value?: BuildDetails): void; - hasDetails(): boolean; - clearDetails(): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetBuildReply.AsObject; - static toObject(includeInstance: boolean, msg: GetBuildReply): GetBuildReply.AsObject; - static serializeBinaryToWriter(message: GetBuildReply, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetBuildReply; - static deserializeBinaryFromReader(message: GetBuildReply, reader: jspb.BinaryReader): GetBuildReply; -} - -export namespace GetBuildReply { - export type AsObject = { - build?: Build.AsObject, - details?: BuildDetails.AsObject, - } -} - -export class Build extends jspb.Message { - getUri(): string; - setUri(value: string): void; - - getCommitId(): string; - setCommitId(value: string): void; - - getMessage(): string; - setMessage(value: string): void; - - getBranch(): string; - setBranch(value: string): void; - - getStatus(): BuildStatus; - setStatus(value: BuildStatus): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Build.AsObject; - static toObject(includeInstance: boolean, msg: Build): Build.AsObject; - static serializeBinaryToWriter(message: Build, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Build; - static deserializeBinaryFromReader(message: Build, reader: jspb.BinaryReader): Build; -} - -export namespace Build { - export type AsObject = { - uri: string, - commitId: string, - message: string, - branch: string, - status: BuildStatus, - } -} - -export class BuildDetails extends jspb.Message { - getAuthor(): string; - setAuthor(value: string): void; - - getOverviewUrl(): string; - setOverviewUrl(value: string): void; - - getLogUrl(): string; - setLogUrl(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BuildDetails.AsObject; - static toObject(includeInstance: boolean, msg: BuildDetails): BuildDetails.AsObject; - static serializeBinaryToWriter(message: BuildDetails, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BuildDetails; - static deserializeBinaryFromReader(message: BuildDetails, reader: jspb.BinaryReader): BuildDetails; -} - -export namespace BuildDetails { - export type AsObject = { - author: string, - overviewUrl: string, - logUrl: string, - } -} - -export enum BuildStatus { - NULL = 0, - SUCCESS = 1, - FAILURE = 2, - PENDING = 3, - RUNNING = 4, -} diff --git a/frontend/packages/proto/src/generated/builds/v1/builds_pb.js b/frontend/packages/proto/src/generated/builds/v1/builds_pb.js deleted file mode 100644 index 6ec016cd99..0000000000 --- a/frontend/packages/proto/src/generated/builds/v1/builds_pb.js +++ /dev/null @@ -1,1205 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.spotify.backstage.builds.v1.Build', null, global); -goog.exportSymbol('proto.spotify.backstage.builds.v1.BuildDetails', null, global); -goog.exportSymbol('proto.spotify.backstage.builds.v1.BuildStatus', null, global); -goog.exportSymbol('proto.spotify.backstage.builds.v1.GetBuildReply', null, global); -goog.exportSymbol('proto.spotify.backstage.builds.v1.GetBuildRequest', null, global); -goog.exportSymbol('proto.spotify.backstage.builds.v1.ListBuildsReply', null, global); -goog.exportSymbol('proto.spotify.backstage.builds.v1.ListBuildsRequest', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.builds.v1.ListBuildsRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.builds.v1.ListBuildsRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.builds.v1.ListBuildsRequest.displayName = 'proto.spotify.backstage.builds.v1.ListBuildsRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.builds.v1.ListBuildsReply = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.spotify.backstage.builds.v1.ListBuildsReply.repeatedFields_, null); -}; -goog.inherits(proto.spotify.backstage.builds.v1.ListBuildsReply, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.builds.v1.ListBuildsReply.displayName = 'proto.spotify.backstage.builds.v1.ListBuildsReply'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.builds.v1.GetBuildRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.builds.v1.GetBuildRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.builds.v1.GetBuildRequest.displayName = 'proto.spotify.backstage.builds.v1.GetBuildRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.builds.v1.GetBuildReply = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.builds.v1.GetBuildReply, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.builds.v1.GetBuildReply.displayName = 'proto.spotify.backstage.builds.v1.GetBuildReply'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.builds.v1.Build = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.builds.v1.Build, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.builds.v1.Build.displayName = 'proto.spotify.backstage.builds.v1.Build'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.builds.v1.BuildDetails = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.builds.v1.BuildDetails, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.builds.v1.BuildDetails.displayName = 'proto.spotify.backstage.builds.v1.BuildDetails'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.builds.v1.ListBuildsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.builds.v1.ListBuildsRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.builds.v1.ListBuildsRequest.toObject = function(includeInstance, msg) { - var f, obj = { - entityUri: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.builds.v1.ListBuildsRequest} - */ -proto.spotify.backstage.builds.v1.ListBuildsRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.builds.v1.ListBuildsRequest; - return proto.spotify.backstage.builds.v1.ListBuildsRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.builds.v1.ListBuildsRequest} - */ -proto.spotify.backstage.builds.v1.ListBuildsRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setEntityUri(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.builds.v1.ListBuildsRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.builds.v1.ListBuildsRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.builds.v1.ListBuildsRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.builds.v1.ListBuildsRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntityUri(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string entity_uri = 1; - * @return {string} - */ -proto.spotify.backstage.builds.v1.ListBuildsRequest.prototype.getEntityUri = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.builds.v1.ListBuildsRequest.prototype.setEntityUri = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.spotify.backstage.builds.v1.ListBuildsReply.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.builds.v1.ListBuildsReply.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.builds.v1.ListBuildsReply} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.builds.v1.ListBuildsReply.toObject = function(includeInstance, msg) { - var f, obj = { - entityUri: jspb.Message.getFieldWithDefault(msg, 1, ""), - buildsList: jspb.Message.toObjectList(msg.getBuildsList(), - proto.spotify.backstage.builds.v1.Build.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.builds.v1.ListBuildsReply} - */ -proto.spotify.backstage.builds.v1.ListBuildsReply.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.builds.v1.ListBuildsReply; - return proto.spotify.backstage.builds.v1.ListBuildsReply.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.builds.v1.ListBuildsReply} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.builds.v1.ListBuildsReply} - */ -proto.spotify.backstage.builds.v1.ListBuildsReply.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setEntityUri(value); - break; - case 2: - var value = new proto.spotify.backstage.builds.v1.Build; - reader.readMessage(value,proto.spotify.backstage.builds.v1.Build.deserializeBinaryFromReader); - msg.addBuilds(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.builds.v1.ListBuildsReply.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.builds.v1.ListBuildsReply} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.builds.v1.ListBuildsReply.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntityUri(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getBuildsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.spotify.backstage.builds.v1.Build.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string entity_uri = 1; - * @return {string} - */ -proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.getEntityUri = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.setEntityUri = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * repeated Build builds = 2; - * @return {!Array} - */ -proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.getBuildsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.spotify.backstage.builds.v1.Build, 2)); -}; - - -/** @param {!Array} value */ -proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.setBuildsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.spotify.backstage.builds.v1.Build=} opt_value - * @param {number=} opt_index - * @return {!proto.spotify.backstage.builds.v1.Build} - */ -proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.addBuilds = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spotify.backstage.builds.v1.Build, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.spotify.backstage.builds.v1.ListBuildsReply.prototype.clearBuildsList = function() { - this.setBuildsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.builds.v1.GetBuildRequest.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.builds.v1.GetBuildRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.builds.v1.GetBuildRequest.toObject = function(includeInstance, msg) { - var f, obj = { - buildUri: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.builds.v1.GetBuildRequest} - */ -proto.spotify.backstage.builds.v1.GetBuildRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.builds.v1.GetBuildRequest; - return proto.spotify.backstage.builds.v1.GetBuildRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.builds.v1.GetBuildRequest} - */ -proto.spotify.backstage.builds.v1.GetBuildRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setBuildUri(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.builds.v1.GetBuildRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.builds.v1.GetBuildRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.builds.v1.GetBuildRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.builds.v1.GetBuildRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBuildUri(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string build_uri = 1; - * @return {string} - */ -proto.spotify.backstage.builds.v1.GetBuildRequest.prototype.getBuildUri = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.builds.v1.GetBuildRequest.prototype.setBuildUri = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.builds.v1.GetBuildReply.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.builds.v1.GetBuildReply.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.builds.v1.GetBuildReply} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.builds.v1.GetBuildReply.toObject = function(includeInstance, msg) { - var f, obj = { - build: (f = msg.getBuild()) && proto.spotify.backstage.builds.v1.Build.toObject(includeInstance, f), - details: (f = msg.getDetails()) && proto.spotify.backstage.builds.v1.BuildDetails.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.builds.v1.GetBuildReply} - */ -proto.spotify.backstage.builds.v1.GetBuildReply.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.builds.v1.GetBuildReply; - return proto.spotify.backstage.builds.v1.GetBuildReply.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.builds.v1.GetBuildReply} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.builds.v1.GetBuildReply} - */ -proto.spotify.backstage.builds.v1.GetBuildReply.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.spotify.backstage.builds.v1.Build; - reader.readMessage(value,proto.spotify.backstage.builds.v1.Build.deserializeBinaryFromReader); - msg.setBuild(value); - break; - case 2: - var value = new proto.spotify.backstage.builds.v1.BuildDetails; - reader.readMessage(value,proto.spotify.backstage.builds.v1.BuildDetails.deserializeBinaryFromReader); - msg.setDetails(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.builds.v1.GetBuildReply.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.builds.v1.GetBuildReply.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.builds.v1.GetBuildReply} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.builds.v1.GetBuildReply.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBuild(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.spotify.backstage.builds.v1.Build.serializeBinaryToWriter - ); - } - f = message.getDetails(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.spotify.backstage.builds.v1.BuildDetails.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Build build = 1; - * @return {?proto.spotify.backstage.builds.v1.Build} - */ -proto.spotify.backstage.builds.v1.GetBuildReply.prototype.getBuild = function() { - return /** @type{?proto.spotify.backstage.builds.v1.Build} */ ( - jspb.Message.getWrapperField(this, proto.spotify.backstage.builds.v1.Build, 1)); -}; - - -/** @param {?proto.spotify.backstage.builds.v1.Build|undefined} value */ -proto.spotify.backstage.builds.v1.GetBuildReply.prototype.setBuild = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.spotify.backstage.builds.v1.GetBuildReply.prototype.clearBuild = function() { - this.setBuild(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.spotify.backstage.builds.v1.GetBuildReply.prototype.hasBuild = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional BuildDetails details = 2; - * @return {?proto.spotify.backstage.builds.v1.BuildDetails} - */ -proto.spotify.backstage.builds.v1.GetBuildReply.prototype.getDetails = function() { - return /** @type{?proto.spotify.backstage.builds.v1.BuildDetails} */ ( - jspb.Message.getWrapperField(this, proto.spotify.backstage.builds.v1.BuildDetails, 2)); -}; - - -/** @param {?proto.spotify.backstage.builds.v1.BuildDetails|undefined} value */ -proto.spotify.backstage.builds.v1.GetBuildReply.prototype.setDetails = function(value) { - jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.spotify.backstage.builds.v1.GetBuildReply.prototype.clearDetails = function() { - this.setDetails(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.spotify.backstage.builds.v1.GetBuildReply.prototype.hasDetails = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.builds.v1.Build.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.builds.v1.Build.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.builds.v1.Build} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.builds.v1.Build.toObject = function(includeInstance, msg) { - var f, obj = { - uri: jspb.Message.getFieldWithDefault(msg, 1, ""), - commitId: jspb.Message.getFieldWithDefault(msg, 2, ""), - message: jspb.Message.getFieldWithDefault(msg, 3, ""), - branch: jspb.Message.getFieldWithDefault(msg, 4, ""), - status: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.builds.v1.Build} - */ -proto.spotify.backstage.builds.v1.Build.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.builds.v1.Build; - return proto.spotify.backstage.builds.v1.Build.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.builds.v1.Build} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.builds.v1.Build} - */ -proto.spotify.backstage.builds.v1.Build.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUri(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setCommitId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setBranch(value); - break; - case 5: - var value = /** @type {!proto.spotify.backstage.builds.v1.BuildStatus} */ (reader.readEnum()); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.builds.v1.Build.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.builds.v1.Build.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.builds.v1.Build} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.builds.v1.Build.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUri(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCommitId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getBranch(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 5, - f - ); - } -}; - - -/** - * optional string uri = 1; - * @return {string} - */ -proto.spotify.backstage.builds.v1.Build.prototype.getUri = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.builds.v1.Build.prototype.setUri = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string commit_id = 2; - * @return {string} - */ -proto.spotify.backstage.builds.v1.Build.prototype.getCommitId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.builds.v1.Build.prototype.setCommitId = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string message = 3; - * @return {string} - */ -proto.spotify.backstage.builds.v1.Build.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.builds.v1.Build.prototype.setMessage = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string branch = 4; - * @return {string} - */ -proto.spotify.backstage.builds.v1.Build.prototype.getBranch = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.builds.v1.Build.prototype.setBranch = function(value) { - jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional BuildStatus status = 5; - * @return {!proto.spotify.backstage.builds.v1.BuildStatus} - */ -proto.spotify.backstage.builds.v1.Build.prototype.getStatus = function() { - return /** @type {!proto.spotify.backstage.builds.v1.BuildStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** @param {!proto.spotify.backstage.builds.v1.BuildStatus} value */ -proto.spotify.backstage.builds.v1.Build.prototype.setStatus = function(value) { - jspb.Message.setProto3EnumField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.builds.v1.BuildDetails.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.builds.v1.BuildDetails.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.builds.v1.BuildDetails} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.builds.v1.BuildDetails.toObject = function(includeInstance, msg) { - var f, obj = { - author: jspb.Message.getFieldWithDefault(msg, 1, ""), - overviewUrl: jspb.Message.getFieldWithDefault(msg, 2, ""), - logUrl: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.builds.v1.BuildDetails} - */ -proto.spotify.backstage.builds.v1.BuildDetails.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.builds.v1.BuildDetails; - return proto.spotify.backstage.builds.v1.BuildDetails.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.builds.v1.BuildDetails} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.builds.v1.BuildDetails} - */ -proto.spotify.backstage.builds.v1.BuildDetails.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAuthor(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setOverviewUrl(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setLogUrl(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.builds.v1.BuildDetails.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.builds.v1.BuildDetails.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.builds.v1.BuildDetails} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.builds.v1.BuildDetails.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAuthor(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getOverviewUrl(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getLogUrl(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string author = 1; - * @return {string} - */ -proto.spotify.backstage.builds.v1.BuildDetails.prototype.getAuthor = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.builds.v1.BuildDetails.prototype.setAuthor = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string overview_url = 2; - * @return {string} - */ -proto.spotify.backstage.builds.v1.BuildDetails.prototype.getOverviewUrl = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.builds.v1.BuildDetails.prototype.setOverviewUrl = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string log_url = 3; - * @return {string} - */ -proto.spotify.backstage.builds.v1.BuildDetails.prototype.getLogUrl = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.builds.v1.BuildDetails.prototype.setLogUrl = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * @enum {number} - */ -proto.spotify.backstage.builds.v1.BuildStatus = { - NULL: 0, - SUCCESS: 1, - FAILURE: 2, - PENDING: 3, - RUNNING: 4 -}; - -goog.object.extend(exports, proto.spotify.backstage.builds.v1); diff --git a/frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.d.ts b/frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.d.ts deleted file mode 100644 index ab4076b19c..0000000000 --- a/frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import * as grpcWeb from 'grpc-web'; - -import { - GetGroupReply, - GetGroupRequest, - GetUserReply, - GetUserRequest} from './identity_pb'; - -export class IdentityClient { - constructor (hostname: string, - credentials?: null | { [index: string]: string; }, - options?: null | { [index: string]: string; }); - - getUser( - request: GetUserRequest, - metadata: grpcWeb.Metadata | undefined, - callback: (err: grpcWeb.Error, - response: GetUserReply) => void - ): grpcWeb.ClientReadableStream; - - getGroup( - request: GetGroupRequest, - metadata: grpcWeb.Metadata | undefined, - callback: (err: grpcWeb.Error, - response: GetGroupReply) => void - ): grpcWeb.ClientReadableStream; - -} - -export class IdentityPromiseClient { - constructor (hostname: string, - credentials?: null | { [index: string]: string; }, - options?: null | { [index: string]: string; }); - - getUser( - request: GetUserRequest, - metadata?: grpcWeb.Metadata - ): Promise; - - getGroup( - request: GetGroupRequest, - metadata?: grpcWeb.Metadata - ): Promise; - -} - diff --git a/frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.js b/frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.js deleted file mode 100644 index 6fc2bc948b..0000000000 --- a/frontend/packages/proto/src/generated/identity/v1/identity_grpc_web_pb.js +++ /dev/null @@ -1,233 +0,0 @@ -/** - * @fileoverview gRPC-Web generated client stub for spotify.backstage.identity.v1 - * @enhanceable - * @public - */ - -// GENERATED CODE -- DO NOT EDIT! - - - -const grpc = {}; -grpc.web = require('grpc-web'); - -const proto = {}; -proto.spotify = {}; -proto.spotify.backstage = {}; -proto.spotify.backstage.identity = {}; -proto.spotify.backstage.identity.v1 = require('./identity_pb.js'); - -/** - * @param {string} hostname - * @param {?Object} credentials - * @param {?Object} options - * @constructor - * @struct - * @final - */ -proto.spotify.backstage.identity.v1.IdentityClient = - function(hostname, credentials, options) { - if (!options) options = {}; - options['format'] = 'text'; - - /** - * @private @const {!grpc.web.GrpcWebClientBase} The client - */ - this.client_ = new grpc.web.GrpcWebClientBase(options); - - /** - * @private @const {string} The hostname - */ - this.hostname_ = hostname; - -}; - - -/** - * @param {string} hostname - * @param {?Object} credentials - * @param {?Object} options - * @constructor - * @struct - * @final - */ -proto.spotify.backstage.identity.v1.IdentityPromiseClient = - function(hostname, credentials, options) { - if (!options) options = {}; - options['format'] = 'text'; - - /** - * @private @const {!grpc.web.GrpcWebClientBase} The client - */ - this.client_ = new grpc.web.GrpcWebClientBase(options); - - /** - * @private @const {string} The hostname - */ - this.hostname_ = hostname; - -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.spotify.backstage.identity.v1.GetUserRequest, - * !proto.spotify.backstage.identity.v1.GetUserReply>} - */ -const methodDescriptor_Identity_GetUser = new grpc.web.MethodDescriptor( - '/spotify.backstage.identity.v1.Identity/GetUser', - grpc.web.MethodType.UNARY, - proto.spotify.backstage.identity.v1.GetUserRequest, - proto.spotify.backstage.identity.v1.GetUserReply, - /** - * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.identity.v1.GetUserReply.deserializeBinary -); - - -/** - * @const - * @type {!grpc.web.AbstractClientBase.MethodInfo< - * !proto.spotify.backstage.identity.v1.GetUserRequest, - * !proto.spotify.backstage.identity.v1.GetUserReply>} - */ -const methodInfo_Identity_GetUser = new grpc.web.AbstractClientBase.MethodInfo( - proto.spotify.backstage.identity.v1.GetUserReply, - /** - * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.identity.v1.GetUserReply.deserializeBinary -); - - -/** - * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.Error, ?proto.spotify.backstage.identity.v1.GetUserReply)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.spotify.backstage.identity.v1.IdentityClient.prototype.getUser = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/spotify.backstage.identity.v1.Identity/GetUser', - request, - metadata || {}, - methodDescriptor_Identity_GetUser, - callback); -}; - - -/** - * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @return {!Promise} - * A native promise that resolves to the response - */ -proto.spotify.backstage.identity.v1.IdentityPromiseClient.prototype.getUser = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/spotify.backstage.identity.v1.Identity/GetUser', - request, - metadata || {}, - methodDescriptor_Identity_GetUser); -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.spotify.backstage.identity.v1.GetGroupRequest, - * !proto.spotify.backstage.identity.v1.GetGroupReply>} - */ -const methodDescriptor_Identity_GetGroup = new grpc.web.MethodDescriptor( - '/spotify.backstage.identity.v1.Identity/GetGroup', - grpc.web.MethodType.UNARY, - proto.spotify.backstage.identity.v1.GetGroupRequest, - proto.spotify.backstage.identity.v1.GetGroupReply, - /** - * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.identity.v1.GetGroupReply.deserializeBinary -); - - -/** - * @const - * @type {!grpc.web.AbstractClientBase.MethodInfo< - * !proto.spotify.backstage.identity.v1.GetGroupRequest, - * !proto.spotify.backstage.identity.v1.GetGroupReply>} - */ -const methodInfo_Identity_GetGroup = new grpc.web.AbstractClientBase.MethodInfo( - proto.spotify.backstage.identity.v1.GetGroupReply, - /** - * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.identity.v1.GetGroupReply.deserializeBinary -); - - -/** - * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.Error, ?proto.spotify.backstage.identity.v1.GetGroupReply)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.spotify.backstage.identity.v1.IdentityClient.prototype.getGroup = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/spotify.backstage.identity.v1.Identity/GetGroup', - request, - metadata || {}, - methodDescriptor_Identity_GetGroup, - callback); -}; - - -/** - * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @return {!Promise} - * A native promise that resolves to the response - */ -proto.spotify.backstage.identity.v1.IdentityPromiseClient.prototype.getGroup = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/spotify.backstage.identity.v1.Identity/GetGroup', - request, - metadata || {}, - methodDescriptor_Identity_GetGroup); -}; - - -module.exports = proto.spotify.backstage.identity.v1; - diff --git a/frontend/packages/proto/src/generated/identity/v1/identity_pb.d.ts b/frontend/packages/proto/src/generated/identity/v1/identity_pb.d.ts deleted file mode 100644 index ac0f4de095..0000000000 --- a/frontend/packages/proto/src/generated/identity/v1/identity_pb.d.ts +++ /dev/null @@ -1,136 +0,0 @@ -import * as jspb from "google-protobuf" - -export class GetUserRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetUserRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetUserRequest): GetUserRequest.AsObject; - static serializeBinaryToWriter(message: GetUserRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetUserRequest; - static deserializeBinaryFromReader(message: GetUserRequest, reader: jspb.BinaryReader): GetUserRequest; -} - -export namespace GetUserRequest { - export type AsObject = { - id: string, - } -} - -export class GetUserReply extends jspb.Message { - getUser(): User | undefined; - setUser(value?: User): void; - hasUser(): boolean; - clearUser(): void; - - getGroupsList(): Array; - setGroupsList(value: Array): void; - clearGroupsList(): void; - addGroups(value?: Group, index?: number): Group; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetUserReply.AsObject; - static toObject(includeInstance: boolean, msg: GetUserReply): GetUserReply.AsObject; - static serializeBinaryToWriter(message: GetUserReply, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetUserReply; - static deserializeBinaryFromReader(message: GetUserReply, reader: jspb.BinaryReader): GetUserReply; -} - -export namespace GetUserReply { - export type AsObject = { - user?: User.AsObject, - groupsList: Array, - } -} - -export class GetGroupRequest extends jspb.Message { - getId(): string; - setId(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetGroupRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetGroupRequest): GetGroupRequest.AsObject; - static serializeBinaryToWriter(message: GetGroupRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetGroupRequest; - static deserializeBinaryFromReader(message: GetGroupRequest, reader: jspb.BinaryReader): GetGroupRequest; -} - -export namespace GetGroupRequest { - export type AsObject = { - id: string, - } -} - -export class GetGroupReply extends jspb.Message { - getGroup(): Group | undefined; - setGroup(value?: Group): void; - hasGroup(): boolean; - clearGroup(): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetGroupReply.AsObject; - static toObject(includeInstance: boolean, msg: GetGroupReply): GetGroupReply.AsObject; - static serializeBinaryToWriter(message: GetGroupReply, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetGroupReply; - static deserializeBinaryFromReader(message: GetGroupReply, reader: jspb.BinaryReader): GetGroupReply; -} - -export namespace GetGroupReply { - export type AsObject = { - group?: Group.AsObject, - } -} - -export class User extends jspb.Message { - getId(): string; - setId(value: string): void; - - getName(): string; - setName(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): User.AsObject; - static toObject(includeInstance: boolean, msg: User): User.AsObject; - static serializeBinaryToWriter(message: User, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): User; - static deserializeBinaryFromReader(message: User, reader: jspb.BinaryReader): User; -} - -export namespace User { - export type AsObject = { - id: string, - name: string, - } -} - -export class Group extends jspb.Message { - getId(): string; - setId(value: string): void; - - getUsersList(): Array; - setUsersList(value: Array): void; - clearUsersList(): void; - addUsers(value?: User, index?: number): User; - - getGroupsList(): Array; - setGroupsList(value: Array): void; - clearGroupsList(): void; - addGroups(value?: Group, index?: number): Group; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Group.AsObject; - static toObject(includeInstance: boolean, msg: Group): Group.AsObject; - static serializeBinaryToWriter(message: Group, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Group; - static deserializeBinaryFromReader(message: Group, reader: jspb.BinaryReader): Group; -} - -export namespace Group { - export type AsObject = { - id: string, - usersList: Array, - groupsList: Array, - } -} - diff --git a/frontend/packages/proto/src/generated/identity/v1/identity_pb.js b/frontend/packages/proto/src/generated/identity/v1/identity_pb.js deleted file mode 100644 index f298cad9bd..0000000000 --- a/frontend/packages/proto/src/generated/identity/v1/identity_pb.js +++ /dev/null @@ -1,1136 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.spotify.backstage.identity.v1.GetGroupReply', null, global); -goog.exportSymbol('proto.spotify.backstage.identity.v1.GetGroupRequest', null, global); -goog.exportSymbol('proto.spotify.backstage.identity.v1.GetUserReply', null, global); -goog.exportSymbol('proto.spotify.backstage.identity.v1.GetUserRequest', null, global); -goog.exportSymbol('proto.spotify.backstage.identity.v1.Group', null, global); -goog.exportSymbol('proto.spotify.backstage.identity.v1.User', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.identity.v1.GetUserRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.identity.v1.GetUserRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.identity.v1.GetUserRequest.displayName = 'proto.spotify.backstage.identity.v1.GetUserRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.identity.v1.GetUserReply = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.spotify.backstage.identity.v1.GetUserReply.repeatedFields_, null); -}; -goog.inherits(proto.spotify.backstage.identity.v1.GetUserReply, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.identity.v1.GetUserReply.displayName = 'proto.spotify.backstage.identity.v1.GetUserReply'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.identity.v1.GetGroupRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.identity.v1.GetGroupRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.identity.v1.GetGroupRequest.displayName = 'proto.spotify.backstage.identity.v1.GetGroupRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.identity.v1.GetGroupReply = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.identity.v1.GetGroupReply, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.identity.v1.GetGroupReply.displayName = 'proto.spotify.backstage.identity.v1.GetGroupReply'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.identity.v1.User = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.identity.v1.User, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.identity.v1.User.displayName = 'proto.spotify.backstage.identity.v1.User'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.identity.v1.Group = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.spotify.backstage.identity.v1.Group.repeatedFields_, null); -}; -goog.inherits(proto.spotify.backstage.identity.v1.Group, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.identity.v1.Group.displayName = 'proto.spotify.backstage.identity.v1.Group'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.identity.v1.GetUserRequest.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.identity.v1.GetUserRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.identity.v1.GetUserRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.identity.v1.GetUserRequest} - */ -proto.spotify.backstage.identity.v1.GetUserRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.identity.v1.GetUserRequest; - return proto.spotify.backstage.identity.v1.GetUserRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.identity.v1.GetUserRequest} - */ -proto.spotify.backstage.identity.v1.GetUserRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.identity.v1.GetUserRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.identity.v1.GetUserRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.identity.v1.GetUserRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.identity.v1.GetUserRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.spotify.backstage.identity.v1.GetUserRequest.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.identity.v1.GetUserRequest.prototype.setId = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.spotify.backstage.identity.v1.GetUserReply.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.identity.v1.GetUserReply.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.identity.v1.GetUserReply.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.identity.v1.GetUserReply} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.identity.v1.GetUserReply.toObject = function(includeInstance, msg) { - var f, obj = { - user: (f = msg.getUser()) && proto.spotify.backstage.identity.v1.User.toObject(includeInstance, f), - groupsList: jspb.Message.toObjectList(msg.getGroupsList(), - proto.spotify.backstage.identity.v1.Group.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.identity.v1.GetUserReply} - */ -proto.spotify.backstage.identity.v1.GetUserReply.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.identity.v1.GetUserReply; - return proto.spotify.backstage.identity.v1.GetUserReply.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.identity.v1.GetUserReply} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.identity.v1.GetUserReply} - */ -proto.spotify.backstage.identity.v1.GetUserReply.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.spotify.backstage.identity.v1.User; - reader.readMessage(value,proto.spotify.backstage.identity.v1.User.deserializeBinaryFromReader); - msg.setUser(value); - break; - case 2: - var value = new proto.spotify.backstage.identity.v1.Group; - reader.readMessage(value,proto.spotify.backstage.identity.v1.Group.deserializeBinaryFromReader); - msg.addGroups(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.identity.v1.GetUserReply.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.identity.v1.GetUserReply.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.identity.v1.GetUserReply} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.identity.v1.GetUserReply.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUser(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.spotify.backstage.identity.v1.User.serializeBinaryToWriter - ); - } - f = message.getGroupsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.spotify.backstage.identity.v1.Group.serializeBinaryToWriter - ); - } -}; - - -/** - * optional User user = 1; - * @return {?proto.spotify.backstage.identity.v1.User} - */ -proto.spotify.backstage.identity.v1.GetUserReply.prototype.getUser = function() { - return /** @type{?proto.spotify.backstage.identity.v1.User} */ ( - jspb.Message.getWrapperField(this, proto.spotify.backstage.identity.v1.User, 1)); -}; - - -/** @param {?proto.spotify.backstage.identity.v1.User|undefined} value */ -proto.spotify.backstage.identity.v1.GetUserReply.prototype.setUser = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.spotify.backstage.identity.v1.GetUserReply.prototype.clearUser = function() { - this.setUser(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.spotify.backstage.identity.v1.GetUserReply.prototype.hasUser = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated Group groups = 2; - * @return {!Array} - */ -proto.spotify.backstage.identity.v1.GetUserReply.prototype.getGroupsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.spotify.backstage.identity.v1.Group, 2)); -}; - - -/** @param {!Array} value */ -proto.spotify.backstage.identity.v1.GetUserReply.prototype.setGroupsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.spotify.backstage.identity.v1.Group=} opt_value - * @param {number=} opt_index - * @return {!proto.spotify.backstage.identity.v1.Group} - */ -proto.spotify.backstage.identity.v1.GetUserReply.prototype.addGroups = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spotify.backstage.identity.v1.Group, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.spotify.backstage.identity.v1.GetUserReply.prototype.clearGroupsList = function() { - this.setGroupsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.identity.v1.GetGroupRequest.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.identity.v1.GetGroupRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.identity.v1.GetGroupRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.identity.v1.GetGroupRequest} - */ -proto.spotify.backstage.identity.v1.GetGroupRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.identity.v1.GetGroupRequest; - return proto.spotify.backstage.identity.v1.GetGroupRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.identity.v1.GetGroupRequest} - */ -proto.spotify.backstage.identity.v1.GetGroupRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.identity.v1.GetGroupRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.identity.v1.GetGroupRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.identity.v1.GetGroupRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.identity.v1.GetGroupRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.spotify.backstage.identity.v1.GetGroupRequest.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.identity.v1.GetGroupRequest.prototype.setId = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.identity.v1.GetGroupReply.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.identity.v1.GetGroupReply.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.identity.v1.GetGroupReply} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.identity.v1.GetGroupReply.toObject = function(includeInstance, msg) { - var f, obj = { - group: (f = msg.getGroup()) && proto.spotify.backstage.identity.v1.Group.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.identity.v1.GetGroupReply} - */ -proto.spotify.backstage.identity.v1.GetGroupReply.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.identity.v1.GetGroupReply; - return proto.spotify.backstage.identity.v1.GetGroupReply.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.identity.v1.GetGroupReply} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.identity.v1.GetGroupReply} - */ -proto.spotify.backstage.identity.v1.GetGroupReply.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.spotify.backstage.identity.v1.Group; - reader.readMessage(value,proto.spotify.backstage.identity.v1.Group.deserializeBinaryFromReader); - msg.setGroup(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.identity.v1.GetGroupReply.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.identity.v1.GetGroupReply.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.identity.v1.GetGroupReply} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.identity.v1.GetGroupReply.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGroup(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.spotify.backstage.identity.v1.Group.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Group group = 1; - * @return {?proto.spotify.backstage.identity.v1.Group} - */ -proto.spotify.backstage.identity.v1.GetGroupReply.prototype.getGroup = function() { - return /** @type{?proto.spotify.backstage.identity.v1.Group} */ ( - jspb.Message.getWrapperField(this, proto.spotify.backstage.identity.v1.Group, 1)); -}; - - -/** @param {?proto.spotify.backstage.identity.v1.Group|undefined} value */ -proto.spotify.backstage.identity.v1.GetGroupReply.prototype.setGroup = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.spotify.backstage.identity.v1.GetGroupReply.prototype.clearGroup = function() { - this.setGroup(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.spotify.backstage.identity.v1.GetGroupReply.prototype.hasGroup = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.identity.v1.User.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.identity.v1.User.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.identity.v1.User} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.identity.v1.User.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - name: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.identity.v1.User} - */ -proto.spotify.backstage.identity.v1.User.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.identity.v1.User; - return proto.spotify.backstage.identity.v1.User.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.identity.v1.User} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.identity.v1.User} - */ -proto.spotify.backstage.identity.v1.User.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.identity.v1.User.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.identity.v1.User.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.identity.v1.User} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.identity.v1.User.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.spotify.backstage.identity.v1.User.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.identity.v1.User.prototype.setId = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string name = 2; - * @return {string} - */ -proto.spotify.backstage.identity.v1.User.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.identity.v1.User.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.spotify.backstage.identity.v1.Group.repeatedFields_ = [2,3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.identity.v1.Group.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.identity.v1.Group.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.identity.v1.Group} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.identity.v1.Group.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - usersList: jspb.Message.toObjectList(msg.getUsersList(), - proto.spotify.backstage.identity.v1.User.toObject, includeInstance), - groupsList: jspb.Message.toObjectList(msg.getGroupsList(), - proto.spotify.backstage.identity.v1.Group.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.identity.v1.Group} - */ -proto.spotify.backstage.identity.v1.Group.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.identity.v1.Group; - return proto.spotify.backstage.identity.v1.Group.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.identity.v1.Group} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.identity.v1.Group} - */ -proto.spotify.backstage.identity.v1.Group.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = new proto.spotify.backstage.identity.v1.User; - reader.readMessage(value,proto.spotify.backstage.identity.v1.User.deserializeBinaryFromReader); - msg.addUsers(value); - break; - case 3: - var value = new proto.spotify.backstage.identity.v1.Group; - reader.readMessage(value,proto.spotify.backstage.identity.v1.Group.deserializeBinaryFromReader); - msg.addGroups(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.identity.v1.Group.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.identity.v1.Group.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.identity.v1.Group} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.identity.v1.Group.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUsersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.spotify.backstage.identity.v1.User.serializeBinaryToWriter - ); - } - f = message.getGroupsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.spotify.backstage.identity.v1.Group.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.spotify.backstage.identity.v1.Group.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.identity.v1.Group.prototype.setId = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * repeated User users = 2; - * @return {!Array} - */ -proto.spotify.backstage.identity.v1.Group.prototype.getUsersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.spotify.backstage.identity.v1.User, 2)); -}; - - -/** @param {!Array} value */ -proto.spotify.backstage.identity.v1.Group.prototype.setUsersList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.spotify.backstage.identity.v1.User=} opt_value - * @param {number=} opt_index - * @return {!proto.spotify.backstage.identity.v1.User} - */ -proto.spotify.backstage.identity.v1.Group.prototype.addUsers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spotify.backstage.identity.v1.User, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.spotify.backstage.identity.v1.Group.prototype.clearUsersList = function() { - this.setUsersList([]); -}; - - -/** - * repeated Group groups = 3; - * @return {!Array} - */ -proto.spotify.backstage.identity.v1.Group.prototype.getGroupsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.spotify.backstage.identity.v1.Group, 3)); -}; - - -/** @param {!Array} value */ -proto.spotify.backstage.identity.v1.Group.prototype.setGroupsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.spotify.backstage.identity.v1.Group=} opt_value - * @param {number=} opt_index - * @return {!proto.spotify.backstage.identity.v1.Group} - */ -proto.spotify.backstage.identity.v1.Group.prototype.addGroups = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.spotify.backstage.identity.v1.Group, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.spotify.backstage.identity.v1.Group.prototype.clearGroupsList = function() { - this.setGroupsList([]); -}; - - -goog.object.extend(exports, proto.spotify.backstage.identity.v1); diff --git a/frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.d.ts b/frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.d.ts deleted file mode 100644 index da57b03eb4..0000000000 --- a/frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -import * as grpcWeb from 'grpc-web'; - -import { - CreateEntityReply, - CreateEntityRequest, - GetEntityReply, - GetEntityRequest, - GetFactReply, - GetFactRequest, - ListEntitiesReply, - ListEntitiesRequest, - SetFactReply, - SetFactRequest} from './inventory_pb'; - -export class InventoryClient { - constructor (hostname: string, - credentials?: null | { [index: string]: string; }, - options?: null | { [index: string]: string; }); - - listEntities( - request: ListEntitiesRequest, - metadata: grpcWeb.Metadata | undefined, - callback: (err: grpcWeb.Error, - response: ListEntitiesReply) => void - ): grpcWeb.ClientReadableStream; - - getEntity( - request: GetEntityRequest, - metadata: grpcWeb.Metadata | undefined, - callback: (err: grpcWeb.Error, - response: GetEntityReply) => void - ): grpcWeb.ClientReadableStream; - - createEntity( - request: CreateEntityRequest, - metadata: grpcWeb.Metadata | undefined, - callback: (err: grpcWeb.Error, - response: CreateEntityReply) => void - ): grpcWeb.ClientReadableStream; - - setFact( - request: SetFactRequest, - metadata: grpcWeb.Metadata | undefined, - callback: (err: grpcWeb.Error, - response: SetFactReply) => void - ): grpcWeb.ClientReadableStream; - - getFact( - request: GetFactRequest, - metadata: grpcWeb.Metadata | undefined, - callback: (err: grpcWeb.Error, - response: GetFactReply) => void - ): grpcWeb.ClientReadableStream; - -} - -export class InventoryPromiseClient { - constructor (hostname: string, - credentials?: null | { [index: string]: string; }, - options?: null | { [index: string]: string; }); - - listEntities( - request: ListEntitiesRequest, - metadata?: grpcWeb.Metadata - ): Promise; - - getEntity( - request: GetEntityRequest, - metadata?: grpcWeb.Metadata - ): Promise; - - createEntity( - request: CreateEntityRequest, - metadata?: grpcWeb.Metadata - ): Promise; - - setFact( - request: SetFactRequest, - metadata?: grpcWeb.Metadata - ): Promise; - - getFact( - request: GetFactRequest, - metadata?: grpcWeb.Metadata - ): Promise; - -} - diff --git a/frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.js b/frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.js deleted file mode 100644 index 1604b62d94..0000000000 --- a/frontend/packages/proto/src/generated/inventory/v1/inventory_grpc_web_pb.js +++ /dev/null @@ -1,473 +0,0 @@ -/** - * @fileoverview gRPC-Web generated client stub for spotify.backstage.inventory.v1 - * @enhanceable - * @public - */ - -// GENERATED CODE -- DO NOT EDIT! - - - -const grpc = {}; -grpc.web = require('grpc-web'); - -const proto = {}; -proto.spotify = {}; -proto.spotify.backstage = {}; -proto.spotify.backstage.inventory = {}; -proto.spotify.backstage.inventory.v1 = require('./inventory_pb.js'); - -/** - * @param {string} hostname - * @param {?Object} credentials - * @param {?Object} options - * @constructor - * @struct - * @final - */ -proto.spotify.backstage.inventory.v1.InventoryClient = - function(hostname, credentials, options) { - if (!options) options = {}; - options['format'] = 'text'; - - /** - * @private @const {!grpc.web.GrpcWebClientBase} The client - */ - this.client_ = new grpc.web.GrpcWebClientBase(options); - - /** - * @private @const {string} The hostname - */ - this.hostname_ = hostname; - -}; - - -/** - * @param {string} hostname - * @param {?Object} credentials - * @param {?Object} options - * @constructor - * @struct - * @final - */ -proto.spotify.backstage.inventory.v1.InventoryPromiseClient = - function(hostname, credentials, options) { - if (!options) options = {}; - options['format'] = 'text'; - - /** - * @private @const {!grpc.web.GrpcWebClientBase} The client - */ - this.client_ = new grpc.web.GrpcWebClientBase(options); - - /** - * @private @const {string} The hostname - */ - this.hostname_ = hostname; - -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.spotify.backstage.inventory.v1.ListEntitiesRequest, - * !proto.spotify.backstage.inventory.v1.ListEntitiesReply>} - */ -const methodDescriptor_Inventory_ListEntities = new grpc.web.MethodDescriptor( - '/spotify.backstage.inventory.v1.Inventory/ListEntities', - grpc.web.MethodType.UNARY, - proto.spotify.backstage.inventory.v1.ListEntitiesRequest, - proto.spotify.backstage.inventory.v1.ListEntitiesReply, - /** - * @param {!proto.spotify.backstage.inventory.v1.ListEntitiesRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.inventory.v1.ListEntitiesReply.deserializeBinary -); - - -/** - * @const - * @type {!grpc.web.AbstractClientBase.MethodInfo< - * !proto.spotify.backstage.inventory.v1.ListEntitiesRequest, - * !proto.spotify.backstage.inventory.v1.ListEntitiesReply>} - */ -const methodInfo_Inventory_ListEntities = new grpc.web.AbstractClientBase.MethodInfo( - proto.spotify.backstage.inventory.v1.ListEntitiesReply, - /** - * @param {!proto.spotify.backstage.inventory.v1.ListEntitiesRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.inventory.v1.ListEntitiesReply.deserializeBinary -); - - -/** - * @param {!proto.spotify.backstage.inventory.v1.ListEntitiesRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.Error, ?proto.spotify.backstage.inventory.v1.ListEntitiesReply)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.spotify.backstage.inventory.v1.InventoryClient.prototype.listEntities = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/spotify.backstage.inventory.v1.Inventory/ListEntities', - request, - metadata || {}, - methodDescriptor_Inventory_ListEntities, - callback); -}; - - -/** - * @param {!proto.spotify.backstage.inventory.v1.ListEntitiesRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @return {!Promise} - * A native promise that resolves to the response - */ -proto.spotify.backstage.inventory.v1.InventoryPromiseClient.prototype.listEntities = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/spotify.backstage.inventory.v1.Inventory/ListEntities', - request, - metadata || {}, - methodDescriptor_Inventory_ListEntities); -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.spotify.backstage.inventory.v1.GetEntityRequest, - * !proto.spotify.backstage.inventory.v1.GetEntityReply>} - */ -const methodDescriptor_Inventory_GetEntity = new grpc.web.MethodDescriptor( - '/spotify.backstage.inventory.v1.Inventory/GetEntity', - grpc.web.MethodType.UNARY, - proto.spotify.backstage.inventory.v1.GetEntityRequest, - proto.spotify.backstage.inventory.v1.GetEntityReply, - /** - * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.inventory.v1.GetEntityReply.deserializeBinary -); - - -/** - * @const - * @type {!grpc.web.AbstractClientBase.MethodInfo< - * !proto.spotify.backstage.inventory.v1.GetEntityRequest, - * !proto.spotify.backstage.inventory.v1.GetEntityReply>} - */ -const methodInfo_Inventory_GetEntity = new grpc.web.AbstractClientBase.MethodInfo( - proto.spotify.backstage.inventory.v1.GetEntityReply, - /** - * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.inventory.v1.GetEntityReply.deserializeBinary -); - - -/** - * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.Error, ?proto.spotify.backstage.inventory.v1.GetEntityReply)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.spotify.backstage.inventory.v1.InventoryClient.prototype.getEntity = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/spotify.backstage.inventory.v1.Inventory/GetEntity', - request, - metadata || {}, - methodDescriptor_Inventory_GetEntity, - callback); -}; - - -/** - * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @return {!Promise} - * A native promise that resolves to the response - */ -proto.spotify.backstage.inventory.v1.InventoryPromiseClient.prototype.getEntity = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/spotify.backstage.inventory.v1.Inventory/GetEntity', - request, - metadata || {}, - methodDescriptor_Inventory_GetEntity); -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.spotify.backstage.inventory.v1.CreateEntityRequest, - * !proto.spotify.backstage.inventory.v1.CreateEntityReply>} - */ -const methodDescriptor_Inventory_CreateEntity = new grpc.web.MethodDescriptor( - '/spotify.backstage.inventory.v1.Inventory/CreateEntity', - grpc.web.MethodType.UNARY, - proto.spotify.backstage.inventory.v1.CreateEntityRequest, - proto.spotify.backstage.inventory.v1.CreateEntityReply, - /** - * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.inventory.v1.CreateEntityReply.deserializeBinary -); - - -/** - * @const - * @type {!grpc.web.AbstractClientBase.MethodInfo< - * !proto.spotify.backstage.inventory.v1.CreateEntityRequest, - * !proto.spotify.backstage.inventory.v1.CreateEntityReply>} - */ -const methodInfo_Inventory_CreateEntity = new grpc.web.AbstractClientBase.MethodInfo( - proto.spotify.backstage.inventory.v1.CreateEntityReply, - /** - * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.inventory.v1.CreateEntityReply.deserializeBinary -); - - -/** - * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.Error, ?proto.spotify.backstage.inventory.v1.CreateEntityReply)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.spotify.backstage.inventory.v1.InventoryClient.prototype.createEntity = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/spotify.backstage.inventory.v1.Inventory/CreateEntity', - request, - metadata || {}, - methodDescriptor_Inventory_CreateEntity, - callback); -}; - - -/** - * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @return {!Promise} - * A native promise that resolves to the response - */ -proto.spotify.backstage.inventory.v1.InventoryPromiseClient.prototype.createEntity = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/spotify.backstage.inventory.v1.Inventory/CreateEntity', - request, - metadata || {}, - methodDescriptor_Inventory_CreateEntity); -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.spotify.backstage.inventory.v1.SetFactRequest, - * !proto.spotify.backstage.inventory.v1.SetFactReply>} - */ -const methodDescriptor_Inventory_SetFact = new grpc.web.MethodDescriptor( - '/spotify.backstage.inventory.v1.Inventory/SetFact', - grpc.web.MethodType.UNARY, - proto.spotify.backstage.inventory.v1.SetFactRequest, - proto.spotify.backstage.inventory.v1.SetFactReply, - /** - * @param {!proto.spotify.backstage.inventory.v1.SetFactRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.inventory.v1.SetFactReply.deserializeBinary -); - - -/** - * @const - * @type {!grpc.web.AbstractClientBase.MethodInfo< - * !proto.spotify.backstage.inventory.v1.SetFactRequest, - * !proto.spotify.backstage.inventory.v1.SetFactReply>} - */ -const methodInfo_Inventory_SetFact = new grpc.web.AbstractClientBase.MethodInfo( - proto.spotify.backstage.inventory.v1.SetFactReply, - /** - * @param {!proto.spotify.backstage.inventory.v1.SetFactRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.inventory.v1.SetFactReply.deserializeBinary -); - - -/** - * @param {!proto.spotify.backstage.inventory.v1.SetFactRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.Error, ?proto.spotify.backstage.inventory.v1.SetFactReply)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.spotify.backstage.inventory.v1.InventoryClient.prototype.setFact = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/spotify.backstage.inventory.v1.Inventory/SetFact', - request, - metadata || {}, - methodDescriptor_Inventory_SetFact, - callback); -}; - - -/** - * @param {!proto.spotify.backstage.inventory.v1.SetFactRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @return {!Promise} - * A native promise that resolves to the response - */ -proto.spotify.backstage.inventory.v1.InventoryPromiseClient.prototype.setFact = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/spotify.backstage.inventory.v1.Inventory/SetFact', - request, - metadata || {}, - methodDescriptor_Inventory_SetFact); -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.spotify.backstage.inventory.v1.GetFactRequest, - * !proto.spotify.backstage.inventory.v1.GetFactReply>} - */ -const methodDescriptor_Inventory_GetFact = new grpc.web.MethodDescriptor( - '/spotify.backstage.inventory.v1.Inventory/GetFact', - grpc.web.MethodType.UNARY, - proto.spotify.backstage.inventory.v1.GetFactRequest, - proto.spotify.backstage.inventory.v1.GetFactReply, - /** - * @param {!proto.spotify.backstage.inventory.v1.GetFactRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.inventory.v1.GetFactReply.deserializeBinary -); - - -/** - * @const - * @type {!grpc.web.AbstractClientBase.MethodInfo< - * !proto.spotify.backstage.inventory.v1.GetFactRequest, - * !proto.spotify.backstage.inventory.v1.GetFactReply>} - */ -const methodInfo_Inventory_GetFact = new grpc.web.AbstractClientBase.MethodInfo( - proto.spotify.backstage.inventory.v1.GetFactReply, - /** - * @param {!proto.spotify.backstage.inventory.v1.GetFactRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.inventory.v1.GetFactReply.deserializeBinary -); - - -/** - * @param {!proto.spotify.backstage.inventory.v1.GetFactRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.Error, ?proto.spotify.backstage.inventory.v1.GetFactReply)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.spotify.backstage.inventory.v1.InventoryClient.prototype.getFact = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/spotify.backstage.inventory.v1.Inventory/GetFact', - request, - metadata || {}, - methodDescriptor_Inventory_GetFact, - callback); -}; - - -/** - * @param {!proto.spotify.backstage.inventory.v1.GetFactRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @return {!Promise} - * A native promise that resolves to the response - */ -proto.spotify.backstage.inventory.v1.InventoryPromiseClient.prototype.getFact = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/spotify.backstage.inventory.v1.Inventory/GetFact', - request, - metadata || {}, - methodDescriptor_Inventory_GetFact); -}; - - -module.exports = proto.spotify.backstage.inventory.v1; - diff --git a/frontend/packages/proto/src/generated/inventory/v1/inventory_pb.d.ts b/frontend/packages/proto/src/generated/inventory/v1/inventory_pb.d.ts deleted file mode 100644 index 69aa89e8af..0000000000 --- a/frontend/packages/proto/src/generated/inventory/v1/inventory_pb.d.ts +++ /dev/null @@ -1,254 +0,0 @@ -import * as jspb from "google-protobuf" - -export class ListEntitiesRequest extends jspb.Message { - getUriprefix(): string; - setUriprefix(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListEntitiesRequest.AsObject; - static toObject(includeInstance: boolean, msg: ListEntitiesRequest): ListEntitiesRequest.AsObject; - static serializeBinaryToWriter(message: ListEntitiesRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListEntitiesRequest; - static deserializeBinaryFromReader(message: ListEntitiesRequest, reader: jspb.BinaryReader): ListEntitiesRequest; -} - -export namespace ListEntitiesRequest { - export type AsObject = { - uriprefix: string, - } -} - -export class ListEntitiesReply extends jspb.Message { - getEntitiesList(): Array; - setEntitiesList(value: Array): void; - clearEntitiesList(): void; - addEntities(value?: Entity, index?: number): Entity; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListEntitiesReply.AsObject; - static toObject(includeInstance: boolean, msg: ListEntitiesReply): ListEntitiesReply.AsObject; - static serializeBinaryToWriter(message: ListEntitiesReply, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListEntitiesReply; - static deserializeBinaryFromReader(message: ListEntitiesReply, reader: jspb.BinaryReader): ListEntitiesReply; -} - -export namespace ListEntitiesReply { - export type AsObject = { - entitiesList: Array, - } -} - -export class GetEntityRequest extends jspb.Message { - getEntity(): Entity | undefined; - setEntity(value?: Entity): void; - hasEntity(): boolean; - clearEntity(): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetEntityRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetEntityRequest): GetEntityRequest.AsObject; - static serializeBinaryToWriter(message: GetEntityRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetEntityRequest; - static deserializeBinaryFromReader(message: GetEntityRequest, reader: jspb.BinaryReader): GetEntityRequest; -} - -export namespace GetEntityRequest { - export type AsObject = { - entity?: Entity.AsObject, - } -} - -export class GetEntityReply extends jspb.Message { - getEntity(): Entity | undefined; - setEntity(value?: Entity): void; - hasEntity(): boolean; - clearEntity(): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetEntityReply.AsObject; - static toObject(includeInstance: boolean, msg: GetEntityReply): GetEntityReply.AsObject; - static serializeBinaryToWriter(message: GetEntityReply, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetEntityReply; - static deserializeBinaryFromReader(message: GetEntityReply, reader: jspb.BinaryReader): GetEntityReply; -} - -export namespace GetEntityReply { - export type AsObject = { - entity?: Entity.AsObject, - } -} - -export class CreateEntityRequest extends jspb.Message { - getEntity(): Entity | undefined; - setEntity(value?: Entity): void; - hasEntity(): boolean; - clearEntity(): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateEntityRequest.AsObject; - static toObject(includeInstance: boolean, msg: CreateEntityRequest): CreateEntityRequest.AsObject; - static serializeBinaryToWriter(message: CreateEntityRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateEntityRequest; - static deserializeBinaryFromReader(message: CreateEntityRequest, reader: jspb.BinaryReader): CreateEntityRequest; -} - -export namespace CreateEntityRequest { - export type AsObject = { - entity?: Entity.AsObject, - } -} - -export class CreateEntityReply extends jspb.Message { - getEntity(): Entity | undefined; - setEntity(value?: Entity): void; - hasEntity(): boolean; - clearEntity(): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateEntityReply.AsObject; - static toObject(includeInstance: boolean, msg: CreateEntityReply): CreateEntityReply.AsObject; - static serializeBinaryToWriter(message: CreateEntityReply, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateEntityReply; - static deserializeBinaryFromReader(message: CreateEntityReply, reader: jspb.BinaryReader): CreateEntityReply; -} - -export namespace CreateEntityReply { - export type AsObject = { - entity?: Entity.AsObject, - } -} - -export class SetFactRequest extends jspb.Message { - getEntityuri(): string; - setEntityuri(value: string): void; - - getName(): string; - setName(value: string): void; - - getValue(): string; - setValue(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SetFactRequest.AsObject; - static toObject(includeInstance: boolean, msg: SetFactRequest): SetFactRequest.AsObject; - static serializeBinaryToWriter(message: SetFactRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SetFactRequest; - static deserializeBinaryFromReader(message: SetFactRequest, reader: jspb.BinaryReader): SetFactRequest; -} - -export namespace SetFactRequest { - export type AsObject = { - entityuri: string, - name: string, - value: string, - } -} - -export class SetFactReply extends jspb.Message { - getFact(): Fact | undefined; - setFact(value?: Fact): void; - hasFact(): boolean; - clearFact(): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SetFactReply.AsObject; - static toObject(includeInstance: boolean, msg: SetFactReply): SetFactReply.AsObject; - static serializeBinaryToWriter(message: SetFactReply, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SetFactReply; - static deserializeBinaryFromReader(message: SetFactReply, reader: jspb.BinaryReader): SetFactReply; -} - -export namespace SetFactReply { - export type AsObject = { - fact?: Fact.AsObject, - } -} - -export class GetFactRequest extends jspb.Message { - getEntityuri(): string; - setEntityuri(value: string): void; - - getName(): string; - setName(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetFactRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetFactRequest): GetFactRequest.AsObject; - static serializeBinaryToWriter(message: GetFactRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetFactRequest; - static deserializeBinaryFromReader(message: GetFactRequest, reader: jspb.BinaryReader): GetFactRequest; -} - -export namespace GetFactRequest { - export type AsObject = { - entityuri: string, - name: string, - } -} - -export class GetFactReply extends jspb.Message { - getFact(): Fact | undefined; - setFact(value?: Fact): void; - hasFact(): boolean; - clearFact(): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetFactReply.AsObject; - static toObject(includeInstance: boolean, msg: GetFactReply): GetFactReply.AsObject; - static serializeBinaryToWriter(message: GetFactReply, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetFactReply; - static deserializeBinaryFromReader(message: GetFactReply, reader: jspb.BinaryReader): GetFactReply; -} - -export namespace GetFactReply { - export type AsObject = { - fact?: Fact.AsObject, - } -} - -export class Entity extends jspb.Message { - getUri(): string; - setUri(value: string): void; - - getFactsList(): Array; - setFactsList(value: Array): void; - clearFactsList(): void; - addFacts(value?: Fact, index?: number): Fact; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Entity.AsObject; - static toObject(includeInstance: boolean, msg: Entity): Entity.AsObject; - static serializeBinaryToWriter(message: Entity, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Entity; - static deserializeBinaryFromReader(message: Entity, reader: jspb.BinaryReader): Entity; -} - -export namespace Entity { - export type AsObject = { - uri: string, - factsList: Array, - } -} - -export class Fact extends jspb.Message { - getName(): string; - setName(value: string): void; - - getValue(): string; - setValue(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Fact.AsObject; - static toObject(includeInstance: boolean, msg: Fact): Fact.AsObject; - static serializeBinaryToWriter(message: Fact, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Fact; - static deserializeBinaryFromReader(message: Fact, reader: jspb.BinaryReader): Fact; -} - -export namespace Fact { - export type AsObject = { - name: string, - value: string, - } -} - diff --git a/frontend/packages/proto/src/generated/inventory/v1/inventory_pb.js b/frontend/packages/proto/src/generated/inventory/v1/inventory_pb.js deleted file mode 100644 index a48e412334..0000000000 --- a/frontend/packages/proto/src/generated/inventory/v1/inventory_pb.js +++ /dev/null @@ -1,2115 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.spotify.backstage.inventory.v1.CreateEntityReply', null, global); -goog.exportSymbol('proto.spotify.backstage.inventory.v1.CreateEntityRequest', null, global); -goog.exportSymbol('proto.spotify.backstage.inventory.v1.Entity', null, global); -goog.exportSymbol('proto.spotify.backstage.inventory.v1.Fact', null, global); -goog.exportSymbol('proto.spotify.backstage.inventory.v1.GetEntityReply', null, global); -goog.exportSymbol('proto.spotify.backstage.inventory.v1.GetEntityRequest', null, global); -goog.exportSymbol('proto.spotify.backstage.inventory.v1.GetFactReply', null, global); -goog.exportSymbol('proto.spotify.backstage.inventory.v1.GetFactRequest', null, global); -goog.exportSymbol('proto.spotify.backstage.inventory.v1.ListEntitiesReply', null, global); -goog.exportSymbol('proto.spotify.backstage.inventory.v1.ListEntitiesRequest', null, global); -goog.exportSymbol('proto.spotify.backstage.inventory.v1.SetFactReply', null, global); -goog.exportSymbol('proto.spotify.backstage.inventory.v1.SetFactRequest', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.inventory.v1.ListEntitiesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.inventory.v1.ListEntitiesRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.inventory.v1.ListEntitiesRequest.displayName = 'proto.spotify.backstage.inventory.v1.ListEntitiesRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.inventory.v1.ListEntitiesReply = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.spotify.backstage.inventory.v1.ListEntitiesReply.repeatedFields_, null); -}; -goog.inherits(proto.spotify.backstage.inventory.v1.ListEntitiesReply, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.inventory.v1.ListEntitiesReply.displayName = 'proto.spotify.backstage.inventory.v1.ListEntitiesReply'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.inventory.v1.GetEntityRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.inventory.v1.GetEntityRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.inventory.v1.GetEntityRequest.displayName = 'proto.spotify.backstage.inventory.v1.GetEntityRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.inventory.v1.GetEntityReply = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.inventory.v1.GetEntityReply, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.inventory.v1.GetEntityReply.displayName = 'proto.spotify.backstage.inventory.v1.GetEntityReply'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.inventory.v1.CreateEntityRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.inventory.v1.CreateEntityRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.inventory.v1.CreateEntityRequest.displayName = 'proto.spotify.backstage.inventory.v1.CreateEntityRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.inventory.v1.CreateEntityReply = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.inventory.v1.CreateEntityReply, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.inventory.v1.CreateEntityReply.displayName = 'proto.spotify.backstage.inventory.v1.CreateEntityReply'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.inventory.v1.SetFactRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.inventory.v1.SetFactRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.inventory.v1.SetFactRequest.displayName = 'proto.spotify.backstage.inventory.v1.SetFactRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.inventory.v1.SetFactReply = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.inventory.v1.SetFactReply, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.inventory.v1.SetFactReply.displayName = 'proto.spotify.backstage.inventory.v1.SetFactReply'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.inventory.v1.GetFactRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.inventory.v1.GetFactRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.inventory.v1.GetFactRequest.displayName = 'proto.spotify.backstage.inventory.v1.GetFactRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.inventory.v1.GetFactReply = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.inventory.v1.GetFactReply, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.inventory.v1.GetFactReply.displayName = 'proto.spotify.backstage.inventory.v1.GetFactReply'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.inventory.v1.Entity = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.spotify.backstage.inventory.v1.Entity.repeatedFields_, null); -}; -goog.inherits(proto.spotify.backstage.inventory.v1.Entity, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.inventory.v1.Entity.displayName = 'proto.spotify.backstage.inventory.v1.Entity'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.spotify.backstage.inventory.v1.Fact = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.spotify.backstage.inventory.v1.Fact, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.spotify.backstage.inventory.v1.Fact.displayName = 'proto.spotify.backstage.inventory.v1.Fact'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.inventory.v1.ListEntitiesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.inventory.v1.ListEntitiesRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.inventory.v1.ListEntitiesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.ListEntitiesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - uriprefix: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.inventory.v1.ListEntitiesRequest} - */ -proto.spotify.backstage.inventory.v1.ListEntitiesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.inventory.v1.ListEntitiesRequest; - return proto.spotify.backstage.inventory.v1.ListEntitiesRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.inventory.v1.ListEntitiesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.inventory.v1.ListEntitiesRequest} - */ -proto.spotify.backstage.inventory.v1.ListEntitiesRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUriprefix(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.inventory.v1.ListEntitiesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.inventory.v1.ListEntitiesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.inventory.v1.ListEntitiesRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.ListEntitiesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUriprefix(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string uriPrefix = 1; - * @return {string} - */ -proto.spotify.backstage.inventory.v1.ListEntitiesRequest.prototype.getUriprefix = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.inventory.v1.ListEntitiesRequest.prototype.setUriprefix = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.spotify.backstage.inventory.v1.ListEntitiesReply.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.inventory.v1.ListEntitiesReply.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.inventory.v1.ListEntitiesReply.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.inventory.v1.ListEntitiesReply} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.ListEntitiesReply.toObject = function(includeInstance, msg) { - var f, obj = { - entitiesList: jspb.Message.toObjectList(msg.getEntitiesList(), - proto.spotify.backstage.inventory.v1.Entity.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.inventory.v1.ListEntitiesReply} - */ -proto.spotify.backstage.inventory.v1.ListEntitiesReply.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.inventory.v1.ListEntitiesReply; - return proto.spotify.backstage.inventory.v1.ListEntitiesReply.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.inventory.v1.ListEntitiesReply} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.inventory.v1.ListEntitiesReply} - */ -proto.spotify.backstage.inventory.v1.ListEntitiesReply.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.spotify.backstage.inventory.v1.Entity; - reader.readMessage(value,proto.spotify.backstage.inventory.v1.Entity.deserializeBinaryFromReader); - msg.addEntities(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.inventory.v1.ListEntitiesReply.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.inventory.v1.ListEntitiesReply.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.inventory.v1.ListEntitiesReply} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.ListEntitiesReply.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntitiesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.spotify.backstage.inventory.v1.Entity.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated Entity entities = 1; - * @return {!Array} - */ -proto.spotify.backstage.inventory.v1.ListEntitiesReply.prototype.getEntitiesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.spotify.backstage.inventory.v1.Entity, 1)); -}; - - -/** @param {!Array} value */ -proto.spotify.backstage.inventory.v1.ListEntitiesReply.prototype.setEntitiesList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.spotify.backstage.inventory.v1.Entity=} opt_value - * @param {number=} opt_index - * @return {!proto.spotify.backstage.inventory.v1.Entity} - */ -proto.spotify.backstage.inventory.v1.ListEntitiesReply.prototype.addEntities = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spotify.backstage.inventory.v1.Entity, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.spotify.backstage.inventory.v1.ListEntitiesReply.prototype.clearEntitiesList = function() { - this.setEntitiesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.inventory.v1.GetEntityRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.GetEntityRequest.toObject = function(includeInstance, msg) { - var f, obj = { - entity: (f = msg.getEntity()) && proto.spotify.backstage.inventory.v1.Entity.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.inventory.v1.GetEntityRequest} - */ -proto.spotify.backstage.inventory.v1.GetEntityRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.inventory.v1.GetEntityRequest; - return proto.spotify.backstage.inventory.v1.GetEntityRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.inventory.v1.GetEntityRequest} - */ -proto.spotify.backstage.inventory.v1.GetEntityRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.spotify.backstage.inventory.v1.Entity; - reader.readMessage(value,proto.spotify.backstage.inventory.v1.Entity.deserializeBinaryFromReader); - msg.setEntity(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.inventory.v1.GetEntityRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.inventory.v1.GetEntityRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.GetEntityRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntity(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.spotify.backstage.inventory.v1.Entity.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Entity entity = 1; - * @return {?proto.spotify.backstage.inventory.v1.Entity} - */ -proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.getEntity = function() { - return /** @type{?proto.spotify.backstage.inventory.v1.Entity} */ ( - jspb.Message.getWrapperField(this, proto.spotify.backstage.inventory.v1.Entity, 1)); -}; - - -/** @param {?proto.spotify.backstage.inventory.v1.Entity|undefined} value */ -proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.setEntity = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.clearEntity = function() { - this.setEntity(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.spotify.backstage.inventory.v1.GetEntityRequest.prototype.hasEntity = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.inventory.v1.GetEntityReply.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.inventory.v1.GetEntityReply} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.GetEntityReply.toObject = function(includeInstance, msg) { - var f, obj = { - entity: (f = msg.getEntity()) && proto.spotify.backstage.inventory.v1.Entity.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.inventory.v1.GetEntityReply} - */ -proto.spotify.backstage.inventory.v1.GetEntityReply.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.inventory.v1.GetEntityReply; - return proto.spotify.backstage.inventory.v1.GetEntityReply.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.inventory.v1.GetEntityReply} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.inventory.v1.GetEntityReply} - */ -proto.spotify.backstage.inventory.v1.GetEntityReply.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.spotify.backstage.inventory.v1.Entity; - reader.readMessage(value,proto.spotify.backstage.inventory.v1.Entity.deserializeBinaryFromReader); - msg.setEntity(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.inventory.v1.GetEntityReply.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.inventory.v1.GetEntityReply} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.GetEntityReply.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntity(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.spotify.backstage.inventory.v1.Entity.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Entity entity = 1; - * @return {?proto.spotify.backstage.inventory.v1.Entity} - */ -proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.getEntity = function() { - return /** @type{?proto.spotify.backstage.inventory.v1.Entity} */ ( - jspb.Message.getWrapperField(this, proto.spotify.backstage.inventory.v1.Entity, 1)); -}; - - -/** @param {?proto.spotify.backstage.inventory.v1.Entity|undefined} value */ -proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.setEntity = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.clearEntity = function() { - this.setEntity(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.spotify.backstage.inventory.v1.GetEntityReply.prototype.hasEntity = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.inventory.v1.CreateEntityRequest.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.inventory.v1.CreateEntityRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.CreateEntityRequest.toObject = function(includeInstance, msg) { - var f, obj = { - entity: (f = msg.getEntity()) && proto.spotify.backstage.inventory.v1.Entity.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} - */ -proto.spotify.backstage.inventory.v1.CreateEntityRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.inventory.v1.CreateEntityRequest; - return proto.spotify.backstage.inventory.v1.CreateEntityRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} - */ -proto.spotify.backstage.inventory.v1.CreateEntityRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.spotify.backstage.inventory.v1.Entity; - reader.readMessage(value,proto.spotify.backstage.inventory.v1.Entity.deserializeBinaryFromReader); - msg.setEntity(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.inventory.v1.CreateEntityRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.inventory.v1.CreateEntityRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.inventory.v1.CreateEntityRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.CreateEntityRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntity(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.spotify.backstage.inventory.v1.Entity.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Entity entity = 1; - * @return {?proto.spotify.backstage.inventory.v1.Entity} - */ -proto.spotify.backstage.inventory.v1.CreateEntityRequest.prototype.getEntity = function() { - return /** @type{?proto.spotify.backstage.inventory.v1.Entity} */ ( - jspb.Message.getWrapperField(this, proto.spotify.backstage.inventory.v1.Entity, 1)); -}; - - -/** @param {?proto.spotify.backstage.inventory.v1.Entity|undefined} value */ -proto.spotify.backstage.inventory.v1.CreateEntityRequest.prototype.setEntity = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.spotify.backstage.inventory.v1.CreateEntityRequest.prototype.clearEntity = function() { - this.setEntity(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.spotify.backstage.inventory.v1.CreateEntityRequest.prototype.hasEntity = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.inventory.v1.CreateEntityReply.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.inventory.v1.CreateEntityReply.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.inventory.v1.CreateEntityReply} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.CreateEntityReply.toObject = function(includeInstance, msg) { - var f, obj = { - entity: (f = msg.getEntity()) && proto.spotify.backstage.inventory.v1.Entity.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.inventory.v1.CreateEntityReply} - */ -proto.spotify.backstage.inventory.v1.CreateEntityReply.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.inventory.v1.CreateEntityReply; - return proto.spotify.backstage.inventory.v1.CreateEntityReply.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.inventory.v1.CreateEntityReply} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.inventory.v1.CreateEntityReply} - */ -proto.spotify.backstage.inventory.v1.CreateEntityReply.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.spotify.backstage.inventory.v1.Entity; - reader.readMessage(value,proto.spotify.backstage.inventory.v1.Entity.deserializeBinaryFromReader); - msg.setEntity(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.inventory.v1.CreateEntityReply.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.inventory.v1.CreateEntityReply.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.inventory.v1.CreateEntityReply} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.CreateEntityReply.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntity(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.spotify.backstage.inventory.v1.Entity.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Entity entity = 1; - * @return {?proto.spotify.backstage.inventory.v1.Entity} - */ -proto.spotify.backstage.inventory.v1.CreateEntityReply.prototype.getEntity = function() { - return /** @type{?proto.spotify.backstage.inventory.v1.Entity} */ ( - jspb.Message.getWrapperField(this, proto.spotify.backstage.inventory.v1.Entity, 1)); -}; - - -/** @param {?proto.spotify.backstage.inventory.v1.Entity|undefined} value */ -proto.spotify.backstage.inventory.v1.CreateEntityReply.prototype.setEntity = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.spotify.backstage.inventory.v1.CreateEntityReply.prototype.clearEntity = function() { - this.setEntity(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.spotify.backstage.inventory.v1.CreateEntityReply.prototype.hasEntity = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.inventory.v1.SetFactRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.inventory.v1.SetFactRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.SetFactRequest.toObject = function(includeInstance, msg) { - var f, obj = { - entityuri: jspb.Message.getFieldWithDefault(msg, 1, ""), - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - value: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.inventory.v1.SetFactRequest} - */ -proto.spotify.backstage.inventory.v1.SetFactRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.inventory.v1.SetFactRequest; - return proto.spotify.backstage.inventory.v1.SetFactRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.inventory.v1.SetFactRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.inventory.v1.SetFactRequest} - */ -proto.spotify.backstage.inventory.v1.SetFactRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setEntityuri(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setValue(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.inventory.v1.SetFactRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.inventory.v1.SetFactRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.SetFactRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntityuri(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getValue(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string entityUri = 1; - * @return {string} - */ -proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.getEntityuri = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.setEntityuri = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string name = 2; - * @return {string} - */ -proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string value = 3; - * @return {string} - */ -proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.getValue = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.inventory.v1.SetFactRequest.prototype.setValue = function(value) { - jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.inventory.v1.SetFactReply.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.inventory.v1.SetFactReply.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.inventory.v1.SetFactReply} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.SetFactReply.toObject = function(includeInstance, msg) { - var f, obj = { - fact: (f = msg.getFact()) && proto.spotify.backstage.inventory.v1.Fact.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.inventory.v1.SetFactReply} - */ -proto.spotify.backstage.inventory.v1.SetFactReply.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.inventory.v1.SetFactReply; - return proto.spotify.backstage.inventory.v1.SetFactReply.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.inventory.v1.SetFactReply} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.inventory.v1.SetFactReply} - */ -proto.spotify.backstage.inventory.v1.SetFactReply.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.spotify.backstage.inventory.v1.Fact; - reader.readMessage(value,proto.spotify.backstage.inventory.v1.Fact.deserializeBinaryFromReader); - msg.setFact(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.inventory.v1.SetFactReply.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.inventory.v1.SetFactReply.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.inventory.v1.SetFactReply} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.SetFactReply.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFact(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.spotify.backstage.inventory.v1.Fact.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Fact fact = 1; - * @return {?proto.spotify.backstage.inventory.v1.Fact} - */ -proto.spotify.backstage.inventory.v1.SetFactReply.prototype.getFact = function() { - return /** @type{?proto.spotify.backstage.inventory.v1.Fact} */ ( - jspb.Message.getWrapperField(this, proto.spotify.backstage.inventory.v1.Fact, 1)); -}; - - -/** @param {?proto.spotify.backstage.inventory.v1.Fact|undefined} value */ -proto.spotify.backstage.inventory.v1.SetFactReply.prototype.setFact = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.spotify.backstage.inventory.v1.SetFactReply.prototype.clearFact = function() { - this.setFact(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.spotify.backstage.inventory.v1.SetFactReply.prototype.hasFact = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.inventory.v1.GetFactRequest.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.inventory.v1.GetFactRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.inventory.v1.GetFactRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.GetFactRequest.toObject = function(includeInstance, msg) { - var f, obj = { - entityuri: jspb.Message.getFieldWithDefault(msg, 1, ""), - name: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.inventory.v1.GetFactRequest} - */ -proto.spotify.backstage.inventory.v1.GetFactRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.inventory.v1.GetFactRequest; - return proto.spotify.backstage.inventory.v1.GetFactRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.inventory.v1.GetFactRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.inventory.v1.GetFactRequest} - */ -proto.spotify.backstage.inventory.v1.GetFactRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setEntityuri(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.inventory.v1.GetFactRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.inventory.v1.GetFactRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.inventory.v1.GetFactRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.GetFactRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEntityuri(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string entityUri = 1; - * @return {string} - */ -proto.spotify.backstage.inventory.v1.GetFactRequest.prototype.getEntityuri = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.inventory.v1.GetFactRequest.prototype.setEntityuri = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string name = 2; - * @return {string} - */ -proto.spotify.backstage.inventory.v1.GetFactRequest.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.inventory.v1.GetFactRequest.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.inventory.v1.GetFactReply.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.inventory.v1.GetFactReply.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.inventory.v1.GetFactReply} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.GetFactReply.toObject = function(includeInstance, msg) { - var f, obj = { - fact: (f = msg.getFact()) && proto.spotify.backstage.inventory.v1.Fact.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.inventory.v1.GetFactReply} - */ -proto.spotify.backstage.inventory.v1.GetFactReply.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.inventory.v1.GetFactReply; - return proto.spotify.backstage.inventory.v1.GetFactReply.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.inventory.v1.GetFactReply} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.inventory.v1.GetFactReply} - */ -proto.spotify.backstage.inventory.v1.GetFactReply.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.spotify.backstage.inventory.v1.Fact; - reader.readMessage(value,proto.spotify.backstage.inventory.v1.Fact.deserializeBinaryFromReader); - msg.setFact(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.inventory.v1.GetFactReply.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.inventory.v1.GetFactReply.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.inventory.v1.GetFactReply} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.GetFactReply.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFact(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.spotify.backstage.inventory.v1.Fact.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Fact fact = 1; - * @return {?proto.spotify.backstage.inventory.v1.Fact} - */ -proto.spotify.backstage.inventory.v1.GetFactReply.prototype.getFact = function() { - return /** @type{?proto.spotify.backstage.inventory.v1.Fact} */ ( - jspb.Message.getWrapperField(this, proto.spotify.backstage.inventory.v1.Fact, 1)); -}; - - -/** @param {?proto.spotify.backstage.inventory.v1.Fact|undefined} value */ -proto.spotify.backstage.inventory.v1.GetFactReply.prototype.setFact = function(value) { - jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.spotify.backstage.inventory.v1.GetFactReply.prototype.clearFact = function() { - this.setFact(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.spotify.backstage.inventory.v1.GetFactReply.prototype.hasFact = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.spotify.backstage.inventory.v1.Entity.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.inventory.v1.Entity.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.inventory.v1.Entity.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.inventory.v1.Entity} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.Entity.toObject = function(includeInstance, msg) { - var f, obj = { - uri: jspb.Message.getFieldWithDefault(msg, 1, ""), - factsList: jspb.Message.toObjectList(msg.getFactsList(), - proto.spotify.backstage.inventory.v1.Fact.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.inventory.v1.Entity} - */ -proto.spotify.backstage.inventory.v1.Entity.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.inventory.v1.Entity; - return proto.spotify.backstage.inventory.v1.Entity.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.inventory.v1.Entity} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.inventory.v1.Entity} - */ -proto.spotify.backstage.inventory.v1.Entity.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUri(value); - break; - case 2: - var value = new proto.spotify.backstage.inventory.v1.Fact; - reader.readMessage(value,proto.spotify.backstage.inventory.v1.Fact.deserializeBinaryFromReader); - msg.addFacts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.inventory.v1.Entity.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.inventory.v1.Entity.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.inventory.v1.Entity} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.Entity.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUri(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFactsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.spotify.backstage.inventory.v1.Fact.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string uri = 1; - * @return {string} - */ -proto.spotify.backstage.inventory.v1.Entity.prototype.getUri = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.inventory.v1.Entity.prototype.setUri = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * repeated Fact facts = 2; - * @return {!Array} - */ -proto.spotify.backstage.inventory.v1.Entity.prototype.getFactsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.spotify.backstage.inventory.v1.Fact, 2)); -}; - - -/** @param {!Array} value */ -proto.spotify.backstage.inventory.v1.Entity.prototype.setFactsList = function(value) { - jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.spotify.backstage.inventory.v1.Fact=} opt_value - * @param {number=} opt_index - * @return {!proto.spotify.backstage.inventory.v1.Fact} - */ -proto.spotify.backstage.inventory.v1.Entity.prototype.addFacts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spotify.backstage.inventory.v1.Fact, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - */ -proto.spotify.backstage.inventory.v1.Entity.prototype.clearFactsList = function() { - this.setFactsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.spotify.backstage.inventory.v1.Fact.prototype.toObject = function(opt_includeInstance) { - return proto.spotify.backstage.inventory.v1.Fact.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.spotify.backstage.inventory.v1.Fact} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.Fact.toObject = function(includeInstance, msg) { - var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - value: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.spotify.backstage.inventory.v1.Fact} - */ -proto.spotify.backstage.inventory.v1.Fact.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.spotify.backstage.inventory.v1.Fact; - return proto.spotify.backstage.inventory.v1.Fact.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.spotify.backstage.inventory.v1.Fact} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.spotify.backstage.inventory.v1.Fact} - */ -proto.spotify.backstage.inventory.v1.Fact.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setValue(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.spotify.backstage.inventory.v1.Fact.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.spotify.backstage.inventory.v1.Fact.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.spotify.backstage.inventory.v1.Fact} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.spotify.backstage.inventory.v1.Fact.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getValue(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.spotify.backstage.inventory.v1.Fact.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.inventory.v1.Fact.prototype.setName = function(value) { - jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string value = 2; - * @return {string} - */ -proto.spotify.backstage.inventory.v1.Fact.prototype.getValue = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** @param {string} value */ -proto.spotify.backstage.inventory.v1.Fact.prototype.setValue = function(value) { - jspb.Message.setProto3StringField(this, 2, value); -}; - - -goog.object.extend(exports, proto.spotify.backstage.inventory.v1); diff --git a/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.d.ts b/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.d.ts deleted file mode 100644 index f2a2819bf2..0000000000 --- a/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import * as grpcWeb from 'grpc-web'; - -import * as identity_v1_identity_pb from '../../identity/v1/identity_pb'; -import * as google_protobuf_struct_pb from 'google-protobuf/google/protobuf/struct_pb'; - -import { - CreateReply, - CreateRequest, - Empty, - ListTemplatesReply} from './scaffolder_pb'; - -export class ScaffolderClient { - constructor (hostname: string, - credentials?: null | { [index: string]: string; }, - options?: null | { [index: string]: string; }); - - listTemplates( - request: Empty, - metadata: grpcWeb.Metadata | undefined, - callback: (err: grpcWeb.Error, - response: ListTemplatesReply) => void - ): grpcWeb.ClientReadableStream; - - create( - request: CreateRequest, - metadata: grpcWeb.Metadata | undefined, - callback: (err: grpcWeb.Error, - response: CreateReply) => void - ): grpcWeb.ClientReadableStream; - -} - -export class ScaffolderPromiseClient { - constructor (hostname: string, - credentials?: null | { [index: string]: string; }, - options?: null | { [index: string]: string; }); - - listTemplates( - request: Empty, - metadata?: grpcWeb.Metadata - ): Promise; - - create( - request: CreateRequest, - metadata?: grpcWeb.Metadata - ): Promise; - -} - diff --git a/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.js b/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.js deleted file mode 100644 index 0885d0c7f0..0000000000 --- a/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_grpc_web_pb.js +++ /dev/null @@ -1,237 +0,0 @@ -/** - * @fileoverview gRPC-Web generated client stub for spotify.backstage.scaffolder.v1 - * @enhanceable - * @public - */ - -// GENERATED CODE -- DO NOT EDIT! - - - -const grpc = {}; -grpc.web = require('grpc-web'); - - -var identity_v1_identity_pb = require('../../identity/v1/identity_pb.js') - -var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js') -const proto = {}; -proto.spotify = {}; -proto.spotify.backstage = {}; -proto.spotify.backstage.scaffolder = {}; -proto.spotify.backstage.scaffolder.v1 = require('./scaffolder_pb.js'); - -/** - * @param {string} hostname - * @param {?Object} credentials - * @param {?Object} options - * @constructor - * @struct - * @final - */ -proto.spotify.backstage.scaffolder.v1.ScaffolderClient = - function(hostname, credentials, options) { - if (!options) options = {}; - options['format'] = 'text'; - - /** - * @private @const {!grpc.web.GrpcWebClientBase} The client - */ - this.client_ = new grpc.web.GrpcWebClientBase(options); - - /** - * @private @const {string} The hostname - */ - this.hostname_ = hostname; - -}; - - -/** - * @param {string} hostname - * @param {?Object} credentials - * @param {?Object} options - * @constructor - * @struct - * @final - */ -proto.spotify.backstage.scaffolder.v1.ScaffolderPromiseClient = - function(hostname, credentials, options) { - if (!options) options = {}; - options['format'] = 'text'; - - /** - * @private @const {!grpc.web.GrpcWebClientBase} The client - */ - this.client_ = new grpc.web.GrpcWebClientBase(options); - - /** - * @private @const {string} The hostname - */ - this.hostname_ = hostname; - -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.spotify.backstage.scaffolder.v1.Empty, - * !proto.spotify.backstage.scaffolder.v1.ListTemplatesReply>} - */ -const methodDescriptor_Scaffolder_ListTemplates = new grpc.web.MethodDescriptor( - '/spotify.backstage.scaffolder.v1.Scaffolder/ListTemplates', - grpc.web.MethodType.UNARY, - proto.spotify.backstage.scaffolder.v1.Empty, - proto.spotify.backstage.scaffolder.v1.ListTemplatesReply, - /** - * @param {!proto.spotify.backstage.scaffolder.v1.Empty} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.deserializeBinary -); - - -/** - * @const - * @type {!grpc.web.AbstractClientBase.MethodInfo< - * !proto.spotify.backstage.scaffolder.v1.Empty, - * !proto.spotify.backstage.scaffolder.v1.ListTemplatesReply>} - */ -const methodInfo_Scaffolder_ListTemplates = new grpc.web.AbstractClientBase.MethodInfo( - proto.spotify.backstage.scaffolder.v1.ListTemplatesReply, - /** - * @param {!proto.spotify.backstage.scaffolder.v1.Empty} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.deserializeBinary -); - - -/** - * @param {!proto.spotify.backstage.scaffolder.v1.Empty} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.Error, ?proto.spotify.backstage.scaffolder.v1.ListTemplatesReply)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.spotify.backstage.scaffolder.v1.ScaffolderClient.prototype.listTemplates = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/spotify.backstage.scaffolder.v1.Scaffolder/ListTemplates', - request, - metadata || {}, - methodDescriptor_Scaffolder_ListTemplates, - callback); -}; - - -/** - * @param {!proto.spotify.backstage.scaffolder.v1.Empty} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @return {!Promise} - * A native promise that resolves to the response - */ -proto.spotify.backstage.scaffolder.v1.ScaffolderPromiseClient.prototype.listTemplates = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/spotify.backstage.scaffolder.v1.Scaffolder/ListTemplates', - request, - metadata || {}, - methodDescriptor_Scaffolder_ListTemplates); -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.spotify.backstage.scaffolder.v1.CreateRequest, - * !proto.spotify.backstage.scaffolder.v1.CreateReply>} - */ -const methodDescriptor_Scaffolder_Create = new grpc.web.MethodDescriptor( - '/spotify.backstage.scaffolder.v1.Scaffolder/Create', - grpc.web.MethodType.UNARY, - proto.spotify.backstage.scaffolder.v1.CreateRequest, - proto.spotify.backstage.scaffolder.v1.CreateReply, - /** - * @param {!proto.spotify.backstage.scaffolder.v1.CreateRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.scaffolder.v1.CreateReply.deserializeBinary -); - - -/** - * @const - * @type {!grpc.web.AbstractClientBase.MethodInfo< - * !proto.spotify.backstage.scaffolder.v1.CreateRequest, - * !proto.spotify.backstage.scaffolder.v1.CreateReply>} - */ -const methodInfo_Scaffolder_Create = new grpc.web.AbstractClientBase.MethodInfo( - proto.spotify.backstage.scaffolder.v1.CreateReply, - /** - * @param {!proto.spotify.backstage.scaffolder.v1.CreateRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.spotify.backstage.scaffolder.v1.CreateReply.deserializeBinary -); - - -/** - * @param {!proto.spotify.backstage.scaffolder.v1.CreateRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.Error, ?proto.spotify.backstage.scaffolder.v1.CreateReply)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.spotify.backstage.scaffolder.v1.ScaffolderClient.prototype.create = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/spotify.backstage.scaffolder.v1.Scaffolder/Create', - request, - metadata || {}, - methodDescriptor_Scaffolder_Create, - callback); -}; - - -/** - * @param {!proto.spotify.backstage.scaffolder.v1.CreateRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @return {!Promise} - * A native promise that resolves to the response - */ -proto.spotify.backstage.scaffolder.v1.ScaffolderPromiseClient.prototype.create = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/spotify.backstage.scaffolder.v1.Scaffolder/Create', - request, - metadata || {}, - methodDescriptor_Scaffolder_Create); -}; - - -module.exports = proto.spotify.backstage.scaffolder.v1; - diff --git a/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_pb.d.ts b/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_pb.d.ts deleted file mode 100644 index 96ceaae85d..0000000000 --- a/frontend/packages/proto/src/generated/scaffolder/v1/scaffolder_pb.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -import * as jspb from "google-protobuf" - -import * as identity_v1_identity_pb from '../../identity/v1/identity_pb'; -import * as google_protobuf_struct_pb from 'google-protobuf/google/protobuf/struct_pb'; - -export class Empty extends jspb.Message { - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Empty.AsObject; - static toObject(includeInstance: boolean, msg: Empty): Empty.AsObject; - static serializeBinaryToWriter(message: Empty, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Empty; - static deserializeBinaryFromReader(message: Empty, reader: jspb.BinaryReader): Empty; -} - -export namespace Empty { - export type AsObject = { - } -} - -export class ListTemplatesReply extends jspb.Message { - getTemplatesList(): Array