frontend: remove protobuf and entity related plugins

This commit is contained in:
Patrik Oldsberg
2020-03-03 17:18:52 +01:00
parent 08bd065eab
commit 2dbd27d9b7
57 changed files with 5 additions and 8343 deletions
-2
View File
@@ -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",
+4 -5
View File
@@ -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)
-1
View File
@@ -1,2 +1 @@
export { default as HomePagePlugin } from '@spotify-backstage/plugin-home-page';
export { default as CreateEntityPlugin } from '@spotify-backstage/plugin-create-entity';
@@ -1 +0,0 @@
Welcome to your create-entity plugin!
@@ -1,4 +0,0 @@
module.exports = {
...require('@spotify/web-scripts/config/jest.config.js'),
setupFilesAfterEnv: ['../jest.setup.ts'],
};
@@ -1 +0,0 @@
import '@testing-library/jest-dom/extend-expect';
@@ -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"
}
@@ -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 <Progress />;
}
return (
<Fragment>
<InfoCard title={`Create New ${templateId}`}>
{componentCreated ? (
<div>
{componentCreated} is created!{' '}
<span role="img" aria-label="tada">
🎉
</span>
</div>
) : (
<form onSubmit={formik.handleSubmit}>
<div className={classes.formGroup}>
<TextField
label="Entity Id:"
name="entityId"
id="entityId"
onChange={formik.handleChange}
variant="outlined"
></TextField>
</div>
<div className={classes.formGroup}>
<TextField
label="Description:"
name="description"
id="description"
onChange={formik.handleChange}
variant="outlined"
></TextField>
</div>
<div className={classes.formGroup}>
<Button
variant="contained"
color="primary"
onClick={formik.submitForm}
>
Submit
</Button>
</div>
</form>
)}
</InfoCard>
</Fragment>
);
};
export default CreateEntityFormPage;
@@ -1 +0,0 @@
export { default } from './CreateEntityFormPage';
@@ -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(<CreateEntityPage />);
expect(
rendered.getByText('Create New', { exact: false }),
).toBeInTheDocument();
});
});
@@ -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 (
<Fragment>
<InfoCard title="Create New ...">
{templates && <TemplateList items={templates}></TemplateList>}
</InfoCard>
</Fragment>
);
};
export default CreateEntityPage;
@@ -1 +0,0 @@
export { default } from './CreateEntityPage';
@@ -1,2 +0,0 @@
export { default } from './plugin';
export { default as CreateEntityPage } from './components/CreateEntityPage';
@@ -1,7 +0,0 @@
import plugin from './plugin';
describe('create-entity', () => {
it('should export plugin', () => {
expect(plugin).toBeDefined();
});
});
@@ -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);
},
});
@@ -1 +0,0 @@
Welcome to your github-actions plugin!
@@ -1,4 +0,0 @@
module.exports = {
...require('@spotify/web-scripts/config/jest.config.js'),
setupFilesAfterEnv: ['../jest.setup.ts'],
};
@@ -1 +0,0 @@
import '@testing-library/jest-dom/extend-expect';
@@ -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"
}
@@ -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<Build[]> {
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<BuildDetails> {
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(),
};
};
}
@@ -1,2 +0,0 @@
export * from './types';
export { default as BuildsClient } from './BuildsClient';
@@ -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;
};
@@ -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>(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<Props> = () => {
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 <LinearProgress />;
}
if (status.error) {
return (
<Typography variant="h6" color="error">
Failed to load build, {status.error.message}
</Typography>
);
}
const details = status.value;
return (
<div className={classes.root}>
<Typography className={classes.title} variant="h3">
<RelativeEntityLink view="/builds">
<Typography component={'span'} variant="h3" color="primary">
&lt;{' '}
</Typography>
</RelativeEntityLink>
Build Details
</Typography>
<TableContainer component={Paper} className={classes.table}>
<Table>
<TableBody>
<TableRow>
<TableCell>
<Typography noWrap>Branch</Typography>
</TableCell>
<TableCell>{details?.build.branch}</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Typography noWrap>Message</Typography>
</TableCell>
<TableCell>{details?.build.message}</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Typography noWrap>Commit ID</Typography>
</TableCell>
<TableCell>{details?.build.commitId}</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Typography noWrap>Status</Typography>
</TableCell>
<TableCell>
<BuildStatusIndicator status={details?.build.status} />
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Typography noWrap>Author</Typography>
</TableCell>
<TableCell>{details?.author}</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Typography noWrap>Links</Typography>
</TableCell>
<TableCell>
<ButtonGroup
variant="text"
color="primary"
aria-label="text primary button group"
>
<Button>
<Link href={details?.overviewUrl}>GitHub</Link>
</Button>
<Button>
<Link href={details?.logUrl}>Logs</Link>
</Button>
</ButtonGroup>
</TableCell>
</TableRow>
</TableBody>
</Table>
</TableContainer>
</div>
);
};
export default BuildDetailsPage;
@@ -1 +0,0 @@
export { default } from './BuildDetailsPage';
@@ -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>(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 = <LinearProgress />;
} else if (status.error) {
content = (
<Typography variant="h2" color="error">
Failed to load builds, {status.error.message}
</Typography>
);
} else {
const [build] =
status.value?.filter(({ branch }) => branch === 'master') ?? [];
content = (
<Table>
<TableBody>
<TableRow>
<TableCell>
<Typography noWrap>Message</Typography>
</TableCell>
<TableCell>
<RelativeEntityLink
view={`builds/${encodeURIComponent(build?.uri || '')}`}
>
<Typography color="primary">{build?.message}</Typography>
</RelativeEntityLink>
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Typography noWrap>Commit ID</Typography>
</TableCell>
<TableCell>{build?.commitId}</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Typography noWrap>Status</Typography>
</TableCell>
<TableCell>
<BuildStatusIndicator status={build?.status} />
</TableCell>
</TableRow>
</TableBody>
</Table>
);
}
return (
<div className={classes.root}>
<Typography variant="h2" className={classes.title}>
Master Build
</Typography>
{content}
</div>
);
};
export default BuildInfoCard;
@@ -1 +0,0 @@
export { default } from './BuildInfoCard';
@@ -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 <span>{text}</span>;
}
return (
<Tooltip title={text}>
<span>{text.slice(0, max)}...</span>
</Tooltip>
);
};
const useStyles = makeStyles<Theme>(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 = <LinearProgress />;
} else if (status.error) {
content = (
<Typography variant="h2" color="error">
Failed to load builds, {status.error.message}
</Typography>
);
} else {
content = (
<TableContainer component={Paper}>
<Table aria-label="CI/CD builds table">
<TableHead>
<TableRow>
<TableCell>Status</TableCell>
<TableCell>Branch</TableCell>
<TableCell>Message</TableCell>
<TableCell>Commit</TableCell>
</TableRow>
</TableHead>
<TableBody>
{status.value!.map(build => (
<TableRow key={build.uri}>
<TableCell>
<BuildStatusIndicator status={build.status} />
</TableCell>
<TableCell>
<Typography>
<LongText text={build.branch} max={30} />
</Typography>
</TableCell>
<TableCell>
<RelativeEntityLink
view={`builds/${encodeURIComponent(build.uri)}`}
>
<Typography color="primary">
<LongText text={build.message} max={60} />
</Typography>
</RelativeEntityLink>
</TableCell>
<TableCell>
<Tooltip title={build.commitId}>
<Typography noWrap>
{build.commitId.slice(0, 10)}
</Typography>
</Tooltip>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
);
}
return (
<div className={classes.root}>
<Typography variant="h3" className={classes.title}>
CI/CD Builds
</Typography>
{content}
</div>
);
};
export default BuildListPage;
@@ -1 +0,0 @@
export { default } from './BuildListPage';
@@ -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<Theme, StatusStyle>({
icon: style => ({
color: style.color,
}),
});
const BuildStatusIndicator: FC<Props> = props => {
const { status } = props;
const style = (status && styles[status]) || styles[BuildStatus.Null];
const classes = useStyles(style);
const IconComponent = style.icon;
return (
<div className={classes.icon}>
<IconComponent />
</div>
);
};
export default BuildStatusIndicator;
@@ -1 +0,0 @@
export { default } from './BuildStatusIndicator';
@@ -1 +0,0 @@
export { default } from './plugin';
@@ -1,7 +0,0 @@
import plugin from './plugin';
describe('github-actions', () => {
it('should export plugin', () => {
expect(plugin).toBeDefined();
});
});
@@ -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 });
},
});
@@ -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>(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 <Progress />;
}
const data = STATIC_DATA.concat(status?.value ?? []).map(({ id, kind }) => {
const data = STATIC_DATA.map(({ id, kind }) => {
return {
id,
entity: (
-11
View File
@@ -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"
}
}
-2
View File
@@ -1,2 +0,0 @@
export { BuildsPromiseClient as Client } from './generated/builds/v1/builds_grpc_web_pb';
export * from './generated/builds/v1/builds_pb';
@@ -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<ListBuildsReply>;
getBuild(
request: GetBuildRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error,
response: GetBuildReply) => void
): grpcWeb.ClientReadableStream<GetBuildReply>;
}
export class BuildsPromiseClient {
constructor (hostname: string,
credentials?: null | { [index: string]: string; },
options?: null | { [index: string]: string; });
listBuilds(
request: ListBuildsRequest,
metadata?: grpcWeb.Metadata
): Promise<ListBuildsReply>;
getBuild(
request: GetBuildRequest,
metadata?: grpcWeb.Metadata
): Promise<GetBuildReply>;
}
@@ -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<string, string>} 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<!proto.spotify.backstage.builds.v1.ListBuildsReply>|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<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.spotify.backstage.builds.v1.ListBuildsReply>}
* 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<string, string>} 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<!proto.spotify.backstage.builds.v1.GetBuildReply>|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<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.spotify.backstage.builds.v1.GetBuildReply>}
* 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;
@@ -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<Build>;
setBuildsList(value: Array<Build>): 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<Build.AsObject>,
}
}
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,
}
File diff suppressed because it is too large Load Diff
@@ -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<GetUserReply>;
getGroup(
request: GetGroupRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error,
response: GetGroupReply) => void
): grpcWeb.ClientReadableStream<GetGroupReply>;
}
export class IdentityPromiseClient {
constructor (hostname: string,
credentials?: null | { [index: string]: string; },
options?: null | { [index: string]: string; });
getUser(
request: GetUserRequest,
metadata?: grpcWeb.Metadata
): Promise<GetUserReply>;
getGroup(
request: GetGroupRequest,
metadata?: grpcWeb.Metadata
): Promise<GetGroupReply>;
}
@@ -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<string, string>} 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<!proto.spotify.backstage.identity.v1.GetUserReply>|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<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.spotify.backstage.identity.v1.GetUserReply>}
* 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<string, string>} 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<!proto.spotify.backstage.identity.v1.GetGroupReply>|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<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.spotify.backstage.identity.v1.GetGroupReply>}
* 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;
@@ -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<Group>;
setGroupsList(value: Array<Group>): 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<Group.AsObject>,
}
}
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<User>;
setUsersList(value: Array<User>): void;
clearUsersList(): void;
addUsers(value?: User, index?: number): User;
getGroupsList(): Array<Group>;
setGroupsList(value: Array<Group>): 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<User.AsObject>,
groupsList: Array<Group.AsObject>,
}
}
File diff suppressed because it is too large Load Diff
@@ -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<ListEntitiesReply>;
getEntity(
request: GetEntityRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error,
response: GetEntityReply) => void
): grpcWeb.ClientReadableStream<GetEntityReply>;
createEntity(
request: CreateEntityRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error,
response: CreateEntityReply) => void
): grpcWeb.ClientReadableStream<CreateEntityReply>;
setFact(
request: SetFactRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error,
response: SetFactReply) => void
): grpcWeb.ClientReadableStream<SetFactReply>;
getFact(
request: GetFactRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error,
response: GetFactReply) => void
): grpcWeb.ClientReadableStream<GetFactReply>;
}
export class InventoryPromiseClient {
constructor (hostname: string,
credentials?: null | { [index: string]: string; },
options?: null | { [index: string]: string; });
listEntities(
request: ListEntitiesRequest,
metadata?: grpcWeb.Metadata
): Promise<ListEntitiesReply>;
getEntity(
request: GetEntityRequest,
metadata?: grpcWeb.Metadata
): Promise<GetEntityReply>;
createEntity(
request: CreateEntityRequest,
metadata?: grpcWeb.Metadata
): Promise<CreateEntityReply>;
setFact(
request: SetFactRequest,
metadata?: grpcWeb.Metadata
): Promise<SetFactReply>;
getFact(
request: GetFactRequest,
metadata?: grpcWeb.Metadata
): Promise<GetFactReply>;
}
@@ -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<string, string>} 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<!proto.spotify.backstage.inventory.v1.ListEntitiesReply>|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<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.spotify.backstage.inventory.v1.ListEntitiesReply>}
* 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<string, string>} 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<!proto.spotify.backstage.inventory.v1.GetEntityReply>|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<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.spotify.backstage.inventory.v1.GetEntityReply>}
* 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<string, string>} 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<!proto.spotify.backstage.inventory.v1.CreateEntityReply>|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<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.spotify.backstage.inventory.v1.CreateEntityReply>}
* 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<string, string>} 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<!proto.spotify.backstage.inventory.v1.SetFactReply>|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<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.spotify.backstage.inventory.v1.SetFactReply>}
* 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<string, string>} 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<!proto.spotify.backstage.inventory.v1.GetFactReply>|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<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.spotify.backstage.inventory.v1.GetFactReply>}
* 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;
@@ -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<Entity>;
setEntitiesList(value: Array<Entity>): 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<Entity.AsObject>,
}
}
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<Fact>;
setFactsList(value: Array<Fact>): 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<Fact.AsObject>,
}
}
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,
}
}
File diff suppressed because it is too large Load Diff
@@ -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<ListTemplatesReply>;
create(
request: CreateRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error,
response: CreateReply) => void
): grpcWeb.ClientReadableStream<CreateReply>;
}
export class ScaffolderPromiseClient {
constructor (hostname: string,
credentials?: null | { [index: string]: string; },
options?: null | { [index: string]: string; });
listTemplates(
request: Empty,
metadata?: grpcWeb.Metadata
): Promise<ListTemplatesReply>;
create(
request: CreateRequest,
metadata?: grpcWeb.Metadata
): Promise<CreateReply>;
}
@@ -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<string, string>} 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<!proto.spotify.backstage.scaffolder.v1.ListTemplatesReply>|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<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.spotify.backstage.scaffolder.v1.ListTemplatesReply>}
* 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<string, string>} 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<!proto.spotify.backstage.scaffolder.v1.CreateReply>|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<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.spotify.backstage.scaffolder.v1.CreateReply>}
* 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;
@@ -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<Template>;
setTemplatesList(value: Array<Template>): void;
clearTemplatesList(): void;
addTemplates(value?: Template, index?: number): Template;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ListTemplatesReply.AsObject;
static toObject(includeInstance: boolean, msg: ListTemplatesReply): ListTemplatesReply.AsObject;
static serializeBinaryToWriter(message: ListTemplatesReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): ListTemplatesReply;
static deserializeBinaryFromReader(message: ListTemplatesReply, reader: jspb.BinaryReader): ListTemplatesReply;
}
export namespace ListTemplatesReply {
export type AsObject = {
templatesList: Array<Template.AsObject>,
}
}
export class CreateReply extends jspb.Message {
getComponentId(): string;
setComponentId(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CreateReply.AsObject;
static toObject(includeInstance: boolean, msg: CreateReply): CreateReply.AsObject;
static serializeBinaryToWriter(message: CreateReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CreateReply;
static deserializeBinaryFromReader(message: CreateReply, reader: jspb.BinaryReader): CreateReply;
}
export namespace CreateReply {
export type AsObject = {
componentId: string,
}
}
export class CreateRequest extends jspb.Message {
getTemplateId(): string;
setTemplateId(value: string): void;
getOrg(): string;
setOrg(value: string): void;
getComponentId(): string;
setComponentId(value: string): void;
getPrivate(): boolean;
setPrivate(value: boolean): void;
getMetadata(): google_protobuf_struct_pb.Struct | undefined;
setMetadata(value?: google_protobuf_struct_pb.Struct): void;
hasMetadata(): boolean;
clearMetadata(): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): CreateRequest.AsObject;
static toObject(includeInstance: boolean, msg: CreateRequest): CreateRequest.AsObject;
static serializeBinaryToWriter(message: CreateRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): CreateRequest;
static deserializeBinaryFromReader(message: CreateRequest, reader: jspb.BinaryReader): CreateRequest;
}
export namespace CreateRequest {
export type AsObject = {
templateId: string,
org: string,
componentId: string,
pb_private: boolean,
metadata?: google_protobuf_struct_pb.Struct.AsObject,
}
}
export class Template extends jspb.Message {
getId(): string;
setId(value: string): void;
getName(): string;
setName(value: string): void;
getDescription(): string;
setDescription(value: string): void;
getUser(): identity_v1_identity_pb.User | undefined;
setUser(value?: identity_v1_identity_pb.User): void;
hasUser(): boolean;
clearUser(): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Template.AsObject;
static toObject(includeInstance: boolean, msg: Template): Template.AsObject;
static serializeBinaryToWriter(message: Template, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Template;
static deserializeBinaryFromReader(message: Template, reader: jspb.BinaryReader): Template;
}
export namespace Template {
export type AsObject = {
id: string,
name: string,
description: string,
user?: identity_v1_identity_pb.User.AsObject,
}
}
@@ -1,995 +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')();
var identity_v1_identity_pb = require('../../identity/v1/identity_pb.js');
goog.object.extend(proto, identity_v1_identity_pb);
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
goog.object.extend(proto, google_protobuf_struct_pb);
goog.exportSymbol('proto.spotify.backstage.scaffolder.v1.CreateReply', null, global);
goog.exportSymbol('proto.spotify.backstage.scaffolder.v1.CreateRequest', null, global);
goog.exportSymbol('proto.spotify.backstage.scaffolder.v1.Empty', null, global);
goog.exportSymbol('proto.spotify.backstage.scaffolder.v1.ListTemplatesReply', null, global);
goog.exportSymbol('proto.spotify.backstage.scaffolder.v1.Template', 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.scaffolder.v1.Empty = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spotify.backstage.scaffolder.v1.Empty, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spotify.backstage.scaffolder.v1.Empty.displayName = 'proto.spotify.backstage.scaffolder.v1.Empty';
}
/**
* 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.scaffolder.v1.ListTemplatesReply = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.repeatedFields_, null);
};
goog.inherits(proto.spotify.backstage.scaffolder.v1.ListTemplatesReply, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.displayName = 'proto.spotify.backstage.scaffolder.v1.ListTemplatesReply';
}
/**
* 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.scaffolder.v1.CreateReply = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spotify.backstage.scaffolder.v1.CreateReply, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spotify.backstage.scaffolder.v1.CreateReply.displayName = 'proto.spotify.backstage.scaffolder.v1.CreateReply';
}
/**
* 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.scaffolder.v1.CreateRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spotify.backstage.scaffolder.v1.CreateRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spotify.backstage.scaffolder.v1.CreateRequest.displayName = 'proto.spotify.backstage.scaffolder.v1.CreateRequest';
}
/**
* 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.scaffolder.v1.Template = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spotify.backstage.scaffolder.v1.Template, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spotify.backstage.scaffolder.v1.Template.displayName = 'proto.spotify.backstage.scaffolder.v1.Template';
}
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_<name>, 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.scaffolder.v1.Empty.prototype.toObject = function(opt_includeInstance) {
return proto.spotify.backstage.scaffolder.v1.Empty.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.scaffolder.v1.Empty} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spotify.backstage.scaffolder.v1.Empty.toObject = function(includeInstance, msg) {
var f, obj = {
};
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.scaffolder.v1.Empty}
*/
proto.spotify.backstage.scaffolder.v1.Empty.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spotify.backstage.scaffolder.v1.Empty;
return proto.spotify.backstage.scaffolder.v1.Empty.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spotify.backstage.scaffolder.v1.Empty} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spotify.backstage.scaffolder.v1.Empty}
*/
proto.spotify.backstage.scaffolder.v1.Empty.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spotify.backstage.scaffolder.v1.Empty.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spotify.backstage.scaffolder.v1.Empty.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.scaffolder.v1.Empty} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spotify.backstage.scaffolder.v1.Empty.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.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_<name>, 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.scaffolder.v1.ListTemplatesReply.prototype.toObject = function(opt_includeInstance) {
return proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.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.scaffolder.v1.ListTemplatesReply} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.toObject = function(includeInstance, msg) {
var f, obj = {
templatesList: jspb.Message.toObjectList(msg.getTemplatesList(),
proto.spotify.backstage.scaffolder.v1.Template.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.scaffolder.v1.ListTemplatesReply}
*/
proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spotify.backstage.scaffolder.v1.ListTemplatesReply;
return proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spotify.backstage.scaffolder.v1.ListTemplatesReply} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spotify.backstage.scaffolder.v1.ListTemplatesReply}
*/
proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.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.scaffolder.v1.Template;
reader.readMessage(value,proto.spotify.backstage.scaffolder.v1.Template.deserializeBinaryFromReader);
msg.addTemplates(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.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.scaffolder.v1.ListTemplatesReply} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTemplatesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.spotify.backstage.scaffolder.v1.Template.serializeBinaryToWriter
);
}
};
/**
* repeated Template templates = 1;
* @return {!Array<!proto.spotify.backstage.scaffolder.v1.Template>}
*/
proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.prototype.getTemplatesList = function() {
return /** @type{!Array<!proto.spotify.backstage.scaffolder.v1.Template>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.spotify.backstage.scaffolder.v1.Template, 1));
};
/** @param {!Array<!proto.spotify.backstage.scaffolder.v1.Template>} value */
proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.prototype.setTemplatesList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.spotify.backstage.scaffolder.v1.Template=} opt_value
* @param {number=} opt_index
* @return {!proto.spotify.backstage.scaffolder.v1.Template}
*/
proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.prototype.addTemplates = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spotify.backstage.scaffolder.v1.Template, opt_index);
};
/**
* Clears the list making it empty but non-null.
*/
proto.spotify.backstage.scaffolder.v1.ListTemplatesReply.prototype.clearTemplatesList = function() {
this.setTemplatesList([]);
};
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_<name>, 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.scaffolder.v1.CreateReply.prototype.toObject = function(opt_includeInstance) {
return proto.spotify.backstage.scaffolder.v1.CreateReply.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.scaffolder.v1.CreateReply} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spotify.backstage.scaffolder.v1.CreateReply.toObject = function(includeInstance, msg) {
var f, obj = {
componentId: 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.scaffolder.v1.CreateReply}
*/
proto.spotify.backstage.scaffolder.v1.CreateReply.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spotify.backstage.scaffolder.v1.CreateReply;
return proto.spotify.backstage.scaffolder.v1.CreateReply.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spotify.backstage.scaffolder.v1.CreateReply} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spotify.backstage.scaffolder.v1.CreateReply}
*/
proto.spotify.backstage.scaffolder.v1.CreateReply.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.setComponentId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spotify.backstage.scaffolder.v1.CreateReply.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spotify.backstage.scaffolder.v1.CreateReply.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.scaffolder.v1.CreateReply} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spotify.backstage.scaffolder.v1.CreateReply.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getComponentId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string component_id = 1;
* @return {string}
*/
proto.spotify.backstage.scaffolder.v1.CreateReply.prototype.getComponentId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.spotify.backstage.scaffolder.v1.CreateReply.prototype.setComponentId = 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_<name>, 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.scaffolder.v1.CreateRequest.prototype.toObject = function(opt_includeInstance) {
return proto.spotify.backstage.scaffolder.v1.CreateRequest.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.scaffolder.v1.CreateRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spotify.backstage.scaffolder.v1.CreateRequest.toObject = function(includeInstance, msg) {
var f, obj = {
templateId: jspb.Message.getFieldWithDefault(msg, 1, ""),
org: jspb.Message.getFieldWithDefault(msg, 2, ""),
componentId: jspb.Message.getFieldWithDefault(msg, 3, ""),
pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
metadata: (f = msg.getMetadata()) && google_protobuf_struct_pb.Struct.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.scaffolder.v1.CreateRequest}
*/
proto.spotify.backstage.scaffolder.v1.CreateRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spotify.backstage.scaffolder.v1.CreateRequest;
return proto.spotify.backstage.scaffolder.v1.CreateRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spotify.backstage.scaffolder.v1.CreateRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spotify.backstage.scaffolder.v1.CreateRequest}
*/
proto.spotify.backstage.scaffolder.v1.CreateRequest.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.setTemplateId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setOrg(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setComponentId(value);
break;
case 4:
var value = /** @type {boolean} */ (reader.readBool());
msg.setPrivate(value);
break;
case 5:
var value = new google_protobuf_struct_pb.Struct;
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
msg.setMetadata(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spotify.backstage.scaffolder.v1.CreateRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spotify.backstage.scaffolder.v1.CreateRequest.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.scaffolder.v1.CreateRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spotify.backstage.scaffolder.v1.CreateRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTemplateId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getOrg();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getComponentId();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getPrivate();
if (f) {
writer.writeBool(
4,
f
);
}
f = message.getMetadata();
if (f != null) {
writer.writeMessage(
5,
f,
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
);
}
};
/**
* optional string template_id = 1;
* @return {string}
*/
proto.spotify.backstage.scaffolder.v1.CreateRequest.prototype.getTemplateId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.spotify.backstage.scaffolder.v1.CreateRequest.prototype.setTemplateId = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string org = 2;
* @return {string}
*/
proto.spotify.backstage.scaffolder.v1.CreateRequest.prototype.getOrg = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.spotify.backstage.scaffolder.v1.CreateRequest.prototype.setOrg = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string component_id = 3;
* @return {string}
*/
proto.spotify.backstage.scaffolder.v1.CreateRequest.prototype.getComponentId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.spotify.backstage.scaffolder.v1.CreateRequest.prototype.setComponentId = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional bool private = 4;
* @return {boolean}
*/
proto.spotify.backstage.scaffolder.v1.CreateRequest.prototype.getPrivate = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
};
/** @param {boolean} value */
proto.spotify.backstage.scaffolder.v1.CreateRequest.prototype.setPrivate = function(value) {
jspb.Message.setProto3BooleanField(this, 4, value);
};
/**
* optional google.protobuf.Struct metadata = 5;
* @return {?proto.google.protobuf.Struct}
*/
proto.spotify.backstage.scaffolder.v1.CreateRequest.prototype.getMetadata = function() {
return /** @type{?proto.google.protobuf.Struct} */ (
jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 5));
};
/** @param {?proto.google.protobuf.Struct|undefined} value */
proto.spotify.backstage.scaffolder.v1.CreateRequest.prototype.setMetadata = function(value) {
jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
*/
proto.spotify.backstage.scaffolder.v1.CreateRequest.prototype.clearMetadata = function() {
this.setMetadata(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spotify.backstage.scaffolder.v1.CreateRequest.prototype.hasMetadata = function() {
return jspb.Message.getField(this, 5) != 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_<name>, 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.scaffolder.v1.Template.prototype.toObject = function(opt_includeInstance) {
return proto.spotify.backstage.scaffolder.v1.Template.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.scaffolder.v1.Template} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spotify.backstage.scaffolder.v1.Template.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
description: jspb.Message.getFieldWithDefault(msg, 3, ""),
user: (f = msg.getUser()) && identity_v1_identity_pb.User.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.scaffolder.v1.Template}
*/
proto.spotify.backstage.scaffolder.v1.Template.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spotify.backstage.scaffolder.v1.Template;
return proto.spotify.backstage.scaffolder.v1.Template.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spotify.backstage.scaffolder.v1.Template} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spotify.backstage.scaffolder.v1.Template}
*/
proto.spotify.backstage.scaffolder.v1.Template.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;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 4:
var value = new identity_v1_identity_pb.User;
reader.readMessage(value,identity_v1_identity_pb.User.deserializeBinaryFromReader);
msg.setUser(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spotify.backstage.scaffolder.v1.Template.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spotify.backstage.scaffolder.v1.Template.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.scaffolder.v1.Template} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spotify.backstage.scaffolder.v1.Template.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
);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getUser();
if (f != null) {
writer.writeMessage(
4,
f,
identity_v1_identity_pb.User.serializeBinaryToWriter
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.spotify.backstage.scaffolder.v1.Template.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.spotify.backstage.scaffolder.v1.Template.prototype.setId = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string name = 2;
* @return {string}
*/
proto.spotify.backstage.scaffolder.v1.Template.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.spotify.backstage.scaffolder.v1.Template.prototype.setName = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string description = 3;
* @return {string}
*/
proto.spotify.backstage.scaffolder.v1.Template.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.spotify.backstage.scaffolder.v1.Template.prototype.setDescription = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional spotify.backstage.identity.v1.User user = 4;
* @return {?proto.spotify.backstage.identity.v1.User}
*/
proto.spotify.backstage.scaffolder.v1.Template.prototype.getUser = function() {
return /** @type{?proto.spotify.backstage.identity.v1.User} */ (
jspb.Message.getWrapperField(this, identity_v1_identity_pb.User, 4));
};
/** @param {?proto.spotify.backstage.identity.v1.User|undefined} value */
proto.spotify.backstage.scaffolder.v1.Template.prototype.setUser = function(value) {
jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
*/
proto.spotify.backstage.scaffolder.v1.Template.prototype.clearUser = function() {
this.setUser(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spotify.backstage.scaffolder.v1.Template.prototype.hasUser = function() {
return jspb.Message.getField(this, 4) != null;
};
goog.object.extend(exports, proto.spotify.backstage.scaffolder.v1);
@@ -1,2 +0,0 @@
export { IdentityPromiseClient as Client } from './generated/identity/v1/identity_grpc_web_pb';
export * from './generated/identity/v1/identity_pb';
-6
View File
@@ -1,6 +0,0 @@
import * as buildsV1 from './buildsv1';
import * as identityV1 from './identityv1';
import * as inventoryV1 from './inventoryv1';
import * as scaffolderV1 from './scaffolderv1';
export { buildsV1, identityV1, inventoryV1, scaffolderV1 };
@@ -1,2 +0,0 @@
export { InventoryPromiseClient as Client } from './generated/inventory/v1/inventory_grpc_web_pb';
export * from './generated/inventory/v1/inventory_pb';
@@ -1,2 +0,0 @@
export { ScaffolderPromiseClient as Client } from './generated/scaffolder/v1/scaffolder_grpc_web_pb';
export * from './generated/scaffolder/v1/scaffolder_pb';
-6
View File
@@ -15,9 +15,3 @@ generate:
type: go
flags: plugins=grpc
output: ../backend/proto
- name: js
flags: import_style=commonjs
output: ../frontend/packages/proto/src/generated
- name: grpc-web
flags: import_style=commonjs+dts,mode=grpcwebtext
output: ../frontend/packages/proto/src/generated