@aserto/node-authorizer
Advanced tools
+13
| # Generated by buf. DO NOT EDIT. | ||
| version: v1 | ||
| deps: | ||
| - remote: buf.build | ||
| owner: googleapis | ||
| repository: googleapis | ||
| commit: ee48893a270147348e3edc6c1a03de0e | ||
| digest: shake256:a35b0576a2b55dad72747e786af05c03539c2b96be236c9de39fe10d551931ac252eb68445c0cef6bbd27fa20e8c26eee5b8a9fe9c2fde6f63a03e18f8cf980d | ||
| - remote: buf.build | ||
| owner: grpc-ecosystem | ||
| repository: grpc-gateway | ||
| commit: 3f42134f4c564983838425bc43c7a65f | ||
| digest: shake256:3d11d4c0fe5e05fda0131afefbce233940e27f0c31c5d4e385686aea58ccd30f72053f61af432fa83f1fc11cda57f5f18ca3da26a29064f73c5a0d076bba8d92 |
| import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; | ||
| import { Message, proto3, Struct, Timestamp } from "@bufbuild/protobuf"; | ||
| import { IdentityContext } from "./identity_context_pb.js"; | ||
| import { PolicyContext } from "./policy_context_pb.js"; | ||
| import { PolicyInstance } from "./policy_instance_pb.js"; | ||
| /** | ||
| * represents a decision that an authorizer performed in the past | ||
| * | ||
| * @generated from message aserto.authorizer.v2.api.Decision | ||
| */ | ||
| export declare class Decision extends Message<Decision> { | ||
| /** | ||
| * unique id, replay a decision starting with this, also useful to de-dup | ||
| * | ||
| * @generated from field: string id = 1; | ||
| */ | ||
| id: string; | ||
| /** | ||
| * UTC time when the decision was made | ||
| * | ||
| * @generated from field: google.protobuf.Timestamp timestamp = 2; | ||
| */ | ||
| timestamp?: Timestamp; | ||
| /** | ||
| * Policy path used in decision | ||
| * | ||
| * @generated from field: string path = 3; | ||
| */ | ||
| path: string; | ||
| /** | ||
| * info about user for whom the decision as made | ||
| * | ||
| * @generated from field: aserto.authorizer.v2.api.DecisionUser user = 4; | ||
| */ | ||
| user?: DecisionUser; | ||
| /** | ||
| * info about policy used for the decision | ||
| * | ||
| * @generated from field: aserto.authorizer.v2.api.DecisionPolicy policy = 5; | ||
| */ | ||
| policy?: DecisionPolicy; | ||
| /** | ||
| * outcome of the decisions specified in the policy context | ||
| * | ||
| * @generated from field: map<string, bool> outcomes = 6; | ||
| */ | ||
| outcomes: { | ||
| [key: string]: boolean; | ||
| }; | ||
| /** | ||
| * the resource context used in a decision | ||
| * | ||
| * @generated from field: google.protobuf.Struct resource = 7; | ||
| */ | ||
| resource?: Struct; | ||
| /** | ||
| * annotations that may be added to a decision | ||
| * | ||
| * @generated from field: map<string, string> annotations = 8; | ||
| */ | ||
| annotations: { | ||
| [key: string]: string; | ||
| }; | ||
| /** | ||
| * id of the tenant that generated the decision | ||
| * | ||
| * @generated from field: optional string tenant_id = 9; | ||
| */ | ||
| tenantId?: string; | ||
| constructor(data?: PartialMessage<Decision>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.Decision"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Decision; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Decision; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Decision; | ||
| static equals(a: Decision | PlainMessage<Decision> | undefined, b: Decision | PlainMessage<Decision> | undefined): boolean; | ||
| } | ||
| /** | ||
| * information about a user on behalf of whom a decision was made | ||
| * | ||
| * @generated from message aserto.authorizer.v2.api.DecisionUser | ||
| */ | ||
| export declare class DecisionUser extends Message<DecisionUser> { | ||
| /** | ||
| * identity context used in the decision | ||
| * | ||
| * @generated from field: aserto.authorizer.v2.api.IdentityContext context = 1; | ||
| */ | ||
| context?: IdentityContext; | ||
| /** | ||
| * id of the user the identity resolved to | ||
| * | ||
| * @generated from field: string id = 2; | ||
| */ | ||
| id: string; | ||
| /** | ||
| * convinience human-readable identifier | ||
| * | ||
| * @generated from field: string email = 3; | ||
| */ | ||
| email: string; | ||
| constructor(data?: PartialMessage<DecisionUser>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.DecisionUser"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DecisionUser; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DecisionUser; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DecisionUser; | ||
| static equals(a: DecisionUser | PlainMessage<DecisionUser> | undefined, b: DecisionUser | PlainMessage<DecisionUser> | undefined): boolean; | ||
| } | ||
| /** | ||
| * information about a policy used in a decision | ||
| * | ||
| * @generated from message aserto.authorizer.v2.api.DecisionPolicy | ||
| */ | ||
| export declare class DecisionPolicy extends Message<DecisionPolicy> { | ||
| /** | ||
| * policy context used in the decision | ||
| * | ||
| * @generated from field: aserto.authorizer.v2.api.PolicyContext context = 1; | ||
| */ | ||
| context?: PolicyContext; | ||
| /** | ||
| * registry service where policy was retrieved from (e.g. opcr.io) | ||
| * | ||
| * @generated from field: string registry_service = 2; | ||
| */ | ||
| registryService: string; | ||
| /** | ||
| * image of the policy in the registry, including org (e.g. acmecorp/peoplefinder-abac) | ||
| * | ||
| * @generated from field: string registry_image = 3; | ||
| */ | ||
| registryImage: string; | ||
| /** | ||
| * tag of the policy image (e.g. 0.8.2 or latest) | ||
| * | ||
| * @generated from field: string registry_tag = 4; | ||
| */ | ||
| registryTag: string; | ||
| /** | ||
| * digest of the policy image | ||
| * | ||
| * @generated from field: string registry_digest = 5; | ||
| */ | ||
| registryDigest: string; | ||
| /** | ||
| * policy instance used in decision | ||
| * | ||
| * @generated from field: aserto.authorizer.v2.api.PolicyInstance policy_instance = 6; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<DecisionPolicy>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.DecisionPolicy"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DecisionPolicy; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DecisionPolicy; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DecisionPolicy; | ||
| static equals(a: DecisionPolicy | PlainMessage<DecisionPolicy> | undefined, b: DecisionPolicy | PlainMessage<DecisionPolicy> | undefined): boolean; | ||
| } |
| "use strict"; | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/api/decision_logs.proto (package aserto.authorizer.v2.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.DecisionPolicy = exports.DecisionUser = exports.Decision = void 0; | ||
| const protobuf_1 = require("@bufbuild/protobuf"); | ||
| const identity_context_pb_js_1 = require("./identity_context_pb.js"); | ||
| const policy_context_pb_js_1 = require("./policy_context_pb.js"); | ||
| const policy_instance_pb_js_1 = require("./policy_instance_pb.js"); | ||
| /** | ||
| * represents a decision that an authorizer performed in the past | ||
| * | ||
| * @generated from message aserto.authorizer.v2.api.Decision | ||
| */ | ||
| class Decision extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * unique id, replay a decision starting with this, also useful to de-dup | ||
| * | ||
| * @generated from field: string id = 1; | ||
| */ | ||
| this.id = ""; | ||
| /** | ||
| * Policy path used in decision | ||
| * | ||
| * @generated from field: string path = 3; | ||
| */ | ||
| this.path = ""; | ||
| /** | ||
| * outcome of the decisions specified in the policy context | ||
| * | ||
| * @generated from field: map<string, bool> outcomes = 6; | ||
| */ | ||
| this.outcomes = {}; | ||
| /** | ||
| * annotations that may be added to a decision | ||
| * | ||
| * @generated from field: map<string, string> annotations = 8; | ||
| */ | ||
| this.annotations = {}; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new Decision().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new Decision().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new Decision().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(Decision, a, b); | ||
| } | ||
| } | ||
| exports.Decision = Decision; | ||
| Decision.runtime = protobuf_1.proto3; | ||
| Decision.typeName = "aserto.authorizer.v2.api.Decision"; | ||
| Decision.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "timestamp", kind: "message", T: protobuf_1.Timestamp }, | ||
| { no: 3, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 4, name: "user", kind: "message", T: DecisionUser }, | ||
| { no: 5, name: "policy", kind: "message", T: DecisionPolicy }, | ||
| { no: 6, name: "outcomes", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "scalar", T: 8 /* ScalarType.BOOL */ } }, | ||
| { no: 7, name: "resource", kind: "message", T: protobuf_1.Struct }, | ||
| { no: 8, name: "annotations", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "scalar", T: 9 /* ScalarType.STRING */ } }, | ||
| { no: 9, name: "tenant_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| ]); | ||
| /** | ||
| * information about a user on behalf of whom a decision was made | ||
| * | ||
| * @generated from message aserto.authorizer.v2.api.DecisionUser | ||
| */ | ||
| class DecisionUser extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * id of the user the identity resolved to | ||
| * | ||
| * @generated from field: string id = 2; | ||
| */ | ||
| this.id = ""; | ||
| /** | ||
| * convinience human-readable identifier | ||
| * | ||
| * @generated from field: string email = 3; | ||
| */ | ||
| this.email = ""; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new DecisionUser().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new DecisionUser().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new DecisionUser().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(DecisionUser, a, b); | ||
| } | ||
| } | ||
| exports.DecisionUser = DecisionUser; | ||
| DecisionUser.runtime = protobuf_1.proto3; | ||
| DecisionUser.typeName = "aserto.authorizer.v2.api.DecisionUser"; | ||
| DecisionUser.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "context", kind: "message", T: identity_context_pb_js_1.IdentityContext }, | ||
| { no: 2, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ]); | ||
| /** | ||
| * information about a policy used in a decision | ||
| * | ||
| * @generated from message aserto.authorizer.v2.api.DecisionPolicy | ||
| */ | ||
| class DecisionPolicy extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * registry service where policy was retrieved from (e.g. opcr.io) | ||
| * | ||
| * @generated from field: string registry_service = 2; | ||
| */ | ||
| this.registryService = ""; | ||
| /** | ||
| * image of the policy in the registry, including org (e.g. acmecorp/peoplefinder-abac) | ||
| * | ||
| * @generated from field: string registry_image = 3; | ||
| */ | ||
| this.registryImage = ""; | ||
| /** | ||
| * tag of the policy image (e.g. 0.8.2 or latest) | ||
| * | ||
| * @generated from field: string registry_tag = 4; | ||
| */ | ||
| this.registryTag = ""; | ||
| /** | ||
| * digest of the policy image | ||
| * | ||
| * @generated from field: string registry_digest = 5; | ||
| */ | ||
| this.registryDigest = ""; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new DecisionPolicy().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new DecisionPolicy().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new DecisionPolicy().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(DecisionPolicy, a, b); | ||
| } | ||
| } | ||
| exports.DecisionPolicy = DecisionPolicy; | ||
| DecisionPolicy.runtime = protobuf_1.proto3; | ||
| DecisionPolicy.typeName = "aserto.authorizer.v2.api.DecisionPolicy"; | ||
| DecisionPolicy.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "context", kind: "message", T: policy_context_pb_js_1.PolicyContext }, | ||
| { no: 2, name: "registry_service", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "registry_image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 4, name: "registry_tag", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 5, name: "registry_digest", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 6, name: "policy_instance", kind: "message", T: policy_instance_pb_js_1.PolicyInstance }, | ||
| ]); |
| import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; | ||
| import { Message, proto3 } from "@bufbuild/protobuf"; | ||
| /** | ||
| * Identity types, describes the payload type of the identity field inside the IdentityContext message. | ||
| * | ||
| * @generated from enum aserto.authorizer.v2.api.IdentityType | ||
| */ | ||
| export declare enum IdentityType { | ||
| /** | ||
| * Unknown, value not set, requests will fail with identity type not set error. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_UNKNOWN = 0; | ||
| */ | ||
| UNKNOWN = 0, | ||
| /** | ||
| * None, no explicit identity context set, equals anonymous. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_NONE = 1; | ||
| */ | ||
| NONE = 1, | ||
| /** | ||
| * Sub(ject), identity field contains an oAUTH subject. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_SUB = 2; | ||
| */ | ||
| SUB = 2, | ||
| /** | ||
| * JWT, identity field contains a JWT access token. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_JWT = 3; | ||
| */ | ||
| JWT = 3, | ||
| /** | ||
| * Manual, propagates thw identity field as-is, without validation, into the input object. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_MANUAL = 4; | ||
| */ | ||
| MANUAL = 4 | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.IdentityContext | ||
| */ | ||
| export declare class IdentityContext extends Message<IdentityContext> { | ||
| /** | ||
| * @generated from field: string identity = 1; | ||
| */ | ||
| identity: string; | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.api.IdentityType type = 2; | ||
| */ | ||
| type: IdentityType; | ||
| constructor(data?: PartialMessage<IdentityContext>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.IdentityContext"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): IdentityContext; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): IdentityContext; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): IdentityContext; | ||
| static equals(a: IdentityContext | PlainMessage<IdentityContext> | undefined, b: IdentityContext | PlainMessage<IdentityContext> | undefined): boolean; | ||
| } |
| "use strict"; | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/api/identity_context.proto (package aserto.authorizer.v2.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.IdentityContext = exports.IdentityType = void 0; | ||
| const protobuf_1 = require("@bufbuild/protobuf"); | ||
| /** | ||
| * Identity types, describes the payload type of the identity field inside the IdentityContext message. | ||
| * | ||
| * @generated from enum aserto.authorizer.v2.api.IdentityType | ||
| */ | ||
| var IdentityType; | ||
| (function (IdentityType) { | ||
| /** | ||
| * Unknown, value not set, requests will fail with identity type not set error. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_UNKNOWN = 0; | ||
| */ | ||
| IdentityType[IdentityType["UNKNOWN"] = 0] = "UNKNOWN"; | ||
| /** | ||
| * None, no explicit identity context set, equals anonymous. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_NONE = 1; | ||
| */ | ||
| IdentityType[IdentityType["NONE"] = 1] = "NONE"; | ||
| /** | ||
| * Sub(ject), identity field contains an oAUTH subject. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_SUB = 2; | ||
| */ | ||
| IdentityType[IdentityType["SUB"] = 2] = "SUB"; | ||
| /** | ||
| * JWT, identity field contains a JWT access token. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_JWT = 3; | ||
| */ | ||
| IdentityType[IdentityType["JWT"] = 3] = "JWT"; | ||
| /** | ||
| * Manual, propagates thw identity field as-is, without validation, into the input object. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_MANUAL = 4; | ||
| */ | ||
| IdentityType[IdentityType["MANUAL"] = 4] = "MANUAL"; | ||
| })(IdentityType = exports.IdentityType || (exports.IdentityType = {})); | ||
| // Retrieve enum metadata with: proto3.getEnumType(IdentityType) | ||
| protobuf_1.proto3.util.setEnumType(IdentityType, "aserto.authorizer.v2.api.IdentityType", [ | ||
| { no: 0, name: "IDENTITY_TYPE_UNKNOWN" }, | ||
| { no: 1, name: "IDENTITY_TYPE_NONE" }, | ||
| { no: 2, name: "IDENTITY_TYPE_SUB" }, | ||
| { no: 3, name: "IDENTITY_TYPE_JWT" }, | ||
| { no: 4, name: "IDENTITY_TYPE_MANUAL" }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.IdentityContext | ||
| */ | ||
| class IdentityContext extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * @generated from field: string identity = 1; | ||
| */ | ||
| this.identity = ""; | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.api.IdentityType type = 2; | ||
| */ | ||
| this.type = IdentityType.UNKNOWN; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new IdentityContext().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new IdentityContext().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new IdentityContext().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(IdentityContext, a, b); | ||
| } | ||
| } | ||
| exports.IdentityContext = IdentityContext; | ||
| IdentityContext.runtime = protobuf_1.proto3; | ||
| IdentityContext.typeName = "aserto.authorizer.v2.api.IdentityContext"; | ||
| IdentityContext.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "type", kind: "enum", T: protobuf_1.proto3.getEnumType(IdentityType) }, | ||
| ]); |
| import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; | ||
| import { Message, proto3, Value } from "@bufbuild/protobuf"; | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.Module | ||
| */ | ||
| export declare class Module extends Message<Module> { | ||
| /** | ||
| * @generated from field: optional string id = 1; | ||
| */ | ||
| id?: string; | ||
| /** | ||
| * @generated from field: optional string raw = 2; | ||
| */ | ||
| raw?: string; | ||
| /** | ||
| * @generated from field: optional string package_path = 3; | ||
| */ | ||
| packagePath?: string; | ||
| /** | ||
| * @generated from field: optional google.protobuf.Value ast = 4; | ||
| */ | ||
| ast?: Value; | ||
| /** | ||
| * @generated from field: optional string package_root = 5; | ||
| */ | ||
| packageRoot?: string; | ||
| constructor(data?: PartialMessage<Module>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.Module"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Module; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Module; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Module; | ||
| static equals(a: Module | PlainMessage<Module> | undefined, b: Module | PlainMessage<Module> | undefined): boolean; | ||
| } |
| "use strict"; | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/api/module.proto (package aserto.authorizer.v2.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.Module = void 0; | ||
| const protobuf_1 = require("@bufbuild/protobuf"); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.Module | ||
| */ | ||
| class Module extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new Module().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new Module().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new Module().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(Module, a, b); | ||
| } | ||
| } | ||
| exports.Module = Module; | ||
| Module.runtime = protobuf_1.proto3; | ||
| Module.typeName = "aserto.authorizer.v2.api.Module"; | ||
| Module.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| { no: 2, name: "raw", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| { no: 3, name: "package_path", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| { no: 4, name: "ast", kind: "message", T: protobuf_1.Value, opt: true }, | ||
| { no: 5, name: "package_root", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| ]); |
| import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; | ||
| import { Message, proto3 } from "@bufbuild/protobuf"; | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.PolicyContext | ||
| */ | ||
| export declare class PolicyContext extends Message<PolicyContext> { | ||
| /** | ||
| * policy path aka package name | ||
| * | ||
| * @generated from field: string path = 1; | ||
| */ | ||
| path: string; | ||
| /** | ||
| * list (1..N) of policy decisions (aka rules) | ||
| * | ||
| * @generated from field: repeated string decisions = 2; | ||
| */ | ||
| decisions: string[]; | ||
| constructor(data?: PartialMessage<PolicyContext>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.PolicyContext"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PolicyContext; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PolicyContext; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PolicyContext; | ||
| static equals(a: PolicyContext | PlainMessage<PolicyContext> | undefined, b: PolicyContext | PlainMessage<PolicyContext> | undefined): boolean; | ||
| } |
| "use strict"; | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/api/policy_context.proto (package aserto.authorizer.v2.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.PolicyContext = void 0; | ||
| const protobuf_1 = require("@bufbuild/protobuf"); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.PolicyContext | ||
| */ | ||
| class PolicyContext extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * policy path aka package name | ||
| * | ||
| * @generated from field: string path = 1; | ||
| */ | ||
| this.path = ""; | ||
| /** | ||
| * list (1..N) of policy decisions (aka rules) | ||
| * | ||
| * @generated from field: repeated string decisions = 2; | ||
| */ | ||
| this.decisions = []; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new PolicyContext().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new PolicyContext().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new PolicyContext().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(PolicyContext, a, b); | ||
| } | ||
| } | ||
| exports.PolicyContext = PolicyContext; | ||
| PolicyContext.runtime = protobuf_1.proto3; | ||
| PolicyContext.typeName = "aserto.authorizer.v2.api.PolicyContext"; | ||
| PolicyContext.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "decisions", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| ]); |
| import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; | ||
| import { Message, proto3 } from "@bufbuild/protobuf"; | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.PolicyInstance | ||
| */ | ||
| export declare class PolicyInstance extends Message<PolicyInstance> { | ||
| /** | ||
| * policy name | ||
| * | ||
| * @generated from field: string name = 1; | ||
| */ | ||
| name: string; | ||
| /** | ||
| * label identifying the instance of the policy | ||
| * | ||
| * @generated from field: string instance_label = 2; | ||
| */ | ||
| instanceLabel: string; | ||
| constructor(data?: PartialMessage<PolicyInstance>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.PolicyInstance"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PolicyInstance; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PolicyInstance; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PolicyInstance; | ||
| static equals(a: PolicyInstance | PlainMessage<PolicyInstance> | undefined, b: PolicyInstance | PlainMessage<PolicyInstance> | undefined): boolean; | ||
| } |
| "use strict"; | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/api/policy_instance.proto (package aserto.authorizer.v2.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.PolicyInstance = void 0; | ||
| const protobuf_1 = require("@bufbuild/protobuf"); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.PolicyInstance | ||
| */ | ||
| class PolicyInstance extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * policy name | ||
| * | ||
| * @generated from field: string name = 1; | ||
| */ | ||
| this.name = ""; | ||
| /** | ||
| * label identifying the instance of the policy | ||
| * | ||
| * @generated from field: string instance_label = 2; | ||
| */ | ||
| this.instanceLabel = ""; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new PolicyInstance().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new PolicyInstance().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new PolicyInstance().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(PolicyInstance, a, b); | ||
| } | ||
| } | ||
| exports.PolicyInstance = PolicyInstance; | ||
| PolicyInstance.runtime = protobuf_1.proto3; | ||
| PolicyInstance.typeName = "aserto.authorizer.v2.api.PolicyInstance"; | ||
| PolicyInstance.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "instance_label", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ]); |
| import { CompileRequest, CompileResponse, DecisionTreeRequest, DecisionTreeResponse, GetPolicyRequest, GetPolicyResponse, InfoRequest, InfoResponse, IsRequest, IsResponse, ListPoliciesRequest, ListPoliciesResponse, QueryRequest, QueryResponse } from "./authorizer_pb.js"; | ||
| import { MethodKind } from "@bufbuild/protobuf"; | ||
| /** | ||
| * @generated from service aserto.authorizer.v2.Authorizer | ||
| */ | ||
| export declare const Authorizer: { | ||
| readonly typeName: "aserto.authorizer.v2.Authorizer"; | ||
| readonly methods: { | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.DecisionTree | ||
| */ | ||
| readonly decisionTree: { | ||
| readonly name: "DecisionTree"; | ||
| readonly I: typeof DecisionTreeRequest; | ||
| readonly O: typeof DecisionTreeResponse; | ||
| readonly kind: MethodKind.Unary; | ||
| }; | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Is | ||
| */ | ||
| readonly is: { | ||
| readonly name: "Is"; | ||
| readonly I: typeof IsRequest; | ||
| readonly O: typeof IsResponse; | ||
| readonly kind: MethodKind.Unary; | ||
| }; | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Query | ||
| */ | ||
| readonly query: { | ||
| readonly name: "Query"; | ||
| readonly I: typeof QueryRequest; | ||
| readonly O: typeof QueryResponse; | ||
| readonly kind: MethodKind.Unary; | ||
| }; | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Compile | ||
| */ | ||
| readonly compile: { | ||
| readonly name: "Compile"; | ||
| readonly I: typeof CompileRequest; | ||
| readonly O: typeof CompileResponse; | ||
| readonly kind: MethodKind.Unary; | ||
| }; | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.ListPolicies | ||
| */ | ||
| readonly listPolicies: { | ||
| readonly name: "ListPolicies"; | ||
| readonly I: typeof ListPoliciesRequest; | ||
| readonly O: typeof ListPoliciesResponse; | ||
| readonly kind: MethodKind.Unary; | ||
| }; | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.GetPolicy | ||
| */ | ||
| readonly getPolicy: { | ||
| readonly name: "GetPolicy"; | ||
| readonly I: typeof GetPolicyRequest; | ||
| readonly O: typeof GetPolicyResponse; | ||
| readonly kind: MethodKind.Unary; | ||
| }; | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Info | ||
| */ | ||
| readonly info: { | ||
| readonly name: "Info"; | ||
| readonly I: typeof InfoRequest; | ||
| readonly O: typeof InfoResponse; | ||
| readonly kind: MethodKind.Unary; | ||
| }; | ||
| }; | ||
| }; |
| "use strict"; | ||
| // @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/authorizer.proto (package aserto.authorizer.v2, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.Authorizer = void 0; | ||
| const authorizer_pb_js_1 = require("./authorizer_pb.js"); | ||
| const protobuf_1 = require("@bufbuild/protobuf"); | ||
| /** | ||
| * @generated from service aserto.authorizer.v2.Authorizer | ||
| */ | ||
| exports.Authorizer = { | ||
| typeName: "aserto.authorizer.v2.Authorizer", | ||
| methods: { | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.DecisionTree | ||
| */ | ||
| decisionTree: { | ||
| name: "DecisionTree", | ||
| I: authorizer_pb_js_1.DecisionTreeRequest, | ||
| O: authorizer_pb_js_1.DecisionTreeResponse, | ||
| kind: protobuf_1.MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Is | ||
| */ | ||
| is: { | ||
| name: "Is", | ||
| I: authorizer_pb_js_1.IsRequest, | ||
| O: authorizer_pb_js_1.IsResponse, | ||
| kind: protobuf_1.MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Query | ||
| */ | ||
| query: { | ||
| name: "Query", | ||
| I: authorizer_pb_js_1.QueryRequest, | ||
| O: authorizer_pb_js_1.QueryResponse, | ||
| kind: protobuf_1.MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Compile | ||
| */ | ||
| compile: { | ||
| name: "Compile", | ||
| I: authorizer_pb_js_1.CompileRequest, | ||
| O: authorizer_pb_js_1.CompileResponse, | ||
| kind: protobuf_1.MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.ListPolicies | ||
| */ | ||
| listPolicies: { | ||
| name: "ListPolicies", | ||
| I: authorizer_pb_js_1.ListPoliciesRequest, | ||
| O: authorizer_pb_js_1.ListPoliciesResponse, | ||
| kind: protobuf_1.MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.GetPolicy | ||
| */ | ||
| getPolicy: { | ||
| name: "GetPolicy", | ||
| I: authorizer_pb_js_1.GetPolicyRequest, | ||
| O: authorizer_pb_js_1.GetPolicyResponse, | ||
| kind: protobuf_1.MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Info | ||
| */ | ||
| info: { | ||
| name: "Info", | ||
| I: authorizer_pb_js_1.InfoRequest, | ||
| O: authorizer_pb_js_1.InfoResponse, | ||
| kind: protobuf_1.MethodKind.Unary, | ||
| }, | ||
| } | ||
| }; |
| import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; | ||
| import { FieldMask, Message, proto3, Struct } from "@bufbuild/protobuf"; | ||
| import { PolicyInstance } from "./api/policy_instance_pb.js"; | ||
| import { Module } from "./api/module_pb.js"; | ||
| import { PolicyContext } from "./api/policy_context_pb.js"; | ||
| import { IdentityContext } from "./api/identity_context_pb.js"; | ||
| /** | ||
| * @generated from enum aserto.authorizer.v2.PathSeparator | ||
| */ | ||
| export declare enum PathSeparator { | ||
| /** | ||
| * Value not set. | ||
| * | ||
| * @generated from enum value: PATH_SEPARATOR_UNKNOWN = 0; | ||
| */ | ||
| UNKNOWN = 0, | ||
| /** | ||
| * Dot "." path separator | ||
| * | ||
| * @generated from enum value: PATH_SEPARATOR_DOT = 1; | ||
| */ | ||
| DOT = 1, | ||
| /** | ||
| * Slash "/" path separtor | ||
| * | ||
| * @generated from enum value: PATH_SEPARATOR_SLASH = 2; | ||
| */ | ||
| SLASH = 2 | ||
| } | ||
| /** | ||
| * @generated from enum aserto.authorizer.v2.TraceLevel | ||
| */ | ||
| export declare enum TraceLevel { | ||
| /** | ||
| * Value not set. | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_UNKNOWN = 0; | ||
| */ | ||
| UNKNOWN = 0, | ||
| /** | ||
| * ExplainOffV1 ExplainModeV1 = "off" | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_OFF = 1; | ||
| */ | ||
| OFF = 1, | ||
| /** | ||
| * ExplainFullV1 ExplainModeV1 = "full" | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_FULL = 2; | ||
| */ | ||
| FULL = 2, | ||
| /** | ||
| * ExplainNotesV1 ExplainModeV1 = "notes" | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_NOTES = 3; | ||
| */ | ||
| NOTES = 3, | ||
| /** | ||
| * ExplainFailsV1 ExplainModeV1 = "fails" | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_FAILS = 4; | ||
| */ | ||
| FAILS = 4 | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.InfoRequest | ||
| */ | ||
| export declare class InfoRequest extends Message<InfoRequest> { | ||
| constructor(data?: PartialMessage<InfoRequest>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.InfoRequest"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): InfoRequest; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): InfoRequest; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): InfoRequest; | ||
| static equals(a: InfoRequest | PlainMessage<InfoRequest> | undefined, b: InfoRequest | PlainMessage<InfoRequest> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.InfoResponse | ||
| */ | ||
| export declare class InfoResponse extends Message<InfoResponse> { | ||
| /** | ||
| * @generated from field: string version = 1; | ||
| */ | ||
| version: string; | ||
| /** | ||
| * @generated from field: string commit = 2; | ||
| */ | ||
| commit: string; | ||
| /** | ||
| * @generated from field: string date = 3; | ||
| */ | ||
| date: string; | ||
| /** | ||
| * @generated from field: string os = 4; | ||
| */ | ||
| os: string; | ||
| /** | ||
| * @generated from field: string arch = 5; | ||
| */ | ||
| arch: string; | ||
| constructor(data?: PartialMessage<InfoResponse>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.InfoResponse"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): InfoResponse; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): InfoResponse; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): InfoResponse; | ||
| static equals(a: InfoResponse | PlainMessage<InfoResponse> | undefined, b: InfoResponse | PlainMessage<InfoResponse> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.GetPolicyRequest | ||
| */ | ||
| export declare class GetPolicyRequest extends Message<GetPolicyRequest> { | ||
| /** | ||
| * @generated from field: string id = 1; | ||
| */ | ||
| id: string; | ||
| /** | ||
| * @generated from field: google.protobuf.FieldMask field_mask = 2; | ||
| */ | ||
| fieldMask?: FieldMask; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyInstance policy_instance = 3; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<GetPolicyRequest>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.GetPolicyRequest"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetPolicyRequest; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetPolicyRequest; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetPolicyRequest; | ||
| static equals(a: GetPolicyRequest | PlainMessage<GetPolicyRequest> | undefined, b: GetPolicyRequest | PlainMessage<GetPolicyRequest> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.GetPolicyResponse | ||
| */ | ||
| export declare class GetPolicyResponse extends Message<GetPolicyResponse> { | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.api.Module result = 1; | ||
| */ | ||
| result?: Module; | ||
| constructor(data?: PartialMessage<GetPolicyResponse>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.GetPolicyResponse"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetPolicyResponse; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetPolicyResponse; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetPolicyResponse; | ||
| static equals(a: GetPolicyResponse | PlainMessage<GetPolicyResponse> | undefined, b: GetPolicyResponse | PlainMessage<GetPolicyResponse> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.ListPoliciesRequest | ||
| */ | ||
| export declare class ListPoliciesRequest extends Message<ListPoliciesRequest> { | ||
| /** | ||
| * @generated from field: google.protobuf.FieldMask field_mask = 1; | ||
| */ | ||
| fieldMask?: FieldMask; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyInstance policy_instance = 2; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<ListPoliciesRequest>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.ListPoliciesRequest"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListPoliciesRequest; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListPoliciesRequest; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListPoliciesRequest; | ||
| static equals(a: ListPoliciesRequest | PlainMessage<ListPoliciesRequest> | undefined, b: ListPoliciesRequest | PlainMessage<ListPoliciesRequest> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.ListPoliciesResponse | ||
| */ | ||
| export declare class ListPoliciesResponse extends Message<ListPoliciesResponse> { | ||
| /** | ||
| * @generated from field: repeated aserto.authorizer.v2.api.Module result = 1; | ||
| */ | ||
| result: Module[]; | ||
| constructor(data?: PartialMessage<ListPoliciesResponse>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.ListPoliciesResponse"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListPoliciesResponse; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListPoliciesResponse; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListPoliciesResponse; | ||
| static equals(a: ListPoliciesResponse | PlainMessage<ListPoliciesResponse> | undefined, b: ListPoliciesResponse | PlainMessage<ListPoliciesResponse> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.DecisionTreeRequest | ||
| */ | ||
| export declare class DecisionTreeRequest extends Message<DecisionTreeRequest> { | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.api.PolicyContext policy_context = 1; | ||
| */ | ||
| policyContext?: PolicyContext; | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.api.IdentityContext identity_context = 2; | ||
| */ | ||
| identityContext?: IdentityContext; | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.DecisionTreeOptions options = 3; | ||
| */ | ||
| options?: DecisionTreeOptions; | ||
| /** | ||
| * @generated from field: google.protobuf.Struct resource_context = 4; | ||
| */ | ||
| resourceContext?: Struct; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyInstance policy_instance = 5; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<DecisionTreeRequest>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.DecisionTreeRequest"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DecisionTreeRequest; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DecisionTreeRequest; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DecisionTreeRequest; | ||
| static equals(a: DecisionTreeRequest | PlainMessage<DecisionTreeRequest> | undefined, b: DecisionTreeRequest | PlainMessage<DecisionTreeRequest> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.DecisionTreeOptions | ||
| */ | ||
| export declare class DecisionTreeOptions extends Message<DecisionTreeOptions> { | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.PathSeparator path_separator = 1; | ||
| */ | ||
| pathSeparator: PathSeparator; | ||
| constructor(data?: PartialMessage<DecisionTreeOptions>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.DecisionTreeOptions"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DecisionTreeOptions; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DecisionTreeOptions; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DecisionTreeOptions; | ||
| static equals(a: DecisionTreeOptions | PlainMessage<DecisionTreeOptions> | undefined, b: DecisionTreeOptions | PlainMessage<DecisionTreeOptions> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.DecisionTreeResponse | ||
| */ | ||
| export declare class DecisionTreeResponse extends Message<DecisionTreeResponse> { | ||
| /** | ||
| * @generated from field: string path_root = 1; | ||
| */ | ||
| pathRoot: string; | ||
| /** | ||
| * @generated from field: google.protobuf.Struct path = 3; | ||
| */ | ||
| path?: Struct; | ||
| constructor(data?: PartialMessage<DecisionTreeResponse>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.DecisionTreeResponse"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DecisionTreeResponse; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DecisionTreeResponse; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DecisionTreeResponse; | ||
| static equals(a: DecisionTreeResponse | PlainMessage<DecisionTreeResponse> | undefined, b: DecisionTreeResponse | PlainMessage<DecisionTreeResponse> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.IsRequest | ||
| */ | ||
| export declare class IsRequest extends Message<IsRequest> { | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.api.PolicyContext policy_context = 1; | ||
| */ | ||
| policyContext?: PolicyContext; | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.api.IdentityContext identity_context = 2; | ||
| */ | ||
| identityContext?: IdentityContext; | ||
| /** | ||
| * @generated from field: google.protobuf.Struct resource_context = 3; | ||
| */ | ||
| resourceContext?: Struct; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyInstance policy_instance = 4; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<IsRequest>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.IsRequest"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): IsRequest; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): IsRequest; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): IsRequest; | ||
| static equals(a: IsRequest | PlainMessage<IsRequest> | undefined, b: IsRequest | PlainMessage<IsRequest> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.Decision | ||
| */ | ||
| export declare class Decision extends Message<Decision> { | ||
| /** | ||
| * @generated from field: string decision = 1; | ||
| */ | ||
| decision: string; | ||
| /** | ||
| * @generated from field: bool is = 2; | ||
| */ | ||
| is: boolean; | ||
| constructor(data?: PartialMessage<Decision>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.Decision"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Decision; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Decision; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Decision; | ||
| static equals(a: Decision | PlainMessage<Decision> | undefined, b: Decision | PlainMessage<Decision> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.IsResponse | ||
| */ | ||
| export declare class IsResponse extends Message<IsResponse> { | ||
| /** | ||
| * @generated from field: repeated aserto.authorizer.v2.Decision decisions = 1; | ||
| */ | ||
| decisions: Decision[]; | ||
| constructor(data?: PartialMessage<IsResponse>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.IsResponse"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): IsResponse; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): IsResponse; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): IsResponse; | ||
| static equals(a: IsResponse | PlainMessage<IsResponse> | undefined, b: IsResponse | PlainMessage<IsResponse> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.QueryOptions | ||
| */ | ||
| export declare class QueryOptions extends Message<QueryOptions> { | ||
| /** | ||
| * default false | ||
| * | ||
| * @generated from field: bool metrics = 1; | ||
| */ | ||
| metrics: boolean; | ||
| /** | ||
| * default false | ||
| * | ||
| * @generated from field: bool instrument = 2; | ||
| */ | ||
| instrument: boolean; | ||
| /** | ||
| * default ExplainOffV1 | ||
| * | ||
| * @generated from field: aserto.authorizer.v2.TraceLevel trace = 3; | ||
| */ | ||
| trace: TraceLevel; | ||
| /** | ||
| * default false | ||
| * | ||
| * @generated from field: bool trace_summary = 4; | ||
| */ | ||
| traceSummary: boolean; | ||
| constructor(data?: PartialMessage<QueryOptions>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.QueryOptions"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryOptions; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryOptions; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryOptions; | ||
| static equals(a: QueryOptions | PlainMessage<QueryOptions> | undefined, b: QueryOptions | PlainMessage<QueryOptions> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.QueryRequest | ||
| */ | ||
| export declare class QueryRequest extends Message<QueryRequest> { | ||
| /** | ||
| * @generated from field: string query = 1; | ||
| */ | ||
| query: string; | ||
| /** | ||
| * @generated from field: string input = 2; | ||
| */ | ||
| input: string; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.QueryOptions options = 3; | ||
| */ | ||
| options?: QueryOptions; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyContext policy_context = 4; | ||
| */ | ||
| policyContext?: PolicyContext; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.IdentityContext identity_context = 5; | ||
| */ | ||
| identityContext?: IdentityContext; | ||
| /** | ||
| * @generated from field: optional google.protobuf.Struct resource_context = 6; | ||
| */ | ||
| resourceContext?: Struct; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyInstance policy_instance = 7; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<QueryRequest>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.QueryRequest"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryRequest; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryRequest; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryRequest; | ||
| static equals(a: QueryRequest | PlainMessage<QueryRequest> | undefined, b: QueryRequest | PlainMessage<QueryRequest> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.CompileRequest | ||
| */ | ||
| export declare class CompileRequest extends Message<CompileRequest> { | ||
| /** | ||
| * @generated from field: string query = 1; | ||
| */ | ||
| query: string; | ||
| /** | ||
| * @generated from field: string input = 2; | ||
| */ | ||
| input: string; | ||
| /** | ||
| * @generated from field: repeated string unknowns = 3; | ||
| */ | ||
| unknowns: string[]; | ||
| /** | ||
| * @generated from field: repeated string disable_inlining = 4; | ||
| */ | ||
| disableInlining: string[]; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.QueryOptions options = 5; | ||
| */ | ||
| options?: QueryOptions; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyContext policy_context = 6; | ||
| */ | ||
| policyContext?: PolicyContext; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.IdentityContext identity_context = 7; | ||
| */ | ||
| identityContext?: IdentityContext; | ||
| /** | ||
| * @generated from field: optional google.protobuf.Struct resource_context = 8; | ||
| */ | ||
| resourceContext?: Struct; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyInstance policy_instance = 9; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<CompileRequest>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.CompileRequest"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CompileRequest; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CompileRequest; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CompileRequest; | ||
| static equals(a: CompileRequest | PlainMessage<CompileRequest> | undefined, b: CompileRequest | PlainMessage<CompileRequest> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.CompileResponse | ||
| */ | ||
| export declare class CompileResponse extends Message<CompileResponse> { | ||
| /** | ||
| * @generated from field: google.protobuf.Struct result = 1; | ||
| */ | ||
| result?: Struct; | ||
| /** | ||
| * @generated from field: google.protobuf.Struct metrics = 2; | ||
| */ | ||
| metrics?: Struct; | ||
| /** | ||
| * @generated from field: repeated google.protobuf.Struct trace = 3; | ||
| */ | ||
| trace: Struct[]; | ||
| /** | ||
| * @generated from field: repeated string trace_summary = 4; | ||
| */ | ||
| traceSummary: string[]; | ||
| constructor(data?: PartialMessage<CompileResponse>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.CompileResponse"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CompileResponse; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CompileResponse; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CompileResponse; | ||
| static equals(a: CompileResponse | PlainMessage<CompileResponse> | undefined, b: CompileResponse | PlainMessage<CompileResponse> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.QueryResponse | ||
| */ | ||
| export declare class QueryResponse extends Message<QueryResponse> { | ||
| /** | ||
| * @generated from field: google.protobuf.Struct response = 1; | ||
| */ | ||
| response?: Struct; | ||
| /** | ||
| * @generated from field: google.protobuf.Struct metrics = 2; | ||
| */ | ||
| metrics?: Struct; | ||
| /** | ||
| * @generated from field: repeated google.protobuf.Struct trace = 3; | ||
| */ | ||
| trace: Struct[]; | ||
| /** | ||
| * @generated from field: repeated string trace_summary = 4; | ||
| */ | ||
| traceSummary: string[]; | ||
| constructor(data?: PartialMessage<QueryResponse>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.QueryResponse"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryResponse; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryResponse; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryResponse; | ||
| static equals(a: QueryResponse | PlainMessage<QueryResponse> | undefined, b: QueryResponse | PlainMessage<QueryResponse> | undefined): boolean; | ||
| } |
| "use strict"; | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/authorizer.proto (package aserto.authorizer.v2, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.QueryResponse = exports.CompileResponse = exports.CompileRequest = exports.QueryRequest = exports.QueryOptions = exports.IsResponse = exports.Decision = exports.IsRequest = exports.DecisionTreeResponse = exports.DecisionTreeOptions = exports.DecisionTreeRequest = exports.ListPoliciesResponse = exports.ListPoliciesRequest = exports.GetPolicyResponse = exports.GetPolicyRequest = exports.InfoResponse = exports.InfoRequest = exports.TraceLevel = exports.PathSeparator = void 0; | ||
| const protobuf_1 = require("@bufbuild/protobuf"); | ||
| const policy_instance_pb_js_1 = require("./api/policy_instance_pb.js"); | ||
| const module_pb_js_1 = require("./api/module_pb.js"); | ||
| const policy_context_pb_js_1 = require("./api/policy_context_pb.js"); | ||
| const identity_context_pb_js_1 = require("./api/identity_context_pb.js"); | ||
| /** | ||
| * @generated from enum aserto.authorizer.v2.PathSeparator | ||
| */ | ||
| var PathSeparator; | ||
| (function (PathSeparator) { | ||
| /** | ||
| * Value not set. | ||
| * | ||
| * @generated from enum value: PATH_SEPARATOR_UNKNOWN = 0; | ||
| */ | ||
| PathSeparator[PathSeparator["UNKNOWN"] = 0] = "UNKNOWN"; | ||
| /** | ||
| * Dot "." path separator | ||
| * | ||
| * @generated from enum value: PATH_SEPARATOR_DOT = 1; | ||
| */ | ||
| PathSeparator[PathSeparator["DOT"] = 1] = "DOT"; | ||
| /** | ||
| * Slash "/" path separtor | ||
| * | ||
| * @generated from enum value: PATH_SEPARATOR_SLASH = 2; | ||
| */ | ||
| PathSeparator[PathSeparator["SLASH"] = 2] = "SLASH"; | ||
| })(PathSeparator = exports.PathSeparator || (exports.PathSeparator = {})); | ||
| // Retrieve enum metadata with: proto3.getEnumType(PathSeparator) | ||
| protobuf_1.proto3.util.setEnumType(PathSeparator, "aserto.authorizer.v2.PathSeparator", [ | ||
| { no: 0, name: "PATH_SEPARATOR_UNKNOWN" }, | ||
| { no: 1, name: "PATH_SEPARATOR_DOT" }, | ||
| { no: 2, name: "PATH_SEPARATOR_SLASH" }, | ||
| ]); | ||
| /** | ||
| * @generated from enum aserto.authorizer.v2.TraceLevel | ||
| */ | ||
| var TraceLevel; | ||
| (function (TraceLevel) { | ||
| /** | ||
| * Value not set. | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_UNKNOWN = 0; | ||
| */ | ||
| TraceLevel[TraceLevel["UNKNOWN"] = 0] = "UNKNOWN"; | ||
| /** | ||
| * ExplainOffV1 ExplainModeV1 = "off" | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_OFF = 1; | ||
| */ | ||
| TraceLevel[TraceLevel["OFF"] = 1] = "OFF"; | ||
| /** | ||
| * ExplainFullV1 ExplainModeV1 = "full" | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_FULL = 2; | ||
| */ | ||
| TraceLevel[TraceLevel["FULL"] = 2] = "FULL"; | ||
| /** | ||
| * ExplainNotesV1 ExplainModeV1 = "notes" | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_NOTES = 3; | ||
| */ | ||
| TraceLevel[TraceLevel["NOTES"] = 3] = "NOTES"; | ||
| /** | ||
| * ExplainFailsV1 ExplainModeV1 = "fails" | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_FAILS = 4; | ||
| */ | ||
| TraceLevel[TraceLevel["FAILS"] = 4] = "FAILS"; | ||
| })(TraceLevel = exports.TraceLevel || (exports.TraceLevel = {})); | ||
| // Retrieve enum metadata with: proto3.getEnumType(TraceLevel) | ||
| protobuf_1.proto3.util.setEnumType(TraceLevel, "aserto.authorizer.v2.TraceLevel", [ | ||
| { no: 0, name: "TRACE_LEVEL_UNKNOWN" }, | ||
| { no: 1, name: "TRACE_LEVEL_OFF" }, | ||
| { no: 2, name: "TRACE_LEVEL_FULL" }, | ||
| { no: 3, name: "TRACE_LEVEL_NOTES" }, | ||
| { no: 4, name: "TRACE_LEVEL_FAILS" }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.InfoRequest | ||
| */ | ||
| class InfoRequest extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new InfoRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new InfoRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new InfoRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(InfoRequest, a, b); | ||
| } | ||
| } | ||
| exports.InfoRequest = InfoRequest; | ||
| InfoRequest.runtime = protobuf_1.proto3; | ||
| InfoRequest.typeName = "aserto.authorizer.v2.InfoRequest"; | ||
| InfoRequest.fields = protobuf_1.proto3.util.newFieldList(() => []); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.InfoResponse | ||
| */ | ||
| class InfoResponse extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * @generated from field: string version = 1; | ||
| */ | ||
| this.version = ""; | ||
| /** | ||
| * @generated from field: string commit = 2; | ||
| */ | ||
| this.commit = ""; | ||
| /** | ||
| * @generated from field: string date = 3; | ||
| */ | ||
| this.date = ""; | ||
| /** | ||
| * @generated from field: string os = 4; | ||
| */ | ||
| this.os = ""; | ||
| /** | ||
| * @generated from field: string arch = 5; | ||
| */ | ||
| this.arch = ""; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new InfoResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new InfoResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new InfoResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(InfoResponse, a, b); | ||
| } | ||
| } | ||
| exports.InfoResponse = InfoResponse; | ||
| InfoResponse.runtime = protobuf_1.proto3; | ||
| InfoResponse.typeName = "aserto.authorizer.v2.InfoResponse"; | ||
| InfoResponse.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "commit", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "date", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 4, name: "os", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 5, name: "arch", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.GetPolicyRequest | ||
| */ | ||
| class GetPolicyRequest extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * @generated from field: string id = 1; | ||
| */ | ||
| this.id = ""; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new GetPolicyRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new GetPolicyRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new GetPolicyRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(GetPolicyRequest, a, b); | ||
| } | ||
| } | ||
| exports.GetPolicyRequest = GetPolicyRequest; | ||
| GetPolicyRequest.runtime = protobuf_1.proto3; | ||
| GetPolicyRequest.typeName = "aserto.authorizer.v2.GetPolicyRequest"; | ||
| GetPolicyRequest.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "field_mask", kind: "message", T: protobuf_1.FieldMask }, | ||
| { no: 3, name: "policy_instance", kind: "message", T: policy_instance_pb_js_1.PolicyInstance, opt: true }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.GetPolicyResponse | ||
| */ | ||
| class GetPolicyResponse extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new GetPolicyResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new GetPolicyResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new GetPolicyResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(GetPolicyResponse, a, b); | ||
| } | ||
| } | ||
| exports.GetPolicyResponse = GetPolicyResponse; | ||
| GetPolicyResponse.runtime = protobuf_1.proto3; | ||
| GetPolicyResponse.typeName = "aserto.authorizer.v2.GetPolicyResponse"; | ||
| GetPolicyResponse.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "result", kind: "message", T: module_pb_js_1.Module }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.ListPoliciesRequest | ||
| */ | ||
| class ListPoliciesRequest extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new ListPoliciesRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new ListPoliciesRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new ListPoliciesRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(ListPoliciesRequest, a, b); | ||
| } | ||
| } | ||
| exports.ListPoliciesRequest = ListPoliciesRequest; | ||
| ListPoliciesRequest.runtime = protobuf_1.proto3; | ||
| ListPoliciesRequest.typeName = "aserto.authorizer.v2.ListPoliciesRequest"; | ||
| ListPoliciesRequest.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "field_mask", kind: "message", T: protobuf_1.FieldMask }, | ||
| { no: 2, name: "policy_instance", kind: "message", T: policy_instance_pb_js_1.PolicyInstance, opt: true }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.ListPoliciesResponse | ||
| */ | ||
| class ListPoliciesResponse extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * @generated from field: repeated aserto.authorizer.v2.api.Module result = 1; | ||
| */ | ||
| this.result = []; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new ListPoliciesResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new ListPoliciesResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new ListPoliciesResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(ListPoliciesResponse, a, b); | ||
| } | ||
| } | ||
| exports.ListPoliciesResponse = ListPoliciesResponse; | ||
| ListPoliciesResponse.runtime = protobuf_1.proto3; | ||
| ListPoliciesResponse.typeName = "aserto.authorizer.v2.ListPoliciesResponse"; | ||
| ListPoliciesResponse.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "result", kind: "message", T: module_pb_js_1.Module, repeated: true }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.DecisionTreeRequest | ||
| */ | ||
| class DecisionTreeRequest extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new DecisionTreeRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new DecisionTreeRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new DecisionTreeRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(DecisionTreeRequest, a, b); | ||
| } | ||
| } | ||
| exports.DecisionTreeRequest = DecisionTreeRequest; | ||
| DecisionTreeRequest.runtime = protobuf_1.proto3; | ||
| DecisionTreeRequest.typeName = "aserto.authorizer.v2.DecisionTreeRequest"; | ||
| DecisionTreeRequest.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "policy_context", kind: "message", T: policy_context_pb_js_1.PolicyContext }, | ||
| { no: 2, name: "identity_context", kind: "message", T: identity_context_pb_js_1.IdentityContext }, | ||
| { no: 3, name: "options", kind: "message", T: DecisionTreeOptions }, | ||
| { no: 4, name: "resource_context", kind: "message", T: protobuf_1.Struct }, | ||
| { no: 5, name: "policy_instance", kind: "message", T: policy_instance_pb_js_1.PolicyInstance, opt: true }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.DecisionTreeOptions | ||
| */ | ||
| class DecisionTreeOptions extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.PathSeparator path_separator = 1; | ||
| */ | ||
| this.pathSeparator = PathSeparator.UNKNOWN; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new DecisionTreeOptions().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new DecisionTreeOptions().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new DecisionTreeOptions().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(DecisionTreeOptions, a, b); | ||
| } | ||
| } | ||
| exports.DecisionTreeOptions = DecisionTreeOptions; | ||
| DecisionTreeOptions.runtime = protobuf_1.proto3; | ||
| DecisionTreeOptions.typeName = "aserto.authorizer.v2.DecisionTreeOptions"; | ||
| DecisionTreeOptions.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "path_separator", kind: "enum", T: protobuf_1.proto3.getEnumType(PathSeparator) }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.DecisionTreeResponse | ||
| */ | ||
| class DecisionTreeResponse extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * @generated from field: string path_root = 1; | ||
| */ | ||
| this.pathRoot = ""; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new DecisionTreeResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new DecisionTreeResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new DecisionTreeResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(DecisionTreeResponse, a, b); | ||
| } | ||
| } | ||
| exports.DecisionTreeResponse = DecisionTreeResponse; | ||
| DecisionTreeResponse.runtime = protobuf_1.proto3; | ||
| DecisionTreeResponse.typeName = "aserto.authorizer.v2.DecisionTreeResponse"; | ||
| DecisionTreeResponse.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "path_root", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "path", kind: "message", T: protobuf_1.Struct }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.IsRequest | ||
| */ | ||
| class IsRequest extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new IsRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new IsRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new IsRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(IsRequest, a, b); | ||
| } | ||
| } | ||
| exports.IsRequest = IsRequest; | ||
| IsRequest.runtime = protobuf_1.proto3; | ||
| IsRequest.typeName = "aserto.authorizer.v2.IsRequest"; | ||
| IsRequest.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "policy_context", kind: "message", T: policy_context_pb_js_1.PolicyContext }, | ||
| { no: 2, name: "identity_context", kind: "message", T: identity_context_pb_js_1.IdentityContext }, | ||
| { no: 3, name: "resource_context", kind: "message", T: protobuf_1.Struct }, | ||
| { no: 4, name: "policy_instance", kind: "message", T: policy_instance_pb_js_1.PolicyInstance, opt: true }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.Decision | ||
| */ | ||
| class Decision extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * @generated from field: string decision = 1; | ||
| */ | ||
| this.decision = ""; | ||
| /** | ||
| * @generated from field: bool is = 2; | ||
| */ | ||
| this.is = false; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new Decision().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new Decision().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new Decision().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(Decision, a, b); | ||
| } | ||
| } | ||
| exports.Decision = Decision; | ||
| Decision.runtime = protobuf_1.proto3; | ||
| Decision.typeName = "aserto.authorizer.v2.Decision"; | ||
| Decision.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "decision", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "is", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.IsResponse | ||
| */ | ||
| class IsResponse extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * @generated from field: repeated aserto.authorizer.v2.Decision decisions = 1; | ||
| */ | ||
| this.decisions = []; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new IsResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new IsResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new IsResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(IsResponse, a, b); | ||
| } | ||
| } | ||
| exports.IsResponse = IsResponse; | ||
| IsResponse.runtime = protobuf_1.proto3; | ||
| IsResponse.typeName = "aserto.authorizer.v2.IsResponse"; | ||
| IsResponse.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "decisions", kind: "message", T: Decision, repeated: true }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.QueryOptions | ||
| */ | ||
| class QueryOptions extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * default false | ||
| * | ||
| * @generated from field: bool metrics = 1; | ||
| */ | ||
| this.metrics = false; | ||
| /** | ||
| * default false | ||
| * | ||
| * @generated from field: bool instrument = 2; | ||
| */ | ||
| this.instrument = false; | ||
| /** | ||
| * default ExplainOffV1 | ||
| * | ||
| * @generated from field: aserto.authorizer.v2.TraceLevel trace = 3; | ||
| */ | ||
| this.trace = TraceLevel.UNKNOWN; | ||
| /** | ||
| * default false | ||
| * | ||
| * @generated from field: bool trace_summary = 4; | ||
| */ | ||
| this.traceSummary = false; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new QueryOptions().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new QueryOptions().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new QueryOptions().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(QueryOptions, a, b); | ||
| } | ||
| } | ||
| exports.QueryOptions = QueryOptions; | ||
| QueryOptions.runtime = protobuf_1.proto3; | ||
| QueryOptions.typeName = "aserto.authorizer.v2.QueryOptions"; | ||
| QueryOptions.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "metrics", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| { no: 2, name: "instrument", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| { no: 3, name: "trace", kind: "enum", T: protobuf_1.proto3.getEnumType(TraceLevel) }, | ||
| { no: 4, name: "trace_summary", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.QueryRequest | ||
| */ | ||
| class QueryRequest extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * @generated from field: string query = 1; | ||
| */ | ||
| this.query = ""; | ||
| /** | ||
| * @generated from field: string input = 2; | ||
| */ | ||
| this.input = ""; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new QueryRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new QueryRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new QueryRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(QueryRequest, a, b); | ||
| } | ||
| } | ||
| exports.QueryRequest = QueryRequest; | ||
| QueryRequest.runtime = protobuf_1.proto3; | ||
| QueryRequest.typeName = "aserto.authorizer.v2.QueryRequest"; | ||
| QueryRequest.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "input", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "options", kind: "message", T: QueryOptions, opt: true }, | ||
| { no: 4, name: "policy_context", kind: "message", T: policy_context_pb_js_1.PolicyContext, opt: true }, | ||
| { no: 5, name: "identity_context", kind: "message", T: identity_context_pb_js_1.IdentityContext, opt: true }, | ||
| { no: 6, name: "resource_context", kind: "message", T: protobuf_1.Struct, opt: true }, | ||
| { no: 7, name: "policy_instance", kind: "message", T: policy_instance_pb_js_1.PolicyInstance, opt: true }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.CompileRequest | ||
| */ | ||
| class CompileRequest extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * @generated from field: string query = 1; | ||
| */ | ||
| this.query = ""; | ||
| /** | ||
| * @generated from field: string input = 2; | ||
| */ | ||
| this.input = ""; | ||
| /** | ||
| * @generated from field: repeated string unknowns = 3; | ||
| */ | ||
| this.unknowns = []; | ||
| /** | ||
| * @generated from field: repeated string disable_inlining = 4; | ||
| */ | ||
| this.disableInlining = []; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new CompileRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new CompileRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new CompileRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(CompileRequest, a, b); | ||
| } | ||
| } | ||
| exports.CompileRequest = CompileRequest; | ||
| CompileRequest.runtime = protobuf_1.proto3; | ||
| CompileRequest.typeName = "aserto.authorizer.v2.CompileRequest"; | ||
| CompileRequest.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "input", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "unknowns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 4, name: "disable_inlining", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 5, name: "options", kind: "message", T: QueryOptions, opt: true }, | ||
| { no: 6, name: "policy_context", kind: "message", T: policy_context_pb_js_1.PolicyContext, opt: true }, | ||
| { no: 7, name: "identity_context", kind: "message", T: identity_context_pb_js_1.IdentityContext, opt: true }, | ||
| { no: 8, name: "resource_context", kind: "message", T: protobuf_1.Struct, opt: true }, | ||
| { no: 9, name: "policy_instance", kind: "message", T: policy_instance_pb_js_1.PolicyInstance, opt: true }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.CompileResponse | ||
| */ | ||
| class CompileResponse extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * @generated from field: repeated google.protobuf.Struct trace = 3; | ||
| */ | ||
| this.trace = []; | ||
| /** | ||
| * @generated from field: repeated string trace_summary = 4; | ||
| */ | ||
| this.traceSummary = []; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new CompileResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new CompileResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new CompileResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(CompileResponse, a, b); | ||
| } | ||
| } | ||
| exports.CompileResponse = CompileResponse; | ||
| CompileResponse.runtime = protobuf_1.proto3; | ||
| CompileResponse.typeName = "aserto.authorizer.v2.CompileResponse"; | ||
| CompileResponse.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "result", kind: "message", T: protobuf_1.Struct }, | ||
| { no: 2, name: "metrics", kind: "message", T: protobuf_1.Struct }, | ||
| { no: 3, name: "trace", kind: "message", T: protobuf_1.Struct, repeated: true }, | ||
| { no: 4, name: "trace_summary", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.QueryResponse | ||
| */ | ||
| class QueryResponse extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * @generated from field: repeated google.protobuf.Struct trace = 3; | ||
| */ | ||
| this.trace = []; | ||
| /** | ||
| * @generated from field: repeated string trace_summary = 4; | ||
| */ | ||
| this.traceSummary = []; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new QueryResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new QueryResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new QueryResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(QueryResponse, a, b); | ||
| } | ||
| } | ||
| exports.QueryResponse = QueryResponse; | ||
| QueryResponse.runtime = protobuf_1.proto3; | ||
| QueryResponse.typeName = "aserto.authorizer.v2.QueryResponse"; | ||
| QueryResponse.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "response", kind: "message", T: protobuf_1.Struct }, | ||
| { no: 2, name: "metrics", kind: "message", T: protobuf_1.Struct }, | ||
| { no: 3, name: "trace", kind: "message", T: protobuf_1.Struct, repeated: true }, | ||
| { no: 4, name: "trace_summary", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| ]); |
| import { MethodOptions } from "@bufbuild/protobuf"; | ||
| import { HttpRule } from "./http_pb.js"; | ||
| /** | ||
| * See `HttpRule`. | ||
| * | ||
| * @generated from extension: google.api.HttpRule http = 72295728; | ||
| */ | ||
| export declare const http: import("@bufbuild/protobuf").Extension<MethodOptions, HttpRule>; |
| "use strict"; | ||
| // Copyright 2015 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. | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.http = void 0; | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file google/api/annotations.proto (package google.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| const protobuf_1 = require("@bufbuild/protobuf"); | ||
| const http_pb_js_1 = require("./http_pb.js"); | ||
| /** | ||
| * See `HttpRule`. | ||
| * | ||
| * @generated from extension: google.api.HttpRule http = 72295728; | ||
| */ | ||
| exports.http = protobuf_1.proto3.makeExtension("google.api.http", protobuf_1.MethodOptions, () => ({ no: 72295728, kind: "message", T: http_pb_js_1.HttpRule })); |
| 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 declare 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: boolean; | ||
| constructor(data?: PartialMessage<Http>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "google.api.Http"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Http; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Http; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Http; | ||
| static equals(a: Http | PlainMessage<Http> | undefined, b: Http | PlainMessage<Http> | undefined): boolean; | ||
| } | ||
| /** | ||
| * # 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¶m=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 declare 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: string; | ||
| /** | ||
| * 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; | ||
| }; | ||
| /** | ||
| * 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: string; | ||
| /** | ||
| * 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: string; | ||
| /** | ||
| * 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>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "google.api.HttpRule"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HttpRule; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HttpRule; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HttpRule; | ||
| static equals(a: HttpRule | PlainMessage<HttpRule> | undefined, b: HttpRule | PlainMessage<HttpRule> | undefined): boolean; | ||
| } | ||
| /** | ||
| * A custom pattern is used for defining custom HTTP verb. | ||
| * | ||
| * @generated from message google.api.CustomHttpPattern | ||
| */ | ||
| export declare class CustomHttpPattern extends Message<CustomHttpPattern> { | ||
| /** | ||
| * The name of this custom HTTP verb. | ||
| * | ||
| * @generated from field: string kind = 1; | ||
| */ | ||
| kind: string; | ||
| /** | ||
| * The path matched by this custom verb. | ||
| * | ||
| * @generated from field: string path = 2; | ||
| */ | ||
| path: string; | ||
| constructor(data?: PartialMessage<CustomHttpPattern>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "google.api.CustomHttpPattern"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CustomHttpPattern; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CustomHttpPattern; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CustomHttpPattern; | ||
| static equals(a: CustomHttpPattern | PlainMessage<CustomHttpPattern> | undefined, b: CustomHttpPattern | PlainMessage<CustomHttpPattern> | undefined): boolean; | ||
| } |
| "use strict"; | ||
| // Copyright 2023 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. | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.CustomHttpPattern = exports.HttpRule = exports.Http = void 0; | ||
| const protobuf_1 = require("@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 | ||
| */ | ||
| class Http extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * 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; | ||
| */ | ||
| this.rules = []; | ||
| /** | ||
| * 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; | ||
| */ | ||
| this.fullyDecodeReservedExpansion = false; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new Http().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new Http().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new Http().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(Http, a, b); | ||
| } | ||
| } | ||
| exports.Http = Http; | ||
| Http.runtime = protobuf_1.proto3; | ||
| Http.typeName = "google.api.Http"; | ||
| Http.fields = protobuf_1.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 */ }, | ||
| ]); | ||
| /** | ||
| * # 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¶m=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 | ||
| */ | ||
| class HttpRule extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * Selects a method to which this rule applies. | ||
| * | ||
| * Refer to [selector][google.api.DocumentationRule.selector] for syntax | ||
| * details. | ||
| * | ||
| * @generated from field: string selector = 1; | ||
| */ | ||
| this.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 | ||
| */ | ||
| this.pattern = { 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; | ||
| */ | ||
| this.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; | ||
| */ | ||
| this.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; | ||
| */ | ||
| this.additionalBindings = []; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new HttpRule().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new HttpRule().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new HttpRule().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(HttpRule, a, b); | ||
| } | ||
| } | ||
| exports.HttpRule = HttpRule; | ||
| HttpRule.runtime = protobuf_1.proto3; | ||
| HttpRule.typeName = "google.api.HttpRule"; | ||
| HttpRule.fields = protobuf_1.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 }, | ||
| ]); | ||
| /** | ||
| * A custom pattern is used for defining custom HTTP verb. | ||
| * | ||
| * @generated from message google.api.CustomHttpPattern | ||
| */ | ||
| class CustomHttpPattern extends protobuf_1.Message { | ||
| constructor(data) { | ||
| super(); | ||
| /** | ||
| * The name of this custom HTTP verb. | ||
| * | ||
| * @generated from field: string kind = 1; | ||
| */ | ||
| this.kind = ""; | ||
| /** | ||
| * The path matched by this custom verb. | ||
| * | ||
| * @generated from field: string path = 2; | ||
| */ | ||
| this.path = ""; | ||
| protobuf_1.proto3.util.initPartial(data, this); | ||
| } | ||
| static fromBinary(bytes, options) { | ||
| return new CustomHttpPattern().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue, options) { | ||
| return new CustomHttpPattern().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString, options) { | ||
| return new CustomHttpPattern().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a, b) { | ||
| return protobuf_1.proto3.util.equals(CustomHttpPattern, a, b); | ||
| } | ||
| } | ||
| exports.CustomHttpPattern = CustomHttpPattern; | ||
| CustomHttpPattern.runtime = protobuf_1.proto3; | ||
| CustomHttpPattern.typeName = "google.api.CustomHttpPattern"; | ||
| CustomHttpPattern.fields = protobuf_1.proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ]); |
| import { FieldOptions, FileOptions, MessageOptions, MethodOptions, ServiceOptions } from "@bufbuild/protobuf"; | ||
| 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 declare const openapiv2_swagger: import("@bufbuild/protobuf").Extension<FileOptions, 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 declare const openapiv2_operation: import("@bufbuild/protobuf").Extension<MethodOptions, 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 declare const openapiv2_schema: import("@bufbuild/protobuf").Extension<MessageOptions, 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 declare const openapiv2_tag: import("@bufbuild/protobuf").Extension<ServiceOptions, 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 declare const openapiv2_field: import("@bufbuild/protobuf").Extension<FieldOptions, JSONSchema>; |
| "use strict"; | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file protoc-gen-openapiv2/options/annotations.proto (package grpc.gateway.protoc_gen_openapiv2.options, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.openapiv2_field = exports.openapiv2_tag = exports.openapiv2_schema = exports.openapiv2_operation = exports.openapiv2_swagger = void 0; | ||
| const protobuf_1 = require("@bufbuild/protobuf"); | ||
| const openapiv2_pb_js_1 = require("./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; | ||
| */ | ||
| exports.openapiv2_swagger = protobuf_1.proto3.makeExtension("grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger", protobuf_1.FileOptions, () => ({ no: 1042, kind: "message", T: openapiv2_pb_js_1.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; | ||
| */ | ||
| exports.openapiv2_operation = protobuf_1.proto3.makeExtension("grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation", protobuf_1.MethodOptions, () => ({ no: 1042, kind: "message", T: openapiv2_pb_js_1.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; | ||
| */ | ||
| exports.openapiv2_schema = protobuf_1.proto3.makeExtension("grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema", protobuf_1.MessageOptions, () => ({ no: 1042, kind: "message", T: openapiv2_pb_js_1.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; | ||
| */ | ||
| exports.openapiv2_tag = protobuf_1.proto3.makeExtension("grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag", protobuf_1.ServiceOptions, () => ({ no: 1042, kind: "message", T: openapiv2_pb_js_1.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; | ||
| */ | ||
| exports.openapiv2_field = protobuf_1.proto3.makeExtension("grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field", protobuf_1.FieldOptions, () => ({ no: 1042, kind: "message", T: openapiv2_pb_js_1.JSONSchema })); |
| import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; | ||
| import { Message, proto3, Value } from "@bufbuild/protobuf"; | ||
| /** | ||
| * Scheme describes the schemes supported by the OpenAPI Swagger | ||
| * and Operation objects. | ||
| * | ||
| * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.Scheme | ||
| */ | ||
| export declare enum Scheme { | ||
| /** | ||
| * @generated from enum value: UNKNOWN = 0; | ||
| */ | ||
| UNKNOWN = 0, | ||
| /** | ||
| * @generated from enum value: HTTP = 1; | ||
| */ | ||
| HTTP = 1, | ||
| /** | ||
| * @generated from enum value: HTTPS = 2; | ||
| */ | ||
| HTTPS = 2, | ||
| /** | ||
| * @generated from enum value: WS = 3; | ||
| */ | ||
| WS = 3, | ||
| /** | ||
| * @generated from enum value: WSS = 4; | ||
| */ | ||
| WSS = 4 | ||
| } | ||
| /** | ||
| * `Swagger` is a representation of OpenAPI v2 specification's Swagger object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject | ||
| * | ||
| * Example: | ||
| * | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { | ||
| * info: { | ||
| * title: "Echo API"; | ||
| * version: "1.0"; | ||
| * description: ""; | ||
| * contact: { | ||
| * name: "gRPC-Gateway project"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway"; | ||
| * email: "none@example.com"; | ||
| * }; | ||
| * license: { | ||
| * name: "BSD 3-Clause License"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; | ||
| * }; | ||
| * }; | ||
| * schemes: HTTPS; | ||
| * consumes: "application/json"; | ||
| * produces: "application/json"; | ||
| * }; | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Swagger | ||
| */ | ||
| export declare class Swagger extends Message<Swagger> { | ||
| /** | ||
| * Specifies the OpenAPI Specification version being used. It can be | ||
| * used by the OpenAPI UI and other clients to interpret the API listing. The | ||
| * value MUST be "2.0". | ||
| * | ||
| * @generated from field: string swagger = 1; | ||
| */ | ||
| swagger: string; | ||
| /** | ||
| * Provides metadata about the API. The metadata can be used by the | ||
| * clients if needed. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.Info info = 2; | ||
| */ | ||
| info?: Info; | ||
| /** | ||
| * The host (name or ip) serving the API. This MUST be the host only and does | ||
| * not include the scheme nor sub-paths. It MAY include a port. If the host is | ||
| * not included, the host serving the documentation is to be used (including | ||
| * the port). The host does not support path templating. | ||
| * | ||
| * @generated from field: string host = 3; | ||
| */ | ||
| host: string; | ||
| /** | ||
| * The base path on which the API is served, which is relative to the host. If | ||
| * it is not included, the API is served directly under the host. The value | ||
| * MUST start with a leading slash (/). The basePath does not support path | ||
| * templating. | ||
| * Note that using `base_path` does not change the endpoint paths that are | ||
| * generated in the resulting OpenAPI file. If you wish to use `base_path` | ||
| * with relatively generated OpenAPI paths, the `base_path` prefix must be | ||
| * manually removed from your `google.api.http` paths and your code changed to | ||
| * serve the API from the `base_path`. | ||
| * | ||
| * @generated from field: string base_path = 4; | ||
| */ | ||
| basePath: string; | ||
| /** | ||
| * The transfer protocol of the API. Values MUST be from the list: "http", | ||
| * "https", "ws", "wss". If the schemes is not included, the default scheme to | ||
| * be used is the one used to access the OpenAPI definition itself. | ||
| * | ||
| * @generated from field: repeated grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5; | ||
| */ | ||
| schemes: Scheme[]; | ||
| /** | ||
| * A list of MIME types the APIs can consume. This is global to all APIs but | ||
| * can be overridden on specific API calls. Value MUST be as described under | ||
| * Mime Types. | ||
| * | ||
| * @generated from field: repeated string consumes = 6; | ||
| */ | ||
| consumes: string[]; | ||
| /** | ||
| * A list of MIME types the APIs can produce. This is global to all APIs but | ||
| * can be overridden on specific API calls. Value MUST be as described under | ||
| * Mime Types. | ||
| * | ||
| * @generated from field: repeated string produces = 7; | ||
| */ | ||
| produces: string[]; | ||
| /** | ||
| * An object to hold responses that can be used across operations. This | ||
| * property does not define global responses for all operations. | ||
| * | ||
| * @generated from field: map<string, grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10; | ||
| */ | ||
| responses: { | ||
| [key: string]: Response; | ||
| }; | ||
| /** | ||
| * Security scheme definitions that can be used across the specification. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11; | ||
| */ | ||
| securityDefinitions?: SecurityDefinitions; | ||
| /** | ||
| * A declaration of which security schemes are applied for the API as a whole. | ||
| * The list of values describes alternative security schemes that can be used | ||
| * (that is, there is a logical OR between the security requirements). | ||
| * Individual operations can override this definition. | ||
| * | ||
| * @generated from field: repeated grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12; | ||
| */ | ||
| security: SecurityRequirement[]; | ||
| /** | ||
| * A list of tags for API documentation control. Tags can be used for logical | ||
| * grouping of operations by resources or any other qualifier. | ||
| * | ||
| * @generated from field: repeated grpc.gateway.protoc_gen_openapiv2.options.Tag tags = 13; | ||
| */ | ||
| tags: Tag[]; | ||
| /** | ||
| * Additional external documentation. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14; | ||
| */ | ||
| externalDocs?: ExternalDocumentation; | ||
| /** | ||
| * Custom properties that start with "x-" such as "x-foo" used to describe | ||
| * extra functionality that is not covered by the standard OpenAPI Specification. | ||
| * See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | ||
| * | ||
| * @generated from field: map<string, google.protobuf.Value> extensions = 15; | ||
| */ | ||
| extensions: { | ||
| [key: string]: Value; | ||
| }; | ||
| constructor(data?: PartialMessage<Swagger>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.Swagger"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Swagger; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Swagger; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Swagger; | ||
| static equals(a: Swagger | PlainMessage<Swagger> | undefined, b: Swagger | PlainMessage<Swagger> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `Operation` is a representation of OpenAPI v2 specification's Operation object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject | ||
| * | ||
| * Example: | ||
| * | ||
| * service EchoService { | ||
| * rpc Echo(SimpleMessage) returns (SimpleMessage) { | ||
| * option (google.api.http) = { | ||
| * get: "/v1/example/echo/{id}" | ||
| * }; | ||
| * | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { | ||
| * summary: "Get a message."; | ||
| * operation_id: "getMessage"; | ||
| * tags: "echo"; | ||
| * responses: { | ||
| * key: "200" | ||
| * value: { | ||
| * description: "OK"; | ||
| * } | ||
| * } | ||
| * }; | ||
| * } | ||
| * } | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Operation | ||
| */ | ||
| export declare class Operation extends Message<Operation> { | ||
| /** | ||
| * A list of tags for API documentation control. Tags can be used for logical | ||
| * grouping of operations by resources or any other qualifier. | ||
| * | ||
| * @generated from field: repeated string tags = 1; | ||
| */ | ||
| tags: string[]; | ||
| /** | ||
| * A short summary of what the operation does. For maximum readability in the | ||
| * swagger-ui, this field SHOULD be less than 120 characters. | ||
| * | ||
| * @generated from field: string summary = 2; | ||
| */ | ||
| summary: string; | ||
| /** | ||
| * A verbose explanation of the operation behavior. GFM syntax can be used for | ||
| * rich text representation. | ||
| * | ||
| * @generated from field: string description = 3; | ||
| */ | ||
| description: string; | ||
| /** | ||
| * Additional external documentation for this operation. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4; | ||
| */ | ||
| externalDocs?: ExternalDocumentation; | ||
| /** | ||
| * Unique string used to identify the operation. The id MUST be unique among | ||
| * all operations described in the API. Tools and libraries MAY use the | ||
| * operationId to uniquely identify an operation, therefore, it is recommended | ||
| * to follow common programming naming conventions. | ||
| * | ||
| * @generated from field: string operation_id = 5; | ||
| */ | ||
| operationId: string; | ||
| /** | ||
| * A list of MIME types the operation can consume. This overrides the consumes | ||
| * definition at the OpenAPI Object. An empty value MAY be used to clear the | ||
| * global definition. Value MUST be as described under Mime Types. | ||
| * | ||
| * @generated from field: repeated string consumes = 6; | ||
| */ | ||
| consumes: string[]; | ||
| /** | ||
| * A list of MIME types the operation can produce. This overrides the produces | ||
| * definition at the OpenAPI Object. An empty value MAY be used to clear the | ||
| * global definition. Value MUST be as described under Mime Types. | ||
| * | ||
| * @generated from field: repeated string produces = 7; | ||
| */ | ||
| produces: string[]; | ||
| /** | ||
| * The list of possible responses as they are returned from executing this | ||
| * operation. | ||
| * | ||
| * @generated from field: map<string, grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9; | ||
| */ | ||
| responses: { | ||
| [key: string]: Response; | ||
| }; | ||
| /** | ||
| * The transfer protocol for the operation. Values MUST be from the list: | ||
| * "http", "https", "ws", "wss". The value overrides the OpenAPI Object | ||
| * schemes definition. | ||
| * | ||
| * @generated from field: repeated grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10; | ||
| */ | ||
| schemes: Scheme[]; | ||
| /** | ||
| * Declares this operation to be deprecated. Usage of the declared operation | ||
| * should be refrained. Default value is false. | ||
| * | ||
| * @generated from field: bool deprecated = 11; | ||
| */ | ||
| deprecated: boolean; | ||
| /** | ||
| * A declaration of which security schemes are applied for this operation. The | ||
| * list of values describes alternative security schemes that can be used | ||
| * (that is, there is a logical OR between the security requirements). This | ||
| * definition overrides any declared top-level security. To remove a top-level | ||
| * security declaration, an empty array can be used. | ||
| * | ||
| * @generated from field: repeated grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12; | ||
| */ | ||
| security: SecurityRequirement[]; | ||
| /** | ||
| * Custom properties that start with "x-" such as "x-foo" used to describe | ||
| * extra functionality that is not covered by the standard OpenAPI Specification. | ||
| * See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | ||
| * | ||
| * @generated from field: map<string, google.protobuf.Value> extensions = 13; | ||
| */ | ||
| extensions: { | ||
| [key: string]: Value; | ||
| }; | ||
| /** | ||
| * Custom parameters such as HTTP request headers. | ||
| * See: https://swagger.io/docs/specification/2-0/describing-parameters/ | ||
| * and https://swagger.io/specification/v2/#parameter-object. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14; | ||
| */ | ||
| parameters?: Parameters; | ||
| constructor(data?: PartialMessage<Operation>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.Operation"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Operation; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Operation; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Operation; | ||
| static equals(a: Operation | PlainMessage<Operation> | undefined, b: Operation | PlainMessage<Operation> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `Parameters` is a representation of OpenAPI v2 specification's parameters object. | ||
| * Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only | ||
| * allow header parameters to be set here since we do not want users specifying custom non-header | ||
| * parameters beyond those inferred from the Protobuf schema. | ||
| * See: https://swagger.io/specification/v2/#parameter-object | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Parameters | ||
| */ | ||
| export declare class Parameters extends Message<Parameters> { | ||
| /** | ||
| * `Headers` is one or more HTTP header parameter. | ||
| * See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters | ||
| * | ||
| * @generated from field: repeated grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1; | ||
| */ | ||
| headers: HeaderParameter[]; | ||
| constructor(data?: PartialMessage<Parameters>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.Parameters"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Parameters; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Parameters; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Parameters; | ||
| static equals(a: Parameters | PlainMessage<Parameters> | undefined, b: Parameters | PlainMessage<Parameters> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `HeaderParameter` a HTTP header parameter. | ||
| * See: https://swagger.io/specification/v2/#parameter-object | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter | ||
| */ | ||
| export declare class HeaderParameter extends Message<HeaderParameter> { | ||
| /** | ||
| * `Name` is the header name. | ||
| * | ||
| * @generated from field: string name = 1; | ||
| */ | ||
| name: string; | ||
| /** | ||
| * `Description` is a short description of the header. | ||
| * | ||
| * @generated from field: string description = 2; | ||
| */ | ||
| description: string; | ||
| /** | ||
| * `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. | ||
| * See: https://swagger.io/specification/v2/#parameterType. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3; | ||
| */ | ||
| type: HeaderParameter_Type; | ||
| /** | ||
| * `Format` The extending format for the previously mentioned type. | ||
| * | ||
| * @generated from field: string format = 4; | ||
| */ | ||
| format: string; | ||
| /** | ||
| * `Required` indicates if the header is optional | ||
| * | ||
| * @generated from field: bool required = 5; | ||
| */ | ||
| required: boolean; | ||
| constructor(data?: PartialMessage<HeaderParameter>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HeaderParameter; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HeaderParameter; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HeaderParameter; | ||
| static equals(a: HeaderParameter | PlainMessage<HeaderParameter> | undefined, b: HeaderParameter | PlainMessage<HeaderParameter> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `Type` is a a supported HTTP header type. | ||
| * See https://swagger.io/specification/v2/#parameterType. | ||
| * | ||
| * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type | ||
| */ | ||
| export declare enum HeaderParameter_Type { | ||
| /** | ||
| * @generated from enum value: UNKNOWN = 0; | ||
| */ | ||
| UNKNOWN = 0, | ||
| /** | ||
| * @generated from enum value: STRING = 1; | ||
| */ | ||
| STRING = 1, | ||
| /** | ||
| * @generated from enum value: NUMBER = 2; | ||
| */ | ||
| NUMBER = 2, | ||
| /** | ||
| * @generated from enum value: INTEGER = 3; | ||
| */ | ||
| INTEGER = 3, | ||
| /** | ||
| * @generated from enum value: BOOLEAN = 4; | ||
| */ | ||
| BOOLEAN = 4 | ||
| } | ||
| /** | ||
| * `Header` is a representation of OpenAPI v2 specification's Header object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Header | ||
| */ | ||
| export declare class Header extends Message<Header> { | ||
| /** | ||
| * `Description` is a short description of the header. | ||
| * | ||
| * @generated from field: string description = 1; | ||
| */ | ||
| description: string; | ||
| /** | ||
| * The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. | ||
| * | ||
| * @generated from field: string type = 2; | ||
| */ | ||
| type: string; | ||
| /** | ||
| * `Format` The extending format for the previously mentioned type. | ||
| * | ||
| * @generated from field: string format = 3; | ||
| */ | ||
| format: string; | ||
| /** | ||
| * `Default` Declares the value of the header that the server will use if none is provided. | ||
| * See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. | ||
| * Unlike JSON Schema this value MUST conform to the defined type for the header. | ||
| * | ||
| * @generated from field: string default = 6; | ||
| */ | ||
| default: string; | ||
| /** | ||
| * 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. | ||
| * | ||
| * @generated from field: string pattern = 13; | ||
| */ | ||
| pattern: string; | ||
| constructor(data?: PartialMessage<Header>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.Header"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Header; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Header; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Header; | ||
| static equals(a: Header | PlainMessage<Header> | undefined, b: Header | PlainMessage<Header> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `Response` is a representation of OpenAPI v2 specification's Response object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Response | ||
| */ | ||
| export declare class Response extends Message<Response> { | ||
| /** | ||
| * `Description` is a short description of the response. | ||
| * GFM syntax can be used for rich text representation. | ||
| * | ||
| * @generated from field: string description = 1; | ||
| */ | ||
| description: string; | ||
| /** | ||
| * `Schema` optionally defines the structure of the response. | ||
| * If `Schema` is not provided, it means there is no content to the response. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2; | ||
| */ | ||
| schema?: Schema; | ||
| /** | ||
| * `Headers` A list of headers that are sent with the response. | ||
| * `Header` name is expected to be a string in the canonical format of the MIME header key | ||
| * See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey | ||
| * | ||
| * @generated from field: map<string, grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3; | ||
| */ | ||
| headers: { | ||
| [key: string]: Header; | ||
| }; | ||
| /** | ||
| * `Examples` gives per-mimetype response examples. | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object | ||
| * | ||
| * @generated from field: map<string, string> examples = 4; | ||
| */ | ||
| examples: { | ||
| [key: string]: string; | ||
| }; | ||
| /** | ||
| * Custom properties that start with "x-" such as "x-foo" used to describe | ||
| * extra functionality that is not covered by the standard OpenAPI Specification. | ||
| * See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | ||
| * | ||
| * @generated from field: map<string, google.protobuf.Value> extensions = 5; | ||
| */ | ||
| extensions: { | ||
| [key: string]: Value; | ||
| }; | ||
| constructor(data?: PartialMessage<Response>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.Response"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Response; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Response; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Response; | ||
| static equals(a: Response | PlainMessage<Response> | undefined, b: Response | PlainMessage<Response> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `Info` is a representation of OpenAPI v2 specification's Info object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject | ||
| * | ||
| * Example: | ||
| * | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { | ||
| * info: { | ||
| * title: "Echo API"; | ||
| * version: "1.0"; | ||
| * description: ""; | ||
| * contact: { | ||
| * name: "gRPC-Gateway project"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway"; | ||
| * email: "none@example.com"; | ||
| * }; | ||
| * license: { | ||
| * name: "BSD 3-Clause License"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; | ||
| * }; | ||
| * }; | ||
| * ... | ||
| * }; | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Info | ||
| */ | ||
| export declare class Info extends Message<Info> { | ||
| /** | ||
| * The title of the application. | ||
| * | ||
| * @generated from field: string title = 1; | ||
| */ | ||
| title: string; | ||
| /** | ||
| * A short description of the application. GFM syntax can be used for rich | ||
| * text representation. | ||
| * | ||
| * @generated from field: string description = 2; | ||
| */ | ||
| description: string; | ||
| /** | ||
| * The Terms of Service for the API. | ||
| * | ||
| * @generated from field: string terms_of_service = 3; | ||
| */ | ||
| termsOfService: string; | ||
| /** | ||
| * The contact information for the exposed API. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4; | ||
| */ | ||
| contact?: Contact; | ||
| /** | ||
| * The license information for the exposed API. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.License license = 5; | ||
| */ | ||
| license?: License; | ||
| /** | ||
| * Provides the version of the application API (not to be confused | ||
| * with the specification version). | ||
| * | ||
| * @generated from field: string version = 6; | ||
| */ | ||
| version: string; | ||
| /** | ||
| * Custom properties that start with "x-" such as "x-foo" used to describe | ||
| * extra functionality that is not covered by the standard OpenAPI Specification. | ||
| * See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | ||
| * | ||
| * @generated from field: map<string, google.protobuf.Value> extensions = 7; | ||
| */ | ||
| extensions: { | ||
| [key: string]: Value; | ||
| }; | ||
| constructor(data?: PartialMessage<Info>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.Info"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Info; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Info; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Info; | ||
| static equals(a: Info | PlainMessage<Info> | undefined, b: Info | PlainMessage<Info> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `Contact` is a representation of OpenAPI v2 specification's Contact object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject | ||
| * | ||
| * Example: | ||
| * | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { | ||
| * info: { | ||
| * ... | ||
| * contact: { | ||
| * name: "gRPC-Gateway project"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway"; | ||
| * email: "none@example.com"; | ||
| * }; | ||
| * ... | ||
| * }; | ||
| * ... | ||
| * }; | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Contact | ||
| */ | ||
| export declare class Contact extends Message<Contact> { | ||
| /** | ||
| * The identifying name of the contact person/organization. | ||
| * | ||
| * @generated from field: string name = 1; | ||
| */ | ||
| name: string; | ||
| /** | ||
| * The URL pointing to the contact information. MUST be in the format of a | ||
| * URL. | ||
| * | ||
| * @generated from field: string url = 2; | ||
| */ | ||
| url: string; | ||
| /** | ||
| * The email address of the contact person/organization. MUST be in the format | ||
| * of an email address. | ||
| * | ||
| * @generated from field: string email = 3; | ||
| */ | ||
| email: string; | ||
| constructor(data?: PartialMessage<Contact>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.Contact"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Contact; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Contact; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Contact; | ||
| static equals(a: Contact | PlainMessage<Contact> | undefined, b: Contact | PlainMessage<Contact> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `License` is a representation of OpenAPI v2 specification's License object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject | ||
| * | ||
| * Example: | ||
| * | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { | ||
| * info: { | ||
| * ... | ||
| * license: { | ||
| * name: "BSD 3-Clause License"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; | ||
| * }; | ||
| * ... | ||
| * }; | ||
| * ... | ||
| * }; | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.License | ||
| */ | ||
| export declare class License extends Message<License> { | ||
| /** | ||
| * The license name used for the API. | ||
| * | ||
| * @generated from field: string name = 1; | ||
| */ | ||
| name: string; | ||
| /** | ||
| * A URL to the license used for the API. MUST be in the format of a URL. | ||
| * | ||
| * @generated from field: string url = 2; | ||
| */ | ||
| url: string; | ||
| constructor(data?: PartialMessage<License>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.License"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): License; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): License; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): License; | ||
| static equals(a: License | PlainMessage<License> | undefined, b: License | PlainMessage<License> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `ExternalDocumentation` is a representation of OpenAPI v2 specification's | ||
| * ExternalDocumentation object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject | ||
| * | ||
| * Example: | ||
| * | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { | ||
| * ... | ||
| * external_docs: { | ||
| * description: "More about gRPC-Gateway"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway"; | ||
| * } | ||
| * ... | ||
| * }; | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation | ||
| */ | ||
| export declare class ExternalDocumentation extends Message<ExternalDocumentation> { | ||
| /** | ||
| * A short description of the target documentation. GFM syntax can be used for | ||
| * rich text representation. | ||
| * | ||
| * @generated from field: string description = 1; | ||
| */ | ||
| description: string; | ||
| /** | ||
| * The URL for the target documentation. Value MUST be in the format | ||
| * of a URL. | ||
| * | ||
| * @generated from field: string url = 2; | ||
| */ | ||
| url: string; | ||
| constructor(data?: PartialMessage<ExternalDocumentation>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ExternalDocumentation; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ExternalDocumentation; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ExternalDocumentation; | ||
| static equals(a: ExternalDocumentation | PlainMessage<ExternalDocumentation> | undefined, b: ExternalDocumentation | PlainMessage<ExternalDocumentation> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `Schema` is a representation of OpenAPI v2 specification's Schema object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Schema | ||
| */ | ||
| export declare class Schema extends Message<Schema> { | ||
| /** | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1; | ||
| */ | ||
| jsonSchema?: JSONSchema; | ||
| /** | ||
| * Adds support for polymorphism. The discriminator is the schema property | ||
| * name that is used to differentiate between other schema that inherit this | ||
| * schema. The property name used MUST be defined at this schema and it MUST | ||
| * be in the required property list. When used, the value MUST be the name of | ||
| * this schema or any schema that inherits it. | ||
| * | ||
| * @generated from field: string discriminator = 2; | ||
| */ | ||
| discriminator: string; | ||
| /** | ||
| * Relevant only for Schema "properties" definitions. Declares the property as | ||
| * "read only". This means that it MAY be sent as part of a response but MUST | ||
| * NOT be sent as part of the request. Properties marked as readOnly being | ||
| * true SHOULD NOT be in the required list of the defined schema. Default | ||
| * value is false. | ||
| * | ||
| * @generated from field: bool read_only = 3; | ||
| */ | ||
| readOnly: boolean; | ||
| /** | ||
| * Additional external documentation for this schema. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5; | ||
| */ | ||
| externalDocs?: ExternalDocumentation; | ||
| /** | ||
| * A free-form property to include an example of an instance for this schema in JSON. | ||
| * This is copied verbatim to the output. | ||
| * | ||
| * @generated from field: string example = 6; | ||
| */ | ||
| example: string; | ||
| constructor(data?: PartialMessage<Schema>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.Schema"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Schema; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Schema; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Schema; | ||
| static equals(a: Schema | PlainMessage<Schema> | undefined, b: Schema | PlainMessage<Schema> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `JSONSchema` represents properties from JSON Schema taken, and as used, in | ||
| * the OpenAPI v2 spec. | ||
| * | ||
| * This includes changes made by OpenAPI v2. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject | ||
| * | ||
| * See also: https://cswr.github.io/JsonSchema/spec/basic_types/, | ||
| * https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json | ||
| * | ||
| * Example: | ||
| * | ||
| * message SimpleMessage { | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { | ||
| * json_schema: { | ||
| * title: "SimpleMessage" | ||
| * description: "A simple message." | ||
| * required: ["id"] | ||
| * } | ||
| * }; | ||
| * | ||
| * // Id represents the message identifier. | ||
| * string id = 1; [ | ||
| * (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { | ||
| * description: "The unique identifier of the simple message." | ||
| * }]; | ||
| * } | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.JSONSchema | ||
| */ | ||
| export declare class JSONSchema extends Message<JSONSchema> { | ||
| /** | ||
| * Ref is used to define an external reference to include in the message. | ||
| * This could be a fully qualified proto message reference, and that type must | ||
| * be imported into the protofile. If no message is identified, the Ref will | ||
| * be used verbatim in the output. | ||
| * For example: | ||
| * `ref: ".google.protobuf.Timestamp"`. | ||
| * | ||
| * @generated from field: string ref = 3; | ||
| */ | ||
| ref: string; | ||
| /** | ||
| * The title of the schema. | ||
| * | ||
| * @generated from field: string title = 5; | ||
| */ | ||
| title: string; | ||
| /** | ||
| * A short description of the schema. | ||
| * | ||
| * @generated from field: string description = 6; | ||
| */ | ||
| description: string; | ||
| /** | ||
| * @generated from field: string default = 7; | ||
| */ | ||
| default: string; | ||
| /** | ||
| * @generated from field: bool read_only = 8; | ||
| */ | ||
| readOnly: boolean; | ||
| /** | ||
| * A free-form property to include a JSON example of this field. This is copied | ||
| * verbatim to the output swagger.json. Quotes must be escaped. | ||
| * This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject | ||
| * | ||
| * @generated from field: string example = 9; | ||
| */ | ||
| example: string; | ||
| /** | ||
| * @generated from field: double multiple_of = 10; | ||
| */ | ||
| multipleOf: number; | ||
| /** | ||
| * Maximum represents an inclusive upper limit for a numeric instance. The | ||
| * value of MUST be a number, | ||
| * | ||
| * @generated from field: double maximum = 11; | ||
| */ | ||
| maximum: number; | ||
| /** | ||
| * @generated from field: bool exclusive_maximum = 12; | ||
| */ | ||
| exclusiveMaximum: boolean; | ||
| /** | ||
| * minimum represents an inclusive lower limit for a numeric instance. The | ||
| * value of MUST be a number, | ||
| * | ||
| * @generated from field: double minimum = 13; | ||
| */ | ||
| minimum: number; | ||
| /** | ||
| * @generated from field: bool exclusive_minimum = 14; | ||
| */ | ||
| exclusiveMinimum: boolean; | ||
| /** | ||
| * @generated from field: uint64 max_length = 15; | ||
| */ | ||
| maxLength: bigint; | ||
| /** | ||
| * @generated from field: uint64 min_length = 16; | ||
| */ | ||
| minLength: bigint; | ||
| /** | ||
| * @generated from field: string pattern = 17; | ||
| */ | ||
| pattern: string; | ||
| /** | ||
| * @generated from field: uint64 max_items = 20; | ||
| */ | ||
| maxItems: bigint; | ||
| /** | ||
| * @generated from field: uint64 min_items = 21; | ||
| */ | ||
| minItems: bigint; | ||
| /** | ||
| * @generated from field: bool unique_items = 22; | ||
| */ | ||
| uniqueItems: boolean; | ||
| /** | ||
| * @generated from field: uint64 max_properties = 24; | ||
| */ | ||
| maxProperties: bigint; | ||
| /** | ||
| * @generated from field: uint64 min_properties = 25; | ||
| */ | ||
| minProperties: bigint; | ||
| /** | ||
| * @generated from field: repeated string required = 26; | ||
| */ | ||
| required: string[]; | ||
| /** | ||
| * Items in 'array' must be unique. | ||
| * | ||
| * @generated from field: repeated string array = 34; | ||
| */ | ||
| array: string[]; | ||
| /** | ||
| * @generated from field: repeated grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35; | ||
| */ | ||
| type: JSONSchema_JSONSchemaSimpleTypes[]; | ||
| /** | ||
| * `Format` | ||
| * | ||
| * @generated from field: string format = 36; | ||
| */ | ||
| format: string; | ||
| /** | ||
| * Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | ||
| * | ||
| * @generated from field: repeated string enum = 46; | ||
| */ | ||
| enum: string[]; | ||
| /** | ||
| * Additional field level properties used when generating the OpenAPI v2 file. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration field_configuration = 1001; | ||
| */ | ||
| fieldConfiguration?: JSONSchema_FieldConfiguration; | ||
| /** | ||
| * Custom properties that start with "x-" such as "x-foo" used to describe | ||
| * extra functionality that is not covered by the standard OpenAPI Specification. | ||
| * See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | ||
| * | ||
| * @generated from field: map<string, google.protobuf.Value> extensions = 48; | ||
| */ | ||
| extensions: { | ||
| [key: string]: Value; | ||
| }; | ||
| constructor(data?: PartialMessage<JSONSchema>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.JSONSchema"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): JSONSchema; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): JSONSchema; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): JSONSchema; | ||
| static equals(a: JSONSchema | PlainMessage<JSONSchema> | undefined, b: JSONSchema | PlainMessage<JSONSchema> | undefined): boolean; | ||
| } | ||
| /** | ||
| * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes | ||
| */ | ||
| export declare enum JSONSchema_JSONSchemaSimpleTypes { | ||
| /** | ||
| * @generated from enum value: UNKNOWN = 0; | ||
| */ | ||
| UNKNOWN = 0, | ||
| /** | ||
| * @generated from enum value: ARRAY = 1; | ||
| */ | ||
| ARRAY = 1, | ||
| /** | ||
| * @generated from enum value: BOOLEAN = 2; | ||
| */ | ||
| BOOLEAN = 2, | ||
| /** | ||
| * @generated from enum value: INTEGER = 3; | ||
| */ | ||
| INTEGER = 3, | ||
| /** | ||
| * @generated from enum value: NULL = 4; | ||
| */ | ||
| NULL = 4, | ||
| /** | ||
| * @generated from enum value: NUMBER = 5; | ||
| */ | ||
| NUMBER = 5, | ||
| /** | ||
| * @generated from enum value: OBJECT = 6; | ||
| */ | ||
| OBJECT = 6, | ||
| /** | ||
| * @generated from enum value: STRING = 7; | ||
| */ | ||
| STRING = 7 | ||
| } | ||
| /** | ||
| * 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. | ||
| * These properties are not defined by OpenAPIv2, but they are used to control the generation. | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration | ||
| */ | ||
| export declare class JSONSchema_FieldConfiguration extends Message<JSONSchema_FieldConfiguration> { | ||
| /** | ||
| * Alternative parameter name when used as path parameter. If set, this will | ||
| * be used as the complete parameter name when this field is used as a path | ||
| * parameter. Use this to avoid having auto generated path parameter names | ||
| * for overlapping paths. | ||
| * | ||
| * @generated from field: string path_param_name = 47; | ||
| */ | ||
| pathParamName: string; | ||
| constructor(data?: PartialMessage<JSONSchema_FieldConfiguration>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): JSONSchema_FieldConfiguration; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): JSONSchema_FieldConfiguration; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): JSONSchema_FieldConfiguration; | ||
| static equals(a: JSONSchema_FieldConfiguration | PlainMessage<JSONSchema_FieldConfiguration> | undefined, b: JSONSchema_FieldConfiguration | PlainMessage<JSONSchema_FieldConfiguration> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `Tag` is a representation of OpenAPI v2 specification's Tag object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Tag | ||
| */ | ||
| export declare class Tag extends Message<Tag> { | ||
| /** | ||
| * The name of the tag. Use it to allow override of the name of a | ||
| * global Tag object, then use that name to reference the tag throughout the | ||
| * OpenAPI file. | ||
| * | ||
| * @generated from field: string name = 1; | ||
| */ | ||
| name: string; | ||
| /** | ||
| * A short description for the tag. GFM syntax can be used for rich text | ||
| * representation. | ||
| * | ||
| * @generated from field: string description = 2; | ||
| */ | ||
| description: string; | ||
| /** | ||
| * Additional external documentation for this tag. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3; | ||
| */ | ||
| externalDocs?: ExternalDocumentation; | ||
| /** | ||
| * Custom properties that start with "x-" such as "x-foo" used to describe | ||
| * extra functionality that is not covered by the standard OpenAPI Specification. | ||
| * See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | ||
| * | ||
| * @generated from field: map<string, google.protobuf.Value> extensions = 4; | ||
| */ | ||
| extensions: { | ||
| [key: string]: Value; | ||
| }; | ||
| constructor(data?: PartialMessage<Tag>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.Tag"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Tag; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Tag; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Tag; | ||
| static equals(a: Tag | PlainMessage<Tag> | undefined, b: Tag | PlainMessage<Tag> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `SecurityDefinitions` is a representation of OpenAPI v2 specification's | ||
| * Security Definitions object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject | ||
| * | ||
| * A declaration of the security schemes available to be used in the | ||
| * specification. This does not enforce the security schemes on the operations | ||
| * and only serves to provide the relevant details for each scheme. | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions | ||
| */ | ||
| export declare class SecurityDefinitions extends Message<SecurityDefinitions> { | ||
| /** | ||
| * A single security scheme definition, mapping a "name" to the scheme it | ||
| * defines. | ||
| * | ||
| * @generated from field: map<string, grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme> security = 1; | ||
| */ | ||
| security: { | ||
| [key: string]: SecurityScheme; | ||
| }; | ||
| constructor(data?: PartialMessage<SecurityDefinitions>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SecurityDefinitions; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SecurityDefinitions; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SecurityDefinitions; | ||
| static equals(a: SecurityDefinitions | PlainMessage<SecurityDefinitions> | undefined, b: SecurityDefinitions | PlainMessage<SecurityDefinitions> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `SecurityScheme` is a representation of OpenAPI v2 specification's | ||
| * Security Scheme object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject | ||
| * | ||
| * Allows the definition of a security scheme that can be used by the | ||
| * operations. Supported schemes are basic authentication, an API key (either as | ||
| * a header or as a query parameter) and OAuth2's common flows (implicit, | ||
| * password, application and access code). | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme | ||
| */ | ||
| export declare class SecurityScheme extends Message<SecurityScheme> { | ||
| /** | ||
| * The type of the security scheme. Valid values are "basic", | ||
| * "apiKey" or "oauth2". | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type type = 1; | ||
| */ | ||
| type: SecurityScheme_Type; | ||
| /** | ||
| * A short description for security scheme. | ||
| * | ||
| * @generated from field: string description = 2; | ||
| */ | ||
| description: string; | ||
| /** | ||
| * The name of the header or query parameter to be used. | ||
| * Valid for apiKey. | ||
| * | ||
| * @generated from field: string name = 3; | ||
| */ | ||
| name: string; | ||
| /** | ||
| * The location of the API key. Valid values are "query" or | ||
| * "header". | ||
| * Valid for apiKey. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In in = 4; | ||
| */ | ||
| in: SecurityScheme_In; | ||
| /** | ||
| * The flow used by the OAuth2 security scheme. Valid values are | ||
| * "implicit", "password", "application" or "accessCode". | ||
| * Valid for oauth2. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow flow = 5; | ||
| */ | ||
| flow: SecurityScheme_Flow; | ||
| /** | ||
| * The authorization URL to be used for this flow. This SHOULD be in | ||
| * the form of a URL. | ||
| * Valid for oauth2/implicit and oauth2/accessCode. | ||
| * | ||
| * @generated from field: string authorization_url = 6; | ||
| */ | ||
| authorizationUrl: string; | ||
| /** | ||
| * The token URL to be used for this flow. This SHOULD be in the | ||
| * form of a URL. | ||
| * Valid for oauth2/password, oauth2/application and oauth2/accessCode. | ||
| * | ||
| * @generated from field: string token_url = 7; | ||
| */ | ||
| tokenUrl: string; | ||
| /** | ||
| * The available scopes for the OAuth2 security scheme. | ||
| * Valid for oauth2. | ||
| * | ||
| * @generated from field: grpc.gateway.protoc_gen_openapiv2.options.Scopes scopes = 8; | ||
| */ | ||
| scopes?: Scopes; | ||
| /** | ||
| * Custom properties that start with "x-" such as "x-foo" used to describe | ||
| * extra functionality that is not covered by the standard OpenAPI Specification. | ||
| * See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | ||
| * | ||
| * @generated from field: map<string, google.protobuf.Value> extensions = 9; | ||
| */ | ||
| extensions: { | ||
| [key: string]: Value; | ||
| }; | ||
| constructor(data?: PartialMessage<SecurityScheme>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SecurityScheme; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SecurityScheme; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SecurityScheme; | ||
| static equals(a: SecurityScheme | PlainMessage<SecurityScheme> | undefined, b: SecurityScheme | PlainMessage<SecurityScheme> | undefined): boolean; | ||
| } | ||
| /** | ||
| * The type of the security scheme. Valid values are "basic", | ||
| * "apiKey" or "oauth2". | ||
| * | ||
| * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type | ||
| */ | ||
| export declare enum SecurityScheme_Type { | ||
| /** | ||
| * @generated from enum value: TYPE_INVALID = 0; | ||
| */ | ||
| INVALID = 0, | ||
| /** | ||
| * @generated from enum value: TYPE_BASIC = 1; | ||
| */ | ||
| BASIC = 1, | ||
| /** | ||
| * @generated from enum value: TYPE_API_KEY = 2; | ||
| */ | ||
| API_KEY = 2, | ||
| /** | ||
| * @generated from enum value: TYPE_OAUTH2 = 3; | ||
| */ | ||
| OAUTH2 = 3 | ||
| } | ||
| /** | ||
| * The location of the API key. Valid values are "query" or "header". | ||
| * | ||
| * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In | ||
| */ | ||
| export declare enum SecurityScheme_In { | ||
| /** | ||
| * @generated from enum value: IN_INVALID = 0; | ||
| */ | ||
| INVALID = 0, | ||
| /** | ||
| * @generated from enum value: IN_QUERY = 1; | ||
| */ | ||
| QUERY = 1, | ||
| /** | ||
| * @generated from enum value: IN_HEADER = 2; | ||
| */ | ||
| HEADER = 2 | ||
| } | ||
| /** | ||
| * The flow used by the OAuth2 security scheme. Valid values are | ||
| * "implicit", "password", "application" or "accessCode". | ||
| * | ||
| * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow | ||
| */ | ||
| export declare enum SecurityScheme_Flow { | ||
| /** | ||
| * @generated from enum value: FLOW_INVALID = 0; | ||
| */ | ||
| INVALID = 0, | ||
| /** | ||
| * @generated from enum value: FLOW_IMPLICIT = 1; | ||
| */ | ||
| IMPLICIT = 1, | ||
| /** | ||
| * @generated from enum value: FLOW_PASSWORD = 2; | ||
| */ | ||
| PASSWORD = 2, | ||
| /** | ||
| * @generated from enum value: FLOW_APPLICATION = 3; | ||
| */ | ||
| APPLICATION = 3, | ||
| /** | ||
| * @generated from enum value: FLOW_ACCESS_CODE = 4; | ||
| */ | ||
| ACCESS_CODE = 4 | ||
| } | ||
| /** | ||
| * `SecurityRequirement` is a representation of OpenAPI v2 specification's | ||
| * Security Requirement object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject | ||
| * | ||
| * Lists the required security schemes to execute this operation. The object can | ||
| * have multiple security schemes declared in it which are all required (that | ||
| * is, there is a logical AND between the schemes). | ||
| * | ||
| * The name used for each property MUST correspond to a security scheme | ||
| * declared in the Security Definitions. | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement | ||
| */ | ||
| export declare class SecurityRequirement extends Message<SecurityRequirement> { | ||
| /** | ||
| * Each name must correspond to a security scheme which is declared in | ||
| * the Security Definitions. If the security scheme is of type "oauth2", | ||
| * then the value is a list of scope names required for the execution. | ||
| * For other security scheme types, the array MUST be empty. | ||
| * | ||
| * @generated from field: map<string, grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue> security_requirement = 1; | ||
| */ | ||
| securityRequirement: { | ||
| [key: string]: SecurityRequirement_SecurityRequirementValue; | ||
| }; | ||
| constructor(data?: PartialMessage<SecurityRequirement>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SecurityRequirement; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SecurityRequirement; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SecurityRequirement; | ||
| static equals(a: SecurityRequirement | PlainMessage<SecurityRequirement> | undefined, b: SecurityRequirement | PlainMessage<SecurityRequirement> | undefined): boolean; | ||
| } | ||
| /** | ||
| * If the security scheme is of type "oauth2", then the value is a list of | ||
| * scope names required for the execution. For other security scheme types, | ||
| * the array MUST be empty. | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue | ||
| */ | ||
| export declare class SecurityRequirement_SecurityRequirementValue extends Message<SecurityRequirement_SecurityRequirementValue> { | ||
| /** | ||
| * @generated from field: repeated string scope = 1; | ||
| */ | ||
| scope: string[]; | ||
| constructor(data?: PartialMessage<SecurityRequirement_SecurityRequirementValue>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SecurityRequirement_SecurityRequirementValue; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SecurityRequirement_SecurityRequirementValue; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SecurityRequirement_SecurityRequirementValue; | ||
| static equals(a: SecurityRequirement_SecurityRequirementValue | PlainMessage<SecurityRequirement_SecurityRequirementValue> | undefined, b: SecurityRequirement_SecurityRequirementValue | PlainMessage<SecurityRequirement_SecurityRequirementValue> | undefined): boolean; | ||
| } | ||
| /** | ||
| * `Scopes` is a representation of OpenAPI v2 specification's Scopes object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject | ||
| * | ||
| * Lists the available scopes for an OAuth2 security scheme. | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Scopes | ||
| */ | ||
| export declare class Scopes extends Message<Scopes> { | ||
| /** | ||
| * Maps between a name of a scope to a short description of it (as the value | ||
| * of the property). | ||
| * | ||
| * @generated from field: map<string, string> scope = 1; | ||
| */ | ||
| scope: { | ||
| [key: string]: string; | ||
| }; | ||
| constructor(data?: PartialMessage<Scopes>); | ||
| static readonly runtime: typeof proto3; | ||
| static readonly typeName = "grpc.gateway.protoc_gen_openapiv2.options.Scopes"; | ||
| static readonly fields: FieldList; | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Scopes; | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Scopes; | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Scopes; | ||
| static equals(a: Scopes | PlainMessage<Scopes> | undefined, b: Scopes | PlainMessage<Scopes> | undefined): boolean; | ||
| } |
Sorry, the diff of this file is too big to display
| // @generated by protoc-gen-es v1.8.0 with parameter "target=js" | ||
| // @generated from file aserto/authorizer/v2/api/decision_logs.proto (package aserto.authorizer.v2.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { proto3, Struct, Timestamp } from "@bufbuild/protobuf"; | ||
| import { IdentityContext } from "./identity_context_pb.js"; | ||
| import { PolicyContext } from "./policy_context_pb.js"; | ||
| import { PolicyInstance } from "./policy_instance_pb.js"; | ||
| /** | ||
| * represents a decision that an authorizer performed in the past | ||
| * | ||
| * @generated from message aserto.authorizer.v2.api.Decision | ||
| */ | ||
| export const Decision = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.api.Decision", | ||
| () => [ | ||
| { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "timestamp", kind: "message", T: Timestamp }, | ||
| { no: 3, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 4, name: "user", kind: "message", T: DecisionUser }, | ||
| { no: 5, name: "policy", kind: "message", T: DecisionPolicy }, | ||
| { no: 6, name: "outcomes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 8 /* ScalarType.BOOL */} }, | ||
| { no: 7, name: "resource", kind: "message", T: Struct }, | ||
| { no: 8, name: "annotations", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, | ||
| { no: 9, name: "tenant_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| ], | ||
| ); | ||
| /** | ||
| * information about a user on behalf of whom a decision was made | ||
| * | ||
| * @generated from message aserto.authorizer.v2.api.DecisionUser | ||
| */ | ||
| export const DecisionUser = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.api.DecisionUser", | ||
| () => [ | ||
| { no: 1, name: "context", kind: "message", T: IdentityContext }, | ||
| { no: 2, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ], | ||
| ); | ||
| /** | ||
| * information about a policy used in a decision | ||
| * | ||
| * @generated from message aserto.authorizer.v2.api.DecisionPolicy | ||
| */ | ||
| export const DecisionPolicy = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.api.DecisionPolicy", | ||
| () => [ | ||
| { no: 1, name: "context", kind: "message", T: PolicyContext }, | ||
| { no: 2, name: "registry_service", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "registry_image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 4, name: "registry_tag", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 5, name: "registry_digest", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 6, name: "policy_instance", kind: "message", T: PolicyInstance }, | ||
| ], | ||
| ); | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/api/decision_logs.proto (package aserto.authorizer.v2.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; | ||
| import { Message, proto3, Struct, Timestamp } from "@bufbuild/protobuf"; | ||
| import { IdentityContext } from "./identity_context_pb.js"; | ||
| import { PolicyContext } from "./policy_context_pb.js"; | ||
| import { PolicyInstance } from "./policy_instance_pb.js"; | ||
| /** | ||
| * represents a decision that an authorizer performed in the past | ||
| * | ||
| * @generated from message aserto.authorizer.v2.api.Decision | ||
| */ | ||
| export class Decision extends Message<Decision> { | ||
| /** | ||
| * unique id, replay a decision starting with this, also useful to de-dup | ||
| * | ||
| * @generated from field: string id = 1; | ||
| */ | ||
| id = ""; | ||
| /** | ||
| * UTC time when the decision was made | ||
| * | ||
| * @generated from field: google.protobuf.Timestamp timestamp = 2; | ||
| */ | ||
| timestamp?: Timestamp; | ||
| /** | ||
| * Policy path used in decision | ||
| * | ||
| * @generated from field: string path = 3; | ||
| */ | ||
| path = ""; | ||
| /** | ||
| * info about user for whom the decision as made | ||
| * | ||
| * @generated from field: aserto.authorizer.v2.api.DecisionUser user = 4; | ||
| */ | ||
| user?: DecisionUser; | ||
| /** | ||
| * info about policy used for the decision | ||
| * | ||
| * @generated from field: aserto.authorizer.v2.api.DecisionPolicy policy = 5; | ||
| */ | ||
| policy?: DecisionPolicy; | ||
| /** | ||
| * outcome of the decisions specified in the policy context | ||
| * | ||
| * @generated from field: map<string, bool> outcomes = 6; | ||
| */ | ||
| outcomes: { [key: string]: boolean } = {}; | ||
| /** | ||
| * the resource context used in a decision | ||
| * | ||
| * @generated from field: google.protobuf.Struct resource = 7; | ||
| */ | ||
| resource?: Struct; | ||
| /** | ||
| * annotations that may be added to a decision | ||
| * | ||
| * @generated from field: map<string, string> annotations = 8; | ||
| */ | ||
| annotations: { [key: string]: string } = {}; | ||
| /** | ||
| * id of the tenant that generated the decision | ||
| * | ||
| * @generated from field: optional string tenant_id = 9; | ||
| */ | ||
| tenantId?: string; | ||
| constructor(data?: PartialMessage<Decision>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.Decision"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "timestamp", kind: "message", T: Timestamp }, | ||
| { no: 3, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 4, name: "user", kind: "message", T: DecisionUser }, | ||
| { no: 5, name: "policy", kind: "message", T: DecisionPolicy }, | ||
| { no: 6, name: "outcomes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 8 /* ScalarType.BOOL */} }, | ||
| { no: 7, name: "resource", kind: "message", T: Struct }, | ||
| { no: 8, name: "annotations", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, | ||
| { no: 9, name: "tenant_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Decision { | ||
| return new Decision().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Decision { | ||
| return new Decision().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Decision { | ||
| return new Decision().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: Decision | PlainMessage<Decision> | undefined, b: Decision | PlainMessage<Decision> | undefined): boolean { | ||
| return proto3.util.equals(Decision, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * information about a user on behalf of whom a decision was made | ||
| * | ||
| * @generated from message aserto.authorizer.v2.api.DecisionUser | ||
| */ | ||
| export class DecisionUser extends Message<DecisionUser> { | ||
| /** | ||
| * identity context used in the decision | ||
| * | ||
| * @generated from field: aserto.authorizer.v2.api.IdentityContext context = 1; | ||
| */ | ||
| context?: IdentityContext; | ||
| /** | ||
| * id of the user the identity resolved to | ||
| * | ||
| * @generated from field: string id = 2; | ||
| */ | ||
| id = ""; | ||
| /** | ||
| * convinience human-readable identifier | ||
| * | ||
| * @generated from field: string email = 3; | ||
| */ | ||
| email = ""; | ||
| constructor(data?: PartialMessage<DecisionUser>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.DecisionUser"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "context", kind: "message", T: IdentityContext }, | ||
| { no: 2, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DecisionUser { | ||
| return new DecisionUser().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DecisionUser { | ||
| return new DecisionUser().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DecisionUser { | ||
| return new DecisionUser().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: DecisionUser | PlainMessage<DecisionUser> | undefined, b: DecisionUser | PlainMessage<DecisionUser> | undefined): boolean { | ||
| return proto3.util.equals(DecisionUser, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * information about a policy used in a decision | ||
| * | ||
| * @generated from message aserto.authorizer.v2.api.DecisionPolicy | ||
| */ | ||
| export class DecisionPolicy extends Message<DecisionPolicy> { | ||
| /** | ||
| * policy context used in the decision | ||
| * | ||
| * @generated from field: aserto.authorizer.v2.api.PolicyContext context = 1; | ||
| */ | ||
| context?: PolicyContext; | ||
| /** | ||
| * registry service where policy was retrieved from (e.g. opcr.io) | ||
| * | ||
| * @generated from field: string registry_service = 2; | ||
| */ | ||
| registryService = ""; | ||
| /** | ||
| * image of the policy in the registry, including org (e.g. acmecorp/peoplefinder-abac) | ||
| * | ||
| * @generated from field: string registry_image = 3; | ||
| */ | ||
| registryImage = ""; | ||
| /** | ||
| * tag of the policy image (e.g. 0.8.2 or latest) | ||
| * | ||
| * @generated from field: string registry_tag = 4; | ||
| */ | ||
| registryTag = ""; | ||
| /** | ||
| * digest of the policy image | ||
| * | ||
| * @generated from field: string registry_digest = 5; | ||
| */ | ||
| registryDigest = ""; | ||
| /** | ||
| * policy instance used in decision | ||
| * | ||
| * @generated from field: aserto.authorizer.v2.api.PolicyInstance policy_instance = 6; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<DecisionPolicy>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.DecisionPolicy"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "context", kind: "message", T: PolicyContext }, | ||
| { no: 2, name: "registry_service", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "registry_image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 4, name: "registry_tag", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 5, name: "registry_digest", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 6, name: "policy_instance", kind: "message", T: PolicyInstance }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DecisionPolicy { | ||
| return new DecisionPolicy().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DecisionPolicy { | ||
| return new DecisionPolicy().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DecisionPolicy { | ||
| return new DecisionPolicy().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: DecisionPolicy | PlainMessage<DecisionPolicy> | undefined, b: DecisionPolicy | PlainMessage<DecisionPolicy> | undefined): boolean { | ||
| return proto3.util.equals(DecisionPolicy, a, b); | ||
| } | ||
| } | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=js" | ||
| // @generated from file aserto/authorizer/v2/api/identity_context.proto (package aserto.authorizer.v2.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { proto3 } from "@bufbuild/protobuf"; | ||
| /** | ||
| * Identity types, describes the payload type of the identity field inside the IdentityContext message. | ||
| * | ||
| * @generated from enum aserto.authorizer.v2.api.IdentityType | ||
| */ | ||
| export const IdentityType = /*@__PURE__*/ proto3.makeEnum( | ||
| "aserto.authorizer.v2.api.IdentityType", | ||
| [ | ||
| {no: 0, name: "IDENTITY_TYPE_UNKNOWN", localName: "UNKNOWN"}, | ||
| {no: 1, name: "IDENTITY_TYPE_NONE", localName: "NONE"}, | ||
| {no: 2, name: "IDENTITY_TYPE_SUB", localName: "SUB"}, | ||
| {no: 3, name: "IDENTITY_TYPE_JWT", localName: "JWT"}, | ||
| {no: 4, name: "IDENTITY_TYPE_MANUAL", localName: "MANUAL"}, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.IdentityContext | ||
| */ | ||
| export const IdentityContext = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.api.IdentityContext", | ||
| () => [ | ||
| { no: 1, name: "identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "type", kind: "enum", T: proto3.getEnumType(IdentityType) }, | ||
| ], | ||
| ); | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/api/identity_context.proto (package aserto.authorizer.v2.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; | ||
| import { Message, proto3 } from "@bufbuild/protobuf"; | ||
| /** | ||
| * Identity types, describes the payload type of the identity field inside the IdentityContext message. | ||
| * | ||
| * @generated from enum aserto.authorizer.v2.api.IdentityType | ||
| */ | ||
| export enum IdentityType { | ||
| /** | ||
| * Unknown, value not set, requests will fail with identity type not set error. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_UNKNOWN = 0; | ||
| */ | ||
| UNKNOWN = 0, | ||
| /** | ||
| * None, no explicit identity context set, equals anonymous. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_NONE = 1; | ||
| */ | ||
| NONE = 1, | ||
| /** | ||
| * Sub(ject), identity field contains an oAUTH subject. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_SUB = 2; | ||
| */ | ||
| SUB = 2, | ||
| /** | ||
| * JWT, identity field contains a JWT access token. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_JWT = 3; | ||
| */ | ||
| JWT = 3, | ||
| /** | ||
| * Manual, propagates thw identity field as-is, without validation, into the input object. | ||
| * | ||
| * @generated from enum value: IDENTITY_TYPE_MANUAL = 4; | ||
| */ | ||
| MANUAL = 4, | ||
| } | ||
| // Retrieve enum metadata with: proto3.getEnumType(IdentityType) | ||
| proto3.util.setEnumType(IdentityType, "aserto.authorizer.v2.api.IdentityType", [ | ||
| { no: 0, name: "IDENTITY_TYPE_UNKNOWN" }, | ||
| { no: 1, name: "IDENTITY_TYPE_NONE" }, | ||
| { no: 2, name: "IDENTITY_TYPE_SUB" }, | ||
| { no: 3, name: "IDENTITY_TYPE_JWT" }, | ||
| { no: 4, name: "IDENTITY_TYPE_MANUAL" }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.IdentityContext | ||
| */ | ||
| export class IdentityContext extends Message<IdentityContext> { | ||
| /** | ||
| * @generated from field: string identity = 1; | ||
| */ | ||
| identity = ""; | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.api.IdentityType type = 2; | ||
| */ | ||
| type = IdentityType.UNKNOWN; | ||
| constructor(data?: PartialMessage<IdentityContext>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.IdentityContext"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "type", kind: "enum", T: proto3.getEnumType(IdentityType) }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): IdentityContext { | ||
| return new IdentityContext().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): IdentityContext { | ||
| return new IdentityContext().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): IdentityContext { | ||
| return new IdentityContext().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: IdentityContext | PlainMessage<IdentityContext> | undefined, b: IdentityContext | PlainMessage<IdentityContext> | undefined): boolean { | ||
| return proto3.util.equals(IdentityContext, a, b); | ||
| } | ||
| } | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=js" | ||
| // @generated from file aserto/authorizer/v2/api/module.proto (package aserto.authorizer.v2.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { proto3, Value } from "@bufbuild/protobuf"; | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.Module | ||
| */ | ||
| export const Module = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.api.Module", | ||
| () => [ | ||
| { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| { no: 2, name: "raw", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| { no: 3, name: "package_path", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| { no: 4, name: "ast", kind: "message", T: Value, opt: true }, | ||
| { no: 5, name: "package_root", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| ], | ||
| ); | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/api/module.proto (package aserto.authorizer.v2.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; | ||
| import { Message, proto3, Value } from "@bufbuild/protobuf"; | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.Module | ||
| */ | ||
| export class Module extends Message<Module> { | ||
| /** | ||
| * @generated from field: optional string id = 1; | ||
| */ | ||
| id?: string; | ||
| /** | ||
| * @generated from field: optional string raw = 2; | ||
| */ | ||
| raw?: string; | ||
| /** | ||
| * @generated from field: optional string package_path = 3; | ||
| */ | ||
| packagePath?: string; | ||
| /** | ||
| * @generated from field: optional google.protobuf.Value ast = 4; | ||
| */ | ||
| ast?: Value; | ||
| /** | ||
| * @generated from field: optional string package_root = 5; | ||
| */ | ||
| packageRoot?: string; | ||
| constructor(data?: PartialMessage<Module>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.Module"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| { no: 2, name: "raw", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| { no: 3, name: "package_path", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| { no: 4, name: "ast", kind: "message", T: Value, opt: true }, | ||
| { no: 5, name: "package_root", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Module { | ||
| return new Module().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Module { | ||
| return new Module().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Module { | ||
| return new Module().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: Module | PlainMessage<Module> | undefined, b: Module | PlainMessage<Module> | undefined): boolean { | ||
| return proto3.util.equals(Module, a, b); | ||
| } | ||
| } | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=js" | ||
| // @generated from file aserto/authorizer/v2/api/policy_context.proto (package aserto.authorizer.v2.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { proto3 } from "@bufbuild/protobuf"; | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.PolicyContext | ||
| */ | ||
| export const PolicyContext = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.api.PolicyContext", | ||
| () => [ | ||
| { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "decisions", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| ], | ||
| ); | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/api/policy_context.proto (package aserto.authorizer.v2.api, 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 aserto.authorizer.v2.api.PolicyContext | ||
| */ | ||
| export class PolicyContext extends Message<PolicyContext> { | ||
| /** | ||
| * policy path aka package name | ||
| * | ||
| * @generated from field: string path = 1; | ||
| */ | ||
| path = ""; | ||
| /** | ||
| * list (1..N) of policy decisions (aka rules) | ||
| * | ||
| * @generated from field: repeated string decisions = 2; | ||
| */ | ||
| decisions: string[] = []; | ||
| constructor(data?: PartialMessage<PolicyContext>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.PolicyContext"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "decisions", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PolicyContext { | ||
| return new PolicyContext().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PolicyContext { | ||
| return new PolicyContext().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PolicyContext { | ||
| return new PolicyContext().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: PolicyContext | PlainMessage<PolicyContext> | undefined, b: PolicyContext | PlainMessage<PolicyContext> | undefined): boolean { | ||
| return proto3.util.equals(PolicyContext, a, b); | ||
| } | ||
| } | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=js" | ||
| // @generated from file aserto/authorizer/v2/api/policy_instance.proto (package aserto.authorizer.v2.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { proto3 } from "@bufbuild/protobuf"; | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.api.PolicyInstance | ||
| */ | ||
| export const PolicyInstance = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.api.PolicyInstance", | ||
| () => [ | ||
| { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "instance_label", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ], | ||
| ); | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/api/policy_instance.proto (package aserto.authorizer.v2.api, 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 aserto.authorizer.v2.api.PolicyInstance | ||
| */ | ||
| export class PolicyInstance extends Message<PolicyInstance> { | ||
| /** | ||
| * policy name | ||
| * | ||
| * @generated from field: string name = 1; | ||
| */ | ||
| name = ""; | ||
| /** | ||
| * label identifying the instance of the policy | ||
| * | ||
| * @generated from field: string instance_label = 2; | ||
| */ | ||
| instanceLabel = ""; | ||
| constructor(data?: PartialMessage<PolicyInstance>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.api.PolicyInstance"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "instance_label", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PolicyInstance { | ||
| return new PolicyInstance().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PolicyInstance { | ||
| return new PolicyInstance().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PolicyInstance { | ||
| return new PolicyInstance().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: PolicyInstance | PlainMessage<PolicyInstance> | undefined, b: PolicyInstance | PlainMessage<PolicyInstance> | undefined): boolean { | ||
| return proto3.util.equals(PolicyInstance, a, b); | ||
| } | ||
| } | ||
| // @generated by protoc-gen-connect-es v1.4.0 with parameter "target=js" | ||
| // @generated from file aserto/authorizer/v2/authorizer.proto (package aserto.authorizer.v2, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { CompileRequest, CompileResponse, DecisionTreeRequest, DecisionTreeResponse, GetPolicyRequest, GetPolicyResponse, InfoRequest, InfoResponse, IsRequest, IsResponse, ListPoliciesRequest, ListPoliciesResponse, QueryRequest, QueryResponse } from "./authorizer_pb.js"; | ||
| import { MethodKind } from "@bufbuild/protobuf"; | ||
| /** | ||
| * @generated from service aserto.authorizer.v2.Authorizer | ||
| */ | ||
| export const Authorizer = { | ||
| typeName: "aserto.authorizer.v2.Authorizer", | ||
| methods: { | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.DecisionTree | ||
| */ | ||
| decisionTree: { | ||
| name: "DecisionTree", | ||
| I: DecisionTreeRequest, | ||
| O: DecisionTreeResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Is | ||
| */ | ||
| is: { | ||
| name: "Is", | ||
| I: IsRequest, | ||
| O: IsResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Query | ||
| */ | ||
| query: { | ||
| name: "Query", | ||
| I: QueryRequest, | ||
| O: QueryResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Compile | ||
| */ | ||
| compile: { | ||
| name: "Compile", | ||
| I: CompileRequest, | ||
| O: CompileResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.ListPolicies | ||
| */ | ||
| listPolicies: { | ||
| name: "ListPolicies", | ||
| I: ListPoliciesRequest, | ||
| O: ListPoliciesResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.GetPolicy | ||
| */ | ||
| getPolicy: { | ||
| name: "GetPolicy", | ||
| I: GetPolicyRequest, | ||
| O: GetPolicyResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Info | ||
| */ | ||
| info: { | ||
| name: "Info", | ||
| I: InfoRequest, | ||
| O: InfoResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| } | ||
| }; | ||
| // @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/authorizer.proto (package aserto.authorizer.v2, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { CompileRequest, CompileResponse, DecisionTreeRequest, DecisionTreeResponse, GetPolicyRequest, GetPolicyResponse, InfoRequest, InfoResponse, IsRequest, IsResponse, ListPoliciesRequest, ListPoliciesResponse, QueryRequest, QueryResponse } from "./authorizer_pb.js"; | ||
| import { MethodKind } from "@bufbuild/protobuf"; | ||
| /** | ||
| * @generated from service aserto.authorizer.v2.Authorizer | ||
| */ | ||
| export const Authorizer = { | ||
| typeName: "aserto.authorizer.v2.Authorizer", | ||
| methods: { | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.DecisionTree | ||
| */ | ||
| decisionTree: { | ||
| name: "DecisionTree", | ||
| I: DecisionTreeRequest, | ||
| O: DecisionTreeResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Is | ||
| */ | ||
| is: { | ||
| name: "Is", | ||
| I: IsRequest, | ||
| O: IsResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Query | ||
| */ | ||
| query: { | ||
| name: "Query", | ||
| I: QueryRequest, | ||
| O: QueryResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Compile | ||
| */ | ||
| compile: { | ||
| name: "Compile", | ||
| I: CompileRequest, | ||
| O: CompileResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.ListPolicies | ||
| */ | ||
| listPolicies: { | ||
| name: "ListPolicies", | ||
| I: ListPoliciesRequest, | ||
| O: ListPoliciesResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.GetPolicy | ||
| */ | ||
| getPolicy: { | ||
| name: "GetPolicy", | ||
| I: GetPolicyRequest, | ||
| O: GetPolicyResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| /** | ||
| * @generated from rpc aserto.authorizer.v2.Authorizer.Info | ||
| */ | ||
| info: { | ||
| name: "Info", | ||
| I: InfoRequest, | ||
| O: InfoResponse, | ||
| kind: MethodKind.Unary, | ||
| }, | ||
| } | ||
| } as const; | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=js" | ||
| // @generated from file aserto/authorizer/v2/authorizer.proto (package aserto.authorizer.v2, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { FieldMask, proto3, Struct } from "@bufbuild/protobuf"; | ||
| import { PolicyInstance } from "./api/policy_instance_pb.js"; | ||
| import { Module } from "./api/module_pb.js"; | ||
| import { PolicyContext } from "./api/policy_context_pb.js"; | ||
| import { IdentityContext } from "./api/identity_context_pb.js"; | ||
| /** | ||
| * @generated from enum aserto.authorizer.v2.PathSeparator | ||
| */ | ||
| export const PathSeparator = /*@__PURE__*/ proto3.makeEnum( | ||
| "aserto.authorizer.v2.PathSeparator", | ||
| [ | ||
| {no: 0, name: "PATH_SEPARATOR_UNKNOWN", localName: "UNKNOWN"}, | ||
| {no: 1, name: "PATH_SEPARATOR_DOT", localName: "DOT"}, | ||
| {no: 2, name: "PATH_SEPARATOR_SLASH", localName: "SLASH"}, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from enum aserto.authorizer.v2.TraceLevel | ||
| */ | ||
| export const TraceLevel = /*@__PURE__*/ proto3.makeEnum( | ||
| "aserto.authorizer.v2.TraceLevel", | ||
| [ | ||
| {no: 0, name: "TRACE_LEVEL_UNKNOWN", localName: "UNKNOWN"}, | ||
| {no: 1, name: "TRACE_LEVEL_OFF", localName: "OFF"}, | ||
| {no: 2, name: "TRACE_LEVEL_FULL", localName: "FULL"}, | ||
| {no: 3, name: "TRACE_LEVEL_NOTES", localName: "NOTES"}, | ||
| {no: 4, name: "TRACE_LEVEL_FAILS", localName: "FAILS"}, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.InfoRequest | ||
| */ | ||
| export const InfoRequest = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.InfoRequest", | ||
| [], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.InfoResponse | ||
| */ | ||
| export const InfoResponse = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.InfoResponse", | ||
| () => [ | ||
| { no: 1, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "commit", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "date", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 4, name: "os", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 5, name: "arch", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.GetPolicyRequest | ||
| */ | ||
| export const GetPolicyRequest = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.GetPolicyRequest", | ||
| () => [ | ||
| { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "field_mask", kind: "message", T: FieldMask }, | ||
| { no: 3, name: "policy_instance", kind: "message", T: PolicyInstance, opt: true }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.GetPolicyResponse | ||
| */ | ||
| export const GetPolicyResponse = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.GetPolicyResponse", | ||
| () => [ | ||
| { no: 1, name: "result", kind: "message", T: Module }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.ListPoliciesRequest | ||
| */ | ||
| export const ListPoliciesRequest = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.ListPoliciesRequest", | ||
| () => [ | ||
| { no: 1, name: "field_mask", kind: "message", T: FieldMask }, | ||
| { no: 2, name: "policy_instance", kind: "message", T: PolicyInstance, opt: true }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.ListPoliciesResponse | ||
| */ | ||
| export const ListPoliciesResponse = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.ListPoliciesResponse", | ||
| () => [ | ||
| { no: 1, name: "result", kind: "message", T: Module, repeated: true }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.DecisionTreeRequest | ||
| */ | ||
| export const DecisionTreeRequest = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.DecisionTreeRequest", | ||
| () => [ | ||
| { no: 1, name: "policy_context", kind: "message", T: PolicyContext }, | ||
| { no: 2, name: "identity_context", kind: "message", T: IdentityContext }, | ||
| { no: 3, name: "options", kind: "message", T: DecisionTreeOptions }, | ||
| { no: 4, name: "resource_context", kind: "message", T: Struct }, | ||
| { no: 5, name: "policy_instance", kind: "message", T: PolicyInstance, opt: true }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.DecisionTreeOptions | ||
| */ | ||
| export const DecisionTreeOptions = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.DecisionTreeOptions", | ||
| () => [ | ||
| { no: 1, name: "path_separator", kind: "enum", T: proto3.getEnumType(PathSeparator) }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.DecisionTreeResponse | ||
| */ | ||
| export const DecisionTreeResponse = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.DecisionTreeResponse", | ||
| () => [ | ||
| { no: 1, name: "path_root", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "path", kind: "message", T: Struct }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.IsRequest | ||
| */ | ||
| export const IsRequest = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.IsRequest", | ||
| () => [ | ||
| { no: 1, name: "policy_context", kind: "message", T: PolicyContext }, | ||
| { no: 2, name: "identity_context", kind: "message", T: IdentityContext }, | ||
| { no: 3, name: "resource_context", kind: "message", T: Struct }, | ||
| { no: 4, name: "policy_instance", kind: "message", T: PolicyInstance, opt: true }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.Decision | ||
| */ | ||
| export const Decision = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.Decision", | ||
| () => [ | ||
| { no: 1, name: "decision", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "is", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.IsResponse | ||
| */ | ||
| export const IsResponse = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.IsResponse", | ||
| () => [ | ||
| { no: 1, name: "decisions", kind: "message", T: Decision, repeated: true }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.QueryOptions | ||
| */ | ||
| export const QueryOptions = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.QueryOptions", | ||
| () => [ | ||
| { no: 1, name: "metrics", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| { no: 2, name: "instrument", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| { no: 3, name: "trace", kind: "enum", T: proto3.getEnumType(TraceLevel) }, | ||
| { no: 4, name: "trace_summary", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.QueryRequest | ||
| */ | ||
| export const QueryRequest = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.QueryRequest", | ||
| () => [ | ||
| { no: 1, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "input", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "options", kind: "message", T: QueryOptions, opt: true }, | ||
| { no: 4, name: "policy_context", kind: "message", T: PolicyContext, opt: true }, | ||
| { no: 5, name: "identity_context", kind: "message", T: IdentityContext, opt: true }, | ||
| { no: 6, name: "resource_context", kind: "message", T: Struct, opt: true }, | ||
| { no: 7, name: "policy_instance", kind: "message", T: PolicyInstance, opt: true }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.CompileRequest | ||
| */ | ||
| export const CompileRequest = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.CompileRequest", | ||
| () => [ | ||
| { no: 1, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "input", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "unknowns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 4, name: "disable_inlining", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 5, name: "options", kind: "message", T: QueryOptions, opt: true }, | ||
| { no: 6, name: "policy_context", kind: "message", T: PolicyContext, opt: true }, | ||
| { no: 7, name: "identity_context", kind: "message", T: IdentityContext, opt: true }, | ||
| { no: 8, name: "resource_context", kind: "message", T: Struct, opt: true }, | ||
| { no: 9, name: "policy_instance", kind: "message", T: PolicyInstance, opt: true }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.CompileResponse | ||
| */ | ||
| export const CompileResponse = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.CompileResponse", | ||
| () => [ | ||
| { no: 1, name: "result", kind: "message", T: Struct }, | ||
| { no: 2, name: "metrics", kind: "message", T: Struct }, | ||
| { no: 3, name: "trace", kind: "message", T: Struct, repeated: true }, | ||
| { no: 4, name: "trace_summary", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.QueryResponse | ||
| */ | ||
| export const QueryResponse = /*@__PURE__*/ proto3.makeMessageType( | ||
| "aserto.authorizer.v2.QueryResponse", | ||
| () => [ | ||
| { no: 1, name: "response", kind: "message", T: Struct }, | ||
| { no: 2, name: "metrics", kind: "message", T: Struct }, | ||
| { no: 3, name: "trace", kind: "message", T: Struct, repeated: true }, | ||
| { no: 4, name: "trace_summary", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| ], | ||
| ); | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file aserto/authorizer/v2/authorizer.proto (package aserto.authorizer.v2, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; | ||
| import { FieldMask, Message, proto3, Struct } from "@bufbuild/protobuf"; | ||
| import { PolicyInstance } from "./api/policy_instance_pb.js"; | ||
| import { Module } from "./api/module_pb.js"; | ||
| import { PolicyContext } from "./api/policy_context_pb.js"; | ||
| import { IdentityContext } from "./api/identity_context_pb.js"; | ||
| /** | ||
| * @generated from enum aserto.authorizer.v2.PathSeparator | ||
| */ | ||
| export enum PathSeparator { | ||
| /** | ||
| * Value not set. | ||
| * | ||
| * @generated from enum value: PATH_SEPARATOR_UNKNOWN = 0; | ||
| */ | ||
| UNKNOWN = 0, | ||
| /** | ||
| * Dot "." path separator | ||
| * | ||
| * @generated from enum value: PATH_SEPARATOR_DOT = 1; | ||
| */ | ||
| DOT = 1, | ||
| /** | ||
| * Slash "/" path separtor | ||
| * | ||
| * @generated from enum value: PATH_SEPARATOR_SLASH = 2; | ||
| */ | ||
| SLASH = 2, | ||
| } | ||
| // Retrieve enum metadata with: proto3.getEnumType(PathSeparator) | ||
| proto3.util.setEnumType(PathSeparator, "aserto.authorizer.v2.PathSeparator", [ | ||
| { no: 0, name: "PATH_SEPARATOR_UNKNOWN" }, | ||
| { no: 1, name: "PATH_SEPARATOR_DOT" }, | ||
| { no: 2, name: "PATH_SEPARATOR_SLASH" }, | ||
| ]); | ||
| /** | ||
| * @generated from enum aserto.authorizer.v2.TraceLevel | ||
| */ | ||
| export enum TraceLevel { | ||
| /** | ||
| * Value not set. | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_UNKNOWN = 0; | ||
| */ | ||
| UNKNOWN = 0, | ||
| /** | ||
| * ExplainOffV1 ExplainModeV1 = "off" | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_OFF = 1; | ||
| */ | ||
| OFF = 1, | ||
| /** | ||
| * ExplainFullV1 ExplainModeV1 = "full" | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_FULL = 2; | ||
| */ | ||
| FULL = 2, | ||
| /** | ||
| * ExplainNotesV1 ExplainModeV1 = "notes" | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_NOTES = 3; | ||
| */ | ||
| NOTES = 3, | ||
| /** | ||
| * ExplainFailsV1 ExplainModeV1 = "fails" | ||
| * | ||
| * @generated from enum value: TRACE_LEVEL_FAILS = 4; | ||
| */ | ||
| FAILS = 4, | ||
| } | ||
| // Retrieve enum metadata with: proto3.getEnumType(TraceLevel) | ||
| proto3.util.setEnumType(TraceLevel, "aserto.authorizer.v2.TraceLevel", [ | ||
| { no: 0, name: "TRACE_LEVEL_UNKNOWN" }, | ||
| { no: 1, name: "TRACE_LEVEL_OFF" }, | ||
| { no: 2, name: "TRACE_LEVEL_FULL" }, | ||
| { no: 3, name: "TRACE_LEVEL_NOTES" }, | ||
| { no: 4, name: "TRACE_LEVEL_FAILS" }, | ||
| ]); | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.InfoRequest | ||
| */ | ||
| export class InfoRequest extends Message<InfoRequest> { | ||
| constructor(data?: PartialMessage<InfoRequest>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.InfoRequest"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): InfoRequest { | ||
| return new InfoRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): InfoRequest { | ||
| return new InfoRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): InfoRequest { | ||
| return new InfoRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: InfoRequest | PlainMessage<InfoRequest> | undefined, b: InfoRequest | PlainMessage<InfoRequest> | undefined): boolean { | ||
| return proto3.util.equals(InfoRequest, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.InfoResponse | ||
| */ | ||
| export class InfoResponse extends Message<InfoResponse> { | ||
| /** | ||
| * @generated from field: string version = 1; | ||
| */ | ||
| version = ""; | ||
| /** | ||
| * @generated from field: string commit = 2; | ||
| */ | ||
| commit = ""; | ||
| /** | ||
| * @generated from field: string date = 3; | ||
| */ | ||
| date = ""; | ||
| /** | ||
| * @generated from field: string os = 4; | ||
| */ | ||
| os = ""; | ||
| /** | ||
| * @generated from field: string arch = 5; | ||
| */ | ||
| arch = ""; | ||
| constructor(data?: PartialMessage<InfoResponse>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.InfoResponse"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "commit", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "date", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 4, name: "os", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 5, name: "arch", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): InfoResponse { | ||
| return new InfoResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): InfoResponse { | ||
| return new InfoResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): InfoResponse { | ||
| return new InfoResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: InfoResponse | PlainMessage<InfoResponse> | undefined, b: InfoResponse | PlainMessage<InfoResponse> | undefined): boolean { | ||
| return proto3.util.equals(InfoResponse, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.GetPolicyRequest | ||
| */ | ||
| export class GetPolicyRequest extends Message<GetPolicyRequest> { | ||
| /** | ||
| * @generated from field: string id = 1; | ||
| */ | ||
| id = ""; | ||
| /** | ||
| * @generated from field: google.protobuf.FieldMask field_mask = 2; | ||
| */ | ||
| fieldMask?: FieldMask; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyInstance policy_instance = 3; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<GetPolicyRequest>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.GetPolicyRequest"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "field_mask", kind: "message", T: FieldMask }, | ||
| { no: 3, name: "policy_instance", kind: "message", T: PolicyInstance, opt: true }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetPolicyRequest { | ||
| return new GetPolicyRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetPolicyRequest { | ||
| return new GetPolicyRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetPolicyRequest { | ||
| return new GetPolicyRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: GetPolicyRequest | PlainMessage<GetPolicyRequest> | undefined, b: GetPolicyRequest | PlainMessage<GetPolicyRequest> | undefined): boolean { | ||
| return proto3.util.equals(GetPolicyRequest, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.GetPolicyResponse | ||
| */ | ||
| export class GetPolicyResponse extends Message<GetPolicyResponse> { | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.api.Module result = 1; | ||
| */ | ||
| result?: Module; | ||
| constructor(data?: PartialMessage<GetPolicyResponse>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.GetPolicyResponse"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "result", kind: "message", T: Module }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetPolicyResponse { | ||
| return new GetPolicyResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetPolicyResponse { | ||
| return new GetPolicyResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetPolicyResponse { | ||
| return new GetPolicyResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: GetPolicyResponse | PlainMessage<GetPolicyResponse> | undefined, b: GetPolicyResponse | PlainMessage<GetPolicyResponse> | undefined): boolean { | ||
| return proto3.util.equals(GetPolicyResponse, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.ListPoliciesRequest | ||
| */ | ||
| export class ListPoliciesRequest extends Message<ListPoliciesRequest> { | ||
| /** | ||
| * @generated from field: google.protobuf.FieldMask field_mask = 1; | ||
| */ | ||
| fieldMask?: FieldMask; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyInstance policy_instance = 2; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<ListPoliciesRequest>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.ListPoliciesRequest"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "field_mask", kind: "message", T: FieldMask }, | ||
| { no: 2, name: "policy_instance", kind: "message", T: PolicyInstance, opt: true }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListPoliciesRequest { | ||
| return new ListPoliciesRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListPoliciesRequest { | ||
| return new ListPoliciesRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListPoliciesRequest { | ||
| return new ListPoliciesRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: ListPoliciesRequest | PlainMessage<ListPoliciesRequest> | undefined, b: ListPoliciesRequest | PlainMessage<ListPoliciesRequest> | undefined): boolean { | ||
| return proto3.util.equals(ListPoliciesRequest, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.ListPoliciesResponse | ||
| */ | ||
| export class ListPoliciesResponse extends Message<ListPoliciesResponse> { | ||
| /** | ||
| * @generated from field: repeated aserto.authorizer.v2.api.Module result = 1; | ||
| */ | ||
| result: Module[] = []; | ||
| constructor(data?: PartialMessage<ListPoliciesResponse>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.ListPoliciesResponse"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "result", kind: "message", T: Module, repeated: true }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListPoliciesResponse { | ||
| return new ListPoliciesResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListPoliciesResponse { | ||
| return new ListPoliciesResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListPoliciesResponse { | ||
| return new ListPoliciesResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: ListPoliciesResponse | PlainMessage<ListPoliciesResponse> | undefined, b: ListPoliciesResponse | PlainMessage<ListPoliciesResponse> | undefined): boolean { | ||
| return proto3.util.equals(ListPoliciesResponse, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.DecisionTreeRequest | ||
| */ | ||
| export class DecisionTreeRequest extends Message<DecisionTreeRequest> { | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.api.PolicyContext policy_context = 1; | ||
| */ | ||
| policyContext?: PolicyContext; | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.api.IdentityContext identity_context = 2; | ||
| */ | ||
| identityContext?: IdentityContext; | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.DecisionTreeOptions options = 3; | ||
| */ | ||
| options?: DecisionTreeOptions; | ||
| /** | ||
| * @generated from field: google.protobuf.Struct resource_context = 4; | ||
| */ | ||
| resourceContext?: Struct; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyInstance policy_instance = 5; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<DecisionTreeRequest>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.DecisionTreeRequest"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "policy_context", kind: "message", T: PolicyContext }, | ||
| { no: 2, name: "identity_context", kind: "message", T: IdentityContext }, | ||
| { no: 3, name: "options", kind: "message", T: DecisionTreeOptions }, | ||
| { no: 4, name: "resource_context", kind: "message", T: Struct }, | ||
| { no: 5, name: "policy_instance", kind: "message", T: PolicyInstance, opt: true }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DecisionTreeRequest { | ||
| return new DecisionTreeRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DecisionTreeRequest { | ||
| return new DecisionTreeRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DecisionTreeRequest { | ||
| return new DecisionTreeRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: DecisionTreeRequest | PlainMessage<DecisionTreeRequest> | undefined, b: DecisionTreeRequest | PlainMessage<DecisionTreeRequest> | undefined): boolean { | ||
| return proto3.util.equals(DecisionTreeRequest, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.DecisionTreeOptions | ||
| */ | ||
| export class DecisionTreeOptions extends Message<DecisionTreeOptions> { | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.PathSeparator path_separator = 1; | ||
| */ | ||
| pathSeparator = PathSeparator.UNKNOWN; | ||
| constructor(data?: PartialMessage<DecisionTreeOptions>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.DecisionTreeOptions"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "path_separator", kind: "enum", T: proto3.getEnumType(PathSeparator) }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DecisionTreeOptions { | ||
| return new DecisionTreeOptions().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DecisionTreeOptions { | ||
| return new DecisionTreeOptions().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DecisionTreeOptions { | ||
| return new DecisionTreeOptions().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: DecisionTreeOptions | PlainMessage<DecisionTreeOptions> | undefined, b: DecisionTreeOptions | PlainMessage<DecisionTreeOptions> | undefined): boolean { | ||
| return proto3.util.equals(DecisionTreeOptions, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.DecisionTreeResponse | ||
| */ | ||
| export class DecisionTreeResponse extends Message<DecisionTreeResponse> { | ||
| /** | ||
| * @generated from field: string path_root = 1; | ||
| */ | ||
| pathRoot = ""; | ||
| /** | ||
| * @generated from field: google.protobuf.Struct path = 3; | ||
| */ | ||
| path?: Struct; | ||
| constructor(data?: PartialMessage<DecisionTreeResponse>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.DecisionTreeResponse"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "path_root", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "path", kind: "message", T: Struct }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DecisionTreeResponse { | ||
| return new DecisionTreeResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DecisionTreeResponse { | ||
| return new DecisionTreeResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DecisionTreeResponse { | ||
| return new DecisionTreeResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: DecisionTreeResponse | PlainMessage<DecisionTreeResponse> | undefined, b: DecisionTreeResponse | PlainMessage<DecisionTreeResponse> | undefined): boolean { | ||
| return proto3.util.equals(DecisionTreeResponse, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.IsRequest | ||
| */ | ||
| export class IsRequest extends Message<IsRequest> { | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.api.PolicyContext policy_context = 1; | ||
| */ | ||
| policyContext?: PolicyContext; | ||
| /** | ||
| * @generated from field: aserto.authorizer.v2.api.IdentityContext identity_context = 2; | ||
| */ | ||
| identityContext?: IdentityContext; | ||
| /** | ||
| * @generated from field: google.protobuf.Struct resource_context = 3; | ||
| */ | ||
| resourceContext?: Struct; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyInstance policy_instance = 4; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<IsRequest>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.IsRequest"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "policy_context", kind: "message", T: PolicyContext }, | ||
| { no: 2, name: "identity_context", kind: "message", T: IdentityContext }, | ||
| { no: 3, name: "resource_context", kind: "message", T: Struct }, | ||
| { no: 4, name: "policy_instance", kind: "message", T: PolicyInstance, opt: true }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): IsRequest { | ||
| return new IsRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): IsRequest { | ||
| return new IsRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): IsRequest { | ||
| return new IsRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: IsRequest | PlainMessage<IsRequest> | undefined, b: IsRequest | PlainMessage<IsRequest> | undefined): boolean { | ||
| return proto3.util.equals(IsRequest, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.Decision | ||
| */ | ||
| export class Decision extends Message<Decision> { | ||
| /** | ||
| * @generated from field: string decision = 1; | ||
| */ | ||
| decision = ""; | ||
| /** | ||
| * @generated from field: bool is = 2; | ||
| */ | ||
| is = false; | ||
| constructor(data?: PartialMessage<Decision>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.Decision"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "decision", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "is", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Decision { | ||
| return new Decision().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Decision { | ||
| return new Decision().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Decision { | ||
| return new Decision().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: Decision | PlainMessage<Decision> | undefined, b: Decision | PlainMessage<Decision> | undefined): boolean { | ||
| return proto3.util.equals(Decision, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.IsResponse | ||
| */ | ||
| export class IsResponse extends Message<IsResponse> { | ||
| /** | ||
| * @generated from field: repeated aserto.authorizer.v2.Decision decisions = 1; | ||
| */ | ||
| decisions: Decision[] = []; | ||
| constructor(data?: PartialMessage<IsResponse>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.IsResponse"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "decisions", kind: "message", T: Decision, repeated: true }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): IsResponse { | ||
| return new IsResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): IsResponse { | ||
| return new IsResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): IsResponse { | ||
| return new IsResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: IsResponse | PlainMessage<IsResponse> | undefined, b: IsResponse | PlainMessage<IsResponse> | undefined): boolean { | ||
| return proto3.util.equals(IsResponse, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.QueryOptions | ||
| */ | ||
| export class QueryOptions extends Message<QueryOptions> { | ||
| /** | ||
| * default false | ||
| * | ||
| * @generated from field: bool metrics = 1; | ||
| */ | ||
| metrics = false; | ||
| /** | ||
| * default false | ||
| * | ||
| * @generated from field: bool instrument = 2; | ||
| */ | ||
| instrument = false; | ||
| /** | ||
| * default ExplainOffV1 | ||
| * | ||
| * @generated from field: aserto.authorizer.v2.TraceLevel trace = 3; | ||
| */ | ||
| trace = TraceLevel.UNKNOWN; | ||
| /** | ||
| * default false | ||
| * | ||
| * @generated from field: bool trace_summary = 4; | ||
| */ | ||
| traceSummary = false; | ||
| constructor(data?: PartialMessage<QueryOptions>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.QueryOptions"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "metrics", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| { no: 2, name: "instrument", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| { no: 3, name: "trace", kind: "enum", T: proto3.getEnumType(TraceLevel) }, | ||
| { no: 4, name: "trace_summary", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryOptions { | ||
| return new QueryOptions().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryOptions { | ||
| return new QueryOptions().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryOptions { | ||
| return new QueryOptions().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: QueryOptions | PlainMessage<QueryOptions> | undefined, b: QueryOptions | PlainMessage<QueryOptions> | undefined): boolean { | ||
| return proto3.util.equals(QueryOptions, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.QueryRequest | ||
| */ | ||
| export class QueryRequest extends Message<QueryRequest> { | ||
| /** | ||
| * @generated from field: string query = 1; | ||
| */ | ||
| query = ""; | ||
| /** | ||
| * @generated from field: string input = 2; | ||
| */ | ||
| input = ""; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.QueryOptions options = 3; | ||
| */ | ||
| options?: QueryOptions; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyContext policy_context = 4; | ||
| */ | ||
| policyContext?: PolicyContext; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.IdentityContext identity_context = 5; | ||
| */ | ||
| identityContext?: IdentityContext; | ||
| /** | ||
| * @generated from field: optional google.protobuf.Struct resource_context = 6; | ||
| */ | ||
| resourceContext?: Struct; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyInstance policy_instance = 7; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<QueryRequest>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.QueryRequest"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "input", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "options", kind: "message", T: QueryOptions, opt: true }, | ||
| { no: 4, name: "policy_context", kind: "message", T: PolicyContext, opt: true }, | ||
| { no: 5, name: "identity_context", kind: "message", T: IdentityContext, opt: true }, | ||
| { no: 6, name: "resource_context", kind: "message", T: Struct, opt: true }, | ||
| { no: 7, name: "policy_instance", kind: "message", T: PolicyInstance, opt: true }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryRequest { | ||
| return new QueryRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryRequest { | ||
| return new QueryRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryRequest { | ||
| return new QueryRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: QueryRequest | PlainMessage<QueryRequest> | undefined, b: QueryRequest | PlainMessage<QueryRequest> | undefined): boolean { | ||
| return proto3.util.equals(QueryRequest, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.CompileRequest | ||
| */ | ||
| export class CompileRequest extends Message<CompileRequest> { | ||
| /** | ||
| * @generated from field: string query = 1; | ||
| */ | ||
| query = ""; | ||
| /** | ||
| * @generated from field: string input = 2; | ||
| */ | ||
| input = ""; | ||
| /** | ||
| * @generated from field: repeated string unknowns = 3; | ||
| */ | ||
| unknowns: string[] = []; | ||
| /** | ||
| * @generated from field: repeated string disable_inlining = 4; | ||
| */ | ||
| disableInlining: string[] = []; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.QueryOptions options = 5; | ||
| */ | ||
| options?: QueryOptions; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyContext policy_context = 6; | ||
| */ | ||
| policyContext?: PolicyContext; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.IdentityContext identity_context = 7; | ||
| */ | ||
| identityContext?: IdentityContext; | ||
| /** | ||
| * @generated from field: optional google.protobuf.Struct resource_context = 8; | ||
| */ | ||
| resourceContext?: Struct; | ||
| /** | ||
| * @generated from field: optional aserto.authorizer.v2.api.PolicyInstance policy_instance = 9; | ||
| */ | ||
| policyInstance?: PolicyInstance; | ||
| constructor(data?: PartialMessage<CompileRequest>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.CompileRequest"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "input", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "unknowns", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 4, name: "disable_inlining", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 5, name: "options", kind: "message", T: QueryOptions, opt: true }, | ||
| { no: 6, name: "policy_context", kind: "message", T: PolicyContext, opt: true }, | ||
| { no: 7, name: "identity_context", kind: "message", T: IdentityContext, opt: true }, | ||
| { no: 8, name: "resource_context", kind: "message", T: Struct, opt: true }, | ||
| { no: 9, name: "policy_instance", kind: "message", T: PolicyInstance, opt: true }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CompileRequest { | ||
| return new CompileRequest().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CompileRequest { | ||
| return new CompileRequest().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CompileRequest { | ||
| return new CompileRequest().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: CompileRequest | PlainMessage<CompileRequest> | undefined, b: CompileRequest | PlainMessage<CompileRequest> | undefined): boolean { | ||
| return proto3.util.equals(CompileRequest, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.CompileResponse | ||
| */ | ||
| export class CompileResponse extends Message<CompileResponse> { | ||
| /** | ||
| * @generated from field: google.protobuf.Struct result = 1; | ||
| */ | ||
| result?: Struct; | ||
| /** | ||
| * @generated from field: google.protobuf.Struct metrics = 2; | ||
| */ | ||
| metrics?: Struct; | ||
| /** | ||
| * @generated from field: repeated google.protobuf.Struct trace = 3; | ||
| */ | ||
| trace: Struct[] = []; | ||
| /** | ||
| * @generated from field: repeated string trace_summary = 4; | ||
| */ | ||
| traceSummary: string[] = []; | ||
| constructor(data?: PartialMessage<CompileResponse>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.CompileResponse"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "result", kind: "message", T: Struct }, | ||
| { no: 2, name: "metrics", kind: "message", T: Struct }, | ||
| { no: 3, name: "trace", kind: "message", T: Struct, repeated: true }, | ||
| { no: 4, name: "trace_summary", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CompileResponse { | ||
| return new CompileResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CompileResponse { | ||
| return new CompileResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CompileResponse { | ||
| return new CompileResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: CompileResponse | PlainMessage<CompileResponse> | undefined, b: CompileResponse | PlainMessage<CompileResponse> | undefined): boolean { | ||
| return proto3.util.equals(CompileResponse, a, b); | ||
| } | ||
| } | ||
| /** | ||
| * @generated from message aserto.authorizer.v2.QueryResponse | ||
| */ | ||
| export class QueryResponse extends Message<QueryResponse> { | ||
| /** | ||
| * @generated from field: google.protobuf.Struct response = 1; | ||
| */ | ||
| response?: Struct; | ||
| /** | ||
| * @generated from field: google.protobuf.Struct metrics = 2; | ||
| */ | ||
| metrics?: Struct; | ||
| /** | ||
| * @generated from field: repeated google.protobuf.Struct trace = 3; | ||
| */ | ||
| trace: Struct[] = []; | ||
| /** | ||
| * @generated from field: repeated string trace_summary = 4; | ||
| */ | ||
| traceSummary: string[] = []; | ||
| constructor(data?: PartialMessage<QueryResponse>) { | ||
| super(); | ||
| proto3.util.initPartial(data, this); | ||
| } | ||
| static readonly runtime: typeof proto3 = proto3; | ||
| static readonly typeName = "aserto.authorizer.v2.QueryResponse"; | ||
| static readonly fields: FieldList = proto3.util.newFieldList(() => [ | ||
| { no: 1, name: "response", kind: "message", T: Struct }, | ||
| { no: 2, name: "metrics", kind: "message", T: Struct }, | ||
| { no: 3, name: "trace", kind: "message", T: Struct, repeated: true }, | ||
| { no: 4, name: "trace_summary", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| ]); | ||
| static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): QueryResponse { | ||
| return new QueryResponse().fromBinary(bytes, options); | ||
| } | ||
| static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): QueryResponse { | ||
| return new QueryResponse().fromJson(jsonValue, options); | ||
| } | ||
| static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): QueryResponse { | ||
| return new QueryResponse().fromJsonString(jsonString, options); | ||
| } | ||
| static equals(a: QueryResponse | PlainMessage<QueryResponse> | undefined, b: QueryResponse | PlainMessage<QueryResponse> | undefined): boolean { | ||
| return proto3.util.equals(QueryResponse, a, b); | ||
| } | ||
| } | ||
| // Copyright 2015 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.8.0 with parameter "target=js" | ||
| // @generated from file google/api/annotations.proto (package google.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { MethodOptions, proto3 } from "@bufbuild/protobuf"; | ||
| import { HttpRule } from "./http_pb.js"; | ||
| /** | ||
| * See `HttpRule`. | ||
| * | ||
| * @generated from extension: google.api.HttpRule http = 72295728; | ||
| */ | ||
| export const http = proto3.makeExtension( | ||
| "google.api.http", | ||
| MethodOptions, | ||
| () => ({ no: 72295728, kind: "message", T: HttpRule }), | ||
| ); | ||
| // Copyright 2015 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.8.0 with parameter "target=ts" | ||
| // @generated from file google/api/annotations.proto (package google.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { MethodOptions, proto3 } from "@bufbuild/protobuf"; | ||
| 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 }), | ||
| ); | ||
| // Copyright 2023 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.8.0 with parameter "target=js" | ||
| // @generated from file google/api/http.proto (package google.api, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { 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 const Http = /*@__PURE__*/ proto3.makeMessageType( | ||
| "google.api.Http", | ||
| () => [ | ||
| { no: 1, name: "rules", kind: "message", T: HttpRule, repeated: true }, | ||
| { no: 2, name: "fully_decode_reserved_expansion", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| ], | ||
| ); | ||
| /** | ||
| * # 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¶m=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 const HttpRule = /*@__PURE__*/ proto3.makeMessageType( | ||
| "google.api.HttpRule", | ||
| () => [ | ||
| { 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 }, | ||
| ], | ||
| ); | ||
| /** | ||
| * A custom pattern is used for defining custom HTTP verb. | ||
| * | ||
| * @generated from message google.api.CustomHttpPattern | ||
| */ | ||
| export const CustomHttpPattern = /*@__PURE__*/ proto3.makeMessageType( | ||
| "google.api.CustomHttpPattern", | ||
| () => [ | ||
| { no: 1, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ], | ||
| ); | ||
| // Copyright 2023 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.8.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¶m=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); | ||
| } | ||
| } | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=js" | ||
| // @generated from file protoc-gen-openapiv2/options/annotations.proto (package grpc.gateway.protoc_gen_openapiv2.options, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { FieldOptions, FileOptions, MessageOptions, MethodOptions, proto3, ServiceOptions } from "@bufbuild/protobuf"; | ||
| 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( | ||
| "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( | ||
| "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( | ||
| "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( | ||
| "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( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field", | ||
| FieldOptions, | ||
| () => ({ no: 1042, kind: "message", T: JSONSchema }), | ||
| ); | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=ts" | ||
| // @generated from file protoc-gen-openapiv2/options/annotations.proto (package grpc.gateway.protoc_gen_openapiv2.options, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { FieldOptions, FileOptions, MessageOptions, MethodOptions, proto3, ServiceOptions } from "@bufbuild/protobuf"; | ||
| 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 }), | ||
| ); | ||
| // @generated by protoc-gen-es v1.8.0 with parameter "target=js" | ||
| // @generated from file protoc-gen-openapiv2/options/openapiv2.proto (package grpc.gateway.protoc_gen_openapiv2.options, syntax proto3) | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| import { proto3, Value } from "@bufbuild/protobuf"; | ||
| /** | ||
| * Scheme describes the schemes supported by the OpenAPI Swagger | ||
| * and Operation objects. | ||
| * | ||
| * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.Scheme | ||
| */ | ||
| export const Scheme = /*@__PURE__*/ proto3.makeEnum( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.Scheme", | ||
| [ | ||
| {no: 0, name: "UNKNOWN"}, | ||
| {no: 1, name: "HTTP"}, | ||
| {no: 2, name: "HTTPS"}, | ||
| {no: 3, name: "WS"}, | ||
| {no: 4, name: "WSS"}, | ||
| ], | ||
| ); | ||
| /** | ||
| * `Swagger` is a representation of OpenAPI v2 specification's Swagger object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject | ||
| * | ||
| * Example: | ||
| * | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { | ||
| * info: { | ||
| * title: "Echo API"; | ||
| * version: "1.0"; | ||
| * description: ""; | ||
| * contact: { | ||
| * name: "gRPC-Gateway project"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway"; | ||
| * email: "none@example.com"; | ||
| * }; | ||
| * license: { | ||
| * name: "BSD 3-Clause License"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; | ||
| * }; | ||
| * }; | ||
| * schemes: HTTPS; | ||
| * consumes: "application/json"; | ||
| * produces: "application/json"; | ||
| * }; | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Swagger | ||
| */ | ||
| export const Swagger = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.Swagger", | ||
| () => [ | ||
| { no: 1, name: "swagger", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "info", kind: "message", T: Info }, | ||
| { no: 3, name: "host", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 4, name: "base_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 5, name: "schemes", kind: "enum", T: proto3.getEnumType(Scheme), repeated: true }, | ||
| { no: 6, name: "consumes", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 7, name: "produces", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 10, name: "responses", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Response} }, | ||
| { no: 11, name: "security_definitions", kind: "message", T: SecurityDefinitions }, | ||
| { no: 12, name: "security", kind: "message", T: SecurityRequirement, repeated: true }, | ||
| { no: 13, name: "tags", kind: "message", T: Tag, repeated: true }, | ||
| { no: 14, name: "external_docs", kind: "message", T: ExternalDocumentation }, | ||
| { no: 15, name: "extensions", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Value} }, | ||
| ], | ||
| ); | ||
| /** | ||
| * `Operation` is a representation of OpenAPI v2 specification's Operation object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject | ||
| * | ||
| * Example: | ||
| * | ||
| * service EchoService { | ||
| * rpc Echo(SimpleMessage) returns (SimpleMessage) { | ||
| * option (google.api.http) = { | ||
| * get: "/v1/example/echo/{id}" | ||
| * }; | ||
| * | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { | ||
| * summary: "Get a message."; | ||
| * operation_id: "getMessage"; | ||
| * tags: "echo"; | ||
| * responses: { | ||
| * key: "200" | ||
| * value: { | ||
| * description: "OK"; | ||
| * } | ||
| * } | ||
| * }; | ||
| * } | ||
| * } | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Operation | ||
| */ | ||
| export const Operation = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.Operation", | ||
| () => [ | ||
| { no: 1, name: "tags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 2, name: "summary", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 4, name: "external_docs", kind: "message", T: ExternalDocumentation }, | ||
| { no: 5, name: "operation_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 6, name: "consumes", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 7, name: "produces", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 9, name: "responses", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Response} }, | ||
| { no: 10, name: "schemes", kind: "enum", T: proto3.getEnumType(Scheme), repeated: true }, | ||
| { no: 11, name: "deprecated", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| { no: 12, name: "security", kind: "message", T: SecurityRequirement, repeated: true }, | ||
| { no: 13, name: "extensions", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Value} }, | ||
| { no: 14, name: "parameters", kind: "message", T: Parameters }, | ||
| ], | ||
| ); | ||
| /** | ||
| * `Parameters` is a representation of OpenAPI v2 specification's parameters object. | ||
| * Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only | ||
| * allow header parameters to be set here since we do not want users specifying custom non-header | ||
| * parameters beyond those inferred from the Protobuf schema. | ||
| * See: https://swagger.io/specification/v2/#parameter-object | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Parameters | ||
| */ | ||
| export const Parameters = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.Parameters", | ||
| () => [ | ||
| { no: 1, name: "headers", kind: "message", T: HeaderParameter, repeated: true }, | ||
| ], | ||
| ); | ||
| /** | ||
| * `HeaderParameter` a HTTP header parameter. | ||
| * See: https://swagger.io/specification/v2/#parameter-object | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter | ||
| */ | ||
| export const HeaderParameter = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter", | ||
| () => [ | ||
| { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "type", kind: "enum", T: proto3.getEnumType(HeaderParameter_Type) }, | ||
| { no: 4, name: "format", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 5, name: "required", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| ], | ||
| ); | ||
| /** | ||
| * `Type` is a a supported HTTP header type. | ||
| * See https://swagger.io/specification/v2/#parameterType. | ||
| * | ||
| * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type | ||
| */ | ||
| export const HeaderParameter_Type = /*@__PURE__*/ proto3.makeEnum( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type", | ||
| [ | ||
| {no: 0, name: "UNKNOWN"}, | ||
| {no: 1, name: "STRING"}, | ||
| {no: 2, name: "NUMBER"}, | ||
| {no: 3, name: "INTEGER"}, | ||
| {no: 4, name: "BOOLEAN"}, | ||
| ], | ||
| ); | ||
| /** | ||
| * `Header` is a representation of OpenAPI v2 specification's Header object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Header | ||
| */ | ||
| export const Header = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.Header", | ||
| () => [ | ||
| { no: 1, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "format", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 6, name: "default", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 13, name: "pattern", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ], | ||
| ); | ||
| /** | ||
| * `Response` is a representation of OpenAPI v2 specification's Response object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Response | ||
| */ | ||
| export const Response = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.Response", | ||
| () => [ | ||
| { no: 1, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "schema", kind: "message", T: Schema }, | ||
| { no: 3, name: "headers", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Header} }, | ||
| { no: 4, name: "examples", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, | ||
| { no: 5, name: "extensions", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Value} }, | ||
| ], | ||
| ); | ||
| /** | ||
| * `Info` is a representation of OpenAPI v2 specification's Info object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject | ||
| * | ||
| * Example: | ||
| * | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { | ||
| * info: { | ||
| * title: "Echo API"; | ||
| * version: "1.0"; | ||
| * description: ""; | ||
| * contact: { | ||
| * name: "gRPC-Gateway project"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway"; | ||
| * email: "none@example.com"; | ||
| * }; | ||
| * license: { | ||
| * name: "BSD 3-Clause License"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; | ||
| * }; | ||
| * }; | ||
| * ... | ||
| * }; | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Info | ||
| */ | ||
| export const Info = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.Info", | ||
| () => [ | ||
| { no: 1, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "terms_of_service", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 4, name: "contact", kind: "message", T: Contact }, | ||
| { no: 5, name: "license", kind: "message", T: License }, | ||
| { no: 6, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 7, name: "extensions", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Value} }, | ||
| ], | ||
| ); | ||
| /** | ||
| * `Contact` is a representation of OpenAPI v2 specification's Contact object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject | ||
| * | ||
| * Example: | ||
| * | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { | ||
| * info: { | ||
| * ... | ||
| * contact: { | ||
| * name: "gRPC-Gateway project"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway"; | ||
| * email: "none@example.com"; | ||
| * }; | ||
| * ... | ||
| * }; | ||
| * ... | ||
| * }; | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Contact | ||
| */ | ||
| export const Contact = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.Contact", | ||
| () => [ | ||
| { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ], | ||
| ); | ||
| /** | ||
| * `License` is a representation of OpenAPI v2 specification's License object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject | ||
| * | ||
| * Example: | ||
| * | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { | ||
| * info: { | ||
| * ... | ||
| * license: { | ||
| * name: "BSD 3-Clause License"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; | ||
| * }; | ||
| * ... | ||
| * }; | ||
| * ... | ||
| * }; | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.License | ||
| */ | ||
| export const License = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.License", | ||
| () => [ | ||
| { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ], | ||
| ); | ||
| /** | ||
| * `ExternalDocumentation` is a representation of OpenAPI v2 specification's | ||
| * ExternalDocumentation object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject | ||
| * | ||
| * Example: | ||
| * | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { | ||
| * ... | ||
| * external_docs: { | ||
| * description: "More about gRPC-Gateway"; | ||
| * url: "https://github.com/grpc-ecosystem/grpc-gateway"; | ||
| * } | ||
| * ... | ||
| * }; | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation | ||
| */ | ||
| export const ExternalDocumentation = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation", | ||
| () => [ | ||
| { no: 1, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ], | ||
| ); | ||
| /** | ||
| * `Schema` is a representation of OpenAPI v2 specification's Schema object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Schema | ||
| */ | ||
| export const Schema = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.Schema", | ||
| () => [ | ||
| { no: 1, name: "json_schema", kind: "message", T: JSONSchema }, | ||
| { no: 2, name: "discriminator", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "read_only", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| { no: 5, name: "external_docs", kind: "message", T: ExternalDocumentation }, | ||
| { no: 6, name: "example", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ], | ||
| ); | ||
| /** | ||
| * `JSONSchema` represents properties from JSON Schema taken, and as used, in | ||
| * the OpenAPI v2 spec. | ||
| * | ||
| * This includes changes made by OpenAPI v2. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject | ||
| * | ||
| * See also: https://cswr.github.io/JsonSchema/spec/basic_types/, | ||
| * https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json | ||
| * | ||
| * Example: | ||
| * | ||
| * message SimpleMessage { | ||
| * option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { | ||
| * json_schema: { | ||
| * title: "SimpleMessage" | ||
| * description: "A simple message." | ||
| * required: ["id"] | ||
| * } | ||
| * }; | ||
| * | ||
| * // Id represents the message identifier. | ||
| * string id = 1; [ | ||
| * (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { | ||
| * description: "The unique identifier of the simple message." | ||
| * }]; | ||
| * } | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.JSONSchema | ||
| */ | ||
| export const JSONSchema = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.JSONSchema", | ||
| () => [ | ||
| { no: 3, name: "ref", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 5, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 6, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 7, name: "default", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 8, name: "read_only", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| { no: 9, name: "example", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 10, name: "multiple_of", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, | ||
| { no: 11, name: "maximum", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, | ||
| { no: 12, name: "exclusive_maximum", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| { no: 13, name: "minimum", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, | ||
| { no: 14, name: "exclusive_minimum", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| { no: 15, name: "max_length", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, | ||
| { no: 16, name: "min_length", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, | ||
| { no: 17, name: "pattern", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 20, name: "max_items", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, | ||
| { no: 21, name: "min_items", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, | ||
| { no: 22, name: "unique_items", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
| { no: 24, name: "max_properties", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, | ||
| { no: 25, name: "min_properties", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, | ||
| { no: 26, name: "required", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 34, name: "array", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 35, name: "type", kind: "enum", T: proto3.getEnumType(JSONSchema_JSONSchemaSimpleTypes), repeated: true }, | ||
| { no: 36, name: "format", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 46, name: "enum", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| { no: 1001, name: "field_configuration", kind: "message", T: JSONSchema_FieldConfiguration }, | ||
| { no: 48, name: "extensions", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Value} }, | ||
| ], | ||
| ); | ||
| /** | ||
| * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes | ||
| */ | ||
| export const JSONSchema_JSONSchemaSimpleTypes = /*@__PURE__*/ proto3.makeEnum( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes", | ||
| [ | ||
| {no: 0, name: "UNKNOWN"}, | ||
| {no: 1, name: "ARRAY"}, | ||
| {no: 2, name: "BOOLEAN"}, | ||
| {no: 3, name: "INTEGER"}, | ||
| {no: 4, name: "NULL"}, | ||
| {no: 5, name: "NUMBER"}, | ||
| {no: 6, name: "OBJECT"}, | ||
| {no: 7, name: "STRING"}, | ||
| ], | ||
| ); | ||
| /** | ||
| * 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. | ||
| * These properties are not defined by OpenAPIv2, but they are used to control the generation. | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration | ||
| */ | ||
| export const JSONSchema_FieldConfiguration = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration", | ||
| () => [ | ||
| { no: 47, name: "path_param_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| ], | ||
| {localName: "JSONSchema_FieldConfiguration"}, | ||
| ); | ||
| /** | ||
| * `Tag` is a representation of OpenAPI v2 specification's Tag object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject | ||
| * | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Tag | ||
| */ | ||
| export const Tag = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.Tag", | ||
| () => [ | ||
| { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "external_docs", kind: "message", T: ExternalDocumentation }, | ||
| { no: 4, name: "extensions", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Value} }, | ||
| ], | ||
| ); | ||
| /** | ||
| * `SecurityDefinitions` is a representation of OpenAPI v2 specification's | ||
| * Security Definitions object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject | ||
| * | ||
| * A declaration of the security schemes available to be used in the | ||
| * specification. This does not enforce the security schemes on the operations | ||
| * and only serves to provide the relevant details for each scheme. | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions | ||
| */ | ||
| export const SecurityDefinitions = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions", | ||
| () => [ | ||
| { no: 1, name: "security", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: SecurityScheme} }, | ||
| ], | ||
| ); | ||
| /** | ||
| * `SecurityScheme` is a representation of OpenAPI v2 specification's | ||
| * Security Scheme object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject | ||
| * | ||
| * Allows the definition of a security scheme that can be used by the | ||
| * operations. Supported schemes are basic authentication, an API key (either as | ||
| * a header or as a query parameter) and OAuth2's common flows (implicit, | ||
| * password, application and access code). | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme | ||
| */ | ||
| export const SecurityScheme = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme", | ||
| () => [ | ||
| { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(SecurityScheme_Type) }, | ||
| { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 4, name: "in", kind: "enum", T: proto3.getEnumType(SecurityScheme_In) }, | ||
| { no: 5, name: "flow", kind: "enum", T: proto3.getEnumType(SecurityScheme_Flow) }, | ||
| { no: 6, name: "authorization_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 7, name: "token_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
| { no: 8, name: "scopes", kind: "message", T: Scopes }, | ||
| { no: 9, name: "extensions", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Value} }, | ||
| ], | ||
| ); | ||
| /** | ||
| * The type of the security scheme. Valid values are "basic", | ||
| * "apiKey" or "oauth2". | ||
| * | ||
| * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type | ||
| */ | ||
| export const SecurityScheme_Type = /*@__PURE__*/ proto3.makeEnum( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type", | ||
| [ | ||
| {no: 0, name: "TYPE_INVALID", localName: "INVALID"}, | ||
| {no: 1, name: "TYPE_BASIC", localName: "BASIC"}, | ||
| {no: 2, name: "TYPE_API_KEY", localName: "API_KEY"}, | ||
| {no: 3, name: "TYPE_OAUTH2", localName: "OAUTH2"}, | ||
| ], | ||
| ); | ||
| /** | ||
| * The location of the API key. Valid values are "query" or "header". | ||
| * | ||
| * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In | ||
| */ | ||
| export const SecurityScheme_In = /*@__PURE__*/ proto3.makeEnum( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In", | ||
| [ | ||
| {no: 0, name: "IN_INVALID", localName: "INVALID"}, | ||
| {no: 1, name: "IN_QUERY", localName: "QUERY"}, | ||
| {no: 2, name: "IN_HEADER", localName: "HEADER"}, | ||
| ], | ||
| ); | ||
| /** | ||
| * The flow used by the OAuth2 security scheme. Valid values are | ||
| * "implicit", "password", "application" or "accessCode". | ||
| * | ||
| * @generated from enum grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow | ||
| */ | ||
| export const SecurityScheme_Flow = /*@__PURE__*/ proto3.makeEnum( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow", | ||
| [ | ||
| {no: 0, name: "FLOW_INVALID", localName: "INVALID"}, | ||
| {no: 1, name: "FLOW_IMPLICIT", localName: "IMPLICIT"}, | ||
| {no: 2, name: "FLOW_PASSWORD", localName: "PASSWORD"}, | ||
| {no: 3, name: "FLOW_APPLICATION", localName: "APPLICATION"}, | ||
| {no: 4, name: "FLOW_ACCESS_CODE", localName: "ACCESS_CODE"}, | ||
| ], | ||
| ); | ||
| /** | ||
| * `SecurityRequirement` is a representation of OpenAPI v2 specification's | ||
| * Security Requirement object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject | ||
| * | ||
| * Lists the required security schemes to execute this operation. The object can | ||
| * have multiple security schemes declared in it which are all required (that | ||
| * is, there is a logical AND between the schemes). | ||
| * | ||
| * The name used for each property MUST correspond to a security scheme | ||
| * declared in the Security Definitions. | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement | ||
| */ | ||
| export const SecurityRequirement = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement", | ||
| () => [ | ||
| { no: 1, name: "security_requirement", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: SecurityRequirement_SecurityRequirementValue} }, | ||
| ], | ||
| ); | ||
| /** | ||
| * If the security scheme is of type "oauth2", then the value is a list of | ||
| * scope names required for the execution. For other security scheme types, | ||
| * the array MUST be empty. | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue | ||
| */ | ||
| export const SecurityRequirement_SecurityRequirementValue = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue", | ||
| () => [ | ||
| { no: 1, name: "scope", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
| ], | ||
| {localName: "SecurityRequirement_SecurityRequirementValue"}, | ||
| ); | ||
| /** | ||
| * `Scopes` is a representation of OpenAPI v2 specification's Scopes object. | ||
| * | ||
| * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject | ||
| * | ||
| * Lists the available scopes for an OAuth2 security scheme. | ||
| * | ||
| * @generated from message grpc.gateway.protoc_gen_openapiv2.options.Scopes | ||
| */ | ||
| export const Scopes = /*@__PURE__*/ proto3.makeMessageType( | ||
| "grpc.gateway.protoc_gen_openapiv2.options.Scopes", | ||
| () => [ | ||
| { no: 1, name: "scope", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, | ||
| ], | ||
| ); | ||
Sorry, the diff of this file is too big to display
+12
-14
| version: v1 | ||
| plugins: | ||
| - name: js | ||
| out: pkg | ||
| opt: import_style=commonjs,binary | ||
| - name: grpc | ||
| out: pkg | ||
| opt: grpc_js | ||
| path: ./node_modules/.bin/grpc_tools_node_protoc_plugin | ||
| - name: ts | ||
| out: pkg | ||
| opt: grpc_js,service=grpc-node | ||
| path: ./node_modules/.bin/protoc-gen-ts | ||
| - plugin: es | ||
| opt: target=ts | ||
| out: src/gen/mjs | ||
| - plugin: es | ||
| opt: target=js | ||
| out: src/gen/mjs | ||
| - plugin: connect-es | ||
| opt: target=ts | ||
| out: src/gen/mjs | ||
| - plugin: connect-es | ||
| opt: target=js | ||
| out: src/gen/mjs |
+6
-10
| { | ||
| "name": "@aserto/node-authorizer", | ||
| "version": "0.20.7", | ||
| "version": "0.20.8", | ||
| "description": "Node gRPC bindings for the Aserto authorizer service", | ||
| "scripts": { | ||
| "gen": "buf generate --include-imports buf.build/aserto-dev/authorizer" | ||
| "gen": "rm -rf src && buf generate --include-imports ${BUF_PATH:-buf.build/aserto-dev/authorizer} && rm -rf src/gen/cjs && tsc" | ||
| }, | ||
@@ -11,16 +11,12 @@ "keywords": [], | ||
| "license": "Apache-2.0", | ||
| "peerDependencies": { | ||
| "@grpc/grpc-js": ">=1.8.21 <1.9" | ||
| }, | ||
| "devDependencies": { | ||
| "@grpc/grpc-js": ">=1.8.21 <1.9", | ||
| "@bufbuild/buf": "^1.28.0", | ||
| "@bufbuild/protobuf": "^1.2.1", | ||
| "@bufbuild/protoc-gen-es": "^1.4.2", | ||
| "@connectrpc/protoc-gen-connect-es": "^1.1.3", | ||
| "@types/google-protobuf": "^3.15.6", | ||
| "@types/node": "^18.7.13", | ||
| "google-protobuf": "^3.21.2", | ||
| "grpc-tools": "^1.12.4", | ||
| "ts-node-dev": "^2.0.0", | ||
| "ts-node": "^10.9.1", | ||
| "ts-protoc-gen": "^0.15.0", | ||
| "typescript": "^4.8.2" | ||
| } | ||
| } |
+5
-40
@@ -12,45 +12,10 @@ # node-authorizer-v2 | ||
| ## Example | ||
| ```ts | ||
| import { AuthorizerClient } from "@aserto/node-authorizer/pkg/aserto/authorizer/v2/authorizer_grpc_pb"; | ||
| import { credentials } from "@grpc/grpc-js"; | ||
| import { Metadata, ServiceError } from "@grpc/grpc-js"; | ||
| import { | ||
| ListPoliciesRequest, | ||
| ListPoliciesResponse, | ||
| } from "@aserto/node-authorizer/pkg/aserto/authorizer/v2/authorizer_pb"; | ||
| import { readFileSync } from "fs"; | ||
| ## Usage | ||
| const root_cert = readFileSync( | ||
| `${process.env.HOME}/.config/topaz/certs/grpc-ca.crt` | ||
| ); | ||
| const ssl = credentials.createSsl(root_cert); | ||
| const client = new AuthorizerClient("localhost:8282", ssl); | ||
| const request = new ListPoliciesRequest(); | ||
| const metadata = new Metadata(); | ||
| This repository contains only the bindings. | ||
| See https://github.com/aserto-dev/aserto-node#authorizer for usage. | ||
| try { | ||
| client.listPolicies( | ||
| request, | ||
| metadata, | ||
| (err: ServiceError, response: ListPoliciesResponse) => { | ||
| if (err) { | ||
| const message = `'listPolicies' returned error: ${err.message}`; | ||
| console.error(message); | ||
| return; | ||
| } | ||
| if (!response) { | ||
| const message = `'listPolicies' returned error: No response`; | ||
| console.error(message); | ||
| return; | ||
| } | ||
| const result = response.getResultList(); | ||
| console.log(result); | ||
| } | ||
| ); | ||
| } catch (e) { | ||
| console.error(e); | ||
| } | ||
| ``` | ||
| ## Troubleshooting | ||
| **On M1 Mac**: Run `arch -x86_64 zsh` first and the continue normally. |
+25
-103
| { | ||
| "compilerOptions": { | ||
| /* Visit https://aka.ms/tsconfig.json to read more about this file */ | ||
| /* Projects */ | ||
| // "incremental": true, /* Enable incremental compilation */ | ||
| // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ | ||
| // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ | ||
| // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ | ||
| // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ | ||
| // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ | ||
| /* Language and Environment */ | ||
| "target": "es6", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ | ||
| // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ | ||
| // "jsx": "preserve", /* Specify what JSX code is generated. */ | ||
| // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ | ||
| // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ | ||
| // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ | ||
| // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ | ||
| // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ | ||
| // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ | ||
| // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ | ||
| // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ | ||
| /* Modules */ | ||
| "module": "commonjs", /* Specify what module code is generated. */ | ||
| "rootDir": "./pkg", /* Specify the root folder within your source files. */ | ||
| "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ | ||
| // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ | ||
| // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ | ||
| // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ | ||
| // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ | ||
| // "types": [], /* Specify type package names to be included without being referenced in a source file. */ | ||
| // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ | ||
| // "resolveJsonModule": true, /* Enable importing .json files */ | ||
| // "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */ | ||
| /* JavaScript Support */ | ||
| // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ | ||
| // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ | ||
| // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ | ||
| /* Emit */ | ||
| // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ | ||
| // "declarationMap": true, /* Create sourcemaps for d.ts files. */ | ||
| // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ | ||
| "sourceMap": true, /* Create source map files for emitted JavaScript files. */ | ||
| // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ | ||
| "outDir": "./dist", /* Specify an output folder for all emitted files. */ | ||
| // "removeComments": true, /* Disable emitting comments. */ | ||
| // "noEmit": true, /* Disable emitting files from a compilation. */ | ||
| // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ | ||
| // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ | ||
| // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ | ||
| // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ | ||
| // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ | ||
| // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ | ||
| // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ | ||
| // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ | ||
| // "newLine": "crlf", /* Set the newline character for emitting files. */ | ||
| // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ | ||
| // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ | ||
| // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ | ||
| // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ | ||
| // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ | ||
| // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ | ||
| /* Interop Constraints */ | ||
| // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ | ||
| // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ | ||
| "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ | ||
| // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ | ||
| "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ | ||
| /* Type Checking */ | ||
| "strict": true, /* Enable all strict type-checking options. */ | ||
| // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ | ||
| // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ | ||
| // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ | ||
| // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ | ||
| // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ | ||
| // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ | ||
| // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ | ||
| "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ | ||
| "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ | ||
| "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ | ||
| // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ | ||
| // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ | ||
| // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ | ||
| // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ | ||
| // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ | ||
| // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ | ||
| // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ | ||
| // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ | ||
| /* Completeness */ | ||
| // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ | ||
| "skipLibCheck": true /* Skip type checking all .d.ts files. */ | ||
| "module": "commonjs", | ||
| "outDir": "src/gen/cjs", | ||
| "target": "es2015", | ||
| "allowJs": true, | ||
| "allowSyntheticDefaultImports": true, | ||
| "baseUrl": "src/gen/mjs", | ||
| "declaration": true, | ||
| "esModuleInterop": true, | ||
| "inlineSourceMap": false, | ||
| "lib": ["esnext"], | ||
| "listEmittedFiles": false, | ||
| "listFiles": false, | ||
| "moduleResolution": "node", | ||
| "noFallthroughCasesInSwitch": true, | ||
| "pretty": true, | ||
| "resolveJsonModule": true, | ||
| "rootDir": "src/gen/mjs", | ||
| "skipLibCheck": true, | ||
| "strict": true, | ||
| "traceResolution": false, | ||
| "types": ["node"], | ||
| "forceConsistentCasingInFileNames": true | ||
| }, | ||
| "exclude":[ | ||
| "./node_modules" | ||
| ], | ||
| "include": [ | ||
| "pkg/**/*.ts" | ||
| ] | ||
| "compileOnSave": false, | ||
| "exclude": ["node_modules", "dist"], | ||
| "include": ["src"] | ||
| } |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // package: aserto.authorizer.v2.api | ||
| // file: aserto/authorizer/v2/api/decision_logs.proto | ||
| import * as jspb from "google-protobuf"; | ||
| import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; | ||
| import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; | ||
| import * as aserto_authorizer_v2_api_policy_context_pb from "../../../../aserto/authorizer/v2/api/policy_context_pb"; | ||
| import * as aserto_authorizer_v2_api_identity_context_pb from "../../../../aserto/authorizer/v2/api/identity_context_pb"; | ||
| import * as aserto_authorizer_v2_api_policy_instance_pb from "../../../../aserto/authorizer/v2/api/policy_instance_pb"; | ||
| export class Decision extends jspb.Message { | ||
| getId(): string; | ||
| setId(value: string): void; | ||
| hasTimestamp(): boolean; | ||
| clearTimestamp(): void; | ||
| getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined; | ||
| setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): void; | ||
| getPath(): string; | ||
| setPath(value: string): void; | ||
| hasUser(): boolean; | ||
| clearUser(): void; | ||
| getUser(): DecisionUser | undefined; | ||
| setUser(value?: DecisionUser): void; | ||
| hasPolicy(): boolean; | ||
| clearPolicy(): void; | ||
| getPolicy(): DecisionPolicy | undefined; | ||
| setPolicy(value?: DecisionPolicy): void; | ||
| getOutcomesMap(): jspb.Map<string, boolean>; | ||
| clearOutcomesMap(): void; | ||
| hasResource(): boolean; | ||
| clearResource(): void; | ||
| getResource(): google_protobuf_struct_pb.Struct | undefined; | ||
| setResource(value?: google_protobuf_struct_pb.Struct): void; | ||
| getAnnotationsMap(): jspb.Map<string, string>; | ||
| clearAnnotationsMap(): void; | ||
| hasTenantId(): boolean; | ||
| clearTenantId(): void; | ||
| getTenantId(): string; | ||
| setTenantId(value: string): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Decision.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Decision): Decision.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Decision, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Decision; | ||
| static deserializeBinaryFromReader(message: Decision, reader: jspb.BinaryReader): Decision; | ||
| } | ||
| export namespace Decision { | ||
| export type AsObject = { | ||
| id: string, | ||
| timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject, | ||
| path: string, | ||
| user?: DecisionUser.AsObject, | ||
| policy?: DecisionPolicy.AsObject, | ||
| outcomesMap: Array<[string, boolean]>, | ||
| resource?: google_protobuf_struct_pb.Struct.AsObject, | ||
| annotationsMap: Array<[string, string]>, | ||
| tenantId: string, | ||
| } | ||
| } | ||
| export class DecisionUser extends jspb.Message { | ||
| hasContext(): boolean; | ||
| clearContext(): void; | ||
| getContext(): aserto_authorizer_v2_api_identity_context_pb.IdentityContext | undefined; | ||
| setContext(value?: aserto_authorizer_v2_api_identity_context_pb.IdentityContext): void; | ||
| getId(): string; | ||
| setId(value: string): void; | ||
| getEmail(): string; | ||
| setEmail(value: string): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): DecisionUser.AsObject; | ||
| static toObject(includeInstance: boolean, msg: DecisionUser): DecisionUser.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: DecisionUser, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): DecisionUser; | ||
| static deserializeBinaryFromReader(message: DecisionUser, reader: jspb.BinaryReader): DecisionUser; | ||
| } | ||
| export namespace DecisionUser { | ||
| export type AsObject = { | ||
| context?: aserto_authorizer_v2_api_identity_context_pb.IdentityContext.AsObject, | ||
| id: string, | ||
| email: string, | ||
| } | ||
| } | ||
| export class DecisionPolicy extends jspb.Message { | ||
| hasContext(): boolean; | ||
| clearContext(): void; | ||
| getContext(): aserto_authorizer_v2_api_policy_context_pb.PolicyContext | undefined; | ||
| setContext(value?: aserto_authorizer_v2_api_policy_context_pb.PolicyContext): void; | ||
| getRegistryService(): string; | ||
| setRegistryService(value: string): void; | ||
| getRegistryImage(): string; | ||
| setRegistryImage(value: string): void; | ||
| getRegistryTag(): string; | ||
| setRegistryTag(value: string): void; | ||
| getRegistryDigest(): string; | ||
| setRegistryDigest(value: string): void; | ||
| hasPolicyInstance(): boolean; | ||
| clearPolicyInstance(): void; | ||
| getPolicyInstance(): aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance | undefined; | ||
| setPolicyInstance(value?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): DecisionPolicy.AsObject; | ||
| static toObject(includeInstance: boolean, msg: DecisionPolicy): DecisionPolicy.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: DecisionPolicy, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): DecisionPolicy; | ||
| static deserializeBinaryFromReader(message: DecisionPolicy, reader: jspb.BinaryReader): DecisionPolicy; | ||
| } | ||
| export namespace DecisionPolicy { | ||
| export type AsObject = { | ||
| context?: aserto_authorizer_v2_api_policy_context_pb.PolicyContext.AsObject, | ||
| registryService: string, | ||
| registryImage: string, | ||
| registryTag: string, | ||
| registryDigest: string, | ||
| policyInstance?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance.AsObject, | ||
| } | ||
| } | ||
| // source: aserto/authorizer/v2/api/decision_logs.proto | ||
| /** | ||
| * @fileoverview | ||
| * @enhanceable | ||
| * @suppress {missingRequire} reports error on implicit type usages. | ||
| * @suppress {messageConventions} JS Compiler reports an error if a variable or | ||
| * field starts with 'MSG_' and isn't a translatable message. | ||
| * @public | ||
| */ | ||
| // GENERATED CODE -- DO NOT EDIT! | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| var jspb = require('google-protobuf'); | ||
| var goog = jspb; | ||
| var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); | ||
| var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); | ||
| goog.object.extend(proto, google_protobuf_struct_pb); | ||
| var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); | ||
| goog.object.extend(proto, google_protobuf_timestamp_pb); | ||
| var aserto_authorizer_v2_api_policy_context_pb = require('../../../../aserto/authorizer/v2/api/policy_context_pb.js'); | ||
| goog.object.extend(proto, aserto_authorizer_v2_api_policy_context_pb); | ||
| var aserto_authorizer_v2_api_identity_context_pb = require('../../../../aserto/authorizer/v2/api/identity_context_pb.js'); | ||
| goog.object.extend(proto, aserto_authorizer_v2_api_identity_context_pb); | ||
| var aserto_authorizer_v2_api_policy_instance_pb = require('../../../../aserto/authorizer/v2/api/policy_instance_pb.js'); | ||
| goog.object.extend(proto, aserto_authorizer_v2_api_policy_instance_pb); | ||
| goog.exportSymbol('proto.aserto.authorizer.v2.api.Decision', null, global); | ||
| goog.exportSymbol('proto.aserto.authorizer.v2.api.DecisionPolicy', null, global); | ||
| goog.exportSymbol('proto.aserto.authorizer.v2.api.DecisionUser', null, global); | ||
| /** | ||
| * Generated by JsPbCodeGenerator. | ||
| * @param {Array=} opt_data Optional initial data array, typically from a | ||
| * server response, or constructed directly in Javascript. The array is used | ||
| * in place and becomes part of the constructed object. It is not cloned. | ||
| * If no data is provided, the constructed object will be empty, but still | ||
| * valid. | ||
| * @extends {jspb.Message} | ||
| * @constructor | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision = function(opt_data) { | ||
| jspb.Message.initialize(this, opt_data, 0, -1, null, null); | ||
| }; | ||
| goog.inherits(proto.aserto.authorizer.v2.api.Decision, jspb.Message); | ||
| if (goog.DEBUG && !COMPILED) { | ||
| /** | ||
| * @public | ||
| * @override | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.displayName = 'proto.aserto.authorizer.v2.api.Decision'; | ||
| } | ||
| /** | ||
| * Generated by JsPbCodeGenerator. | ||
| * @param {Array=} opt_data Optional initial data array, typically from a | ||
| * server response, or constructed directly in Javascript. The array is used | ||
| * in place and becomes part of the constructed object. It is not cloned. | ||
| * If no data is provided, the constructed object will be empty, but still | ||
| * valid. | ||
| * @extends {jspb.Message} | ||
| * @constructor | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser = function(opt_data) { | ||
| jspb.Message.initialize(this, opt_data, 0, -1, null, null); | ||
| }; | ||
| goog.inherits(proto.aserto.authorizer.v2.api.DecisionUser, jspb.Message); | ||
| if (goog.DEBUG && !COMPILED) { | ||
| /** | ||
| * @public | ||
| * @override | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.displayName = 'proto.aserto.authorizer.v2.api.DecisionUser'; | ||
| } | ||
| /** | ||
| * Generated by JsPbCodeGenerator. | ||
| * @param {Array=} opt_data Optional initial data array, typically from a | ||
| * server response, or constructed directly in Javascript. The array is used | ||
| * in place and becomes part of the constructed object. It is not cloned. | ||
| * If no data is provided, the constructed object will be empty, but still | ||
| * valid. | ||
| * @extends {jspb.Message} | ||
| * @constructor | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy = function(opt_data) { | ||
| jspb.Message.initialize(this, opt_data, 0, -1, null, null); | ||
| }; | ||
| goog.inherits(proto.aserto.authorizer.v2.api.DecisionPolicy, jspb.Message); | ||
| if (goog.DEBUG && !COMPILED) { | ||
| /** | ||
| * @public | ||
| * @override | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.displayName = 'proto.aserto.authorizer.v2.api.DecisionPolicy'; | ||
| } | ||
| if (jspb.Message.GENERATE_TO_OBJECT) { | ||
| /** | ||
| * Creates an object representation of this proto. | ||
| * Field names that are reserved in JavaScript and will be renamed to pb_name. | ||
| * Optional fields that are not set will be set to undefined. | ||
| * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. | ||
| * For the list of reserved names please see: | ||
| * net/proto2/compiler/js/internal/generator.cc#kKeyword. | ||
| * @param {boolean=} opt_includeInstance Deprecated. whether to include the | ||
| * JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @return {!Object} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.toObject = function(opt_includeInstance) { | ||
| return proto.aserto.authorizer.v2.api.Decision.toObject(opt_includeInstance, this); | ||
| }; | ||
| /** | ||
| * Static version of the {@see toObject} method. | ||
| * @param {boolean|undefined} includeInstance Deprecated. Whether to include | ||
| * the JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @param {!proto.aserto.authorizer.v2.api.Decision} msg The msg instance to transform. | ||
| * @return {!Object} | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.toObject = function(includeInstance, msg) { | ||
| var f, obj = { | ||
| id: jspb.Message.getFieldWithDefault(msg, 1, ""), | ||
| timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), | ||
| path: jspb.Message.getFieldWithDefault(msg, 3, ""), | ||
| user: (f = msg.getUser()) && proto.aserto.authorizer.v2.api.DecisionUser.toObject(includeInstance, f), | ||
| policy: (f = msg.getPolicy()) && proto.aserto.authorizer.v2.api.DecisionPolicy.toObject(includeInstance, f), | ||
| outcomesMap: (f = msg.getOutcomesMap()) ? f.toObject(includeInstance, undefined) : [], | ||
| resource: (f = msg.getResource()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), | ||
| annotationsMap: (f = msg.getAnnotationsMap()) ? f.toObject(includeInstance, undefined) : [], | ||
| tenantId: jspb.Message.getFieldWithDefault(msg, 9, "") | ||
| }; | ||
| if (includeInstance) { | ||
| obj.$jspbMessageInstance = msg; | ||
| } | ||
| return obj; | ||
| }; | ||
| } | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format). | ||
| * @param {jspb.ByteSource} bytes The bytes to deserialize. | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.deserializeBinary = function(bytes) { | ||
| var reader = new jspb.BinaryReader(bytes); | ||
| var msg = new proto.aserto.authorizer.v2.api.Decision; | ||
| return proto.aserto.authorizer.v2.api.Decision.deserializeBinaryFromReader(msg, reader); | ||
| }; | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format) from the | ||
| * given reader into the given message object. | ||
| * @param {!proto.aserto.authorizer.v2.api.Decision} msg The message object to deserialize into. | ||
| * @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.deserializeBinaryFromReader = function(msg, reader) { | ||
| while (reader.nextField()) { | ||
| if (reader.isEndGroup()) { | ||
| break; | ||
| } | ||
| var field = reader.getFieldNumber(); | ||
| switch (field) { | ||
| case 1: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setId(value); | ||
| break; | ||
| case 2: | ||
| var value = new google_protobuf_timestamp_pb.Timestamp; | ||
| reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); | ||
| msg.setTimestamp(value); | ||
| break; | ||
| case 3: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setPath(value); | ||
| break; | ||
| case 4: | ||
| var value = new proto.aserto.authorizer.v2.api.DecisionUser; | ||
| reader.readMessage(value,proto.aserto.authorizer.v2.api.DecisionUser.deserializeBinaryFromReader); | ||
| msg.setUser(value); | ||
| break; | ||
| case 5: | ||
| var value = new proto.aserto.authorizer.v2.api.DecisionPolicy; | ||
| reader.readMessage(value,proto.aserto.authorizer.v2.api.DecisionPolicy.deserializeBinaryFromReader); | ||
| msg.setPolicy(value); | ||
| break; | ||
| case 6: | ||
| var value = msg.getOutcomesMap(); | ||
| reader.readMessage(value, function(message, reader) { | ||
| jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBool, null, "", false); | ||
| }); | ||
| break; | ||
| case 7: | ||
| var value = new google_protobuf_struct_pb.Struct; | ||
| reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); | ||
| msg.setResource(value); | ||
| break; | ||
| case 8: | ||
| var value = msg.getAnnotationsMap(); | ||
| reader.readMessage(value, function(message, reader) { | ||
| jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); | ||
| }); | ||
| break; | ||
| case 9: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setTenantId(value); | ||
| break; | ||
| default: | ||
| reader.skipField(); | ||
| break; | ||
| } | ||
| } | ||
| return msg; | ||
| }; | ||
| /** | ||
| * Serializes the message to binary data (in protobuf wire format). | ||
| * @return {!Uint8Array} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.serializeBinary = function() { | ||
| var writer = new jspb.BinaryWriter(); | ||
| proto.aserto.authorizer.v2.api.Decision.serializeBinaryToWriter(this, writer); | ||
| return writer.getResultBuffer(); | ||
| }; | ||
| /** | ||
| * Serializes the given message to binary data (in protobuf wire | ||
| * format), writing to the given BinaryWriter. | ||
| * @param {!proto.aserto.authorizer.v2.api.Decision} message | ||
| * @param {!jspb.BinaryWriter} writer | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.serializeBinaryToWriter = function(message, writer) { | ||
| var f = undefined; | ||
| f = message.getId(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 1, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getTimestamp(); | ||
| if (f != null) { | ||
| writer.writeMessage( | ||
| 2, | ||
| f, | ||
| google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter | ||
| ); | ||
| } | ||
| f = message.getPath(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 3, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getUser(); | ||
| if (f != null) { | ||
| writer.writeMessage( | ||
| 4, | ||
| f, | ||
| proto.aserto.authorizer.v2.api.DecisionUser.serializeBinaryToWriter | ||
| ); | ||
| } | ||
| f = message.getPolicy(); | ||
| if (f != null) { | ||
| writer.writeMessage( | ||
| 5, | ||
| f, | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.serializeBinaryToWriter | ||
| ); | ||
| } | ||
| f = message.getOutcomesMap(true); | ||
| if (f && f.getLength() > 0) { | ||
| f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBool); | ||
| } | ||
| f = message.getResource(); | ||
| if (f != null) { | ||
| writer.writeMessage( | ||
| 7, | ||
| f, | ||
| google_protobuf_struct_pb.Struct.serializeBinaryToWriter | ||
| ); | ||
| } | ||
| f = message.getAnnotationsMap(true); | ||
| if (f && f.getLength() > 0) { | ||
| f.serializeBinary(8, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); | ||
| } | ||
| f = /** @type {string} */ (jspb.Message.getField(message, 9)); | ||
| if (f != null) { | ||
| writer.writeString( | ||
| 9, | ||
| f | ||
| ); | ||
| } | ||
| }; | ||
| /** | ||
| * optional string id = 1; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.getId = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.setId = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 1, value); | ||
| }; | ||
| /** | ||
| * optional google.protobuf.Timestamp timestamp = 2; | ||
| * @return {?proto.google.protobuf.Timestamp} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.getTimestamp = function() { | ||
| return /** @type{?proto.google.protobuf.Timestamp} */ ( | ||
| jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); | ||
| }; | ||
| /** | ||
| * @param {?proto.google.protobuf.Timestamp|undefined} value | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.setTimestamp = function(value) { | ||
| return jspb.Message.setWrapperField(this, 2, value); | ||
| }; | ||
| /** | ||
| * Clears the message field making it undefined. | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.clearTimestamp = function() { | ||
| return this.setTimestamp(undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.hasTimestamp = function() { | ||
| return jspb.Message.getField(this, 2) != null; | ||
| }; | ||
| /** | ||
| * optional string path = 3; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.getPath = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.setPath = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 3, value); | ||
| }; | ||
| /** | ||
| * optional DecisionUser user = 4; | ||
| * @return {?proto.aserto.authorizer.v2.api.DecisionUser} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.getUser = function() { | ||
| return /** @type{?proto.aserto.authorizer.v2.api.DecisionUser} */ ( | ||
| jspb.Message.getWrapperField(this, proto.aserto.authorizer.v2.api.DecisionUser, 4)); | ||
| }; | ||
| /** | ||
| * @param {?proto.aserto.authorizer.v2.api.DecisionUser|undefined} value | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.setUser = function(value) { | ||
| return jspb.Message.setWrapperField(this, 4, value); | ||
| }; | ||
| /** | ||
| * Clears the message field making it undefined. | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.clearUser = function() { | ||
| return this.setUser(undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.hasUser = function() { | ||
| return jspb.Message.getField(this, 4) != null; | ||
| }; | ||
| /** | ||
| * optional DecisionPolicy policy = 5; | ||
| * @return {?proto.aserto.authorizer.v2.api.DecisionPolicy} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.getPolicy = function() { | ||
| return /** @type{?proto.aserto.authorizer.v2.api.DecisionPolicy} */ ( | ||
| jspb.Message.getWrapperField(this, proto.aserto.authorizer.v2.api.DecisionPolicy, 5)); | ||
| }; | ||
| /** | ||
| * @param {?proto.aserto.authorizer.v2.api.DecisionPolicy|undefined} value | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.setPolicy = function(value) { | ||
| return jspb.Message.setWrapperField(this, 5, value); | ||
| }; | ||
| /** | ||
| * Clears the message field making it undefined. | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.clearPolicy = function() { | ||
| return this.setPolicy(undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.hasPolicy = function() { | ||
| return jspb.Message.getField(this, 5) != null; | ||
| }; | ||
| /** | ||
| * map<string, bool> outcomes = 6; | ||
| * @param {boolean=} opt_noLazyCreate Do not create the map if | ||
| * empty, instead returning `undefined` | ||
| * @return {!jspb.Map<string,boolean>} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.getOutcomesMap = function(opt_noLazyCreate) { | ||
| return /** @type {!jspb.Map<string,boolean>} */ ( | ||
| jspb.Message.getMapField(this, 6, opt_noLazyCreate, | ||
| null)); | ||
| }; | ||
| /** | ||
| * Clears values from the map. The map will be non-null. | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.clearOutcomesMap = function() { | ||
| this.getOutcomesMap().clear(); | ||
| return this;}; | ||
| /** | ||
| * optional google.protobuf.Struct resource = 7; | ||
| * @return {?proto.google.protobuf.Struct} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.getResource = function() { | ||
| return /** @type{?proto.google.protobuf.Struct} */ ( | ||
| jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 7)); | ||
| }; | ||
| /** | ||
| * @param {?proto.google.protobuf.Struct|undefined} value | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.setResource = function(value) { | ||
| return jspb.Message.setWrapperField(this, 7, value); | ||
| }; | ||
| /** | ||
| * Clears the message field making it undefined. | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.clearResource = function() { | ||
| return this.setResource(undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.hasResource = function() { | ||
| return jspb.Message.getField(this, 7) != null; | ||
| }; | ||
| /** | ||
| * map<string, string> annotations = 8; | ||
| * @param {boolean=} opt_noLazyCreate Do not create the map if | ||
| * empty, instead returning `undefined` | ||
| * @return {!jspb.Map<string,string>} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.getAnnotationsMap = function(opt_noLazyCreate) { | ||
| return /** @type {!jspb.Map<string,string>} */ ( | ||
| jspb.Message.getMapField(this, 8, opt_noLazyCreate, | ||
| null)); | ||
| }; | ||
| /** | ||
| * Clears values from the map. The map will be non-null. | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.clearAnnotationsMap = function() { | ||
| this.getAnnotationsMap().clear(); | ||
| return this;}; | ||
| /** | ||
| * optional string tenant_id = 9; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.getTenantId = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.setTenantId = function(value) { | ||
| return jspb.Message.setField(this, 9, value); | ||
| }; | ||
| /** | ||
| * Clears the field making it undefined. | ||
| * @return {!proto.aserto.authorizer.v2.api.Decision} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.clearTenantId = function() { | ||
| return jspb.Message.setField(this, 9, undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Decision.prototype.hasTenantId = function() { | ||
| return jspb.Message.getField(this, 9) != null; | ||
| }; | ||
| if (jspb.Message.GENERATE_TO_OBJECT) { | ||
| /** | ||
| * Creates an object representation of this proto. | ||
| * Field names that are reserved in JavaScript and will be renamed to pb_name. | ||
| * Optional fields that are not set will be set to undefined. | ||
| * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. | ||
| * For the list of reserved names please see: | ||
| * net/proto2/compiler/js/internal/generator.cc#kKeyword. | ||
| * @param {boolean=} opt_includeInstance Deprecated. whether to include the | ||
| * JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @return {!Object} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.prototype.toObject = function(opt_includeInstance) { | ||
| return proto.aserto.authorizer.v2.api.DecisionUser.toObject(opt_includeInstance, this); | ||
| }; | ||
| /** | ||
| * Static version of the {@see toObject} method. | ||
| * @param {boolean|undefined} includeInstance Deprecated. Whether to include | ||
| * the JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @param {!proto.aserto.authorizer.v2.api.DecisionUser} msg The msg instance to transform. | ||
| * @return {!Object} | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.toObject = function(includeInstance, msg) { | ||
| var f, obj = { | ||
| context: (f = msg.getContext()) && aserto_authorizer_v2_api_identity_context_pb.IdentityContext.toObject(includeInstance, f), | ||
| id: jspb.Message.getFieldWithDefault(msg, 2, ""), | ||
| email: jspb.Message.getFieldWithDefault(msg, 3, "") | ||
| }; | ||
| if (includeInstance) { | ||
| obj.$jspbMessageInstance = msg; | ||
| } | ||
| return obj; | ||
| }; | ||
| } | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format). | ||
| * @param {jspb.ByteSource} bytes The bytes to deserialize. | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionUser} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.deserializeBinary = function(bytes) { | ||
| var reader = new jspb.BinaryReader(bytes); | ||
| var msg = new proto.aserto.authorizer.v2.api.DecisionUser; | ||
| return proto.aserto.authorizer.v2.api.DecisionUser.deserializeBinaryFromReader(msg, reader); | ||
| }; | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format) from the | ||
| * given reader into the given message object. | ||
| * @param {!proto.aserto.authorizer.v2.api.DecisionUser} msg The message object to deserialize into. | ||
| * @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionUser} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.deserializeBinaryFromReader = function(msg, reader) { | ||
| while (reader.nextField()) { | ||
| if (reader.isEndGroup()) { | ||
| break; | ||
| } | ||
| var field = reader.getFieldNumber(); | ||
| switch (field) { | ||
| case 1: | ||
| var value = new aserto_authorizer_v2_api_identity_context_pb.IdentityContext; | ||
| reader.readMessage(value,aserto_authorizer_v2_api_identity_context_pb.IdentityContext.deserializeBinaryFromReader); | ||
| msg.setContext(value); | ||
| break; | ||
| case 2: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setId(value); | ||
| break; | ||
| case 3: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setEmail(value); | ||
| break; | ||
| default: | ||
| reader.skipField(); | ||
| break; | ||
| } | ||
| } | ||
| return msg; | ||
| }; | ||
| /** | ||
| * Serializes the message to binary data (in protobuf wire format). | ||
| * @return {!Uint8Array} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.prototype.serializeBinary = function() { | ||
| var writer = new jspb.BinaryWriter(); | ||
| proto.aserto.authorizer.v2.api.DecisionUser.serializeBinaryToWriter(this, writer); | ||
| return writer.getResultBuffer(); | ||
| }; | ||
| /** | ||
| * Serializes the given message to binary data (in protobuf wire | ||
| * format), writing to the given BinaryWriter. | ||
| * @param {!proto.aserto.authorizer.v2.api.DecisionUser} message | ||
| * @param {!jspb.BinaryWriter} writer | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.serializeBinaryToWriter = function(message, writer) { | ||
| var f = undefined; | ||
| f = message.getContext(); | ||
| if (f != null) { | ||
| writer.writeMessage( | ||
| 1, | ||
| f, | ||
| aserto_authorizer_v2_api_identity_context_pb.IdentityContext.serializeBinaryToWriter | ||
| ); | ||
| } | ||
| f = message.getId(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 2, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getEmail(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 3, | ||
| f | ||
| ); | ||
| } | ||
| }; | ||
| /** | ||
| * optional IdentityContext context = 1; | ||
| * @return {?proto.aserto.authorizer.v2.api.IdentityContext} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.prototype.getContext = function() { | ||
| return /** @type{?proto.aserto.authorizer.v2.api.IdentityContext} */ ( | ||
| jspb.Message.getWrapperField(this, aserto_authorizer_v2_api_identity_context_pb.IdentityContext, 1)); | ||
| }; | ||
| /** | ||
| * @param {?proto.aserto.authorizer.v2.api.IdentityContext|undefined} value | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionUser} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.prototype.setContext = function(value) { | ||
| return jspb.Message.setWrapperField(this, 1, value); | ||
| }; | ||
| /** | ||
| * Clears the message field making it undefined. | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionUser} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.prototype.clearContext = function() { | ||
| return this.setContext(undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.prototype.hasContext = function() { | ||
| return jspb.Message.getField(this, 1) != null; | ||
| }; | ||
| /** | ||
| * optional string id = 2; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.prototype.getId = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionUser} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.prototype.setId = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 2, value); | ||
| }; | ||
| /** | ||
| * optional string email = 3; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.prototype.getEmail = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionUser} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionUser.prototype.setEmail = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 3, value); | ||
| }; | ||
| if (jspb.Message.GENERATE_TO_OBJECT) { | ||
| /** | ||
| * Creates an object representation of this proto. | ||
| * Field names that are reserved in JavaScript and will be renamed to pb_name. | ||
| * Optional fields that are not set will be set to undefined. | ||
| * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. | ||
| * For the list of reserved names please see: | ||
| * net/proto2/compiler/js/internal/generator.cc#kKeyword. | ||
| * @param {boolean=} opt_includeInstance Deprecated. whether to include the | ||
| * JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @return {!Object} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.toObject = function(opt_includeInstance) { | ||
| return proto.aserto.authorizer.v2.api.DecisionPolicy.toObject(opt_includeInstance, this); | ||
| }; | ||
| /** | ||
| * Static version of the {@see toObject} method. | ||
| * @param {boolean|undefined} includeInstance Deprecated. Whether to include | ||
| * the JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @param {!proto.aserto.authorizer.v2.api.DecisionPolicy} msg The msg instance to transform. | ||
| * @return {!Object} | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.toObject = function(includeInstance, msg) { | ||
| var f, obj = { | ||
| context: (f = msg.getContext()) && aserto_authorizer_v2_api_policy_context_pb.PolicyContext.toObject(includeInstance, f), | ||
| registryService: jspb.Message.getFieldWithDefault(msg, 2, ""), | ||
| registryImage: jspb.Message.getFieldWithDefault(msg, 3, ""), | ||
| registryTag: jspb.Message.getFieldWithDefault(msg, 4, ""), | ||
| registryDigest: jspb.Message.getFieldWithDefault(msg, 5, ""), | ||
| policyInstance: (f = msg.getPolicyInstance()) && aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance.toObject(includeInstance, f) | ||
| }; | ||
| if (includeInstance) { | ||
| obj.$jspbMessageInstance = msg; | ||
| } | ||
| return obj; | ||
| }; | ||
| } | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format). | ||
| * @param {jspb.ByteSource} bytes The bytes to deserialize. | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionPolicy} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.deserializeBinary = function(bytes) { | ||
| var reader = new jspb.BinaryReader(bytes); | ||
| var msg = new proto.aserto.authorizer.v2.api.DecisionPolicy; | ||
| return proto.aserto.authorizer.v2.api.DecisionPolicy.deserializeBinaryFromReader(msg, reader); | ||
| }; | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format) from the | ||
| * given reader into the given message object. | ||
| * @param {!proto.aserto.authorizer.v2.api.DecisionPolicy} msg The message object to deserialize into. | ||
| * @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionPolicy} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.deserializeBinaryFromReader = function(msg, reader) { | ||
| while (reader.nextField()) { | ||
| if (reader.isEndGroup()) { | ||
| break; | ||
| } | ||
| var field = reader.getFieldNumber(); | ||
| switch (field) { | ||
| case 1: | ||
| var value = new aserto_authorizer_v2_api_policy_context_pb.PolicyContext; | ||
| reader.readMessage(value,aserto_authorizer_v2_api_policy_context_pb.PolicyContext.deserializeBinaryFromReader); | ||
| msg.setContext(value); | ||
| break; | ||
| case 2: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setRegistryService(value); | ||
| break; | ||
| case 3: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setRegistryImage(value); | ||
| break; | ||
| case 4: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setRegistryTag(value); | ||
| break; | ||
| case 5: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setRegistryDigest(value); | ||
| break; | ||
| case 6: | ||
| var value = new aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance; | ||
| reader.readMessage(value,aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance.deserializeBinaryFromReader); | ||
| msg.setPolicyInstance(value); | ||
| break; | ||
| default: | ||
| reader.skipField(); | ||
| break; | ||
| } | ||
| } | ||
| return msg; | ||
| }; | ||
| /** | ||
| * Serializes the message to binary data (in protobuf wire format). | ||
| * @return {!Uint8Array} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.serializeBinary = function() { | ||
| var writer = new jspb.BinaryWriter(); | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.serializeBinaryToWriter(this, writer); | ||
| return writer.getResultBuffer(); | ||
| }; | ||
| /** | ||
| * Serializes the given message to binary data (in protobuf wire | ||
| * format), writing to the given BinaryWriter. | ||
| * @param {!proto.aserto.authorizer.v2.api.DecisionPolicy} message | ||
| * @param {!jspb.BinaryWriter} writer | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.serializeBinaryToWriter = function(message, writer) { | ||
| var f = undefined; | ||
| f = message.getContext(); | ||
| if (f != null) { | ||
| writer.writeMessage( | ||
| 1, | ||
| f, | ||
| aserto_authorizer_v2_api_policy_context_pb.PolicyContext.serializeBinaryToWriter | ||
| ); | ||
| } | ||
| f = message.getRegistryService(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 2, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getRegistryImage(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 3, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getRegistryTag(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 4, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getRegistryDigest(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 5, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getPolicyInstance(); | ||
| if (f != null) { | ||
| writer.writeMessage( | ||
| 6, | ||
| f, | ||
| aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance.serializeBinaryToWriter | ||
| ); | ||
| } | ||
| }; | ||
| /** | ||
| * optional PolicyContext context = 1; | ||
| * @return {?proto.aserto.authorizer.v2.api.PolicyContext} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.getContext = function() { | ||
| return /** @type{?proto.aserto.authorizer.v2.api.PolicyContext} */ ( | ||
| jspb.Message.getWrapperField(this, aserto_authorizer_v2_api_policy_context_pb.PolicyContext, 1)); | ||
| }; | ||
| /** | ||
| * @param {?proto.aserto.authorizer.v2.api.PolicyContext|undefined} value | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionPolicy} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.setContext = function(value) { | ||
| return jspb.Message.setWrapperField(this, 1, value); | ||
| }; | ||
| /** | ||
| * Clears the message field making it undefined. | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionPolicy} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.clearContext = function() { | ||
| return this.setContext(undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.hasContext = function() { | ||
| return jspb.Message.getField(this, 1) != null; | ||
| }; | ||
| /** | ||
| * optional string registry_service = 2; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.getRegistryService = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionPolicy} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.setRegistryService = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 2, value); | ||
| }; | ||
| /** | ||
| * optional string registry_image = 3; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.getRegistryImage = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionPolicy} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.setRegistryImage = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 3, value); | ||
| }; | ||
| /** | ||
| * optional string registry_tag = 4; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.getRegistryTag = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionPolicy} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.setRegistryTag = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 4, value); | ||
| }; | ||
| /** | ||
| * optional string registry_digest = 5; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.getRegistryDigest = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionPolicy} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.setRegistryDigest = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 5, value); | ||
| }; | ||
| /** | ||
| * optional PolicyInstance policy_instance = 6; | ||
| * @return {?proto.aserto.authorizer.v2.api.PolicyInstance} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.getPolicyInstance = function() { | ||
| return /** @type{?proto.aserto.authorizer.v2.api.PolicyInstance} */ ( | ||
| jspb.Message.getWrapperField(this, aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance, 6)); | ||
| }; | ||
| /** | ||
| * @param {?proto.aserto.authorizer.v2.api.PolicyInstance|undefined} value | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionPolicy} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.setPolicyInstance = function(value) { | ||
| return jspb.Message.setWrapperField(this, 6, value); | ||
| }; | ||
| /** | ||
| * Clears the message field making it undefined. | ||
| * @return {!proto.aserto.authorizer.v2.api.DecisionPolicy} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.clearPolicyInstance = function() { | ||
| return this.setPolicyInstance(undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.DecisionPolicy.prototype.hasPolicyInstance = function() { | ||
| return jspb.Message.getField(this, 6) != null; | ||
| }; | ||
| goog.object.extend(exports, proto.aserto.authorizer.v2.api); |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // package: aserto.authorizer.v2.api | ||
| // file: aserto/authorizer/v2/api/identity_context.proto | ||
| import * as jspb from "google-protobuf"; | ||
| export class IdentityContext extends jspb.Message { | ||
| getIdentity(): string; | ||
| setIdentity(value: string): void; | ||
| getType(): IdentityTypeMap[keyof IdentityTypeMap]; | ||
| setType(value: IdentityTypeMap[keyof IdentityTypeMap]): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): IdentityContext.AsObject; | ||
| static toObject(includeInstance: boolean, msg: IdentityContext): IdentityContext.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: IdentityContext, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): IdentityContext; | ||
| static deserializeBinaryFromReader(message: IdentityContext, reader: jspb.BinaryReader): IdentityContext; | ||
| } | ||
| export namespace IdentityContext { | ||
| export type AsObject = { | ||
| identity: string, | ||
| type: IdentityTypeMap[keyof IdentityTypeMap], | ||
| } | ||
| } | ||
| export interface IdentityTypeMap { | ||
| IDENTITY_TYPE_UNKNOWN: 0; | ||
| IDENTITY_TYPE_NONE: 1; | ||
| IDENTITY_TYPE_SUB: 2; | ||
| IDENTITY_TYPE_JWT: 3; | ||
| IDENTITY_TYPE_MANUAL: 4; | ||
| } | ||
| export const IdentityType: IdentityTypeMap; | ||
| // source: aserto/authorizer/v2/api/identity_context.proto | ||
| /** | ||
| * @fileoverview | ||
| * @enhanceable | ||
| * @suppress {missingRequire} reports error on implicit type usages. | ||
| * @suppress {messageConventions} JS Compiler reports an error if a variable or | ||
| * field starts with 'MSG_' and isn't a translatable message. | ||
| * @public | ||
| */ | ||
| // GENERATED CODE -- DO NOT EDIT! | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| var jspb = require('google-protobuf'); | ||
| var goog = jspb; | ||
| var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); | ||
| goog.exportSymbol('proto.aserto.authorizer.v2.api.IdentityContext', null, global); | ||
| goog.exportSymbol('proto.aserto.authorizer.v2.api.IdentityType', null, global); | ||
| /** | ||
| * Generated by JsPbCodeGenerator. | ||
| * @param {Array=} opt_data Optional initial data array, typically from a | ||
| * server response, or constructed directly in Javascript. The array is used | ||
| * in place and becomes part of the constructed object. It is not cloned. | ||
| * If no data is provided, the constructed object will be empty, but still | ||
| * valid. | ||
| * @extends {jspb.Message} | ||
| * @constructor | ||
| */ | ||
| proto.aserto.authorizer.v2.api.IdentityContext = function(opt_data) { | ||
| jspb.Message.initialize(this, opt_data, 0, -1, null, null); | ||
| }; | ||
| goog.inherits(proto.aserto.authorizer.v2.api.IdentityContext, jspb.Message); | ||
| if (goog.DEBUG && !COMPILED) { | ||
| /** | ||
| * @public | ||
| * @override | ||
| */ | ||
| proto.aserto.authorizer.v2.api.IdentityContext.displayName = 'proto.aserto.authorizer.v2.api.IdentityContext'; | ||
| } | ||
| if (jspb.Message.GENERATE_TO_OBJECT) { | ||
| /** | ||
| * Creates an object representation of this proto. | ||
| * Field names that are reserved in JavaScript and will be renamed to pb_name. | ||
| * Optional fields that are not set will be set to undefined. | ||
| * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. | ||
| * For the list of reserved names please see: | ||
| * net/proto2/compiler/js/internal/generator.cc#kKeyword. | ||
| * @param {boolean=} opt_includeInstance Deprecated. whether to include the | ||
| * JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @return {!Object} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.IdentityContext.prototype.toObject = function(opt_includeInstance) { | ||
| return proto.aserto.authorizer.v2.api.IdentityContext.toObject(opt_includeInstance, this); | ||
| }; | ||
| /** | ||
| * Static version of the {@see toObject} method. | ||
| * @param {boolean|undefined} includeInstance Deprecated. Whether to include | ||
| * the JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @param {!proto.aserto.authorizer.v2.api.IdentityContext} msg The msg instance to transform. | ||
| * @return {!Object} | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.IdentityContext.toObject = function(includeInstance, msg) { | ||
| var f, obj = { | ||
| identity: jspb.Message.getFieldWithDefault(msg, 1, ""), | ||
| type: jspb.Message.getFieldWithDefault(msg, 2, 0) | ||
| }; | ||
| if (includeInstance) { | ||
| obj.$jspbMessageInstance = msg; | ||
| } | ||
| return obj; | ||
| }; | ||
| } | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format). | ||
| * @param {jspb.ByteSource} bytes The bytes to deserialize. | ||
| * @return {!proto.aserto.authorizer.v2.api.IdentityContext} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.IdentityContext.deserializeBinary = function(bytes) { | ||
| var reader = new jspb.BinaryReader(bytes); | ||
| var msg = new proto.aserto.authorizer.v2.api.IdentityContext; | ||
| return proto.aserto.authorizer.v2.api.IdentityContext.deserializeBinaryFromReader(msg, reader); | ||
| }; | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format) from the | ||
| * given reader into the given message object. | ||
| * @param {!proto.aserto.authorizer.v2.api.IdentityContext} msg The message object to deserialize into. | ||
| * @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
| * @return {!proto.aserto.authorizer.v2.api.IdentityContext} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.IdentityContext.deserializeBinaryFromReader = function(msg, reader) { | ||
| while (reader.nextField()) { | ||
| if (reader.isEndGroup()) { | ||
| break; | ||
| } | ||
| var field = reader.getFieldNumber(); | ||
| switch (field) { | ||
| case 1: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setIdentity(value); | ||
| break; | ||
| case 2: | ||
| var value = /** @type {!proto.aserto.authorizer.v2.api.IdentityType} */ (reader.readEnum()); | ||
| msg.setType(value); | ||
| break; | ||
| default: | ||
| reader.skipField(); | ||
| break; | ||
| } | ||
| } | ||
| return msg; | ||
| }; | ||
| /** | ||
| * Serializes the message to binary data (in protobuf wire format). | ||
| * @return {!Uint8Array} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.IdentityContext.prototype.serializeBinary = function() { | ||
| var writer = new jspb.BinaryWriter(); | ||
| proto.aserto.authorizer.v2.api.IdentityContext.serializeBinaryToWriter(this, writer); | ||
| return writer.getResultBuffer(); | ||
| }; | ||
| /** | ||
| * Serializes the given message to binary data (in protobuf wire | ||
| * format), writing to the given BinaryWriter. | ||
| * @param {!proto.aserto.authorizer.v2.api.IdentityContext} message | ||
| * @param {!jspb.BinaryWriter} writer | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.IdentityContext.serializeBinaryToWriter = function(message, writer) { | ||
| var f = undefined; | ||
| f = message.getIdentity(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 1, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getType(); | ||
| if (f !== 0.0) { | ||
| writer.writeEnum( | ||
| 2, | ||
| f | ||
| ); | ||
| } | ||
| }; | ||
| /** | ||
| * optional string identity = 1; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.IdentityContext.prototype.getIdentity = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.IdentityContext} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.IdentityContext.prototype.setIdentity = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 1, value); | ||
| }; | ||
| /** | ||
| * optional IdentityType type = 2; | ||
| * @return {!proto.aserto.authorizer.v2.api.IdentityType} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.IdentityContext.prototype.getType = function() { | ||
| return /** @type {!proto.aserto.authorizer.v2.api.IdentityType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); | ||
| }; | ||
| /** | ||
| * @param {!proto.aserto.authorizer.v2.api.IdentityType} value | ||
| * @return {!proto.aserto.authorizer.v2.api.IdentityContext} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.IdentityContext.prototype.setType = function(value) { | ||
| return jspb.Message.setProto3EnumField(this, 2, value); | ||
| }; | ||
| /** | ||
| * @enum {number} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.IdentityType = { | ||
| IDENTITY_TYPE_UNKNOWN: 0, | ||
| IDENTITY_TYPE_NONE: 1, | ||
| IDENTITY_TYPE_SUB: 2, | ||
| IDENTITY_TYPE_JWT: 3, | ||
| IDENTITY_TYPE_MANUAL: 4 | ||
| }; | ||
| goog.object.extend(exports, proto.aserto.authorizer.v2.api); |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // package: aserto.authorizer.v2.api | ||
| // file: aserto/authorizer/v2/api/module.proto | ||
| import * as jspb from "google-protobuf"; | ||
| import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; | ||
| export class Module extends jspb.Message { | ||
| hasId(): boolean; | ||
| clearId(): void; | ||
| getId(): string; | ||
| setId(value: string): void; | ||
| hasRaw(): boolean; | ||
| clearRaw(): void; | ||
| getRaw(): string; | ||
| setRaw(value: string): void; | ||
| hasPackagePath(): boolean; | ||
| clearPackagePath(): void; | ||
| getPackagePath(): string; | ||
| setPackagePath(value: string): void; | ||
| hasAst(): boolean; | ||
| clearAst(): void; | ||
| getAst(): google_protobuf_struct_pb.Value | undefined; | ||
| setAst(value?: google_protobuf_struct_pb.Value): void; | ||
| hasPackageRoot(): boolean; | ||
| clearPackageRoot(): void; | ||
| getPackageRoot(): string; | ||
| setPackageRoot(value: string): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Module.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Module): Module.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Module, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Module; | ||
| static deserializeBinaryFromReader(message: Module, reader: jspb.BinaryReader): Module; | ||
| } | ||
| export namespace Module { | ||
| export type AsObject = { | ||
| id: string, | ||
| raw: string, | ||
| packagePath: string, | ||
| ast?: google_protobuf_struct_pb.Value.AsObject, | ||
| packageRoot: string, | ||
| } | ||
| } | ||
| // source: aserto/authorizer/v2/api/module.proto | ||
| /** | ||
| * @fileoverview | ||
| * @enhanceable | ||
| * @suppress {missingRequire} reports error on implicit type usages. | ||
| * @suppress {messageConventions} JS Compiler reports an error if a variable or | ||
| * field starts with 'MSG_' and isn't a translatable message. | ||
| * @public | ||
| */ | ||
| // GENERATED CODE -- DO NOT EDIT! | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| var jspb = require('google-protobuf'); | ||
| var goog = jspb; | ||
| var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); | ||
| var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); | ||
| goog.object.extend(proto, google_protobuf_struct_pb); | ||
| goog.exportSymbol('proto.aserto.authorizer.v2.api.Module', null, global); | ||
| /** | ||
| * Generated by JsPbCodeGenerator. | ||
| * @param {Array=} opt_data Optional initial data array, typically from a | ||
| * server response, or constructed directly in Javascript. The array is used | ||
| * in place and becomes part of the constructed object. It is not cloned. | ||
| * If no data is provided, the constructed object will be empty, but still | ||
| * valid. | ||
| * @extends {jspb.Message} | ||
| * @constructor | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module = function(opt_data) { | ||
| jspb.Message.initialize(this, opt_data, 0, -1, null, null); | ||
| }; | ||
| goog.inherits(proto.aserto.authorizer.v2.api.Module, jspb.Message); | ||
| if (goog.DEBUG && !COMPILED) { | ||
| /** | ||
| * @public | ||
| * @override | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.displayName = 'proto.aserto.authorizer.v2.api.Module'; | ||
| } | ||
| if (jspb.Message.GENERATE_TO_OBJECT) { | ||
| /** | ||
| * Creates an object representation of this proto. | ||
| * Field names that are reserved in JavaScript and will be renamed to pb_name. | ||
| * Optional fields that are not set will be set to undefined. | ||
| * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. | ||
| * For the list of reserved names please see: | ||
| * net/proto2/compiler/js/internal/generator.cc#kKeyword. | ||
| * @param {boolean=} opt_includeInstance Deprecated. whether to include the | ||
| * JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @return {!Object} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.toObject = function(opt_includeInstance) { | ||
| return proto.aserto.authorizer.v2.api.Module.toObject(opt_includeInstance, this); | ||
| }; | ||
| /** | ||
| * Static version of the {@see toObject} method. | ||
| * @param {boolean|undefined} includeInstance Deprecated. Whether to include | ||
| * the JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @param {!proto.aserto.authorizer.v2.api.Module} msg The msg instance to transform. | ||
| * @return {!Object} | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.toObject = function(includeInstance, msg) { | ||
| var f, obj = { | ||
| id: jspb.Message.getFieldWithDefault(msg, 1, ""), | ||
| raw: jspb.Message.getFieldWithDefault(msg, 2, ""), | ||
| packagePath: jspb.Message.getFieldWithDefault(msg, 3, ""), | ||
| ast: (f = msg.getAst()) && google_protobuf_struct_pb.Value.toObject(includeInstance, f), | ||
| packageRoot: jspb.Message.getFieldWithDefault(msg, 5, "") | ||
| }; | ||
| if (includeInstance) { | ||
| obj.$jspbMessageInstance = msg; | ||
| } | ||
| return obj; | ||
| }; | ||
| } | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format). | ||
| * @param {jspb.ByteSource} bytes The bytes to deserialize. | ||
| * @return {!proto.aserto.authorizer.v2.api.Module} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.deserializeBinary = function(bytes) { | ||
| var reader = new jspb.BinaryReader(bytes); | ||
| var msg = new proto.aserto.authorizer.v2.api.Module; | ||
| return proto.aserto.authorizer.v2.api.Module.deserializeBinaryFromReader(msg, reader); | ||
| }; | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format) from the | ||
| * given reader into the given message object. | ||
| * @param {!proto.aserto.authorizer.v2.api.Module} msg The message object to deserialize into. | ||
| * @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
| * @return {!proto.aserto.authorizer.v2.api.Module} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.deserializeBinaryFromReader = function(msg, reader) { | ||
| while (reader.nextField()) { | ||
| if (reader.isEndGroup()) { | ||
| break; | ||
| } | ||
| var field = reader.getFieldNumber(); | ||
| switch (field) { | ||
| case 1: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setId(value); | ||
| break; | ||
| case 2: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setRaw(value); | ||
| break; | ||
| case 3: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setPackagePath(value); | ||
| break; | ||
| case 4: | ||
| var value = new google_protobuf_struct_pb.Value; | ||
| reader.readMessage(value,google_protobuf_struct_pb.Value.deserializeBinaryFromReader); | ||
| msg.setAst(value); | ||
| break; | ||
| case 5: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setPackageRoot(value); | ||
| break; | ||
| default: | ||
| reader.skipField(); | ||
| break; | ||
| } | ||
| } | ||
| return msg; | ||
| }; | ||
| /** | ||
| * Serializes the message to binary data (in protobuf wire format). | ||
| * @return {!Uint8Array} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.serializeBinary = function() { | ||
| var writer = new jspb.BinaryWriter(); | ||
| proto.aserto.authorizer.v2.api.Module.serializeBinaryToWriter(this, writer); | ||
| return writer.getResultBuffer(); | ||
| }; | ||
| /** | ||
| * Serializes the given message to binary data (in protobuf wire | ||
| * format), writing to the given BinaryWriter. | ||
| * @param {!proto.aserto.authorizer.v2.api.Module} message | ||
| * @param {!jspb.BinaryWriter} writer | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.serializeBinaryToWriter = function(message, writer) { | ||
| var f = undefined; | ||
| f = /** @type {string} */ (jspb.Message.getField(message, 1)); | ||
| if (f != null) { | ||
| writer.writeString( | ||
| 1, | ||
| f | ||
| ); | ||
| } | ||
| f = /** @type {string} */ (jspb.Message.getField(message, 2)); | ||
| if (f != null) { | ||
| writer.writeString( | ||
| 2, | ||
| f | ||
| ); | ||
| } | ||
| f = /** @type {string} */ (jspb.Message.getField(message, 3)); | ||
| if (f != null) { | ||
| writer.writeString( | ||
| 3, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getAst(); | ||
| if (f != null) { | ||
| writer.writeMessage( | ||
| 4, | ||
| f, | ||
| google_protobuf_struct_pb.Value.serializeBinaryToWriter | ||
| ); | ||
| } | ||
| f = /** @type {string} */ (jspb.Message.getField(message, 5)); | ||
| if (f != null) { | ||
| writer.writeString( | ||
| 5, | ||
| f | ||
| ); | ||
| } | ||
| }; | ||
| /** | ||
| * optional string id = 1; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.getId = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.Module} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.setId = function(value) { | ||
| return jspb.Message.setField(this, 1, value); | ||
| }; | ||
| /** | ||
| * Clears the field making it undefined. | ||
| * @return {!proto.aserto.authorizer.v2.api.Module} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.clearId = function() { | ||
| return jspb.Message.setField(this, 1, undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.hasId = function() { | ||
| return jspb.Message.getField(this, 1) != null; | ||
| }; | ||
| /** | ||
| * optional string raw = 2; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.getRaw = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.Module} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.setRaw = function(value) { | ||
| return jspb.Message.setField(this, 2, value); | ||
| }; | ||
| /** | ||
| * Clears the field making it undefined. | ||
| * @return {!proto.aserto.authorizer.v2.api.Module} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.clearRaw = function() { | ||
| return jspb.Message.setField(this, 2, undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.hasRaw = function() { | ||
| return jspb.Message.getField(this, 2) != null; | ||
| }; | ||
| /** | ||
| * optional string package_path = 3; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.getPackagePath = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.Module} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.setPackagePath = function(value) { | ||
| return jspb.Message.setField(this, 3, value); | ||
| }; | ||
| /** | ||
| * Clears the field making it undefined. | ||
| * @return {!proto.aserto.authorizer.v2.api.Module} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.clearPackagePath = function() { | ||
| return jspb.Message.setField(this, 3, undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.hasPackagePath = function() { | ||
| return jspb.Message.getField(this, 3) != null; | ||
| }; | ||
| /** | ||
| * optional google.protobuf.Value ast = 4; | ||
| * @return {?proto.google.protobuf.Value} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.getAst = function() { | ||
| return /** @type{?proto.google.protobuf.Value} */ ( | ||
| jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Value, 4)); | ||
| }; | ||
| /** | ||
| * @param {?proto.google.protobuf.Value|undefined} value | ||
| * @return {!proto.aserto.authorizer.v2.api.Module} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.setAst = function(value) { | ||
| return jspb.Message.setWrapperField(this, 4, value); | ||
| }; | ||
| /** | ||
| * Clears the message field making it undefined. | ||
| * @return {!proto.aserto.authorizer.v2.api.Module} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.clearAst = function() { | ||
| return this.setAst(undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.hasAst = function() { | ||
| return jspb.Message.getField(this, 4) != null; | ||
| }; | ||
| /** | ||
| * optional string package_root = 5; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.getPackageRoot = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.Module} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.setPackageRoot = function(value) { | ||
| return jspb.Message.setField(this, 5, value); | ||
| }; | ||
| /** | ||
| * Clears the field making it undefined. | ||
| * @return {!proto.aserto.authorizer.v2.api.Module} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.clearPackageRoot = function() { | ||
| return jspb.Message.setField(this, 5, undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.Module.prototype.hasPackageRoot = function() { | ||
| return jspb.Message.getField(this, 5) != null; | ||
| }; | ||
| goog.object.extend(exports, proto.aserto.authorizer.v2.api); |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // package: aserto.authorizer.v2.api | ||
| // file: aserto/authorizer/v2/api/policy_context.proto | ||
| import * as jspb from "google-protobuf"; | ||
| export class PolicyContext extends jspb.Message { | ||
| getPath(): string; | ||
| setPath(value: string): void; | ||
| clearDecisionsList(): void; | ||
| getDecisionsList(): Array<string>; | ||
| setDecisionsList(value: Array<string>): void; | ||
| addDecisions(value: string, index?: number): string; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): PolicyContext.AsObject; | ||
| static toObject(includeInstance: boolean, msg: PolicyContext): PolicyContext.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: PolicyContext, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): PolicyContext; | ||
| static deserializeBinaryFromReader(message: PolicyContext, reader: jspb.BinaryReader): PolicyContext; | ||
| } | ||
| export namespace PolicyContext { | ||
| export type AsObject = { | ||
| path: string, | ||
| decisionsList: Array<string>, | ||
| } | ||
| } | ||
| // source: aserto/authorizer/v2/api/policy_context.proto | ||
| /** | ||
| * @fileoverview | ||
| * @enhanceable | ||
| * @suppress {missingRequire} reports error on implicit type usages. | ||
| * @suppress {messageConventions} JS Compiler reports an error if a variable or | ||
| * field starts with 'MSG_' and isn't a translatable message. | ||
| * @public | ||
| */ | ||
| // GENERATED CODE -- DO NOT EDIT! | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| var jspb = require('google-protobuf'); | ||
| var goog = jspb; | ||
| var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); | ||
| goog.exportSymbol('proto.aserto.authorizer.v2.api.PolicyContext', null, global); | ||
| /** | ||
| * Generated by JsPbCodeGenerator. | ||
| * @param {Array=} opt_data Optional initial data array, typically from a | ||
| * server response, or constructed directly in Javascript. The array is used | ||
| * in place and becomes part of the constructed object. It is not cloned. | ||
| * If no data is provided, the constructed object will be empty, but still | ||
| * valid. | ||
| * @extends {jspb.Message} | ||
| * @constructor | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext = function(opt_data) { | ||
| jspb.Message.initialize(this, opt_data, 0, -1, proto.aserto.authorizer.v2.api.PolicyContext.repeatedFields_, null); | ||
| }; | ||
| goog.inherits(proto.aserto.authorizer.v2.api.PolicyContext, jspb.Message); | ||
| if (goog.DEBUG && !COMPILED) { | ||
| /** | ||
| * @public | ||
| * @override | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.displayName = 'proto.aserto.authorizer.v2.api.PolicyContext'; | ||
| } | ||
| /** | ||
| * List of repeated fields within this message type. | ||
| * @private {!Array<number>} | ||
| * @const | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.repeatedFields_ = [2]; | ||
| if (jspb.Message.GENERATE_TO_OBJECT) { | ||
| /** | ||
| * Creates an object representation of this proto. | ||
| * Field names that are reserved in JavaScript and will be renamed to pb_name. | ||
| * Optional fields that are not set will be set to undefined. | ||
| * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. | ||
| * For the list of reserved names please see: | ||
| * net/proto2/compiler/js/internal/generator.cc#kKeyword. | ||
| * @param {boolean=} opt_includeInstance Deprecated. whether to include the | ||
| * JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @return {!Object} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.prototype.toObject = function(opt_includeInstance) { | ||
| return proto.aserto.authorizer.v2.api.PolicyContext.toObject(opt_includeInstance, this); | ||
| }; | ||
| /** | ||
| * Static version of the {@see toObject} method. | ||
| * @param {boolean|undefined} includeInstance Deprecated. Whether to include | ||
| * the JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @param {!proto.aserto.authorizer.v2.api.PolicyContext} msg The msg instance to transform. | ||
| * @return {!Object} | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.toObject = function(includeInstance, msg) { | ||
| var f, obj = { | ||
| path: jspb.Message.getFieldWithDefault(msg, 1, ""), | ||
| decisionsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f | ||
| }; | ||
| if (includeInstance) { | ||
| obj.$jspbMessageInstance = msg; | ||
| } | ||
| return obj; | ||
| }; | ||
| } | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format). | ||
| * @param {jspb.ByteSource} bytes The bytes to deserialize. | ||
| * @return {!proto.aserto.authorizer.v2.api.PolicyContext} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.deserializeBinary = function(bytes) { | ||
| var reader = new jspb.BinaryReader(bytes); | ||
| var msg = new proto.aserto.authorizer.v2.api.PolicyContext; | ||
| return proto.aserto.authorizer.v2.api.PolicyContext.deserializeBinaryFromReader(msg, reader); | ||
| }; | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format) from the | ||
| * given reader into the given message object. | ||
| * @param {!proto.aserto.authorizer.v2.api.PolicyContext} msg The message object to deserialize into. | ||
| * @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
| * @return {!proto.aserto.authorizer.v2.api.PolicyContext} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.deserializeBinaryFromReader = function(msg, reader) { | ||
| while (reader.nextField()) { | ||
| if (reader.isEndGroup()) { | ||
| break; | ||
| } | ||
| var field = reader.getFieldNumber(); | ||
| switch (field) { | ||
| case 1: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setPath(value); | ||
| break; | ||
| case 2: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.addDecisions(value); | ||
| break; | ||
| default: | ||
| reader.skipField(); | ||
| break; | ||
| } | ||
| } | ||
| return msg; | ||
| }; | ||
| /** | ||
| * Serializes the message to binary data (in protobuf wire format). | ||
| * @return {!Uint8Array} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.prototype.serializeBinary = function() { | ||
| var writer = new jspb.BinaryWriter(); | ||
| proto.aserto.authorizer.v2.api.PolicyContext.serializeBinaryToWriter(this, writer); | ||
| return writer.getResultBuffer(); | ||
| }; | ||
| /** | ||
| * Serializes the given message to binary data (in protobuf wire | ||
| * format), writing to the given BinaryWriter. | ||
| * @param {!proto.aserto.authorizer.v2.api.PolicyContext} message | ||
| * @param {!jspb.BinaryWriter} writer | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.serializeBinaryToWriter = function(message, writer) { | ||
| var f = undefined; | ||
| f = message.getPath(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 1, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getDecisionsList(); | ||
| if (f.length > 0) { | ||
| writer.writeRepeatedString( | ||
| 2, | ||
| f | ||
| ); | ||
| } | ||
| }; | ||
| /** | ||
| * optional string path = 1; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.prototype.getPath = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.PolicyContext} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.prototype.setPath = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 1, value); | ||
| }; | ||
| /** | ||
| * repeated string decisions = 2; | ||
| * @return {!Array<string>} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.prototype.getDecisionsList = function() { | ||
| return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2)); | ||
| }; | ||
| /** | ||
| * @param {!Array<string>} value | ||
| * @return {!proto.aserto.authorizer.v2.api.PolicyContext} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.prototype.setDecisionsList = function(value) { | ||
| return jspb.Message.setField(this, 2, value || []); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @param {number=} opt_index | ||
| * @return {!proto.aserto.authorizer.v2.api.PolicyContext} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.prototype.addDecisions = function(value, opt_index) { | ||
| return jspb.Message.addToRepeatedField(this, 2, value, opt_index); | ||
| }; | ||
| /** | ||
| * Clears the list making it empty but non-null. | ||
| * @return {!proto.aserto.authorizer.v2.api.PolicyContext} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyContext.prototype.clearDecisionsList = function() { | ||
| return this.setDecisionsList([]); | ||
| }; | ||
| goog.object.extend(exports, proto.aserto.authorizer.v2.api); |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // package: aserto.authorizer.v2.api | ||
| // file: aserto/authorizer/v2/api/policy_instance.proto | ||
| import * as jspb from "google-protobuf"; | ||
| export class PolicyInstance extends jspb.Message { | ||
| getName(): string; | ||
| setName(value: string): void; | ||
| getInstanceLabel(): string; | ||
| setInstanceLabel(value: string): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): PolicyInstance.AsObject; | ||
| static toObject(includeInstance: boolean, msg: PolicyInstance): PolicyInstance.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: PolicyInstance, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): PolicyInstance; | ||
| static deserializeBinaryFromReader(message: PolicyInstance, reader: jspb.BinaryReader): PolicyInstance; | ||
| } | ||
| export namespace PolicyInstance { | ||
| export type AsObject = { | ||
| name: string, | ||
| instanceLabel: string, | ||
| } | ||
| } | ||
| // source: aserto/authorizer/v2/api/policy_instance.proto | ||
| /** | ||
| * @fileoverview | ||
| * @enhanceable | ||
| * @suppress {missingRequire} reports error on implicit type usages. | ||
| * @suppress {messageConventions} JS Compiler reports an error if a variable or | ||
| * field starts with 'MSG_' and isn't a translatable message. | ||
| * @public | ||
| */ | ||
| // GENERATED CODE -- DO NOT EDIT! | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| var jspb = require('google-protobuf'); | ||
| var goog = jspb; | ||
| var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); | ||
| goog.exportSymbol('proto.aserto.authorizer.v2.api.PolicyInstance', null, global); | ||
| /** | ||
| * Generated by JsPbCodeGenerator. | ||
| * @param {Array=} opt_data Optional initial data array, typically from a | ||
| * server response, or constructed directly in Javascript. The array is used | ||
| * in place and becomes part of the constructed object. It is not cloned. | ||
| * If no data is provided, the constructed object will be empty, but still | ||
| * valid. | ||
| * @extends {jspb.Message} | ||
| * @constructor | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyInstance = function(opt_data) { | ||
| jspb.Message.initialize(this, opt_data, 0, -1, null, null); | ||
| }; | ||
| goog.inherits(proto.aserto.authorizer.v2.api.PolicyInstance, jspb.Message); | ||
| if (goog.DEBUG && !COMPILED) { | ||
| /** | ||
| * @public | ||
| * @override | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyInstance.displayName = 'proto.aserto.authorizer.v2.api.PolicyInstance'; | ||
| } | ||
| if (jspb.Message.GENERATE_TO_OBJECT) { | ||
| /** | ||
| * Creates an object representation of this proto. | ||
| * Field names that are reserved in JavaScript and will be renamed to pb_name. | ||
| * Optional fields that are not set will be set to undefined. | ||
| * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. | ||
| * For the list of reserved names please see: | ||
| * net/proto2/compiler/js/internal/generator.cc#kKeyword. | ||
| * @param {boolean=} opt_includeInstance Deprecated. whether to include the | ||
| * JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @return {!Object} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyInstance.prototype.toObject = function(opt_includeInstance) { | ||
| return proto.aserto.authorizer.v2.api.PolicyInstance.toObject(opt_includeInstance, this); | ||
| }; | ||
| /** | ||
| * Static version of the {@see toObject} method. | ||
| * @param {boolean|undefined} includeInstance Deprecated. Whether to include | ||
| * the JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @param {!proto.aserto.authorizer.v2.api.PolicyInstance} msg The msg instance to transform. | ||
| * @return {!Object} | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyInstance.toObject = function(includeInstance, msg) { | ||
| var f, obj = { | ||
| name: jspb.Message.getFieldWithDefault(msg, 1, ""), | ||
| instanceLabel: jspb.Message.getFieldWithDefault(msg, 2, "") | ||
| }; | ||
| if (includeInstance) { | ||
| obj.$jspbMessageInstance = msg; | ||
| } | ||
| return obj; | ||
| }; | ||
| } | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format). | ||
| * @param {jspb.ByteSource} bytes The bytes to deserialize. | ||
| * @return {!proto.aserto.authorizer.v2.api.PolicyInstance} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyInstance.deserializeBinary = function(bytes) { | ||
| var reader = new jspb.BinaryReader(bytes); | ||
| var msg = new proto.aserto.authorizer.v2.api.PolicyInstance; | ||
| return proto.aserto.authorizer.v2.api.PolicyInstance.deserializeBinaryFromReader(msg, reader); | ||
| }; | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format) from the | ||
| * given reader into the given message object. | ||
| * @param {!proto.aserto.authorizer.v2.api.PolicyInstance} msg The message object to deserialize into. | ||
| * @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
| * @return {!proto.aserto.authorizer.v2.api.PolicyInstance} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyInstance.deserializeBinaryFromReader = function(msg, reader) { | ||
| while (reader.nextField()) { | ||
| if (reader.isEndGroup()) { | ||
| break; | ||
| } | ||
| var field = reader.getFieldNumber(); | ||
| switch (field) { | ||
| case 1: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setName(value); | ||
| break; | ||
| case 2: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setInstanceLabel(value); | ||
| break; | ||
| default: | ||
| reader.skipField(); | ||
| break; | ||
| } | ||
| } | ||
| return msg; | ||
| }; | ||
| /** | ||
| * Serializes the message to binary data (in protobuf wire format). | ||
| * @return {!Uint8Array} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyInstance.prototype.serializeBinary = function() { | ||
| var writer = new jspb.BinaryWriter(); | ||
| proto.aserto.authorizer.v2.api.PolicyInstance.serializeBinaryToWriter(this, writer); | ||
| return writer.getResultBuffer(); | ||
| }; | ||
| /** | ||
| * Serializes the given message to binary data (in protobuf wire | ||
| * format), writing to the given BinaryWriter. | ||
| * @param {!proto.aserto.authorizer.v2.api.PolicyInstance} message | ||
| * @param {!jspb.BinaryWriter} writer | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyInstance.serializeBinaryToWriter = function(message, writer) { | ||
| var f = undefined; | ||
| f = message.getName(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 1, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getInstanceLabel(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 2, | ||
| f | ||
| ); | ||
| } | ||
| }; | ||
| /** | ||
| * optional string name = 1; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyInstance.prototype.getName = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.PolicyInstance} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyInstance.prototype.setName = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 1, value); | ||
| }; | ||
| /** | ||
| * optional string instance_label = 2; | ||
| * @return {string} | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyInstance.prototype.getInstanceLabel = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.aserto.authorizer.v2.api.PolicyInstance} returns this | ||
| */ | ||
| proto.aserto.authorizer.v2.api.PolicyInstance.prototype.setInstanceLabel = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 2, value); | ||
| }; | ||
| goog.object.extend(exports, proto.aserto.authorizer.v2.api); |
| // GENERATED CODE -- DO NOT EDIT! | ||
| // package: aserto.authorizer.v2 | ||
| // file: aserto/authorizer/v2/authorizer.proto | ||
| import * as aserto_authorizer_v2_authorizer_pb from "../../../aserto/authorizer/v2/authorizer_pb"; | ||
| import * as grpc from "grpc"; | ||
| interface IAuthorizerService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> { | ||
| decisionTree: grpc.MethodDefinition<aserto_authorizer_v2_authorizer_pb.DecisionTreeRequest, aserto_authorizer_v2_authorizer_pb.DecisionTreeResponse>; | ||
| is: grpc.MethodDefinition<aserto_authorizer_v2_authorizer_pb.IsRequest, aserto_authorizer_v2_authorizer_pb.IsResponse>; | ||
| query: grpc.MethodDefinition<aserto_authorizer_v2_authorizer_pb.QueryRequest, aserto_authorizer_v2_authorizer_pb.QueryResponse>; | ||
| compile: grpc.MethodDefinition<aserto_authorizer_v2_authorizer_pb.CompileRequest, aserto_authorizer_v2_authorizer_pb.CompileResponse>; | ||
| listPolicies: grpc.MethodDefinition<aserto_authorizer_v2_authorizer_pb.ListPoliciesRequest, aserto_authorizer_v2_authorizer_pb.ListPoliciesResponse>; | ||
| getPolicy: grpc.MethodDefinition<aserto_authorizer_v2_authorizer_pb.GetPolicyRequest, aserto_authorizer_v2_authorizer_pb.GetPolicyResponse>; | ||
| info: grpc.MethodDefinition<aserto_authorizer_v2_authorizer_pb.InfoRequest, aserto_authorizer_v2_authorizer_pb.InfoResponse>; | ||
| } | ||
| export const AuthorizerService: IAuthorizerService; | ||
| export interface IAuthorizerServer extends grpc.UntypedServiceImplementation { | ||
| decisionTree: grpc.handleUnaryCall<aserto_authorizer_v2_authorizer_pb.DecisionTreeRequest, aserto_authorizer_v2_authorizer_pb.DecisionTreeResponse>; | ||
| is: grpc.handleUnaryCall<aserto_authorizer_v2_authorizer_pb.IsRequest, aserto_authorizer_v2_authorizer_pb.IsResponse>; | ||
| query: grpc.handleUnaryCall<aserto_authorizer_v2_authorizer_pb.QueryRequest, aserto_authorizer_v2_authorizer_pb.QueryResponse>; | ||
| compile: grpc.handleUnaryCall<aserto_authorizer_v2_authorizer_pb.CompileRequest, aserto_authorizer_v2_authorizer_pb.CompileResponse>; | ||
| listPolicies: grpc.handleUnaryCall<aserto_authorizer_v2_authorizer_pb.ListPoliciesRequest, aserto_authorizer_v2_authorizer_pb.ListPoliciesResponse>; | ||
| getPolicy: grpc.handleUnaryCall<aserto_authorizer_v2_authorizer_pb.GetPolicyRequest, aserto_authorizer_v2_authorizer_pb.GetPolicyResponse>; | ||
| info: grpc.handleUnaryCall<aserto_authorizer_v2_authorizer_pb.InfoRequest, aserto_authorizer_v2_authorizer_pb.InfoResponse>; | ||
| } | ||
| export class AuthorizerClient extends grpc.Client { | ||
| constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); | ||
| decisionTree(argument: aserto_authorizer_v2_authorizer_pb.DecisionTreeRequest, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.DecisionTreeResponse>): grpc.ClientUnaryCall; | ||
| decisionTree(argument: aserto_authorizer_v2_authorizer_pb.DecisionTreeRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.DecisionTreeResponse>): grpc.ClientUnaryCall; | ||
| decisionTree(argument: aserto_authorizer_v2_authorizer_pb.DecisionTreeRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.DecisionTreeResponse>): grpc.ClientUnaryCall; | ||
| is(argument: aserto_authorizer_v2_authorizer_pb.IsRequest, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.IsResponse>): grpc.ClientUnaryCall; | ||
| is(argument: aserto_authorizer_v2_authorizer_pb.IsRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.IsResponse>): grpc.ClientUnaryCall; | ||
| is(argument: aserto_authorizer_v2_authorizer_pb.IsRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.IsResponse>): grpc.ClientUnaryCall; | ||
| query(argument: aserto_authorizer_v2_authorizer_pb.QueryRequest, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.QueryResponse>): grpc.ClientUnaryCall; | ||
| query(argument: aserto_authorizer_v2_authorizer_pb.QueryRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.QueryResponse>): grpc.ClientUnaryCall; | ||
| query(argument: aserto_authorizer_v2_authorizer_pb.QueryRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.QueryResponse>): grpc.ClientUnaryCall; | ||
| compile(argument: aserto_authorizer_v2_authorizer_pb.CompileRequest, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.CompileResponse>): grpc.ClientUnaryCall; | ||
| compile(argument: aserto_authorizer_v2_authorizer_pb.CompileRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.CompileResponse>): grpc.ClientUnaryCall; | ||
| compile(argument: aserto_authorizer_v2_authorizer_pb.CompileRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.CompileResponse>): grpc.ClientUnaryCall; | ||
| listPolicies(argument: aserto_authorizer_v2_authorizer_pb.ListPoliciesRequest, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.ListPoliciesResponse>): grpc.ClientUnaryCall; | ||
| listPolicies(argument: aserto_authorizer_v2_authorizer_pb.ListPoliciesRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.ListPoliciesResponse>): grpc.ClientUnaryCall; | ||
| listPolicies(argument: aserto_authorizer_v2_authorizer_pb.ListPoliciesRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.ListPoliciesResponse>): grpc.ClientUnaryCall; | ||
| getPolicy(argument: aserto_authorizer_v2_authorizer_pb.GetPolicyRequest, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.GetPolicyResponse>): grpc.ClientUnaryCall; | ||
| getPolicy(argument: aserto_authorizer_v2_authorizer_pb.GetPolicyRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.GetPolicyResponse>): grpc.ClientUnaryCall; | ||
| getPolicy(argument: aserto_authorizer_v2_authorizer_pb.GetPolicyRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.GetPolicyResponse>): grpc.ClientUnaryCall; | ||
| info(argument: aserto_authorizer_v2_authorizer_pb.InfoRequest, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.InfoResponse>): grpc.ClientUnaryCall; | ||
| info(argument: aserto_authorizer_v2_authorizer_pb.InfoRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.InfoResponse>): grpc.ClientUnaryCall; | ||
| info(argument: aserto_authorizer_v2_authorizer_pb.InfoRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<aserto_authorizer_v2_authorizer_pb.InfoResponse>): grpc.ClientUnaryCall; | ||
| } |
| // GENERATED CODE -- DO NOT EDIT! | ||
| 'use strict'; | ||
| var grpc = require('@grpc/grpc-js'); | ||
| var aserto_authorizer_v2_authorizer_pb = require('../../../aserto/authorizer/v2/authorizer_pb.js'); | ||
| var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); | ||
| var protoc$gen$openapiv2_options_annotations_pb = require('../../../protoc-gen-openapiv2/options/annotations_pb.js'); | ||
| var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); | ||
| var google_protobuf_field_mask_pb = require('google-protobuf/google/protobuf/field_mask_pb.js'); | ||
| var aserto_authorizer_v2_api_identity_context_pb = require('../../../aserto/authorizer/v2/api/identity_context_pb.js'); | ||
| var aserto_authorizer_v2_api_policy_context_pb = require('../../../aserto/authorizer/v2/api/policy_context_pb.js'); | ||
| var aserto_authorizer_v2_api_module_pb = require('../../../aserto/authorizer/v2/api/module_pb.js'); | ||
| var aserto_authorizer_v2_api_policy_instance_pb = require('../../../aserto/authorizer/v2/api/policy_instance_pb.js'); | ||
| function serialize_aserto_authorizer_v2_CompileRequest(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.CompileRequest)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.CompileRequest'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_CompileRequest(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.CompileRequest.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| function serialize_aserto_authorizer_v2_CompileResponse(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.CompileResponse)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.CompileResponse'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_CompileResponse(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.CompileResponse.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| function serialize_aserto_authorizer_v2_DecisionTreeRequest(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.DecisionTreeRequest)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.DecisionTreeRequest'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_DecisionTreeRequest(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.DecisionTreeRequest.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| function serialize_aserto_authorizer_v2_DecisionTreeResponse(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.DecisionTreeResponse)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.DecisionTreeResponse'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_DecisionTreeResponse(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.DecisionTreeResponse.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| function serialize_aserto_authorizer_v2_GetPolicyRequest(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.GetPolicyRequest)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.GetPolicyRequest'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_GetPolicyRequest(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.GetPolicyRequest.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| function serialize_aserto_authorizer_v2_GetPolicyResponse(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.GetPolicyResponse)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.GetPolicyResponse'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_GetPolicyResponse(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.GetPolicyResponse.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| function serialize_aserto_authorizer_v2_InfoRequest(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.InfoRequest)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.InfoRequest'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_InfoRequest(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.InfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| function serialize_aserto_authorizer_v2_InfoResponse(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.InfoResponse)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.InfoResponse'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_InfoResponse(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.InfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| function serialize_aserto_authorizer_v2_IsRequest(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.IsRequest)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.IsRequest'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_IsRequest(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.IsRequest.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| function serialize_aserto_authorizer_v2_IsResponse(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.IsResponse)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.IsResponse'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_IsResponse(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.IsResponse.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| function serialize_aserto_authorizer_v2_ListPoliciesRequest(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.ListPoliciesRequest)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.ListPoliciesRequest'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_ListPoliciesRequest(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.ListPoliciesRequest.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| function serialize_aserto_authorizer_v2_ListPoliciesResponse(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.ListPoliciesResponse)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.ListPoliciesResponse'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_ListPoliciesResponse(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.ListPoliciesResponse.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| function serialize_aserto_authorizer_v2_QueryRequest(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.QueryRequest)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.QueryRequest'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_QueryRequest(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.QueryRequest.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| function serialize_aserto_authorizer_v2_QueryResponse(arg) { | ||
| if (!(arg instanceof aserto_authorizer_v2_authorizer_pb.QueryResponse)) { | ||
| throw new Error('Expected argument of type aserto.authorizer.v2.QueryResponse'); | ||
| } | ||
| return Buffer.from(arg.serializeBinary()); | ||
| } | ||
| function deserialize_aserto_authorizer_v2_QueryResponse(buffer_arg) { | ||
| return aserto_authorizer_v2_authorizer_pb.QueryResponse.deserializeBinary(new Uint8Array(buffer_arg)); | ||
| } | ||
| var AuthorizerService = exports.AuthorizerService = { | ||
| decisionTree: { | ||
| path: '/aserto.authorizer.v2.Authorizer/DecisionTree', | ||
| requestStream: false, | ||
| responseStream: false, | ||
| requestType: aserto_authorizer_v2_authorizer_pb.DecisionTreeRequest, | ||
| responseType: aserto_authorizer_v2_authorizer_pb.DecisionTreeResponse, | ||
| requestSerialize: serialize_aserto_authorizer_v2_DecisionTreeRequest, | ||
| requestDeserialize: deserialize_aserto_authorizer_v2_DecisionTreeRequest, | ||
| responseSerialize: serialize_aserto_authorizer_v2_DecisionTreeResponse, | ||
| responseDeserialize: deserialize_aserto_authorizer_v2_DecisionTreeResponse, | ||
| }, | ||
| is: { | ||
| path: '/aserto.authorizer.v2.Authorizer/Is', | ||
| requestStream: false, | ||
| responseStream: false, | ||
| requestType: aserto_authorizer_v2_authorizer_pb.IsRequest, | ||
| responseType: aserto_authorizer_v2_authorizer_pb.IsResponse, | ||
| requestSerialize: serialize_aserto_authorizer_v2_IsRequest, | ||
| requestDeserialize: deserialize_aserto_authorizer_v2_IsRequest, | ||
| responseSerialize: serialize_aserto_authorizer_v2_IsResponse, | ||
| responseDeserialize: deserialize_aserto_authorizer_v2_IsResponse, | ||
| }, | ||
| query: { | ||
| path: '/aserto.authorizer.v2.Authorizer/Query', | ||
| requestStream: false, | ||
| responseStream: false, | ||
| requestType: aserto_authorizer_v2_authorizer_pb.QueryRequest, | ||
| responseType: aserto_authorizer_v2_authorizer_pb.QueryResponse, | ||
| requestSerialize: serialize_aserto_authorizer_v2_QueryRequest, | ||
| requestDeserialize: deserialize_aserto_authorizer_v2_QueryRequest, | ||
| responseSerialize: serialize_aserto_authorizer_v2_QueryResponse, | ||
| responseDeserialize: deserialize_aserto_authorizer_v2_QueryResponse, | ||
| }, | ||
| compile: { | ||
| path: '/aserto.authorizer.v2.Authorizer/Compile', | ||
| requestStream: false, | ||
| responseStream: false, | ||
| requestType: aserto_authorizer_v2_authorizer_pb.CompileRequest, | ||
| responseType: aserto_authorizer_v2_authorizer_pb.CompileResponse, | ||
| requestSerialize: serialize_aserto_authorizer_v2_CompileRequest, | ||
| requestDeserialize: deserialize_aserto_authorizer_v2_CompileRequest, | ||
| responseSerialize: serialize_aserto_authorizer_v2_CompileResponse, | ||
| responseDeserialize: deserialize_aserto_authorizer_v2_CompileResponse, | ||
| }, | ||
| listPolicies: { | ||
| path: '/aserto.authorizer.v2.Authorizer/ListPolicies', | ||
| requestStream: false, | ||
| responseStream: false, | ||
| requestType: aserto_authorizer_v2_authorizer_pb.ListPoliciesRequest, | ||
| responseType: aserto_authorizer_v2_authorizer_pb.ListPoliciesResponse, | ||
| requestSerialize: serialize_aserto_authorizer_v2_ListPoliciesRequest, | ||
| requestDeserialize: deserialize_aserto_authorizer_v2_ListPoliciesRequest, | ||
| responseSerialize: serialize_aserto_authorizer_v2_ListPoliciesResponse, | ||
| responseDeserialize: deserialize_aserto_authorizer_v2_ListPoliciesResponse, | ||
| }, | ||
| getPolicy: { | ||
| path: '/aserto.authorizer.v2.Authorizer/GetPolicy', | ||
| requestStream: false, | ||
| responseStream: false, | ||
| requestType: aserto_authorizer_v2_authorizer_pb.GetPolicyRequest, | ||
| responseType: aserto_authorizer_v2_authorizer_pb.GetPolicyResponse, | ||
| requestSerialize: serialize_aserto_authorizer_v2_GetPolicyRequest, | ||
| requestDeserialize: deserialize_aserto_authorizer_v2_GetPolicyRequest, | ||
| responseSerialize: serialize_aserto_authorizer_v2_GetPolicyResponse, | ||
| responseDeserialize: deserialize_aserto_authorizer_v2_GetPolicyResponse, | ||
| }, | ||
| info: { | ||
| path: '/aserto.authorizer.v2.Authorizer/Info', | ||
| requestStream: false, | ||
| responseStream: false, | ||
| requestType: aserto_authorizer_v2_authorizer_pb.InfoRequest, | ||
| responseType: aserto_authorizer_v2_authorizer_pb.InfoResponse, | ||
| requestSerialize: serialize_aserto_authorizer_v2_InfoRequest, | ||
| requestDeserialize: deserialize_aserto_authorizer_v2_InfoRequest, | ||
| responseSerialize: serialize_aserto_authorizer_v2_InfoResponse, | ||
| responseDeserialize: deserialize_aserto_authorizer_v2_InfoResponse, | ||
| }, | ||
| }; | ||
| exports.AuthorizerClient = grpc.makeGenericClientConstructor(AuthorizerService); |
| // package: aserto.authorizer.v2 | ||
| // file: aserto/authorizer/v2/authorizer.proto | ||
| import * as jspb from "google-protobuf"; | ||
| import * as google_api_annotations_pb from "../../../google/api/annotations_pb"; | ||
| import * as protoc_gen_openapiv2_options_annotations_pb from "../../../protoc-gen-openapiv2/options/annotations_pb"; | ||
| import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; | ||
| import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; | ||
| import * as aserto_authorizer_v2_api_identity_context_pb from "../../../aserto/authorizer/v2/api/identity_context_pb"; | ||
| import * as aserto_authorizer_v2_api_policy_context_pb from "../../../aserto/authorizer/v2/api/policy_context_pb"; | ||
| import * as aserto_authorizer_v2_api_module_pb from "../../../aserto/authorizer/v2/api/module_pb"; | ||
| import * as aserto_authorizer_v2_api_policy_instance_pb from "../../../aserto/authorizer/v2/api/policy_instance_pb"; | ||
| export class InfoRequest extends jspb.Message { | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): InfoRequest.AsObject; | ||
| static toObject(includeInstance: boolean, msg: InfoRequest): InfoRequest.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: InfoRequest, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): InfoRequest; | ||
| static deserializeBinaryFromReader(message: InfoRequest, reader: jspb.BinaryReader): InfoRequest; | ||
| } | ||
| export namespace InfoRequest { | ||
| export type AsObject = { | ||
| } | ||
| } | ||
| export class InfoResponse extends jspb.Message { | ||
| getVersion(): string; | ||
| setVersion(value: string): void; | ||
| getCommit(): string; | ||
| setCommit(value: string): void; | ||
| getDate(): string; | ||
| setDate(value: string): void; | ||
| getOs(): string; | ||
| setOs(value: string): void; | ||
| getArch(): string; | ||
| setArch(value: string): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): InfoResponse.AsObject; | ||
| static toObject(includeInstance: boolean, msg: InfoResponse): InfoResponse.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: InfoResponse, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): InfoResponse; | ||
| static deserializeBinaryFromReader(message: InfoResponse, reader: jspb.BinaryReader): InfoResponse; | ||
| } | ||
| export namespace InfoResponse { | ||
| export type AsObject = { | ||
| version: string, | ||
| commit: string, | ||
| date: string, | ||
| os: string, | ||
| arch: string, | ||
| } | ||
| } | ||
| export class GetPolicyRequest extends jspb.Message { | ||
| getId(): string; | ||
| setId(value: string): void; | ||
| hasFieldMask(): boolean; | ||
| clearFieldMask(): void; | ||
| getFieldMask(): google_protobuf_field_mask_pb.FieldMask | undefined; | ||
| setFieldMask(value?: google_protobuf_field_mask_pb.FieldMask): void; | ||
| hasPolicyInstance(): boolean; | ||
| clearPolicyInstance(): void; | ||
| getPolicyInstance(): aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance | undefined; | ||
| setPolicyInstance(value?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): GetPolicyRequest.AsObject; | ||
| static toObject(includeInstance: boolean, msg: GetPolicyRequest): GetPolicyRequest.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: GetPolicyRequest, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): GetPolicyRequest; | ||
| static deserializeBinaryFromReader(message: GetPolicyRequest, reader: jspb.BinaryReader): GetPolicyRequest; | ||
| } | ||
| export namespace GetPolicyRequest { | ||
| export type AsObject = { | ||
| id: string, | ||
| fieldMask?: google_protobuf_field_mask_pb.FieldMask.AsObject, | ||
| policyInstance?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance.AsObject, | ||
| } | ||
| } | ||
| export class GetPolicyResponse extends jspb.Message { | ||
| hasResult(): boolean; | ||
| clearResult(): void; | ||
| getResult(): aserto_authorizer_v2_api_module_pb.Module | undefined; | ||
| setResult(value?: aserto_authorizer_v2_api_module_pb.Module): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): GetPolicyResponse.AsObject; | ||
| static toObject(includeInstance: boolean, msg: GetPolicyResponse): GetPolicyResponse.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: GetPolicyResponse, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): GetPolicyResponse; | ||
| static deserializeBinaryFromReader(message: GetPolicyResponse, reader: jspb.BinaryReader): GetPolicyResponse; | ||
| } | ||
| export namespace GetPolicyResponse { | ||
| export type AsObject = { | ||
| result?: aserto_authorizer_v2_api_module_pb.Module.AsObject, | ||
| } | ||
| } | ||
| export class ListPoliciesRequest extends jspb.Message { | ||
| hasFieldMask(): boolean; | ||
| clearFieldMask(): void; | ||
| getFieldMask(): google_protobuf_field_mask_pb.FieldMask | undefined; | ||
| setFieldMask(value?: google_protobuf_field_mask_pb.FieldMask): void; | ||
| hasPolicyInstance(): boolean; | ||
| clearPolicyInstance(): void; | ||
| getPolicyInstance(): aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance | undefined; | ||
| setPolicyInstance(value?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): ListPoliciesRequest.AsObject; | ||
| static toObject(includeInstance: boolean, msg: ListPoliciesRequest): ListPoliciesRequest.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: ListPoliciesRequest, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): ListPoliciesRequest; | ||
| static deserializeBinaryFromReader(message: ListPoliciesRequest, reader: jspb.BinaryReader): ListPoliciesRequest; | ||
| } | ||
| export namespace ListPoliciesRequest { | ||
| export type AsObject = { | ||
| fieldMask?: google_protobuf_field_mask_pb.FieldMask.AsObject, | ||
| policyInstance?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance.AsObject, | ||
| } | ||
| } | ||
| export class ListPoliciesResponse extends jspb.Message { | ||
| clearResultList(): void; | ||
| getResultList(): Array<aserto_authorizer_v2_api_module_pb.Module>; | ||
| setResultList(value: Array<aserto_authorizer_v2_api_module_pb.Module>): void; | ||
| addResult(value?: aserto_authorizer_v2_api_module_pb.Module, index?: number): aserto_authorizer_v2_api_module_pb.Module; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): ListPoliciesResponse.AsObject; | ||
| static toObject(includeInstance: boolean, msg: ListPoliciesResponse): ListPoliciesResponse.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: ListPoliciesResponse, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): ListPoliciesResponse; | ||
| static deserializeBinaryFromReader(message: ListPoliciesResponse, reader: jspb.BinaryReader): ListPoliciesResponse; | ||
| } | ||
| export namespace ListPoliciesResponse { | ||
| export type AsObject = { | ||
| resultList: Array<aserto_authorizer_v2_api_module_pb.Module.AsObject>, | ||
| } | ||
| } | ||
| export class DecisionTreeRequest extends jspb.Message { | ||
| hasPolicyContext(): boolean; | ||
| clearPolicyContext(): void; | ||
| getPolicyContext(): aserto_authorizer_v2_api_policy_context_pb.PolicyContext | undefined; | ||
| setPolicyContext(value?: aserto_authorizer_v2_api_policy_context_pb.PolicyContext): void; | ||
| hasIdentityContext(): boolean; | ||
| clearIdentityContext(): void; | ||
| getIdentityContext(): aserto_authorizer_v2_api_identity_context_pb.IdentityContext | undefined; | ||
| setIdentityContext(value?: aserto_authorizer_v2_api_identity_context_pb.IdentityContext): void; | ||
| hasOptions(): boolean; | ||
| clearOptions(): void; | ||
| getOptions(): DecisionTreeOptions | undefined; | ||
| setOptions(value?: DecisionTreeOptions): void; | ||
| hasResourceContext(): boolean; | ||
| clearResourceContext(): void; | ||
| getResourceContext(): google_protobuf_struct_pb.Struct | undefined; | ||
| setResourceContext(value?: google_protobuf_struct_pb.Struct): void; | ||
| hasPolicyInstance(): boolean; | ||
| clearPolicyInstance(): void; | ||
| getPolicyInstance(): aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance | undefined; | ||
| setPolicyInstance(value?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): DecisionTreeRequest.AsObject; | ||
| static toObject(includeInstance: boolean, msg: DecisionTreeRequest): DecisionTreeRequest.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: DecisionTreeRequest, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): DecisionTreeRequest; | ||
| static deserializeBinaryFromReader(message: DecisionTreeRequest, reader: jspb.BinaryReader): DecisionTreeRequest; | ||
| } | ||
| export namespace DecisionTreeRequest { | ||
| export type AsObject = { | ||
| policyContext?: aserto_authorizer_v2_api_policy_context_pb.PolicyContext.AsObject, | ||
| identityContext?: aserto_authorizer_v2_api_identity_context_pb.IdentityContext.AsObject, | ||
| options?: DecisionTreeOptions.AsObject, | ||
| resourceContext?: google_protobuf_struct_pb.Struct.AsObject, | ||
| policyInstance?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance.AsObject, | ||
| } | ||
| } | ||
| export class DecisionTreeOptions extends jspb.Message { | ||
| getPathSeparator(): PathSeparatorMap[keyof PathSeparatorMap]; | ||
| setPathSeparator(value: PathSeparatorMap[keyof PathSeparatorMap]): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): DecisionTreeOptions.AsObject; | ||
| static toObject(includeInstance: boolean, msg: DecisionTreeOptions): DecisionTreeOptions.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: DecisionTreeOptions, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): DecisionTreeOptions; | ||
| static deserializeBinaryFromReader(message: DecisionTreeOptions, reader: jspb.BinaryReader): DecisionTreeOptions; | ||
| } | ||
| export namespace DecisionTreeOptions { | ||
| export type AsObject = { | ||
| pathSeparator: PathSeparatorMap[keyof PathSeparatorMap], | ||
| } | ||
| } | ||
| export class DecisionTreeResponse extends jspb.Message { | ||
| getPathRoot(): string; | ||
| setPathRoot(value: string): void; | ||
| hasPath(): boolean; | ||
| clearPath(): void; | ||
| getPath(): google_protobuf_struct_pb.Struct | undefined; | ||
| setPath(value?: google_protobuf_struct_pb.Struct): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): DecisionTreeResponse.AsObject; | ||
| static toObject(includeInstance: boolean, msg: DecisionTreeResponse): DecisionTreeResponse.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: DecisionTreeResponse, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): DecisionTreeResponse; | ||
| static deserializeBinaryFromReader(message: DecisionTreeResponse, reader: jspb.BinaryReader): DecisionTreeResponse; | ||
| } | ||
| export namespace DecisionTreeResponse { | ||
| export type AsObject = { | ||
| pathRoot: string, | ||
| path?: google_protobuf_struct_pb.Struct.AsObject, | ||
| } | ||
| } | ||
| export class IsRequest extends jspb.Message { | ||
| hasPolicyContext(): boolean; | ||
| clearPolicyContext(): void; | ||
| getPolicyContext(): aserto_authorizer_v2_api_policy_context_pb.PolicyContext | undefined; | ||
| setPolicyContext(value?: aserto_authorizer_v2_api_policy_context_pb.PolicyContext): void; | ||
| hasIdentityContext(): boolean; | ||
| clearIdentityContext(): void; | ||
| getIdentityContext(): aserto_authorizer_v2_api_identity_context_pb.IdentityContext | undefined; | ||
| setIdentityContext(value?: aserto_authorizer_v2_api_identity_context_pb.IdentityContext): void; | ||
| hasResourceContext(): boolean; | ||
| clearResourceContext(): void; | ||
| getResourceContext(): google_protobuf_struct_pb.Struct | undefined; | ||
| setResourceContext(value?: google_protobuf_struct_pb.Struct): void; | ||
| hasPolicyInstance(): boolean; | ||
| clearPolicyInstance(): void; | ||
| getPolicyInstance(): aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance | undefined; | ||
| setPolicyInstance(value?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): IsRequest.AsObject; | ||
| static toObject(includeInstance: boolean, msg: IsRequest): IsRequest.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: IsRequest, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): IsRequest; | ||
| static deserializeBinaryFromReader(message: IsRequest, reader: jspb.BinaryReader): IsRequest; | ||
| } | ||
| export namespace IsRequest { | ||
| export type AsObject = { | ||
| policyContext?: aserto_authorizer_v2_api_policy_context_pb.PolicyContext.AsObject, | ||
| identityContext?: aserto_authorizer_v2_api_identity_context_pb.IdentityContext.AsObject, | ||
| resourceContext?: google_protobuf_struct_pb.Struct.AsObject, | ||
| policyInstance?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance.AsObject, | ||
| } | ||
| } | ||
| export class Decision extends jspb.Message { | ||
| getDecision(): string; | ||
| setDecision(value: string): void; | ||
| getIs(): boolean; | ||
| setIs(value: boolean): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Decision.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Decision): Decision.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Decision, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Decision; | ||
| static deserializeBinaryFromReader(message: Decision, reader: jspb.BinaryReader): Decision; | ||
| } | ||
| export namespace Decision { | ||
| export type AsObject = { | ||
| decision: string, | ||
| is: boolean, | ||
| } | ||
| } | ||
| export class IsResponse extends jspb.Message { | ||
| clearDecisionsList(): void; | ||
| getDecisionsList(): Array<Decision>; | ||
| setDecisionsList(value: Array<Decision>): void; | ||
| addDecisions(value?: Decision, index?: number): Decision; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): IsResponse.AsObject; | ||
| static toObject(includeInstance: boolean, msg: IsResponse): IsResponse.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: IsResponse, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): IsResponse; | ||
| static deserializeBinaryFromReader(message: IsResponse, reader: jspb.BinaryReader): IsResponse; | ||
| } | ||
| export namespace IsResponse { | ||
| export type AsObject = { | ||
| decisionsList: Array<Decision.AsObject>, | ||
| } | ||
| } | ||
| export class QueryOptions extends jspb.Message { | ||
| getMetrics(): boolean; | ||
| setMetrics(value: boolean): void; | ||
| getInstrument(): boolean; | ||
| setInstrument(value: boolean): void; | ||
| getTrace(): TraceLevelMap[keyof TraceLevelMap]; | ||
| setTrace(value: TraceLevelMap[keyof TraceLevelMap]): void; | ||
| getTraceSummary(): boolean; | ||
| setTraceSummary(value: boolean): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): QueryOptions.AsObject; | ||
| static toObject(includeInstance: boolean, msg: QueryOptions): QueryOptions.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: QueryOptions, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): QueryOptions; | ||
| static deserializeBinaryFromReader(message: QueryOptions, reader: jspb.BinaryReader): QueryOptions; | ||
| } | ||
| export namespace QueryOptions { | ||
| export type AsObject = { | ||
| metrics: boolean, | ||
| instrument: boolean, | ||
| trace: TraceLevelMap[keyof TraceLevelMap], | ||
| traceSummary: boolean, | ||
| } | ||
| } | ||
| export class QueryRequest extends jspb.Message { | ||
| getQuery(): string; | ||
| setQuery(value: string): void; | ||
| getInput(): string; | ||
| setInput(value: string): void; | ||
| hasOptions(): boolean; | ||
| clearOptions(): void; | ||
| getOptions(): QueryOptions | undefined; | ||
| setOptions(value?: QueryOptions): void; | ||
| hasPolicyContext(): boolean; | ||
| clearPolicyContext(): void; | ||
| getPolicyContext(): aserto_authorizer_v2_api_policy_context_pb.PolicyContext | undefined; | ||
| setPolicyContext(value?: aserto_authorizer_v2_api_policy_context_pb.PolicyContext): void; | ||
| hasIdentityContext(): boolean; | ||
| clearIdentityContext(): void; | ||
| getIdentityContext(): aserto_authorizer_v2_api_identity_context_pb.IdentityContext | undefined; | ||
| setIdentityContext(value?: aserto_authorizer_v2_api_identity_context_pb.IdentityContext): void; | ||
| hasResourceContext(): boolean; | ||
| clearResourceContext(): void; | ||
| getResourceContext(): google_protobuf_struct_pb.Struct | undefined; | ||
| setResourceContext(value?: google_protobuf_struct_pb.Struct): void; | ||
| hasPolicyInstance(): boolean; | ||
| clearPolicyInstance(): void; | ||
| getPolicyInstance(): aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance | undefined; | ||
| setPolicyInstance(value?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): QueryRequest.AsObject; | ||
| static toObject(includeInstance: boolean, msg: QueryRequest): QueryRequest.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: QueryRequest, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): QueryRequest; | ||
| static deserializeBinaryFromReader(message: QueryRequest, reader: jspb.BinaryReader): QueryRequest; | ||
| } | ||
| export namespace QueryRequest { | ||
| export type AsObject = { | ||
| query: string, | ||
| input: string, | ||
| options?: QueryOptions.AsObject, | ||
| policyContext?: aserto_authorizer_v2_api_policy_context_pb.PolicyContext.AsObject, | ||
| identityContext?: aserto_authorizer_v2_api_identity_context_pb.IdentityContext.AsObject, | ||
| resourceContext?: google_protobuf_struct_pb.Struct.AsObject, | ||
| policyInstance?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance.AsObject, | ||
| } | ||
| } | ||
| export class CompileRequest extends jspb.Message { | ||
| getQuery(): string; | ||
| setQuery(value: string): void; | ||
| getInput(): string; | ||
| setInput(value: string): void; | ||
| clearUnknownsList(): void; | ||
| getUnknownsList(): Array<string>; | ||
| setUnknownsList(value: Array<string>): void; | ||
| addUnknowns(value: string, index?: number): string; | ||
| clearDisableInliningList(): void; | ||
| getDisableInliningList(): Array<string>; | ||
| setDisableInliningList(value: Array<string>): void; | ||
| addDisableInlining(value: string, index?: number): string; | ||
| hasOptions(): boolean; | ||
| clearOptions(): void; | ||
| getOptions(): QueryOptions | undefined; | ||
| setOptions(value?: QueryOptions): void; | ||
| hasPolicyContext(): boolean; | ||
| clearPolicyContext(): void; | ||
| getPolicyContext(): aserto_authorizer_v2_api_policy_context_pb.PolicyContext | undefined; | ||
| setPolicyContext(value?: aserto_authorizer_v2_api_policy_context_pb.PolicyContext): void; | ||
| hasIdentityContext(): boolean; | ||
| clearIdentityContext(): void; | ||
| getIdentityContext(): aserto_authorizer_v2_api_identity_context_pb.IdentityContext | undefined; | ||
| setIdentityContext(value?: aserto_authorizer_v2_api_identity_context_pb.IdentityContext): void; | ||
| hasResourceContext(): boolean; | ||
| clearResourceContext(): void; | ||
| getResourceContext(): google_protobuf_struct_pb.Struct | undefined; | ||
| setResourceContext(value?: google_protobuf_struct_pb.Struct): void; | ||
| hasPolicyInstance(): boolean; | ||
| clearPolicyInstance(): void; | ||
| getPolicyInstance(): aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance | undefined; | ||
| setPolicyInstance(value?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): CompileRequest.AsObject; | ||
| static toObject(includeInstance: boolean, msg: CompileRequest): CompileRequest.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: CompileRequest, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): CompileRequest; | ||
| static deserializeBinaryFromReader(message: CompileRequest, reader: jspb.BinaryReader): CompileRequest; | ||
| } | ||
| export namespace CompileRequest { | ||
| export type AsObject = { | ||
| query: string, | ||
| input: string, | ||
| unknownsList: Array<string>, | ||
| disableInliningList: Array<string>, | ||
| options?: QueryOptions.AsObject, | ||
| policyContext?: aserto_authorizer_v2_api_policy_context_pb.PolicyContext.AsObject, | ||
| identityContext?: aserto_authorizer_v2_api_identity_context_pb.IdentityContext.AsObject, | ||
| resourceContext?: google_protobuf_struct_pb.Struct.AsObject, | ||
| policyInstance?: aserto_authorizer_v2_api_policy_instance_pb.PolicyInstance.AsObject, | ||
| } | ||
| } | ||
| export class CompileResponse extends jspb.Message { | ||
| hasResult(): boolean; | ||
| clearResult(): void; | ||
| getResult(): google_protobuf_struct_pb.Struct | undefined; | ||
| setResult(value?: google_protobuf_struct_pb.Struct): void; | ||
| hasMetrics(): boolean; | ||
| clearMetrics(): void; | ||
| getMetrics(): google_protobuf_struct_pb.Struct | undefined; | ||
| setMetrics(value?: google_protobuf_struct_pb.Struct): void; | ||
| clearTraceList(): void; | ||
| getTraceList(): Array<google_protobuf_struct_pb.Struct>; | ||
| setTraceList(value: Array<google_protobuf_struct_pb.Struct>): void; | ||
| addTrace(value?: google_protobuf_struct_pb.Struct, index?: number): google_protobuf_struct_pb.Struct; | ||
| clearTraceSummaryList(): void; | ||
| getTraceSummaryList(): Array<string>; | ||
| setTraceSummaryList(value: Array<string>): void; | ||
| addTraceSummary(value: string, index?: number): string; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): CompileResponse.AsObject; | ||
| static toObject(includeInstance: boolean, msg: CompileResponse): CompileResponse.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: CompileResponse, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): CompileResponse; | ||
| static deserializeBinaryFromReader(message: CompileResponse, reader: jspb.BinaryReader): CompileResponse; | ||
| } | ||
| export namespace CompileResponse { | ||
| export type AsObject = { | ||
| result?: google_protobuf_struct_pb.Struct.AsObject, | ||
| metrics?: google_protobuf_struct_pb.Struct.AsObject, | ||
| traceList: Array<google_protobuf_struct_pb.Struct.AsObject>, | ||
| traceSummaryList: Array<string>, | ||
| } | ||
| } | ||
| export class QueryResponse extends jspb.Message { | ||
| hasResponse(): boolean; | ||
| clearResponse(): void; | ||
| getResponse(): google_protobuf_struct_pb.Struct | undefined; | ||
| setResponse(value?: google_protobuf_struct_pb.Struct): void; | ||
| hasMetrics(): boolean; | ||
| clearMetrics(): void; | ||
| getMetrics(): google_protobuf_struct_pb.Struct | undefined; | ||
| setMetrics(value?: google_protobuf_struct_pb.Struct): void; | ||
| clearTraceList(): void; | ||
| getTraceList(): Array<google_protobuf_struct_pb.Struct>; | ||
| setTraceList(value: Array<google_protobuf_struct_pb.Struct>): void; | ||
| addTrace(value?: google_protobuf_struct_pb.Struct, index?: number): google_protobuf_struct_pb.Struct; | ||
| clearTraceSummaryList(): void; | ||
| getTraceSummaryList(): Array<string>; | ||
| setTraceSummaryList(value: Array<string>): void; | ||
| addTraceSummary(value: string, index?: number): string; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): QueryResponse.AsObject; | ||
| static toObject(includeInstance: boolean, msg: QueryResponse): QueryResponse.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: QueryResponse, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): QueryResponse; | ||
| static deserializeBinaryFromReader(message: QueryResponse, reader: jspb.BinaryReader): QueryResponse; | ||
| } | ||
| export namespace QueryResponse { | ||
| export type AsObject = { | ||
| response?: google_protobuf_struct_pb.Struct.AsObject, | ||
| metrics?: google_protobuf_struct_pb.Struct.AsObject, | ||
| traceList: Array<google_protobuf_struct_pb.Struct.AsObject>, | ||
| traceSummaryList: Array<string>, | ||
| } | ||
| } | ||
| export interface PathSeparatorMap { | ||
| PATH_SEPARATOR_UNKNOWN: 0; | ||
| PATH_SEPARATOR_DOT: 1; | ||
| PATH_SEPARATOR_SLASH: 2; | ||
| } | ||
| export const PathSeparator: PathSeparatorMap; | ||
| export interface TraceLevelMap { | ||
| TRACE_LEVEL_UNKNOWN: 0; | ||
| TRACE_LEVEL_OFF: 1; | ||
| TRACE_LEVEL_FULL: 2; | ||
| TRACE_LEVEL_NOTES: 3; | ||
| TRACE_LEVEL_FAILS: 4; | ||
| } | ||
| export const TraceLevel: TraceLevelMap; | ||
Sorry, the diff of this file is too big to display
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // package: google.api | ||
| // file: google/api/annotations.proto | ||
| import * as jspb from "google-protobuf"; | ||
| import * as google_api_http_pb from "../../google/api/http_pb"; | ||
| import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; | ||
| export const http: jspb.ExtensionFieldInfo<google_api_http_pb.HttpRule>; | ||
| // source: google/api/annotations.proto | ||
| /** | ||
| * @fileoverview | ||
| * @enhanceable | ||
| * @suppress {missingRequire} reports error on implicit type usages. | ||
| * @suppress {messageConventions} JS Compiler reports an error if a variable or | ||
| * field starts with 'MSG_' and isn't a translatable message. | ||
| * @public | ||
| */ | ||
| // GENERATED CODE -- DO NOT EDIT! | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| var jspb = require('google-protobuf'); | ||
| var goog = jspb; | ||
| var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); | ||
| var google_api_http_pb = require('../../google/api/http_pb.js'); | ||
| goog.object.extend(proto, google_api_http_pb); | ||
| var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); | ||
| goog.object.extend(proto, google_protobuf_descriptor_pb); | ||
| goog.exportSymbol('proto.google.api.http', null, global); | ||
| /** | ||
| * A tuple of {field number, class constructor} for the extension | ||
| * field named `http`. | ||
| * @type {!jspb.ExtensionFieldInfo<!proto.google.api.HttpRule>} | ||
| */ | ||
| proto.google.api.http = new jspb.ExtensionFieldInfo( | ||
| 72295728, | ||
| {http: 0}, | ||
| google_api_http_pb.HttpRule, | ||
| /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( | ||
| google_api_http_pb.HttpRule.toObject), | ||
| 0); | ||
| google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295728] = new jspb.ExtensionFieldBinaryInfo( | ||
| proto.google.api.http, | ||
| jspb.BinaryReader.prototype.readMessage, | ||
| jspb.BinaryWriter.prototype.writeMessage, | ||
| google_api_http_pb.HttpRule.serializeBinaryToWriter, | ||
| google_api_http_pb.HttpRule.deserializeBinaryFromReader, | ||
| false); | ||
| // This registers the extension field with the extended class, so that | ||
| // toObject() will function correctly. | ||
| google_protobuf_descriptor_pb.MethodOptions.extensions[72295728] = proto.google.api.http; | ||
| goog.object.extend(exports, proto.google.api); |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // package: google.api | ||
| // file: google/api/http.proto | ||
| import * as jspb from "google-protobuf"; | ||
| export class Http extends jspb.Message { | ||
| clearRulesList(): void; | ||
| getRulesList(): Array<HttpRule>; | ||
| setRulesList(value: Array<HttpRule>): void; | ||
| addRules(value?: HttpRule, index?: number): HttpRule; | ||
| getFullyDecodeReservedExpansion(): boolean; | ||
| setFullyDecodeReservedExpansion(value: boolean): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Http.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Http): Http.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Http, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Http; | ||
| static deserializeBinaryFromReader(message: Http, reader: jspb.BinaryReader): Http; | ||
| } | ||
| export namespace Http { | ||
| export type AsObject = { | ||
| rulesList: Array<HttpRule.AsObject>, | ||
| fullyDecodeReservedExpansion: boolean, | ||
| } | ||
| } | ||
| export class HttpRule extends jspb.Message { | ||
| getSelector(): string; | ||
| setSelector(value: string): void; | ||
| hasGet(): boolean; | ||
| clearGet(): void; | ||
| getGet(): string; | ||
| setGet(value: string): void; | ||
| hasPut(): boolean; | ||
| clearPut(): void; | ||
| getPut(): string; | ||
| setPut(value: string): void; | ||
| hasPost(): boolean; | ||
| clearPost(): void; | ||
| getPost(): string; | ||
| setPost(value: string): void; | ||
| hasDelete(): boolean; | ||
| clearDelete(): void; | ||
| getDelete(): string; | ||
| setDelete(value: string): void; | ||
| hasPatch(): boolean; | ||
| clearPatch(): void; | ||
| getPatch(): string; | ||
| setPatch(value: string): void; | ||
| hasCustom(): boolean; | ||
| clearCustom(): void; | ||
| getCustom(): CustomHttpPattern | undefined; | ||
| setCustom(value?: CustomHttpPattern): void; | ||
| getBody(): string; | ||
| setBody(value: string): void; | ||
| getResponseBody(): string; | ||
| setResponseBody(value: string): void; | ||
| clearAdditionalBindingsList(): void; | ||
| getAdditionalBindingsList(): Array<HttpRule>; | ||
| setAdditionalBindingsList(value: Array<HttpRule>): void; | ||
| addAdditionalBindings(value?: HttpRule, index?: number): HttpRule; | ||
| getPatternCase(): HttpRule.PatternCase; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): HttpRule.AsObject; | ||
| static toObject(includeInstance: boolean, msg: HttpRule): HttpRule.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: HttpRule, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): HttpRule; | ||
| static deserializeBinaryFromReader(message: HttpRule, reader: jspb.BinaryReader): HttpRule; | ||
| } | ||
| export namespace HttpRule { | ||
| export type AsObject = { | ||
| selector: string, | ||
| get: string, | ||
| put: string, | ||
| post: string, | ||
| pb_delete: string, | ||
| patch: string, | ||
| custom?: CustomHttpPattern.AsObject, | ||
| body: string, | ||
| responseBody: string, | ||
| additionalBindingsList: Array<HttpRule.AsObject>, | ||
| } | ||
| export enum PatternCase { | ||
| PATTERN_NOT_SET = 0, | ||
| GET = 2, | ||
| PUT = 3, | ||
| POST = 4, | ||
| DELETE = 5, | ||
| PATCH = 6, | ||
| CUSTOM = 8, | ||
| } | ||
| } | ||
| export class CustomHttpPattern extends jspb.Message { | ||
| getKind(): string; | ||
| setKind(value: string): void; | ||
| getPath(): string; | ||
| setPath(value: string): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): CustomHttpPattern.AsObject; | ||
| static toObject(includeInstance: boolean, msg: CustomHttpPattern): CustomHttpPattern.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: CustomHttpPattern, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): CustomHttpPattern; | ||
| static deserializeBinaryFromReader(message: CustomHttpPattern, reader: jspb.BinaryReader): CustomHttpPattern; | ||
| } | ||
| export namespace CustomHttpPattern { | ||
| export type AsObject = { | ||
| kind: string, | ||
| path: string, | ||
| } | ||
| } | ||
| // source: google/api/http.proto | ||
| /** | ||
| * @fileoverview | ||
| * @enhanceable | ||
| * @suppress {missingRequire} reports error on implicit type usages. | ||
| * @suppress {messageConventions} JS Compiler reports an error if a variable or | ||
| * field starts with 'MSG_' and isn't a translatable message. | ||
| * @public | ||
| */ | ||
| // GENERATED CODE -- DO NOT EDIT! | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| var jspb = require('google-protobuf'); | ||
| var goog = jspb; | ||
| var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); | ||
| goog.exportSymbol('proto.google.api.CustomHttpPattern', null, global); | ||
| goog.exportSymbol('proto.google.api.Http', null, global); | ||
| goog.exportSymbol('proto.google.api.HttpRule', null, global); | ||
| goog.exportSymbol('proto.google.api.HttpRule.PatternCase', null, global); | ||
| /** | ||
| * Generated by JsPbCodeGenerator. | ||
| * @param {Array=} opt_data Optional initial data array, typically from a | ||
| * server response, or constructed directly in Javascript. The array is used | ||
| * in place and becomes part of the constructed object. It is not cloned. | ||
| * If no data is provided, the constructed object will be empty, but still | ||
| * valid. | ||
| * @extends {jspb.Message} | ||
| * @constructor | ||
| */ | ||
| proto.google.api.Http = function(opt_data) { | ||
| jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Http.repeatedFields_, null); | ||
| }; | ||
| goog.inherits(proto.google.api.Http, jspb.Message); | ||
| if (goog.DEBUG && !COMPILED) { | ||
| /** | ||
| * @public | ||
| * @override | ||
| */ | ||
| proto.google.api.Http.displayName = 'proto.google.api.Http'; | ||
| } | ||
| /** | ||
| * Generated by JsPbCodeGenerator. | ||
| * @param {Array=} opt_data Optional initial data array, typically from a | ||
| * server response, or constructed directly in Javascript. The array is used | ||
| * in place and becomes part of the constructed object. It is not cloned. | ||
| * If no data is provided, the constructed object will be empty, but still | ||
| * valid. | ||
| * @extends {jspb.Message} | ||
| * @constructor | ||
| */ | ||
| proto.google.api.HttpRule = function(opt_data) { | ||
| jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpRule.repeatedFields_, proto.google.api.HttpRule.oneofGroups_); | ||
| }; | ||
| goog.inherits(proto.google.api.HttpRule, jspb.Message); | ||
| if (goog.DEBUG && !COMPILED) { | ||
| /** | ||
| * @public | ||
| * @override | ||
| */ | ||
| proto.google.api.HttpRule.displayName = 'proto.google.api.HttpRule'; | ||
| } | ||
| /** | ||
| * Generated by JsPbCodeGenerator. | ||
| * @param {Array=} opt_data Optional initial data array, typically from a | ||
| * server response, or constructed directly in Javascript. The array is used | ||
| * in place and becomes part of the constructed object. It is not cloned. | ||
| * If no data is provided, the constructed object will be empty, but still | ||
| * valid. | ||
| * @extends {jspb.Message} | ||
| * @constructor | ||
| */ | ||
| proto.google.api.CustomHttpPattern = function(opt_data) { | ||
| jspb.Message.initialize(this, opt_data, 0, -1, null, null); | ||
| }; | ||
| goog.inherits(proto.google.api.CustomHttpPattern, jspb.Message); | ||
| if (goog.DEBUG && !COMPILED) { | ||
| /** | ||
| * @public | ||
| * @override | ||
| */ | ||
| proto.google.api.CustomHttpPattern.displayName = 'proto.google.api.CustomHttpPattern'; | ||
| } | ||
| /** | ||
| * List of repeated fields within this message type. | ||
| * @private {!Array<number>} | ||
| * @const | ||
| */ | ||
| proto.google.api.Http.repeatedFields_ = [1]; | ||
| if (jspb.Message.GENERATE_TO_OBJECT) { | ||
| /** | ||
| * Creates an object representation of this proto. | ||
| * Field names that are reserved in JavaScript and will be renamed to pb_name. | ||
| * Optional fields that are not set will be set to undefined. | ||
| * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. | ||
| * For the list of reserved names please see: | ||
| * net/proto2/compiler/js/internal/generator.cc#kKeyword. | ||
| * @param {boolean=} opt_includeInstance Deprecated. whether to include the | ||
| * JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @return {!Object} | ||
| */ | ||
| proto.google.api.Http.prototype.toObject = function(opt_includeInstance) { | ||
| return proto.google.api.Http.toObject(opt_includeInstance, this); | ||
| }; | ||
| /** | ||
| * Static version of the {@see toObject} method. | ||
| * @param {boolean|undefined} includeInstance Deprecated. Whether to include | ||
| * the JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @param {!proto.google.api.Http} msg The msg instance to transform. | ||
| * @return {!Object} | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.google.api.Http.toObject = function(includeInstance, msg) { | ||
| var f, obj = { | ||
| rulesList: jspb.Message.toObjectList(msg.getRulesList(), | ||
| proto.google.api.HttpRule.toObject, includeInstance), | ||
| fullyDecodeReservedExpansion: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) | ||
| }; | ||
| if (includeInstance) { | ||
| obj.$jspbMessageInstance = msg; | ||
| } | ||
| return obj; | ||
| }; | ||
| } | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format). | ||
| * @param {jspb.ByteSource} bytes The bytes to deserialize. | ||
| * @return {!proto.google.api.Http} | ||
| */ | ||
| proto.google.api.Http.deserializeBinary = function(bytes) { | ||
| var reader = new jspb.BinaryReader(bytes); | ||
| var msg = new proto.google.api.Http; | ||
| return proto.google.api.Http.deserializeBinaryFromReader(msg, reader); | ||
| }; | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format) from the | ||
| * given reader into the given message object. | ||
| * @param {!proto.google.api.Http} msg The message object to deserialize into. | ||
| * @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
| * @return {!proto.google.api.Http} | ||
| */ | ||
| proto.google.api.Http.deserializeBinaryFromReader = function(msg, reader) { | ||
| while (reader.nextField()) { | ||
| if (reader.isEndGroup()) { | ||
| break; | ||
| } | ||
| var field = reader.getFieldNumber(); | ||
| switch (field) { | ||
| case 1: | ||
| var value = new proto.google.api.HttpRule; | ||
| reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); | ||
| msg.addRules(value); | ||
| break; | ||
| case 2: | ||
| var value = /** @type {boolean} */ (reader.readBool()); | ||
| msg.setFullyDecodeReservedExpansion(value); | ||
| break; | ||
| default: | ||
| reader.skipField(); | ||
| break; | ||
| } | ||
| } | ||
| return msg; | ||
| }; | ||
| /** | ||
| * Serializes the message to binary data (in protobuf wire format). | ||
| * @return {!Uint8Array} | ||
| */ | ||
| proto.google.api.Http.prototype.serializeBinary = function() { | ||
| var writer = new jspb.BinaryWriter(); | ||
| proto.google.api.Http.serializeBinaryToWriter(this, writer); | ||
| return writer.getResultBuffer(); | ||
| }; | ||
| /** | ||
| * Serializes the given message to binary data (in protobuf wire | ||
| * format), writing to the given BinaryWriter. | ||
| * @param {!proto.google.api.Http} message | ||
| * @param {!jspb.BinaryWriter} writer | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.google.api.Http.serializeBinaryToWriter = function(message, writer) { | ||
| var f = undefined; | ||
| f = message.getRulesList(); | ||
| if (f.length > 0) { | ||
| writer.writeRepeatedMessage( | ||
| 1, | ||
| f, | ||
| proto.google.api.HttpRule.serializeBinaryToWriter | ||
| ); | ||
| } | ||
| f = message.getFullyDecodeReservedExpansion(); | ||
| if (f) { | ||
| writer.writeBool( | ||
| 2, | ||
| f | ||
| ); | ||
| } | ||
| }; | ||
| /** | ||
| * repeated HttpRule rules = 1; | ||
| * @return {!Array<!proto.google.api.HttpRule>} | ||
| */ | ||
| proto.google.api.Http.prototype.getRulesList = function() { | ||
| return /** @type{!Array<!proto.google.api.HttpRule>} */ ( | ||
| jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 1)); | ||
| }; | ||
| /** | ||
| * @param {!Array<!proto.google.api.HttpRule>} value | ||
| * @return {!proto.google.api.Http} returns this | ||
| */ | ||
| proto.google.api.Http.prototype.setRulesList = function(value) { | ||
| return jspb.Message.setRepeatedWrapperField(this, 1, value); | ||
| }; | ||
| /** | ||
| * @param {!proto.google.api.HttpRule=} opt_value | ||
| * @param {number=} opt_index | ||
| * @return {!proto.google.api.HttpRule} | ||
| */ | ||
| proto.google.api.Http.prototype.addRules = function(opt_value, opt_index) { | ||
| return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.HttpRule, opt_index); | ||
| }; | ||
| /** | ||
| * Clears the list making it empty but non-null. | ||
| * @return {!proto.google.api.Http} returns this | ||
| */ | ||
| proto.google.api.Http.prototype.clearRulesList = function() { | ||
| return this.setRulesList([]); | ||
| }; | ||
| /** | ||
| * optional bool fully_decode_reserved_expansion = 2; | ||
| * @return {boolean} | ||
| */ | ||
| proto.google.api.Http.prototype.getFullyDecodeReservedExpansion = function() { | ||
| return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); | ||
| }; | ||
| /** | ||
| * @param {boolean} value | ||
| * @return {!proto.google.api.Http} returns this | ||
| */ | ||
| proto.google.api.Http.prototype.setFullyDecodeReservedExpansion = function(value) { | ||
| return jspb.Message.setProto3BooleanField(this, 2, value); | ||
| }; | ||
| /** | ||
| * List of repeated fields within this message type. | ||
| * @private {!Array<number>} | ||
| * @const | ||
| */ | ||
| proto.google.api.HttpRule.repeatedFields_ = [11]; | ||
| /** | ||
| * Oneof group definitions for this message. Each group defines the field | ||
| * numbers belonging to that group. When of these fields' value is set, all | ||
| * other fields in the group are cleared. During deserialization, if multiple | ||
| * fields are encountered for a group, only the last value seen will be kept. | ||
| * @private {!Array<!Array<number>>} | ||
| * @const | ||
| */ | ||
| proto.google.api.HttpRule.oneofGroups_ = [[2,3,4,5,6,8]]; | ||
| /** | ||
| * @enum {number} | ||
| */ | ||
| proto.google.api.HttpRule.PatternCase = { | ||
| PATTERN_NOT_SET: 0, | ||
| GET: 2, | ||
| PUT: 3, | ||
| POST: 4, | ||
| DELETE: 5, | ||
| PATCH: 6, | ||
| CUSTOM: 8 | ||
| }; | ||
| /** | ||
| * @return {proto.google.api.HttpRule.PatternCase} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.getPatternCase = function() { | ||
| return /** @type {proto.google.api.HttpRule.PatternCase} */(jspb.Message.computeOneofCase(this, proto.google.api.HttpRule.oneofGroups_[0])); | ||
| }; | ||
| if (jspb.Message.GENERATE_TO_OBJECT) { | ||
| /** | ||
| * Creates an object representation of this proto. | ||
| * Field names that are reserved in JavaScript and will be renamed to pb_name. | ||
| * Optional fields that are not set will be set to undefined. | ||
| * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. | ||
| * For the list of reserved names please see: | ||
| * net/proto2/compiler/js/internal/generator.cc#kKeyword. | ||
| * @param {boolean=} opt_includeInstance Deprecated. whether to include the | ||
| * JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @return {!Object} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.toObject = function(opt_includeInstance) { | ||
| return proto.google.api.HttpRule.toObject(opt_includeInstance, this); | ||
| }; | ||
| /** | ||
| * Static version of the {@see toObject} method. | ||
| * @param {boolean|undefined} includeInstance Deprecated. Whether to include | ||
| * the JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @param {!proto.google.api.HttpRule} msg The msg instance to transform. | ||
| * @return {!Object} | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.google.api.HttpRule.toObject = function(includeInstance, msg) { | ||
| var f, obj = { | ||
| selector: jspb.Message.getFieldWithDefault(msg, 1, ""), | ||
| get: jspb.Message.getFieldWithDefault(msg, 2, ""), | ||
| put: jspb.Message.getFieldWithDefault(msg, 3, ""), | ||
| post: jspb.Message.getFieldWithDefault(msg, 4, ""), | ||
| pb_delete: jspb.Message.getFieldWithDefault(msg, 5, ""), | ||
| patch: jspb.Message.getFieldWithDefault(msg, 6, ""), | ||
| custom: (f = msg.getCustom()) && proto.google.api.CustomHttpPattern.toObject(includeInstance, f), | ||
| body: jspb.Message.getFieldWithDefault(msg, 7, ""), | ||
| responseBody: jspb.Message.getFieldWithDefault(msg, 12, ""), | ||
| additionalBindingsList: jspb.Message.toObjectList(msg.getAdditionalBindingsList(), | ||
| proto.google.api.HttpRule.toObject, includeInstance) | ||
| }; | ||
| if (includeInstance) { | ||
| obj.$jspbMessageInstance = msg; | ||
| } | ||
| return obj; | ||
| }; | ||
| } | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format). | ||
| * @param {jspb.ByteSource} bytes The bytes to deserialize. | ||
| * @return {!proto.google.api.HttpRule} | ||
| */ | ||
| proto.google.api.HttpRule.deserializeBinary = function(bytes) { | ||
| var reader = new jspb.BinaryReader(bytes); | ||
| var msg = new proto.google.api.HttpRule; | ||
| return proto.google.api.HttpRule.deserializeBinaryFromReader(msg, reader); | ||
| }; | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format) from the | ||
| * given reader into the given message object. | ||
| * @param {!proto.google.api.HttpRule} msg The message object to deserialize into. | ||
| * @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
| * @return {!proto.google.api.HttpRule} | ||
| */ | ||
| proto.google.api.HttpRule.deserializeBinaryFromReader = function(msg, reader) { | ||
| while (reader.nextField()) { | ||
| if (reader.isEndGroup()) { | ||
| break; | ||
| } | ||
| var field = reader.getFieldNumber(); | ||
| switch (field) { | ||
| case 1: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setSelector(value); | ||
| break; | ||
| case 2: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setGet(value); | ||
| break; | ||
| case 3: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setPut(value); | ||
| break; | ||
| case 4: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setPost(value); | ||
| break; | ||
| case 5: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setDelete(value); | ||
| break; | ||
| case 6: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setPatch(value); | ||
| break; | ||
| case 8: | ||
| var value = new proto.google.api.CustomHttpPattern; | ||
| reader.readMessage(value,proto.google.api.CustomHttpPattern.deserializeBinaryFromReader); | ||
| msg.setCustom(value); | ||
| break; | ||
| case 7: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setBody(value); | ||
| break; | ||
| case 12: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setResponseBody(value); | ||
| break; | ||
| case 11: | ||
| var value = new proto.google.api.HttpRule; | ||
| reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); | ||
| msg.addAdditionalBindings(value); | ||
| break; | ||
| default: | ||
| reader.skipField(); | ||
| break; | ||
| } | ||
| } | ||
| return msg; | ||
| }; | ||
| /** | ||
| * Serializes the message to binary data (in protobuf wire format). | ||
| * @return {!Uint8Array} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.serializeBinary = function() { | ||
| var writer = new jspb.BinaryWriter(); | ||
| proto.google.api.HttpRule.serializeBinaryToWriter(this, writer); | ||
| return writer.getResultBuffer(); | ||
| }; | ||
| /** | ||
| * Serializes the given message to binary data (in protobuf wire | ||
| * format), writing to the given BinaryWriter. | ||
| * @param {!proto.google.api.HttpRule} message | ||
| * @param {!jspb.BinaryWriter} writer | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.google.api.HttpRule.serializeBinaryToWriter = function(message, writer) { | ||
| var f = undefined; | ||
| f = message.getSelector(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 1, | ||
| f | ||
| ); | ||
| } | ||
| f = /** @type {string} */ (jspb.Message.getField(message, 2)); | ||
| if (f != null) { | ||
| writer.writeString( | ||
| 2, | ||
| f | ||
| ); | ||
| } | ||
| f = /** @type {string} */ (jspb.Message.getField(message, 3)); | ||
| if (f != null) { | ||
| writer.writeString( | ||
| 3, | ||
| f | ||
| ); | ||
| } | ||
| f = /** @type {string} */ (jspb.Message.getField(message, 4)); | ||
| if (f != null) { | ||
| writer.writeString( | ||
| 4, | ||
| f | ||
| ); | ||
| } | ||
| f = /** @type {string} */ (jspb.Message.getField(message, 5)); | ||
| if (f != null) { | ||
| writer.writeString( | ||
| 5, | ||
| f | ||
| ); | ||
| } | ||
| f = /** @type {string} */ (jspb.Message.getField(message, 6)); | ||
| if (f != null) { | ||
| writer.writeString( | ||
| 6, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getCustom(); | ||
| if (f != null) { | ||
| writer.writeMessage( | ||
| 8, | ||
| f, | ||
| proto.google.api.CustomHttpPattern.serializeBinaryToWriter | ||
| ); | ||
| } | ||
| f = message.getBody(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 7, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getResponseBody(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 12, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getAdditionalBindingsList(); | ||
| if (f.length > 0) { | ||
| writer.writeRepeatedMessage( | ||
| 11, | ||
| f, | ||
| proto.google.api.HttpRule.serializeBinaryToWriter | ||
| ); | ||
| } | ||
| }; | ||
| /** | ||
| * optional string selector = 1; | ||
| * @return {string} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.getSelector = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.setSelector = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 1, value); | ||
| }; | ||
| /** | ||
| * optional string get = 2; | ||
| * @return {string} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.getGet = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.setGet = function(value) { | ||
| return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], value); | ||
| }; | ||
| /** | ||
| * Clears the field making it undefined. | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.clearGet = function() { | ||
| return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.hasGet = function() { | ||
| return jspb.Message.getField(this, 2) != null; | ||
| }; | ||
| /** | ||
| * optional string put = 3; | ||
| * @return {string} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.getPut = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.setPut = function(value) { | ||
| return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], value); | ||
| }; | ||
| /** | ||
| * Clears the field making it undefined. | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.clearPut = function() { | ||
| return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.hasPut = function() { | ||
| return jspb.Message.getField(this, 3) != null; | ||
| }; | ||
| /** | ||
| * optional string post = 4; | ||
| * @return {string} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.getPost = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.setPost = function(value) { | ||
| return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], value); | ||
| }; | ||
| /** | ||
| * Clears the field making it undefined. | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.clearPost = function() { | ||
| return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.hasPost = function() { | ||
| return jspb.Message.getField(this, 4) != null; | ||
| }; | ||
| /** | ||
| * optional string delete = 5; | ||
| * @return {string} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.getDelete = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.setDelete = function(value) { | ||
| return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], value); | ||
| }; | ||
| /** | ||
| * Clears the field making it undefined. | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.clearDelete = function() { | ||
| return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.hasDelete = function() { | ||
| return jspb.Message.getField(this, 5) != null; | ||
| }; | ||
| /** | ||
| * optional string patch = 6; | ||
| * @return {string} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.getPatch = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.setPatch = function(value) { | ||
| return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], value); | ||
| }; | ||
| /** | ||
| * Clears the field making it undefined. | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.clearPatch = function() { | ||
| return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.hasPatch = function() { | ||
| return jspb.Message.getField(this, 6) != null; | ||
| }; | ||
| /** | ||
| * optional CustomHttpPattern custom = 8; | ||
| * @return {?proto.google.api.CustomHttpPattern} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.getCustom = function() { | ||
| return /** @type{?proto.google.api.CustomHttpPattern} */ ( | ||
| jspb.Message.getWrapperField(this, proto.google.api.CustomHttpPattern, 8)); | ||
| }; | ||
| /** | ||
| * @param {?proto.google.api.CustomHttpPattern|undefined} value | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.setCustom = function(value) { | ||
| return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.HttpRule.oneofGroups_[0], value); | ||
| }; | ||
| /** | ||
| * Clears the message field making it undefined. | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.clearCustom = function() { | ||
| return this.setCustom(undefined); | ||
| }; | ||
| /** | ||
| * Returns whether this field is set. | ||
| * @return {boolean} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.hasCustom = function() { | ||
| return jspb.Message.getField(this, 8) != null; | ||
| }; | ||
| /** | ||
| * optional string body = 7; | ||
| * @return {string} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.getBody = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.setBody = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 7, value); | ||
| }; | ||
| /** | ||
| * optional string response_body = 12; | ||
| * @return {string} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.getResponseBody = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.setResponseBody = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 12, value); | ||
| }; | ||
| /** | ||
| * repeated HttpRule additional_bindings = 11; | ||
| * @return {!Array<!proto.google.api.HttpRule>} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.getAdditionalBindingsList = function() { | ||
| return /** @type{!Array<!proto.google.api.HttpRule>} */ ( | ||
| jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 11)); | ||
| }; | ||
| /** | ||
| * @param {!Array<!proto.google.api.HttpRule>} value | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.setAdditionalBindingsList = function(value) { | ||
| return jspb.Message.setRepeatedWrapperField(this, 11, value); | ||
| }; | ||
| /** | ||
| * @param {!proto.google.api.HttpRule=} opt_value | ||
| * @param {number=} opt_index | ||
| * @return {!proto.google.api.HttpRule} | ||
| */ | ||
| proto.google.api.HttpRule.prototype.addAdditionalBindings = function(opt_value, opt_index) { | ||
| return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.google.api.HttpRule, opt_index); | ||
| }; | ||
| /** | ||
| * Clears the list making it empty but non-null. | ||
| * @return {!proto.google.api.HttpRule} returns this | ||
| */ | ||
| proto.google.api.HttpRule.prototype.clearAdditionalBindingsList = function() { | ||
| return this.setAdditionalBindingsList([]); | ||
| }; | ||
| if (jspb.Message.GENERATE_TO_OBJECT) { | ||
| /** | ||
| * Creates an object representation of this proto. | ||
| * Field names that are reserved in JavaScript and will be renamed to pb_name. | ||
| * Optional fields that are not set will be set to undefined. | ||
| * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. | ||
| * For the list of reserved names please see: | ||
| * net/proto2/compiler/js/internal/generator.cc#kKeyword. | ||
| * @param {boolean=} opt_includeInstance Deprecated. whether to include the | ||
| * JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @return {!Object} | ||
| */ | ||
| proto.google.api.CustomHttpPattern.prototype.toObject = function(opt_includeInstance) { | ||
| return proto.google.api.CustomHttpPattern.toObject(opt_includeInstance, this); | ||
| }; | ||
| /** | ||
| * Static version of the {@see toObject} method. | ||
| * @param {boolean|undefined} includeInstance Deprecated. Whether to include | ||
| * the JSPB instance for transitional soy proto support: | ||
| * http://goto/soy-param-migration | ||
| * @param {!proto.google.api.CustomHttpPattern} msg The msg instance to transform. | ||
| * @return {!Object} | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.google.api.CustomHttpPattern.toObject = function(includeInstance, msg) { | ||
| var f, obj = { | ||
| kind: jspb.Message.getFieldWithDefault(msg, 1, ""), | ||
| path: jspb.Message.getFieldWithDefault(msg, 2, "") | ||
| }; | ||
| if (includeInstance) { | ||
| obj.$jspbMessageInstance = msg; | ||
| } | ||
| return obj; | ||
| }; | ||
| } | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format). | ||
| * @param {jspb.ByteSource} bytes The bytes to deserialize. | ||
| * @return {!proto.google.api.CustomHttpPattern} | ||
| */ | ||
| proto.google.api.CustomHttpPattern.deserializeBinary = function(bytes) { | ||
| var reader = new jspb.BinaryReader(bytes); | ||
| var msg = new proto.google.api.CustomHttpPattern; | ||
| return proto.google.api.CustomHttpPattern.deserializeBinaryFromReader(msg, reader); | ||
| }; | ||
| /** | ||
| * Deserializes binary data (in protobuf wire format) from the | ||
| * given reader into the given message object. | ||
| * @param {!proto.google.api.CustomHttpPattern} msg The message object to deserialize into. | ||
| * @param {!jspb.BinaryReader} reader The BinaryReader to use. | ||
| * @return {!proto.google.api.CustomHttpPattern} | ||
| */ | ||
| proto.google.api.CustomHttpPattern.deserializeBinaryFromReader = function(msg, reader) { | ||
| while (reader.nextField()) { | ||
| if (reader.isEndGroup()) { | ||
| break; | ||
| } | ||
| var field = reader.getFieldNumber(); | ||
| switch (field) { | ||
| case 1: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setKind(value); | ||
| break; | ||
| case 2: | ||
| var value = /** @type {string} */ (reader.readString()); | ||
| msg.setPath(value); | ||
| break; | ||
| default: | ||
| reader.skipField(); | ||
| break; | ||
| } | ||
| } | ||
| return msg; | ||
| }; | ||
| /** | ||
| * Serializes the message to binary data (in protobuf wire format). | ||
| * @return {!Uint8Array} | ||
| */ | ||
| proto.google.api.CustomHttpPattern.prototype.serializeBinary = function() { | ||
| var writer = new jspb.BinaryWriter(); | ||
| proto.google.api.CustomHttpPattern.serializeBinaryToWriter(this, writer); | ||
| return writer.getResultBuffer(); | ||
| }; | ||
| /** | ||
| * Serializes the given message to binary data (in protobuf wire | ||
| * format), writing to the given BinaryWriter. | ||
| * @param {!proto.google.api.CustomHttpPattern} message | ||
| * @param {!jspb.BinaryWriter} writer | ||
| * @suppress {unusedLocalVariables} f is only used for nested messages | ||
| */ | ||
| proto.google.api.CustomHttpPattern.serializeBinaryToWriter = function(message, writer) { | ||
| var f = undefined; | ||
| f = message.getKind(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 1, | ||
| f | ||
| ); | ||
| } | ||
| f = message.getPath(); | ||
| if (f.length > 0) { | ||
| writer.writeString( | ||
| 2, | ||
| f | ||
| ); | ||
| } | ||
| }; | ||
| /** | ||
| * optional string kind = 1; | ||
| * @return {string} | ||
| */ | ||
| proto.google.api.CustomHttpPattern.prototype.getKind = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.google.api.CustomHttpPattern} returns this | ||
| */ | ||
| proto.google.api.CustomHttpPattern.prototype.setKind = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 1, value); | ||
| }; | ||
| /** | ||
| * optional string path = 2; | ||
| * @return {string} | ||
| */ | ||
| proto.google.api.CustomHttpPattern.prototype.getPath = function() { | ||
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); | ||
| }; | ||
| /** | ||
| * @param {string} value | ||
| * @return {!proto.google.api.CustomHttpPattern} returns this | ||
| */ | ||
| proto.google.api.CustomHttpPattern.prototype.setPath = function(value) { | ||
| return jspb.Message.setProto3StringField(this, 2, value); | ||
| }; | ||
| goog.object.extend(exports, proto.google.api); |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // package: grpc.gateway.protoc_gen_openapiv2.options | ||
| // file: protoc-gen-openapiv2/options/annotations.proto | ||
| import * as jspb from "google-protobuf"; | ||
| import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; | ||
| import * as protoc_gen_openapiv2_options_openapiv2_pb from "../../protoc-gen-openapiv2/options/openapiv2_pb"; | ||
| export const openapiv2Swagger: jspb.ExtensionFieldInfo<protoc_gen_openapiv2_options_openapiv2_pb.Swagger>; | ||
| export const openapiv2Operation: jspb.ExtensionFieldInfo<protoc_gen_openapiv2_options_openapiv2_pb.Operation>; | ||
| export const openapiv2Schema: jspb.ExtensionFieldInfo<protoc_gen_openapiv2_options_openapiv2_pb.Schema>; | ||
| export const openapiv2Tag: jspb.ExtensionFieldInfo<protoc_gen_openapiv2_options_openapiv2_pb.Tag>; | ||
| export const openapiv2Field: jspb.ExtensionFieldInfo<protoc_gen_openapiv2_options_openapiv2_pb.JSONSchema>; | ||
| // source: protoc-gen-openapiv2/options/annotations.proto | ||
| /** | ||
| * @fileoverview | ||
| * @enhanceable | ||
| * @suppress {missingRequire} reports error on implicit type usages. | ||
| * @suppress {messageConventions} JS Compiler reports an error if a variable or | ||
| * field starts with 'MSG_' and isn't a translatable message. | ||
| * @public | ||
| */ | ||
| // GENERATED CODE -- DO NOT EDIT! | ||
| /* eslint-disable */ | ||
| // @ts-nocheck | ||
| var jspb = require('google-protobuf'); | ||
| var goog = jspb; | ||
| var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); | ||
| var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); | ||
| goog.object.extend(proto, google_protobuf_descriptor_pb); | ||
| var protoc$gen$openapiv2_options_openapiv2_pb = require('../../protoc-gen-openapiv2/options/openapiv2_pb.js'); | ||
| goog.object.extend(proto, protoc$gen$openapiv2_options_openapiv2_pb); | ||
| goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field', null, global); | ||
| goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation', null, global); | ||
| goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema', null, global); | ||
| goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger', null, global); | ||
| goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag', null, global); | ||
| /** | ||
| * A tuple of {field number, class constructor} for the extension | ||
| * field named `openapiv2Swagger`. | ||
| * @type {!jspb.ExtensionFieldInfo<!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger>} | ||
| */ | ||
| proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger = new jspb.ExtensionFieldInfo( | ||
| 1042, | ||
| {openapiv2Swagger: 0}, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Swagger, | ||
| /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Swagger.toObject), | ||
| 0); | ||
| google_protobuf_descriptor_pb.FileOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( | ||
| proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger, | ||
| jspb.BinaryReader.prototype.readMessage, | ||
| jspb.BinaryWriter.prototype.writeMessage, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Swagger.serializeBinaryToWriter, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Swagger.deserializeBinaryFromReader, | ||
| false); | ||
| // This registers the extension field with the extended class, so that | ||
| // toObject() will function correctly. | ||
| google_protobuf_descriptor_pb.FileOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger; | ||
| /** | ||
| * A tuple of {field number, class constructor} for the extension | ||
| * field named `openapiv2Operation`. | ||
| * @type {!jspb.ExtensionFieldInfo<!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation>} | ||
| */ | ||
| proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation = new jspb.ExtensionFieldInfo( | ||
| 1042, | ||
| {openapiv2Operation: 0}, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Operation, | ||
| /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Operation.toObject), | ||
| 0); | ||
| google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( | ||
| proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation, | ||
| jspb.BinaryReader.prototype.readMessage, | ||
| jspb.BinaryWriter.prototype.writeMessage, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Operation.serializeBinaryToWriter, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Operation.deserializeBinaryFromReader, | ||
| false); | ||
| // This registers the extension field with the extended class, so that | ||
| // toObject() will function correctly. | ||
| google_protobuf_descriptor_pb.MethodOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation; | ||
| /** | ||
| * A tuple of {field number, class constructor} for the extension | ||
| * field named `openapiv2Schema`. | ||
| * @type {!jspb.ExtensionFieldInfo<!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema>} | ||
| */ | ||
| proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema = new jspb.ExtensionFieldInfo( | ||
| 1042, | ||
| {openapiv2Schema: 0}, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Schema, | ||
| /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Schema.toObject), | ||
| 0); | ||
| google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( | ||
| proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema, | ||
| jspb.BinaryReader.prototype.readMessage, | ||
| jspb.BinaryWriter.prototype.writeMessage, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Schema.serializeBinaryToWriter, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Schema.deserializeBinaryFromReader, | ||
| false); | ||
| // This registers the extension field with the extended class, so that | ||
| // toObject() will function correctly. | ||
| google_protobuf_descriptor_pb.MessageOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema; | ||
| /** | ||
| * A tuple of {field number, class constructor} for the extension | ||
| * field named `openapiv2Tag`. | ||
| * @type {!jspb.ExtensionFieldInfo<!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag>} | ||
| */ | ||
| proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag = new jspb.ExtensionFieldInfo( | ||
| 1042, | ||
| {openapiv2Tag: 0}, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Tag, | ||
| /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Tag.toObject), | ||
| 0); | ||
| google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( | ||
| proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag, | ||
| jspb.BinaryReader.prototype.readMessage, | ||
| jspb.BinaryWriter.prototype.writeMessage, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Tag.serializeBinaryToWriter, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.Tag.deserializeBinaryFromReader, | ||
| false); | ||
| // This registers the extension field with the extended class, so that | ||
| // toObject() will function correctly. | ||
| google_protobuf_descriptor_pb.ServiceOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag; | ||
| /** | ||
| * A tuple of {field number, class constructor} for the extension | ||
| * field named `openapiv2Field`. | ||
| * @type {!jspb.ExtensionFieldInfo<!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema>} | ||
| */ | ||
| proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field = new jspb.ExtensionFieldInfo( | ||
| 1042, | ||
| {openapiv2Field: 0}, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.JSONSchema, | ||
| /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( | ||
| protoc$gen$openapiv2_options_openapiv2_pb.JSONSchema.toObject), | ||
| 0); | ||
| google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( | ||
| proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field, | ||
| jspb.BinaryReader.prototype.readMessage, | ||
| jspb.BinaryWriter.prototype.writeMessage, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.JSONSchema.serializeBinaryToWriter, | ||
| protoc$gen$openapiv2_options_openapiv2_pb.JSONSchema.deserializeBinaryFromReader, | ||
| false); | ||
| // This registers the extension field with the extended class, so that | ||
| // toObject() will function correctly. | ||
| google_protobuf_descriptor_pb.FieldOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field; | ||
| goog.object.extend(exports, proto.grpc.gateway.protoc_gen_openapiv2.options); |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // GENERATED CODE -- NO SERVICES IN PROTO |
| // package: grpc.gateway.protoc_gen_openapiv2.options | ||
| // file: protoc-gen-openapiv2/options/openapiv2.proto | ||
| import * as jspb from "google-protobuf"; | ||
| import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; | ||
| export class Swagger extends jspb.Message { | ||
| getSwagger(): string; | ||
| setSwagger(value: string): void; | ||
| hasInfo(): boolean; | ||
| clearInfo(): void; | ||
| getInfo(): Info | undefined; | ||
| setInfo(value?: Info): void; | ||
| getHost(): string; | ||
| setHost(value: string): void; | ||
| getBasePath(): string; | ||
| setBasePath(value: string): void; | ||
| clearSchemesList(): void; | ||
| getSchemesList(): Array<SchemeMap[keyof SchemeMap]>; | ||
| setSchemesList(value: Array<SchemeMap[keyof SchemeMap]>): void; | ||
| addSchemes(value: SchemeMap[keyof SchemeMap], index?: number): SchemeMap[keyof SchemeMap]; | ||
| clearConsumesList(): void; | ||
| getConsumesList(): Array<string>; | ||
| setConsumesList(value: Array<string>): void; | ||
| addConsumes(value: string, index?: number): string; | ||
| clearProducesList(): void; | ||
| getProducesList(): Array<string>; | ||
| setProducesList(value: Array<string>): void; | ||
| addProduces(value: string, index?: number): string; | ||
| getResponsesMap(): jspb.Map<string, Response>; | ||
| clearResponsesMap(): void; | ||
| hasSecurityDefinitions(): boolean; | ||
| clearSecurityDefinitions(): void; | ||
| getSecurityDefinitions(): SecurityDefinitions | undefined; | ||
| setSecurityDefinitions(value?: SecurityDefinitions): void; | ||
| clearSecurityList(): void; | ||
| getSecurityList(): Array<SecurityRequirement>; | ||
| setSecurityList(value: Array<SecurityRequirement>): void; | ||
| addSecurity(value?: SecurityRequirement, index?: number): SecurityRequirement; | ||
| clearTagsList(): void; | ||
| getTagsList(): Array<Tag>; | ||
| setTagsList(value: Array<Tag>): void; | ||
| addTags(value?: Tag, index?: number): Tag; | ||
| hasExternalDocs(): boolean; | ||
| clearExternalDocs(): void; | ||
| getExternalDocs(): ExternalDocumentation | undefined; | ||
| setExternalDocs(value?: ExternalDocumentation): void; | ||
| getExtensionsMap(): jspb.Map<string, google_protobuf_struct_pb.Value>; | ||
| clearExtensionsMap(): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Swagger.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Swagger): Swagger.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Swagger, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Swagger; | ||
| static deserializeBinaryFromReader(message: Swagger, reader: jspb.BinaryReader): Swagger; | ||
| } | ||
| export namespace Swagger { | ||
| export type AsObject = { | ||
| swagger: string, | ||
| info?: Info.AsObject, | ||
| host: string, | ||
| basePath: string, | ||
| schemesList: Array<SchemeMap[keyof SchemeMap]>, | ||
| consumesList: Array<string>, | ||
| producesList: Array<string>, | ||
| responsesMap: Array<[string, Response.AsObject]>, | ||
| securityDefinitions?: SecurityDefinitions.AsObject, | ||
| securityList: Array<SecurityRequirement.AsObject>, | ||
| tagsList: Array<Tag.AsObject>, | ||
| externalDocs?: ExternalDocumentation.AsObject, | ||
| extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, | ||
| } | ||
| } | ||
| export class Operation extends jspb.Message { | ||
| clearTagsList(): void; | ||
| getTagsList(): Array<string>; | ||
| setTagsList(value: Array<string>): void; | ||
| addTags(value: string, index?: number): string; | ||
| getSummary(): string; | ||
| setSummary(value: string): void; | ||
| getDescription(): string; | ||
| setDescription(value: string): void; | ||
| hasExternalDocs(): boolean; | ||
| clearExternalDocs(): void; | ||
| getExternalDocs(): ExternalDocumentation | undefined; | ||
| setExternalDocs(value?: ExternalDocumentation): void; | ||
| getOperationId(): string; | ||
| setOperationId(value: string): void; | ||
| clearConsumesList(): void; | ||
| getConsumesList(): Array<string>; | ||
| setConsumesList(value: Array<string>): void; | ||
| addConsumes(value: string, index?: number): string; | ||
| clearProducesList(): void; | ||
| getProducesList(): Array<string>; | ||
| setProducesList(value: Array<string>): void; | ||
| addProduces(value: string, index?: number): string; | ||
| getResponsesMap(): jspb.Map<string, Response>; | ||
| clearResponsesMap(): void; | ||
| clearSchemesList(): void; | ||
| getSchemesList(): Array<SchemeMap[keyof SchemeMap]>; | ||
| setSchemesList(value: Array<SchemeMap[keyof SchemeMap]>): void; | ||
| addSchemes(value: SchemeMap[keyof SchemeMap], index?: number): SchemeMap[keyof SchemeMap]; | ||
| getDeprecated(): boolean; | ||
| setDeprecated(value: boolean): void; | ||
| clearSecurityList(): void; | ||
| getSecurityList(): Array<SecurityRequirement>; | ||
| setSecurityList(value: Array<SecurityRequirement>): void; | ||
| addSecurity(value?: SecurityRequirement, index?: number): SecurityRequirement; | ||
| getExtensionsMap(): jspb.Map<string, google_protobuf_struct_pb.Value>; | ||
| clearExtensionsMap(): void; | ||
| hasParameters(): boolean; | ||
| clearParameters(): void; | ||
| getParameters(): Parameters | undefined; | ||
| setParameters(value?: Parameters): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Operation.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Operation): Operation.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Operation, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Operation; | ||
| static deserializeBinaryFromReader(message: Operation, reader: jspb.BinaryReader): Operation; | ||
| } | ||
| export namespace Operation { | ||
| export type AsObject = { | ||
| tagsList: Array<string>, | ||
| summary: string, | ||
| description: string, | ||
| externalDocs?: ExternalDocumentation.AsObject, | ||
| operationId: string, | ||
| consumesList: Array<string>, | ||
| producesList: Array<string>, | ||
| responsesMap: Array<[string, Response.AsObject]>, | ||
| schemesList: Array<SchemeMap[keyof SchemeMap]>, | ||
| deprecated: boolean, | ||
| securityList: Array<SecurityRequirement.AsObject>, | ||
| extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, | ||
| parameters?: Parameters.AsObject, | ||
| } | ||
| } | ||
| export class Parameters extends jspb.Message { | ||
| clearHeadersList(): void; | ||
| getHeadersList(): Array<HeaderParameter>; | ||
| setHeadersList(value: Array<HeaderParameter>): void; | ||
| addHeaders(value?: HeaderParameter, index?: number): HeaderParameter; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Parameters.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Parameters): Parameters.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Parameters, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Parameters; | ||
| static deserializeBinaryFromReader(message: Parameters, reader: jspb.BinaryReader): Parameters; | ||
| } | ||
| export namespace Parameters { | ||
| export type AsObject = { | ||
| headersList: Array<HeaderParameter.AsObject>, | ||
| } | ||
| } | ||
| export class HeaderParameter extends jspb.Message { | ||
| getName(): string; | ||
| setName(value: string): void; | ||
| getDescription(): string; | ||
| setDescription(value: string): void; | ||
| getType(): HeaderParameter.TypeMap[keyof HeaderParameter.TypeMap]; | ||
| setType(value: HeaderParameter.TypeMap[keyof HeaderParameter.TypeMap]): void; | ||
| getFormat(): string; | ||
| setFormat(value: string): void; | ||
| getRequired(): boolean; | ||
| setRequired(value: boolean): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): HeaderParameter.AsObject; | ||
| static toObject(includeInstance: boolean, msg: HeaderParameter): HeaderParameter.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: HeaderParameter, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): HeaderParameter; | ||
| static deserializeBinaryFromReader(message: HeaderParameter, reader: jspb.BinaryReader): HeaderParameter; | ||
| } | ||
| export namespace HeaderParameter { | ||
| export type AsObject = { | ||
| name: string, | ||
| description: string, | ||
| type: HeaderParameter.TypeMap[keyof HeaderParameter.TypeMap], | ||
| format: string, | ||
| required: boolean, | ||
| } | ||
| export interface TypeMap { | ||
| UNKNOWN: 0; | ||
| STRING: 1; | ||
| NUMBER: 2; | ||
| INTEGER: 3; | ||
| BOOLEAN: 4; | ||
| } | ||
| export const Type: TypeMap; | ||
| } | ||
| export class Header extends jspb.Message { | ||
| getDescription(): string; | ||
| setDescription(value: string): void; | ||
| getType(): string; | ||
| setType(value: string): void; | ||
| getFormat(): string; | ||
| setFormat(value: string): void; | ||
| getDefault(): string; | ||
| setDefault(value: string): void; | ||
| getPattern(): string; | ||
| setPattern(value: string): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Header.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Header): Header.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Header; | ||
| static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; | ||
| } | ||
| export namespace Header { | ||
| export type AsObject = { | ||
| description: string, | ||
| type: string, | ||
| format: string, | ||
| pb_default: string, | ||
| pattern: string, | ||
| } | ||
| } | ||
| export class Response extends jspb.Message { | ||
| getDescription(): string; | ||
| setDescription(value: string): void; | ||
| hasSchema(): boolean; | ||
| clearSchema(): void; | ||
| getSchema(): Schema | undefined; | ||
| setSchema(value?: Schema): void; | ||
| getHeadersMap(): jspb.Map<string, Header>; | ||
| clearHeadersMap(): void; | ||
| getExamplesMap(): jspb.Map<string, string>; | ||
| clearExamplesMap(): void; | ||
| getExtensionsMap(): jspb.Map<string, google_protobuf_struct_pb.Value>; | ||
| clearExtensionsMap(): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Response.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Response): Response.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Response, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Response; | ||
| static deserializeBinaryFromReader(message: Response, reader: jspb.BinaryReader): Response; | ||
| } | ||
| export namespace Response { | ||
| export type AsObject = { | ||
| description: string, | ||
| schema?: Schema.AsObject, | ||
| headersMap: Array<[string, Header.AsObject]>, | ||
| examplesMap: Array<[string, string]>, | ||
| extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, | ||
| } | ||
| } | ||
| export class Info extends jspb.Message { | ||
| getTitle(): string; | ||
| setTitle(value: string): void; | ||
| getDescription(): string; | ||
| setDescription(value: string): void; | ||
| getTermsOfService(): string; | ||
| setTermsOfService(value: string): void; | ||
| hasContact(): boolean; | ||
| clearContact(): void; | ||
| getContact(): Contact | undefined; | ||
| setContact(value?: Contact): void; | ||
| hasLicense(): boolean; | ||
| clearLicense(): void; | ||
| getLicense(): License | undefined; | ||
| setLicense(value?: License): void; | ||
| getVersion(): string; | ||
| setVersion(value: string): void; | ||
| getExtensionsMap(): jspb.Map<string, google_protobuf_struct_pb.Value>; | ||
| clearExtensionsMap(): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Info.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Info): Info.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Info, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Info; | ||
| static deserializeBinaryFromReader(message: Info, reader: jspb.BinaryReader): Info; | ||
| } | ||
| export namespace Info { | ||
| export type AsObject = { | ||
| title: string, | ||
| description: string, | ||
| termsOfService: string, | ||
| contact?: Contact.AsObject, | ||
| license?: License.AsObject, | ||
| version: string, | ||
| extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, | ||
| } | ||
| } | ||
| export class Contact extends jspb.Message { | ||
| getName(): string; | ||
| setName(value: string): void; | ||
| getUrl(): string; | ||
| setUrl(value: string): void; | ||
| getEmail(): string; | ||
| setEmail(value: string): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Contact.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Contact): Contact.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Contact, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Contact; | ||
| static deserializeBinaryFromReader(message: Contact, reader: jspb.BinaryReader): Contact; | ||
| } | ||
| export namespace Contact { | ||
| export type AsObject = { | ||
| name: string, | ||
| url: string, | ||
| email: string, | ||
| } | ||
| } | ||
| export class License extends jspb.Message { | ||
| getName(): string; | ||
| setName(value: string): void; | ||
| getUrl(): string; | ||
| setUrl(value: string): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): License.AsObject; | ||
| static toObject(includeInstance: boolean, msg: License): License.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: License, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): License; | ||
| static deserializeBinaryFromReader(message: License, reader: jspb.BinaryReader): License; | ||
| } | ||
| export namespace License { | ||
| export type AsObject = { | ||
| name: string, | ||
| url: string, | ||
| } | ||
| } | ||
| export class ExternalDocumentation extends jspb.Message { | ||
| getDescription(): string; | ||
| setDescription(value: string): void; | ||
| getUrl(): string; | ||
| setUrl(value: string): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): ExternalDocumentation.AsObject; | ||
| static toObject(includeInstance: boolean, msg: ExternalDocumentation): ExternalDocumentation.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: ExternalDocumentation, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): ExternalDocumentation; | ||
| static deserializeBinaryFromReader(message: ExternalDocumentation, reader: jspb.BinaryReader): ExternalDocumentation; | ||
| } | ||
| export namespace ExternalDocumentation { | ||
| export type AsObject = { | ||
| description: string, | ||
| url: string, | ||
| } | ||
| } | ||
| export class Schema extends jspb.Message { | ||
| hasJsonSchema(): boolean; | ||
| clearJsonSchema(): void; | ||
| getJsonSchema(): JSONSchema | undefined; | ||
| setJsonSchema(value?: JSONSchema): void; | ||
| getDiscriminator(): string; | ||
| setDiscriminator(value: string): void; | ||
| getReadOnly(): boolean; | ||
| setReadOnly(value: boolean): void; | ||
| hasExternalDocs(): boolean; | ||
| clearExternalDocs(): void; | ||
| getExternalDocs(): ExternalDocumentation | undefined; | ||
| setExternalDocs(value?: ExternalDocumentation): void; | ||
| getExample(): string; | ||
| setExample(value: string): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Schema.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Schema): Schema.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Schema, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Schema; | ||
| static deserializeBinaryFromReader(message: Schema, reader: jspb.BinaryReader): Schema; | ||
| } | ||
| export namespace Schema { | ||
| export type AsObject = { | ||
| jsonSchema?: JSONSchema.AsObject, | ||
| discriminator: string, | ||
| readOnly: boolean, | ||
| externalDocs?: ExternalDocumentation.AsObject, | ||
| example: string, | ||
| } | ||
| } | ||
| export class JSONSchema extends jspb.Message { | ||
| getRef(): string; | ||
| setRef(value: string): void; | ||
| getTitle(): string; | ||
| setTitle(value: string): void; | ||
| getDescription(): string; | ||
| setDescription(value: string): void; | ||
| getDefault(): string; | ||
| setDefault(value: string): void; | ||
| getReadOnly(): boolean; | ||
| setReadOnly(value: boolean): void; | ||
| getExample(): string; | ||
| setExample(value: string): void; | ||
| getMultipleOf(): number; | ||
| setMultipleOf(value: number): void; | ||
| getMaximum(): number; | ||
| setMaximum(value: number): void; | ||
| getExclusiveMaximum(): boolean; | ||
| setExclusiveMaximum(value: boolean): void; | ||
| getMinimum(): number; | ||
| setMinimum(value: number): void; | ||
| getExclusiveMinimum(): boolean; | ||
| setExclusiveMinimum(value: boolean): void; | ||
| getMaxLength(): number; | ||
| setMaxLength(value: number): void; | ||
| getMinLength(): number; | ||
| setMinLength(value: number): void; | ||
| getPattern(): string; | ||
| setPattern(value: string): void; | ||
| getMaxItems(): number; | ||
| setMaxItems(value: number): void; | ||
| getMinItems(): number; | ||
| setMinItems(value: number): void; | ||
| getUniqueItems(): boolean; | ||
| setUniqueItems(value: boolean): void; | ||
| getMaxProperties(): number; | ||
| setMaxProperties(value: number): void; | ||
| getMinProperties(): number; | ||
| setMinProperties(value: number): void; | ||
| clearRequiredList(): void; | ||
| getRequiredList(): Array<string>; | ||
| setRequiredList(value: Array<string>): void; | ||
| addRequired(value: string, index?: number): string; | ||
| clearArrayList(): void; | ||
| getArrayList(): Array<string>; | ||
| setArrayList(value: Array<string>): void; | ||
| addArray(value: string, index?: number): string; | ||
| clearTypeList(): void; | ||
| getTypeList(): Array<JSONSchema.JSONSchemaSimpleTypesMap[keyof JSONSchema.JSONSchemaSimpleTypesMap]>; | ||
| setTypeList(value: Array<JSONSchema.JSONSchemaSimpleTypesMap[keyof JSONSchema.JSONSchemaSimpleTypesMap]>): void; | ||
| addType(value: JSONSchema.JSONSchemaSimpleTypesMap[keyof JSONSchema.JSONSchemaSimpleTypesMap], index?: number): JSONSchema.JSONSchemaSimpleTypesMap[keyof JSONSchema.JSONSchemaSimpleTypesMap]; | ||
| getFormat(): string; | ||
| setFormat(value: string): void; | ||
| clearEnumList(): void; | ||
| getEnumList(): Array<string>; | ||
| setEnumList(value: Array<string>): void; | ||
| addEnum(value: string, index?: number): string; | ||
| hasFieldConfiguration(): boolean; | ||
| clearFieldConfiguration(): void; | ||
| getFieldConfiguration(): JSONSchema.FieldConfiguration | undefined; | ||
| setFieldConfiguration(value?: JSONSchema.FieldConfiguration): void; | ||
| getExtensionsMap(): jspb.Map<string, google_protobuf_struct_pb.Value>; | ||
| clearExtensionsMap(): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): JSONSchema.AsObject; | ||
| static toObject(includeInstance: boolean, msg: JSONSchema): JSONSchema.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: JSONSchema, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): JSONSchema; | ||
| static deserializeBinaryFromReader(message: JSONSchema, reader: jspb.BinaryReader): JSONSchema; | ||
| } | ||
| export namespace JSONSchema { | ||
| export type AsObject = { | ||
| ref: string, | ||
| title: string, | ||
| description: string, | ||
| pb_default: string, | ||
| readOnly: boolean, | ||
| example: string, | ||
| multipleOf: number, | ||
| maximum: number, | ||
| exclusiveMaximum: boolean, | ||
| minimum: number, | ||
| exclusiveMinimum: boolean, | ||
| maxLength: number, | ||
| minLength: number, | ||
| pattern: string, | ||
| maxItems: number, | ||
| minItems: number, | ||
| uniqueItems: boolean, | ||
| maxProperties: number, | ||
| minProperties: number, | ||
| requiredList: Array<string>, | ||
| arrayList: Array<string>, | ||
| typeList: Array<JSONSchema.JSONSchemaSimpleTypesMap[keyof JSONSchema.JSONSchemaSimpleTypesMap]>, | ||
| format: string, | ||
| enumList: Array<string>, | ||
| fieldConfiguration?: JSONSchema.FieldConfiguration.AsObject, | ||
| extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, | ||
| } | ||
| export class FieldConfiguration extends jspb.Message { | ||
| getPathParamName(): string; | ||
| setPathParamName(value: string): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): FieldConfiguration.AsObject; | ||
| static toObject(includeInstance: boolean, msg: FieldConfiguration): FieldConfiguration.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: FieldConfiguration, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): FieldConfiguration; | ||
| static deserializeBinaryFromReader(message: FieldConfiguration, reader: jspb.BinaryReader): FieldConfiguration; | ||
| } | ||
| export namespace FieldConfiguration { | ||
| export type AsObject = { | ||
| pathParamName: string, | ||
| } | ||
| } | ||
| export interface JSONSchemaSimpleTypesMap { | ||
| UNKNOWN: 0; | ||
| ARRAY: 1; | ||
| BOOLEAN: 2; | ||
| INTEGER: 3; | ||
| NULL: 4; | ||
| NUMBER: 5; | ||
| OBJECT: 6; | ||
| STRING: 7; | ||
| } | ||
| export const JSONSchemaSimpleTypes: JSONSchemaSimpleTypesMap; | ||
| } | ||
| export class Tag extends jspb.Message { | ||
| getName(): string; | ||
| setName(value: string): void; | ||
| getDescription(): string; | ||
| setDescription(value: string): void; | ||
| hasExternalDocs(): boolean; | ||
| clearExternalDocs(): void; | ||
| getExternalDocs(): ExternalDocumentation | undefined; | ||
| setExternalDocs(value?: ExternalDocumentation): void; | ||
| getExtensionsMap(): jspb.Map<string, google_protobuf_struct_pb.Value>; | ||
| clearExtensionsMap(): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Tag.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Tag): Tag.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Tag, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Tag; | ||
| static deserializeBinaryFromReader(message: Tag, reader: jspb.BinaryReader): Tag; | ||
| } | ||
| export namespace Tag { | ||
| export type AsObject = { | ||
| name: string, | ||
| description: string, | ||
| externalDocs?: ExternalDocumentation.AsObject, | ||
| extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, | ||
| } | ||
| } | ||
| export class SecurityDefinitions extends jspb.Message { | ||
| getSecurityMap(): jspb.Map<string, SecurityScheme>; | ||
| clearSecurityMap(): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): SecurityDefinitions.AsObject; | ||
| static toObject(includeInstance: boolean, msg: SecurityDefinitions): SecurityDefinitions.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: SecurityDefinitions, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): SecurityDefinitions; | ||
| static deserializeBinaryFromReader(message: SecurityDefinitions, reader: jspb.BinaryReader): SecurityDefinitions; | ||
| } | ||
| export namespace SecurityDefinitions { | ||
| export type AsObject = { | ||
| securityMap: Array<[string, SecurityScheme.AsObject]>, | ||
| } | ||
| } | ||
| export class SecurityScheme extends jspb.Message { | ||
| getType(): SecurityScheme.TypeMap[keyof SecurityScheme.TypeMap]; | ||
| setType(value: SecurityScheme.TypeMap[keyof SecurityScheme.TypeMap]): void; | ||
| getDescription(): string; | ||
| setDescription(value: string): void; | ||
| getName(): string; | ||
| setName(value: string): void; | ||
| getIn(): SecurityScheme.InMap[keyof SecurityScheme.InMap]; | ||
| setIn(value: SecurityScheme.InMap[keyof SecurityScheme.InMap]): void; | ||
| getFlow(): SecurityScheme.FlowMap[keyof SecurityScheme.FlowMap]; | ||
| setFlow(value: SecurityScheme.FlowMap[keyof SecurityScheme.FlowMap]): void; | ||
| getAuthorizationUrl(): string; | ||
| setAuthorizationUrl(value: string): void; | ||
| getTokenUrl(): string; | ||
| setTokenUrl(value: string): void; | ||
| hasScopes(): boolean; | ||
| clearScopes(): void; | ||
| getScopes(): Scopes | undefined; | ||
| setScopes(value?: Scopes): void; | ||
| getExtensionsMap(): jspb.Map<string, google_protobuf_struct_pb.Value>; | ||
| clearExtensionsMap(): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): SecurityScheme.AsObject; | ||
| static toObject(includeInstance: boolean, msg: SecurityScheme): SecurityScheme.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: SecurityScheme, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): SecurityScheme; | ||
| static deserializeBinaryFromReader(message: SecurityScheme, reader: jspb.BinaryReader): SecurityScheme; | ||
| } | ||
| export namespace SecurityScheme { | ||
| export type AsObject = { | ||
| type: SecurityScheme.TypeMap[keyof SecurityScheme.TypeMap], | ||
| description: string, | ||
| name: string, | ||
| pb_in: SecurityScheme.InMap[keyof SecurityScheme.InMap], | ||
| flow: SecurityScheme.FlowMap[keyof SecurityScheme.FlowMap], | ||
| authorizationUrl: string, | ||
| tokenUrl: string, | ||
| scopes?: Scopes.AsObject, | ||
| extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, | ||
| } | ||
| export interface TypeMap { | ||
| TYPE_INVALID: 0; | ||
| TYPE_BASIC: 1; | ||
| TYPE_API_KEY: 2; | ||
| TYPE_OAUTH2: 3; | ||
| } | ||
| export const Type: TypeMap; | ||
| export interface InMap { | ||
| IN_INVALID: 0; | ||
| IN_QUERY: 1; | ||
| IN_HEADER: 2; | ||
| } | ||
| export const In: InMap; | ||
| export interface FlowMap { | ||
| FLOW_INVALID: 0; | ||
| FLOW_IMPLICIT: 1; | ||
| FLOW_PASSWORD: 2; | ||
| FLOW_APPLICATION: 3; | ||
| FLOW_ACCESS_CODE: 4; | ||
| } | ||
| export const Flow: FlowMap; | ||
| } | ||
| export class SecurityRequirement extends jspb.Message { | ||
| getSecurityRequirementMap(): jspb.Map<string, SecurityRequirement.SecurityRequirementValue>; | ||
| clearSecurityRequirementMap(): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): SecurityRequirement.AsObject; | ||
| static toObject(includeInstance: boolean, msg: SecurityRequirement): SecurityRequirement.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: SecurityRequirement, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): SecurityRequirement; | ||
| static deserializeBinaryFromReader(message: SecurityRequirement, reader: jspb.BinaryReader): SecurityRequirement; | ||
| } | ||
| export namespace SecurityRequirement { | ||
| export type AsObject = { | ||
| securityRequirementMap: Array<[string, SecurityRequirement.SecurityRequirementValue.AsObject]>, | ||
| } | ||
| export class SecurityRequirementValue extends jspb.Message { | ||
| clearScopeList(): void; | ||
| getScopeList(): Array<string>; | ||
| setScopeList(value: Array<string>): void; | ||
| addScope(value: string, index?: number): string; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): SecurityRequirementValue.AsObject; | ||
| static toObject(includeInstance: boolean, msg: SecurityRequirementValue): SecurityRequirementValue.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: SecurityRequirementValue, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): SecurityRequirementValue; | ||
| static deserializeBinaryFromReader(message: SecurityRequirementValue, reader: jspb.BinaryReader): SecurityRequirementValue; | ||
| } | ||
| export namespace SecurityRequirementValue { | ||
| export type AsObject = { | ||
| scopeList: Array<string>, | ||
| } | ||
| } | ||
| } | ||
| export class Scopes extends jspb.Message { | ||
| getScopeMap(): jspb.Map<string, string>; | ||
| clearScopeMap(): void; | ||
| serializeBinary(): Uint8Array; | ||
| toObject(includeInstance?: boolean): Scopes.AsObject; | ||
| static toObject(includeInstance: boolean, msg: Scopes): Scopes.AsObject; | ||
| static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>}; | ||
| static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>}; | ||
| static serializeBinaryToWriter(message: Scopes, writer: jspb.BinaryWriter): void; | ||
| static deserializeBinary(bytes: Uint8Array): Scopes; | ||
| static deserializeBinaryFromReader(message: Scopes, reader: jspb.BinaryReader): Scopes; | ||
| } | ||
| export namespace Scopes { | ||
| export type AsObject = { | ||
| scopeMap: Array<[string, string]>, | ||
| } | ||
| } | ||
| export interface SchemeMap { | ||
| UNKNOWN: 0; | ||
| HTTP: 1; | ||
| HTTPS: 2; | ||
| WS: 3; | ||
| WSS: 4; | ||
| } | ||
| export const Scheme: SchemeMap; | ||
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
0
-100%8
-11.11%55
10%1
-90%486567
-18.91%11371
-19.59%21
-62.5%29
1350%