Latest generation

This commit is contained in:
ci viz model
2025-03-17 13:03:44 +00:00
parent e7a1223459
commit f351d06ab7
52 changed files with 21948 additions and 92 deletions

9
LICENSE Normal file
View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) 2025
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM

View File

@@ -1,93 +1,2 @@
# npm-visibility-model-sdk
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
## Add your files
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
```
cd existing_repo
git remote add origin https://gitlab.hardis-group.com/r-d-technique/reflex-platform/client/npm-visibility-model-sdk.git
git branch -M main
git push -uf origin main
```
## Integrate with your tools
- [ ] [Set up project integrations](https://gitlab.hardis-group.com/r-d-technique/reflex-platform/client/npm-visibility-model-sdk/-/settings/integrations)
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
# npm libs from visibility model proto files

79
annotations_pb.ts Normal file
View File

@@ -0,0 +1,79 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file annotations.proto (package grpc.gateway.protoc_gen_openapiv2.options, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { proto3 } from "@bufbuild/protobuf";
import { FieldOptions, FileOptions, MessageOptions, MethodOptions, ServiceOptions } from "./google/protobuf/descriptor_pb.js";
import { JSONSchema, Operation, Schema, Swagger, Tag } from "./openapiv2_pb.js";
/**
* ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
*
* All IDs are the same, as assigned. It is okay that they are the same, as they extend
* different descriptor messages.
*
* @generated from extension: grpc.gateway.protoc_gen_openapiv2.options.Swagger openapiv2_swagger = 1042;
*/
export const openapiv2_swagger = proto3.makeExtension<FileOptions, Swagger>(
"grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger",
FileOptions,
() => ({ no: 1042, kind: "message", T: Swagger }),
);
/**
* ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
*
* All IDs are the same, as assigned. It is okay that they are the same, as they extend
* different descriptor messages.
*
* @generated from extension: grpc.gateway.protoc_gen_openapiv2.options.Operation openapiv2_operation = 1042;
*/
export const openapiv2_operation = proto3.makeExtension<MethodOptions, Operation>(
"grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation",
MethodOptions,
() => ({ no: 1042, kind: "message", T: Operation }),
);
/**
* ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
*
* All IDs are the same, as assigned. It is okay that they are the same, as they extend
* different descriptor messages.
*
* @generated from extension: grpc.gateway.protoc_gen_openapiv2.options.Schema openapiv2_schema = 1042;
*/
export const openapiv2_schema = proto3.makeExtension<MessageOptions, Schema>(
"grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema",
MessageOptions,
() => ({ no: 1042, kind: "message", T: Schema }),
);
/**
* ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
*
* All IDs are the same, as assigned. It is okay that they are the same, as they extend
* different descriptor messages.
*
* @generated from extension: grpc.gateway.protoc_gen_openapiv2.options.Tag openapiv2_tag = 1042;
*/
export const openapiv2_tag = proto3.makeExtension<ServiceOptions, Tag>(
"grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag",
ServiceOptions,
() => ({ no: 1042, kind: "message", T: Tag }),
);
/**
* ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
*
* All IDs are the same, as assigned. It is okay that they are the same, as they extend
* different descriptor messages.
*
* @generated from extension: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema openapiv2_field = 1042;
*/
export const openapiv2_field = proto3.makeExtension<FieldOptions, JSONSchema>(
"grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field",
FieldOptions,
() => ({ no: 1042, kind: "message", T: JSONSchema }),
);

300
core/options_pb.ts Normal file
View File

@@ -0,0 +1,300 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file core/options.proto (package api, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { proto3 } from "@bufbuild/protobuf";
import { FieldOptions, FileOptions, MessageOptions, MethodOptions, ServiceOptions } from "../google/protobuf/descriptor_pb.js";
/**
* @generated from extension: string entityName = 50000;
*/
export const entityName = proto3.makeExtension<FileOptions, string>(
"api.entityName",
FileOptions,
{ no: 50000, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: string entityShortName = 50001;
*/
export const entityShortName = proto3.makeExtension<FileOptions, string>(
"api.entityShortName",
FileOptions,
{ no: 50001, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: bool m0_FileIgnore = 50002;
*/
export const m0_FileIgnore = proto3.makeExtension<FileOptions, boolean>(
"api.m0_FileIgnore",
FileOptions,
{ no: 50002, kind: "scalar", T: 8 /* ScalarType.BOOL */ },
);
/**
* @generated from extension: string moduleName = 50003;
*/
export const moduleName = proto3.makeExtension<FileOptions, string>(
"api.moduleName",
FileOptions,
{ no: 50003, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: string messageType = 50100;
*/
export const messageType = proto3.makeExtension<MessageOptions, string>(
"api.messageType",
MessageOptions,
{ no: 50100, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: bool payload = 50101;
*/
export const payload = proto3.makeExtension<MessageOptions, boolean>(
"api.payload",
MessageOptions,
{ no: 50101, kind: "scalar", T: 8 /* ScalarType.BOOL */ },
);
/**
* @generated from extension: string action = 50102;
*/
export const action = proto3.makeExtension<MessageOptions, string>(
"api.action",
MessageOptions,
{ no: 50102, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: string inputEvent = 50103;
*/
export const inputEvent = proto3.makeExtension<MessageOptions, string>(
"api.inputEvent",
MessageOptions,
{ no: 50103, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: string resultingEvent = 50104;
*/
export const resultingEvent = proto3.makeExtension<MessageOptions, string>(
"api.resultingEvent",
MessageOptions,
{ no: 50104, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: string postAggMethods = 50105;
*/
export const postAggMethods = proto3.makeExtension<MessageOptions, string>(
"api.postAggMethods",
MessageOptions,
{ no: 50105, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: string additionalSource = 50106;
*/
export const additionalSource = proto3.makeExtension<MessageOptions, string>(
"api.additionalSource",
MessageOptions,
{ no: 50106, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: string preAggMethods = 50107;
*/
export const preAggMethods = proto3.makeExtension<MessageOptions, string>(
"api.preAggMethods",
MessageOptions,
{ no: 50107, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: bool metadata = 50200;
*/
export const metadata = proto3.makeExtension<FieldOptions, boolean>(
"api.metadata",
FieldOptions,
{ no: 50200, kind: "scalar", T: 8 /* ScalarType.BOOL */ },
);
/**
* @generated from extension: string mapPath = 50201;
*/
export const mapPath = proto3.makeExtension<FieldOptions, string>(
"api.mapPath",
FieldOptions,
{ no: 50201, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: bool language = 50202;
*/
export const language = proto3.makeExtension<FieldOptions, boolean>(
"api.language",
FieldOptions,
{ no: 50202, kind: "scalar", T: 8 /* ScalarType.BOOL */ },
);
/**
* @generated from extension: string entityRef = 50203;
*/
export const entityRef = proto3.makeExtension<FieldOptions, string>(
"api.entityRef",
FieldOptions,
{ no: 50203, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: string entityRefFilter = 50204;
*/
export const entityRefFilter = proto3.makeExtension<FieldOptions, string>(
"api.entityRefFilter",
FieldOptions,
{ no: 50204, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: string aggKey = 50205;
*/
export const aggKey = proto3.makeExtension<FieldOptions, string>(
"api.aggKey",
FieldOptions,
{ no: 50205, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: string aggSkip = 50206;
*/
export const aggSkip = proto3.makeExtension<FieldOptions, string>(
"api.aggSkip",
FieldOptions,
{ no: 50206, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: bool segmentationKeys = 50207;
*/
export const segmentationKeys = proto3.makeExtension<FieldOptions, boolean>(
"api.segmentationKeys",
FieldOptions,
{ no: 50207, kind: "scalar", T: 8 /* ScalarType.BOOL */ },
);
/**
* @generated from extension: string transientRef = 50208;
*/
export const transientRef = proto3.makeExtension<FieldOptions, string>(
"api.transientRef",
FieldOptions,
{ no: 50208, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: bool kpi = 50209;
*/
export const kpi = proto3.makeExtension<FieldOptions, boolean>(
"api.kpi",
FieldOptions,
{ no: 50209, kind: "scalar", T: 8 /* ScalarType.BOOL */ },
);
/**
* @generated from extension: string serviceType = 50300;
*/
export const serviceType = proto3.makeExtension<ServiceOptions, string>(
"api.serviceType",
ServiceOptions,
{ no: 50300, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* @generated from extension: string k8sService = 50301;
*/
export const k8sService = proto3.makeExtension<ServiceOptions, string>(
"api.k8sService",
ServiceOptions,
{ no: 50301, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* string k8sNamespace = 50302;
* string serviceRoles = 50303;
*
* @generated from extension: bool roleManager = 50304;
*/
export const roleManager = proto3.makeExtension<ServiceOptions, boolean>(
"api.roleManager",
ServiceOptions,
{ no: 50304, kind: "scalar", T: 8 /* ScalarType.BOOL */ },
);
/**
* @generated from extension: bool resourceManager = 50305;
*/
export const resourceManager = proto3.makeExtension<ServiceOptions, boolean>(
"api.resourceManager",
ServiceOptions,
{ no: 50305, kind: "scalar", T: 8 /* ScalarType.BOOL */ },
);
/**
* Define if query method implemen,tation is custom (not generated)
*
* @generated from extension: bool customQuery = 50400;
*/
export const customQuery = proto3.makeExtension<MethodOptions, boolean>(
"api.customQuery",
MethodOptions,
{ no: 50400, kind: "scalar", T: 8 /* ScalarType.BOOL */ },
);
/**
* Resource type on which acts the methods (platform, organisation, project, ...)
*
* @generated from extension: string rscType = 50401;
*/
export const rscType = proto3.makeExtension<MethodOptions, string>(
"api.rscType",
MethodOptions,
{ no: 50401, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* List of roles which can call api method
*
* @generated from extension: string roles = 50402;
*/
export const roles = proto3.makeExtension<MethodOptions, string>(
"api.roles",
MethodOptions,
{ no: 50402, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);
/**
* API method reserved for platform internal use
*
* @generated from extension: bool platformReserved = 50403;
*/
export const platformReserved = proto3.makeExtension<MethodOptions, boolean>(
"api.platformReserved",
MethodOptions,
{ no: 50403, kind: "scalar", T: 8 /* ScalarType.BOOL */ },
);
/**
* Module ID the method belongs to
*
* @generated from extension: string moduleID = 50404;
*/
export const moduleID = proto3.makeExtension<MethodOptions, string>(
"api.moduleID",
MethodOptions,
{ no: 50404, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);

2034
core/shared_pb.ts Normal file

File diff suppressed because it is too large Load Diff

499
core/unitOfMeasures_pb.ts Normal file
View File

@@ -0,0 +1,499 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file core/unitOfMeasures.proto (package api, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { proto3 } from "@bufbuild/protobuf";
import { EnumValueOptions } from "../google/protobuf/descriptor_pb.js";
/**
* @generated from enum api.Length
*/
export enum Length {
/**
* @generated from enum value: LENGTH_UNKNOWN = 0;
*/
LENGTH_UNKNOWN = 0,
/**
* @generated from enum value: METER = 10;
*/
METER = 10,
/**
* @generated from enum value: MILLIMETER = 20;
*/
MILLIMETER = 20,
/**
* @generated from enum value: CENTIMETER = 30;
*/
CENTIMETER = 30,
/**
* @generated from enum value: DECIMETER = 40;
*/
DECIMETER = 40,
/**
* @generated from enum value: DECAMETER = 50;
*/
DECAMETER = 50,
/**
* @generated from enum value: HECTOMETER = 60;
*/
HECTOMETER = 60,
/**
* @generated from enum value: KILOMETER = 70;
*/
KILOMETER = 70,
/**
* @generated from enum value: INCH = 80;
*/
INCH = 80,
/**
* @generated from enum value: FOOT = 90;
*/
FOOT = 90,
/**
* @generated from enum value: YARD = 100;
*/
YARD = 100,
/**
* @generated from enum value: MILE = 110;
*/
MILE = 110,
}
// Retrieve enum metadata with: proto3.getEnumType(Length)
proto3.util.setEnumType(Length, "api.Length", [
{ no: 0, name: "LENGTH_UNKNOWN" },
{ no: 10, name: "METER" },
{ no: 20, name: "MILLIMETER" },
{ no: 30, name: "CENTIMETER" },
{ no: 40, name: "DECIMETER" },
{ no: 50, name: "DECAMETER" },
{ no: 60, name: "HECTOMETER" },
{ no: 70, name: "KILOMETER" },
{ no: 80, name: "INCH" },
{ no: 90, name: "FOOT" },
{ no: 100, name: "YARD" },
{ no: 110, name: "MILE" },
]);
/**
* @generated from enum api.Weight
*/
export enum Weight {
/**
* @generated from enum value: WEIGHT_UNKNOWN = 0;
*/
WEIGHT_UNKNOWN = 0,
/**
* @generated from enum value: GRAMME = 10;
*/
GRAMME = 10,
/**
* @generated from enum value: MILLIGRAM = 20;
*/
MILLIGRAM = 20,
/**
* @generated from enum value: CENTIGRAM = 30;
*/
CENTIGRAM = 30,
/**
* @generated from enum value: DECIGRAM = 40;
*/
DECIGRAM = 40,
/**
* @generated from enum value: DECAGRAM = 50;
*/
DECAGRAM = 50,
/**
* @generated from enum value: HECTOGRAM = 60;
*/
HECTOGRAM = 60,
/**
* @generated from enum value: KILOGRAM = 70;
*/
KILOGRAM = 70,
/**
* @generated from enum value: TONNE = 80;
*/
TONNE = 80,
/**
* @generated from enum value: GRAIN = 90;
*/
GRAIN = 90,
/**
* @generated from enum value: ONCE = 100;
*/
ONCE = 100,
/**
* @generated from enum value: POUND = 110;
*/
POUND = 110,
/**
* @generated from enum value: SHORT_TON = 120;
*/
SHORT_TON = 120,
/**
* @generated from enum value: LONG_TON = 130;
*/
LONG_TON = 130,
/**
* @generated from enum value: STONE = 140;
*/
STONE = 140,
}
// Retrieve enum metadata with: proto3.getEnumType(Weight)
proto3.util.setEnumType(Weight, "api.Weight", [
{ no: 0, name: "WEIGHT_UNKNOWN" },
{ no: 10, name: "GRAMME" },
{ no: 20, name: "MILLIGRAM" },
{ no: 30, name: "CENTIGRAM" },
{ no: 40, name: "DECIGRAM" },
{ no: 50, name: "DECAGRAM" },
{ no: 60, name: "HECTOGRAM" },
{ no: 70, name: "KILOGRAM" },
{ no: 80, name: "TONNE" },
{ no: 90, name: "GRAIN" },
{ no: 100, name: "ONCE" },
{ no: 110, name: "POUND" },
{ no: 120, name: "SHORT_TON" },
{ no: 130, name: "LONG_TON" },
{ no: 140, name: "STONE" },
]);
/**
* @generated from enum api.Temperature
*/
export enum Temperature {
/**
* @generated from enum value: TEMPERATURE_UNKNOWN = 0;
*/
TEMPERATURE_UNKNOWN = 0,
/**
* @generated from enum value: CELSIUS = 1;
*/
CELSIUS = 1,
/**
* @generated from enum value: FAHRENHEIT = 2;
*/
FAHRENHEIT = 2,
}
// Retrieve enum metadata with: proto3.getEnumType(Temperature)
proto3.util.setEnumType(Temperature, "api.Temperature", [
{ no: 0, name: "TEMPERATURE_UNKNOWN" },
{ no: 1, name: "CELSIUS" },
{ no: 2, name: "FAHRENHEIT" },
]);
/**
* @generated from enum api.Speed
*/
export enum Speed {
/**
* @generated from enum value: SPEED_UNKNOWN = 0;
*/
SPEED_UNKNOWN = 0,
/**
* @generated from enum value: KM_PER_HOUR = 10;
*/
KM_PER_HOUR = 10,
/**
* @generated from enum value: METER_PER_SECOND = 20;
*/
METER_PER_SECOND = 20,
/**
* @generated from enum value: YARD_PER_SECOND = 30;
*/
YARD_PER_SECOND = 30,
/**
* @generated from enum value: MILE_PER_HOUR = 40;
*/
MILE_PER_HOUR = 40,
}
// Retrieve enum metadata with: proto3.getEnumType(Speed)
proto3.util.setEnumType(Speed, "api.Speed", [
{ no: 0, name: "SPEED_UNKNOWN" },
{ no: 10, name: "KM_PER_HOUR" },
{ no: 20, name: "METER_PER_SECOND" },
{ no: 30, name: "YARD_PER_SECOND" },
{ no: 40, name: "MILE_PER_HOUR" },
]);
/**
* @generated from enum api.Area
*/
export enum Area {
/**
* @generated from enum value: AREA_UNKNOWN = 0;
*/
AREA_UNKNOWN = 0,
/**
* @generated from enum value: SQUARE_METER = 10;
*/
SQUARE_METER = 10,
/**
* @generated from enum value: SQUARE_MILLIMETER = 20;
*/
SQUARE_MILLIMETER = 20,
/**
* @generated from enum value: SQUARE_CENTIMETER = 30;
*/
SQUARE_CENTIMETER = 30,
/**
* @generated from enum value: SQUARE_DECIMETER = 40;
*/
SQUARE_DECIMETER = 40,
/**
* @generated from enum value: SQUARE_DECAMETER = 50;
*/
SQUARE_DECAMETER = 50,
/**
* @generated from enum value: SQUARE_HECTOMETER = 60;
*/
SQUARE_HECTOMETER = 60,
/**
* @generated from enum value: SQUARE_INCH = 70;
*/
SQUARE_INCH = 70,
/**
* @generated from enum value: SQUARE_FEET = 80;
*/
SQUARE_FEET = 80,
/**
* @generated from enum value: SQUARE_YARD = 90;
*/
SQUARE_YARD = 90,
/**
* @generated from enum value: ACRE = 100;
*/
ACRE = 100,
}
// Retrieve enum metadata with: proto3.getEnumType(Area)
proto3.util.setEnumType(Area, "api.Area", [
{ no: 0, name: "AREA_UNKNOWN" },
{ no: 10, name: "SQUARE_METER" },
{ no: 20, name: "SQUARE_MILLIMETER" },
{ no: 30, name: "SQUARE_CENTIMETER" },
{ no: 40, name: "SQUARE_DECIMETER" },
{ no: 50, name: "SQUARE_DECAMETER" },
{ no: 60, name: "SQUARE_HECTOMETER" },
{ no: 70, name: "SQUARE_INCH" },
{ no: 80, name: "SQUARE_FEET" },
{ no: 90, name: "SQUARE_YARD" },
{ no: 100, name: "ACRE" },
]);
/**
* @generated from enum api.Volume
*/
export enum Volume {
/**
* @generated from enum value: VOLUME_UNKNOWN = 0;
*/
VOLUME_UNKNOWN = 0,
/**
* @generated from enum value: CUBIC_METER = 10;
*/
CUBIC_METER = 10,
/**
* @generated from enum value: CUBIC_MILLIMETER = 20;
*/
CUBIC_MILLIMETER = 20,
/**
* @generated from enum value: CUBIC_CENTIMETER = 30;
*/
CUBIC_CENTIMETER = 30,
/**
* @generated from enum value: CUBIC_DECIMETER = 40;
*/
CUBIC_DECIMETER = 40,
/**
* @generated from enum value: LITER = 50;
*/
LITER = 50,
/**
* @generated from enum value: MILLI_LITER = 60;
*/
MILLI_LITER = 60,
/**
* @generated from enum value: CENTI_LITER = 70;
*/
CENTI_LITER = 70,
/**
* @generated from enum value: DECI_LITER = 80;
*/
DECI_LITER = 80,
/**
* @generated from enum value: DECA_LITER = 90;
*/
DECA_LITER = 90,
/**
* @generated from enum value: HECTO_LITER = 100;
*/
HECTO_LITER = 100,
/**
* @generated from enum value: CUBIC_INCH = 110;
*/
CUBIC_INCH = 110,
/**
* @generated from enum value: CUBIC_FEET = 120;
*/
CUBIC_FEET = 120,
/**
* @generated from enum value: CUBIC_YARD = 130;
*/
CUBIC_YARD = 130,
/**
* @generated from enum value: US_FLUID_OUNCE = 140;
*/
US_FLUID_OUNCE = 140,
/**
* @generated from enum value: US_PINT = 150;
*/
US_PINT = 150,
/**
* @generated from enum value: US_DRY_PINT = 160;
*/
US_DRY_PINT = 160,
/**
* @generated from enum value: US_DRY_QUART = 170;
*/
US_DRY_QUART = 170,
/**
* @generated from enum value: US_GAL = 180;
*/
US_GAL = 180,
/**
* @generated from enum value: IMPERIAL_OUNCE = 190;
*/
IMPERIAL_OUNCE = 190,
/**
* @generated from enum value: IMPERIAL_PINT = 200;
*/
IMPERIAL_PINT = 200,
/**
* @generated from enum value: IMPERIAL_QUART = 210;
*/
IMPERIAL_QUART = 210,
/**
* @generated from enum value: IMPERIAL_GAL = 220;
*/
IMPERIAL_GAL = 220,
}
// Retrieve enum metadata with: proto3.getEnumType(Volume)
proto3.util.setEnumType(Volume, "api.Volume", [
{ no: 0, name: "VOLUME_UNKNOWN" },
{ no: 10, name: "CUBIC_METER" },
{ no: 20, name: "CUBIC_MILLIMETER" },
{ no: 30, name: "CUBIC_CENTIMETER" },
{ no: 40, name: "CUBIC_DECIMETER" },
{ no: 50, name: "LITER" },
{ no: 60, name: "MILLI_LITER" },
{ no: 70, name: "CENTI_LITER" },
{ no: 80, name: "DECI_LITER" },
{ no: 90, name: "DECA_LITER" },
{ no: 100, name: "HECTO_LITER" },
{ no: 110, name: "CUBIC_INCH" },
{ no: 120, name: "CUBIC_FEET" },
{ no: 130, name: "CUBIC_YARD" },
{ no: 140, name: "US_FLUID_OUNCE" },
{ no: 150, name: "US_PINT" },
{ no: 160, name: "US_DRY_PINT" },
{ no: 170, name: "US_DRY_QUART" },
{ no: 180, name: "US_GAL" },
{ no: 190, name: "IMPERIAL_OUNCE" },
{ no: 200, name: "IMPERIAL_PINT" },
{ no: 210, name: "IMPERIAL_QUART" },
{ no: 220, name: "IMPERIAL_GAL" },
]);
/**
* @generated from enum api.DimensionLess
*/
export enum DimensionLess {
/**
* @generated from enum value: DIMENSIONLESS_UNKNOWN = 0;
*/
DIMENSIONLESS_UNKNOWN = 0,
/**
* @generated from enum value: UNIT = 1;
*/
UNIT = 1,
}
// Retrieve enum metadata with: proto3.getEnumType(DimensionLess)
proto3.util.setEnumType(DimensionLess, "api.DimensionLess", [
{ no: 0, name: "DIMENSIONLESS_UNKNOWN" },
{ no: 1, name: "UNIT" },
]);
/**
* @generated from extension: string value = 50500;
*/
export const value = proto3.makeExtension<EnumValueOptions, string>(
"api.value",
EnumValueOptions,
{ no: 50500, kind: "scalar", T: 9 /* ScalarType.STRING */ },
);

26
counter_connect.ts Normal file
View File

@@ -0,0 +1,26 @@
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file counter.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { NextCounterResult, NextProjectCounterRequest } from "./counter_pb.js";
import { MethodKind } from "@bufbuild/protobuf";
/**
* @generated from service vizapi.ProjectCountersService
*/
export const ProjectCountersService = {
typeName: "vizapi.ProjectCountersService",
methods: {
/**
* @generated from rpc vizapi.ProjectCountersService.Next
*/
next: {
name: "Next",
I: NextProjectCounterRequest,
O: NextCounterResult,
kind: MethodKind.Unary,
},
}
} as const;

89
counter_pb.ts Normal file
View File

@@ -0,0 +1,89 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file counter.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
import { RequestProjectHeader } from "./core/shared_pb.js";
/**
* @generated from message vizapi.NextProjectCounterRequest
*/
export class NextProjectCounterRequest extends Message<NextProjectCounterRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* @generated from field: string Key = 2;
*/
Key = "";
constructor(data?: PartialMessage<NextProjectCounterRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.NextProjectCounterRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): NextProjectCounterRequest {
return new NextProjectCounterRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): NextProjectCounterRequest {
return new NextProjectCounterRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): NextProjectCounterRequest {
return new NextProjectCounterRequest().fromJsonString(jsonString, options);
}
static equals(a: NextProjectCounterRequest | PlainMessage<NextProjectCounterRequest> | undefined, b: NextProjectCounterRequest | PlainMessage<NextProjectCounterRequest> | undefined): boolean {
return proto3.util.equals(NextProjectCounterRequest, a, b);
}
}
/**
* @generated from message vizapi.NextCounterResult
*/
export class NextCounterResult extends Message<NextCounterResult> {
/**
* @generated from field: int64 Value = 1;
*/
Value = protoInt64.zero;
constructor(data?: PartialMessage<NextCounterResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.NextCounterResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Value", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): NextCounterResult {
return new NextCounterResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): NextCounterResult {
return new NextCounterResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): NextCounterResult {
return new NextCounterResult().fromJsonString(jsonString, options);
}
static equals(a: NextCounterResult | PlainMessage<NextCounterResult> | undefined, b: NextCounterResult | PlainMessage<NextCounterResult> | undefined): boolean {
return proto3.util.equals(NextCounterResult, a, b);
}
}

View File

@@ -0,0 +1,34 @@
// Copyright (c) 2015, Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/api/annotations.proto (package google.api, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { proto3 } from "@bufbuild/protobuf";
import { MethodOptions } from "../protobuf/descriptor_pb.js";
import { HttpRule } from "./http_pb.js";
/**
* See `HttpRule`.
*
* @generated from extension: google.api.HttpRule http = 72295728;
*/
export const http = proto3.makeExtension<MethodOptions, HttpRule>(
"google.api.http",
MethodOptions,
() => ({ no: 72295728, kind: "message", T: HttpRule }),
);

View File

@@ -0,0 +1,118 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/api/field_behavior.proto (package google.api, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { proto3 } from "@bufbuild/protobuf";
import { FieldOptions } from "../protobuf/descriptor_pb.js";
/**
* An indicator of the behavior of a given field (for example, that a field
* is required in requests, or given as output but ignored as input).
* This **does not** change the behavior in protocol buffers itself; it only
* denotes the behavior and may affect how API tooling handles the field.
*
* Note: This enum **may** receive new values in the future.
*
* @generated from enum google.api.FieldBehavior
*/
export enum FieldBehavior {
/**
* Conventional default for enums. Do not use this.
*
* @generated from enum value: FIELD_BEHAVIOR_UNSPECIFIED = 0;
*/
FIELD_BEHAVIOR_UNSPECIFIED = 0,
/**
* Specifically denotes a field as optional.
* While all fields in protocol buffers are optional, this may be specified
* for emphasis if appropriate.
*
* @generated from enum value: OPTIONAL = 1;
*/
OPTIONAL = 1,
/**
* Denotes a field as required.
* This indicates that the field **must** be provided as part of the request,
* and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
*
* @generated from enum value: REQUIRED = 2;
*/
REQUIRED = 2,
/**
* Denotes a field as output only.
* This indicates that the field is provided in responses, but including the
* field in a request does nothing (the server *must* ignore it and
* *must not* throw an error as a result of the field's presence).
*
* @generated from enum value: OUTPUT_ONLY = 3;
*/
OUTPUT_ONLY = 3,
/**
* Denotes a field as input only.
* This indicates that the field is provided in requests, and the
* corresponding field is not included in output.
*
* @generated from enum value: INPUT_ONLY = 4;
*/
INPUT_ONLY = 4,
/**
* Denotes a field as immutable.
* This indicates that the field may be set once in a request to create a
* resource, but may not be changed thereafter.
*
* @generated from enum value: IMMUTABLE = 5;
*/
IMMUTABLE = 5,
}
// Retrieve enum metadata with: proto3.getEnumType(FieldBehavior)
proto3.util.setEnumType(FieldBehavior, "google.api.FieldBehavior", [
{ no: 0, name: "FIELD_BEHAVIOR_UNSPECIFIED" },
{ no: 1, name: "OPTIONAL" },
{ no: 2, name: "REQUIRED" },
{ no: 3, name: "OUTPUT_ONLY" },
{ no: 4, name: "INPUT_ONLY" },
{ no: 5, name: "IMMUTABLE" },
]);
/**
* A designation of a specific field behavior (required, output only, etc.)
* in protobuf messages.
*
* Examples:
*
* string name = 1 [(google.api.field_behavior) = REQUIRED];
* State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
* google.protobuf.Duration ttl = 1
* [(google.api.field_behavior) = INPUT_ONLY];
* google.protobuf.Timestamp expire_time = 1
* [(google.api.field_behavior) = OUTPUT_ONLY,
* (google.api.field_behavior) = IMMUTABLE];
*
* @generated from extension: repeated google.api.FieldBehavior field_behavior = 1052;
*/
export const field_behavior = proto3.makeExtension<FieldOptions, FieldBehavior[]>(
"google.api.field_behavior",
FieldOptions,
() => ({ no: 1052, kind: "enum", T: proto3.getEnumType(FieldBehavior), repeated: true }),
);

543
google/api/http_pb.ts Normal file
View File

@@ -0,0 +1,543 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/api/http.proto (package google.api, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* Defines the HTTP configuration for an API service. It contains a list of
* [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
* to one or more HTTP REST API methods.
*
* @generated from message google.api.Http
*/
export class Http extends Message<Http> {
/**
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
*
* @generated from field: repeated google.api.HttpRule rules = 1;
*/
rules: HttpRule[] = [];
/**
* When set to true, URL path parameters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
*
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
*
* @generated from field: bool fully_decode_reserved_expansion = 2;
*/
fullyDecodeReservedExpansion = false;
constructor(data?: PartialMessage<Http>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.api.Http";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "rules", kind: "message", T: HttpRule, repeated: true },
{ no: 2, name: "fully_decode_reserved_expansion", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Http {
return new Http().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Http {
return new Http().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Http {
return new Http().fromJsonString(jsonString, options);
}
static equals(a: Http | PlainMessage<Http> | undefined, b: Http | PlainMessage<Http> | undefined): boolean {
return proto3.util.equals(Http, a, b);
}
}
/**
* # gRPC Transcoding
*
* gRPC Transcoding is a feature for mapping between a gRPC method and one or
* more HTTP REST endpoints. It allows developers to build a single API service
* that supports both gRPC APIs and REST APIs. Many systems, including [Google
* APIs](https://github.com/googleapis/googleapis),
* [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
* Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
* and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
* and use it for large scale production services.
*
* `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
* how different portions of the gRPC request message are mapped to the URL
* path, URL query parameters, and HTTP request body. It also controls how the
* gRPC response message is mapped to the HTTP response body. `HttpRule` is
* typically specified as an `google.api.http` annotation on the gRPC method.
*
* Each mapping specifies a URL path template and an HTTP method. The path
* template may refer to one or more fields in the gRPC request message, as long
* as each field is a non-repeated field with a primitive (non-message) type.
* The path template controls how fields of the request message are mapped to
* the URL path.
*
* Example:
*
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http) = {
* get: "/v1/{name=messages/*}"
* };
* }
* }
* message GetMessageRequest {
* string name = 1; // Mapped to URL path.
* }
* message Message {
* string text = 1; // The resource content.
* }
*
* This enables an HTTP REST to gRPC mapping as below:
*
* HTTP | gRPC
* -----|-----
* `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
*
* Any fields in the request message which are not bound by the path template
* automatically become HTTP query parameters if there is no HTTP request body.
* For example:
*
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http) = {
* get:"/v1/messages/{message_id}"
* };
* }
* }
* message GetMessageRequest {
* message SubMessage {
* string subfield = 1;
* }
* string message_id = 1; // Mapped to URL path.
* int64 revision = 2; // Mapped to URL query parameter `revision`.
* SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
* }
*
* This enables a HTTP JSON to RPC mapping as below:
*
* HTTP | gRPC
* -----|-----
* `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
* `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
* "foo"))`
*
* Note that fields which are mapped to URL query parameters must have a
* primitive type or a repeated primitive type or a non-repeated message type.
* In the case of a repeated type, the parameter can be repeated in the URL
* as `...?param=A&param=B`. In the case of a message type, each field of the
* message is mapped to a separate parameter, such as
* `...?foo.a=A&foo.b=B&foo.c=C`.
*
* For HTTP methods that allow a request body, the `body` field
* specifies the mapping. Consider a REST update method on the
* message resource collection:
*
* service Messaging {
* rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
* option (google.api.http) = {
* patch: "/v1/messages/{message_id}"
* body: "message"
* };
* }
* }
* message UpdateMessageRequest {
* string message_id = 1; // mapped to the URL
* Message message = 2; // mapped to the body
* }
*
* The following HTTP JSON to RPC mapping is enabled, where the
* representation of the JSON in the request body is determined by
* protos JSON encoding:
*
* HTTP | gRPC
* -----|-----
* `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
* "123456" message { text: "Hi!" })`
*
* The special name `*` can be used in the body mapping to define that
* every field not bound by the path template should be mapped to the
* request body. This enables the following alternative definition of
* the update method:
*
* service Messaging {
* rpc UpdateMessage(Message) returns (Message) {
* option (google.api.http) = {
* patch: "/v1/messages/{message_id}"
* body: "*"
* };
* }
* }
* message Message {
* string message_id = 1;
* string text = 2;
* }
*
*
* The following HTTP JSON to RPC mapping is enabled:
*
* HTTP | gRPC
* -----|-----
* `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
* "123456" text: "Hi!")`
*
* Note that when using `*` in the body mapping, it is not possible to
* have HTTP parameters, as all fields not bound by the path end in
* the body. This makes this option more rarely used in practice when
* defining REST APIs. The common usage of `*` is in custom methods
* which don't use the URL at all for transferring data.
*
* It is possible to define multiple HTTP methods for one RPC by using
* the `additional_bindings` option. Example:
*
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http) = {
* get: "/v1/messages/{message_id}"
* additional_bindings {
* get: "/v1/users/{user_id}/messages/{message_id}"
* }
* };
* }
* }
* message GetMessageRequest {
* string message_id = 1;
* string user_id = 2;
* }
*
* This enables the following two alternative HTTP JSON to RPC mappings:
*
* HTTP | gRPC
* -----|-----
* `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
* `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
* "123456")`
*
* ## Rules for HTTP mapping
*
* 1. Leaf request fields (recursive expansion nested messages in the request
* message) are classified into three categories:
* - Fields referred by the path template. They are passed via the URL path.
* - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP
* request body.
* - All other fields are passed via the URL query parameters, and the
* parameter name is the field path in the request message. A repeated
* field can be represented as multiple query parameters under the same
* name.
* 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields
* are passed via URL path and HTTP request body.
* 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all
* fields are passed via URL path and URL query parameters.
*
* ### Path template syntax
*
* Template = "/" Segments [ Verb ] ;
* Segments = Segment { "/" Segment } ;
* Segment = "*" | "**" | LITERAL | Variable ;
* Variable = "{" FieldPath [ "=" Segments ] "}" ;
* FieldPath = IDENT { "." IDENT } ;
* Verb = ":" LITERAL ;
*
* The syntax `*` matches a single URL path segment. The syntax `**` matches
* zero or more URL path segments, which must be the last part of the URL path
* except the `Verb`.
*
* The syntax `Variable` matches part of the URL path as specified by its
* template. A variable template must not contain other variables. If a variable
* matches a single path segment, its template may be omitted, e.g. `{var}`
* is equivalent to `{var=*}`.
*
* The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
* contains any reserved character, such characters should be percent-encoded
* before the matching.
*
* If a variable contains exactly one path segment, such as `"{var}"` or
* `"{var=*}"`, when such a variable is expanded into a URL path on the client
* side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
* server side does the reverse decoding. Such variables show up in the
* [Discovery
* Document](https://developers.google.com/discovery/v1/reference/apis) as
* `{var}`.
*
* If a variable contains multiple path segments, such as `"{var=foo/*}"`
* or `"{var=**}"`, when such a variable is expanded into a URL path on the
* client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
* The server side does the reverse decoding, except "%2F" and "%2f" are left
* unchanged. Such variables show up in the
* [Discovery
* Document](https://developers.google.com/discovery/v1/reference/apis) as
* `{+var}`.
*
* ## Using gRPC API Service Configuration
*
* gRPC API Service Configuration (service config) is a configuration language
* for configuring a gRPC service to become a user-facing product. The
* service config is simply the YAML representation of the `google.api.Service`
* proto message.
*
* As an alternative to annotating your proto file, you can configure gRPC
* transcoding in your service config YAML files. You do this by specifying a
* `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
* effect as the proto annotation. This can be particularly useful if you
* have a proto that is reused in multiple services. Note that any transcoding
* specified in the service config will override any matching transcoding
* configuration in the proto.
*
* Example:
*
* http:
* rules:
* # Selects a gRPC method and applies HttpRule to it.
* - selector: example.v1.Messaging.GetMessage
* get: /v1/messages/{message_id}/{sub.subfield}
*
* ## Special notes
*
* When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
* proto to JSON conversion must follow the [proto3
* specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
*
* While the single segment variable follows the semantics of
* [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
* Expansion, the multi segment variable **does not** follow RFC 6570 Section
* 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
* does not expand special characters like `?` and `#`, which would lead
* to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
* for multi segment variables.
*
* The path variables **must not** refer to any repeated or mapped field,
* because client libraries are not capable of handling such variable expansion.
*
* The path variables **must not** capture the leading "/" character. The reason
* is that the most common use case "{var}" does not capture the leading "/"
* character. For consistency, all path variables must share the same behavior.
*
* Repeated message fields must not be mapped to URL query parameters, because
* no client library can support such complicated mapping.
*
* If an API needs to use a JSON array for request or response body, it can map
* the request or response body to a repeated field. However, some gRPC
* Transcoding implementations may not support this feature.
*
* @generated from message google.api.HttpRule
*/
export class HttpRule extends Message<HttpRule> {
/**
* Selects a method to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
* @generated from field: string selector = 1;
*/
selector = "";
/**
* Determines the URL pattern is matched by this rules. This pattern can be
* used with any of the {get|put|post|delete|patch} methods. A custom method
* can be defined using the 'custom' field.
*
* @generated from oneof google.api.HttpRule.pattern
*/
pattern: {
/**
* Maps to HTTP GET. Used for listing and getting information about
* resources.
*
* @generated from field: string get = 2;
*/
value: string;
case: "get";
} | {
/**
* Maps to HTTP PUT. Used for replacing a resource.
*
* @generated from field: string put = 3;
*/
value: string;
case: "put";
} | {
/**
* Maps to HTTP POST. Used for creating a resource or performing an action.
*
* @generated from field: string post = 4;
*/
value: string;
case: "post";
} | {
/**
* Maps to HTTP DELETE. Used for deleting a resource.
*
* @generated from field: string delete = 5;
*/
value: string;
case: "delete";
} | {
/**
* Maps to HTTP PATCH. Used for updating a resource.
*
* @generated from field: string patch = 6;
*/
value: string;
case: "patch";
} | {
/**
* The custom pattern is used for specifying an HTTP method that is not
* included in the `pattern` field, such as HEAD, or "*" to leave the
* HTTP method unspecified for this rule. The wild-card rule is useful
* for services that provide content to Web (HTML) clients.
*
* @generated from field: google.api.CustomHttpPattern custom = 8;
*/
value: CustomHttpPattern;
case: "custom";
} | { case: undefined; value?: undefined } = { case: undefined };
/**
* The name of the request field whose value is mapped to the HTTP request
* body, or `*` for mapping all request fields not captured by the path
* pattern to the HTTP body, or omitted for not having any HTTP request body.
*
* NOTE: the referred field must be present at the top-level of the request
* message type.
*
* @generated from field: string body = 7;
*/
body = "";
/**
* Optional. The name of the response field whose value is mapped to the HTTP
* response body. When omitted, the entire response message will be used
* as the HTTP response body.
*
* NOTE: The referred field must be present at the top-level of the response
* message type.
*
* @generated from field: string response_body = 12;
*/
responseBody = "";
/**
* Additional HTTP bindings for the selector. Nested bindings must
* not contain an `additional_bindings` field themselves (that is,
* the nesting may only be one level deep).
*
* @generated from field: repeated google.api.HttpRule additional_bindings = 11;
*/
additionalBindings: HttpRule[] = [];
constructor(data?: PartialMessage<HttpRule>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.api.HttpRule";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "selector", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "get", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
{ no: 3, name: "put", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
{ no: 4, name: "post", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
{ no: 5, name: "delete", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
{ no: 6, name: "patch", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
{ no: 8, name: "custom", kind: "message", T: CustomHttpPattern, oneof: "pattern" },
{ no: 7, name: "body", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 12, name: "response_body", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 11, name: "additional_bindings", kind: "message", T: HttpRule, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HttpRule {
return new HttpRule().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HttpRule {
return new HttpRule().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HttpRule {
return new HttpRule().fromJsonString(jsonString, options);
}
static equals(a: HttpRule | PlainMessage<HttpRule> | undefined, b: HttpRule | PlainMessage<HttpRule> | undefined): boolean {
return proto3.util.equals(HttpRule, a, b);
}
}
/**
* A custom pattern is used for defining custom HTTP verb.
*
* @generated from message google.api.CustomHttpPattern
*/
export class CustomHttpPattern extends Message<CustomHttpPattern> {
/**
* The name of this custom HTTP verb.
*
* @generated from field: string kind = 1;
*/
kind = "";
/**
* The path matched by this custom verb.
*
* @generated from field: string path = 2;
*/
path = "";
constructor(data?: PartialMessage<CustomHttpPattern>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.api.CustomHttpPattern";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CustomHttpPattern {
return new CustomHttpPattern().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CustomHttpPattern {
return new CustomHttpPattern().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CustomHttpPattern {
return new CustomHttpPattern().fromJsonString(jsonString, options);
}
static equals(a: CustomHttpPattern | PlainMessage<CustomHttpPattern> | undefined, b: CustomHttpPattern | PlainMessage<CustomHttpPattern> | undefined): boolean {
return proto3.util.equals(CustomHttpPattern, a, b);
}
}

119
google/api/httpbody_pb.ts Normal file
View File

@@ -0,0 +1,119 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/api/httpbody.proto (package google.api, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { Any } from "../protobuf/any_pb.js";
/**
* Message that represents an arbitrary HTTP body. It should only be used for
* payload formats that can't be represented as JSON, such as raw binary or
* an HTML page.
*
*
* This message can be used both in streaming and non-streaming API methods in
* the request as well as the response.
*
* It can be used as a top-level request field, which is convenient if one
* wants to extract parameters from either the URL or HTTP template into the
* request fields and also want access to the raw HTTP body.
*
* Example:
*
* message GetResourceRequest {
* // A unique request id.
* string request_id = 1;
*
* // The raw HTTP body is bound to this field.
* google.api.HttpBody http_body = 2;
* }
*
* service ResourceService {
* rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
* rpc UpdateResource(google.api.HttpBody) returns
* (google.protobuf.Empty);
* }
*
* Example with streaming methods:
*
* service CaldavService {
* rpc GetCalendar(stream google.api.HttpBody)
* returns (stream google.api.HttpBody);
* rpc UpdateCalendar(stream google.api.HttpBody)
* returns (stream google.api.HttpBody);
* }
*
* Use of this type only changes how the request and response bodies are
* handled, all other features will continue to work unchanged.
*
* @generated from message google.api.HttpBody
*/
export class HttpBody extends Message<HttpBody> {
/**
* The HTTP Content-Type header value specifying the content type of the body.
*
* @generated from field: string content_type = 1;
*/
contentType = "";
/**
* The HTTP request/response body as raw binary.
*
* @generated from field: bytes data = 2;
*/
data = new Uint8Array(0);
/**
* Application specific response metadata. Must be set in the first response
* for streaming APIs.
*
* @generated from field: repeated google.protobuf.Any extensions = 3;
*/
extensions: Any[] = [];
constructor(data?: PartialMessage<HttpBody>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.api.HttpBody";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "content_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 3, name: "extensions", kind: "message", T: Any, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HttpBody {
return new HttpBody().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HttpBody {
return new HttpBody().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HttpBody {
return new HttpBody().fromJsonString(jsonString, options);
}
static equals(a: HttpBody | PlainMessage<HttpBody> | undefined, b: HttpBody | PlainMessage<HttpBody> | undefined): boolean {
return proto3.util.equals(HttpBody, a, b);
}
}

298
google/protobuf/any_pb.ts Normal file
View File

@@ -0,0 +1,298 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/any.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, IMessageTypeRegistry, JsonReadOptions, JsonValue, JsonWriteOptions, MessageType, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a
* URL that describes the type of the serialized message.
*
* Protobuf library provides support to pack/unpack Any values in the form
* of utility functions or additional generated methods of the Any type.
*
* Example 1: Pack and unpack a message in C++.
*
* Foo foo = ...;
* Any any;
* any.PackFrom(foo);
* ...
* if (any.UnpackTo(&foo)) {
* ...
* }
*
* Example 2: Pack and unpack a message in Java.
*
* Foo foo = ...;
* Any any = Any.pack(foo);
* ...
* if (any.is(Foo.class)) {
* foo = any.unpack(Foo.class);
* }
*
* Example 3: Pack and unpack a message in Python.
*
* foo = Foo(...)
* any = Any()
* any.Pack(foo)
* ...
* if any.Is(Foo.DESCRIPTOR):
* any.Unpack(foo)
* ...
*
* Example 4: Pack and unpack a message in Go
*
* foo := &pb.Foo{...}
* any, err := ptypes.MarshalAny(foo)
* ...
* foo := &pb.Foo{}
* if err := ptypes.UnmarshalAny(any, foo); err != nil {
* ...
* }
*
* The pack methods provided by protobuf library will by default use
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
* methods only use the fully qualified type name after the last '/'
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
* name "y.z".
*
*
* JSON
* ====
* The JSON representation of an `Any` value uses the regular
* representation of the deserialized, embedded message, with an
* additional field `@type` which contains the type URL. Example:
*
* package google.profile;
* message Person {
* string first_name = 1;
* string last_name = 2;
* }
*
* {
* "@type": "type.googleapis.com/google.profile.Person",
* "firstName": <string>,
* "lastName": <string>
* }
*
* If the embedded message type is well-known and has a custom JSON
* representation, that representation will be embedded adding a field
* `value` which holds the custom JSON in addition to the `@type`
* field. Example (for message [google.protobuf.Duration][]):
*
* {
* "@type": "type.googleapis.com/google.protobuf.Duration",
* "value": "1.212s"
* }
*
*
* @generated from message google.protobuf.Any
*/
export class Any extends Message<Any> {
/**
* A URL/resource name that uniquely identifies the type of the serialized
* protocol buffer message. This string must contain at least
* one "/" character. The last segment of the URL's path must represent
* the fully qualified name of the type (as in
* `path/google.protobuf.Duration`). The name should be in a canonical form
* (e.g., leading "." is not accepted).
*
* In practice, teams usually precompile into the binary all types that they
* expect it to use in the context of Any. However, for URLs which use the
* scheme `http`, `https`, or no scheme, one can optionally set up a type
* server that maps type URLs to message definitions as follows:
*
* * If no scheme is provided, `https` is assumed.
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
* value in binary format, or produce an error.
* * Applications are allowed to cache lookup results based on the
* URL, or have them precompiled into a binary to avoid any
* lookup. Therefore, binary compatibility needs to be preserved
* on changes to types. (Use versioned type names to manage
* breaking changes.)
*
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
* type.googleapis.com.
*
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
*
*
* @generated from field: string type_url = 1;
*/
typeUrl = "";
/**
* Must be a valid serialized protocol buffer of the above specified type.
*
* @generated from field: bytes value = 2;
*/
value = new Uint8Array(0);
constructor(data?: PartialMessage<Any>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
if (this.typeUrl === "") {
return {};
}
const typeName = this.typeUrlToName(this.typeUrl);
const messageType = options?.typeRegistry?.findMessage(typeName);
if (!messageType) {
throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);
}
const message = messageType.fromBinary(this.value);
let json = message.toJson(options);
if (typeName.startsWith("google.protobuf.") || (json === null || Array.isArray(json) || typeof json !== "object")) {
json = {value: json};
}
json["@type"] = this.typeUrl;
return json;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
if (json === null || Array.isArray(json) || typeof json != "object") {
throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${json === null ? "null" : Array.isArray(json) ? "array" : typeof json}`);
}
if (Object.keys(json).length == 0) {
return this;
}
const typeUrl = json["@type"];
if (typeof typeUrl != "string" || typeUrl == "") {
throw new Error(`cannot decode message google.protobuf.Any from JSON: "@type" is empty`);
}
const typeName = this.typeUrlToName(typeUrl), messageType = options?.typeRegistry?.findMessage(typeName);
if (!messageType) {
throw new Error(`cannot decode message google.protobuf.Any from JSON: ${typeUrl} is not in the type registry`);
}
let message;
if (typeName.startsWith("google.protobuf.") && Object.prototype.hasOwnProperty.call(json, "value")) {
message = messageType.fromJson(json["value"], options);
} else {
const copy = Object.assign({}, json);
delete copy["@type"];
message = messageType.fromJson(copy, options);
}
this.packFrom(message);
return this;
}
packFrom(message: Message): void {
this.value = message.toBinary();
this.typeUrl = this.typeNameToUrl(message.getType().typeName);
}
unpackTo(target: Message): boolean {
if (!this.is(target.getType())) {
return false;
}
target.fromBinary(this.value);
return true;
}
unpack(registry: IMessageTypeRegistry): Message | undefined {
if (this.typeUrl === "") {
return undefined;
}
const messageType = registry.findMessage(this.typeUrlToName(this.typeUrl));
if (!messageType) {
return undefined;
}
return messageType.fromBinary(this.value);
}
is(type: MessageType | string): boolean {
if (this.typeUrl === '') {
return false;
}
const name = this.typeUrlToName(this.typeUrl);
let typeName = '';
if (typeof type === 'string') {
typeName = type;
} else {
typeName = type.typeName;
}
return name === typeName;
}
private typeNameToUrl(name: string): string {
return `type.googleapis.com/${name}`;
}
private typeUrlToName(url: string): string {
if (!url.length) {
throw new Error(`invalid type url: ${url}`);
}
const slash = url.lastIndexOf("/");
const name = slash >= 0 ? url.substring(slash + 1) : url;
if (!name.length) {
throw new Error(`invalid type url: ${url}`);
}
return name;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Any";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
]);
static pack(message: Message): Any {
const any = new Any();
any.packFrom(message);
return any;
}
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Any {
return new Any().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Any {
return new Any().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Any {
return new Any().fromJsonString(jsonString, options);
}
static equals(a: Any | PlainMessage<Any> | undefined, b: Any | PlainMessage<Any> | undefined): boolean {
return proto3.util.equals(Any, a, b);
}
}

375
google/protobuf/api_pb.ts Normal file
View File

@@ -0,0 +1,375 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/api.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { Option, Syntax } from "./type_pb.js";
import { SourceContext } from "./source_context_pb.js";
/**
* Api is a light-weight descriptor for an API Interface.
*
* Interfaces are also described as "protocol buffer services" in some contexts,
* such as by the "service" keyword in a .proto file, but they are different
* from API Services, which represent a concrete implementation of an interface
* as opposed to simply a description of methods and bindings. They are also
* sometimes simply referred to as "APIs" in other contexts, such as the name of
* this message itself. See https://cloud.google.com/apis/design/glossary for
* detailed terminology.
*
* @generated from message google.protobuf.Api
*/
export class Api extends Message<Api> {
/**
* The fully qualified name of this interface, including package name
* followed by the interface's simple name.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* The methods of this interface, in unspecified order.
*
* @generated from field: repeated google.protobuf.Method methods = 2;
*/
methods: Method[] = [];
/**
* Any metadata attached to the interface.
*
* @generated from field: repeated google.protobuf.Option options = 3;
*/
options: Option[] = [];
/**
* A version string for this interface. If specified, must have the form
* `major-version.minor-version`, as in `1.10`. If the minor version is
* omitted, it defaults to zero. If the entire version field is empty, the
* major version is derived from the package name, as outlined below. If the
* field is not empty, the version in the package name will be verified to be
* consistent with what is provided here.
*
* The versioning schema uses [semantic
* versioning](http://semver.org) where the major version number
* indicates a breaking change and the minor version an additive,
* non-breaking change. Both version numbers are signals to users
* what to expect from different versions, and should be carefully
* chosen based on the product plan.
*
* The major version is also reflected in the package name of the
* interface, which must end in `v<major-version>`, as in
* `google.feature.v1`. For major versions 0 and 1, the suffix can
* be omitted. Zero major versions must only be used for
* experimental, non-GA interfaces.
*
*
*
* @generated from field: string version = 4;
*/
version = "";
/**
* Source context for the protocol buffer service represented by this
* message.
*
* @generated from field: google.protobuf.SourceContext source_context = 5;
*/
sourceContext?: SourceContext;
/**
* Included interfaces. See [Mixin][].
*
* @generated from field: repeated google.protobuf.Mixin mixins = 6;
*/
mixins: Mixin[] = [];
/**
* The source syntax of the service.
*
* @generated from field: google.protobuf.Syntax syntax = 7;
*/
syntax = Syntax.PROTO2;
constructor(data?: PartialMessage<Api>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Api";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "methods", kind: "message", T: Method, repeated: true },
{ no: 3, name: "options", kind: "message", T: Option, repeated: true },
{ no: 4, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "source_context", kind: "message", T: SourceContext },
{ no: 6, name: "mixins", kind: "message", T: Mixin, repeated: true },
{ no: 7, name: "syntax", kind: "enum", T: proto3.getEnumType(Syntax) },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Api {
return new Api().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Api {
return new Api().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Api {
return new Api().fromJsonString(jsonString, options);
}
static equals(a: Api | PlainMessage<Api> | undefined, b: Api | PlainMessage<Api> | undefined): boolean {
return proto3.util.equals(Api, a, b);
}
}
/**
* Method represents a method of an API interface.
*
* @generated from message google.protobuf.Method
*/
export class Method extends Message<Method> {
/**
* The simple name of this method.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* A URL of the input message type.
*
* @generated from field: string request_type_url = 2;
*/
requestTypeUrl = "";
/**
* If true, the request is streamed.
*
* @generated from field: bool request_streaming = 3;
*/
requestStreaming = false;
/**
* The URL of the output message type.
*
* @generated from field: string response_type_url = 4;
*/
responseTypeUrl = "";
/**
* If true, the response is streamed.
*
* @generated from field: bool response_streaming = 5;
*/
responseStreaming = false;
/**
* Any metadata attached to the method.
*
* @generated from field: repeated google.protobuf.Option options = 6;
*/
options: Option[] = [];
/**
* The source syntax of this method.
*
* @generated from field: google.protobuf.Syntax syntax = 7;
*/
syntax = Syntax.PROTO2;
constructor(data?: PartialMessage<Method>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Method";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "request_type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "request_streaming", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 4, name: "response_type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "response_streaming", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 6, name: "options", kind: "message", T: Option, repeated: true },
{ no: 7, name: "syntax", kind: "enum", T: proto3.getEnumType(Syntax) },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Method {
return new Method().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Method {
return new Method().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Method {
return new Method().fromJsonString(jsonString, options);
}
static equals(a: Method | PlainMessage<Method> | undefined, b: Method | PlainMessage<Method> | undefined): boolean {
return proto3.util.equals(Method, a, b);
}
}
/**
* Declares an API Interface to be included in this interface. The including
* interface must redeclare all the methods from the included interface, but
* documentation and options are inherited as follows:
*
* - If after comment and whitespace stripping, the documentation
* string of the redeclared method is empty, it will be inherited
* from the original method.
*
* - Each annotation belonging to the service config (http,
* visibility) which is not set in the redeclared method will be
* inherited.
*
* - If an http annotation is inherited, the path pattern will be
* modified as follows. Any version prefix will be replaced by the
* version of the including interface plus the [root][] path if
* specified.
*
* Example of a simple mixin:
*
* package google.acl.v1;
* service AccessControl {
* // Get the underlying ACL object.
* rpc GetAcl(GetAclRequest) returns (Acl) {
* option (google.api.http).get = "/v1/{resource=**}:getAcl";
* }
* }
*
* package google.storage.v2;
* service Storage {
* rpc GetAcl(GetAclRequest) returns (Acl);
*
* // Get a data record.
* rpc GetData(GetDataRequest) returns (Data) {
* option (google.api.http).get = "/v2/{resource=**}";
* }
* }
*
* Example of a mixin configuration:
*
* apis:
* - name: google.storage.v2.Storage
* mixins:
* - name: google.acl.v1.AccessControl
*
* The mixin construct implies that all methods in `AccessControl` are
* also declared with same name and request/response types in
* `Storage`. A documentation generator or annotation processor will
* see the effective `Storage.GetAcl` method after inherting
* documentation and annotations as follows:
*
* service Storage {
* // Get the underlying ACL object.
* rpc GetAcl(GetAclRequest) returns (Acl) {
* option (google.api.http).get = "/v2/{resource=**}:getAcl";
* }
* ...
* }
*
* Note how the version in the path pattern changed from `v1` to `v2`.
*
* If the `root` field in the mixin is specified, it should be a
* relative path under which inherited HTTP paths are placed. Example:
*
* apis:
* - name: google.storage.v2.Storage
* mixins:
* - name: google.acl.v1.AccessControl
* root: acls
*
* This implies the following inherited HTTP annotation:
*
* service Storage {
* // Get the underlying ACL object.
* rpc GetAcl(GetAclRequest) returns (Acl) {
* option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
* }
* ...
* }
*
* @generated from message google.protobuf.Mixin
*/
export class Mixin extends Message<Mixin> {
/**
* The fully qualified name of the interface which is included.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* If non-empty specifies a path under which inherited HTTP paths
* are rooted.
*
* @generated from field: string root = 2;
*/
root = "";
constructor(data?: PartialMessage<Mixin>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Mixin";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "root", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Mixin {
return new Mixin().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Mixin {
return new Mixin().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Mixin {
return new Mixin().fromJsonString(jsonString, options);
}
static equals(a: Mixin | PlainMessage<Mixin> | undefined, b: Mixin | PlainMessage<Mixin> | undefined): boolean {
return proto3.util.equals(Mixin, a, b);
}
}

View File

@@ -0,0 +1,352 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Author: kenton@google.com (Kenton Varda)
//
// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to
// change.
//
// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
// just a program that reads a CodeGeneratorRequest from stdin and writes a
// CodeGeneratorResponse to stdout.
//
// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
// of dealing with the raw protocol defined here.
//
// A plugin executable needs only to be placed somewhere in the path. The
// plugin should be named "protoc-gen-$NAME", and will then be used when the
// flag "--${NAME}_out" is passed to protoc.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/compiler/plugin.proto (package google.protobuf.compiler, syntax proto2)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto2 } from "@bufbuild/protobuf";
import { FileDescriptorProto } from "../descriptor_pb.js";
/**
* The version number of protocol compiler.
*
* @generated from message google.protobuf.compiler.Version
*/
export class Version extends Message<Version> {
/**
* @generated from field: optional int32 major = 1;
*/
major?: number;
/**
* @generated from field: optional int32 minor = 2;
*/
minor?: number;
/**
* @generated from field: optional int32 patch = 3;
*/
patch?: number;
/**
* A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
* be empty for mainline stable releases.
*
* @generated from field: optional string suffix = 4;
*/
suffix?: string;
constructor(data?: PartialMessage<Version>) {
super();
proto2.util.initPartial(data, this);
}
static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "google.protobuf.compiler.Version";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 1, name: "major", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 2, name: "minor", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 3, name: "patch", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
{ no: 4, name: "suffix", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Version {
return new Version().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Version {
return new Version().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Version {
return new Version().fromJsonString(jsonString, options);
}
static equals(a: Version | PlainMessage<Version> | undefined, b: Version | PlainMessage<Version> | undefined): boolean {
return proto2.util.equals(Version, a, b);
}
}
/**
* An encoded CodeGeneratorRequest is written to the plugin's stdin.
*
* @generated from message google.protobuf.compiler.CodeGeneratorRequest
*/
export class CodeGeneratorRequest extends Message<CodeGeneratorRequest> {
/**
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
* @generated from field: repeated string file_to_generate = 1;
*/
fileToGenerate: string[] = [];
/**
* The generator parameter passed on the command-line.
*
* @generated from field: optional string parameter = 2;
*/
parameter?: string;
/**
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
*
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
* Type names of fields and extensions in the FileDescriptorProto are always
* fully qualified.
*
* @generated from field: repeated google.protobuf.FileDescriptorProto proto_file = 15;
*/
protoFile: FileDescriptorProto[] = [];
/**
* The version number of protocol compiler.
*
* @generated from field: optional google.protobuf.compiler.Version compiler_version = 3;
*/
compilerVersion?: Version;
constructor(data?: PartialMessage<CodeGeneratorRequest>) {
super();
proto2.util.initPartial(data, this);
}
static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "google.protobuf.compiler.CodeGeneratorRequest";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 1, name: "file_to_generate", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
{ no: 2, name: "parameter", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 15, name: "proto_file", kind: "message", T: FileDescriptorProto, repeated: true },
{ no: 3, name: "compiler_version", kind: "message", T: Version, opt: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CodeGeneratorRequest {
return new CodeGeneratorRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CodeGeneratorRequest {
return new CodeGeneratorRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CodeGeneratorRequest {
return new CodeGeneratorRequest().fromJsonString(jsonString, options);
}
static equals(a: CodeGeneratorRequest | PlainMessage<CodeGeneratorRequest> | undefined, b: CodeGeneratorRequest | PlainMessage<CodeGeneratorRequest> | undefined): boolean {
return proto2.util.equals(CodeGeneratorRequest, a, b);
}
}
/**
* The plugin writes an encoded CodeGeneratorResponse to stdout.
*
* @generated from message google.protobuf.compiler.CodeGeneratorResponse
*/
export class CodeGeneratorResponse extends Message<CodeGeneratorResponse> {
/**
* Error message. If non-empty, code generation failed. The plugin process
* should exit with status code zero even if it reports an error in this way.
*
* This should be used to indicate errors in .proto files which prevent the
* code generator from generating correct code. Errors which indicate a
* problem in protoc itself -- such as the input CodeGeneratorRequest being
* unparseable -- should be reported by writing a message to stderr and
* exiting with a non-zero status code.
*
* @generated from field: optional string error = 1;
*/
error?: string;
/**
* @generated from field: repeated google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
file: CodeGeneratorResponse_File[] = [];
constructor(data?: PartialMessage<CodeGeneratorResponse>) {
super();
proto2.util.initPartial(data, this);
}
static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "google.protobuf.compiler.CodeGeneratorResponse";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 15, name: "file", kind: "message", T: CodeGeneratorResponse_File, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CodeGeneratorResponse {
return new CodeGeneratorResponse().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CodeGeneratorResponse {
return new CodeGeneratorResponse().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CodeGeneratorResponse {
return new CodeGeneratorResponse().fromJsonString(jsonString, options);
}
static equals(a: CodeGeneratorResponse | PlainMessage<CodeGeneratorResponse> | undefined, b: CodeGeneratorResponse | PlainMessage<CodeGeneratorResponse> | undefined): boolean {
return proto2.util.equals(CodeGeneratorResponse, a, b);
}
}
/**
* Represents a single generated file.
*
* @generated from message google.protobuf.compiler.CodeGeneratorResponse.File
*/
export class CodeGeneratorResponse_File extends Message<CodeGeneratorResponse_File> {
/**
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
*
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
* @generated from field: optional string name = 1;
*/
name?: string;
/**
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
*
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
*
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
*
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
*
* If |insertion_point| is present, |name| must also be present.
*
* @generated from field: optional string insertion_point = 2;
*/
insertionPoint?: string;
/**
* The file contents.
*
* @generated from field: optional string content = 15;
*/
content?: string;
constructor(data?: PartialMessage<CodeGeneratorResponse_File>) {
super();
proto2.util.initPartial(data, this);
}
static readonly runtime: typeof proto2 = proto2;
static readonly typeName = "google.protobuf.compiler.CodeGeneratorResponse.File";
static readonly fields: FieldList = proto2.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 2, name: "insertion_point", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
{ no: 15, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CodeGeneratorResponse_File {
return new CodeGeneratorResponse_File().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CodeGeneratorResponse_File {
return new CodeGeneratorResponse_File().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CodeGeneratorResponse_File {
return new CodeGeneratorResponse_File().fromJsonString(jsonString, options);
}
static equals(a: CodeGeneratorResponse_File | PlainMessage<CodeGeneratorResponse_File> | undefined, b: CodeGeneratorResponse_File | PlainMessage<CodeGeneratorResponse_File> | undefined): boolean {
return proto2.util.equals(CodeGeneratorResponse_File, a, b);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,197 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/duration.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
/**
* A Duration represents a signed, fixed-length span of time represented
* as a count of seconds and fractions of seconds at nanosecond
* resolution. It is independent of any calendar and concepts like "day"
* or "month". It is related to Timestamp in that the difference between
* two Timestamp values is a Duration and it can be added or subtracted
* from a Timestamp. Range is approximately +-10,000 years.
*
* # Examples
*
* Example 1: Compute Duration from two Timestamps in pseudo code.
*
* Timestamp start = ...;
* Timestamp end = ...;
* Duration duration = ...;
*
* duration.seconds = end.seconds - start.seconds;
* duration.nanos = end.nanos - start.nanos;
*
* if (duration.seconds < 0 && duration.nanos > 0) {
* duration.seconds += 1;
* duration.nanos -= 1000000000;
* } else if (duration.seconds > 0 && duration.nanos < 0) {
* duration.seconds -= 1;
* duration.nanos += 1000000000;
* }
*
* Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
*
* Timestamp start = ...;
* Duration duration = ...;
* Timestamp end = ...;
*
* end.seconds = start.seconds + duration.seconds;
* end.nanos = start.nanos + duration.nanos;
*
* if (end.nanos < 0) {
* end.seconds -= 1;
* end.nanos += 1000000000;
* } else if (end.nanos >= 1000000000) {
* end.seconds += 1;
* end.nanos -= 1000000000;
* }
*
* Example 3: Compute Duration from datetime.timedelta in Python.
*
* td = datetime.timedelta(days=3, minutes=10)
* duration = Duration()
* duration.FromTimedelta(td)
*
* # JSON Mapping
*
* In JSON format, the Duration type is encoded as a string rather than an
* object, where the string ends in the suffix "s" (indicating seconds) and
* is preceded by the number of seconds, with nanoseconds expressed as
* fractional seconds. For example, 3 seconds with 0 nanoseconds should be
* encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
* be expressed in JSON format as "3.000000001s", and 3 seconds and 1
* microsecond should be expressed in JSON format as "3.000001s".
*
*
*
* @generated from message google.protobuf.Duration
*/
export class Duration extends Message<Duration> {
/**
* Signed seconds of the span of time. Must be from -315,576,000,000
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
*
* @generated from field: int64 seconds = 1;
*/
seconds = protoInt64.zero;
/**
* Signed fractions of a second at nanosecond resolution of the span
* of time. Durations less than one second are represented with a 0
* `seconds` field and a positive or negative `nanos` field. For durations
* of one second or more, a non-zero value for the `nanos` field must be
* of the same sign as the `seconds` field. Must be from -999,999,999
* to +999,999,999 inclusive.
*
* @generated from field: int32 nanos = 2;
*/
nanos = 0;
constructor(data?: PartialMessage<Duration>) {
super();
proto3.util.initPartial(data, this);
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
if (typeof json !== "string") {
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${proto3.json.debug(json)}`);
}
const match = json.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);
if (match === null) {
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${proto3.json.debug(json)}`);
}
const longSeconds = Number(match[1]);
if (longSeconds > 315576000000 || longSeconds < -315576000000) {
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${proto3.json.debug(json)}`);
}
this.seconds = protoInt64.parse(longSeconds);
if (typeof match[2] == "string") {
const nanosStr = match[2] + "0".repeat(9 - match[2].length);
this.nanos = parseInt(nanosStr);
if (longSeconds < 0 || Object.is(longSeconds, -0)) {
this.nanos = -this.nanos;
}
}
return this;
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
if (Number(this.seconds) > 315576000000 || Number(this.seconds) < -315576000000) {
throw new Error(`cannot encode google.protobuf.Duration to JSON: value out of range`);
}
let text = this.seconds.toString();
if (this.nanos !== 0) {
let nanosStr = Math.abs(this.nanos).toString();
nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr;
if (nanosStr.substring(3) === "000000") {
nanosStr = nanosStr.substring(0, 3);
} else if (nanosStr.substring(6) === "000") {
nanosStr = nanosStr.substring(0, 6);
}
text += "." + nanosStr;
if (this.nanos < 0 && Number(this.seconds) == 0) {
text = "-" + text;
}
}
return text + "s";
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Duration";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Duration {
return new Duration().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Duration {
return new Duration().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Duration {
return new Duration().fromJsonString(jsonString, options);
}
static equals(a: Duration | PlainMessage<Duration> | undefined, b: Duration | PlainMessage<Duration> | undefined): boolean {
return proto3.util.equals(Duration, a, b);
}
}

View File

@@ -0,0 +1,79 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/empty.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* A generic empty message that you can re-use to avoid defining duplicated
* empty messages in your APIs. A typical example is to use it as the request
* or the response type of an API method. For instance:
*
* service Foo {
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
* }
*
* The JSON representation for `Empty` is empty JSON object `{}`.
*
* @generated from message google.protobuf.Empty
*/
export class Empty extends Message<Empty> {
constructor(data?: PartialMessage<Empty>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Empty";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Empty {
return new Empty().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Empty {
return new Empty().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Empty {
return new Empty().fromJsonString(jsonString, options);
}
static equals(a: Empty | PlainMessage<Empty> | undefined, b: Empty | PlainMessage<Empty> | undefined): boolean {
return proto3.util.equals(Empty, a, b);
}
}

View File

@@ -0,0 +1,339 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/field_mask.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* `FieldMask` represents a set of symbolic field paths, for example:
*
* paths: "f.a"
* paths: "f.b.d"
*
* Here `f` represents a field in some root message, `a` and `b`
* fields in the message found in `f`, and `d` a field found in the
* message in `f.b`.
*
* Field masks are used to specify a subset of fields that should be
* returned by a get operation or modified by an update operation.
* Field masks also have a custom JSON encoding (see below).
*
* # Field Masks in Projections
*
* When used in the context of a projection, a response message or
* sub-message is filtered by the API to only contain those fields as
* specified in the mask. For example, if the mask in the previous
* example is applied to a response message as follows:
*
* f {
* a : 22
* b {
* d : 1
* x : 2
* }
* y : 13
* }
* z: 8
*
* The result will not contain specific values for fields x,y and z
* (their value will be set to the default, and omitted in proto text
* output):
*
*
* f {
* a : 22
* b {
* d : 1
* }
* }
*
* A repeated field is not allowed except at the last position of a
* paths string.
*
* If a FieldMask object is not present in a get operation, the
* operation applies to all fields (as if a FieldMask of all fields
* had been specified).
*
* Note that a field mask does not necessarily apply to the
* top-level response message. In case of a REST get operation, the
* field mask applies directly to the response, but in case of a REST
* list operation, the mask instead applies to each individual message
* in the returned resource list. In case of a REST custom method,
* other definitions may be used. Where the mask applies will be
* clearly documented together with its declaration in the API. In
* any case, the effect on the returned resource/resources is required
* behavior for APIs.
*
* # Field Masks in Update Operations
*
* A field mask in update operations specifies which fields of the
* targeted resource are going to be updated. The API is required
* to only change the values of the fields as specified in the mask
* and leave the others untouched. If a resource is passed in to
* describe the updated values, the API ignores the values of all
* fields not covered by the mask.
*
* If a repeated field is specified for an update operation, new values will
* be appended to the existing repeated field in the target resource. Note that
* a repeated field is only allowed in the last position of a `paths` string.
*
* If a sub-message is specified in the last position of the field mask for an
* update operation, then new value will be merged into the existing sub-message
* in the target resource.
*
* For example, given the target message:
*
* f {
* b {
* d: 1
* x: 2
* }
* c: [1]
* }
*
* And an update message:
*
* f {
* b {
* d: 10
* }
* c: [2]
* }
*
* then if the field mask is:
*
* paths: ["f.b", "f.c"]
*
* then the result will be:
*
* f {
* b {
* d: 10
* x: 2
* }
* c: [1, 2]
* }
*
* An implementation may provide options to override this default behavior for
* repeated and message fields.
*
* In order to reset a field's value to the default, the field must
* be in the mask and set to the default value in the provided resource.
* Hence, in order to reset all fields of a resource, provide a default
* instance of the resource and set all fields in the mask, or do
* not provide a mask as described below.
*
* If a field mask is not present on update, the operation applies to
* all fields (as if a field mask of all fields has been specified).
* Note that in the presence of schema evolution, this may mean that
* fields the client does not know and has therefore not filled into
* the request will be reset to their default. If this is unwanted
* behavior, a specific service may require a client to always specify
* a field mask, producing an error if not.
*
* As with get operations, the location of the resource which
* describes the updated values in the request message depends on the
* operation kind. In any case, the effect of the field mask is
* required to be honored by the API.
*
* ## Considerations for HTTP REST
*
* The HTTP kind of an update operation which uses a field mask must
* be set to PATCH instead of PUT in order to satisfy HTTP semantics
* (PUT must only be used for full updates).
*
* # JSON Encoding of Field Masks
*
* In JSON, a field mask is encoded as a single string where paths are
* separated by a comma. Fields name in each path are converted
* to/from lower-camel naming conventions.
*
* As an example, consider the following message declarations:
*
* message Profile {
* User user = 1;
* Photo photo = 2;
* }
* message User {
* string display_name = 1;
* string address = 2;
* }
*
* In proto a field mask for `Profile` may look as such:
*
* mask {
* paths: "user.display_name"
* paths: "photo"
* }
*
* In JSON, the same mask is represented as below:
*
* {
* mask: "user.displayName,photo"
* }
*
* # Field Masks and Oneof Fields
*
* Field masks treat fields in oneofs just as regular fields. Consider the
* following message:
*
* message SampleMessage {
* oneof test_oneof {
* string name = 4;
* SubMessage sub_message = 9;
* }
* }
*
* The field mask can be:
*
* mask {
* paths: "name"
* }
*
* Or:
*
* mask {
* paths: "sub_message"
* }
*
* Note that oneof type names ("test_oneof" in this case) cannot be used in
* paths.
*
* ## Field Mask Verification
*
* The implementation of any API method which has a FieldMask type field in the
* request should verify the included field paths, and return an
* `INVALID_ARGUMENT` error if any path is unmappable.
*
* @generated from message google.protobuf.FieldMask
*/
export class FieldMask extends Message<FieldMask> {
/**
* The set of field mask paths.
*
* @generated from field: repeated string paths = 1;
*/
paths: string[] = [];
constructor(data?: PartialMessage<FieldMask>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
// Converts snake_case to protoCamelCase according to the convention
// used by protoc to convert a field name to a JSON name.
function protoCamelCase(snakeCase: string): string {
let capNext = false;
const b = [];
for (let i = 0; i < snakeCase.length; i++) {
let c = snakeCase.charAt(i);
switch (c) {
case '_':
capNext = true;
break;
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
b.push(c);
capNext = false;
break;
default:
if (capNext) {
capNext = false;
c = c.toUpperCase();
}
b.push(c);
break;
}
}
return b.join('');
}
return this.paths.map(p => {
if (p.match(/_[0-9]?_/g) || p.match(/[A-Z]/g)) {
throw new Error("cannot encode google.protobuf.FieldMask to JSON: lowerCamelCase of path name \"" + p + "\" is irreversible");
}
return protoCamelCase(p);
}).join(",");
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
if (typeof json !== "string") {
throw new Error("cannot decode google.protobuf.FieldMask from JSON: " + proto3.json.debug(json));
}
if (json === "") {
return this;
}
function camelToSnake (str: string) {
if (str.includes("_")) {
throw new Error("cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase");
}
const sc = str.replace(/[A-Z]/g, letter => "_" + letter.toLowerCase());
return (sc[0] === "_") ? sc.substring(1) : sc;
}
this.paths = json.split(",").map(camelToSnake);
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.FieldMask";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "paths", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FieldMask {
return new FieldMask().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): FieldMask {
return new FieldMask().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): FieldMask {
return new FieldMask().fromJsonString(jsonString, options);
}
static equals(a: FieldMask | PlainMessage<FieldMask> | undefined, b: FieldMask | PlainMessage<FieldMask> | undefined): boolean {
return proto3.util.equals(FieldMask, a, b);
}
}

View File

@@ -0,0 +1,81 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/source_context.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* `SourceContext` represents information about the source of a
* protobuf element, like the file in which it is defined.
*
* @generated from message google.protobuf.SourceContext
*/
export class SourceContext extends Message<SourceContext> {
/**
* The path-qualified name of the .proto file that contained the associated
* protobuf element. For example: `"google/protobuf/source_context.proto"`.
*
* @generated from field: string file_name = 1;
*/
fileName = "";
constructor(data?: PartialMessage<SourceContext>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.SourceContext";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "file_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SourceContext {
return new SourceContext().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SourceContext {
return new SourceContext().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SourceContext {
return new SourceContext().fromJsonString(jsonString, options);
}
static equals(a: SourceContext | PlainMessage<SourceContext> | undefined, b: SourceContext | PlainMessage<SourceContext> | undefined): boolean {
return proto3.util.equals(SourceContext, a, b);
}
}

View File

@@ -0,0 +1,327 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/struct.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonObject, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* `NullValue` is a singleton enumeration to represent the null value for the
* `Value` type union.
*
* The JSON representation for `NullValue` is JSON `null`.
*
* @generated from enum google.protobuf.NullValue
*/
export enum NullValue {
/**
* Null value.
*
* @generated from enum value: NULL_VALUE = 0;
*/
NULL_VALUE = 0,
}
// Retrieve enum metadata with: proto3.getEnumType(NullValue)
proto3.util.setEnumType(NullValue, "google.protobuf.NullValue", [
{ no: 0, name: "NULL_VALUE" },
]);
/**
* `Struct` represents a structured data value, consisting of fields
* which map to dynamically typed values. In some languages, `Struct`
* might be supported by a native representation. For example, in
* scripting languages like JS a struct is represented as an
* object. The details of that representation are described together
* with the proto support for the language.
*
* The JSON representation for `Struct` is JSON object.
*
* @generated from message google.protobuf.Struct
*/
export class Struct extends Message<Struct> {
/**
* Unordered map of dynamically typed values.
*
* @generated from field: map<string, google.protobuf.Value> fields = 1;
*/
fields: { [key: string]: Value } = {};
constructor(data?: PartialMessage<Struct>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
const json: JsonObject = {}
for (const [k, v] of Object.entries(this.fields)) {
json[k] = v.toJson(options);
}
return json;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
if (typeof json != "object" || json == null || Array.isArray(json)) {
throw new Error("cannot decode google.protobuf.Struct from JSON " + proto3.json.debug(json));
}
for (const [k, v] of Object.entries(json)) {
this.fields[k] = Value.fromJson(v);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Struct";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "fields", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Value} },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Struct {
return new Struct().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Struct {
return new Struct().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Struct {
return new Struct().fromJsonString(jsonString, options);
}
static equals(a: Struct | PlainMessage<Struct> | undefined, b: Struct | PlainMessage<Struct> | undefined): boolean {
return proto3.util.equals(Struct, a, b);
}
}
/**
* `Value` represents a dynamically typed value which can be either
* null, a number, a string, a boolean, a recursive struct value, or a
* list of values. A producer of value is expected to set one of that
* variants, absence of any variant indicates an error.
*
* The JSON representation for `Value` is JSON value.
*
* @generated from message google.protobuf.Value
*/
export class Value extends Message<Value> {
/**
* The kind of value.
*
* @generated from oneof google.protobuf.Value.kind
*/
kind: {
/**
* Represents a null value.
*
* @generated from field: google.protobuf.NullValue null_value = 1;
*/
value: NullValue;
case: "nullValue";
} | {
/**
* Represents a double value.
*
* @generated from field: double number_value = 2;
*/
value: number;
case: "numberValue";
} | {
/**
* Represents a string value.
*
* @generated from field: string string_value = 3;
*/
value: string;
case: "stringValue";
} | {
/**
* Represents a boolean value.
*
* @generated from field: bool bool_value = 4;
*/
value: boolean;
case: "boolValue";
} | {
/**
* Represents a structured value.
*
* @generated from field: google.protobuf.Struct struct_value = 5;
*/
value: Struct;
case: "structValue";
} | {
/**
* Represents a repeated `Value`.
*
* @generated from field: google.protobuf.ListValue list_value = 6;
*/
value: ListValue;
case: "listValue";
} | { case: undefined; value?: undefined } = { case: undefined };
constructor(data?: PartialMessage<Value>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
switch (this.kind.case) {
case "nullValue":
return null;
case "numberValue":
if (!Number.isFinite(this.kind.value)) {
throw new Error("google.protobuf.Value cannot be NaN or Infinity");
}
return this.kind.value;
case "boolValue":
return this.kind.value;
case "stringValue":
return this.kind.value;
case "structValue":
case "listValue":
return this.kind.value.toJson({...options, emitDefaultValues: true});
}
throw new Error("google.protobuf.Value must have a value");
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
switch (typeof json) {
case "number":
this.kind = { case: "numberValue", value: json };
break;
case "string":
this.kind = { case: "stringValue", value: json };
break;
case "boolean":
this.kind = { case: "boolValue", value: json };
break;
case "object":
if (json === null) {
this.kind = { case: "nullValue", value: NullValue.NULL_VALUE };
} else if (Array.isArray(json)) {
this.kind = { case: "listValue", value: ListValue.fromJson(json) };
} else {
this.kind = { case: "structValue", value: Struct.fromJson(json) };
}
break;
default:
throw new Error("cannot decode google.protobuf.Value from JSON " + proto3.json.debug(json));
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Value";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "null_value", kind: "enum", T: proto3.getEnumType(NullValue), oneof: "kind" },
{ no: 2, name: "number_value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, oneof: "kind" },
{ no: 3, name: "string_value", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "kind" },
{ no: 4, name: "bool_value", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "kind" },
{ no: 5, name: "struct_value", kind: "message", T: Struct, oneof: "kind" },
{ no: 6, name: "list_value", kind: "message", T: ListValue, oneof: "kind" },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Value {
return new Value().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Value {
return new Value().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Value {
return new Value().fromJsonString(jsonString, options);
}
static equals(a: Value | PlainMessage<Value> | undefined, b: Value | PlainMessage<Value> | undefined): boolean {
return proto3.util.equals(Value, a, b);
}
}
/**
* `ListValue` is a wrapper around a repeated field of values.
*
* The JSON representation for `ListValue` is JSON array.
*
* @generated from message google.protobuf.ListValue
*/
export class ListValue extends Message<ListValue> {
/**
* Repeated field of dynamically typed values.
*
* @generated from field: repeated google.protobuf.Value values = 1;
*/
values: Value[] = [];
constructor(data?: PartialMessage<ListValue>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return this.values.map(v => v.toJson());
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
if (!Array.isArray(json)) {
throw new Error("cannot decode google.protobuf.ListValue from JSON " + proto3.json.debug(json));
}
for (let e of json) {
this.values.push(Value.fromJson(e));
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.ListValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "values", kind: "message", T: Value, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListValue {
return new ListValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListValue {
return new ListValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListValue {
return new ListValue().fromJsonString(jsonString, options);
}
static equals(a: ListValue | PlainMessage<ListValue> | undefined, b: ListValue | PlainMessage<ListValue> | undefined): boolean {
return proto3.util.equals(ListValue, a, b);
}
}

View File

@@ -0,0 +1,236 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/timestamp.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
/**
* A Timestamp represents a point in time independent of any time zone or local
* calendar, encoded as a count of seconds and fractions of seconds at
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
* January 1, 1970, in the proleptic Gregorian calendar which extends the
* Gregorian calendar backwards to year one.
*
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
* second table is needed for interpretation, using a [24-hour linear
* smear](https://developers.google.com/time/smear).
*
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
* restricting to that range, we ensure that we can convert to and from [RFC
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
*
* # Examples
*
* Example 1: Compute Timestamp from POSIX `time()`.
*
* Timestamp timestamp;
* timestamp.set_seconds(time(NULL));
* timestamp.set_nanos(0);
*
* Example 2: Compute Timestamp from POSIX `gettimeofday()`.
*
* struct timeval tv;
* gettimeofday(&tv, NULL);
*
* Timestamp timestamp;
* timestamp.set_seconds(tv.tv_sec);
* timestamp.set_nanos(tv.tv_usec * 1000);
*
* Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
*
* FILETIME ft;
* GetSystemTimeAsFileTime(&ft);
* UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
*
* // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
* // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
* Timestamp timestamp;
* timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
* timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
*
* Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
*
* long millis = System.currentTimeMillis();
*
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
* .setNanos((int) ((millis % 1000) * 1000000)).build();
*
*
* Example 5: Compute Timestamp from current time in Python.
*
* timestamp = Timestamp()
* timestamp.GetCurrentTime()
*
* # JSON Mapping
*
* In JSON format, the Timestamp type is encoded as a string in the
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
* where {year} is always expressed using four digits while {month}, {day},
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
* is required. A proto3 JSON serializer should always use UTC (as indicated by
* "Z") when printing the Timestamp type and a proto3 JSON parser should be
* able to accept both UTC and other timezones (as indicated by an offset).
*
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
* 01:30 UTC on January 15, 2017.
*
* In JavaScript, one can convert a Date object to this format using the
* standard
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
* method. In Python, a standard `datetime.datetime` object can be converted
* to this format using
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
* http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
* ) to obtain a formatter capable of generating timestamps in this format.
*
*
*
* @generated from message google.protobuf.Timestamp
*/
export class Timestamp extends Message<Timestamp> {
/**
* Represents seconds of UTC time since Unix epoch
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59Z inclusive.
*
* @generated from field: int64 seconds = 1;
*/
seconds = protoInt64.zero;
/**
* Non-negative fractions of a second at nanosecond resolution. Negative
* second values with fractions must still have non-negative nanos values
* that count forward in time. Must be from 0 to 999,999,999
* inclusive.
*
* @generated from field: int32 nanos = 2;
*/
nanos = 0;
constructor(data?: PartialMessage<Timestamp>) {
super();
proto3.util.initPartial(data, this);
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
if (typeof json !== "string") {
throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${proto3.json.debug(json)}`);
}
const matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
if (!matches) {
throw new Error(`cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string`);
}
const ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z"));
if (Number.isNaN(ms)) {
throw new Error(`cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string`);
}
if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) {
throw new Error(`cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);
}
this.seconds = protoInt64.parse(ms / 1000);
this.nanos = 0;
if (matches[7]) {
this.nanos = (parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1000000000);
}
return this;
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
const ms = Number(this.seconds) * 1000;
if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z")) {
throw new Error(`cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);
}
if (this.nanos < 0) {
throw new Error(`cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative`);
}
let z = "Z";
if (this.nanos > 0) {
const nanosStr = (this.nanos + 1000000000).toString().substring(1);
if (nanosStr.substring(3) === "000000") {
z = "." + nanosStr.substring(0, 3) + "Z";
} else if (nanosStr.substring(6) === "000") {
z = "." + nanosStr.substring(0, 6) + "Z";
} else {
z = "." + nanosStr + "Z";
}
}
return new Date(ms).toISOString().replace(".000Z", z);
}
toDate(): Date {
return new Date(Number(this.seconds) * 1000 + Math.ceil(this.nanos / 1000000));
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Timestamp";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
]);
static now(): Timestamp {
return Timestamp.fromDate(new Date())
}
static fromDate(date: Date): Timestamp {
const ms = date.getTime();
return new Timestamp({
seconds: protoInt64.parse(Math.floor(ms / 1000)),
nanos: (ms % 1000) * 1000000,
});
}
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Timestamp {
return new Timestamp().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Timestamp {
return new Timestamp().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Timestamp {
return new Timestamp().fromJsonString(jsonString, options);
}
static equals(a: Timestamp | PlainMessage<Timestamp> | undefined, b: Timestamp | PlainMessage<Timestamp> | undefined): boolean {
return proto3.util.equals(Timestamp, a, b);
}
}

652
google/protobuf/type_pb.ts Normal file
View File

@@ -0,0 +1,652 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/type.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { SourceContext } from "./source_context_pb.js";
import { Any } from "./any_pb.js";
/**
* The syntax in which a protocol buffer element is defined.
*
* @generated from enum google.protobuf.Syntax
*/
export enum Syntax {
/**
* Syntax `proto2`.
*
* @generated from enum value: SYNTAX_PROTO2 = 0;
*/
PROTO2 = 0,
/**
* Syntax `proto3`.
*
* @generated from enum value: SYNTAX_PROTO3 = 1;
*/
PROTO3 = 1,
}
// Retrieve enum metadata with: proto3.getEnumType(Syntax)
proto3.util.setEnumType(Syntax, "google.protobuf.Syntax", [
{ no: 0, name: "SYNTAX_PROTO2" },
{ no: 1, name: "SYNTAX_PROTO3" },
]);
/**
* A protocol buffer message type.
*
* @generated from message google.protobuf.Type
*/
export class Type extends Message<Type> {
/**
* The fully qualified message name.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* The list of fields.
*
* @generated from field: repeated google.protobuf.Field fields = 2;
*/
fields: Field[] = [];
/**
* The list of types appearing in `oneof` definitions in this type.
*
* @generated from field: repeated string oneofs = 3;
*/
oneofs: string[] = [];
/**
* The protocol buffer options.
*
* @generated from field: repeated google.protobuf.Option options = 4;
*/
options: Option[] = [];
/**
* The source context.
*
* @generated from field: google.protobuf.SourceContext source_context = 5;
*/
sourceContext?: SourceContext;
/**
* The source syntax.
*
* @generated from field: google.protobuf.Syntax syntax = 6;
*/
syntax = Syntax.PROTO2;
constructor(data?: PartialMessage<Type>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Type";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "fields", kind: "message", T: Field, repeated: true },
{ no: 3, name: "oneofs", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
{ no: 4, name: "options", kind: "message", T: Option, repeated: true },
{ no: 5, name: "source_context", kind: "message", T: SourceContext },
{ no: 6, name: "syntax", kind: "enum", T: proto3.getEnumType(Syntax) },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Type {
return new Type().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Type {
return new Type().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Type {
return new Type().fromJsonString(jsonString, options);
}
static equals(a: Type | PlainMessage<Type> | undefined, b: Type | PlainMessage<Type> | undefined): boolean {
return proto3.util.equals(Type, a, b);
}
}
/**
* A single field of a message type.
*
* @generated from message google.protobuf.Field
*/
export class Field extends Message<Field> {
/**
* The field type.
*
* @generated from field: google.protobuf.Field.Kind kind = 1;
*/
kind = Field_Kind.TYPE_UNKNOWN;
/**
* The field cardinality.
*
* @generated from field: google.protobuf.Field.Cardinality cardinality = 2;
*/
cardinality = Field_Cardinality.UNKNOWN;
/**
* The field number.
*
* @generated from field: int32 number = 3;
*/
number = 0;
/**
* The field name.
*
* @generated from field: string name = 4;
*/
name = "";
/**
* The field type URL, without the scheme, for message or enumeration
* types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
*
* @generated from field: string type_url = 6;
*/
typeUrl = "";
/**
* The index of the field type in `Type.oneofs`, for message or enumeration
* types. The first type has index 1; zero means the type is not in the list.
*
* @generated from field: int32 oneof_index = 7;
*/
oneofIndex = 0;
/**
* Whether to use alternative packed wire representation.
*
* @generated from field: bool packed = 8;
*/
packed = false;
/**
* The protocol buffer options.
*
* @generated from field: repeated google.protobuf.Option options = 9;
*/
options: Option[] = [];
/**
* The field JSON name.
*
* @generated from field: string json_name = 10;
*/
jsonName = "";
/**
* The string value of the default value of this field. Proto2 syntax only.
*
* @generated from field: string default_value = 11;
*/
defaultValue = "";
constructor(data?: PartialMessage<Field>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Field";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "kind", kind: "enum", T: proto3.getEnumType(Field_Kind) },
{ no: 2, name: "cardinality", kind: "enum", T: proto3.getEnumType(Field_Cardinality) },
{ no: 3, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
{ no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 6, name: "type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 7, name: "oneof_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
{ no: 8, name: "packed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 9, name: "options", kind: "message", T: Option, repeated: true },
{ no: 10, name: "json_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 11, name: "default_value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Field {
return new Field().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Field {
return new Field().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Field {
return new Field().fromJsonString(jsonString, options);
}
static equals(a: Field | PlainMessage<Field> | undefined, b: Field | PlainMessage<Field> | undefined): boolean {
return proto3.util.equals(Field, a, b);
}
}
/**
* Basic field types.
*
* @generated from enum google.protobuf.Field.Kind
*/
export enum Field_Kind {
/**
* Field type unknown.
*
* @generated from enum value: TYPE_UNKNOWN = 0;
*/
TYPE_UNKNOWN = 0,
/**
* Field type double.
*
* @generated from enum value: TYPE_DOUBLE = 1;
*/
TYPE_DOUBLE = 1,
/**
* Field type float.
*
* @generated from enum value: TYPE_FLOAT = 2;
*/
TYPE_FLOAT = 2,
/**
* Field type int64.
*
* @generated from enum value: TYPE_INT64 = 3;
*/
TYPE_INT64 = 3,
/**
* Field type uint64.
*
* @generated from enum value: TYPE_UINT64 = 4;
*/
TYPE_UINT64 = 4,
/**
* Field type int32.
*
* @generated from enum value: TYPE_INT32 = 5;
*/
TYPE_INT32 = 5,
/**
* Field type fixed64.
*
* @generated from enum value: TYPE_FIXED64 = 6;
*/
TYPE_FIXED64 = 6,
/**
* Field type fixed32.
*
* @generated from enum value: TYPE_FIXED32 = 7;
*/
TYPE_FIXED32 = 7,
/**
* Field type bool.
*
* @generated from enum value: TYPE_BOOL = 8;
*/
TYPE_BOOL = 8,
/**
* Field type string.
*
* @generated from enum value: TYPE_STRING = 9;
*/
TYPE_STRING = 9,
/**
* Field type group. Proto2 syntax only, and deprecated.
*
* @generated from enum value: TYPE_GROUP = 10;
*/
TYPE_GROUP = 10,
/**
* Field type message.
*
* @generated from enum value: TYPE_MESSAGE = 11;
*/
TYPE_MESSAGE = 11,
/**
* Field type bytes.
*
* @generated from enum value: TYPE_BYTES = 12;
*/
TYPE_BYTES = 12,
/**
* Field type uint32.
*
* @generated from enum value: TYPE_UINT32 = 13;
*/
TYPE_UINT32 = 13,
/**
* Field type enum.
*
* @generated from enum value: TYPE_ENUM = 14;
*/
TYPE_ENUM = 14,
/**
* Field type sfixed32.
*
* @generated from enum value: TYPE_SFIXED32 = 15;
*/
TYPE_SFIXED32 = 15,
/**
* Field type sfixed64.
*
* @generated from enum value: TYPE_SFIXED64 = 16;
*/
TYPE_SFIXED64 = 16,
/**
* Field type sint32.
*
* @generated from enum value: TYPE_SINT32 = 17;
*/
TYPE_SINT32 = 17,
/**
* Field type sint64.
*
* @generated from enum value: TYPE_SINT64 = 18;
*/
TYPE_SINT64 = 18,
}
// Retrieve enum metadata with: proto3.getEnumType(Field_Kind)
proto3.util.setEnumType(Field_Kind, "google.protobuf.Field.Kind", [
{ no: 0, name: "TYPE_UNKNOWN" },
{ no: 1, name: "TYPE_DOUBLE" },
{ no: 2, name: "TYPE_FLOAT" },
{ no: 3, name: "TYPE_INT64" },
{ no: 4, name: "TYPE_UINT64" },
{ no: 5, name: "TYPE_INT32" },
{ no: 6, name: "TYPE_FIXED64" },
{ no: 7, name: "TYPE_FIXED32" },
{ no: 8, name: "TYPE_BOOL" },
{ no: 9, name: "TYPE_STRING" },
{ no: 10, name: "TYPE_GROUP" },
{ no: 11, name: "TYPE_MESSAGE" },
{ no: 12, name: "TYPE_BYTES" },
{ no: 13, name: "TYPE_UINT32" },
{ no: 14, name: "TYPE_ENUM" },
{ no: 15, name: "TYPE_SFIXED32" },
{ no: 16, name: "TYPE_SFIXED64" },
{ no: 17, name: "TYPE_SINT32" },
{ no: 18, name: "TYPE_SINT64" },
]);
/**
* Whether a field is optional, required, or repeated.
*
* @generated from enum google.protobuf.Field.Cardinality
*/
export enum Field_Cardinality {
/**
* For fields with unknown cardinality.
*
* @generated from enum value: CARDINALITY_UNKNOWN = 0;
*/
UNKNOWN = 0,
/**
* For optional fields.
*
* @generated from enum value: CARDINALITY_OPTIONAL = 1;
*/
OPTIONAL = 1,
/**
* For required fields. Proto2 syntax only.
*
* @generated from enum value: CARDINALITY_REQUIRED = 2;
*/
REQUIRED = 2,
/**
* For repeated fields.
*
* @generated from enum value: CARDINALITY_REPEATED = 3;
*/
REPEATED = 3,
}
// Retrieve enum metadata with: proto3.getEnumType(Field_Cardinality)
proto3.util.setEnumType(Field_Cardinality, "google.protobuf.Field.Cardinality", [
{ no: 0, name: "CARDINALITY_UNKNOWN" },
{ no: 1, name: "CARDINALITY_OPTIONAL" },
{ no: 2, name: "CARDINALITY_REQUIRED" },
{ no: 3, name: "CARDINALITY_REPEATED" },
]);
/**
* Enum type definition.
*
* @generated from message google.protobuf.Enum
*/
export class Enum extends Message<Enum> {
/**
* Enum type name.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* Enum value definitions.
*
* @generated from field: repeated google.protobuf.EnumValue enumvalue = 2;
*/
enumvalue: EnumValue[] = [];
/**
* Protocol buffer options.
*
* @generated from field: repeated google.protobuf.Option options = 3;
*/
options: Option[] = [];
/**
* The source context.
*
* @generated from field: google.protobuf.SourceContext source_context = 4;
*/
sourceContext?: SourceContext;
/**
* The source syntax.
*
* @generated from field: google.protobuf.Syntax syntax = 5;
*/
syntax = Syntax.PROTO2;
constructor(data?: PartialMessage<Enum>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Enum";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "enumvalue", kind: "message", T: EnumValue, repeated: true },
{ no: 3, name: "options", kind: "message", T: Option, repeated: true },
{ no: 4, name: "source_context", kind: "message", T: SourceContext },
{ no: 5, name: "syntax", kind: "enum", T: proto3.getEnumType(Syntax) },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Enum {
return new Enum().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Enum {
return new Enum().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Enum {
return new Enum().fromJsonString(jsonString, options);
}
static equals(a: Enum | PlainMessage<Enum> | undefined, b: Enum | PlainMessage<Enum> | undefined): boolean {
return proto3.util.equals(Enum, a, b);
}
}
/**
* Enum value definition.
*
* @generated from message google.protobuf.EnumValue
*/
export class EnumValue extends Message<EnumValue> {
/**
* Enum value name.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* Enum value number.
*
* @generated from field: int32 number = 2;
*/
number = 0;
/**
* Protocol buffer options.
*
* @generated from field: repeated google.protobuf.Option options = 3;
*/
options: Option[] = [];
constructor(data?: PartialMessage<EnumValue>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.EnumValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
{ no: 3, name: "options", kind: "message", T: Option, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnumValue {
return new EnumValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnumValue {
return new EnumValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnumValue {
return new EnumValue().fromJsonString(jsonString, options);
}
static equals(a: EnumValue | PlainMessage<EnumValue> | undefined, b: EnumValue | PlainMessage<EnumValue> | undefined): boolean {
return proto3.util.equals(EnumValue, a, b);
}
}
/**
* A protocol buffer option, which can be attached to a message, field,
* enumeration, etc.
*
* @generated from message google.protobuf.Option
*/
export class Option extends Message<Option> {
/**
* The option's name. For protobuf built-in options (options defined in
* descriptor.proto), this is the short name. For example, `"map_entry"`.
* For custom options, it should be the fully-qualified name. For example,
* `"google.api.http"`.
*
* @generated from field: string name = 1;
*/
name = "";
/**
* The option's value packed in an Any message. If the value is a primitive,
* the corresponding wrapper type defined in google/protobuf/wrappers.proto
* should be used. If the value is an enum, it should be stored as an int32
* value using the google.protobuf.Int32Value type.
*
* @generated from field: google.protobuf.Any value = 2;
*/
value?: Any;
constructor(data?: PartialMessage<Option>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Option";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "value", kind: "message", T: Any },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Option {
return new Option().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Option {
return new Option().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Option {
return new Option().fromJsonString(jsonString, options);
}
static equals(a: Option | PlainMessage<Option> | undefined, b: Option | PlainMessage<Option> | undefined): boolean {
return proto3.util.equals(Option, a, b);
}
}

View File

@@ -0,0 +1,669 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Wrappers for primitive (non-message) types. These types are useful
// for embedding primitives in the `google.protobuf.Any` type and for places
// where we need to distinguish between the absence of a primitive
// typed field and its default value.
//
// These wrappers have no meaningful use within repeated fields as they lack
// the ability to detect presence on individual elements.
// These wrappers have no meaningful use within a map or a oneof since
// individual entries of a map or fields of a oneof can already detect presence.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/protobuf/wrappers.proto (package google.protobuf, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64, ScalarType } from "@bufbuild/protobuf";
/**
* Wrapper message for `double`.
*
* The JSON representation for `DoubleValue` is JSON number.
*
* @generated from message google.protobuf.DoubleValue
*/
export class DoubleValue extends Message<DoubleValue> {
/**
* The double value.
*
* @generated from field: double value = 1;
*/
value = 0;
constructor(data?: PartialMessage<DoubleValue>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.DOUBLE, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.DOUBLE, json);
} catch (e) {
let m = `cannot decode message google.protobuf.DoubleValue from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.DoubleValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
]);
static readonly fieldWrapper = {
wrapField(value: number): DoubleValue {
return new DoubleValue({value});
},
unwrapField(value: DoubleValue): number {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DoubleValue {
return new DoubleValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DoubleValue {
return new DoubleValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DoubleValue {
return new DoubleValue().fromJsonString(jsonString, options);
}
static equals(a: DoubleValue | PlainMessage<DoubleValue> | undefined, b: DoubleValue | PlainMessage<DoubleValue> | undefined): boolean {
return proto3.util.equals(DoubleValue, a, b);
}
}
/**
* Wrapper message for `float`.
*
* The JSON representation for `FloatValue` is JSON number.
*
* @generated from message google.protobuf.FloatValue
*/
export class FloatValue extends Message<FloatValue> {
/**
* The float value.
*
* @generated from field: float value = 1;
*/
value = 0;
constructor(data?: PartialMessage<FloatValue>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.FLOAT, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.FLOAT, json);
} catch (e) {
let m = `cannot decode message google.protobuf.FloatValue from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.FloatValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
]);
static readonly fieldWrapper = {
wrapField(value: number): FloatValue {
return new FloatValue({value});
},
unwrapField(value: FloatValue): number {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FloatValue {
return new FloatValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): FloatValue {
return new FloatValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): FloatValue {
return new FloatValue().fromJsonString(jsonString, options);
}
static equals(a: FloatValue | PlainMessage<FloatValue> | undefined, b: FloatValue | PlainMessage<FloatValue> | undefined): boolean {
return proto3.util.equals(FloatValue, a, b);
}
}
/**
* Wrapper message for `int64`.
*
* The JSON representation for `Int64Value` is JSON string.
*
* @generated from message google.protobuf.Int64Value
*/
export class Int64Value extends Message<Int64Value> {
/**
* The int64 value.
*
* @generated from field: int64 value = 1;
*/
value = protoInt64.zero;
constructor(data?: PartialMessage<Int64Value>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.INT64, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.INT64, json);
} catch (e) {
let m = `cannot decode message google.protobuf.Int64Value from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Int64Value";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
]);
static readonly fieldWrapper = {
wrapField(value: bigint): Int64Value {
return new Int64Value({value});
},
unwrapField(value: Int64Value): bigint {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Int64Value {
return new Int64Value().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Int64Value {
return new Int64Value().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Int64Value {
return new Int64Value().fromJsonString(jsonString, options);
}
static equals(a: Int64Value | PlainMessage<Int64Value> | undefined, b: Int64Value | PlainMessage<Int64Value> | undefined): boolean {
return proto3.util.equals(Int64Value, a, b);
}
}
/**
* Wrapper message for `uint64`.
*
* The JSON representation for `UInt64Value` is JSON string.
*
* @generated from message google.protobuf.UInt64Value
*/
export class UInt64Value extends Message<UInt64Value> {
/**
* The uint64 value.
*
* @generated from field: uint64 value = 1;
*/
value = protoInt64.zero;
constructor(data?: PartialMessage<UInt64Value>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.UINT64, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.UINT64, json);
} catch (e) {
let m = `cannot decode message google.protobuf.UInt64Value from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.UInt64Value";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
]);
static readonly fieldWrapper = {
wrapField(value: bigint): UInt64Value {
return new UInt64Value({value});
},
unwrapField(value: UInt64Value): bigint {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UInt64Value {
return new UInt64Value().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UInt64Value {
return new UInt64Value().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UInt64Value {
return new UInt64Value().fromJsonString(jsonString, options);
}
static equals(a: UInt64Value | PlainMessage<UInt64Value> | undefined, b: UInt64Value | PlainMessage<UInt64Value> | undefined): boolean {
return proto3.util.equals(UInt64Value, a, b);
}
}
/**
* Wrapper message for `int32`.
*
* The JSON representation for `Int32Value` is JSON number.
*
* @generated from message google.protobuf.Int32Value
*/
export class Int32Value extends Message<Int32Value> {
/**
* The int32 value.
*
* @generated from field: int32 value = 1;
*/
value = 0;
constructor(data?: PartialMessage<Int32Value>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.INT32, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.INT32, json);
} catch (e) {
let m = `cannot decode message google.protobuf.Int32Value from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.Int32Value";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
]);
static readonly fieldWrapper = {
wrapField(value: number): Int32Value {
return new Int32Value({value});
},
unwrapField(value: Int32Value): number {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Int32Value {
return new Int32Value().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Int32Value {
return new Int32Value().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Int32Value {
return new Int32Value().fromJsonString(jsonString, options);
}
static equals(a: Int32Value | PlainMessage<Int32Value> | undefined, b: Int32Value | PlainMessage<Int32Value> | undefined): boolean {
return proto3.util.equals(Int32Value, a, b);
}
}
/**
* Wrapper message for `uint32`.
*
* The JSON representation for `UInt32Value` is JSON number.
*
* @generated from message google.protobuf.UInt32Value
*/
export class UInt32Value extends Message<UInt32Value> {
/**
* The uint32 value.
*
* @generated from field: uint32 value = 1;
*/
value = 0;
constructor(data?: PartialMessage<UInt32Value>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.UINT32, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.UINT32, json);
} catch (e) {
let m = `cannot decode message google.protobuf.UInt32Value from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.UInt32Value";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
]);
static readonly fieldWrapper = {
wrapField(value: number): UInt32Value {
return new UInt32Value({value});
},
unwrapField(value: UInt32Value): number {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UInt32Value {
return new UInt32Value().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UInt32Value {
return new UInt32Value().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UInt32Value {
return new UInt32Value().fromJsonString(jsonString, options);
}
static equals(a: UInt32Value | PlainMessage<UInt32Value> | undefined, b: UInt32Value | PlainMessage<UInt32Value> | undefined): boolean {
return proto3.util.equals(UInt32Value, a, b);
}
}
/**
* Wrapper message for `bool`.
*
* The JSON representation for `BoolValue` is JSON `true` and `false`.
*
* @generated from message google.protobuf.BoolValue
*/
export class BoolValue extends Message<BoolValue> {
/**
* The bool value.
*
* @generated from field: bool value = 1;
*/
value = false;
constructor(data?: PartialMessage<BoolValue>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.BOOL, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.BOOL, json);
} catch (e) {
let m = `cannot decode message google.protobuf.BoolValue from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.BoolValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
]);
static readonly fieldWrapper = {
wrapField(value: boolean): BoolValue {
return new BoolValue({value});
},
unwrapField(value: BoolValue): boolean {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BoolValue {
return new BoolValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BoolValue {
return new BoolValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BoolValue {
return new BoolValue().fromJsonString(jsonString, options);
}
static equals(a: BoolValue | PlainMessage<BoolValue> | undefined, b: BoolValue | PlainMessage<BoolValue> | undefined): boolean {
return proto3.util.equals(BoolValue, a, b);
}
}
/**
* Wrapper message for `string`.
*
* The JSON representation for `StringValue` is JSON string.
*
* @generated from message google.protobuf.StringValue
*/
export class StringValue extends Message<StringValue> {
/**
* The string value.
*
* @generated from field: string value = 1;
*/
value = "";
constructor(data?: PartialMessage<StringValue>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.STRING, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.STRING, json);
} catch (e) {
let m = `cannot decode message google.protobuf.StringValue from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.StringValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static readonly fieldWrapper = {
wrapField(value: string): StringValue {
return new StringValue({value});
},
unwrapField(value: StringValue): string {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): StringValue {
return new StringValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): StringValue {
return new StringValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): StringValue {
return new StringValue().fromJsonString(jsonString, options);
}
static equals(a: StringValue | PlainMessage<StringValue> | undefined, b: StringValue | PlainMessage<StringValue> | undefined): boolean {
return proto3.util.equals(StringValue, a, b);
}
}
/**
* Wrapper message for `bytes`.
*
* The JSON representation for `BytesValue` is JSON string.
*
* @generated from message google.protobuf.BytesValue
*/
export class BytesValue extends Message<BytesValue> {
/**
* The bytes value.
*
* @generated from field: bytes value = 1;
*/
value = new Uint8Array(0);
constructor(data?: PartialMessage<BytesValue>) {
super();
proto3.util.initPartial(data, this);
}
override toJson(options?: Partial<JsonWriteOptions>): JsonValue {
return proto3.json.writeScalar(ScalarType.BYTES, this.value, true)!;
}
override fromJson(json: JsonValue, options?: Partial<JsonReadOptions>): this {
try {
this.value = proto3.json.readScalar(ScalarType.BYTES, json);
} catch (e) {
let m = `cannot decode message google.protobuf.BytesValue from JSON"`;
if (e instanceof Error && e.message.length > 0) {
m += `: ${e.message}`
}
throw new Error(m);
}
return this;
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.protobuf.BytesValue";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
]);
static readonly fieldWrapper = {
wrapField(value: Uint8Array): BytesValue {
return new BytesValue({value});
},
unwrapField(value: BytesValue): Uint8Array {
return value.value;
}
};
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BytesValue {
return new BytesValue().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BytesValue {
return new BytesValue().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BytesValue {
return new BytesValue().fromJsonString(jsonString, options);
}
static equals(a: BytesValue | PlainMessage<BytesValue> | undefined, b: BytesValue | PlainMessage<BytesValue> | undefined): boolean {
return proto3.util.equals(BytesValue, a, b);
}
}

275
google/rpc/code_pb.ts Normal file
View File

@@ -0,0 +1,275 @@
// Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/rpc/code.proto (package google.rpc, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { proto3 } from "@bufbuild/protobuf";
/**
* The canonical error codes for Google APIs.
*
*
* Sometimes multiple error codes may apply. Services should return
* the most specific error code that applies. For example, prefer
* `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
* Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
*
* @generated from enum google.rpc.Code
*/
export enum Code {
/**
* Not an error; returned on success
*
* HTTP Mapping: 200 OK
*
* @generated from enum value: OK = 0;
*/
OK = 0,
/**
* The operation was cancelled, typically by the caller.
*
* HTTP Mapping: 499 Client Closed Request
*
* @generated from enum value: CANCELLED = 1;
*/
CANCELLED = 1,
/**
* Unknown error. For example, this error may be returned when
* a `Status` value received from another address space belongs to
* an error space that is not known in this address space. Also
* errors raised by APIs that do not return enough error information
* may be converted to this error.
*
* HTTP Mapping: 500 Internal Server Error
*
* @generated from enum value: UNKNOWN = 2;
*/
UNKNOWN = 2,
/**
* The client specified an invalid argument. Note that this differs
* from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
* that are problematic regardless of the state of the system
* (e.g., a malformed file name).
*
* HTTP Mapping: 400 Bad Request
*
* @generated from enum value: INVALID_ARGUMENT = 3;
*/
INVALID_ARGUMENT = 3,
/**
* The deadline expired before the operation could complete. For operations
* that change the state of the system, this error may be returned
* even if the operation has completed successfully. For example, a
* successful response from a server could have been delayed long
* enough for the deadline to expire.
*
* HTTP Mapping: 504 Gateway Timeout
*
* @generated from enum value: DEADLINE_EXCEEDED = 4;
*/
DEADLINE_EXCEEDED = 4,
/**
* Some requested entity (e.g., file or directory) was not found.
*
* Note to server developers: if a request is denied for an entire class
* of users, such as gradual feature rollout or undocumented whitelist,
* `NOT_FOUND` may be used. If a request is denied for some users within
* a class of users, such as user-based access control, `PERMISSION_DENIED`
* must be used.
*
* HTTP Mapping: 404 Not Found
*
* @generated from enum value: NOT_FOUND = 5;
*/
NOT_FOUND = 5,
/**
* The entity that a client attempted to create (e.g., file or directory)
* already exists.
*
* HTTP Mapping: 409 Conflict
*
* @generated from enum value: ALREADY_EXISTS = 6;
*/
ALREADY_EXISTS = 6,
/**
* The caller does not have permission to execute the specified
* operation. `PERMISSION_DENIED` must not be used for rejections
* caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
* instead for those errors). `PERMISSION_DENIED` must not be
* used if the caller can not be identified (use `UNAUTHENTICATED`
* instead for those errors). This error code does not imply the
* request is valid or the requested entity exists or satisfies
* other pre-conditions.
*
* HTTP Mapping: 403 Forbidden
*
* @generated from enum value: PERMISSION_DENIED = 7;
*/
PERMISSION_DENIED = 7,
/**
* The request does not have valid authentication credentials for the
* operation.
*
* HTTP Mapping: 401 Unauthorized
*
* @generated from enum value: UNAUTHENTICATED = 16;
*/
UNAUTHENTICATED = 16,
/**
* Some resource has been exhausted, perhaps a per-user quota, or
* perhaps the entire file system is out of space.
*
* HTTP Mapping: 429 Too Many Requests
*
* @generated from enum value: RESOURCE_EXHAUSTED = 8;
*/
RESOURCE_EXHAUSTED = 8,
/**
* The operation was rejected because the system is not in a state
* required for the operation's execution. For example, the directory
* to be deleted is non-empty, an rmdir operation is applied to
* a non-directory, etc.
*
* Service implementors can use the following guidelines to decide
* between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
* (a) Use `UNAVAILABLE` if the client can retry just the failing call.
* (b) Use `ABORTED` if the client should retry at a higher level
* (e.g., when a client-specified test-and-set fails, indicating the
* client should restart a read-modify-write sequence).
* (c) Use `FAILED_PRECONDITION` if the client should not retry until
* the system state has been explicitly fixed. E.g., if an "rmdir"
* fails because the directory is non-empty, `FAILED_PRECONDITION`
* should be returned since the client should not retry unless
* the files are deleted from the directory.
*
* HTTP Mapping: 400 Bad Request
*
* @generated from enum value: FAILED_PRECONDITION = 9;
*/
FAILED_PRECONDITION = 9,
/**
* The operation was aborted, typically due to a concurrency issue such as
* a sequencer check failure or transaction abort.
*
* See the guidelines above for deciding between `FAILED_PRECONDITION`,
* `ABORTED`, and `UNAVAILABLE`.
*
* HTTP Mapping: 409 Conflict
*
* @generated from enum value: ABORTED = 10;
*/
ABORTED = 10,
/**
* The operation was attempted past the valid range. E.g., seeking or
* reading past end-of-file.
*
* Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
* be fixed if the system state changes. For example, a 32-bit file
* system will generate `INVALID_ARGUMENT` if asked to read at an
* offset that is not in the range [0,2^32-1], but it will generate
* `OUT_OF_RANGE` if asked to read from an offset past the current
* file size.
*
* There is a fair bit of overlap between `FAILED_PRECONDITION` and
* `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
* error) when it applies so that callers who are iterating through
* a space can easily look for an `OUT_OF_RANGE` error to detect when
* they are done.
*
* HTTP Mapping: 400 Bad Request
*
* @generated from enum value: OUT_OF_RANGE = 11;
*/
OUT_OF_RANGE = 11,
/**
* The operation is not implemented or is not supported/enabled in this
* service.
*
* HTTP Mapping: 501 Not Implemented
*
* @generated from enum value: UNIMPLEMENTED = 12;
*/
UNIMPLEMENTED = 12,
/**
* Internal errors. This means that some invariants expected by the
* underlying system have been broken. This error code is reserved
* for serious errors.
*
* HTTP Mapping: 500 Internal Server Error
*
* @generated from enum value: INTERNAL = 13;
*/
INTERNAL = 13,
/**
* The service is currently unavailable. This is most likely a
* transient condition, which can be corrected by retrying with
* a backoff.
*
* See the guidelines above for deciding between `FAILED_PRECONDITION`,
* `ABORTED`, and `UNAVAILABLE`.
*
* HTTP Mapping: 503 Service Unavailable
*
* @generated from enum value: UNAVAILABLE = 14;
*/
UNAVAILABLE = 14,
/**
* Unrecoverable data loss or corruption.
*
* HTTP Mapping: 500 Internal Server Error
*
* @generated from enum value: DATA_LOSS = 15;
*/
DATA_LOSS = 15,
}
// Retrieve enum metadata with: proto3.getEnumType(Code)
proto3.util.setEnumType(Code, "google.rpc.Code", [
{ no: 0, name: "OK" },
{ no: 1, name: "CANCELLED" },
{ no: 2, name: "UNKNOWN" },
{ no: 3, name: "INVALID_ARGUMENT" },
{ no: 4, name: "DEADLINE_EXCEEDED" },
{ no: 5, name: "NOT_FOUND" },
{ no: 6, name: "ALREADY_EXISTS" },
{ no: 7, name: "PERMISSION_DENIED" },
{ no: 16, name: "UNAUTHENTICATED" },
{ no: 8, name: "RESOURCE_EXHAUSTED" },
{ no: 9, name: "FAILED_PRECONDITION" },
{ no: 10, name: "ABORTED" },
{ no: 11, name: "OUT_OF_RANGE" },
{ no: 12, name: "UNIMPLEMENTED" },
{ no: 13, name: "INTERNAL" },
{ no: 14, name: "UNAVAILABLE" },
{ no: 15, name: "DATA_LOSS" },
]);

View File

@@ -0,0 +1,707 @@
// Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/rpc/error_details.proto (package google.rpc, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { Duration } from "../protobuf/duration_pb.js";
/**
* Describes when the clients can retry a failed request. Clients could ignore
* the recommendation here or retry when this information is missing from error
* responses.
*
* It's always recommended that clients should use exponential backoff when
* retrying.
*
* Clients should wait until `retry_delay` amount of time has passed since
* receiving the error response before retrying. If retrying requests also
* fail, clients should use an exponential backoff scheme to gradually increase
* the delay between retries based on `retry_delay`, until either a maximum
* number of retires have been reached or a maximum retry delay cap has been
* reached.
*
* @generated from message google.rpc.RetryInfo
*/
export class RetryInfo extends Message<RetryInfo> {
/**
* Clients should wait at least this long between retrying the same request.
*
* @generated from field: google.protobuf.Duration retry_delay = 1;
*/
retryDelay?: Duration;
constructor(data?: PartialMessage<RetryInfo>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.RetryInfo";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "retry_delay", kind: "message", T: Duration },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RetryInfo {
return new RetryInfo().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RetryInfo {
return new RetryInfo().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RetryInfo {
return new RetryInfo().fromJsonString(jsonString, options);
}
static equals(a: RetryInfo | PlainMessage<RetryInfo> | undefined, b: RetryInfo | PlainMessage<RetryInfo> | undefined): boolean {
return proto3.util.equals(RetryInfo, a, b);
}
}
/**
* Describes additional debugging info.
*
* @generated from message google.rpc.DebugInfo
*/
export class DebugInfo extends Message<DebugInfo> {
/**
* The stack trace entries indicating where the error occurred.
*
* @generated from field: repeated string stack_entries = 1;
*/
stackEntries: string[] = [];
/**
* Additional debugging information provided by the server.
*
* @generated from field: string detail = 2;
*/
detail = "";
constructor(data?: PartialMessage<DebugInfo>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.DebugInfo";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "stack_entries", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
{ no: 2, name: "detail", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DebugInfo {
return new DebugInfo().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DebugInfo {
return new DebugInfo().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DebugInfo {
return new DebugInfo().fromJsonString(jsonString, options);
}
static equals(a: DebugInfo | PlainMessage<DebugInfo> | undefined, b: DebugInfo | PlainMessage<DebugInfo> | undefined): boolean {
return proto3.util.equals(DebugInfo, a, b);
}
}
/**
* Describes how a quota check failed.
*
* For example if a daily limit was exceeded for the calling project,
* a service could respond with a QuotaFailure detail containing the project
* id and the description of the quota limit that was exceeded. If the
* calling project hasn't enabled the service in the developer console, then
* a service could respond with the project id and set `service_disabled`
* to true.
*
* Also see RetryDetail and Help types for other details about handling a
* quota failure.
*
* @generated from message google.rpc.QuotaFailure
*/
export class QuotaFailure extends Message<QuotaFailure> {
/**
* Describes all quota violations.
*
* @generated from field: repeated google.rpc.QuotaFailure.Violation violations = 1;
*/
violations: QuotaFailure_Violation[] = [];
constructor(data?: PartialMessage<QuotaFailure>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.QuotaFailure";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "violations", kind: "message", T: QuotaFailure_Violation, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QuotaFailure {
return new QuotaFailure().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QuotaFailure {
return new QuotaFailure().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QuotaFailure {
return new QuotaFailure().fromJsonString(jsonString, options);
}
static equals(a: QuotaFailure | PlainMessage<QuotaFailure> | undefined, b: QuotaFailure | PlainMessage<QuotaFailure> | undefined): boolean {
return proto3.util.equals(QuotaFailure, a, b);
}
}
/**
* A message type used to describe a single quota violation. For example, a
* daily quota or a custom quota that was exceeded.
*
* @generated from message google.rpc.QuotaFailure.Violation
*/
export class QuotaFailure_Violation extends Message<QuotaFailure_Violation> {
/**
* The subject on which the quota check failed.
* For example, "clientip:<ip address of client>" or "project:<Google
* developer project id>".
*
* @generated from field: string subject = 1;
*/
subject = "";
/**
* A description of how the quota check failed. Clients can use this
* description to find more about the quota configuration in the service's
* public documentation, or find the relevant quota limit to adjust through
* developer console.
*
* For example: "Service disabled" or "Daily Limit for read operations
* exceeded".
*
* @generated from field: string description = 2;
*/
description = "";
constructor(data?: PartialMessage<QuotaFailure_Violation>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.QuotaFailure.Violation";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "subject", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QuotaFailure_Violation {
return new QuotaFailure_Violation().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QuotaFailure_Violation {
return new QuotaFailure_Violation().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QuotaFailure_Violation {
return new QuotaFailure_Violation().fromJsonString(jsonString, options);
}
static equals(a: QuotaFailure_Violation | PlainMessage<QuotaFailure_Violation> | undefined, b: QuotaFailure_Violation | PlainMessage<QuotaFailure_Violation> | undefined): boolean {
return proto3.util.equals(QuotaFailure_Violation, a, b);
}
}
/**
* Describes what preconditions have failed.
*
* For example, if an RPC failed because it required the Terms of Service to be
* acknowledged, it could list the terms of service violation in the
* PreconditionFailure message.
*
* @generated from message google.rpc.PreconditionFailure
*/
export class PreconditionFailure extends Message<PreconditionFailure> {
/**
* Describes all precondition violations.
*
* @generated from field: repeated google.rpc.PreconditionFailure.Violation violations = 1;
*/
violations: PreconditionFailure_Violation[] = [];
constructor(data?: PartialMessage<PreconditionFailure>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.PreconditionFailure";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "violations", kind: "message", T: PreconditionFailure_Violation, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PreconditionFailure {
return new PreconditionFailure().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PreconditionFailure {
return new PreconditionFailure().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PreconditionFailure {
return new PreconditionFailure().fromJsonString(jsonString, options);
}
static equals(a: PreconditionFailure | PlainMessage<PreconditionFailure> | undefined, b: PreconditionFailure | PlainMessage<PreconditionFailure> | undefined): boolean {
return proto3.util.equals(PreconditionFailure, a, b);
}
}
/**
* A message type used to describe a single precondition failure.
*
* @generated from message google.rpc.PreconditionFailure.Violation
*/
export class PreconditionFailure_Violation extends Message<PreconditionFailure_Violation> {
/**
* The type of PreconditionFailure. We recommend using a service-specific
* enum type to define the supported precondition violation types. For
* example, "TOS" for "Terms of Service violation".
*
* @generated from field: string type = 1;
*/
type = "";
/**
* The subject, relative to the type, that failed.
* For example, "google.com/cloud" relative to the "TOS" type would
* indicate which terms of service is being referenced.
*
* @generated from field: string subject = 2;
*/
subject = "";
/**
* A description of how the precondition failed. Developers can use this
* description to understand how to fix the failure.
*
* For example: "Terms of service not accepted".
*
* @generated from field: string description = 3;
*/
description = "";
constructor(data?: PartialMessage<PreconditionFailure_Violation>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.PreconditionFailure.Violation";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "subject", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PreconditionFailure_Violation {
return new PreconditionFailure_Violation().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PreconditionFailure_Violation {
return new PreconditionFailure_Violation().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PreconditionFailure_Violation {
return new PreconditionFailure_Violation().fromJsonString(jsonString, options);
}
static equals(a: PreconditionFailure_Violation | PlainMessage<PreconditionFailure_Violation> | undefined, b: PreconditionFailure_Violation | PlainMessage<PreconditionFailure_Violation> | undefined): boolean {
return proto3.util.equals(PreconditionFailure_Violation, a, b);
}
}
/**
* Describes violations in a client request. This error type focuses on the
* syntactic aspects of the request.
*
* @generated from message google.rpc.BadRequest
*/
export class BadRequest extends Message<BadRequest> {
/**
* Describes all violations in a client request.
*
* @generated from field: repeated google.rpc.BadRequest.FieldViolation field_violations = 1;
*/
fieldViolations: BadRequest_FieldViolation[] = [];
constructor(data?: PartialMessage<BadRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.BadRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "field_violations", kind: "message", T: BadRequest_FieldViolation, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BadRequest {
return new BadRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BadRequest {
return new BadRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BadRequest {
return new BadRequest().fromJsonString(jsonString, options);
}
static equals(a: BadRequest | PlainMessage<BadRequest> | undefined, b: BadRequest | PlainMessage<BadRequest> | undefined): boolean {
return proto3.util.equals(BadRequest, a, b);
}
}
/**
* A message type used to describe a single bad request field.
*
* @generated from message google.rpc.BadRequest.FieldViolation
*/
export class BadRequest_FieldViolation extends Message<BadRequest_FieldViolation> {
/**
* A path leading to a field in the request body. The value will be a
* sequence of dot-separated identifiers that identify a protocol buffer
* field. E.g., "field_violations.field" would identify this field.
*
* @generated from field: string field = 1;
*/
field = "";
/**
* A description of why the request element is bad.
*
* @generated from field: string description = 2;
*/
description = "";
constructor(data?: PartialMessage<BadRequest_FieldViolation>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.BadRequest.FieldViolation";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "field", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): BadRequest_FieldViolation {
return new BadRequest_FieldViolation().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): BadRequest_FieldViolation {
return new BadRequest_FieldViolation().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BadRequest_FieldViolation {
return new BadRequest_FieldViolation().fromJsonString(jsonString, options);
}
static equals(a: BadRequest_FieldViolation | PlainMessage<BadRequest_FieldViolation> | undefined, b: BadRequest_FieldViolation | PlainMessage<BadRequest_FieldViolation> | undefined): boolean {
return proto3.util.equals(BadRequest_FieldViolation, a, b);
}
}
/**
* Contains metadata about the request that clients can attach when filing a bug
* or providing other forms of feedback.
*
* @generated from message google.rpc.RequestInfo
*/
export class RequestInfo extends Message<RequestInfo> {
/**
* An opaque string that should only be interpreted by the service generating
* it. For example, it can be used to identify requests in the service's logs.
*
* @generated from field: string request_id = 1;
*/
requestId = "";
/**
* Any data that was used to serve this request. For example, an encrypted
* stack trace that can be sent back to the service provider for debugging.
*
* @generated from field: string serving_data = 2;
*/
servingData = "";
constructor(data?: PartialMessage<RequestInfo>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.RequestInfo";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "serving_data", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RequestInfo {
return new RequestInfo().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RequestInfo {
return new RequestInfo().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RequestInfo {
return new RequestInfo().fromJsonString(jsonString, options);
}
static equals(a: RequestInfo | PlainMessage<RequestInfo> | undefined, b: RequestInfo | PlainMessage<RequestInfo> | undefined): boolean {
return proto3.util.equals(RequestInfo, a, b);
}
}
/**
* Describes the resource that is being accessed.
*
* @generated from message google.rpc.ResourceInfo
*/
export class ResourceInfo extends Message<ResourceInfo> {
/**
* A name for the type of resource being accessed, e.g. "sql table",
* "cloud storage bucket", "file", "Google calendar"; or the type URL
* of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
*
* @generated from field: string resource_type = 1;
*/
resourceType = "";
/**
* The name of the resource being accessed. For example, a shared calendar
* name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
* error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
*
* @generated from field: string resource_name = 2;
*/
resourceName = "";
/**
* The owner of the resource (optional).
* For example, "user:<owner email>" or "project:<Google developer project
* id>".
*
* @generated from field: string owner = 3;
*/
owner = "";
/**
* Describes what error is encountered when accessing this resource.
* For example, updating a cloud project may require the `writer` permission
* on the developer console project.
*
* @generated from field: string description = 4;
*/
description = "";
constructor(data?: PartialMessage<ResourceInfo>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.ResourceInfo";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "resource_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "resource_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "owner", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ResourceInfo {
return new ResourceInfo().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ResourceInfo {
return new ResourceInfo().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ResourceInfo {
return new ResourceInfo().fromJsonString(jsonString, options);
}
static equals(a: ResourceInfo | PlainMessage<ResourceInfo> | undefined, b: ResourceInfo | PlainMessage<ResourceInfo> | undefined): boolean {
return proto3.util.equals(ResourceInfo, a, b);
}
}
/**
* Provides links to documentation or for performing an out of band action.
*
* For example, if a quota check failed with an error indicating the calling
* project hasn't enabled the accessed service, this can contain a URL pointing
* directly to the right place in the developer console to flip the bit.
*
* @generated from message google.rpc.Help
*/
export class Help extends Message<Help> {
/**
* URL(s) pointing to additional information on handling the current error.
*
* @generated from field: repeated google.rpc.Help.Link links = 1;
*/
links: Help_Link[] = [];
constructor(data?: PartialMessage<Help>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.Help";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "links", kind: "message", T: Help_Link, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Help {
return new Help().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Help {
return new Help().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Help {
return new Help().fromJsonString(jsonString, options);
}
static equals(a: Help | PlainMessage<Help> | undefined, b: Help | PlainMessage<Help> | undefined): boolean {
return proto3.util.equals(Help, a, b);
}
}
/**
* Describes a URL link.
*
* @generated from message google.rpc.Help.Link
*/
export class Help_Link extends Message<Help_Link> {
/**
* Describes what the link offers.
*
* @generated from field: string description = 1;
*/
description = "";
/**
* The URL of the link.
*
* @generated from field: string url = 2;
*/
url = "";
constructor(data?: PartialMessage<Help_Link>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.Help.Link";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Help_Link {
return new Help_Link().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Help_Link {
return new Help_Link().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Help_Link {
return new Help_Link().fromJsonString(jsonString, options);
}
static equals(a: Help_Link | PlainMessage<Help_Link> | undefined, b: Help_Link | PlainMessage<Help_Link> | undefined): boolean {
return proto3.util.equals(Help_Link, a, b);
}
}
/**
* Provides a localized error message that is safe to return to the user
* which can be attached to an RPC error.
*
* @generated from message google.rpc.LocalizedMessage
*/
export class LocalizedMessage extends Message<LocalizedMessage> {
/**
* The locale used following the specification defined at
* http://www.rfc-editor.org/rfc/bcp/bcp47.txt.
* Examples are: "en-US", "fr-CH", "es-MX"
*
* @generated from field: string locale = 1;
*/
locale = "";
/**
* The localized error message in the above locale.
*
* @generated from field: string message = 2;
*/
message = "";
constructor(data?: PartialMessage<LocalizedMessage>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.LocalizedMessage";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "locale", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalizedMessage {
return new LocalizedMessage().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LocalizedMessage {
return new LocalizedMessage().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LocalizedMessage {
return new LocalizedMessage().fromJsonString(jsonString, options);
}
static equals(a: LocalizedMessage | PlainMessage<LocalizedMessage> | undefined, b: LocalizedMessage | PlainMessage<LocalizedMessage> | undefined): boolean {
return proto3.util.equals(LocalizedMessage, a, b);
}
}

134
google/rpc/status_pb.ts Normal file
View File

@@ -0,0 +1,134 @@
// Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file google/rpc/status.proto (package google.rpc, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { Any } from "../protobuf/any_pb.js";
/**
* The `Status` type defines a logical error model that is suitable for different
* programming environments, including REST APIs and RPC APIs. It is used by
* [gRPC](https://github.com/grpc). The error model is designed to be:
*
* - Simple to use and understand for most users
* - Flexible enough to meet unexpected needs
*
* # Overview
*
* The `Status` message contains three pieces of data: error code, error message,
* and error details. The error code should be an enum value of
* [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
* error message should be a developer-facing English message that helps
* developers *understand* and *resolve* the error. If a localized user-facing
* error message is needed, put the localized message in the error details or
* localize it in the client. The optional error details may contain arbitrary
* information about the error. There is a predefined set of error detail types
* in the package `google.rpc` that can be used for common error conditions.
*
* # Language mapping
*
* The `Status` message is the logical representation of the error model, but it
* is not necessarily the actual wire format. When the `Status` message is
* exposed in different client libraries and different wire protocols, it can be
* mapped differently. For example, it will likely be mapped to some exceptions
* in Java, but more likely mapped to some error codes in C.
*
* # Other uses
*
* The error model and the `Status` message can be used in a variety of
* environments, either with or without APIs, to provide a
* consistent developer experience across different environments.
*
* Example uses of this error model include:
*
* - Partial errors. If a service needs to return partial errors to the client,
* it may embed the `Status` in the normal response to indicate the partial
* errors.
*
* - Workflow errors. A typical workflow has multiple steps. Each step may
* have a `Status` message for error reporting.
*
* - Batch operations. If a client uses batch request and batch response, the
* `Status` message should be used directly inside batch response, one for
* each error sub-response.
*
* - Asynchronous operations. If an API call embeds asynchronous operation
* results in its response, the status of those operations should be
* represented directly using the `Status` message.
*
* - Logging. If some API errors are stored in logs, the message `Status` could
* be used directly after any stripping needed for security/privacy reasons.
*
* @generated from message google.rpc.Status
*/
export class Status extends Message<Status> {
/**
* The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
*
* @generated from field: int32 code = 1;
*/
code = 0;
/**
* A developer-facing error message, which should be in English. Any
* user-facing error message should be localized and sent in the
* [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
*
* @generated from field: string message = 2;
*/
message = "";
/**
* A list of messages that carry the error details. There is a common set of
* message types for APIs to use.
*
* @generated from field: repeated google.protobuf.Any details = 3;
*/
details: Any[] = [];
constructor(data?: PartialMessage<Status>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.rpc.Status";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "code", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
{ no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "details", kind: "message", T: Any, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Status {
return new Status().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Status {
return new Status().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Status {
return new Status().fromJsonString(jsonString, options);
}
static equals(a: Status | PlainMessage<Status> | undefined, b: Status | PlainMessage<Status> | undefined): boolean {
return proto3.util.equals(Status, a, b);
}
}

59
index.js Normal file
View File

@@ -0,0 +1,59 @@
// auto generated
import * as annotations_pb from './annotations_pb'
import * as counter_connect from './counter_connect'
import * as counter_pb from './counter_pb'
import * as openapiv2_pb from './openapiv2_pb'
import * as validate_pb from './validate_pb'
import * as visibility_pb from './visibility_pb'
import * as viz_composed_field_connect from './viz-composed-field_connect'
import * as viz_composed_field_pb from './viz-composed-field_pb'
import * as viz_dashboard_connect from './viz-dashboard_connect'
import * as viz_dashboard_pb from './viz-dashboard_pb'
import * as viz_default_view_connect from './viz-default-view_connect'
import * as viz_default_view_pb from './viz-default-view_pb'
import * as viz_motd_connect from './viz-motd_connect'
import * as viz_motd_pb from './viz-motd_pb'
import * as viz_organisation_settings_connect from './viz-organisation-settings_connect'
import * as viz_organisation_settings_pb from './viz-organisation-settings_pb'
import * as viz_project_settings_connect from './viz-project-settings_connect'
import * as viz_project_settings_pb from './viz-project-settings_pb'
import * as viz_tab_connect from './viz-tab_connect'
import * as viz_tab_pb from './viz-tab_pb'
import * as viz_translations_connect from './viz-translations_connect'
import * as viz_translations_pb from './viz-translations_pb'
import * as viz_user_settings_connect from './viz-user-settings_connect'
import * as viz_user_settings_pb from './viz-user-settings_pb'
import * as viz_view_connect from './viz-view_connect'
import * as viz_view_pb from './viz-view_pb'
export {
annotations_pb,
counter_connect,
counter_pb,
openapiv2_pb,
validate_pb,
visibility_pb,
viz_composed_field_connect,
viz_composed_field_pb,
viz_dashboard_connect,
viz_dashboard_pb,
viz_default_view_connect,
viz_default_view_pb,
viz_motd_connect,
viz_motd_pb,
viz_organisation_settings_connect,
viz_organisation_settings_pb,
viz_project_settings_connect,
viz_project_settings_pb,
viz_tab_connect,
viz_tab_pb,
viz_translations_connect,
viz_translations_pb,
viz_user_settings_connect,
viz_user_settings_pb,
viz_view_connect,
viz_view_pb,
}

1713
openapiv2_pb.ts Normal file

File diff suppressed because it is too large Load Diff

21
package.json Normal file
View File

@@ -0,0 +1,21 @@
{
"name": "@reflex-platform/npm-viz-sdk",
"version": "1.10.0-SNAPSHOT-250317130329",
"description": "npm libs from visibility model proto files",
"homepage": "",
"main": "index.js",
"repository": {
"type": "git",
"url": ""
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"npm",
"ts",
"grpc",
"proto3"
],
"license": "MIT"
}

2812
validate_pb.ts Normal file

File diff suppressed because it is too large Load Diff

219
visibility_pb.ts Normal file
View File

@@ -0,0 +1,219 @@
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file visibility.proto (package google.api, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { EnumOptions, EnumValueOptions, FieldOptions, MessageOptions, MethodOptions, ServiceOptions } from "./google/protobuf/descriptor_pb.js";
/**
* `Visibility` defines restrictions for the visibility of service
* elements. Restrictions are specified using visibility labels
* (e.g., PREVIEW) that are elsewhere linked to users and projects.
*
* Users and projects can have access to more than one visibility label. The
* effective visibility for multiple labels is the union of each label's
* elements, plus any unrestricted elements.
*
* If an element and its parents have no restrictions, visibility is
* unconditionally granted.
*
* Example:
*
* visibility:
* rules:
* - selector: google.calendar.Calendar.EnhancedSearch
* restriction: PREVIEW
* - selector: google.calendar.Calendar.Delegate
* restriction: INTERNAL
*
* Here, all methods are publicly visible except for the restricted methods
* EnhancedSearch and Delegate.
*
* @generated from message google.api.Visibility
*/
export class Visibility extends Message<Visibility> {
/**
* A list of visibility rules that apply to individual API elements.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
*
* @generated from field: repeated google.api.VisibilityRule rules = 1;
*/
rules: VisibilityRule[] = [];
constructor(data?: PartialMessage<Visibility>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.api.Visibility";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "rules", kind: "message", T: VisibilityRule, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Visibility {
return new Visibility().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Visibility {
return new Visibility().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Visibility {
return new Visibility().fromJsonString(jsonString, options);
}
static equals(a: Visibility | PlainMessage<Visibility> | undefined, b: Visibility | PlainMessage<Visibility> | undefined): boolean {
return proto3.util.equals(Visibility, a, b);
}
}
/**
* A visibility rule provides visibility configuration for an individual API
* element.
*
* @generated from message google.api.VisibilityRule
*/
export class VisibilityRule extends Message<VisibilityRule> {
/**
* Selects methods, messages, fields, enums, etc. to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
* @generated from field: string selector = 1;
*/
selector = "";
/**
* A comma-separated list of visibility labels that apply to the `selector`.
* Any of the listed labels can be used to grant the visibility.
*
* If a rule has multiple labels, removing one of the labels but not all of
* them can break clients.
*
* Example:
*
* visibility:
* rules:
* - selector: google.calendar.Calendar.EnhancedSearch
* restriction: INTERNAL, PREVIEW
*
* Removing INTERNAL from this restriction will break clients that rely on
* this method and only had access to it through INTERNAL.
*
* @generated from field: string restriction = 2;
*/
restriction = "";
constructor(data?: PartialMessage<VisibilityRule>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "google.api.VisibilityRule";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "selector", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "restriction", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VisibilityRule {
return new VisibilityRule().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VisibilityRule {
return new VisibilityRule().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VisibilityRule {
return new VisibilityRule().fromJsonString(jsonString, options);
}
static equals(a: VisibilityRule | PlainMessage<VisibilityRule> | undefined, b: VisibilityRule | PlainMessage<VisibilityRule> | undefined): boolean {
return proto3.util.equals(VisibilityRule, a, b);
}
}
/**
* See `VisibilityRule`.
*
* @generated from extension: google.api.VisibilityRule enum_visibility = 72295727;
*/
export const enum_visibility = proto3.makeExtension<EnumOptions, VisibilityRule>(
"google.api.enum_visibility",
EnumOptions,
() => ({ no: 72295727, kind: "message", T: VisibilityRule }),
);
/**
* See `VisibilityRule`.
*
* @generated from extension: google.api.VisibilityRule value_visibility = 72295727;
*/
export const value_visibility = proto3.makeExtension<EnumValueOptions, VisibilityRule>(
"google.api.value_visibility",
EnumValueOptions,
() => ({ no: 72295727, kind: "message", T: VisibilityRule }),
);
/**
* See `VisibilityRule`.
*
* @generated from extension: google.api.VisibilityRule field_visibility = 72295727;
*/
export const field_visibility = proto3.makeExtension<FieldOptions, VisibilityRule>(
"google.api.field_visibility",
FieldOptions,
() => ({ no: 72295727, kind: "message", T: VisibilityRule }),
);
/**
* See `VisibilityRule`.
*
* @generated from extension: google.api.VisibilityRule message_visibility = 72295727;
*/
export const message_visibility = proto3.makeExtension<MessageOptions, VisibilityRule>(
"google.api.message_visibility",
MessageOptions,
() => ({ no: 72295727, kind: "message", T: VisibilityRule }),
);
/**
* See `VisibilityRule`.
*
* @generated from extension: google.api.VisibilityRule method_visibility = 72295727;
*/
export const method_visibility = proto3.makeExtension<MethodOptions, VisibilityRule>(
"google.api.method_visibility",
MethodOptions,
() => ({ no: 72295727, kind: "message", T: VisibilityRule }),
);
/**
* See `VisibilityRule`.
*
* @generated from extension: google.api.VisibilityRule api_visibility = 72295727;
*/
export const api_visibility = proto3.makeExtension<ServiceOptions, VisibilityRule>(
"google.api.api_visibility",
ServiceOptions,
() => ({ no: 72295727, kind: "message", T: VisibilityRule }),
);

View File

@@ -0,0 +1,62 @@
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file viz-composed-field.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { CreateComposedFieldRequest, CreateComposedFieldResult, DeleteComposedFieldRequest, DeleteComposedFieldResult, GetComposedFieldRequest, GetComposedFieldResult, ListComposedFieldRequest, ListComposedFieldResult, UpdateComposedFieldRequest, UpdateComposedFieldResult } from "./viz-composed-field_pb.js";
import { MethodKind } from "@bufbuild/protobuf";
/**
* @generated from service vizapi.ComposedFieldService
*/
export const ComposedFieldService = {
typeName: "vizapi.ComposedFieldService",
methods: {
/**
* @generated from rpc vizapi.ComposedFieldService.Get
*/
get: {
name: "Get",
I: GetComposedFieldRequest,
O: GetComposedFieldResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ComposedFieldService.Create
*/
create: {
name: "Create",
I: CreateComposedFieldRequest,
O: CreateComposedFieldResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ComposedFieldService.Update
*/
update: {
name: "Update",
I: UpdateComposedFieldRequest,
O: UpdateComposedFieldResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ComposedFieldService.Delete
*/
delete: {
name: "Delete",
I: DeleteComposedFieldRequest,
O: DeleteComposedFieldResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ComposedFieldService.List
*/
list: {
name: "List",
I: ListComposedFieldRequest,
O: ListComposedFieldResult,
kind: MethodKind.Unary,
},
}
} as const;

610
viz-composed-field_pb.ts Normal file
View File

@@ -0,0 +1,610 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file viz-composed-field.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { RequestProjectHeader } from "./core/shared_pb.js";
/**
* @generated from message vizapi.ComposedField
*/
export class ComposedField extends Message<ComposedField> {
/**
* Identifier of the Composed Field
*
* @generated from field: string ComposedFieldID = 1;
*/
ComposedFieldID = "";
/**
* Name of the Composed Field
*
* @generated from field: string Name = 2;
*/
Name = "";
/**
* Identifier of the project
*
* @generated from field: string ProjectID = 3;
*/
ProjectID = "";
/**
* Identifier of the Screen
*
* @generated from field: string ScreenID = 4;
*/
ScreenID = "";
/**
* Identifier of the user who created
*
* @generated from field: string CreateUserID = 5;
*/
CreateUserID = "";
/**
* Identifier of the user who did the last update
*
* @generated from field: string UpdateUserID = 6;
*/
UpdateUserID = "";
/**
* Date of creation in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z]
*
* @generated from field: string CreateDateTime = 7;
*/
CreateDateTime = "";
/**
* Date of last update in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z]
*
* @generated from field: string UpdateDateTime = 8;
*/
UpdateDateTime = "";
/**
* Identifier of the Tab
*
* @generated from field: string TabID = 9;
*/
TabID = "";
/**
* Content in the Composed Field
*
* @generated from field: string Payload = 10;
*/
Payload = "";
constructor(data?: PartialMessage<ComposedField>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ComposedField";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ComposedFieldID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "ProjectID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "ScreenID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "CreateUserID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 6, name: "UpdateUserID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 7, name: "CreateDateTime", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 8, name: "UpdateDateTime", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 9, name: "TabID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 10, name: "Payload", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ComposedField {
return new ComposedField().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ComposedField {
return new ComposedField().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ComposedField {
return new ComposedField().fromJsonString(jsonString, options);
}
static equals(a: ComposedField | PlainMessage<ComposedField> | undefined, b: ComposedField | PlainMessage<ComposedField> | undefined): boolean {
return proto3.util.equals(ComposedField, a, b);
}
}
/**
* IDs of the Composed Field
*
* @generated from message vizapi.GetComposedFieldRequest
*/
export class GetComposedFieldRequest extends Message<GetComposedFieldRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Identifier of the Composed Field
*
* @generated from field: string ComposedFieldID = 2;
*/
ComposedFieldID = "";
constructor(data?: PartialMessage<GetComposedFieldRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetComposedFieldRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "ComposedFieldID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetComposedFieldRequest {
return new GetComposedFieldRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetComposedFieldRequest {
return new GetComposedFieldRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetComposedFieldRequest {
return new GetComposedFieldRequest().fromJsonString(jsonString, options);
}
static equals(a: GetComposedFieldRequest | PlainMessage<GetComposedFieldRequest> | undefined, b: GetComposedFieldRequest | PlainMessage<GetComposedFieldRequest> | undefined): boolean {
return proto3.util.equals(GetComposedFieldRequest, a, b);
}
}
/**
* All the Content about the composed field
*
* @generated from message vizapi.GetComposedFieldResult
*/
export class GetComposedFieldResult extends Message<GetComposedFieldResult> {
/**
* @generated from field: vizapi.ComposedField Result = 1;
*/
Result?: ComposedField;
constructor(data?: PartialMessage<GetComposedFieldResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetComposedFieldResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Result", kind: "message", T: ComposedField },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetComposedFieldResult {
return new GetComposedFieldResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetComposedFieldResult {
return new GetComposedFieldResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetComposedFieldResult {
return new GetComposedFieldResult().fromJsonString(jsonString, options);
}
static equals(a: GetComposedFieldResult | PlainMessage<GetComposedFieldResult> | undefined, b: GetComposedFieldResult | PlainMessage<GetComposedFieldResult> | undefined): boolean {
return proto3.util.equals(GetComposedFieldResult, a, b);
}
}
/**
* Content that needs to be stored
*
* @generated from message vizapi.CreateComposedFieldRequest
*/
export class CreateComposedFieldRequest extends Message<CreateComposedFieldRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Name of the Composed Field
*
* @generated from field: string Name = 2;
*/
Name = "";
/**
* Identifier of the Screen
*
* @generated from field: string ScreenID = 3;
*/
ScreenID = "";
/**
* Identifier of the Tab
*
* @generated from field: string TabID = 4;
*/
TabID = "";
/**
* Content in the Composed Field
*
* @generated from field: string Payload = 5;
*/
Payload = "";
constructor(data?: PartialMessage<CreateComposedFieldRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.CreateComposedFieldRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "ScreenID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "TabID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "Payload", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateComposedFieldRequest {
return new CreateComposedFieldRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateComposedFieldRequest {
return new CreateComposedFieldRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateComposedFieldRequest {
return new CreateComposedFieldRequest().fromJsonString(jsonString, options);
}
static equals(a: CreateComposedFieldRequest | PlainMessage<CreateComposedFieldRequest> | undefined, b: CreateComposedFieldRequest | PlainMessage<CreateComposedFieldRequest> | undefined): boolean {
return proto3.util.equals(CreateComposedFieldRequest, a, b);
}
}
/**
* ID of the created Composed Field
*
* @generated from message vizapi.CreateComposedFieldResult
*/
export class CreateComposedFieldResult extends Message<CreateComposedFieldResult> {
/**
* Identifier of the Composed Field
*
* @generated from field: string ComposedFieldID = 1;
*/
ComposedFieldID = "";
constructor(data?: PartialMessage<CreateComposedFieldResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.CreateComposedFieldResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ComposedFieldID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateComposedFieldResult {
return new CreateComposedFieldResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateComposedFieldResult {
return new CreateComposedFieldResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateComposedFieldResult {
return new CreateComposedFieldResult().fromJsonString(jsonString, options);
}
static equals(a: CreateComposedFieldResult | PlainMessage<CreateComposedFieldResult> | undefined, b: CreateComposedFieldResult | PlainMessage<CreateComposedFieldResult> | undefined): boolean {
return proto3.util.equals(CreateComposedFieldResult, a, b);
}
}
/**
* Content that needs to be updated
*
* @generated from message vizapi.UpdateComposedFieldRequest
*/
export class UpdateComposedFieldRequest extends Message<UpdateComposedFieldRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Identifier of the Composed Field
*
* @generated from field: string ComposedFieldID = 2;
*/
ComposedFieldID = "";
/**
* Name of the Composed Field
*
* @generated from field: string Name = 3;
*/
Name = "";
/**
* Identifier of the Screen
*
* @generated from field: string ScreenID = 4;
*/
ScreenID = "";
/**
* Identifier of the Tab
*
* @generated from field: string TabID = 5;
*/
TabID = "";
/**
* Content in the Composed Field
*
* @generated from field: string Payload = 6;
*/
Payload = "";
constructor(data?: PartialMessage<UpdateComposedFieldRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.UpdateComposedFieldRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "ComposedFieldID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "ScreenID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "TabID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 6, name: "Payload", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateComposedFieldRequest {
return new UpdateComposedFieldRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateComposedFieldRequest {
return new UpdateComposedFieldRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateComposedFieldRequest {
return new UpdateComposedFieldRequest().fromJsonString(jsonString, options);
}
static equals(a: UpdateComposedFieldRequest | PlainMessage<UpdateComposedFieldRequest> | undefined, b: UpdateComposedFieldRequest | PlainMessage<UpdateComposedFieldRequest> | undefined): boolean {
return proto3.util.equals(UpdateComposedFieldRequest, a, b);
}
}
/**
* Updated dashboard ID
*
* @generated from message vizapi.UpdateComposedFieldResult
*/
export class UpdateComposedFieldResult extends Message<UpdateComposedFieldResult> {
/**
* Identifier of the Composed Field
*
* @generated from field: string ComposedFieldID = 1;
*/
ComposedFieldID = "";
constructor(data?: PartialMessage<UpdateComposedFieldResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.UpdateComposedFieldResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ComposedFieldID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateComposedFieldResult {
return new UpdateComposedFieldResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateComposedFieldResult {
return new UpdateComposedFieldResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateComposedFieldResult {
return new UpdateComposedFieldResult().fromJsonString(jsonString, options);
}
static equals(a: UpdateComposedFieldResult | PlainMessage<UpdateComposedFieldResult> | undefined, b: UpdateComposedFieldResult | PlainMessage<UpdateComposedFieldResult> | undefined): boolean {
return proto3.util.equals(UpdateComposedFieldResult, a, b);
}
}
/**
* IDs of the Composed Field to be deleted
*
* @generated from message vizapi.DeleteComposedFieldRequest
*/
export class DeleteComposedFieldRequest extends Message<DeleteComposedFieldRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Identifier of the Composed Field
*
* @generated from field: string ComposedFieldID = 2;
*/
ComposedFieldID = "";
constructor(data?: PartialMessage<DeleteComposedFieldRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteComposedFieldRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "ComposedFieldID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteComposedFieldRequest {
return new DeleteComposedFieldRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteComposedFieldRequest {
return new DeleteComposedFieldRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteComposedFieldRequest {
return new DeleteComposedFieldRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteComposedFieldRequest | PlainMessage<DeleteComposedFieldRequest> | undefined, b: DeleteComposedFieldRequest | PlainMessage<DeleteComposedFieldRequest> | undefined): boolean {
return proto3.util.equals(DeleteComposedFieldRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteComposedFieldResult
*/
export class DeleteComposedFieldResult extends Message<DeleteComposedFieldResult> {
constructor(data?: PartialMessage<DeleteComposedFieldResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteComposedFieldResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteComposedFieldResult {
return new DeleteComposedFieldResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteComposedFieldResult {
return new DeleteComposedFieldResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteComposedFieldResult {
return new DeleteComposedFieldResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteComposedFieldResult | PlainMessage<DeleteComposedFieldResult> | undefined, b: DeleteComposedFieldResult | PlainMessage<DeleteComposedFieldResult> | undefined): boolean {
return proto3.util.equals(DeleteComposedFieldResult, a, b);
}
}
/**
* @generated from message vizapi.ListComposedFieldRequest
*/
export class ListComposedFieldRequest extends Message<ListComposedFieldRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Identifier of the Screen
*
* @generated from field: string ScreenID = 2;
*/
ScreenID = "";
/**
* Identifier of the Tab
*
* @generated from field: string TabID = 3;
*/
TabID = "";
constructor(data?: PartialMessage<ListComposedFieldRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListComposedFieldRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "ScreenID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "TabID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListComposedFieldRequest {
return new ListComposedFieldRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListComposedFieldRequest {
return new ListComposedFieldRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListComposedFieldRequest {
return new ListComposedFieldRequest().fromJsonString(jsonString, options);
}
static equals(a: ListComposedFieldRequest | PlainMessage<ListComposedFieldRequest> | undefined, b: ListComposedFieldRequest | PlainMessage<ListComposedFieldRequest> | undefined): boolean {
return proto3.util.equals(ListComposedFieldRequest, a, b);
}
}
/**
* List of Composed Fields
*
* @generated from message vizapi.ListComposedFieldResult
*/
export class ListComposedFieldResult extends Message<ListComposedFieldResult> {
/**
* All Content in a Composed Field
*
* @generated from field: repeated vizapi.ComposedField Results = 1;
*/
Results: ComposedField[] = [];
constructor(data?: PartialMessage<ListComposedFieldResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListComposedFieldResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Results", kind: "message", T: ComposedField, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListComposedFieldResult {
return new ListComposedFieldResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListComposedFieldResult {
return new ListComposedFieldResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListComposedFieldResult {
return new ListComposedFieldResult().fromJsonString(jsonString, options);
}
static equals(a: ListComposedFieldResult | PlainMessage<ListComposedFieldResult> | undefined, b: ListComposedFieldResult | PlainMessage<ListComposedFieldResult> | undefined): boolean {
return proto3.util.equals(ListComposedFieldResult, a, b);
}
}

89
viz-dashboard_connect.ts Normal file
View File

@@ -0,0 +1,89 @@
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file viz-dashboard.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { CopyDashboardRequest, CopyDashboardResult, CreateDashboardRequest, CreateDashboardResult, DeleteDashboardRequest, DeleteDashboardResult, DeleteDashboardsForOrganisationRequest, DeleteDashboardsForOrganisationResult, DeleteDashboardsForProjectRequest, DeleteDashboardsForProjectResult, GetDashboardRequest, GetDashboardResult, ListDashboardRequest, ListDashboardResult, UpdateDashboardRequest, UpdateDashboardResult } from "./viz-dashboard_pb.js";
import { MethodKind } from "@bufbuild/protobuf";
/**
* @generated from service vizapi.DashboardService
*/
export const DashboardService = {
typeName: "vizapi.DashboardService",
methods: {
/**
* @generated from rpc vizapi.DashboardService.Create
*/
create: {
name: "Create",
I: CreateDashboardRequest,
O: CreateDashboardResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.DashboardService.List
*/
list: {
name: "List",
I: ListDashboardRequest,
O: ListDashboardResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.DashboardService.Delete
*/
delete: {
name: "Delete",
I: DeleteDashboardRequest,
O: DeleteDashboardResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.DashboardService.DeleteDashboardsForOrganisation
*/
deleteDashboardsForOrganisation: {
name: "DeleteDashboardsForOrganisation",
I: DeleteDashboardsForOrganisationRequest,
O: DeleteDashboardsForOrganisationResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.DashboardService.DeleteDashboardsForProject
*/
deleteDashboardsForProject: {
name: "DeleteDashboardsForProject",
I: DeleteDashboardsForProjectRequest,
O: DeleteDashboardsForProjectResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.DashboardService.Update
*/
update: {
name: "Update",
I: UpdateDashboardRequest,
O: UpdateDashboardResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.DashboardService.Get
*/
get: {
name: "Get",
I: GetDashboardRequest,
O: GetDashboardResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.DashboardService.Copy
*/
copy: {
name: "Copy",
I: CopyDashboardRequest,
O: CopyDashboardResult,
kind: MethodKind.Unary,
},
}
} as const;

814
viz-dashboard_pb.ts Normal file
View File

@@ -0,0 +1,814 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file viz-dashboard.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { BoolObject, Int32Object, RequestProjectHeader, StringObject } from "./core/shared_pb.js";
/**
* @generated from message vizapi.Dashboard
*/
export class Dashboard extends Message<Dashboard> {
/**
* Identifier of the Dashboard
*
* @generated from field: string DashboardID = 1;
*/
DashboardID = "";
/**
* Name of the Dashboard
*
* @generated from field: string Name = 2;
*/
Name = "";
/**
* All the widgets in Dashboard
*
* @generated from field: string Content = 3;
*/
Content = "";
/**
* Identifier of the user who created
*
* @generated from field: string CreateUserID = 4;
*/
CreateUserID = "";
/**
* Identifier of the user who did the last update
*
* @generated from field: string UpdateUserID = 5;
*/
UpdateUserID = "";
/**
* Date of creation in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z]
*
* @generated from field: string CreateDate = 6;
*/
CreateDate = "";
/**
* Date of last update in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z]
*
* @generated from field: string UpdateDate = 7;
*/
UpdateDate = "";
/**
* Visibility of the Dashboard
*
* @generated from field: bool IsPrivate = 8;
*/
IsPrivate = false;
/**
* @generated from field: int32 AutoRefresh = 12;
*/
AutoRefresh = 0;
constructor(data?: PartialMessage<Dashboard>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.Dashboard";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "DashboardID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Content", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "CreateUserID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "UpdateUserID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 6, name: "CreateDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 7, name: "UpdateDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 8, name: "IsPrivate", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 12, name: "AutoRefresh", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Dashboard {
return new Dashboard().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Dashboard {
return new Dashboard().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Dashboard {
return new Dashboard().fromJsonString(jsonString, options);
}
static equals(a: Dashboard | PlainMessage<Dashboard> | undefined, b: Dashboard | PlainMessage<Dashboard> | undefined): boolean {
return proto3.util.equals(Dashboard, a, b);
}
}
/**
* @generated from message vizapi.ListDashboardRequest
*/
export class ListDashboardRequest extends Message<ListDashboardRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
constructor(data?: PartialMessage<ListDashboardRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListDashboardRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListDashboardRequest {
return new ListDashboardRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListDashboardRequest {
return new ListDashboardRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListDashboardRequest {
return new ListDashboardRequest().fromJsonString(jsonString, options);
}
static equals(a: ListDashboardRequest | PlainMessage<ListDashboardRequest> | undefined, b: ListDashboardRequest | PlainMessage<ListDashboardRequest> | undefined): boolean {
return proto3.util.equals(ListDashboardRequest, a, b);
}
}
/**
* List of Dashboards
*
* @generated from message vizapi.ListDashboardResult
*/
export class ListDashboardResult extends Message<ListDashboardResult> {
/**
* All information in a Dashboard
*
* @generated from field: repeated vizapi.Dashboard Results = 1;
*/
Results: Dashboard[] = [];
constructor(data?: PartialMessage<ListDashboardResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListDashboardResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Results", kind: "message", T: Dashboard, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListDashboardResult {
return new ListDashboardResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListDashboardResult {
return new ListDashboardResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListDashboardResult {
return new ListDashboardResult().fromJsonString(jsonString, options);
}
static equals(a: ListDashboardResult | PlainMessage<ListDashboardResult> | undefined, b: ListDashboardResult | PlainMessage<ListDashboardResult> | undefined): boolean {
return proto3.util.equals(ListDashboardResult, a, b);
}
}
/**
* Information that needs to be stored
*
* @generated from message vizapi.CreateDashboardRequest
*/
export class CreateDashboardRequest extends Message<CreateDashboardRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Name of the Dashboard
*
* @generated from field: string Name = 2;
*/
Name = "";
/**
* All widgets in Dashboard
*
* @generated from field: string content = 3;
*/
content = "";
/**
* Visibility of the Dashboard
*
* @generated from field: bool IsPrivate = 4;
*/
IsPrivate = false;
/**
* @generated from field: int32 AutoRefresh = 8;
*/
AutoRefresh = 0;
constructor(data?: PartialMessage<CreateDashboardRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.CreateDashboardRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "content", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "IsPrivate", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 8, name: "AutoRefresh", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateDashboardRequest {
return new CreateDashboardRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateDashboardRequest {
return new CreateDashboardRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateDashboardRequest {
return new CreateDashboardRequest().fromJsonString(jsonString, options);
}
static equals(a: CreateDashboardRequest | PlainMessage<CreateDashboardRequest> | undefined, b: CreateDashboardRequest | PlainMessage<CreateDashboardRequest> | undefined): boolean {
return proto3.util.equals(CreateDashboardRequest, a, b);
}
}
/**
* Created Dashboard
*
* @generated from message vizapi.CreateDashboardResult
*/
export class CreateDashboardResult extends Message<CreateDashboardResult> {
/**
* @generated from field: vizapi.Dashboard Result = 1;
*/
Result?: Dashboard;
constructor(data?: PartialMessage<CreateDashboardResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.CreateDashboardResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Result", kind: "message", T: Dashboard },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateDashboardResult {
return new CreateDashboardResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateDashboardResult {
return new CreateDashboardResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateDashboardResult {
return new CreateDashboardResult().fromJsonString(jsonString, options);
}
static equals(a: CreateDashboardResult | PlainMessage<CreateDashboardResult> | undefined, b: CreateDashboardResult | PlainMessage<CreateDashboardResult> | undefined): boolean {
return proto3.util.equals(CreateDashboardResult, a, b);
}
}
/**
* IDs of the Dashboard to be deleted
*
* @generated from message vizapi.DeleteDashboardRequest
*/
export class DeleteDashboardRequest extends Message<DeleteDashboardRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Identifier of the Dashboard
*
* @generated from field: string DashboardID = 2;
*/
DashboardID = "";
constructor(data?: PartialMessage<DeleteDashboardRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteDashboardRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "DashboardID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteDashboardRequest {
return new DeleteDashboardRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteDashboardRequest {
return new DeleteDashboardRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteDashboardRequest {
return new DeleteDashboardRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteDashboardRequest | PlainMessage<DeleteDashboardRequest> | undefined, b: DeleteDashboardRequest | PlainMessage<DeleteDashboardRequest> | undefined): boolean {
return proto3.util.equals(DeleteDashboardRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteDashboardResult
*/
export class DeleteDashboardResult extends Message<DeleteDashboardResult> {
constructor(data?: PartialMessage<DeleteDashboardResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteDashboardResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteDashboardResult {
return new DeleteDashboardResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteDashboardResult {
return new DeleteDashboardResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteDashboardResult {
return new DeleteDashboardResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteDashboardResult | PlainMessage<DeleteDashboardResult> | undefined, b: DeleteDashboardResult | PlainMessage<DeleteDashboardResult> | undefined): boolean {
return proto3.util.equals(DeleteDashboardResult, a, b);
}
}
/**
* Organization identifier to delete the dashboards from
*
* @generated from message vizapi.DeleteDashboardsForOrganisationRequest
*/
export class DeleteDashboardsForOrganisationRequest extends Message<DeleteDashboardsForOrganisationRequest> {
/**
* Identifier of the Organization
*
* @generated from field: string OrganisationID = 2;
*/
OrganisationID = "";
constructor(data?: PartialMessage<DeleteDashboardsForOrganisationRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteDashboardsForOrganisationRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 2, name: "OrganisationID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteDashboardsForOrganisationRequest {
return new DeleteDashboardsForOrganisationRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteDashboardsForOrganisationRequest {
return new DeleteDashboardsForOrganisationRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteDashboardsForOrganisationRequest {
return new DeleteDashboardsForOrganisationRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteDashboardsForOrganisationRequest | PlainMessage<DeleteDashboardsForOrganisationRequest> | undefined, b: DeleteDashboardsForOrganisationRequest | PlainMessage<DeleteDashboardsForOrganisationRequest> | undefined): boolean {
return proto3.util.equals(DeleteDashboardsForOrganisationRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteDashboardsForOrganisationResult
*/
export class DeleteDashboardsForOrganisationResult extends Message<DeleteDashboardsForOrganisationResult> {
constructor(data?: PartialMessage<DeleteDashboardsForOrganisationResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteDashboardsForOrganisationResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteDashboardsForOrganisationResult {
return new DeleteDashboardsForOrganisationResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteDashboardsForOrganisationResult {
return new DeleteDashboardsForOrganisationResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteDashboardsForOrganisationResult {
return new DeleteDashboardsForOrganisationResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteDashboardsForOrganisationResult | PlainMessage<DeleteDashboardsForOrganisationResult> | undefined, b: DeleteDashboardsForOrganisationResult | PlainMessage<DeleteDashboardsForOrganisationResult> | undefined): boolean {
return proto3.util.equals(DeleteDashboardsForOrganisationResult, a, b);
}
}
/**
* Project identifier to delete the dashboards from
*
* @generated from message vizapi.DeleteDashboardsForProjectRequest
*/
export class DeleteDashboardsForProjectRequest extends Message<DeleteDashboardsForProjectRequest> {
/**
* Identifier of the Project
*
* @generated from field: string ProjectID = 1;
*/
ProjectID = "";
constructor(data?: PartialMessage<DeleteDashboardsForProjectRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteDashboardsForProjectRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ProjectID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteDashboardsForProjectRequest {
return new DeleteDashboardsForProjectRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteDashboardsForProjectRequest {
return new DeleteDashboardsForProjectRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteDashboardsForProjectRequest {
return new DeleteDashboardsForProjectRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteDashboardsForProjectRequest | PlainMessage<DeleteDashboardsForProjectRequest> | undefined, b: DeleteDashboardsForProjectRequest | PlainMessage<DeleteDashboardsForProjectRequest> | undefined): boolean {
return proto3.util.equals(DeleteDashboardsForProjectRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteDashboardsForProjectResult
*/
export class DeleteDashboardsForProjectResult extends Message<DeleteDashboardsForProjectResult> {
constructor(data?: PartialMessage<DeleteDashboardsForProjectResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteDashboardsForProjectResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteDashboardsForProjectResult {
return new DeleteDashboardsForProjectResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteDashboardsForProjectResult {
return new DeleteDashboardsForProjectResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteDashboardsForProjectResult {
return new DeleteDashboardsForProjectResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteDashboardsForProjectResult | PlainMessage<DeleteDashboardsForProjectResult> | undefined, b: DeleteDashboardsForProjectResult | PlainMessage<DeleteDashboardsForProjectResult> | undefined): boolean {
return proto3.util.equals(DeleteDashboardsForProjectResult, a, b);
}
}
/**
* Information that needs to be updated
*
* @generated from message vizapi.UpdateDashboardRequest
*/
export class UpdateDashboardRequest extends Message<UpdateDashboardRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Identifier of the Dashboard
*
* @generated from field: string DashboardID = 2;
*/
DashboardID = "";
/**
* Name of the Dashboard
*
* @generated from field: api.StringObject Name = 3;
*/
Name?: StringObject;
/**
* All the widgets in Dashboard
*
* @generated from field: api.StringObject Content = 4;
*/
Content?: StringObject;
/**
* Visibility of the Dashboard
*
* @generated from field: api.BoolObject IsPrivate = 5;
*/
IsPrivate?: BoolObject;
/**
* @generated from field: api.Int32Object AutoRefresh = 9;
*/
AutoRefresh?: Int32Object;
constructor(data?: PartialMessage<UpdateDashboardRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.UpdateDashboardRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "DashboardID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Name", kind: "message", T: StringObject },
{ no: 4, name: "Content", kind: "message", T: StringObject },
{ no: 5, name: "IsPrivate", kind: "message", T: BoolObject },
{ no: 9, name: "AutoRefresh", kind: "message", T: Int32Object },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateDashboardRequest {
return new UpdateDashboardRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateDashboardRequest {
return new UpdateDashboardRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateDashboardRequest {
return new UpdateDashboardRequest().fromJsonString(jsonString, options);
}
static equals(a: UpdateDashboardRequest | PlainMessage<UpdateDashboardRequest> | undefined, b: UpdateDashboardRequest | PlainMessage<UpdateDashboardRequest> | undefined): boolean {
return proto3.util.equals(UpdateDashboardRequest, a, b);
}
}
/**
* Updated Dashboard information
*
* @generated from message vizapi.UpdateDashboardResult
*/
export class UpdateDashboardResult extends Message<UpdateDashboardResult> {
/**
* @generated from field: vizapi.Dashboard Result = 1;
*/
Result?: Dashboard;
constructor(data?: PartialMessage<UpdateDashboardResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.UpdateDashboardResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Result", kind: "message", T: Dashboard },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateDashboardResult {
return new UpdateDashboardResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateDashboardResult {
return new UpdateDashboardResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateDashboardResult {
return new UpdateDashboardResult().fromJsonString(jsonString, options);
}
static equals(a: UpdateDashboardResult | PlainMessage<UpdateDashboardResult> | undefined, b: UpdateDashboardResult | PlainMessage<UpdateDashboardResult> | undefined): boolean {
return proto3.util.equals(UpdateDashboardResult, a, b);
}
}
/**
* IDs of the Dashboard
*
* @generated from message vizapi.GetDashboardRequest
*/
export class GetDashboardRequest extends Message<GetDashboardRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Identifier of the Dashboard
*
* @generated from field: string DashboardID = 2;
*/
DashboardID = "";
constructor(data?: PartialMessage<GetDashboardRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetDashboardRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "DashboardID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetDashboardRequest {
return new GetDashboardRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetDashboardRequest {
return new GetDashboardRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetDashboardRequest {
return new GetDashboardRequest().fromJsonString(jsonString, options);
}
static equals(a: GetDashboardRequest | PlainMessage<GetDashboardRequest> | undefined, b: GetDashboardRequest | PlainMessage<GetDashboardRequest> | undefined): boolean {
return proto3.util.equals(GetDashboardRequest, a, b);
}
}
/**
* All information about the Dashboard
*
* @generated from message vizapi.GetDashboardResult
*/
export class GetDashboardResult extends Message<GetDashboardResult> {
/**
* @generated from field: vizapi.Dashboard result = 1;
*/
result?: Dashboard;
constructor(data?: PartialMessage<GetDashboardResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetDashboardResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "result", kind: "message", T: Dashboard },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetDashboardResult {
return new GetDashboardResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetDashboardResult {
return new GetDashboardResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetDashboardResult {
return new GetDashboardResult().fromJsonString(jsonString, options);
}
static equals(a: GetDashboardResult | PlainMessage<GetDashboardResult> | undefined, b: GetDashboardResult | PlainMessage<GetDashboardResult> | undefined): boolean {
return proto3.util.equals(GetDashboardResult, a, b);
}
}
/**
* @generated from message vizapi.CopyDashboardRequest
*/
export class CopyDashboardRequest extends Message<CopyDashboardRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Identifier of the Dashboard
*
* @generated from field: string DashboardID = 2;
*/
DashboardID = "";
/**
* Name of the new Dashboard
*
* string OrganisationID = 4 [(validate.rules).string.min_len = 1];
*
* @generated from field: string Name = 3;
*/
Name = "";
constructor(data?: PartialMessage<CopyDashboardRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.CopyDashboardRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "DashboardID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CopyDashboardRequest {
return new CopyDashboardRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CopyDashboardRequest {
return new CopyDashboardRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CopyDashboardRequest {
return new CopyDashboardRequest().fromJsonString(jsonString, options);
}
static equals(a: CopyDashboardRequest | PlainMessage<CopyDashboardRequest> | undefined, b: CopyDashboardRequest | PlainMessage<CopyDashboardRequest> | undefined): boolean {
return proto3.util.equals(CopyDashboardRequest, a, b);
}
}
/**
* New copied dashboard
*
* @generated from message vizapi.CopyDashboardResult
*/
export class CopyDashboardResult extends Message<CopyDashboardResult> {
/**
* @generated from field: vizapi.Dashboard Result = 1;
*/
Result?: Dashboard;
constructor(data?: PartialMessage<CopyDashboardResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.CopyDashboardResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Result", kind: "message", T: Dashboard },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CopyDashboardResult {
return new CopyDashboardResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CopyDashboardResult {
return new CopyDashboardResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CopyDashboardResult {
return new CopyDashboardResult().fromJsonString(jsonString, options);
}
static equals(a: CopyDashboardResult | PlainMessage<CopyDashboardResult> | undefined, b: CopyDashboardResult | PlainMessage<CopyDashboardResult> | undefined): boolean {
return proto3.util.equals(CopyDashboardResult, a, b);
}
}

View File

@@ -0,0 +1,35 @@
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file viz-default-view.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { CreatePlatformDefaultViewRequest, CreatePlatformDefaultViewResult, UpdatePlatformDefaultViewRequest, UpdatePlatformDefaultViewResult } from "./viz-default-view_pb.js";
import { MethodKind } from "@bufbuild/protobuf";
/**
* @generated from service vizapi.DefaultViewService
*/
export const DefaultViewService = {
typeName: "vizapi.DefaultViewService",
methods: {
/**
* @generated from rpc vizapi.DefaultViewService.CreatePlatform
*/
createPlatform: {
name: "CreatePlatform",
I: CreatePlatformDefaultViewRequest,
O: CreatePlatformDefaultViewResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.DefaultViewService.UpdatePlatform
*/
updatePlatform: {
name: "UpdatePlatform",
I: UpdatePlatformDefaultViewRequest,
O: UpdatePlatformDefaultViewResult,
kind: MethodKind.Unary,
},
}
} as const;

198
viz-default-view_pb.ts Normal file
View File

@@ -0,0 +1,198 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file viz-default-view.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* @generated from message vizapi.UpdatePlatformDefaultViewRequest
*/
export class UpdatePlatformDefaultViewRequest extends Message<UpdatePlatformDefaultViewRequest> {
/**
* Identifier of the View
*
* @generated from field: string ViewID = 1;
*/
ViewID = "";
/**
* Content of the View
*
* @generated from field: string Payload = 4;
*/
Payload = "";
/**
* Visibility of the View
*
* @generated from field: bool IsPrivate = 5;
*/
IsPrivate = false;
constructor(data?: PartialMessage<UpdatePlatformDefaultViewRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.UpdatePlatformDefaultViewRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ViewID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "Payload", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "IsPrivate", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdatePlatformDefaultViewRequest {
return new UpdatePlatformDefaultViewRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdatePlatformDefaultViewRequest {
return new UpdatePlatformDefaultViewRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdatePlatformDefaultViewRequest {
return new UpdatePlatformDefaultViewRequest().fromJsonString(jsonString, options);
}
static equals(a: UpdatePlatformDefaultViewRequest | PlainMessage<UpdatePlatformDefaultViewRequest> | undefined, b: UpdatePlatformDefaultViewRequest | PlainMessage<UpdatePlatformDefaultViewRequest> | undefined): boolean {
return proto3.util.equals(UpdatePlatformDefaultViewRequest, a, b);
}
}
/**
* @generated from message vizapi.CreatePlatformDefaultViewRequest
*/
export class CreatePlatformDefaultViewRequest extends Message<CreatePlatformDefaultViewRequest> {
/**
* Identifier of the Screen
*
* @generated from field: string ScreenID = 1;
*/
ScreenID = "";
/**
* Content of the View
*
* @generated from field: string Payload = 4;
*/
Payload = "";
/**
* Visibility of the View
*
* @generated from field: bool IsPrivate = 5;
*/
IsPrivate = false;
constructor(data?: PartialMessage<CreatePlatformDefaultViewRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.CreatePlatformDefaultViewRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ScreenID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "Payload", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "IsPrivate", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreatePlatformDefaultViewRequest {
return new CreatePlatformDefaultViewRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreatePlatformDefaultViewRequest {
return new CreatePlatformDefaultViewRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreatePlatformDefaultViewRequest {
return new CreatePlatformDefaultViewRequest().fromJsonString(jsonString, options);
}
static equals(a: CreatePlatformDefaultViewRequest | PlainMessage<CreatePlatformDefaultViewRequest> | undefined, b: CreatePlatformDefaultViewRequest | PlainMessage<CreatePlatformDefaultViewRequest> | undefined): boolean {
return proto3.util.equals(CreatePlatformDefaultViewRequest, a, b);
}
}
/**
* ID of the created View
*
* @generated from message vizapi.CreatePlatformDefaultViewResult
*/
export class CreatePlatformDefaultViewResult extends Message<CreatePlatformDefaultViewResult> {
/**
* Identifier of the View
*
* @generated from field: string ViewID = 1;
*/
ViewID = "";
constructor(data?: PartialMessage<CreatePlatformDefaultViewResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.CreatePlatformDefaultViewResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ViewID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreatePlatformDefaultViewResult {
return new CreatePlatformDefaultViewResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreatePlatformDefaultViewResult {
return new CreatePlatformDefaultViewResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreatePlatformDefaultViewResult {
return new CreatePlatformDefaultViewResult().fromJsonString(jsonString, options);
}
static equals(a: CreatePlatformDefaultViewResult | PlainMessage<CreatePlatformDefaultViewResult> | undefined, b: CreatePlatformDefaultViewResult | PlainMessage<CreatePlatformDefaultViewResult> | undefined): boolean {
return proto3.util.equals(CreatePlatformDefaultViewResult, a, b);
}
}
/**
* @generated from message vizapi.UpdatePlatformDefaultViewResult
*/
export class UpdatePlatformDefaultViewResult extends Message<UpdatePlatformDefaultViewResult> {
/**
* Identifier of the View
*
* @generated from field: string ViewID = 1;
*/
ViewID = "";
constructor(data?: PartialMessage<UpdatePlatformDefaultViewResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.UpdatePlatformDefaultViewResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ViewID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdatePlatformDefaultViewResult {
return new UpdatePlatformDefaultViewResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdatePlatformDefaultViewResult {
return new UpdatePlatformDefaultViewResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdatePlatformDefaultViewResult {
return new UpdatePlatformDefaultViewResult().fromJsonString(jsonString, options);
}
static equals(a: UpdatePlatformDefaultViewResult | PlainMessage<UpdatePlatformDefaultViewResult> | undefined, b: UpdatePlatformDefaultViewResult | PlainMessage<UpdatePlatformDefaultViewResult> | undefined): boolean {
return proto3.util.equals(UpdatePlatformDefaultViewResult, a, b);
}
}

62
viz-motd_connect.ts Normal file
View File

@@ -0,0 +1,62 @@
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file viz-motd.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { CreateMotdRequest, CreateMotdResult, DeleteMotdRequest, DeleteMotdResult, GetMotdRequest, GetMotdResult, ListMotdsRequest, ListMotdsResult, UpdateMotdRequest, UpdateMotdResult } from "./viz-motd_pb.js";
import { MethodKind } from "@bufbuild/protobuf";
/**
* @generated from service vizapi.MotdService
*/
export const MotdService = {
typeName: "vizapi.MotdService",
methods: {
/**
* @generated from rpc vizapi.MotdService.Get
*/
get: {
name: "Get",
I: GetMotdRequest,
O: GetMotdResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.MotdService.Create
*/
create: {
name: "Create",
I: CreateMotdRequest,
O: CreateMotdResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.MotdService.Update
*/
update: {
name: "Update",
I: UpdateMotdRequest,
O: UpdateMotdResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.MotdService.Delete
*/
delete: {
name: "Delete",
I: DeleteMotdRequest,
O: DeleteMotdResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.MotdService.List
*/
list: {
name: "List",
I: ListMotdsRequest,
O: ListMotdsResult,
kind: MethodKind.Unary,
},
}
} as const;

623
viz-motd_pb.ts Normal file
View File

@@ -0,0 +1,623 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file viz-motd.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* @generated from message vizapi.Motd
*/
export class Motd extends Message<Motd> {
/**
* @generated from field: string MotdID = 1;
*/
MotdID = "";
/**
* @generated from field: string StartDate = 2;
*/
StartDate = "";
/**
* @generated from field: string EndDate = 3;
*/
EndDate = "";
/**
* @generated from field: repeated vizapi.MotdMessage Message = 4;
*/
Message: MotdMessage[] = [];
constructor(data?: PartialMessage<Motd>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.Motd";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "MotdID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "StartDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "EndDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "Message", kind: "message", T: MotdMessage, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Motd {
return new Motd().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Motd {
return new Motd().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Motd {
return new Motd().fromJsonString(jsonString, options);
}
static equals(a: Motd | PlainMessage<Motd> | undefined, b: Motd | PlainMessage<Motd> | undefined): boolean {
return proto3.util.equals(Motd, a, b);
}
}
/**
* @generated from message vizapi.MotdMessage
*/
export class MotdMessage extends Message<MotdMessage> {
/**
* ISO 639-1 code message language
*
* @generated from field: string Lang = 1;
*/
Lang = "";
/**
* The message content
*
* @generated from field: string Message = 2;
*/
Message = "";
constructor(data?: PartialMessage<MotdMessage>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.MotdMessage";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Lang", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MotdMessage {
return new MotdMessage().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MotdMessage {
return new MotdMessage().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MotdMessage {
return new MotdMessage().fromJsonString(jsonString, options);
}
static equals(a: MotdMessage | PlainMessage<MotdMessage> | undefined, b: MotdMessage | PlainMessage<MotdMessage> | undefined): boolean {
return proto3.util.equals(MotdMessage, a, b);
}
}
/**
* @generated from message vizapi.MotdMessageRes
*/
export class MotdMessageRes extends Message<MotdMessageRes> {
/**
* Language used for the message
*
* @generated from field: string Lang = 1;
*/
Lang = "";
/**
* The message content
*
* @generated from field: string Message = 2;
*/
Message = "";
constructor(data?: PartialMessage<MotdMessageRes>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.MotdMessageRes";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Lang", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MotdMessageRes {
return new MotdMessageRes().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MotdMessageRes {
return new MotdMessageRes().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MotdMessageRes {
return new MotdMessageRes().fromJsonString(jsonString, options);
}
static equals(a: MotdMessageRes | PlainMessage<MotdMessageRes> | undefined, b: MotdMessageRes | PlainMessage<MotdMessageRes> | undefined): boolean {
return proto3.util.equals(MotdMessageRes, a, b);
}
}
/**
* Message request with the content and the dates
*
* @generated from message vizapi.CreateMotdRequest
*/
export class CreateMotdRequest extends Message<CreateMotdRequest> {
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from field: string StartDate = 1;
*/
StartDate = "";
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from field: string EndDate = 2;
*/
EndDate = "";
/**
* @generated from field: repeated vizapi.MotdMessage Message = 3;
*/
Message: MotdMessage[] = [];
constructor(data?: PartialMessage<CreateMotdRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.CreateMotdRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "StartDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "EndDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Message", kind: "message", T: MotdMessage, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateMotdRequest {
return new CreateMotdRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateMotdRequest {
return new CreateMotdRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateMotdRequest {
return new CreateMotdRequest().fromJsonString(jsonString, options);
}
static equals(a: CreateMotdRequest | PlainMessage<CreateMotdRequest> | undefined, b: CreateMotdRequest | PlainMessage<CreateMotdRequest> | undefined): boolean {
return proto3.util.equals(CreateMotdRequest, a, b);
}
}
/**
* Message result with ID, content and dates
*
* @generated from message vizapi.CreateMotdResult
*/
export class CreateMotdResult extends Message<CreateMotdResult> {
/**
* @generated from field: string ID = 1;
*/
ID = "";
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from field: string StartDate = 2;
*/
StartDate = "";
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from field: string EndDate = 3;
*/
EndDate = "";
/**
* @generated from field: repeated vizapi.MotdMessageRes Message = 4;
*/
Message: MotdMessageRes[] = [];
constructor(data?: PartialMessage<CreateMotdResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.CreateMotdResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "StartDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "EndDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "Message", kind: "message", T: MotdMessageRes, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateMotdResult {
return new CreateMotdResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateMotdResult {
return new CreateMotdResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateMotdResult {
return new CreateMotdResult().fromJsonString(jsonString, options);
}
static equals(a: CreateMotdResult | PlainMessage<CreateMotdResult> | undefined, b: CreateMotdResult | PlainMessage<CreateMotdResult> | undefined): boolean {
return proto3.util.equals(CreateMotdResult, a, b);
}
}
/**
* Update an existing Message Of The Day using its key
*
* @generated from message vizapi.UpdateMotdRequest
*/
export class UpdateMotdRequest extends Message<UpdateMotdRequest> {
/**
* @generated from field: string ID = 1;
*/
ID = "";
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from field: string StartDate = 2;
*/
StartDate = "";
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from field: string EndDate = 3;
*/
EndDate = "";
/**
* @generated from field: repeated vizapi.MotdMessage Message = 4;
*/
Message: MotdMessage[] = [];
constructor(data?: PartialMessage<UpdateMotdRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.UpdateMotdRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "StartDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "EndDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "Message", kind: "message", T: MotdMessage, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateMotdRequest {
return new UpdateMotdRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateMotdRequest {
return new UpdateMotdRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateMotdRequest {
return new UpdateMotdRequest().fromJsonString(jsonString, options);
}
static equals(a: UpdateMotdRequest | PlainMessage<UpdateMotdRequest> | undefined, b: UpdateMotdRequest | PlainMessage<UpdateMotdRequest> | undefined): boolean {
return proto3.util.equals(UpdateMotdRequest, a, b);
}
}
/**
* @generated from message vizapi.UpdateMotdResult
*/
export class UpdateMotdResult extends Message<UpdateMotdResult> {
/**
* @generated from field: string ID = 1;
*/
ID = "";
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from field: string StartDate = 2;
*/
StartDate = "";
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from field: string EndDate = 3;
*/
EndDate = "";
/**
* @generated from field: repeated vizapi.MotdMessage Message = 4;
*/
Message: MotdMessage[] = [];
constructor(data?: PartialMessage<UpdateMotdResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.UpdateMotdResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "StartDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "EndDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "Message", kind: "message", T: MotdMessage, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateMotdResult {
return new UpdateMotdResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateMotdResult {
return new UpdateMotdResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateMotdResult {
return new UpdateMotdResult().fromJsonString(jsonString, options);
}
static equals(a: UpdateMotdResult | PlainMessage<UpdateMotdResult> | undefined, b: UpdateMotdResult | PlainMessage<UpdateMotdResult> | undefined): boolean {
return proto3.util.equals(UpdateMotdResult, a, b);
}
}
/**
* @generated from message vizapi.GetMotdRequest
*/
export class GetMotdRequest extends Message<GetMotdRequest> {
constructor(data?: PartialMessage<GetMotdRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetMotdRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetMotdRequest {
return new GetMotdRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetMotdRequest {
return new GetMotdRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetMotdRequest {
return new GetMotdRequest().fromJsonString(jsonString, options);
}
static equals(a: GetMotdRequest | PlainMessage<GetMotdRequest> | undefined, b: GetMotdRequest | PlainMessage<GetMotdRequest> | undefined): boolean {
return proto3.util.equals(GetMotdRequest, a, b);
}
}
/**
* Return the current Message Of The Day
*
* @generated from message vizapi.GetMotdResult
*/
export class GetMotdResult extends Message<GetMotdResult> {
/**
* @generated from field: string ID = 1;
*/
ID = "";
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from field: string StartDate = 2;
*/
StartDate = "";
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from field: string EndDate = 3;
*/
EndDate = "";
/**
* @generated from field: repeated vizapi.MotdMessageRes Message = 4;
*/
Message: MotdMessageRes[] = [];
constructor(data?: PartialMessage<GetMotdResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetMotdResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "StartDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "EndDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "Message", kind: "message", T: MotdMessageRes, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetMotdResult {
return new GetMotdResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetMotdResult {
return new GetMotdResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetMotdResult {
return new GetMotdResult().fromJsonString(jsonString, options);
}
static equals(a: GetMotdResult | PlainMessage<GetMotdResult> | undefined, b: GetMotdResult | PlainMessage<GetMotdResult> | undefined): boolean {
return proto3.util.equals(GetMotdResult, a, b);
}
}
/**
* @generated from message vizapi.DeleteMotdRequest
*/
export class DeleteMotdRequest extends Message<DeleteMotdRequest> {
/**
* @generated from field: string ID = 1;
*/
ID = "";
constructor(data?: PartialMessage<DeleteMotdRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteMotdRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteMotdRequest {
return new DeleteMotdRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteMotdRequest {
return new DeleteMotdRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteMotdRequest {
return new DeleteMotdRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteMotdRequest | PlainMessage<DeleteMotdRequest> | undefined, b: DeleteMotdRequest | PlainMessage<DeleteMotdRequest> | undefined): boolean {
return proto3.util.equals(DeleteMotdRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteMotdResult
*/
export class DeleteMotdResult extends Message<DeleteMotdResult> {
constructor(data?: PartialMessage<DeleteMotdResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteMotdResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteMotdResult {
return new DeleteMotdResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteMotdResult {
return new DeleteMotdResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteMotdResult {
return new DeleteMotdResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteMotdResult | PlainMessage<DeleteMotdResult> | undefined, b: DeleteMotdResult | PlainMessage<DeleteMotdResult> | undefined): boolean {
return proto3.util.equals(DeleteMotdResult, a, b);
}
}
/**
* @generated from message vizapi.ListMotdsRequest
*/
export class ListMotdsRequest extends Message<ListMotdsRequest> {
constructor(data?: PartialMessage<ListMotdsRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListMotdsRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListMotdsRequest {
return new ListMotdsRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListMotdsRequest {
return new ListMotdsRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListMotdsRequest {
return new ListMotdsRequest().fromJsonString(jsonString, options);
}
static equals(a: ListMotdsRequest | PlainMessage<ListMotdsRequest> | undefined, b: ListMotdsRequest | PlainMessage<ListMotdsRequest> | undefined): boolean {
return proto3.util.equals(ListMotdsRequest, a, b);
}
}
/**
* List of all existing messages of the day
*
* @generated from message vizapi.ListMotdsResult
*/
export class ListMotdsResult extends Message<ListMotdsResult> {
/**
* @generated from field: repeated vizapi.GetMotdResult Motds = 1;
*/
Motds: GetMotdResult[] = [];
constructor(data?: PartialMessage<ListMotdsResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListMotdsResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Motds", kind: "message", T: GetMotdResult, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListMotdsResult {
return new ListMotdsResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListMotdsResult {
return new ListMotdsResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListMotdsResult {
return new ListMotdsResult().fromJsonString(jsonString, options);
}
static equals(a: ListMotdsResult | PlainMessage<ListMotdsResult> | undefined, b: ListMotdsResult | PlainMessage<ListMotdsResult> | undefined): boolean {
return proto3.util.equals(ListMotdsResult, a, b);
}
}

View File

@@ -0,0 +1,62 @@
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file viz-organisation-settings.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { DeleteOrganisationSettingRequest, DeleteOrganisationSettingResult, DeleteSettingsForOrganisationRequest, DeleteSettingsForOrganisationResult, GetOrganisationSettingRequest, GetOrganisationSettingResult, ListOrganisationSettingsRequest, ListOrganisationSettingsResult, PutOrganisationSettingRequest, PutOrganisationSettingResult } from "./viz-organisation-settings_pb.js";
import { MethodKind } from "@bufbuild/protobuf";
/**
* @generated from service vizapi.OrganisationSettingsService
*/
export const OrganisationSettingsService = {
typeName: "vizapi.OrganisationSettingsService",
methods: {
/**
* @generated from rpc vizapi.OrganisationSettingsService.Get
*/
get: {
name: "Get",
I: GetOrganisationSettingRequest,
O: GetOrganisationSettingResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.OrganisationSettingsService.Put
*/
put: {
name: "Put",
I: PutOrganisationSettingRequest,
O: PutOrganisationSettingResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.OrganisationSettingsService.Delete
*/
delete: {
name: "Delete",
I: DeleteOrganisationSettingRequest,
O: DeleteOrganisationSettingResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.OrganisationSettingsService.List
*/
list: {
name: "List",
I: ListOrganisationSettingsRequest,
O: ListOrganisationSettingsResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.OrganisationSettingsService.DeleteSettingsForOrganisation
*/
deleteSettingsForOrganisation: {
name: "DeleteSettingsForOrganisation",
I: DeleteSettingsForOrganisationRequest,
O: DeleteSettingsForOrganisationResult,
kind: MethodKind.Unary,
},
}
} as const;

View File

@@ -0,0 +1,514 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file viz-organisation-settings.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { RequestOrganisationHeader } from "./core/shared_pb.js";
/**
* @generated from enum vizapi.SettingVisibility
*/
export enum SettingVisibility {
/**
* @generated from enum value: SETTING_VISIBILITY_UNKNOWN = 0;
*/
UNKNOWN = 0,
/**
* @generated from enum value: SETTING_VISIBILITY_PUBLIC = 1;
*/
PUBLIC = 1,
/**
* @generated from enum value: SETTING_VISIBILITY_PRIVATE = 2;
*/
PRIVATE = 2,
}
// Retrieve enum metadata with: proto3.getEnumType(SettingVisibility)
proto3.util.setEnumType(SettingVisibility, "vizapi.SettingVisibility", [
{ no: 0, name: "SETTING_VISIBILITY_UNKNOWN" },
{ no: 1, name: "SETTING_VISIBILITY_PUBLIC" },
{ no: 2, name: "SETTING_VISIBILITY_PRIVATE" },
]);
/**
* @generated from message vizapi.OrganisationSetting
*/
export class OrganisationSetting extends Message<OrganisationSetting> {
/**
* @generated from field: string OrganisationID = 1;
*/
OrganisationID = "";
/**
* @generated from field: string Key = 2;
*/
Key = "";
/**
* @generated from field: string Value = 3;
*/
Value = "";
/**
* @generated from field: vizapi.SettingVisibility Visibility = 4;
*/
Visibility = SettingVisibility.UNKNOWN;
constructor(data?: PartialMessage<OrganisationSetting>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.OrganisationSetting";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "OrganisationID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "Visibility", kind: "enum", T: proto3.getEnumType(SettingVisibility) },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OrganisationSetting {
return new OrganisationSetting().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OrganisationSetting {
return new OrganisationSetting().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OrganisationSetting {
return new OrganisationSetting().fromJsonString(jsonString, options);
}
static equals(a: OrganisationSetting | PlainMessage<OrganisationSetting> | undefined, b: OrganisationSetting | PlainMessage<OrganisationSetting> | undefined): boolean {
return proto3.util.equals(OrganisationSetting, a, b);
}
}
/**
* Key, Value pair to store
*
* @generated from message vizapi.PutOrganisationSettingRequest
*/
export class PutOrganisationSettingRequest extends Message<PutOrganisationSettingRequest> {
/**
* @generated from field: api.RequestOrganisationHeader Header = 1;
*/
Header?: RequestOrganisationHeader;
/**
* @generated from field: string Key = 2;
*/
Key = "";
/**
* @generated from field: string Value = 3;
*/
Value = "";
/**
* @generated from field: vizapi.SettingVisibility Visibility = 4;
*/
Visibility = SettingVisibility.UNKNOWN;
constructor(data?: PartialMessage<PutOrganisationSettingRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.PutOrganisationSettingRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestOrganisationHeader },
{ no: 2, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "Visibility", kind: "enum", T: proto3.getEnumType(SettingVisibility) },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PutOrganisationSettingRequest {
return new PutOrganisationSettingRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PutOrganisationSettingRequest {
return new PutOrganisationSettingRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PutOrganisationSettingRequest {
return new PutOrganisationSettingRequest().fromJsonString(jsonString, options);
}
static equals(a: PutOrganisationSettingRequest | PlainMessage<PutOrganisationSettingRequest> | undefined, b: PutOrganisationSettingRequest | PlainMessage<PutOrganisationSettingRequest> | undefined): boolean {
return proto3.util.equals(PutOrganisationSettingRequest, a, b);
}
}
/**
* Key, Value pair response
*
* @generated from message vizapi.PutOrganisationSettingResult
*/
export class PutOrganisationSettingResult extends Message<PutOrganisationSettingResult> {
/**
* @generated from field: string Key = 1;
*/
Key = "";
/**
* @generated from field: string Value = 2;
*/
Value = "";
/**
* @generated from field: vizapi.SettingVisibility Visibility = 3;
*/
Visibility = SettingVisibility.UNKNOWN;
constructor(data?: PartialMessage<PutOrganisationSettingResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.PutOrganisationSettingResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Visibility", kind: "enum", T: proto3.getEnumType(SettingVisibility) },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PutOrganisationSettingResult {
return new PutOrganisationSettingResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PutOrganisationSettingResult {
return new PutOrganisationSettingResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PutOrganisationSettingResult {
return new PutOrganisationSettingResult().fromJsonString(jsonString, options);
}
static equals(a: PutOrganisationSettingResult | PlainMessage<PutOrganisationSettingResult> | undefined, b: PutOrganisationSettingResult | PlainMessage<PutOrganisationSettingResult> | undefined): boolean {
return proto3.util.equals(PutOrganisationSettingResult, a, b);
}
}
/**
* Key of the organisation's setting to get
*
* @generated from message vizapi.GetOrganisationSettingRequest
*/
export class GetOrganisationSettingRequest extends Message<GetOrganisationSettingRequest> {
/**
* @generated from field: api.RequestOrganisationHeader Header = 1;
*/
Header?: RequestOrganisationHeader;
/**
* @generated from field: string Key = 2;
*/
Key = "";
constructor(data?: PartialMessage<GetOrganisationSettingRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetOrganisationSettingRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestOrganisationHeader },
{ no: 2, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetOrganisationSettingRequest {
return new GetOrganisationSettingRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetOrganisationSettingRequest {
return new GetOrganisationSettingRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetOrganisationSettingRequest {
return new GetOrganisationSettingRequest().fromJsonString(jsonString, options);
}
static equals(a: GetOrganisationSettingRequest | PlainMessage<GetOrganisationSettingRequest> | undefined, b: GetOrganisationSettingRequest | PlainMessage<GetOrganisationSettingRequest> | undefined): boolean {
return proto3.util.equals(GetOrganisationSettingRequest, a, b);
}
}
/**
* Key, Value pair response
*
* @generated from message vizapi.GetOrganisationSettingResult
*/
export class GetOrganisationSettingResult extends Message<GetOrganisationSettingResult> {
/**
* @generated from field: string Key = 1;
*/
Key = "";
/**
* @generated from field: string Value = 2;
*/
Value = "";
/**
* @generated from field: vizapi.SettingVisibility Visibility = 3;
*/
Visibility = SettingVisibility.UNKNOWN;
constructor(data?: PartialMessage<GetOrganisationSettingResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetOrganisationSettingResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Visibility", kind: "enum", T: proto3.getEnumType(SettingVisibility) },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetOrganisationSettingResult {
return new GetOrganisationSettingResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetOrganisationSettingResult {
return new GetOrganisationSettingResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetOrganisationSettingResult {
return new GetOrganisationSettingResult().fromJsonString(jsonString, options);
}
static equals(a: GetOrganisationSettingResult | PlainMessage<GetOrganisationSettingResult> | undefined, b: GetOrganisationSettingResult | PlainMessage<GetOrganisationSettingResult> | undefined): boolean {
return proto3.util.equals(GetOrganisationSettingResult, a, b);
}
}
/**
* Key of the organisation's setting to delete
*
* @generated from message vizapi.DeleteOrganisationSettingRequest
*/
export class DeleteOrganisationSettingRequest extends Message<DeleteOrganisationSettingRequest> {
/**
* @generated from field: api.RequestOrganisationHeader Header = 1;
*/
Header?: RequestOrganisationHeader;
/**
* @generated from field: string Key = 2;
*/
Key = "";
constructor(data?: PartialMessage<DeleteOrganisationSettingRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteOrganisationSettingRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestOrganisationHeader },
{ no: 2, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteOrganisationSettingRequest {
return new DeleteOrganisationSettingRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteOrganisationSettingRequest {
return new DeleteOrganisationSettingRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteOrganisationSettingRequest {
return new DeleteOrganisationSettingRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteOrganisationSettingRequest | PlainMessage<DeleteOrganisationSettingRequest> | undefined, b: DeleteOrganisationSettingRequest | PlainMessage<DeleteOrganisationSettingRequest> | undefined): boolean {
return proto3.util.equals(DeleteOrganisationSettingRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteOrganisationSettingResult
*/
export class DeleteOrganisationSettingResult extends Message<DeleteOrganisationSettingResult> {
constructor(data?: PartialMessage<DeleteOrganisationSettingResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteOrganisationSettingResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteOrganisationSettingResult {
return new DeleteOrganisationSettingResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteOrganisationSettingResult {
return new DeleteOrganisationSettingResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteOrganisationSettingResult {
return new DeleteOrganisationSettingResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteOrganisationSettingResult | PlainMessage<DeleteOrganisationSettingResult> | undefined, b: DeleteOrganisationSettingResult | PlainMessage<DeleteOrganisationSettingResult> | undefined): boolean {
return proto3.util.equals(DeleteOrganisationSettingResult, a, b);
}
}
/**
* @generated from message vizapi.ListOrganisationSettingsRequest
*/
export class ListOrganisationSettingsRequest extends Message<ListOrganisationSettingsRequest> {
/**
* @generated from field: api.RequestOrganisationHeader Header = 1;
*/
Header?: RequestOrganisationHeader;
constructor(data?: PartialMessage<ListOrganisationSettingsRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListOrganisationSettingsRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestOrganisationHeader },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListOrganisationSettingsRequest {
return new ListOrganisationSettingsRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListOrganisationSettingsRequest {
return new ListOrganisationSettingsRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListOrganisationSettingsRequest {
return new ListOrganisationSettingsRequest().fromJsonString(jsonString, options);
}
static equals(a: ListOrganisationSettingsRequest | PlainMessage<ListOrganisationSettingsRequest> | undefined, b: ListOrganisationSettingsRequest | PlainMessage<ListOrganisationSettingsRequest> | undefined): boolean {
return proto3.util.equals(ListOrganisationSettingsRequest, a, b);
}
}
/**
* List of the organisation's settings
*
* @generated from message vizapi.ListOrganisationSettingsResult
*/
export class ListOrganisationSettingsResult extends Message<ListOrganisationSettingsResult> {
/**
* @generated from field: repeated vizapi.GetOrganisationSettingResult OrganisationSettings = 1;
*/
OrganisationSettings: GetOrganisationSettingResult[] = [];
constructor(data?: PartialMessage<ListOrganisationSettingsResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListOrganisationSettingsResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "OrganisationSettings", kind: "message", T: GetOrganisationSettingResult, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListOrganisationSettingsResult {
return new ListOrganisationSettingsResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListOrganisationSettingsResult {
return new ListOrganisationSettingsResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListOrganisationSettingsResult {
return new ListOrganisationSettingsResult().fromJsonString(jsonString, options);
}
static equals(a: ListOrganisationSettingsResult | PlainMessage<ListOrganisationSettingsResult> | undefined, b: ListOrganisationSettingsResult | PlainMessage<ListOrganisationSettingsResult> | undefined): boolean {
return proto3.util.equals(ListOrganisationSettingsResult, a, b);
}
}
/**
* @generated from message vizapi.DeleteSettingsForOrganisationRequest
*/
export class DeleteSettingsForOrganisationRequest extends Message<DeleteSettingsForOrganisationRequest> {
/**
* @generated from field: string OrganisationID = 1;
*/
OrganisationID = "";
constructor(data?: PartialMessage<DeleteSettingsForOrganisationRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteSettingsForOrganisationRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "OrganisationID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteSettingsForOrganisationRequest {
return new DeleteSettingsForOrganisationRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteSettingsForOrganisationRequest {
return new DeleteSettingsForOrganisationRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteSettingsForOrganisationRequest {
return new DeleteSettingsForOrganisationRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteSettingsForOrganisationRequest | PlainMessage<DeleteSettingsForOrganisationRequest> | undefined, b: DeleteSettingsForOrganisationRequest | PlainMessage<DeleteSettingsForOrganisationRequest> | undefined): boolean {
return proto3.util.equals(DeleteSettingsForOrganisationRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteSettingsForOrganisationResult
*/
export class DeleteSettingsForOrganisationResult extends Message<DeleteSettingsForOrganisationResult> {
constructor(data?: PartialMessage<DeleteSettingsForOrganisationResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteSettingsForOrganisationResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteSettingsForOrganisationResult {
return new DeleteSettingsForOrganisationResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteSettingsForOrganisationResult {
return new DeleteSettingsForOrganisationResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteSettingsForOrganisationResult {
return new DeleteSettingsForOrganisationResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteSettingsForOrganisationResult | PlainMessage<DeleteSettingsForOrganisationResult> | undefined, b: DeleteSettingsForOrganisationResult | PlainMessage<DeleteSettingsForOrganisationResult> | undefined): boolean {
return proto3.util.equals(DeleteSettingsForOrganisationResult, a, b);
}
}

View File

@@ -0,0 +1,71 @@
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file viz-project-settings.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { DeleteProjectSettingRequest, DeleteProjectSettingResult, DeleteSettingsForProjectRequest, DeleteSettingsForProjectResult, GetProjectSettingRequest, GetProjectSettingResult, ListProjectOrganisationSettingsRequest, ListProjectOrganisationSettingsResult, ListProjectSettingsRequest, ListProjectSettingsResult, PutProjectSettingRequest, PutProjectSettingResult } from "./viz-project-settings_pb.js";
import { MethodKind } from "@bufbuild/protobuf";
/**
* @generated from service vizapi.ProjectSettingsService
*/
export const ProjectSettingsService = {
typeName: "vizapi.ProjectSettingsService",
methods: {
/**
* @generated from rpc vizapi.ProjectSettingsService.Get
*/
get: {
name: "Get",
I: GetProjectSettingRequest,
O: GetProjectSettingResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ProjectSettingsService.Put
*/
put: {
name: "Put",
I: PutProjectSettingRequest,
O: PutProjectSettingResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ProjectSettingsService.Delete
*/
delete: {
name: "Delete",
I: DeleteProjectSettingRequest,
O: DeleteProjectSettingResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ProjectSettingsService.List
*/
list: {
name: "List",
I: ListProjectSettingsRequest,
O: ListProjectSettingsResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ProjectSettingsService.ListOrganisationSettings
*/
listOrganisationSettings: {
name: "ListOrganisationSettings",
I: ListProjectOrganisationSettingsRequest,
O: ListProjectOrganisationSettingsResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ProjectSettingsService.DeleteSettingsForProject
*/
deleteSettingsForProject: {
name: "DeleteSettingsForProject",
I: DeleteSettingsForProjectRequest,
O: DeleteSettingsForProjectResult,
kind: MethodKind.Unary,
},
}
} as const;

541
viz-project-settings_pb.ts Normal file
View File

@@ -0,0 +1,541 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file viz-project-settings.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { RequestProjectHeader } from "./core/shared_pb.js";
import { GetOrganisationSettingResult } from "./viz-organisation-settings_pb.js";
/**
* @generated from message vizapi.ProjectSetting
*/
export class ProjectSetting extends Message<ProjectSetting> {
/**
* @generated from field: string ProjectID = 1;
*/
ProjectID = "";
/**
* @generated from field: string Key = 2;
*/
Key = "";
/**
* @generated from field: string Value = 3;
*/
Value = "";
constructor(data?: PartialMessage<ProjectSetting>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ProjectSetting";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ProjectID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ProjectSetting {
return new ProjectSetting().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ProjectSetting {
return new ProjectSetting().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ProjectSetting {
return new ProjectSetting().fromJsonString(jsonString, options);
}
static equals(a: ProjectSetting | PlainMessage<ProjectSetting> | undefined, b: ProjectSetting | PlainMessage<ProjectSetting> | undefined): boolean {
return proto3.util.equals(ProjectSetting, a, b);
}
}
/**
* Key, Value pair to store
*
* @generated from message vizapi.PutProjectSettingRequest
*/
export class PutProjectSettingRequest extends Message<PutProjectSettingRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* @generated from field: string Key = 2;
*/
Key = "";
/**
* @generated from field: string Value = 3;
*/
Value = "";
constructor(data?: PartialMessage<PutProjectSettingRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.PutProjectSettingRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PutProjectSettingRequest {
return new PutProjectSettingRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PutProjectSettingRequest {
return new PutProjectSettingRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PutProjectSettingRequest {
return new PutProjectSettingRequest().fromJsonString(jsonString, options);
}
static equals(a: PutProjectSettingRequest | PlainMessage<PutProjectSettingRequest> | undefined, b: PutProjectSettingRequest | PlainMessage<PutProjectSettingRequest> | undefined): boolean {
return proto3.util.equals(PutProjectSettingRequest, a, b);
}
}
/**
* Key, Value pair response
*
* @generated from message vizapi.PutProjectSettingResult
*/
export class PutProjectSettingResult extends Message<PutProjectSettingResult> {
/**
* @generated from field: string Key = 1;
*/
Key = "";
/**
* @generated from field: string Value = 2;
*/
Value = "";
constructor(data?: PartialMessage<PutProjectSettingResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.PutProjectSettingResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PutProjectSettingResult {
return new PutProjectSettingResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PutProjectSettingResult {
return new PutProjectSettingResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PutProjectSettingResult {
return new PutProjectSettingResult().fromJsonString(jsonString, options);
}
static equals(a: PutProjectSettingResult | PlainMessage<PutProjectSettingResult> | undefined, b: PutProjectSettingResult | PlainMessage<PutProjectSettingResult> | undefined): boolean {
return proto3.util.equals(PutProjectSettingResult, a, b);
}
}
/**
* Key of the project's setting to get
*
* @generated from message vizapi.GetProjectSettingRequest
*/
export class GetProjectSettingRequest extends Message<GetProjectSettingRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* @generated from field: string Key = 2;
*/
Key = "";
constructor(data?: PartialMessage<GetProjectSettingRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetProjectSettingRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetProjectSettingRequest {
return new GetProjectSettingRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetProjectSettingRequest {
return new GetProjectSettingRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetProjectSettingRequest {
return new GetProjectSettingRequest().fromJsonString(jsonString, options);
}
static equals(a: GetProjectSettingRequest | PlainMessage<GetProjectSettingRequest> | undefined, b: GetProjectSettingRequest | PlainMessage<GetProjectSettingRequest> | undefined): boolean {
return proto3.util.equals(GetProjectSettingRequest, a, b);
}
}
/**
* Key, Value pair response
*
* @generated from message vizapi.GetProjectSettingResult
*/
export class GetProjectSettingResult extends Message<GetProjectSettingResult> {
/**
* @generated from field: string Key = 1;
*/
Key = "";
/**
* @generated from field: string Value = 2;
*/
Value = "";
constructor(data?: PartialMessage<GetProjectSettingResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetProjectSettingResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetProjectSettingResult {
return new GetProjectSettingResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetProjectSettingResult {
return new GetProjectSettingResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetProjectSettingResult {
return new GetProjectSettingResult().fromJsonString(jsonString, options);
}
static equals(a: GetProjectSettingResult | PlainMessage<GetProjectSettingResult> | undefined, b: GetProjectSettingResult | PlainMessage<GetProjectSettingResult> | undefined): boolean {
return proto3.util.equals(GetProjectSettingResult, a, b);
}
}
/**
* Key of the project's setting to delete
*
* @generated from message vizapi.DeleteProjectSettingRequest
*/
export class DeleteProjectSettingRequest extends Message<DeleteProjectSettingRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* @generated from field: string Key = 2;
*/
Key = "";
constructor(data?: PartialMessage<DeleteProjectSettingRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteProjectSettingRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteProjectSettingRequest {
return new DeleteProjectSettingRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteProjectSettingRequest {
return new DeleteProjectSettingRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteProjectSettingRequest {
return new DeleteProjectSettingRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteProjectSettingRequest | PlainMessage<DeleteProjectSettingRequest> | undefined, b: DeleteProjectSettingRequest | PlainMessage<DeleteProjectSettingRequest> | undefined): boolean {
return proto3.util.equals(DeleteProjectSettingRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteProjectSettingResult
*/
export class DeleteProjectSettingResult extends Message<DeleteProjectSettingResult> {
constructor(data?: PartialMessage<DeleteProjectSettingResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteProjectSettingResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteProjectSettingResult {
return new DeleteProjectSettingResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteProjectSettingResult {
return new DeleteProjectSettingResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteProjectSettingResult {
return new DeleteProjectSettingResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteProjectSettingResult | PlainMessage<DeleteProjectSettingResult> | undefined, b: DeleteProjectSettingResult | PlainMessage<DeleteProjectSettingResult> | undefined): boolean {
return proto3.util.equals(DeleteProjectSettingResult, a, b);
}
}
/**
* @generated from message vizapi.ListProjectSettingsRequest
*/
export class ListProjectSettingsRequest extends Message<ListProjectSettingsRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
constructor(data?: PartialMessage<ListProjectSettingsRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListProjectSettingsRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListProjectSettingsRequest {
return new ListProjectSettingsRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListProjectSettingsRequest {
return new ListProjectSettingsRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListProjectSettingsRequest {
return new ListProjectSettingsRequest().fromJsonString(jsonString, options);
}
static equals(a: ListProjectSettingsRequest | PlainMessage<ListProjectSettingsRequest> | undefined, b: ListProjectSettingsRequest | PlainMessage<ListProjectSettingsRequest> | undefined): boolean {
return proto3.util.equals(ListProjectSettingsRequest, a, b);
}
}
/**
* List of the project's settings
*
* @generated from message vizapi.ListProjectSettingsResult
*/
export class ListProjectSettingsResult extends Message<ListProjectSettingsResult> {
/**
* @generated from field: repeated vizapi.GetProjectSettingResult ProjectSettings = 1;
*/
ProjectSettings: GetProjectSettingResult[] = [];
constructor(data?: PartialMessage<ListProjectSettingsResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListProjectSettingsResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ProjectSettings", kind: "message", T: GetProjectSettingResult, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListProjectSettingsResult {
return new ListProjectSettingsResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListProjectSettingsResult {
return new ListProjectSettingsResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListProjectSettingsResult {
return new ListProjectSettingsResult().fromJsonString(jsonString, options);
}
static equals(a: ListProjectSettingsResult | PlainMessage<ListProjectSettingsResult> | undefined, b: ListProjectSettingsResult | PlainMessage<ListProjectSettingsResult> | undefined): boolean {
return proto3.util.equals(ListProjectSettingsResult, a, b);
}
}
/**
* @generated from message vizapi.ListProjectOrganisationSettingsRequest
*/
export class ListProjectOrganisationSettingsRequest extends Message<ListProjectOrganisationSettingsRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
constructor(data?: PartialMessage<ListProjectOrganisationSettingsRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListProjectOrganisationSettingsRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListProjectOrganisationSettingsRequest {
return new ListProjectOrganisationSettingsRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListProjectOrganisationSettingsRequest {
return new ListProjectOrganisationSettingsRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListProjectOrganisationSettingsRequest {
return new ListProjectOrganisationSettingsRequest().fromJsonString(jsonString, options);
}
static equals(a: ListProjectOrganisationSettingsRequest | PlainMessage<ListProjectOrganisationSettingsRequest> | undefined, b: ListProjectOrganisationSettingsRequest | PlainMessage<ListProjectOrganisationSettingsRequest> | undefined): boolean {
return proto3.util.equals(ListProjectOrganisationSettingsRequest, a, b);
}
}
/**
* List of the project's settings
*
* @generated from message vizapi.ListProjectOrganisationSettingsResult
*/
export class ListProjectOrganisationSettingsResult extends Message<ListProjectOrganisationSettingsResult> {
/**
* @generated from field: repeated vizapi.GetOrganisationSettingResult OrganisationSettings = 1;
*/
OrganisationSettings: GetOrganisationSettingResult[] = [];
constructor(data?: PartialMessage<ListProjectOrganisationSettingsResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListProjectOrganisationSettingsResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "OrganisationSettings", kind: "message", T: GetOrganisationSettingResult, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListProjectOrganisationSettingsResult {
return new ListProjectOrganisationSettingsResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListProjectOrganisationSettingsResult {
return new ListProjectOrganisationSettingsResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListProjectOrganisationSettingsResult {
return new ListProjectOrganisationSettingsResult().fromJsonString(jsonString, options);
}
static equals(a: ListProjectOrganisationSettingsResult | PlainMessage<ListProjectOrganisationSettingsResult> | undefined, b: ListProjectOrganisationSettingsResult | PlainMessage<ListProjectOrganisationSettingsResult> | undefined): boolean {
return proto3.util.equals(ListProjectOrganisationSettingsResult, a, b);
}
}
/**
* @generated from message vizapi.DeleteSettingsForProjectRequest
*/
export class DeleteSettingsForProjectRequest extends Message<DeleteSettingsForProjectRequest> {
/**
* @generated from field: string ProjectID = 1;
*/
ProjectID = "";
constructor(data?: PartialMessage<DeleteSettingsForProjectRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteSettingsForProjectRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ProjectID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteSettingsForProjectRequest {
return new DeleteSettingsForProjectRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteSettingsForProjectRequest {
return new DeleteSettingsForProjectRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteSettingsForProjectRequest {
return new DeleteSettingsForProjectRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteSettingsForProjectRequest | PlainMessage<DeleteSettingsForProjectRequest> | undefined, b: DeleteSettingsForProjectRequest | PlainMessage<DeleteSettingsForProjectRequest> | undefined): boolean {
return proto3.util.equals(DeleteSettingsForProjectRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteSettingsForProjectResult
*/
export class DeleteSettingsForProjectResult extends Message<DeleteSettingsForProjectResult> {
constructor(data?: PartialMessage<DeleteSettingsForProjectResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteSettingsForProjectResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteSettingsForProjectResult {
return new DeleteSettingsForProjectResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteSettingsForProjectResult {
return new DeleteSettingsForProjectResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteSettingsForProjectResult {
return new DeleteSettingsForProjectResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteSettingsForProjectResult | PlainMessage<DeleteSettingsForProjectResult> | undefined, b: DeleteSettingsForProjectResult | PlainMessage<DeleteSettingsForProjectResult> | undefined): boolean {
return proto3.util.equals(DeleteSettingsForProjectResult, a, b);
}
}

26
viz-tab_connect.ts Normal file
View File

@@ -0,0 +1,26 @@
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file viz-tab.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { ListTabRequest, ListTabResult } from "./viz-tab_pb.js";
import { MethodKind } from "@bufbuild/protobuf";
/**
* @generated from service vizapi.TabService
*/
export const TabService = {
typeName: "vizapi.TabService",
methods: {
/**
* @generated from rpc vizapi.TabService.List
*/
list: {
name: "List",
I: ListTabRequest,
O: ListTabResult,
kind: MethodKind.Unary,
},
}
} as const;

86
viz-tab_pb.ts Normal file
View File

@@ -0,0 +1,86 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file viz-tab.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* @generated from message vizapi.ListTabRequest
*/
export class ListTabRequest extends Message<ListTabRequest> {
/**
* Identifier of the Tab
*
* @generated from field: string TabID = 1;
*/
TabID = "";
constructor(data?: PartialMessage<ListTabRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListTabRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "TabID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListTabRequest {
return new ListTabRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListTabRequest {
return new ListTabRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListTabRequest {
return new ListTabRequest().fromJsonString(jsonString, options);
}
static equals(a: ListTabRequest | PlainMessage<ListTabRequest> | undefined, b: ListTabRequest | PlainMessage<ListTabRequest> | undefined): boolean {
return proto3.util.equals(ListTabRequest, a, b);
}
}
/**
* @generated from message vizapi.ListTabResult
*/
export class ListTabResult extends Message<ListTabResult> {
/**
* List of tabs
*
* @generated from field: string Result = 1;
*/
Result = "";
constructor(data?: PartialMessage<ListTabResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListTabResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Result", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListTabResult {
return new ListTabResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListTabResult {
return new ListTabResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListTabResult {
return new ListTabResult().fromJsonString(jsonString, options);
}
static equals(a: ListTabResult | PlainMessage<ListTabResult> | undefined, b: ListTabResult | PlainMessage<ListTabResult> | undefined): boolean {
return proto3.util.equals(ListTabResult, a, b);
}
}

View File

@@ -0,0 +1,71 @@
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file viz-translations.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { DeleteAllTranslationsRequest, DeleteAllTranslationsResult, DeleteTranslationsRequest, DeleteTranslationsResult, GetLanguagesRequest, GetLanguagesResult, GetTranslationsRequest, GetTranslationsResult, ListTranslationsRequest, ListTranslationsResult, PutTranslationsRequest, PutTranslationsResult } from "./viz-translations_pb.js";
import { MethodKind } from "@bufbuild/protobuf";
/**
* @generated from service vizapi.TranslationsService
*/
export const TranslationsService = {
typeName: "vizapi.TranslationsService",
methods: {
/**
* @generated from rpc vizapi.TranslationsService.Get
*/
get: {
name: "Get",
I: GetTranslationsRequest,
O: GetTranslationsResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.TranslationsService.Put
*/
put: {
name: "Put",
I: PutTranslationsRequest,
O: PutTranslationsResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.TranslationsService.Delete
*/
delete: {
name: "Delete",
I: DeleteTranslationsRequest,
O: DeleteTranslationsResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.TranslationsService.List
*/
list: {
name: "List",
I: ListTranslationsRequest,
O: ListTranslationsResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.TranslationsService.DeleteAll
*/
deleteAll: {
name: "DeleteAll",
I: DeleteAllTranslationsRequest,
O: DeleteAllTranslationsResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.TranslationsService.GetLanguages
*/
getLanguages: {
name: "GetLanguages",
I: GetLanguagesRequest,
O: GetLanguagesResult,
kind: MethodKind.Unary,
},
}
} as const;

773
viz-translations_pb.ts Normal file
View File

@@ -0,0 +1,773 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file viz-translations.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { RequestProjectHeader } from "./core/shared_pb.js";
/**
* @generated from message vizapi.Label
*/
export class Label extends Message<Label> {
/**
* ID of the label (unique, ProjectID + Context + Label)
*
* @generated from field: string ID = 1;
*/
ID = "";
/**
* ID of the project
*
* @generated from field: string ProjectID = 2;
*/
ProjectID = "";
/**
* Context of the label (ex: "Order", "Product", "Customer", "User", "...")
*
* @generated from field: string Context = 3;
*/
Context = "";
/**
* Label (ex: "Status", "Color", "Size")
*
* @generated from field: string Label = 4;
*/
Label = "";
constructor(data?: PartialMessage<Label>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.Label";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "ProjectID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Context", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "Label", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Label {
return new Label().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Label {
return new Label().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Label {
return new Label().fromJsonString(jsonString, options);
}
static equals(a: Label | PlainMessage<Label> | undefined, b: Label | PlainMessage<Label> | undefined): boolean {
return proto3.util.equals(Label, a, b);
}
}
/**
* @generated from message vizapi.LanguageCode
*/
export class LanguageCode extends Message<LanguageCode> {
/**
* ISO 639-1 code
*
* @generated from field: string Code = 1;
*/
Code = "";
constructor(data?: PartialMessage<LanguageCode>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.LanguageCode";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LanguageCode {
return new LanguageCode().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LanguageCode {
return new LanguageCode().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LanguageCode {
return new LanguageCode().fromJsonString(jsonString, options);
}
static equals(a: LanguageCode | PlainMessage<LanguageCode> | undefined, b: LanguageCode | PlainMessage<LanguageCode> | undefined): boolean {
return proto3.util.equals(LanguageCode, a, b);
}
}
/**
* @generated from message vizapi.Translation
*/
export class Translation extends Message<Translation> {
/**
* ID of the label (unique, ProjectID + Context + Label)
*
* @generated from field: string LabelID = 1;
*/
LabelID = "";
/**
* ICU - ISO 639-1 code
*
* @generated from field: string LanguageCode = 2;
*/
LanguageCode = "";
/**
* Translation of the label in the given language code
*
* @generated from field: string Translation = 3;
*/
Translation = "";
constructor(data?: PartialMessage<Translation>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.Translation";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "LabelID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "LanguageCode", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Translation", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Translation {
return new Translation().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Translation {
return new Translation().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Translation {
return new Translation().fromJsonString(jsonString, options);
}
static equals(a: Translation | PlainMessage<Translation> | undefined, b: Translation | PlainMessage<Translation> | undefined): boolean {
return proto3.util.equals(Translation, a, b);
}
}
/**
* @generated from message vizapi.GetTranslationsRequest
*/
export class GetTranslationsRequest extends Message<GetTranslationsRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* @generated from field: string Context = 2;
*/
Context = "";
/**
* @generated from field: string Label = 3;
*/
Label = "";
constructor(data?: PartialMessage<GetTranslationsRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetTranslationsRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "Context", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Label", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetTranslationsRequest {
return new GetTranslationsRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetTranslationsRequest {
return new GetTranslationsRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetTranslationsRequest {
return new GetTranslationsRequest().fromJsonString(jsonString, options);
}
static equals(a: GetTranslationsRequest | PlainMessage<GetTranslationsRequest> | undefined, b: GetTranslationsRequest | PlainMessage<GetTranslationsRequest> | undefined): boolean {
return proto3.util.equals(GetTranslationsRequest, a, b);
}
}
/**
* @generated from message vizapi.GetTranslationsResult
*/
export class GetTranslationsResult extends Message<GetTranslationsResult> {
/**
* @generated from field: repeated vizapi.Translation Translations = 1;
*/
Translations: Translation[] = [];
constructor(data?: PartialMessage<GetTranslationsResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetTranslationsResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Translations", kind: "message", T: Translation, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetTranslationsResult {
return new GetTranslationsResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetTranslationsResult {
return new GetTranslationsResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetTranslationsResult {
return new GetTranslationsResult().fromJsonString(jsonString, options);
}
static equals(a: GetTranslationsResult | PlainMessage<GetTranslationsResult> | undefined, b: GetTranslationsResult | PlainMessage<GetTranslationsResult> | undefined): boolean {
return proto3.util.equals(GetTranslationsResult, a, b);
}
}
/**
* Message used to Put a translation for a label in the PutTranslationsRequest
*
* @generated from message vizapi.PutTranslationMessage
*/
export class PutTranslationMessage extends Message<PutTranslationMessage> {
/**
* @generated from field: string LanguageCode = 1;
*/
LanguageCode = "";
/**
* @generated from field: string Translation = 2;
*/
Translation = "";
constructor(data?: PartialMessage<PutTranslationMessage>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.PutTranslationMessage";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "LanguageCode", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Translation", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PutTranslationMessage {
return new PutTranslationMessage().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PutTranslationMessage {
return new PutTranslationMessage().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PutTranslationMessage {
return new PutTranslationMessage().fromJsonString(jsonString, options);
}
static equals(a: PutTranslationMessage | PlainMessage<PutTranslationMessage> | undefined, b: PutTranslationMessage | PlainMessage<PutTranslationMessage> | undefined): boolean {
return proto3.util.equals(PutTranslationMessage, a, b);
}
}
/**
* @generated from message vizapi.PutTranslationsRequest
*/
export class PutTranslationsRequest extends Message<PutTranslationsRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* @generated from field: string Context = 2;
*/
Context = "";
/**
* @generated from field: string Label = 3;
*/
Label = "";
/**
* @generated from field: repeated vizapi.PutTranslationMessage Translations = 4;
*/
Translations: PutTranslationMessage[] = [];
constructor(data?: PartialMessage<PutTranslationsRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.PutTranslationsRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "Context", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Label", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "Translations", kind: "message", T: PutTranslationMessage, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PutTranslationsRequest {
return new PutTranslationsRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PutTranslationsRequest {
return new PutTranslationsRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PutTranslationsRequest {
return new PutTranslationsRequest().fromJsonString(jsonString, options);
}
static equals(a: PutTranslationsRequest | PlainMessage<PutTranslationsRequest> | undefined, b: PutTranslationsRequest | PlainMessage<PutTranslationsRequest> | undefined): boolean {
return proto3.util.equals(PutTranslationsRequest, a, b);
}
}
/**
* @generated from message vizapi.PutTranslationsResult
*/
export class PutTranslationsResult extends Message<PutTranslationsResult> {
/**
* @generated from field: repeated vizapi.Translation Translations = 1;
*/
Translations: Translation[] = [];
constructor(data?: PartialMessage<PutTranslationsResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.PutTranslationsResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Translations", kind: "message", T: Translation, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PutTranslationsResult {
return new PutTranslationsResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PutTranslationsResult {
return new PutTranslationsResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PutTranslationsResult {
return new PutTranslationsResult().fromJsonString(jsonString, options);
}
static equals(a: PutTranslationsResult | PlainMessage<PutTranslationsResult> | undefined, b: PutTranslationsResult | PlainMessage<PutTranslationsResult> | undefined): boolean {
return proto3.util.equals(PutTranslationsResult, a, b);
}
}
/**
* @generated from message vizapi.DeleteTranslationsRequest
*/
export class DeleteTranslationsRequest extends Message<DeleteTranslationsRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* @generated from field: string Context = 2;
*/
Context = "";
/**
* @generated from field: string Label = 3;
*/
Label = "";
constructor(data?: PartialMessage<DeleteTranslationsRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteTranslationsRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "Context", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Label", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteTranslationsRequest {
return new DeleteTranslationsRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteTranslationsRequest {
return new DeleteTranslationsRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteTranslationsRequest {
return new DeleteTranslationsRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteTranslationsRequest | PlainMessage<DeleteTranslationsRequest> | undefined, b: DeleteTranslationsRequest | PlainMessage<DeleteTranslationsRequest> | undefined): boolean {
return proto3.util.equals(DeleteTranslationsRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteTranslationsResult
*/
export class DeleteTranslationsResult extends Message<DeleteTranslationsResult> {
constructor(data?: PartialMessage<DeleteTranslationsResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteTranslationsResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteTranslationsResult {
return new DeleteTranslationsResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteTranslationsResult {
return new DeleteTranslationsResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteTranslationsResult {
return new DeleteTranslationsResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteTranslationsResult | PlainMessage<DeleteTranslationsResult> | undefined, b: DeleteTranslationsResult | PlainMessage<DeleteTranslationsResult> | undefined): boolean {
return proto3.util.equals(DeleteTranslationsResult, a, b);
}
}
/**
* @generated from message vizapi.ListTranslationsRequest
*/
export class ListTranslationsRequest extends Message<ListTranslationsRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* @generated from field: string LanguageCode = 2;
*/
LanguageCode = "";
constructor(data?: PartialMessage<ListTranslationsRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListTranslationsRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "LanguageCode", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListTranslationsRequest {
return new ListTranslationsRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListTranslationsRequest {
return new ListTranslationsRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListTranslationsRequest {
return new ListTranslationsRequest().fromJsonString(jsonString, options);
}
static equals(a: ListTranslationsRequest | PlainMessage<ListTranslationsRequest> | undefined, b: ListTranslationsRequest | PlainMessage<ListTranslationsRequest> | undefined): boolean {
return proto3.util.equals(ListTranslationsRequest, a, b);
}
}
/**
* Messages for the ListTranslationsResult
*
* @generated from message vizapi.TranslationContextResult
*/
export class TranslationContextResult extends Message<TranslationContextResult> {
/**
* @generated from field: string Name = 1;
*/
Name = "";
/**
* @generated from field: repeated vizapi.TranslationLabelResult Labels = 2;
*/
Labels: TranslationLabelResult[] = [];
constructor(data?: PartialMessage<TranslationContextResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.TranslationContextResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Labels", kind: "message", T: TranslationLabelResult, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TranslationContextResult {
return new TranslationContextResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TranslationContextResult {
return new TranslationContextResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TranslationContextResult {
return new TranslationContextResult().fromJsonString(jsonString, options);
}
static equals(a: TranslationContextResult | PlainMessage<TranslationContextResult> | undefined, b: TranslationContextResult | PlainMessage<TranslationContextResult> | undefined): boolean {
return proto3.util.equals(TranslationContextResult, a, b);
}
}
/**
* @generated from message vizapi.TranslationLabelResult
*/
export class TranslationLabelResult extends Message<TranslationLabelResult> {
/**
* @generated from field: string Name = 1;
*/
Name = "";
/**
* @generated from field: string Translation = 2;
*/
Translation = "";
constructor(data?: PartialMessage<TranslationLabelResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.TranslationLabelResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Translation", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TranslationLabelResult {
return new TranslationLabelResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TranslationLabelResult {
return new TranslationLabelResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TranslationLabelResult {
return new TranslationLabelResult().fromJsonString(jsonString, options);
}
static equals(a: TranslationLabelResult | PlainMessage<TranslationLabelResult> | undefined, b: TranslationLabelResult | PlainMessage<TranslationLabelResult> | undefined): boolean {
return proto3.util.equals(TranslationLabelResult, a, b);
}
}
/**
* @generated from message vizapi.ListTranslationsResult
*/
export class ListTranslationsResult extends Message<ListTranslationsResult> {
/**
* @generated from field: repeated vizapi.TranslationContextResult Contexts = 1;
*/
Contexts: TranslationContextResult[] = [];
constructor(data?: PartialMessage<ListTranslationsResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListTranslationsResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Contexts", kind: "message", T: TranslationContextResult, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListTranslationsResult {
return new ListTranslationsResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListTranslationsResult {
return new ListTranslationsResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListTranslationsResult {
return new ListTranslationsResult().fromJsonString(jsonString, options);
}
static equals(a: ListTranslationsResult | PlainMessage<ListTranslationsResult> | undefined, b: ListTranslationsResult | PlainMessage<ListTranslationsResult> | undefined): boolean {
return proto3.util.equals(ListTranslationsResult, a, b);
}
}
/**
* @generated from message vizapi.DeleteAllTranslationsRequest
*/
export class DeleteAllTranslationsRequest extends Message<DeleteAllTranslationsRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
constructor(data?: PartialMessage<DeleteAllTranslationsRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteAllTranslationsRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteAllTranslationsRequest {
return new DeleteAllTranslationsRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteAllTranslationsRequest {
return new DeleteAllTranslationsRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteAllTranslationsRequest {
return new DeleteAllTranslationsRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteAllTranslationsRequest | PlainMessage<DeleteAllTranslationsRequest> | undefined, b: DeleteAllTranslationsRequest | PlainMessage<DeleteAllTranslationsRequest> | undefined): boolean {
return proto3.util.equals(DeleteAllTranslationsRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteAllTranslationsResult
*/
export class DeleteAllTranslationsResult extends Message<DeleteAllTranslationsResult> {
constructor(data?: PartialMessage<DeleteAllTranslationsResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteAllTranslationsResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteAllTranslationsResult {
return new DeleteAllTranslationsResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteAllTranslationsResult {
return new DeleteAllTranslationsResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteAllTranslationsResult {
return new DeleteAllTranslationsResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteAllTranslationsResult | PlainMessage<DeleteAllTranslationsResult> | undefined, b: DeleteAllTranslationsResult | PlainMessage<DeleteAllTranslationsResult> | undefined): boolean {
return proto3.util.equals(DeleteAllTranslationsResult, a, b);
}
}
/**
* @generated from message vizapi.GetLanguagesRequest
*/
export class GetLanguagesRequest extends Message<GetLanguagesRequest> {
constructor(data?: PartialMessage<GetLanguagesRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetLanguagesRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetLanguagesRequest {
return new GetLanguagesRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetLanguagesRequest {
return new GetLanguagesRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetLanguagesRequest {
return new GetLanguagesRequest().fromJsonString(jsonString, options);
}
static equals(a: GetLanguagesRequest | PlainMessage<GetLanguagesRequest> | undefined, b: GetLanguagesRequest | PlainMessage<GetLanguagesRequest> | undefined): boolean {
return proto3.util.equals(GetLanguagesRequest, a, b);
}
}
/**
* @generated from message vizapi.GetLanguagesResult
*/
export class GetLanguagesResult extends Message<GetLanguagesResult> {
/**
* @generated from field: repeated vizapi.LanguageCode Languages = 1;
*/
Languages: LanguageCode[] = [];
constructor(data?: PartialMessage<GetLanguagesResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetLanguagesResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Languages", kind: "message", T: LanguageCode, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetLanguagesResult {
return new GetLanguagesResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetLanguagesResult {
return new GetLanguagesResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetLanguagesResult {
return new GetLanguagesResult().fromJsonString(jsonString, options);
}
static equals(a: GetLanguagesResult | PlainMessage<GetLanguagesResult> | undefined, b: GetLanguagesResult | PlainMessage<GetLanguagesResult> | undefined): boolean {
return proto3.util.equals(GetLanguagesResult, a, b);
}
}

View File

@@ -0,0 +1,53 @@
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file viz-user-settings.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { DeleteUserSettingRequest, DeleteUserSettingResult, GetUserSettingRequest, GetUserSettingResult, ListUserSettingsRequest, ListUserSettingsResult, PutUserSettingRequest, PutUserSettingResult } from "./viz-user-settings_pb.js";
import { MethodKind } from "@bufbuild/protobuf";
/**
* @generated from service vizapi.UserSettingsService
*/
export const UserSettingsService = {
typeName: "vizapi.UserSettingsService",
methods: {
/**
* @generated from rpc vizapi.UserSettingsService.Get
*/
get: {
name: "Get",
I: GetUserSettingRequest,
O: GetUserSettingResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.UserSettingsService.Put
*/
put: {
name: "Put",
I: PutUserSettingRequest,
O: PutUserSettingResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.UserSettingsService.Delete
*/
delete: {
name: "Delete",
I: DeleteUserSettingRequest,
O: DeleteUserSettingResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.UserSettingsService.List
*/
list: {
name: "List",
I: ListUserSettingsRequest,
O: ListUserSettingsResult,
kind: MethodKind.Unary,
},
}
} as const;

373
viz-user-settings_pb.ts Normal file
View File

@@ -0,0 +1,373 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file viz-user-settings.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* @generated from message vizapi.UserSetting
*/
export class UserSetting extends Message<UserSetting> {
/**
* @generated from field: string UserID = 1;
*/
UserID = "";
/**
* @generated from field: string Key = 2;
*/
Key = "";
/**
* @generated from field: string Value = 3;
*/
Value = "";
constructor(data?: PartialMessage<UserSetting>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.UserSetting";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "UserID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UserSetting {
return new UserSetting().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UserSetting {
return new UserSetting().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UserSetting {
return new UserSetting().fromJsonString(jsonString, options);
}
static equals(a: UserSetting | PlainMessage<UserSetting> | undefined, b: UserSetting | PlainMessage<UserSetting> | undefined): boolean {
return proto3.util.equals(UserSetting, a, b);
}
}
/**
* Key, Value pair to store
*
* @generated from message vizapi.PutUserSettingRequest
*/
export class PutUserSettingRequest extends Message<PutUserSettingRequest> {
/**
* Key: each key must be unique
*
* @generated from field: string Key = 1;
*/
Key = "";
/**
* @generated from field: string Value = 2;
*/
Value = "";
constructor(data?: PartialMessage<PutUserSettingRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.PutUserSettingRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PutUserSettingRequest {
return new PutUserSettingRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PutUserSettingRequest {
return new PutUserSettingRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PutUserSettingRequest {
return new PutUserSettingRequest().fromJsonString(jsonString, options);
}
static equals(a: PutUserSettingRequest | PlainMessage<PutUserSettingRequest> | undefined, b: PutUserSettingRequest | PlainMessage<PutUserSettingRequest> | undefined): boolean {
return proto3.util.equals(PutUserSettingRequest, a, b);
}
}
/**
* Key, Value pair response
*
* @generated from message vizapi.PutUserSettingResult
*/
export class PutUserSettingResult extends Message<PutUserSettingResult> {
/**
* @generated from field: string Key = 1;
*/
Key = "";
/**
* @generated from field: string Value = 2;
*/
Value = "";
constructor(data?: PartialMessage<PutUserSettingResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.PutUserSettingResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PutUserSettingResult {
return new PutUserSettingResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PutUserSettingResult {
return new PutUserSettingResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PutUserSettingResult {
return new PutUserSettingResult().fromJsonString(jsonString, options);
}
static equals(a: PutUserSettingResult | PlainMessage<PutUserSettingResult> | undefined, b: PutUserSettingResult | PlainMessage<PutUserSettingResult> | undefined): boolean {
return proto3.util.equals(PutUserSettingResult, a, b);
}
}
/**
* Key of the user's setting to get
*
* @generated from message vizapi.GetUserSettingRequest
*/
export class GetUserSettingRequest extends Message<GetUserSettingRequest> {
/**
* @generated from field: string Key = 2;
*/
Key = "";
constructor(data?: PartialMessage<GetUserSettingRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetUserSettingRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 2, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetUserSettingRequest {
return new GetUserSettingRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetUserSettingRequest {
return new GetUserSettingRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetUserSettingRequest {
return new GetUserSettingRequest().fromJsonString(jsonString, options);
}
static equals(a: GetUserSettingRequest | PlainMessage<GetUserSettingRequest> | undefined, b: GetUserSettingRequest | PlainMessage<GetUserSettingRequest> | undefined): boolean {
return proto3.util.equals(GetUserSettingRequest, a, b);
}
}
/**
* Key, Value pair response
*
* @generated from message vizapi.GetUserSettingResult
*/
export class GetUserSettingResult extends Message<GetUserSettingResult> {
/**
* @generated from field: string Key = 1;
*/
Key = "";
/**
* @generated from field: string Value = 2;
*/
Value = "";
constructor(data?: PartialMessage<GetUserSettingResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetUserSettingResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetUserSettingResult {
return new GetUserSettingResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetUserSettingResult {
return new GetUserSettingResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetUserSettingResult {
return new GetUserSettingResult().fromJsonString(jsonString, options);
}
static equals(a: GetUserSettingResult | PlainMessage<GetUserSettingResult> | undefined, b: GetUserSettingResult | PlainMessage<GetUserSettingResult> | undefined): boolean {
return proto3.util.equals(GetUserSettingResult, a, b);
}
}
/**
* Key of the user's setting to delete
*
* @generated from message vizapi.DeleteUserSettingRequest
*/
export class DeleteUserSettingRequest extends Message<DeleteUserSettingRequest> {
/**
* @generated from field: string Key = 2;
*/
Key = "";
constructor(data?: PartialMessage<DeleteUserSettingRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteUserSettingRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 2, name: "Key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteUserSettingRequest {
return new DeleteUserSettingRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteUserSettingRequest {
return new DeleteUserSettingRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteUserSettingRequest {
return new DeleteUserSettingRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteUserSettingRequest | PlainMessage<DeleteUserSettingRequest> | undefined, b: DeleteUserSettingRequest | PlainMessage<DeleteUserSettingRequest> | undefined): boolean {
return proto3.util.equals(DeleteUserSettingRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteUserSettingResult
*/
export class DeleteUserSettingResult extends Message<DeleteUserSettingResult> {
constructor(data?: PartialMessage<DeleteUserSettingResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteUserSettingResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteUserSettingResult {
return new DeleteUserSettingResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteUserSettingResult {
return new DeleteUserSettingResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteUserSettingResult {
return new DeleteUserSettingResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteUserSettingResult | PlainMessage<DeleteUserSettingResult> | undefined, b: DeleteUserSettingResult | PlainMessage<DeleteUserSettingResult> | undefined): boolean {
return proto3.util.equals(DeleteUserSettingResult, a, b);
}
}
/**
* @generated from message vizapi.ListUserSettingsRequest
*/
export class ListUserSettingsRequest extends Message<ListUserSettingsRequest> {
constructor(data?: PartialMessage<ListUserSettingsRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListUserSettingsRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListUserSettingsRequest {
return new ListUserSettingsRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListUserSettingsRequest {
return new ListUserSettingsRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListUserSettingsRequest {
return new ListUserSettingsRequest().fromJsonString(jsonString, options);
}
static equals(a: ListUserSettingsRequest | PlainMessage<ListUserSettingsRequest> | undefined, b: ListUserSettingsRequest | PlainMessage<ListUserSettingsRequest> | undefined): boolean {
return proto3.util.equals(ListUserSettingsRequest, a, b);
}
}
/**
* List of the user's settings
*
* @generated from message vizapi.ListUserSettingsResult
*/
export class ListUserSettingsResult extends Message<ListUserSettingsResult> {
/**
* @generated from field: repeated vizapi.GetUserSettingResult UserSettings = 1;
*/
UserSettings: GetUserSettingResult[] = [];
constructor(data?: PartialMessage<ListUserSettingsResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListUserSettingsResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "UserSettings", kind: "message", T: GetUserSettingResult, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListUserSettingsResult {
return new ListUserSettingsResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListUserSettingsResult {
return new ListUserSettingsResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListUserSettingsResult {
return new ListUserSettingsResult().fromJsonString(jsonString, options);
}
static equals(a: ListUserSettingsResult | PlainMessage<ListUserSettingsResult> | undefined, b: ListUserSettingsResult | PlainMessage<ListUserSettingsResult> | undefined): boolean {
return proto3.util.equals(ListUserSettingsResult, a, b);
}
}

80
viz-view_connect.ts Normal file
View File

@@ -0,0 +1,80 @@
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file viz-view.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { CreateViewRequest, CreateViewResult, DeleteViewRequest, DeleteViewResult, DeleteViewsForProjectRequest, DeleteViewsForProjectResult, ExtractRequest, ExtractResult, GetViewRequest, GetViewResult, ListViewRequest, ListViewResult, UpdateViewRequest, UpdateViewResult } from "./viz-view_pb.js";
import { MethodKind } from "@bufbuild/protobuf";
/**
* @generated from service vizapi.ViewService
*/
export const ViewService = {
typeName: "vizapi.ViewService",
methods: {
/**
* @generated from rpc vizapi.ViewService.Get
*/
get: {
name: "Get",
I: GetViewRequest,
O: GetViewResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ViewService.Create
*/
create: {
name: "Create",
I: CreateViewRequest,
O: CreateViewResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ViewService.Update
*/
update: {
name: "Update",
I: UpdateViewRequest,
O: UpdateViewResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ViewService.Delete
*/
delete: {
name: "Delete",
I: DeleteViewRequest,
O: DeleteViewResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ViewService.List
*/
list: {
name: "List",
I: ListViewRequest,
O: ListViewResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ViewService.DeleteViewsForProject
*/
deleteViewsForProject: {
name: "DeleteViewsForProject",
I: DeleteViewsForProjectRequest,
O: DeleteViewsForProjectResult,
kind: MethodKind.Unary,
},
/**
* @generated from rpc vizapi.ViewService.Extract
*/
extract: {
name: "Extract",
I: ExtractRequest,
O: ExtractResult,
kind: MethodKind.Unary,
},
}
} as const;

991
viz-view_pb.ts Normal file
View File

@@ -0,0 +1,991 @@
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file viz-view.proto (package vizapi, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { BlockFilter, RequestProjectHeader } from "./core/shared_pb.js";
/**
* @generated from message vizapi.View
*/
export class View extends Message<View> {
/**
* Identifier of the View
*
* @generated from field: string ViewID = 1;
*/
ViewID = "";
/**
* Identifier of the Project
*
* @generated from field: string ProjectID = 2;
*/
ProjectID = "";
/**
* Identifier of the screen
*
* @generated from field: string ScreenID = 3;
*/
ScreenID = "";
/**
* Identifier of the user who created
*
* @generated from field: string CreateUserID = 4;
*/
CreateUserID = "";
/**
* Identifier of the user who did last update
*
* @generated from field: string UpdateUserID = 5;
*/
UpdateUserID = "";
/**
* Date of creation in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z]
*
* @generated from field: string CreateDateTime = 6;
*/
CreateDateTime = "";
/**
* Date of last update in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z]
*
* @generated from field: string UpdateDateTime = 7;
*/
UpdateDateTime = "";
/**
* Content of the View
*
* @generated from field: string Payload = 10;
*/
Payload = "";
/**
* Visibility of the View
*
* @generated from field: bool IsPrivate = 12;
*/
IsPrivate = false;
/**
* Name of the View
*
* @generated from field: string Name = 13;
*/
Name = "";
constructor(data?: PartialMessage<View>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.View";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ViewID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "ProjectID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "ScreenID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "CreateUserID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "UpdateUserID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 6, name: "CreateDateTime", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 7, name: "UpdateDateTime", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 10, name: "Payload", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 12, name: "IsPrivate", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 13, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): View {
return new View().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): View {
return new View().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): View {
return new View().fromJsonString(jsonString, options);
}
static equals(a: View | PlainMessage<View> | undefined, b: View | PlainMessage<View> | undefined): boolean {
return proto3.util.equals(View, a, b);
}
}
/**
* @generated from message vizapi.ComposedUserView
*/
export class ComposedUserView extends Message<ComposedUserView> {
/**
* Identifier of the View
*
* @generated from field: string ViewID = 1;
*/
ViewID = "";
/**
* Name of the View
*
* @generated from field: string Name = 2;
*/
Name = "";
/**
* Identifier of the User
*
* @generated from field: string UserID = 3;
*/
UserID = "";
/**
* Identifier of the Project
*
* @generated from field: string ProjectID = 4;
*/
ProjectID = "";
/**
* Identifier of the Screen
*
* @generated from field: string ScreenID = 5;
*/
ScreenID = "";
/**
* Content of the View
*
* @generated from field: string Payload = 6;
*/
Payload = "";
/**
* Visibility of the View
*
* @generated from field: bool IsPrivate = 9;
*/
IsPrivate = false;
constructor(data?: PartialMessage<ComposedUserView>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ComposedUserView";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ViewID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "UserID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "ProjectID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "ScreenID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 6, name: "Payload", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 9, name: "IsPrivate", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ComposedUserView {
return new ComposedUserView().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ComposedUserView {
return new ComposedUserView().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ComposedUserView {
return new ComposedUserView().fromJsonString(jsonString, options);
}
static equals(a: ComposedUserView | PlainMessage<ComposedUserView> | undefined, b: ComposedUserView | PlainMessage<ComposedUserView> | undefined): boolean {
return proto3.util.equals(ComposedUserView, a, b);
}
}
/**
* IDs of the View
*
* @generated from message vizapi.GetViewRequest
*/
export class GetViewRequest extends Message<GetViewRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Identifier of the View
*
* @generated from field: string ViewID = 2;
*/
ViewID = "";
constructor(data?: PartialMessage<GetViewRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetViewRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "ViewID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetViewRequest {
return new GetViewRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetViewRequest {
return new GetViewRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetViewRequest {
return new GetViewRequest().fromJsonString(jsonString, options);
}
static equals(a: GetViewRequest | PlainMessage<GetViewRequest> | undefined, b: GetViewRequest | PlainMessage<GetViewRequest> | undefined): boolean {
return proto3.util.equals(GetViewRequest, a, b);
}
}
/**
* All information about the View
*
* @generated from message vizapi.GetViewResult
*/
export class GetViewResult extends Message<GetViewResult> {
/**
* @generated from field: vizapi.ComposedUserView Result = 1;
*/
Result?: ComposedUserView;
constructor(data?: PartialMessage<GetViewResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.GetViewResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Result", kind: "message", T: ComposedUserView },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetViewResult {
return new GetViewResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetViewResult {
return new GetViewResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetViewResult {
return new GetViewResult().fromJsonString(jsonString, options);
}
static equals(a: GetViewResult | PlainMessage<GetViewResult> | undefined, b: GetViewResult | PlainMessage<GetViewResult> | undefined): boolean {
return proto3.util.equals(GetViewResult, a, b);
}
}
/**
* Information that needs to be stored
*
* @generated from message vizapi.CreateViewRequest
*/
export class CreateViewRequest extends Message<CreateViewRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Name of the View
*
* @generated from field: string Name = 2;
*/
Name = "";
/**
* Identifier of the Screen
*
* @generated from field: string ScreenID = 3;
*/
ScreenID = "";
/**
* Content of the View
*
* @generated from field: string Payload = 5;
*/
Payload = "";
/**
* Visibility of the View
*
* @generated from field: bool IsPrivate = 7;
*/
IsPrivate = false;
constructor(data?: PartialMessage<CreateViewRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.CreateViewRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "ScreenID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "Payload", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 7, name: "IsPrivate", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateViewRequest {
return new CreateViewRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateViewRequest {
return new CreateViewRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateViewRequest {
return new CreateViewRequest().fromJsonString(jsonString, options);
}
static equals(a: CreateViewRequest | PlainMessage<CreateViewRequest> | undefined, b: CreateViewRequest | PlainMessage<CreateViewRequest> | undefined): boolean {
return proto3.util.equals(CreateViewRequest, a, b);
}
}
/**
* ID of the created View
*
* @generated from message vizapi.CreateViewResult
*/
export class CreateViewResult extends Message<CreateViewResult> {
/**
* Identifier of the View
*
* @generated from field: string ViewID = 1;
*/
ViewID = "";
constructor(data?: PartialMessage<CreateViewResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.CreateViewResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ViewID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateViewResult {
return new CreateViewResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateViewResult {
return new CreateViewResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateViewResult {
return new CreateViewResult().fromJsonString(jsonString, options);
}
static equals(a: CreateViewResult | PlainMessage<CreateViewResult> | undefined, b: CreateViewResult | PlainMessage<CreateViewResult> | undefined): boolean {
return proto3.util.equals(CreateViewResult, a, b);
}
}
/**
* Information that needs to be updated
*
* @generated from message vizapi.UpdateViewRequest
*/
export class UpdateViewRequest extends Message<UpdateViewRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Identifier of the View
*
* @generated from field: string ViewID = 2;
*/
ViewID = "";
/**
* Name of the View
*
* @generated from field: string Name = 3;
*/
Name = "";
/**
* Identifier of the Screen
*
* @generated from field: string ScreenID = 4;
*/
ScreenID = "";
/**
* Content of the View
*
* @generated from field: string Payload = 6;
*/
Payload = "";
/**
* Visibility of the View
*
* @generated from field: bool IsPrivate = 8;
*/
IsPrivate = false;
constructor(data?: PartialMessage<UpdateViewRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.UpdateViewRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "ViewID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "ScreenID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 6, name: "Payload", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 8, name: "IsPrivate", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateViewRequest {
return new UpdateViewRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateViewRequest {
return new UpdateViewRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateViewRequest {
return new UpdateViewRequest().fromJsonString(jsonString, options);
}
static equals(a: UpdateViewRequest | PlainMessage<UpdateViewRequest> | undefined, b: UpdateViewRequest | PlainMessage<UpdateViewRequest> | undefined): boolean {
return proto3.util.equals(UpdateViewRequest, a, b);
}
}
/**
* Updated View ID
*
* @generated from message vizapi.UpdateViewResult
*/
export class UpdateViewResult extends Message<UpdateViewResult> {
/**
* Identifier of the View
*
* @generated from field: string ViewID = 1;
*/
ViewID = "";
constructor(data?: PartialMessage<UpdateViewResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.UpdateViewResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ViewID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateViewResult {
return new UpdateViewResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateViewResult {
return new UpdateViewResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateViewResult {
return new UpdateViewResult().fromJsonString(jsonString, options);
}
static equals(a: UpdateViewResult | PlainMessage<UpdateViewResult> | undefined, b: UpdateViewResult | PlainMessage<UpdateViewResult> | undefined): boolean {
return proto3.util.equals(UpdateViewResult, a, b);
}
}
/**
* IDs of the View to be deleted
*
* @generated from message vizapi.DeleteViewRequest
*/
export class DeleteViewRequest extends Message<DeleteViewRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Identifier of the View
*
* @generated from field: string ViewID = 2;
*/
ViewID = "";
constructor(data?: PartialMessage<DeleteViewRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteViewRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "ViewID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteViewRequest {
return new DeleteViewRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteViewRequest {
return new DeleteViewRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteViewRequest {
return new DeleteViewRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteViewRequest | PlainMessage<DeleteViewRequest> | undefined, b: DeleteViewRequest | PlainMessage<DeleteViewRequest> | undefined): boolean {
return proto3.util.equals(DeleteViewRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteViewResult
*/
export class DeleteViewResult extends Message<DeleteViewResult> {
constructor(data?: PartialMessage<DeleteViewResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteViewResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteViewResult {
return new DeleteViewResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteViewResult {
return new DeleteViewResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteViewResult {
return new DeleteViewResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteViewResult | PlainMessage<DeleteViewResult> | undefined, b: DeleteViewResult | PlainMessage<DeleteViewResult> | undefined): boolean {
return proto3.util.equals(DeleteViewResult, a, b);
}
}
/**
* @generated from message vizapi.ListViewRequest
*/
export class ListViewRequest extends Message<ListViewRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* Identifier of the Screen
*
* @generated from field: string ScreenID = 2;
*/
ScreenID = "";
constructor(data?: PartialMessage<ListViewRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListViewRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "ScreenID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListViewRequest {
return new ListViewRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListViewRequest {
return new ListViewRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListViewRequest {
return new ListViewRequest().fromJsonString(jsonString, options);
}
static equals(a: ListViewRequest | PlainMessage<ListViewRequest> | undefined, b: ListViewRequest | PlainMessage<ListViewRequest> | undefined): boolean {
return proto3.util.equals(ListViewRequest, a, b);
}
}
/**
* List of Views
*
* @generated from message vizapi.ListViewResult
*/
export class ListViewResult extends Message<ListViewResult> {
/**
* All information in a View
*
* @generated from field: repeated vizapi.ComposedUserView Results = 1;
*/
Results: ComposedUserView[] = [];
constructor(data?: PartialMessage<ListViewResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ListViewResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Results", kind: "message", T: ComposedUserView, repeated: true },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListViewResult {
return new ListViewResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListViewResult {
return new ListViewResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListViewResult {
return new ListViewResult().fromJsonString(jsonString, options);
}
static equals(a: ListViewResult | PlainMessage<ListViewResult> | undefined, b: ListViewResult | PlainMessage<ListViewResult> | undefined): boolean {
return proto3.util.equals(ListViewResult, a, b);
}
}
/**
* @generated from message vizapi.DeleteViewsForProjectRequest
*/
export class DeleteViewsForProjectRequest extends Message<DeleteViewsForProjectRequest> {
/**
* Identifier of the Project
*
* @generated from field: string ProjectID = 1;
*/
ProjectID = "";
constructor(data?: PartialMessage<DeleteViewsForProjectRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteViewsForProjectRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "ProjectID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteViewsForProjectRequest {
return new DeleteViewsForProjectRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteViewsForProjectRequest {
return new DeleteViewsForProjectRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteViewsForProjectRequest {
return new DeleteViewsForProjectRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteViewsForProjectRequest | PlainMessage<DeleteViewsForProjectRequest> | undefined, b: DeleteViewsForProjectRequest | PlainMessage<DeleteViewsForProjectRequest> | undefined): boolean {
return proto3.util.equals(DeleteViewsForProjectRequest, a, b);
}
}
/**
* @generated from message vizapi.DeleteViewsForProjectResult
*/
export class DeleteViewsForProjectResult extends Message<DeleteViewsForProjectResult> {
constructor(data?: PartialMessage<DeleteViewsForProjectResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.DeleteViewsForProjectResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteViewsForProjectResult {
return new DeleteViewsForProjectResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteViewsForProjectResult {
return new DeleteViewsForProjectResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteViewsForProjectResult {
return new DeleteViewsForProjectResult().fromJsonString(jsonString, options);
}
static equals(a: DeleteViewsForProjectResult | PlainMessage<DeleteViewsForProjectResult> | undefined, b: DeleteViewsForProjectResult | PlainMessage<DeleteViewsForProjectResult> | undefined): boolean {
return proto3.util.equals(DeleteViewsForProjectResult, a, b);
}
}
/**
* @generated from message vizapi.TranslationMap
*/
export class TranslationMap extends Message<TranslationMap> {
/**
* @generated from field: map<string, string> data = 1;
*/
data: { [key: string]: string } = {};
constructor(data?: PartialMessage<TranslationMap>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.TranslationMap";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "data", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TranslationMap {
return new TranslationMap().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TranslationMap {
return new TranslationMap().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TranslationMap {
return new TranslationMap().fromJsonString(jsonString, options);
}
static equals(a: TranslationMap | PlainMessage<TranslationMap> | undefined, b: TranslationMap | PlainMessage<TranslationMap> | undefined): boolean {
return proto3.util.equals(TranslationMap, a, b);
}
}
/**
* @generated from message vizapi.ExtractColumnFormat
*/
export class ExtractColumnFormat extends Message<ExtractColumnFormat> {
/**
* @generated from field: vizapi.ExtractColumnFormat.type Type = 1;
*/
Type = ExtractColumnFormat_type.UNKNOWN;
/**
* @generated from field: string Format = 2;
*/
Format = "";
constructor(data?: PartialMessage<ExtractColumnFormat>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ExtractColumnFormat";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Type", kind: "enum", T: proto3.getEnumType(ExtractColumnFormat_type) },
{ no: 2, name: "Format", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ExtractColumnFormat {
return new ExtractColumnFormat().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ExtractColumnFormat {
return new ExtractColumnFormat().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ExtractColumnFormat {
return new ExtractColumnFormat().fromJsonString(jsonString, options);
}
static equals(a: ExtractColumnFormat | PlainMessage<ExtractColumnFormat> | undefined, b: ExtractColumnFormat | PlainMessage<ExtractColumnFormat> | undefined): boolean {
return proto3.util.equals(ExtractColumnFormat, a, b);
}
}
/**
* @generated from enum vizapi.ExtractColumnFormat.type
*/
export enum ExtractColumnFormat_type {
/**
* @generated from enum value: UNKNOWN = 0;
*/
UNKNOWN = 0,
/**
* @generated from enum value: DATE = 1;
*/
DATE = 1,
/**
* @generated from enum value: SUFFIX = 2;
*/
SUFFIX = 2,
}
// Retrieve enum metadata with: proto3.getEnumType(ExtractColumnFormat_type)
proto3.util.setEnumType(ExtractColumnFormat_type, "vizapi.ExtractColumnFormat.type", [
{ no: 0, name: "UNKNOWN" },
{ no: 1, name: "DATE" },
{ no: 2, name: "SUFFIX" },
]);
/**
* @generated from message vizapi.ExtractRequest
*/
export class ExtractRequest extends Message<ExtractRequest> {
/**
* @generated from field: api.RequestProjectHeader Header = 1;
*/
Header?: RequestProjectHeader;
/**
* @generated from field: string ViewID = 2;
*/
ViewID = "";
/**
* BlockFilter structure for Find query
*
* @generated from field: repeated api.BlockFilter BlockFilters = 3;
*/
BlockFilters: BlockFilter[] = [];
/**
* Range filter structure for Find query
*
* @generated from field: string ListSeparator = 4;
*/
ListSeparator = "";
/**
* @generated from field: string DecimalSeparator = 5;
*/
DecimalSeparator = "";
/**
* @generated from field: map<string, vizapi.TranslationMap> ColumnTranslationMaps = 8;
*/
ColumnTranslationMaps: { [key: string]: TranslationMap } = {};
/**
* @generated from field: map<int32, vizapi.ExtractColumnFormat> ColumnFormats = 9;
*/
ColumnFormats: { [key: number]: ExtractColumnFormat } = {};
/**
* @generated from field: string TargetTimeZone = 10;
*/
TargetTimeZone = "";
constructor(data?: PartialMessage<ExtractRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ExtractRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "Header", kind: "message", T: RequestProjectHeader },
{ no: 2, name: "ViewID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "BlockFilters", kind: "message", T: BlockFilter, repeated: true },
{ no: 4, name: "ListSeparator", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "DecimalSeparator", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 8, name: "ColumnTranslationMaps", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: TranslationMap} },
{ no: 9, name: "ColumnFormats", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "message", T: ExtractColumnFormat} },
{ no: 10, name: "TargetTimeZone", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ExtractRequest {
return new ExtractRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ExtractRequest {
return new ExtractRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ExtractRequest {
return new ExtractRequest().fromJsonString(jsonString, options);
}
static equals(a: ExtractRequest | PlainMessage<ExtractRequest> | undefined, b: ExtractRequest | PlainMessage<ExtractRequest> | undefined): boolean {
return proto3.util.equals(ExtractRequest, a, b);
}
}
/**
* @generated from message vizapi.ExtractResult
*/
export class ExtractResult extends Message<ExtractResult> {
/**
* @generated from field: string WorkflowID = 1;
*/
WorkflowID = "";
/**
* @generated from field: string RunID = 2;
*/
RunID = "";
constructor(data?: PartialMessage<ExtractResult>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "vizapi.ExtractResult";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "WorkflowID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "RunID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ExtractResult {
return new ExtractResult().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ExtractResult {
return new ExtractResult().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ExtractResult {
return new ExtractResult().fromJsonString(jsonString, options);
}
static equals(a: ExtractResult | PlainMessage<ExtractResult> | undefined, b: ExtractResult | PlainMessage<ExtractResult> | undefined): boolean {
return proto3.util.equals(ExtractResult, a, b);
}
}